This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Don't run locale test if -DNO_LOCALE
[perl5.git] / proto.h
diff --git a/proto.h b/proto.h
index df537e9..f8ad899 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -8,7 +8,7 @@
 #endif
 #ifdef OVERLOAD
 SV*    amagic_call _((SV* left,SV* right,int method,int dir));
-bool Gv_AMupdate _((HV* stash));
+bool   Gv_AMupdate _((HV* stash));
 #endif /* OVERLOAD */
 OP*    append_elem _((I32 optype, OP* head, OP* tail));
 OP*    append_list _((I32 optype, LISTOP* first, LISTOP* last));
@@ -28,8 +28,8 @@ SV**  av_store _((AV* ar, I32 key, SV* val));
 void   av_undef _((AV* ar));
 void   av_unshift _((AV* ar, I32 num));
 OP*    bind_match _((I32 type, OP* left, OP* pat));
-OP*    block_end _((int line, int floor, OP* seq));
-int    block_start _((void));
+OP*    block_end _((I32 floor, OP* seq));
+int    block_start _((int full));
 void   boot_core_UNIVERSAL _((void));
 void   calllist _((AV* list));
 I32    cando _((I32 bit, I32 effective, struct stat* statbufp));
@@ -43,7 +43,8 @@ OP *  ck_gvconst _((OP * o));
 OP *   ck_retarget _((OP *op));
 OP*    convert _((I32 optype, I32 flags, OP* op));
 char*  cpytill _((char* to, char* from, char* fromend, int delim, I32* retlen));
-void   croak _((char* pat,...)) __attribute__((format(printf,1,2),noreturn));
+void   croak _((const char* pat,...))
+               __attribute__((format(printf,1,2),noreturn));
 CV*    cv_clone _((CV* proto));
 void   cv_undef _((CV* cv));
 SV*    cv_const_sv _((CV* cv));
@@ -54,7 +55,7 @@ SV *  filter_add _((filter_t funcp, SV *datasv));
 void   filter_del _((filter_t funcp));
 I32    filter_read _((int idx, SV *buffer, int maxlen));
 I32    cxinc _((void));
-void   deb _((char* pat,...)) __attribute__((format(printf,1,2)));
+void   deb _((const char* pat,...)) __attribute__((format(printf,1,2)));
 void   deb_growlevel _((void));
 I32    debop _((OP* op));
 I32    debstackptrs _((void));
@@ -63,7 +64,7 @@ void  debprofdump _((void));
 #endif
 I32    debstack _((void));
 void   deprecate _((char* s));
-OP*    die _((char* pat,...)) __attribute__((format(printf,1,2)));
+OP*    die _((const char* pat,...)) __attribute__((format(printf,1,2)));
 OP*    die_where _((char* message));
 void   dounwind _((I32 cxix));
 bool   do_aexec _((SV* really, SV** mark, SV** sp));
@@ -113,7 +114,7 @@ void        dump_op _((OP* arg));
 void   dump_pm _((PMOP* pm));
 void   dump_packsubs _((HV* stash));
 void   dump_sub _((GV* gv));
-void   fbm_compile _((SV* sv, I32 iflag));
+void   fbm_compile _((SV* sv));
 char*  fbm_instr _((unsigned char* big, unsigned char* bigend, SV* littlesv));
 OP*    force_list _((OP* arg));
 OP*    fold_constants _((OP * arg));
@@ -124,19 +125,22 @@ GP*       gp_ref _((GP* gp));
 GV*    gv_AVadd _((GV* gv));
 GV*    gv_HVadd _((GV* gv));
 GV*    gv_IOadd _((GV* gv));
+GV*    gv_autoload _((HV* stash, char* name, STRLEN len));
 void   gv_check _((HV* stash));
-void   gv_efullname _((SV *sv, GV *gv, char *prefix));
+void   gv_efullname _((SV* sv, GV* gv));
+void   gv_efullname3 _((SV* sv, GV* gv, char* prefix));
 GV*    gv_fetchfile _((char* name));
 GV*    gv_fetchmeth _((HV* stash, char* name, STRLEN len, I32 level));
 GV*    gv_fetchmethod _((HV* stash, char* name));
 GV*    gv_fetchpv _((char* name, I32 add, I32 sv_type));
-void   gv_fullname _((SV *sv, GV *gv, char *prefix));
+void   gv_fullname _((SV* sv, GV* gv));
+void   gv_fullname3 _((SV* sv, GV* gv, char* prefix));
 void   gv_init _((GV *gv, HV *stash, char *name, STRLEN len, int multi));
 HV*    gv_stashpv _((char* name, I32 create));
 HV*    gv_stashpvn _((char* name, U32 namelen, I32 create));
 HV*    gv_stashsv _((SV* sv, I32 create));
-void   he_delayfree _((HE* hent, I32 shared));
-void   he_free _((HE* hent, I32 shared));
+void   he_delayfree _((HV* hv, HE* hent));
+void   he_free _((HV* hv, HE* hent));
 void   hoistmust _((PMOP* pm));
 void   hv_clear _((HV* tb));
 SV*    hv_delete _((HV* tb, char* key, U32 klen, I32 flags));
@@ -151,12 +155,15 @@ SV*       hv_iterkeysv _((HE* entry));
 HE*    hv_iternext _((HV* tb));
 SV*    hv_iternextsv _((HV* hv, char** key, I32* retlen));
 SV*    hv_iterval _((HV* tb, HE* entry));
+void   hv_ksplit _((HV* hv, IV newmax));
 void   hv_magic _((HV* hv, GV* gv, int how));
 SV**   hv_store _((HV* tb, char* key, U32 klen, SV* val, U32 hash));
 HE*    hv_store_ent _((HV* tb, SV* key, SV* val, U32 hash));
 void   hv_undef _((HV* tb));
-I32    ibcmp _((U8* a, U8* b, I32 len));
+I32    ibcmp _((char* a, char* b, I32 len));
+I32    ibcmp_locale _((char* a, char* b, I32 len));
 I32    ingroup _((I32 testgid, I32 effective));
+U32    intro_my _((void));
 char*  instr _((char* big, char* little));
 bool   io_close _((IO* io));
 OP*    invert _((OP* cmd));
@@ -173,11 +180,13 @@ I32       looks_like_number _((SV* sv));
 int    magic_clearenv  _((SV* sv, MAGIC* mg));
 int    magic_clearpack _((SV* sv, MAGIC* mg));
 int    magic_clearsig  _((SV* sv, MAGIC* mg));
-int    magic_existspack        _((SV* sv, MAGIC* mg));
+int    magic_existspack _((SV* sv, MAGIC* mg));
+int    magic_freeitervar _((SV* sv, MAGIC* mg));
 int    magic_get       _((SV* sv, MAGIC* mg));
 int    magic_getarylen _((SV* sv, MAGIC* mg));
 int    magic_getpack   _((SV* sv, MAGIC* mg));
 int    magic_getglob   _((SV* sv, MAGIC* mg));
+int    magic_getitervar _((SV* sv, MAGIC* mg));
 int    magic_getpos    _((SV* sv, MAGIC* mg));
 int    magic_getsig    _((SV* sv, MAGIC* mg));
 int    magic_gettaint  _((SV* sv, MAGIC* mg));
@@ -191,10 +200,16 @@ int       magic_setamagic _((SV* sv, MAGIC* mg));
 int    magic_setarylen _((SV* sv, MAGIC* mg));
 int    magic_setbm     _((SV* sv, MAGIC* mg));
 int    magic_setdbline _((SV* sv, MAGIC* mg));
+#ifdef USE_LOCALE_COLLATE
+int    magic_setcollxfrm _((SV* sv, MAGIC* mg));
+#endif
 int    magic_setenv    _((SV* sv, MAGIC* mg));
+int    magic_setfm     _((SV* sv, MAGIC* mg));
 int    magic_setisa    _((SV* sv, MAGIC* mg));
+int    magic_setitervar _((SV* sv, MAGIC* mg));
 int    magic_setglob   _((SV* sv, MAGIC* mg));
 int    magic_setmglob  _((SV* sv, MAGIC* mg));
+int    magic_setnkeys  _((SV* sv, MAGIC* mg));
 int    magic_setpack   _((SV* sv, MAGIC* mg));
 int    magic_setpos    _((SV* sv, MAGIC* mg));
 int    magic_setsig    _((SV* sv, MAGIC* mg));
@@ -205,17 +220,11 @@ int       magic_setvec    _((SV* sv, MAGIC* mg));
 int    magic_wipepack  _((SV* sv, MAGIC* mg));
 void   magicname _((char* sym, char* name, I32 namlen));
 int    main _((int argc, char** argv, char** env));
-#if !defined(STANDARD_C)
-Malloc_t       malloc _((MEM_SIZE nbytes));
-#endif
-#if defined(MYMALLOC) && defined(HIDEMYMALLOC)
-extern Malloc_t malloc _((MEM_SIZE nbytes));
-extern Malloc_t realloc _((Malloc_t, MEM_SIZE));
-extern Free_t   free _((Malloc_t));
-extern Malloc_t calloc _((MEM_SIZE, MEM_SIZE));
-#endif
 void   markstack_grow _((void));
-char*  mess _((char* pat, va_list* args));
+#ifdef USE_LOCALE_COLLATE
+char*  mem_collxfrm _((const char *s, STRLEN len, STRLEN *xlen));
+#endif
+char*  mess _((const char* pat, va_list* args));
 int    mg_clear _((SV* sv));
 int    mg_copy _((SV *, SV *, char *, I32));
 MAGIC* mg_find _((SV* sv, int type));
@@ -227,14 +236,17 @@ int       mg_set _((SV* sv));
 OP*    mod _((OP* op, I32 type));
 char*  moreswitches _((char* s));
 OP *   my _(( OP *));
+#if !defined(HAS_BCOPY) || !defined(HAS_SAFE_BCOPY)
 char*  my_bcopy _((char* from, char* to, I32 len));
+#endif
 #if !defined(HAS_BZERO) && !defined(HAS_MEMSET)
 char*  my_bzero _((char* loc, I32 len));
 #endif
 void   my_exit _((U32 status)) __attribute__((noreturn));
+void   my_failure_exit _((void)) __attribute__((noreturn));
 I32    my_lstat _((void));
-#ifndef HAS_MEMCMP
-I32    my_memcmp _((unsigned char* s1, unsigned char* s2, I32 len));
+#if !defined(HAS_MEMCMP) || !defined(HAS_SANE_MEMCMP)
+I32    my_memcmp _((char* s1, char* s2, I32 len));
 #endif
 I32    my_pclose _((PerlIO* ptr));
 PerlIO*        my_popen _((char* cmd, char* mode));
@@ -325,6 +337,12 @@ AV*        perl_get_av _((char* name, I32 create));
 HV*    perl_get_hv _((char* name, I32 create));
 CV*    perl_get_cv _((char* name, I32 create));
 int    perl_init_i18nl10n _((int printwarn));
+int    perl_init_i18nl14n _((int printwarn));
+void   perl_new_collate _((char *newcoll));
+void   perl_new_ctype _((char *newctype));
+void   perl_new_numeric _((char *newcoll));
+void   perl_set_numeric_local _((void));
+void   perl_set_numeric_standard _((void));
 int    perl_parse _((PerlInterpreter* sv_interp, void(*xsinit)(void), int argc, char** argv, char** env));
 void   perl_require_pv _((char* pv));
 #define perl_requirepv perl_require_pv
@@ -349,30 +367,16 @@ char*     regnext _((char* p));
 char*  regprop _((char* op));
 void   repeatcpy _((char* to, char* from, I32 len, I32 count));
 char*  rninstr _((char* big, char* bigend, char* little, char* lend));
+Sighandler_t rsignal _((int, Sighandler_t));
+int    rsignal_restore _((int, Sigsave_t*));
+int    rsignal_save _((int, Sighandler_t, Sigsave_t*));
+Sighandler_t rsignal_state _((int));
 int    runops _((void));
-#ifndef safemalloc
-void   safefree _((Malloc_t where));
-Malloc_t       safemalloc _((MEM_SIZE size));
-#ifndef MSDOS
-Malloc_t       saferealloc _((Malloc_t where, MEM_SIZE size));
-#else
-Malloc_t       saferealloc _((Malloc_t where, unsigned long size));
-#endif
-Malloc_t       safecalloc _((MEM_SIZE cnt, MEM_SIZE size));
-#endif
-#ifdef LEAKTEST
-void   safexfree _((Malloc_t where));
-Malloc_t       safexmalloc _((I32 x, MEM_SIZE size));
-Malloc_t       safexrealloc _((Malloc_t where, MEM_SIZE size));
-Malloc_t       safexcalloc _((I32 x, MEM_SIZE size, MEM_SIZE size));
-#endif
 #ifndef HAS_RENAME
 I32    same_dirent _((char* a, char* b));
 #endif
 char*  savepv _((char* sv));
 char*  savepvn _((char* sv, I32 len));
-char*  sharepvn _((char* sv, I32 len, U32 hash));
-void   unsharepvn _((char* sv, I32 len, U32 hash));
 void   savestack_grow _((void));
 void   save_aptr _((AV** aptr));
 AV*    save_ary _((GV* gv));
@@ -384,11 +388,14 @@ void      save_destructor _((void (*f)(void*), void* p));
 void   save_freesv _((SV* sv));
 void   save_freeop _((OP* op));
 void   save_freepv _((char* pv));
+void   save_gp _((GV* gv, I32 empty));
 HV*    save_hash _((GV* gv));
 void   save_hptr _((HV** hptr));
+void   save_I16 _((I16* intp));
 void   save_I32 _((I32* intp));
 void   save_int _((int* intp));
 void   save_item _((SV* item));
+void   save_iv _((IV* iv));
 void   save_list _((SV** sarg, I32 maxsarg));
 void   save_long _((long *longp));
 void   save_nogv _((GV* gv));
@@ -401,18 +408,21 @@ OP*       scalar _((OP* o));
 OP*    scalarkids _((OP* op));
 OP*    scalarseq _((OP* o));
 OP*    scalarvoid _((OP* op));
-unsigned long  scan_hex _((char* start, I32 len, I32* retlen));
+UV     scan_hex _((char* start, I32 len, I32* retlen));
 char*  scan_num _((char* s));
-unsigned long  scan_oct _((char* start, I32 len, I32* retlen));
+UV     scan_oct _((char* start, I32 len, I32* retlen));
 OP*    scope _((OP* o));
 char*  screaminstr _((SV* bigsv, SV* littlesv));
 #ifndef VMS
 I32    setenv_getix _((char* nam));
 #endif
 void   setdefout _((GV *gv));
+char*  sharepvn _((char* sv, I32 len, U32 hash));
+HEK*   share_hek _((char* sv, I32 len, U32 hash));
 Signal_t sighandler _((int sig));
 SV**   stack_grow _((SV** sp, SV**p, int n));
-int    start_subparse _((void));
+int    start_subparse _((I32 is_format, U32 flags));
+void   sub_crush_depth _((CV* cv));
 bool   sv_2bool _((SV* sv));
 CV*    sv_2cv _((SV* sv, HV** st, GV** gvp, I32 lref));
 IO*    sv_2io _((SV* sv));
@@ -420,6 +430,7 @@ IV  sv_2iv _((SV* sv));
 SV*    sv_2mortal _((SV* sv));
 double sv_2nv _((SV* sv));
 char*  sv_2pv _((SV* sv, STRLEN* lp));
+UV     sv_2uv _((SV* sv));
 void   sv_add_arena _((char* ptr, U32 size, U32 flags));
 int    sv_backoff _((SV* sv));
 SV*    sv_bless _((SV* sv, HV* stash));
@@ -431,8 +442,13 @@ void       sv_clean_all _((void));
 void   sv_clean_objs _((void));
 void   sv_clear _((SV* sv));
 I32    sv_cmp _((SV* sv1, SV* sv2));
+I32    sv_cmp_locale _((SV* sv1, SV* sv2));
+#ifdef USE_LOCALE_COLLATE
+char*  sv_collxfrm _((SV* sv, STRLEN* nxp));
+#endif
 void   sv_dec _((SV* sv));
 void   sv_dump _((SV* sv));
+bool   sv_derived_from _((SV* sv, char* name));
 I32    sv_eq _((SV* sv1, SV* sv2));
 void   sv_free _((SV* sv));
 void   sv_free_arenas _((void));
@@ -458,30 +474,57 @@ void      sv_replace _((SV* sv, SV* nsv));
 void   sv_report_used _((void));
 void   sv_reset _((char* s, HV* stash));
 void   sv_setiv _((SV* sv, IV num));
+void   sv_setuv _((SV* sv, UV num));
 void   sv_setnv _((SV* sv, double num));
 SV*    sv_setref_iv _((SV *rv, char *classname, IV iv));
 SV*    sv_setref_nv _((SV *rv, char *classname, double nv));
 SV*    sv_setref_pv _((SV *rv, char *classname, void* pv));
 SV*    sv_setref_pvn _((SV *rv, char *classname, char* pv, I32 n));
-void   sv_setpv _((SV* sv, char* ptr));
-void   sv_setpvn _((SV* sv, char* ptr, STRLEN len));
+void   sv_setpv _((SV* sv, const char* ptr));
+void   sv_setpvn _((SV* sv, const char* ptr, STRLEN len));
 void   sv_setsv _((SV* dsv, SV* ssv));
+void   sv_taint _((SV* sv));
+bool   sv_tainted _((SV* sv));
 int    sv_unmagic _((SV* sv, int type));
 void   sv_unref _((SV* sv));
+void   sv_untaint _((SV* sv));
 bool   sv_upgrade _((SV* sv, U32 mt));
 void   sv_usepvn _((SV* sv, char* ptr, STRLEN len));
 void   taint_env _((void));
-void   taint_not _((char *s));
-void   taint_proper _((char* f, char* s));
+void   taint_proper _((const char* f, char* s));
 #ifdef UNLINK_ALL_VERSIONS
 I32    unlnk _((char* f));
 #endif
+void   unsharepvn _((char* sv, I32 len, U32 hash));
+void   unshare_hek _((HEK* hek));
 void   utilize _((int aver, I32 floor, OP* version, OP* id, OP* arg));
+void   vivify_itervar _((SV* sv));
 I32    wait4pid _((int pid, int* statusp, int flags));
-void   warn _((char* pat,...)) __attribute__((format(printf,1,2)));
+void   warn _((const char* pat,...)) __attribute__((format(printf,1,2)));
 void   watch _((char **addr));
 I32    whichsig _((char* sig));
 int    yyerror _((char* s));
 int    yylex _((void));
 int    yyparse _((void));
 int    yywarn _((char* s));
+
+#if defined(MYMALLOC) || !defined(STANDARD_C)
+Malloc_t malloc _((MEM_SIZE nbytes));
+Malloc_t calloc _((MEM_SIZE elements, MEM_SIZE size));
+Malloc_t realloc _((Malloc_t where, MEM_SIZE nbytes));
+Free_t   free _((Malloc_t where));
+#endif
+
+#ifndef MYMALLOC
+Malloc_t safemalloc _((MEM_SIZE nbytes));
+Malloc_t safecalloc _((MEM_SIZE elements, MEM_SIZE size));
+Malloc_t saferealloc _((Malloc_t where, MEM_SIZE nbytes));
+Free_t   safefree _((Malloc_t where));
+#endif
+
+#ifdef LEAKTEST
+Malloc_t safexmalloc _((I32 x, MEM_SIZE size));
+Malloc_t safexcalloc _((I32 x, MEM_SIZE elements, MEM_SIZE size));
+Malloc_t safexrealloc _((Malloc_t where, MEM_SIZE size));
+void     safexfree _((Malloc_t where));
+#endif