diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2006-05-13 01:28:49 +0300 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2006-05-12 20:57:07 +0000 |
commit | d9fad198da41e1cd37600ae397146e27a413303d (patch) | |
tree | 79dab04c73d50aa2a12e95f128a8cc3361ec5908 /pp_ctl.c | |
parent | 54f961c9c7fe5166a70653b44c67c26122bfc1fd (diff) | |
download | perl-d9fad198da41e1cd37600ae397146e27a413303d.tar.gz |
Re: [PATCH] my_snprintf
Message-ID: <4464E1F1.9010706@gmail.com>
p4raw-id: //depot/perl@28183
Diffstat (limited to 'pp_ctl.c')
-rw-r--r-- | pp_ctl.c | 21 |
1 files changed, 4 insertions, 17 deletions
@@ -831,11 +831,7 @@ PP(pp_formline) /* Formats aren't yet marked for locales, so assume "yes". */ { STORE_NUMERIC_STANDARD_SET_LOCAL(); -#ifdef USE_SNPRINTF - snprintf(t, SvLEN(PL_formtarget) - (t - SvPVX(PL_formtarget)), fmt, (int) fieldsize, (int) arg & 255, value); -#else - sprintf(t, fmt, (int) fieldsize, (int) arg & 255, value); -#endif /* ifdef USE_SNPRINTF */ + my_snprintf(t, SvLEN(PL_formtarget) - (t - SvPVX(PL_formtarget)), fmt, (int) fieldsize, (int) arg & 255, value); RESTORE_NUMERIC_STANDARD(); } t += fieldsize; @@ -2773,13 +2769,8 @@ Perl_sv_compile_2op(pTHX_ SV *sv, OP** startop, const char *code, PAD** padp) len = SvCUR(sv); } else -#ifdef USE_SNPRINTF - len = snprintf(tmpbuf, sizeof(tbuf), "_<(%.10s_eval %lu)", code, - (unsigned long)++PL_evalseq); -#else - len = my_sprintf(tmpbuf, "_<(%.10s_eval %lu)", code, - (unsigned long)++PL_evalseq); -#endif /* ifdef USE_SNPRINTF */ + len = my_snprintf(tmpbuf, sizeof(tbuf), "_<(%.10s_eval %lu)", code, + (unsigned long)++PL_evalseq); SAVECOPFILE_FREE(&PL_compiling); CopFILE_set(&PL_compiling, tmpbuf+2); SAVECOPLINE(&PL_compiling); @@ -3461,11 +3452,7 @@ PP(pp_entereval) len = SvCUR(temp_sv); } else -#ifdef USE_SNPRINTF - len = snprintf(tmpbuf, sizeof(tbuf), "_<(eval %lu)", (unsigned long)++PL_evalseq); -#else - len = my_sprintf(tmpbuf, "_<(eval %lu)", (unsigned long)++PL_evalseq); -#endif /* ifdef USE_SNPRINTF */ + len = my_snprintf(tmpbuf, sizeof(tbuf), "_<(eval %lu)", (unsigned long)++PL_evalseq); SAVECOPFILE_FREE(&PL_compiling); CopFILE_set(&PL_compiling, tmpbuf+2); SAVECOPLINE(&PL_compiling); |