#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
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 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));
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));
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));
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));
+VIRTUAL 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 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));
+VIRTUAL char* find_script _((char *scriptname, bool dosearch, char **search_ext, I32 flags));
#ifdef USE_THREADS
VIRTUAL PADOFFSET find_threadsv _((char *name));
#endif
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));
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));
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));
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));
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));
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* newSV _((STRLEN len));
+VIRTUAL SV* newRV _((SV* pref));
+#if !defined(__GNUC__) && (defined(CRIPPLED_CC) || defined(USE_THREADS) || defined(PERL_OBJECT))
+VIRTUAL SV* newRV_noinc _((SV *sv));
#endif
+VIRTUAL SV* newSV _((STRLEN len));
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));
#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));
#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));
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
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));
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));
void sv_mortalgrow _((void));
void sv_unglob _((SV* sv));
void sv_check_thinkfirst _((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));
int div128 _((SV *pnum, bool *done));
int runops_standard _((void));
-#ifdef DEBUGGING
int runops_debug _((void));
-#endif
void check_uni _((void));
void force_next _((I32 type));
char *force_version _((char *start));
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
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));
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));
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));
#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)
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 */
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 */
+