The R Project SVN R

Rev

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

Rev 60844 Rev 62580
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--2012     The R Core Team
3
 *  Copyright (C) 2002--2013     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 233... Line 233...
233
			has_star = FALSE;
233
			has_star = FALSE;
234
 
234
 
235
		    if (fmt[strlen(fmt) - 1] == '%') {
235
		    if (fmt[strlen(fmt) - 1] == '%') {
236
			/* handle % with formatting options */
236
			/* handle % with formatting options */
237
			if (has_star)
237
			if (has_star)
238
			    sprintf(bit, fmt, star_arg);
238
			    snprintf(bit, MAXLINE+1, fmt, star_arg);
239
			else
239
			else
240
			    strcpy(bit, fmt);
240
			    strcpy(bit, fmt);
241
			/* was sprintf(..)  for which some compiler warn */
241
			/* was sprintf(..)  for which some compiler warn */
242
		    } else {
242
		    } else {
243
			Rboolean did_this = FALSE;
243
			Rboolean did_this = FALSE;