diff options
-rw-r--r-- | embed.h | 3 | ||||
-rwxr-xr-x | embed.pl | 11 | ||||
-rw-r--r-- | global.sym | 1 | ||||
-rw-r--r-- | globals.c | 9 | ||||
-rw-r--r-- | iperlsys.h | 6 | ||||
-rw-r--r-- | objXSUB.h | 4 | ||||
-rw-r--r-- | perlapi.c | 12 | ||||
-rw-r--r-- | proto.h | 5 |
8 files changed, 48 insertions, 3 deletions
@@ -131,6 +131,7 @@ #define sv_catpvf_mg_nocontext Perl_sv_catpvf_mg_nocontext #define sv_setpvf_mg_nocontext Perl_sv_setpvf_mg_nocontext #define fprintf_nocontext Perl_fprintf_nocontext +#define printf_nocontext Perl_printf_nocontext #endif #define cv_ckproto Perl_cv_ckproto #define cv_clone Perl_cv_clone @@ -3188,6 +3189,8 @@ #define sv_setpvf_mg_nocontext Perl_sv_setpvf_mg_nocontext #define Perl_fprintf_nocontext CPerlObj::Perl_fprintf_nocontext #define fprintf_nocontext Perl_fprintf_nocontext +#define Perl_printf_nocontext CPerlObj::Perl_printf_nocontext +#define printf_nocontext Perl_printf_nocontext #endif #define Perl_cv_ckproto CPerlObj::Perl_cv_ckproto #define cv_ckproto Perl_cv_ckproto @@ -1073,6 +1073,16 @@ Perl_fprintf_nocontext(PerlIO *stream, const char *format, ...) return (*PL_StdIO->pVprintf)(PL_StdIO, stream, format, arglist); } +#undef Perl_printf_nocontext +int +Perl_printf_nocontext(const char *format, ...) +{ + dTHXo; + va_list(arglist); + va_start(arglist, format); + return (*PL_StdIO->pVprintf)(PL_StdIO, PerlIO_stdout(), format, arglist); +} + END_EXTERN_C #endif /* PERL_OBJECT */ @@ -1445,6 +1455,7 @@ Afnp |void |sv_setpvf_nocontext|SV* sv|const char* pat|... Afnp |void |sv_catpvf_mg_nocontext|SV* sv|const char* pat|... Afnp |void |sv_setpvf_mg_nocontext|SV* sv|const char* pat|... Afnp |int |fprintf_nocontext|PerlIO* stream|const char* fmt|... +Afnp |int |printf_nocontext|const char* fmt|... #endif p |void |cv_ckproto |CV* cv|GV* gv|char* p p |CV* |cv_clone |CV* proto diff --git a/global.sym b/global.sym index 870fccfa3d..49d4e858d5 100644 --- a/global.sym +++ b/global.sym @@ -68,6 +68,7 @@ Perl_sv_setpvf_nocontext Perl_sv_catpvf_mg_nocontext Perl_sv_setpvf_mg_nocontext Perl_fprintf_nocontext +Perl_printf_nocontext Perl_cv_const_sv Perl_cv_undef Perl_cx_dump @@ -79,4 +79,13 @@ Perl_fprintf_nocontext(PerlIO *stream, const char *format, ...) return PerlIO_vprintf(stream, format, arglist); } +int +Perl_printf_nocontext(const char *format, ...) +{ + dTHX; + va_list(arglist); + va_start(arglist, format); + return PerlIO_vprintf(PerlIO_stdout(), format, arglist); +} + #include "perlapi.h" /* bring in PL_force_link_funcs */ diff --git a/iperlsys.h b/iperlsys.h index fe03f5c53b..fdbd12a6fc 100644 --- a/iperlsys.h +++ b/iperlsys.h @@ -251,9 +251,9 @@ struct IPerlStdIOInfo #define PerlSIO_setlinebuf(f) \ (*PL_StdIO->pSetlinebuf)(PL_StdIO, (f)) #define PerlSIO_printf Perl_fprintf_nocontext -#define PerlSIO_stdoutf *PL_StdIO->pPrintf -#define PerlSIO_vprintf(f,fmt,a) \ - (*PL_StdIO->pVprintf)(PL_StdIO, (f),(fmt),a) +#define PerlSIO_stdoutf Perl_printf_nocontext +#define PerlSIO_vprintf(f,fmt,a) \ + (*PL_StdIO->pVprintf)(PL_StdIO, (f),(fmt),a) #define PerlSIO_ftell(f) \ (*PL_StdIO->pTell)(PL_StdIO, (f)) #define PerlSIO_fseek(f,o,w) \ @@ -228,6 +228,10 @@ #define Perl_fprintf_nocontext pPerl->Perl_fprintf_nocontext #undef fprintf_nocontext #define fprintf_nocontext Perl_fprintf_nocontext +#undef Perl_printf_nocontext +#define Perl_printf_nocontext pPerl->Perl_printf_nocontext +#undef printf_nocontext +#define printf_nocontext Perl_printf_nocontext #endif #undef Perl_cv_const_sv #define Perl_cv_const_sv pPerl->Perl_cv_const_sv @@ -480,6 +480,8 @@ Perl_sv_setpvf_mg_nocontext(SV* sv, const char* pat, ...) } #undef Perl_fprintf_nocontext + +#undef Perl_printf_nocontext #endif #undef Perl_cv_const_sv @@ -4199,6 +4201,16 @@ Perl_fprintf_nocontext(PerlIO *stream, const char *format, ...) return (*PL_StdIO->pVprintf)(PL_StdIO, stream, format, arglist); } +#undef Perl_printf_nocontext +int +Perl_printf_nocontext(const char *format, ...) +{ + dTHXo; + va_list(arglist); + va_start(arglist, format); + return (*PL_StdIO->pVprintf)(PL_StdIO, PerlIO_stdout(), format, arglist); +} + END_EXTERN_C #endif /* PERL_OBJECT */ @@ -177,6 +177,11 @@ PERL_CALLCONV int Perl_fprintf_nocontext(PerlIO* stream, const char* fmt, ...) __attribute__((format(printf,2,3))) #endif ; +PERL_CALLCONV int Perl_printf_nocontext(const char* fmt, ...) +#ifdef CHECK_FORMAT + __attribute__((format(printf,1,2))) +#endif +; #endif PERL_CALLCONV void Perl_cv_ckproto(pTHX_ CV* cv, GV* gv, char* p); PERL_CALLCONV CV* Perl_cv_clone(pTHX_ CV* proto); |