X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=proto.h;h=e1b91dc30474a673a1e3b86fb5728295918b22c5;hb=778ddebdd36200650e05e3789258e36307a5988b;hp=740a23e2ed93507bc194e8880cb8dd5951b3764d;hpb=0824fdcbe5421f2bac41d2423c4922c21d9416b2;p=p5sagit%2Fp5-mst-13.2.git diff --git a/proto.h b/proto.h index 740a23e..e1b91dc 100644 --- a/proto.h +++ b/proto.h @@ -1,11 +1,4 @@ #ifdef PERL_OBJECT -#include "ipstdio.h" -#include "ipdir.h" -#include "ipenv.h" -#include "iplio.h" -#include "ipmem.h" -#include "ipproc.h" -#include "ipsock.h" #define VIRTUAL virtual #else #define VIRTUAL @@ -28,19 +21,11 @@ VIRTUAL OP* append_elem _((I32 optype, OP* head, OP* tail)); VIRTUAL OP* append_list _((I32 optype, LISTOP* first, LISTOP* last)); VIRTUAL I32 apply _((I32 type, SV** mark, SV** sp)); VIRTUAL void assertref _((OP* o)); -VIRTUAL SV* avhv_delete _((AV *ar, char* key, U32 klen, I32 flags)); -VIRTUAL SV* avhv_delete_ent _((AV *ar, SV* keysv, I32 flags, U32 hash)); -VIRTUAL bool avhv_exists _((AV *ar, char* key, U32 klen)); VIRTUAL bool avhv_exists_ent _((AV *ar, SV* keysv, U32 hash)); -VIRTUAL SV** avhv_fetch _((AV *ar, char* key, U32 klen, I32 lval)); VIRTUAL SV** avhv_fetch_ent _((AV *ar, SV* keysv, I32 lval, U32 hash)); -VIRTUAL I32 avhv_iterinit _((AV *ar)); VIRTUAL HE* avhv_iternext _((AV *ar)); -VIRTUAL SV * avhv_iternextsv _((AV *ar, char** key, I32* retlen)); VIRTUAL SV* avhv_iterval _((AV *ar, HE* entry)); VIRTUAL HV* avhv_keys _((AV *ar)); -VIRTUAL SV** avhv_store _((AV *ar, char* key, U32 klen, SV* val, U32 hash)); -VIRTUAL SV** avhv_store_ent _((AV *av, SV *keysv, SV *val, U32 hash)); VIRTUAL void av_clear _((AV* ar)); VIRTUAL void av_extend _((AV* ar, I32 key)); VIRTUAL AV* av_fake _((I32 size, SV** svp)); @@ -60,7 +45,7 @@ VIRTUAL OP* block_end _((I32 floor, OP* seq)); VIRTUAL I32 block_gimme _((void)); VIRTUAL int block_start _((int full)); VIRTUAL void boot_core_UNIVERSAL _((void)); -VIRTUAL void call_list _((I32 oldscope, AV* list)); +VIRTUAL void call_list _((I32 oldscope, AV* av_list)); VIRTUAL I32 cando _((I32 bit, I32 effective, Stat_t* statbufp)); #ifndef CASTNEGFLOAT VIRTUAL U32 cast_ulong _((double f)); @@ -78,24 +63,23 @@ VIRTUAL void croak _((const char* pat,...)) __attribute__((noreturn)); VIRTUAL void cv_ckproto _((CV* cv, GV* gv, char* p)); VIRTUAL CV* cv_clone _((CV* proto)); VIRTUAL SV* cv_const_sv _((CV* cv)); +VIRTUAL SV* op_const_sv _((OP* o, CV* cv)); VIRTUAL void cv_undef _((CV* cv)); -#ifdef DEBUGGING -void cx_dump _((PERL_CONTEXT* cs)); -#endif +VIRTUAL void cx_dump _((PERL_CONTEXT* cs)); VIRTUAL SV* filter_add _((filter_t funcp, SV* datasv)); VIRTUAL void filter_del _((filter_t funcp)); VIRTUAL I32 filter_read _((int idx, SV* buffer, int maxlen)); VIRTUAL char ** get_op_descs _((void)); VIRTUAL char ** get_op_names _((void)); +VIRTUAL char * get_no_modify _((void)); +VIRTUAL U32 * get_opargs _((void)); VIRTUAL I32 cxinc _((void)); -void deb _((const char* pat,...)) __attribute__((format(printf,1,2))); -void deb_growlevel _((void)); -I32 debop _((OP* o)); -I32 debstackptrs _((void)); -#ifdef DEBUGGING -void debprofdump _((void)); -#endif -I32 debstack _((void)); +VIRTUAL void deb _((const char* pat,...)) __attribute__((format(printf,1,2))); +VIRTUAL void deb_growlevel _((void)); +VIRTUAL void debprofdump _((void)); +VIRTUAL I32 debop _((OP* o)); +VIRTUAL I32 debstack _((void)); +VIRTUAL I32 debstackptrs _((void)); VIRTUAL char* delimcpy _((char* to, char* toend, char* from, char* fromend, int delim, I32* retlen)); VIRTUAL void deprecate _((char* s)); @@ -103,6 +87,7 @@ VIRTUAL OP* die _((const char* pat,...)); VIRTUAL OP* die_where _((char* message)); VIRTUAL void dounwind _((I32 cxix)); VIRTUAL bool do_aexec _((SV* really, SV** mark, SV** sp)); +VIRTUAL int do_binmode _((PerlIO *fp, int iotype, int flag)); VIRTUAL void do_chop _((SV* asv, SV* sv)); VIRTUAL bool do_close _((GV* gv, bool not_implicit)); VIRTUAL bool do_eof _((GV* gv)); @@ -139,19 +124,20 @@ VIRTUAL I32 dowantarray _((void)); VIRTUAL void dump_all _((void)); VIRTUAL void dump_eval _((void)); #ifdef DUMP_FDS /* See util.c */ -int dump_fds _((char* s)); +VIRTUAL void dump_fds _((char* s)); #endif -void dump_form _((GV* gv)); -void dump_gv _((GV* gv)); +VIRTUAL void dump_form _((GV* gv)); +VIRTUAL void dump_gv _((GV* gv)); #ifdef MYMALLOC -void dump_mstats _((char* s)); -#endif -void dump_op _((OP* arg)); -void dump_pm _((PMOP* pm)); -void dump_packsubs _((HV* stash)); -void dump_sub _((GV* gv)); -VIRTUAL void fbm_compile _((SV* sv)); -VIRTUAL char* fbm_instr _((unsigned char* big, unsigned char* bigend, SV* littlesv)); +VIRTUAL void dump_mstats _((char* s)); +#endif +VIRTUAL void dump_op _((OP* arg)); +VIRTUAL void dump_pm _((PMOP* pm)); +VIRTUAL void dump_packsubs _((HV* stash)); +VIRTUAL void dump_sub _((GV* gv)); +VIRTUAL void fbm_compile _((SV* sv, U32 flags)); +VIRTUAL char* fbm_instr _((unsigned char* big, unsigned char* bigend, SV* littlesv, U32 flags)); +VIRTUAL char* find_script _((char *scriptname, bool dosearch, char **search_ext, I32 flags)); #ifdef USE_THREADS VIRTUAL PADOFFSET find_threadsv _((char *name)); #endif @@ -229,11 +215,14 @@ VIRTUAL int magic_get _((SV* sv, MAGIC* mg)); VIRTUAL int magic_getarylen _((SV* sv, MAGIC* mg)); VIRTUAL int magic_getdefelem _((SV* sv, MAGIC* mg)); VIRTUAL int magic_getglob _((SV* sv, MAGIC* mg)); +VIRTUAL int magic_getnkeys _((SV* sv, MAGIC* mg)); VIRTUAL int magic_getpack _((SV* sv, MAGIC* mg)); VIRTUAL int magic_getpos _((SV* sv, MAGIC* mg)); VIRTUAL int magic_getsig _((SV* sv, MAGIC* mg)); +VIRTUAL int magic_getsubstr _((SV* sv, MAGIC* mg)); VIRTUAL int magic_gettaint _((SV* sv, MAGIC* mg)); VIRTUAL int magic_getuvar _((SV* sv, MAGIC* mg)); +VIRTUAL int magic_getvec _((SV* sv, MAGIC* mg)); VIRTUAL U32 magic_len _((SV* sv, MAGIC* mg)); #ifdef USE_THREADS VIRTUAL int magic_mutexfree _((SV* sv, MAGIC* mg)); @@ -264,22 +253,27 @@ VIRTUAL int magic_settaint _((SV* sv, MAGIC* mg)); VIRTUAL int magic_setuvar _((SV* sv, MAGIC* mg)); VIRTUAL int magic_setvec _((SV* sv, MAGIC* mg)); VIRTUAL int magic_set_all_env _((SV* sv, MAGIC* mg)); +VIRTUAL U32 magic_sizepack _((SV* sv, MAGIC* mg)); VIRTUAL int magic_wipepack _((SV* sv, MAGIC* mg)); VIRTUAL void magicname _((char* sym, char* name, I32 namlen)); int main _((int argc, char** argv, char** env)); +#ifdef MYMALLOC +VIRTUAL MEM_SIZE malloced_size _((void *p)); +#endif VIRTUAL void markstack_grow _((void)); #ifdef USE_LOCALE_COLLATE VIRTUAL char* mem_collxfrm _((const char* s, STRLEN len, STRLEN* xlen)); #endif VIRTUAL char* mess _((const char* pat, va_list* args)); VIRTUAL int mg_clear _((SV* sv)); -VIRTUAL int mg_copy _((SV* , SV* , char* , I32)); +VIRTUAL int mg_copy _((SV* sv, SV* nsv, char* key, I32 klen)); VIRTUAL MAGIC* mg_find _((SV* sv, int type)); VIRTUAL int mg_free _((SV* sv)); VIRTUAL int mg_get _((SV* sv)); -VIRTUAL U32 mg_len _((SV* sv)); +VIRTUAL U32 mg_length _((SV* sv)); VIRTUAL void mg_magical _((SV* sv)); VIRTUAL int mg_set _((SV* sv)); +VIRTUAL I32 mg_size _((SV* sv)); VIRTUAL OP* mod _((OP* o, I32 type)); VIRTUAL char* moreswitches _((char* s)); VIRTUAL OP* my _((OP* o)); @@ -293,10 +287,10 @@ VIRTUAL void my_exit _((U32 status)) __attribute__((noreturn)); VIRTUAL void my_failure_exit _((void)) __attribute__((noreturn)); VIRTUAL I32 my_lstat _((ARGSproto)); #if !defined(HAS_MEMCMP) || !defined(HAS_SANE_MEMCMP) -I32 my_memcmp _((char* s1, char* s2, I32 len)); +VIRTUAL I32 my_memcmp _((char* s1, char* s2, I32 len)); #endif #if !defined(HAS_MEMSET) -void* my_memset _((char* loc, I32 ch, I32 len)); +VIRTUAL void* my_memset _((char* loc, I32 ch, I32 len)); #endif #ifndef PERL_OBJECT VIRTUAL I32 my_pclose _((PerlIO* ptr)); @@ -315,8 +309,9 @@ VIRTUAL OP* newANONHASH _((OP* o)); VIRTUAL OP* newANONSUB _((I32 floor, OP* proto, OP* block)); VIRTUAL OP* newASSIGNOP _((I32 flags, OP* left, I32 optype, OP* right)); VIRTUAL OP* newCONDOP _((I32 flags, OP* expr, OP* trueop, OP* falseop)); +VIRTUAL void newCONSTSUB _((HV* stash, char* name, SV* sv)); VIRTUAL void newFORM _((I32 floor, OP* o, OP* block)); -VIRTUAL OP* newFOROP _((I32 flags, char* label, line_t forline, OP* scalar, OP* expr, OP*block, OP*cont)); +VIRTUAL OP* newFOROP _((I32 flags, char* label, line_t forline, OP* sclr, OP* expr, OP*block, OP*cont)); VIRTUAL OP* newLOGOP _((I32 optype, I32 flags, OP* left, OP* right)); VIRTUAL OP* newLOOPEX _((I32 type, OP* label)); VIRTUAL OP* newLOOPOP _((I32 flags, I32 debuggable, OP* expr, OP* block)); @@ -327,7 +322,7 @@ VIRTUAL OP* newRANGE _((I32 flags, OP* left, OP* right)); VIRTUAL OP* newSLICEOP _((I32 flags, OP* subscript, OP* list)); VIRTUAL OP* newSTATEOP _((I32 flags, char* label, OP* o)); VIRTUAL CV* newSUB _((I32 floor, OP* o, OP* proto, OP* block)); -VIRTUAL CV* newXS _((char* name, void (*subaddr)(CPERLproto_ CV* cv), char* filename)); +VIRTUAL CV* newXS _((char* name, void (*subaddr)(CV* cv _CPERLproto), char* filename)); VIRTUAL AV* newAV _((void)); VIRTUAL OP* newAVREF _((OP* o)); VIRTUAL OP* newBINOP _((I32 type, I32 flags, OP* first, OP* last)); @@ -337,22 +332,20 @@ VIRTUAL GV* newGVgen _((char* pack)); VIRTUAL OP* newGVREF _((I32 type, OP* o)); VIRTUAL OP* newHVREF _((OP* o)); VIRTUAL HV* newHV _((void)); +VIRTUAL HV* newHVhv _((HV* hv)); VIRTUAL IO* newIO _((void)); VIRTUAL OP* newLISTOP _((I32 type, I32 flags, OP* first, OP* last)); VIRTUAL OP* newPMOP _((I32 type, I32 flags)); VIRTUAL OP* newPVOP _((I32 type, I32 flags, char* pv)); -VIRTUAL SV* newRV _((SV* ref)); -VIRTUAL SV* newRV_noinc _((SV *)); -#ifdef LEAKTEST -VIRTUAL SV* newSV _((I32 x, STRLEN len)); -#else +VIRTUAL SV* newRV _((SV* pref)); +VIRTUAL SV* newRV_noinc _((SV *sv)); VIRTUAL SV* newSV _((STRLEN len)); -#endif VIRTUAL OP* newSVREF _((OP* o)); VIRTUAL OP* newSVOP _((I32 type, I32 flags, SV* sv)); VIRTUAL SV* newSViv _((IV i)); VIRTUAL SV* newSVnv _((double n)); VIRTUAL SV* newSVpv _((char* s, STRLEN len)); +VIRTUAL SV* newSVpvn _((char *s, STRLEN len)); VIRTUAL SV* newSVpvf _((const char* pat, ...)); VIRTUAL SV* newSVrv _((SV* rv, char* classname)); VIRTUAL SV* newSVsv _((SV* old)); @@ -362,6 +355,7 @@ VIRTUAL OP* newWHILEOP _((I32 flags, I32 debuggable, LOOP* loop, #ifdef USE_THREADS VIRTUAL struct perl_thread * new_struct_thread _((struct perl_thread *t)); #endif +VIRTUAL PERL_SI * new_stackinfo _((I32 stitems, I32 cxitems)); VIRTUAL PerlIO* nextargv _((GV* gv)); VIRTUAL char* ninstr _((char* big, char* bigend, char* little, char* lend)); VIRTUAL OP* oopsCV _((OP* o)); @@ -381,9 +375,14 @@ VIRTUAL void peep _((OP* o)); #ifndef PERL_OBJECT PerlInterpreter* perl_alloc _((void)); #endif -VIRTUAL I32 perl_call_argv _((char* subname, I32 flags, char** argv)); +#ifdef PERL_OBJECT +VIRTUAL void perl_atexit _((void(*fn)(CPerlObj *, void *), void* ptr)); +#else +void perl_atexit _((void(*fn)(void *), void*)); +#endif +VIRTUAL I32 perl_call_argv _((char* sub_name, I32 flags, char** argv)); VIRTUAL I32 perl_call_method _((char* methname, I32 flags)); -VIRTUAL I32 perl_call_pv _((char* subname, I32 flags)); +VIRTUAL I32 perl_call_pv _((char* sub_name, I32 flags)); VIRTUAL I32 perl_call_sv _((SV* sv, I32 flags)); #ifdef PERL_OBJECT VIRTUAL void perl_construct _((void)); @@ -431,37 +430,37 @@ VIRTUAL void pop_scope _((void)); VIRTUAL OP* prepend_elem _((I32 optype, OP* head, OP* tail)); VIRTUAL void push_return _((OP* o)); VIRTUAL void push_scope _((void)); -VIRTUAL regexp* pregcomp _((char* exp, char* xend, PMOP* pm)); VIRTUAL OP* ref _((OP* o, I32 type)); VIRTUAL OP* refkids _((OP* o, I32 type)); VIRTUAL void regdump _((regexp* r)); VIRTUAL I32 pregexec _((regexp* prog, char* stringarg, char* strend, char* strbeg, I32 minend, SV* screamer, U32 nosave)); -VIRTUAL I32 regexec_flags _((regexp* prog, char* stringarg, char* strend, char* strbeg, I32 minend, SV* screamer, void* data, U32 flags)); VIRTUAL void pregfree _((struct regexp* r)); -VIRTUAL regnode*regnext _((regnode* p)); +VIRTUAL regnode* regnext _((regnode* p)); VIRTUAL void regprop _((SV* sv, regnode* o)); VIRTUAL void repeatcpy _((char* to, char* from, I32 len, I32 count)); VIRTUAL char* rninstr _((char* big, char* bigend, char* little, char* lend)); -VIRTUAL Sighandler_t rsignal _((int, Sighandler_t)); -VIRTUAL int rsignal_restore _((int, Sigsave_t*)); -VIRTUAL int rsignal_save _((int, Sighandler_t, Sigsave_t*)); -VIRTUAL Sighandler_t rsignal_state _((int)); +VIRTUAL Sighandler_t rsignal _((int i, Sighandler_t t)); +VIRTUAL int rsignal_restore _((int i, Sigsave_t* t)); +VIRTUAL int rsignal_save _((int i, Sighandler_t t1, Sigsave_t* t2)); +VIRTUAL Sighandler_t rsignal_state _((int i)); VIRTUAL void rxres_free _((void** rsp)); -VIRTUAL void rxres_restore _((void** rsp, REGEXP* rx)); -VIRTUAL void rxres_save _((void** rsp, REGEXP* rx)); +VIRTUAL void rxres_restore _((void** rsp, REGEXP* prx)); +VIRTUAL void rxres_save _((void** rsp, REGEXP* prx)); #ifndef HAS_RENAME VIRTUAL I32 same_dirent _((char* a, char* b)); #endif VIRTUAL char* savepv _((char* sv)); VIRTUAL char* savepvn _((char* sv, I32 len)); VIRTUAL void savestack_grow _((void)); +VIRTUAL void save_aelem _((AV* av, I32 idx, SV **sptr)); VIRTUAL void save_aptr _((AV** aptr)); VIRTUAL AV* save_ary _((GV* gv)); VIRTUAL void save_clearsv _((SV** svp)); VIRTUAL void save_delete _((HV* hv, char* key, I32 klen)); #ifndef titan /* TitanOS cc can't handle this */ #ifdef PERL_OBJECT -VIRTUAL void save_destructor _((void (*f)(void*, void*), void* p)); +typedef void (CPerlObj::*DESTRUCTORFUNC) _((void*)); +VIRTUAL void save_destructor _((DESTRUCTORFUNC f, void* p)); #else void save_destructor _((void (*f)(void*), void* p)); #endif @@ -471,6 +470,8 @@ VIRTUAL void save_freeop _((OP* o)); VIRTUAL void save_freepv _((char* pv)); VIRTUAL void save_gp _((GV* gv, I32 empty)); VIRTUAL HV* save_hash _((GV* gv)); +VIRTUAL void save_helem _((HV* hv, SV *key, SV **sptr)); +VIRTUAL void save_hints _((void)); VIRTUAL void save_hptr _((HV** hptr)); VIRTUAL void save_I16 _((I16* intp)); VIRTUAL void save_I32 _((I32* intp)); @@ -517,8 +518,8 @@ VIRTUAL UV sv_2uv _((SV* sv)); VIRTUAL IV sv_iv _((SV* sv)); VIRTUAL UV sv_uv _((SV* sv)); VIRTUAL double sv_nv _((SV* sv)); -VIRTUAL char * sv_pvn _((SV *, STRLEN *)); -VIRTUAL I32 sv_true _((SV *)); +VIRTUAL char * sv_pvn _((SV *sv, STRLEN *len)); +VIRTUAL I32 sv_true _((SV *sv)); VIRTUAL void sv_add_arena _((char* ptr, U32 size, U32 flags)); VIRTUAL int sv_backoff _((SV* sv)); VIRTUAL SV* sv_bless _((SV* sv, HV* stash)); @@ -657,17 +658,38 @@ void del_xrv _((XRV* p)); void sv_mortalgrow _((void)); void sv_unglob _((SV* sv)); void sv_check_thinkfirst _((SV *sv)); +I32 avhv_index_sv _((SV* sv)); + +void sv_catpv_mg _((SV *sv, char *ptr)); +void sv_catpvf_mg _((SV *sv, const char* pat, ...)); +void sv_catpvn_mg _((SV *sv, char *ptr, STRLEN len)); +void sv_catsv_mg _((SV *dstr, SV *sstr)); +void sv_setiv_mg _((SV *sv, IV i)); +void sv_setnv_mg _((SV *sv, double num)); +void sv_setsv_mg _((SV *dstr, SV *sstr)); +void sv_setuv_mg _((SV *sv, UV u)); +void sv_setpv_mg _((SV *sv, const char *ptr)); +void sv_setpvf_mg _((SV *sv, const char* pat, ...)); +void sv_setpviv_mg _((SV *sv, IV iv)); +void sv_setpvn_mg _((SV *sv, const char *ptr, STRLEN len)); +void sv_usepvn_mg _((SV *sv, char *ptr, STRLEN len)); + void do_report_used _((SV *sv)); void do_clean_objs _((SV *sv)); void do_clean_named_objs _((SV *sv)); void do_clean_all _((SV *sv)); void not_a_number _((SV *sv)); +void* my_safemalloc _((MEM_SIZE size)); typedef void (CPerlObj::*SVFUNC) _((SV*)); void visit _((SVFUNC f)); +typedef I32 (CPerlObj::*SVCOMPARE) _((SV*, SV*)); +void qsortsv _((SV ** array, size_t num_elts, SVCOMPARE f)); +I32 sortcv _((SV *a, SV *b)); void save_magic _((MGS *mgs, SV *sv)); int magic_methpack _((SV *sv, MAGIC *mg, char *meth)); +int magic_methcall _((MAGIC *mg, char *meth, I32 flags, int n, SV *val)); OP * doform _((CV *cv, GV *gv, OP *retop)); void doencodes _((SV* sv, char* s, I32 len)); SV* refto _((SV* sv)); @@ -679,6 +701,7 @@ I32 dopoptoeval _((I32 startingblock)); I32 dopoptolabel _((char *label)); I32 dopoptoloop _((I32 startingblock)); I32 dopoptosub _((I32 startingblock)); +I32 dopoptosub_at _((PERL_CONTEXT* cxstk, I32 startingblock)); void save_lines _((AV *array, SV *sv)); OP *doeval _((int gimme, OP** startop)); SV *mul128 _((SV *sv, U8 m)); @@ -686,9 +709,13 @@ SV *is_an_int _((char *s, STRLEN l)); int div128 _((SV *pnum, bool *done)); int runops_standard _((void)); -#ifdef DEBUGGING int runops_debug _((void)); -#endif + +regexp* pregcomp _((char* exp, char* xend, PMOP* pm)); +I32 regexec_flags _((regexp* prog, char* stringarg, char* strend, + char* strbeg, I32 minend, SV* screamer, + void* data, U32 flags)); + void check_uni _((void)); void force_next _((I32 type)); char *force_version _((char *start)); @@ -699,7 +726,7 @@ char *scan_formline _((char *s)); char *scan_heredoc _((char *s)); char *scan_ident _((char *s, char *send, char *dest, STRLEN destlen, I32 ck_uni)); char *scan_inputsymbol _((char *start)); -char *scan_pat _((char *start)); +char *scan_pat _((char *start, I32 type)); char *scan_str _((char *start)); char *scan_subst _((char *start)); char *scan_trans _((char *start)); @@ -721,6 +748,7 @@ I32 sublex_start _((void)); int uni _((I32 f, char *s)); #endif char * filter_gets _((SV *sv, PerlIO *fp, STRLEN append)); +SV *new_constant _((char *s, STRLEN len, char *key, SV *sv, SV *pv, char *type)); int ao _((int toketype)); void depcom _((void)); #ifdef WIN32 @@ -745,6 +773,7 @@ CV *cv_clone2 _((CV *proto, CV *outside)); void find_beginning _((void)); void forbid_setid _((char *)); void incpush _((char *, int)); +void init_interp _((void)); void init_ids _((void)); void init_debugger _((void)); void init_lexer _((void)); @@ -757,9 +786,9 @@ void init_postdump_symbols _((int, char **, char **)); void init_predump_symbols _((void)); void my_exit_jump _((void)) __attribute__((noreturn)); void nuke_stacks _((void)); -void open_script _((char *, bool, SV *)); +void open_script _((char *, bool, SV *, int *fd)); void usage _((char *)); -void validate_suid _((char *, char*)); +void validate_suid _((char *, char*, int)); regnode *reg _((I32, I32 *)); regnode *reganode _((U8, U32)); @@ -774,9 +803,9 @@ void reginsert _((U8, regnode *)); void regoptail _((regnode *, regnode *)); void regset _((char *, I32)); void regtail _((regnode *, regnode *)); +char* regwhite _((char *, char *)); char* nextchar _((void)); regnode *dumpuntil _((regnode *start, regnode *node, regnode *last, SV* sv, I32 l)); -void debprof _((OP *o)); void scan_commit _((scan_data_t *data)); I32 study_chunk _((regnode **scanp, I32 *deltap, regnode *last, scan_data_t *data, U32 flags)); I32 add_data _((I32 n, char *s)); @@ -796,355 +825,15 @@ int do_aspawn _((void *vreally, void **vmark, void **vsp)); #ifdef DEBUGGING void del_sv _((SV *p)); #endif +void debprof _((OP *o)); -#define PPDEF(s) OP* CPerlObj::s _((ARGSproto)); +void *bset_obj_store _((void *obj, I32 ix)); +OP *new_logop _((I32 type, I32 flags, OP **firstp, OP **otherp)); +#define PPDEF(s) OP* CPerlObj::s _((ARGSproto)); public: -PPDEF(pp_aassign) -PPDEF(pp_abs) -PPDEF(pp_accept) -PPDEF(pp_add) -PPDEF(pp_aelem) -PPDEF(pp_aelemfast) -PPDEF(pp_alarm) -PPDEF(pp_and) -PPDEF(pp_andassign) -PPDEF(pp_anoncode) -PPDEF(pp_anonhash) -PPDEF(pp_anonlist) -PPDEF(pp_aslice) -PPDEF(pp_atan2) -PPDEF(pp_av2arylen) -PPDEF(pp_backtick) -PPDEF(pp_bind) -PPDEF(pp_binmode) -PPDEF(pp_bit_and) -PPDEF(pp_bit_or) -PPDEF(pp_bit_xor) -PPDEF(pp_bless) -PPDEF(pp_caller) -PPDEF(pp_chdir) -PPDEF(pp_chmod) -PPDEF(pp_chomp) -PPDEF(pp_chop) -PPDEF(pp_chown) -PPDEF(pp_chr) -PPDEF(pp_chroot) -PPDEF(pp_close) -PPDEF(pp_closedir) -PPDEF(pp_complement) -PPDEF(pp_concat) -PPDEF(pp_cond_expr) -PPDEF(pp_connect) -PPDEF(pp_const) -PPDEF(pp_cos) -PPDEF(pp_crypt) -PPDEF(pp_cswitch) -PPDEF(pp_dbmclose) -PPDEF(pp_dbmopen) -PPDEF(pp_dbstate) -PPDEF(pp_defined) -PPDEF(pp_delete) -PPDEF(pp_die) -PPDEF(pp_divide) -PPDEF(pp_dofile) -PPDEF(pp_dump) -PPDEF(pp_each) -PPDEF(pp_egrent) -PPDEF(pp_ehostent) -PPDEF(pp_enetent) -PPDEF(pp_enter) -PPDEF(pp_entereval) -PPDEF(pp_enteriter) -PPDEF(pp_enterloop) -PPDEF(pp_entersub) -PPDEF(pp_entertry) -PPDEF(pp_enterwrite) -PPDEF(pp_eof) -PPDEF(pp_eprotoent) -PPDEF(pp_epwent) -PPDEF(pp_eq) -PPDEF(pp_eservent) -PPDEF(pp_exec) -PPDEF(pp_exists) -PPDEF(pp_exit) -PPDEF(pp_exp) -PPDEF(pp_fcntl) -PPDEF(pp_fileno) -PPDEF(pp_flip) -PPDEF(pp_flock) -PPDEF(pp_flop) -PPDEF(pp_fork) -PPDEF(pp_formline) -PPDEF(pp_ftatime) -PPDEF(pp_ftbinary) -PPDEF(pp_ftblk) -PPDEF(pp_ftchr) -PPDEF(pp_ftctime) -PPDEF(pp_ftdir) -PPDEF(pp_fteexec) -PPDEF(pp_fteowned) -PPDEF(pp_fteread) -PPDEF(pp_ftewrite) -PPDEF(pp_ftfile) -PPDEF(pp_ftis) -PPDEF(pp_ftlink) -PPDEF(pp_ftmtime) -PPDEF(pp_ftpipe) -PPDEF(pp_ftrexec) -PPDEF(pp_ftrowned) -PPDEF(pp_ftrread) -PPDEF(pp_ftrwrite) -PPDEF(pp_ftsgid) -PPDEF(pp_ftsize) -PPDEF(pp_ftsock) -PPDEF(pp_ftsuid) -PPDEF(pp_ftsvtx) -PPDEF(pp_fttext) -PPDEF(pp_fttty) -PPDEF(pp_ftzero) -PPDEF(pp_ge) -PPDEF(pp_gelem) -PPDEF(pp_getc) -PPDEF(pp_getlogin) -PPDEF(pp_getpeername) -PPDEF(pp_getpgrp) -PPDEF(pp_getppid) -PPDEF(pp_getpriority) -PPDEF(pp_getsockname) -PPDEF(pp_ggrent) -PPDEF(pp_ggrgid) -PPDEF(pp_ggrnam) -PPDEF(pp_ghbyaddr) -PPDEF(pp_ghbyname) -PPDEF(pp_ghostent) -PPDEF(pp_glob) -PPDEF(pp_gmtime) -PPDEF(pp_gnbyaddr) -PPDEF(pp_gnbyname) -PPDEF(pp_gnetent) -PPDEF(pp_goto) -PPDEF(pp_gpbyname) -PPDEF(pp_gpbynumber) -PPDEF(pp_gprotoent) -PPDEF(pp_gpwent) -PPDEF(pp_gpwnam) -PPDEF(pp_gpwuid) -PPDEF(pp_grepstart) -PPDEF(pp_grepwhile) -PPDEF(pp_gsbyname) -PPDEF(pp_gsbyport) -PPDEF(pp_gservent) -PPDEF(pp_gsockopt) -PPDEF(pp_gt) -PPDEF(pp_gv) -PPDEF(pp_gvsv) -PPDEF(pp_helem) -PPDEF(pp_hex) -PPDEF(pp_hslice) -PPDEF(pp_i_add) -PPDEF(pp_i_divide) -PPDEF(pp_i_eq) -PPDEF(pp_i_ge) -PPDEF(pp_i_gt) -PPDEF(pp_i_le) -PPDEF(pp_i_lt) -PPDEF(pp_i_modulo) -PPDEF(pp_i_multiply) -PPDEF(pp_i_ncmp) -PPDEF(pp_i_ne) -PPDEF(pp_i_negate) -PPDEF(pp_i_subtract) -PPDEF(pp_index) -PPDEF(pp_indread) -PPDEF(pp_int) -PPDEF(pp_ioctl) -PPDEF(pp_iter) -PPDEF(pp_join) -PPDEF(pp_keys) -PPDEF(pp_kill) -PPDEF(pp_last) -PPDEF(pp_lc) -PPDEF(pp_lcfirst) -PPDEF(pp_le) -PPDEF(pp_leave) -PPDEF(pp_leaveeval) -PPDEF(pp_leaveloop) -PPDEF(pp_leavesub) -PPDEF(pp_leavetry) -PPDEF(pp_leavewrite) -PPDEF(pp_left_shift) -PPDEF(pp_length) -PPDEF(pp_lineseq) -PPDEF(pp_link) -PPDEF(pp_list) -PPDEF(pp_listen) -PPDEF(pp_localtime) -PPDEF(pp_lock) -PPDEF(pp_log) -PPDEF(pp_lslice) -PPDEF(pp_lstat) -PPDEF(pp_lt) -PPDEF(pp_mapstart) -PPDEF(pp_mapwhile) -PPDEF(pp_match) -PPDEF(pp_method) -PPDEF(pp_mkdir) -PPDEF(pp_modulo) -PPDEF(pp_msgctl) -PPDEF(pp_msgget) -PPDEF(pp_msgrcv) -PPDEF(pp_msgsnd) -PPDEF(pp_multiply) -PPDEF(pp_ncmp) -PPDEF(pp_ne) -PPDEF(pp_negate) -PPDEF(pp_next) -PPDEF(pp_nextstate) -PPDEF(pp_not) -PPDEF(pp_nswitch) -PPDEF(pp_null) -PPDEF(pp_oct) -PPDEF(pp_open) -PPDEF(pp_open_dir) -PPDEF(pp_or) -PPDEF(pp_orassign) -PPDEF(pp_ord) -PPDEF(pp_pack) -PPDEF(pp_padany) -PPDEF(pp_padav) -PPDEF(pp_padhv) -PPDEF(pp_padsv) -PPDEF(pp_pipe_op) -PPDEF(pp_pop) -PPDEF(pp_pos) -PPDEF(pp_postdec) -PPDEF(pp_postinc) -PPDEF(pp_pow) -PPDEF(pp_predec) -PPDEF(pp_preinc) -PPDEF(pp_print) -PPDEF(pp_prototype) -PPDEF(pp_prtf) -PPDEF(pp_push) -PPDEF(pp_pushmark) -PPDEF(pp_pushre) -PPDEF(pp_quotemeta) -PPDEF(pp_rand) -PPDEF(pp_range) -PPDEF(pp_rcatline) -PPDEF(pp_read) -PPDEF(pp_readdir) -PPDEF(pp_readline) -PPDEF(pp_readlink) -PPDEF(pp_recv) -PPDEF(pp_redo) -PPDEF(pp_ref) -PPDEF(pp_refgen) -PPDEF(pp_regcmaybe) -PPDEF(pp_regcomp) -PPDEF(pp_rename) -PPDEF(pp_repeat) -PPDEF(pp_require) -PPDEF(pp_reset) -PPDEF(pp_return) -PPDEF(pp_reverse) -PPDEF(pp_rewinddir) -PPDEF(pp_right_shift) -PPDEF(pp_rindex) -PPDEF(pp_rmdir) -PPDEF(pp_rv2av) -PPDEF(pp_rv2cv) -PPDEF(pp_rv2gv) -PPDEF(pp_rv2hv) -PPDEF(pp_rv2sv) -PPDEF(pp_sassign) -PPDEF(pp_scalar) -PPDEF(pp_schomp) -PPDEF(pp_schop) -PPDEF(pp_scmp) -PPDEF(pp_scope) -PPDEF(pp_seek) -PPDEF(pp_seekdir) -PPDEF(pp_select) -PPDEF(pp_semctl) -PPDEF(pp_semget) -PPDEF(pp_semop) -PPDEF(pp_send) -PPDEF(pp_seq) -PPDEF(pp_setpgrp) -PPDEF(pp_setpriority) -PPDEF(pp_sge) -PPDEF(pp_sgrent) -PPDEF(pp_sgt) -PPDEF(pp_shift) -PPDEF(pp_shmctl) -PPDEF(pp_shmget) -PPDEF(pp_shmread) -PPDEF(pp_shmwrite) -PPDEF(pp_shostent) -PPDEF(pp_shutdown) -PPDEF(pp_sin) -PPDEF(pp_sle) -PPDEF(pp_sleep) -PPDEF(pp_slt) -PPDEF(pp_sne) -PPDEF(pp_snetent) -PPDEF(pp_socket) -PPDEF(pp_sockpair) -PPDEF(pp_sort) -PPDEF(pp_splice) -PPDEF(pp_split) -PPDEF(pp_sprintf) -PPDEF(pp_sprotoent) -PPDEF(pp_spwent) -PPDEF(pp_sqrt) -PPDEF(pp_srand) -PPDEF(pp_srefgen) -PPDEF(pp_sselect) -PPDEF(pp_sservent) -PPDEF(pp_ssockopt) -PPDEF(pp_stat) -PPDEF(pp_stringify) -PPDEF(pp_stub) -PPDEF(pp_study) -PPDEF(pp_subst) -PPDEF(pp_substcont) -PPDEF(pp_substr) -PPDEF(pp_subtract) -PPDEF(pp_symlink) -PPDEF(pp_syscall) -PPDEF(pp_sysopen) -PPDEF(pp_sysread) -PPDEF(pp_sysseek) -PPDEF(pp_system) -PPDEF(pp_syswrite) -PPDEF(pp_tell) -PPDEF(pp_telldir) -PPDEF(pp_threadsv) -PPDEF(pp_tie) -PPDEF(pp_tied) -PPDEF(pp_time) -PPDEF(pp_tms) -PPDEF(pp_trans) -PPDEF(pp_truncate) -PPDEF(pp_uc) -PPDEF(pp_ucfirst) -PPDEF(pp_umask) -PPDEF(pp_undef) -PPDEF(pp_unlink) -PPDEF(pp_unpack) -PPDEF(pp_unshift) -PPDEF(pp_unstack) -PPDEF(pp_untie) -PPDEF(pp_utime) -PPDEF(pp_values) -PPDEF(pp_vec) -PPDEF(pp_wait) -PPDEF(pp_waitpid) -PPDEF(pp_wantarray) -PPDEF(pp_warn) -PPDEF(pp_xor) + +#include "pp_proto.h" OP * ck_ftst _((OP *o)); OP *ck_anoncode _((OP *o)); @@ -1181,16 +870,26 @@ OP *ck_trunc _((OP *o)); void unwind_handler_stack _((void *p)); void restore_magic _((void *p)); void restore_rsfp _((void *f)); +void restore_expect _((void *e)); +void restore_lex_expect _((void *e)); void yydestruct _((void *ptr)); -int sortcv _((const void *, const void *)); -int sortcmp _((const void *, const void *)); -int sortcmp_locale _((const void *, const void *)); -VIRTUAL int fprintf _((PerlIO *, const char *, ...)); +VIRTUAL int fprintf _((PerlIO *pf, const char *pat, ...)); +VIRTUAL SV** get_specialsv_list _((void)); #ifdef WIN32 -VIRTUAL int& ErrorNo(); +VIRTUAL int& ErrorNo _((void)); #endif /* WIN32 */ #else /* !PERL_OBJECT */ +regexp* pregcomp _((char* exp, char* xend, PMOP* pm)); +I32 regexec_flags _((regexp* prog, char* stringarg, char* strend, + char* strbeg, I32 minend, SV* screamer, + void* data, U32 flags)); END_EXTERN_C #endif /* PERL_OBJECT */ +#ifdef INDIRECT_BGET_MACROS +VIRTUAL void byterun _((struct bytestream bs)); +#else +VIRTUAL void byterun _((PerlIO *fp)); +#endif /* INDIRECT_BGET_MACROS */ +