X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=proto.h;h=f00531c1bba002faf56fa0901f99be2ac1d04f5d;hb=cb50131aab68ac6dda048612c6e853b8cb08701e;hp=36f4a40d369b728c104296c997655c3eeb3f1288;hpb=8560c20dd6b2f3dfec719d4b500be45742de4507;p=p5sagit%2Fp5-mst-13.2.git diff --git a/proto.h b/proto.h index 36f4a40..f00531c 100644 --- a/proto.h +++ b/proto.h @@ -99,22 +99,78 @@ PERL_CALLCONV I32 Perl_my_chsize(pTHX_ int fd, Off_t length); PERL_CALLCONV MAGIC* Perl_condpair_magic(pTHX_ SV *sv); #endif PERL_CALLCONV OP* Perl_convert(pTHX_ I32 optype, I32 flags, OP* o); -PERL_CALLCONV void Perl_croak(pTHX_ const char* pat, ...) __attribute__((noreturn)); +PERL_CALLCONV void Perl_croak(pTHX_ const char* pat, ...) __attribute__((noreturn)) +#ifdef CHECK_FORMAT + __attribute__((format(printf,pTHX_1,pTHX_2))) +#endif +; PERL_CALLCONV void Perl_vcroak(pTHX_ const char* pat, va_list* args) __attribute__((noreturn)); #if defined(PERL_IMPLICIT_CONTEXT) -PERL_CALLCONV void Perl_croak_nocontext(const char* pat, ...) __attribute__((noreturn)); -PERL_CALLCONV OP* Perl_die_nocontext(const char* pat, ...); -PERL_CALLCONV void Perl_deb_nocontext(const char* pat, ...); -PERL_CALLCONV char* Perl_form_nocontext(const char* pat, ...); -PERL_CALLCONV SV* Perl_mess_nocontext(const char* pat, ...); -PERL_CALLCONV void Perl_warn_nocontext(const char* pat, ...); -PERL_CALLCONV void Perl_warner_nocontext(U32 err, const char* pat, ...); -PERL_CALLCONV SV* Perl_newSVpvf_nocontext(const char* pat, ...); -PERL_CALLCONV void Perl_sv_catpvf_nocontext(SV* sv, const char* pat, ...); -PERL_CALLCONV void Perl_sv_setpvf_nocontext(SV* sv, const char* pat, ...); -PERL_CALLCONV void Perl_sv_catpvf_mg_nocontext(SV* sv, const char* pat, ...); -PERL_CALLCONV void Perl_sv_setpvf_mg_nocontext(SV* sv, const char* pat, ...); -PERL_CALLCONV int Perl_fprintf_nocontext(PerlIO* stream, const char* fmt, ...); +PERL_CALLCONV void Perl_croak_nocontext(const char* pat, ...) __attribute__((noreturn)) +#ifdef CHECK_FORMAT + __attribute__((format(printf,1,2))) +#endif +; +PERL_CALLCONV OP* Perl_die_nocontext(const char* pat, ...) +#ifdef CHECK_FORMAT + __attribute__((format(printf,1,2))) +#endif +; +PERL_CALLCONV void Perl_deb_nocontext(const char* pat, ...) +#ifdef CHECK_FORMAT + __attribute__((format(printf,1,2))) +#endif +; +PERL_CALLCONV char* Perl_form_nocontext(const char* pat, ...) +#ifdef CHECK_FORMAT + __attribute__((format(printf,1,2))) +#endif +; +PERL_CALLCONV SV* Perl_mess_nocontext(const char* pat, ...) +#ifdef CHECK_FORMAT + __attribute__((format(printf,1,2))) +#endif +; +PERL_CALLCONV void Perl_warn_nocontext(const char* pat, ...) +#ifdef CHECK_FORMAT + __attribute__((format(printf,1,2))) +#endif +; +PERL_CALLCONV void Perl_warner_nocontext(U32 err, const char* pat, ...) +#ifdef CHECK_FORMAT + __attribute__((format(printf,2,3))) +#endif +; +PERL_CALLCONV SV* Perl_newSVpvf_nocontext(const char* pat, ...) +#ifdef CHECK_FORMAT + __attribute__((format(printf,1,2))) +#endif +; +PERL_CALLCONV void Perl_sv_catpvf_nocontext(SV* sv, const char* pat, ...) +#ifdef CHECK_FORMAT + __attribute__((format(printf,2,3))) +#endif +; +PERL_CALLCONV void Perl_sv_setpvf_nocontext(SV* sv, const char* pat, ...) +#ifdef CHECK_FORMAT + __attribute__((format(printf,2,3))) +#endif +; +PERL_CALLCONV void Perl_sv_catpvf_mg_nocontext(SV* sv, const char* pat, ...) +#ifdef CHECK_FORMAT + __attribute__((format(printf,2,3))) +#endif +; +PERL_CALLCONV void Perl_sv_setpvf_mg_nocontext(SV* sv, const char* pat, ...) +#ifdef CHECK_FORMAT + __attribute__((format(printf,2,3))) +#endif +; +PERL_CALLCONV int Perl_fprintf_nocontext(PerlIO* stream, const char* fmt, ...) +#ifdef CHECK_FORMAT + __attribute__((format(printf,2,3))) +#endif +; #endif PERL_CALLCONV void Perl_cv_ckproto(pTHX_ CV* cv, GV* gv, char* p); PERL_CALLCONV CV* Perl_cv_clone(pTHX_ CV* proto); @@ -131,7 +187,11 @@ PERL_CALLCONV char* Perl_get_no_modify(pTHX); PERL_CALLCONV U32* Perl_get_opargs(pTHX); PERL_CALLCONV PPADDR_t* Perl_get_ppaddr(pTHX); PERL_CALLCONV I32 Perl_cxinc(pTHX); -PERL_CALLCONV void Perl_deb(pTHX_ const char* pat, ...); +PERL_CALLCONV void Perl_deb(pTHX_ const char* pat, ...) +#ifdef CHECK_FORMAT + __attribute__((format(printf,pTHX_1,pTHX_2))) +#endif +; PERL_CALLCONV void Perl_vdeb(pTHX_ const char* pat, va_list* args); PERL_CALLCONV void Perl_debprofdump(pTHX); PERL_CALLCONV I32 Perl_debop(pTHX_ OP* o); @@ -139,7 +199,11 @@ PERL_CALLCONV I32 Perl_debstack(pTHX); PERL_CALLCONV I32 Perl_debstackptrs(pTHX); PERL_CALLCONV char* Perl_delimcpy(pTHX_ char* to, char* toend, char* from, char* fromend, int delim, I32* retlen); PERL_CALLCONV void Perl_deprecate(pTHX_ char* s); -PERL_CALLCONV OP* Perl_die(pTHX_ const char* pat, ...); +PERL_CALLCONV OP* Perl_die(pTHX_ const char* pat, ...) +#ifdef CHECK_FORMAT + __attribute__((format(printf,pTHX_1,pTHX_2))) +#endif +; PERL_CALLCONV OP* Perl_vdie(pTHX_ const char* pat, va_list* args); PERL_CALLCONV OP* Perl_die_where(pTHX_ char* message, STRLEN msglen); PERL_CALLCONV void Perl_dounwind(pTHX_ I32 cxix); @@ -199,7 +263,11 @@ PERL_CALLCONV PADOFFSET Perl_find_threadsv(pTHX_ const char *name); #endif PERL_CALLCONV OP* Perl_force_list(pTHX_ OP* arg); PERL_CALLCONV OP* Perl_fold_constants(pTHX_ OP* arg); -PERL_CALLCONV char* Perl_form(pTHX_ const char* pat, ...); +PERL_CALLCONV char* Perl_form(pTHX_ const char* pat, ...) +#ifdef CHECK_FORMAT + __attribute__((format(printf,pTHX_1,pTHX_2))) +#endif +; PERL_CALLCONV char* Perl_vform(pTHX_ const char* pat, va_list* args); PERL_CALLCONV void Perl_free_tmps(pTHX); PERL_CALLCONV OP* Perl_gen_constant_list(pTHX_ OP* o); @@ -369,7 +437,11 @@ PERL_CALLCONV void Perl_markstack_grow(pTHX); #if defined(USE_LOCALE_COLLATE) PERL_CALLCONV char* Perl_mem_collxfrm(pTHX_ const char* s, STRLEN len, STRLEN* xlen); #endif -PERL_CALLCONV SV* Perl_mess(pTHX_ const char* pat, ...); +PERL_CALLCONV SV* Perl_mess(pTHX_ const char* pat, ...) +#ifdef CHECK_FORMAT + __attribute__((format(printf,pTHX_1,pTHX_2))) +#endif +; PERL_CALLCONV SV* Perl_vmess(pTHX_ const char* pat, va_list* args); PERL_CALLCONV void Perl_qerror(pTHX_ SV* err); PERL_CALLCONV int Perl_mg_clear(pTHX_ SV* sv); @@ -456,7 +528,11 @@ PERL_CALLCONV SV* Perl_newSViv(pTHX_ IV i); PERL_CALLCONV SV* Perl_newSVnv(pTHX_ NV n); PERL_CALLCONV SV* Perl_newSVpv(pTHX_ const char* s, STRLEN len); PERL_CALLCONV SV* Perl_newSVpvn(pTHX_ const char* s, STRLEN len); -PERL_CALLCONV SV* Perl_newSVpvf(pTHX_ const char* pat, ...); +PERL_CALLCONV SV* Perl_newSVpvf(pTHX_ const char* pat, ...) +#ifdef CHECK_FORMAT + __attribute__((format(printf,pTHX_1,pTHX_2))) +#endif +; PERL_CALLCONV SV* Perl_vnewSVpvf(pTHX_ const char* pat, va_list* args); PERL_CALLCONV SV* Perl_newSVrv(pTHX_ SV* rv, const char* classname); PERL_CALLCONV SV* Perl_newSVsv(pTHX_ SV* old); @@ -620,7 +696,11 @@ PERL_CALLCONV I32 Perl_sv_true(pTHX_ SV *sv); PERL_CALLCONV void Perl_sv_add_arena(pTHX_ char* ptr, U32 size, U32 flags); PERL_CALLCONV int Perl_sv_backoff(pTHX_ SV* sv); PERL_CALLCONV SV* Perl_sv_bless(pTHX_ SV* sv, HV* stash); -PERL_CALLCONV void Perl_sv_catpvf(pTHX_ SV* sv, const char* pat, ...); +PERL_CALLCONV void Perl_sv_catpvf(pTHX_ SV* sv, const char* pat, ...) +#ifdef CHECK_FORMAT + __attribute__((format(printf,pTHX_2,pTHX_3))) +#endif +; PERL_CALLCONV void Perl_sv_vcatpvf(pTHX_ SV* sv, const char* pat, va_list* args); PERL_CALLCONV void Perl_sv_catpv(pTHX_ SV* sv, const char* ptr); PERL_CALLCONV void Perl_sv_catpvn(pTHX_ SV* sv, const char* ptr, STRLEN len); @@ -663,7 +743,11 @@ PERL_CALLCONV char* Perl_sv_reftype(pTHX_ SV* sv, int ob); PERL_CALLCONV void Perl_sv_replace(pTHX_ SV* sv, SV* nsv); PERL_CALLCONV void Perl_sv_report_used(pTHX); PERL_CALLCONV void Perl_sv_reset(pTHX_ char* s, HV* stash); -PERL_CALLCONV void Perl_sv_setpvf(pTHX_ SV* sv, const char* pat, ...); +PERL_CALLCONV void Perl_sv_setpvf(pTHX_ SV* sv, const char* pat, ...) +#ifdef CHECK_FORMAT + __attribute__((format(printf,pTHX_2,pTHX_3))) +#endif +; PERL_CALLCONV void Perl_sv_vsetpvf(pTHX_ SV* sv, const char* pat, va_list* args); PERL_CALLCONV void Perl_sv_setiv(pTHX_ SV* sv, IV num); PERL_CALLCONV void Perl_sv_setpviv(pTHX_ SV* sv, IV num); @@ -710,10 +794,19 @@ PERL_CALLCONV U8* Perl_uv_to_utf8(pTHX_ U8 *d, UV uv); PERL_CALLCONV void Perl_vivify_defelem(pTHX_ SV* sv); PERL_CALLCONV void Perl_vivify_ref(pTHX_ SV* sv, U32 to_what); PERL_CALLCONV I32 Perl_wait4pid(pTHX_ Pid_t pid, int* statusp, int flags); +PERL_CALLCONV void Perl_report_closed_fh(pTHX_ GV *gv, IO *io, const char *func, const char *obj); PERL_CALLCONV void Perl_report_uninit(pTHX); -PERL_CALLCONV void Perl_warn(pTHX_ const char* pat, ...); +PERL_CALLCONV void Perl_warn(pTHX_ const char* pat, ...) +#ifdef CHECK_FORMAT + __attribute__((format(printf,pTHX_1,pTHX_2))) +#endif +; PERL_CALLCONV void Perl_vwarn(pTHX_ const char* pat, va_list* args); -PERL_CALLCONV void Perl_warner(pTHX_ U32 err, const char* pat, ...); +PERL_CALLCONV void Perl_warner(pTHX_ U32 err, const char* pat, ...) +#ifdef CHECK_FORMAT + __attribute__((format(printf,pTHX_2,pTHX_3))) +#endif +; PERL_CALLCONV void Perl_vwarner(pTHX_ U32 err, const char* pat, va_list* args); PERL_CALLCONV void Perl_watch(pTHX_ char** addr); PERL_CALLCONV I32 Perl_whichsig(pTHX_ char* sig); @@ -743,12 +836,20 @@ PERL_CALLCONV struct perl_vars * Perl_GetVars(pTHX); #endif PERL_CALLCONV int Perl_runops_standard(pTHX); PERL_CALLCONV int Perl_runops_debug(pTHX); -PERL_CALLCONV void Perl_sv_catpvf_mg(pTHX_ SV *sv, const char* pat, ...); +PERL_CALLCONV void Perl_sv_catpvf_mg(pTHX_ SV *sv, const char* pat, ...) +#ifdef CHECK_FORMAT + __attribute__((format(printf,pTHX_2,pTHX_3))) +#endif +; PERL_CALLCONV void Perl_sv_vcatpvf_mg(pTHX_ SV* sv, const char* pat, va_list* args); PERL_CALLCONV void Perl_sv_catpv_mg(pTHX_ SV *sv, const char *ptr); PERL_CALLCONV void Perl_sv_catpvn_mg(pTHX_ SV *sv, const char *ptr, STRLEN len); PERL_CALLCONV void Perl_sv_catsv_mg(pTHX_ SV *dstr, SV *sstr); -PERL_CALLCONV void Perl_sv_setpvf_mg(pTHX_ SV *sv, const char* pat, ...); +PERL_CALLCONV void Perl_sv_setpvf_mg(pTHX_ SV *sv, const char* pat, ...) +#ifdef CHECK_FORMAT + __attribute__((format(printf,pTHX_2,pTHX_3))) +#endif +; PERL_CALLCONV void Perl_sv_vsetpvf_mg(pTHX_ SV* sv, const char* pat, va_list* args); PERL_CALLCONV void Perl_sv_setiv_mg(pTHX_ SV *sv, IV i); PERL_CALLCONV void Perl_sv_setpviv_mg(pTHX_ SV *sv, IV iv); @@ -760,7 +861,11 @@ PERL_CALLCONV void Perl_sv_setsv_mg(pTHX_ SV *dstr, SV *sstr); PERL_CALLCONV void Perl_sv_usepvn_mg(pTHX_ SV *sv, char *ptr, STRLEN len); PERL_CALLCONV MGVTBL* Perl_get_vtbl(pTHX_ int vtbl_id); PERL_CALLCONV char* Perl_pv_display(pTHX_ SV *sv, char *pv, STRLEN cur, STRLEN len, STRLEN pvlim); -PERL_CALLCONV void Perl_dump_indent(pTHX_ I32 level, PerlIO *file, const char* pat, ...); +PERL_CALLCONV void Perl_dump_indent(pTHX_ I32 level, PerlIO *file, const char* pat, ...) +#ifdef CHECK_FORMAT + __attribute__((format(printf,pTHX_3,pTHX_4))) +#endif +; PERL_CALLCONV void Perl_dump_vindent(pTHX_ I32 level, PerlIO *file, const char* pat, va_list *args); PERL_CALLCONV void Perl_do_gv_dump(pTHX_ I32 level, PerlIO *file, char *name, GV *sv); PERL_CALLCONV void Perl_do_gvgv_dump(pTHX_ I32 level, PerlIO *file, char *name, GV *sv); @@ -864,6 +969,7 @@ STATIC OP* S_too_few_arguments(pTHX_ OP *o, char* name); STATIC OP* S_too_many_arguments(pTHX_ OP *o, char* name); STATIC void S_op_clear(pTHX_ OP* o); STATIC void S_null(pTHX_ OP* o); +STATIC PADOFFSET S_pad_addlex(pTHX_ SV* name); STATIC PADOFFSET S_pad_findlex(pTHX_ char* name, PADOFFSET newoff, U32 seq, CV* startcv, I32 cx_ix, I32 saweval, U32 flags); STATIC OP* S_newDEFSVOP(pTHX); STATIC OP* S_new_logop(pTHX_ I32 type, I32 flags, OP **firstp, OP **otherp);