The R Project SVN R

Rev

Rev 72737 | Rev 79376 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 72737 Rev 76243
Line 1... Line 1...
1
/*
1
/*
2
 *  R : A Computer Language for Statistical Data Analysis
2
 *  R : A Computer Language for Statistical Data Analysis
3
 *  Copyright (C) 2002--2016     The R Core Team
3
 *  Copyright (C) 2002--2019     The R Core Team
4
 *
4
 *
5
 *  This program is free software; you can redistribute it and/or modify
5
 *  This program is free software; you can redistribute it and/or modify
6
 *  it under the terms of the GNU General Public License as published by
6
 *  it under the terms of the GNU General Public License as published by
7
 *  the Free Software Foundation; either version 2 of the License, or
7
 *  the Free Software Foundation; either version 2 of the License, or
8
 *  (at your option) any later version.
8
 *  (at your option) any later version.
Line 437... Line 437...
437
			UNPROTECT(1);
437
			UNPROTECT(1);
438
		    }
438
		    }
439
		}
439
		}
440
	    }
440
	    }
441
	    else { /* not '%' : handle string part */
441
	    else { /* not '%' : handle string part */
-
 
442
		char *ch = use_UTF8 ? strchr(curFormat, '%')
442
		char *ch = Rf_strchr(curFormat, '%'); /* MBCS-aware version used */
443
				    /* MBCS-aware version used */
-
 
444
		                    : Rf_strchr(curFormat, '%');
443
		chunk = (ch) ? (size_t) (ch - curFormat) : strlen(curFormat);
445
		chunk = (ch) ? (size_t) (ch - curFormat) : strlen(curFormat);
444
		strncpy(bit, curFormat, chunk);
446
		strncpy(bit, curFormat, chunk);
445
		bit[chunk] = '\0';
447
		bit[chunk] = '\0';
446
	    }
448
	    }
447
	    if(ss) {
449
	    if(ss) {