The R Project SVN R

Rev

Rev 90254 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 90254 Rev 90288
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--2025     The R Core Team
3
 *  Copyright (C) 2002--2026     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 446... Line 446...
446
			UNPROTECT(1);
446
			UNPROTECT(1);
447
		    }
447
		    }
448
		}
448
		}
449
	    }
449
	    }
450
	    else { /* not '%' : handle string part */
450
	    else { /* not '%' : handle string part */
451
		char *ch = use_UTF8 ? (char *)strchr(curFormat, '%')
451
		const char *ch = use_UTF8 ? strchr(curFormat, '%')
452
				    /* MBCS-aware version used */
452
				    /* MBCS-aware version used */
453
		                    : Rf_strchr(curFormat, '%');
453
		                    : Rf_strchr_const(curFormat, '%');
454
		chunk = (ch) ? (size_t) (ch - curFormat) : strlen(curFormat);
454
		chunk = (ch) ? (size_t) (ch - curFormat) : strlen(curFormat);
455
		strncpy(bit, curFormat, chunk);
455
		strncpy(bit, curFormat, chunk);
456
		bit[chunk] = '\0';
456
		bit[chunk] = '\0';
457
	    }
457
	    }
458
	    if(ss) {
458
	    if(ss) {