X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=globals.c;h=249e69b0b4cdf0f62ed5b6d9d2ac99a059c33f31;hb=9b6570b4f9243e4e8b953fb4650b22aab639eabc;hp=a566925ac35ecdc7b960fd485ea5fff370bb9a40;hpb=76e3520e1f6b7df33cd381a2cf4f1fce3d69c8a4;p=p5sagit%2Fp5-mst-13.2.git diff --git a/globals.c b/globals.c index a566925..249e69b 100644 --- a/globals.c +++ b/globals.c @@ -60,10 +60,14 @@ #define pp_rcatline CPerlObj::Perl_pp_rcatline #undef pp_regcmaybe #define pp_regcmaybe CPerlObj::Perl_pp_regcmaybe +#undef pp_regcreset +#define pp_regcreset CPerlObj::Perl_pp_regcreset #undef pp_regcomp #define pp_regcomp CPerlObj::Perl_pp_regcomp #undef pp_match #define pp_match CPerlObj::Perl_pp_match +#undef pp_qr +#define pp_qr CPerlObj::Perl_pp_qr #undef pp_subst #define pp_subst CPerlObj::Perl_pp_subst #undef pp_substcont @@ -725,8 +729,10 @@ OP * (CPERLscope(*check)[]) _((OP *op)) = { ck_null, /* readline */ ck_null, /* rcatline */ ck_fun, /* regcmaybe */ + ck_fun, /* regcreset */ ck_null, /* regcomp */ ck_match, /* match */ + ck_match, /* qr */ ck_null, /* subst */ ck_null, /* substcont */ ck_null, /* trans */ @@ -1074,8 +1080,10 @@ OP * (CPERLscope(*ppaddr)[])(ARGSproto) = { pp_readline, pp_rcatline, pp_regcmaybe, + pp_regcreset, pp_regcomp, pp_match, + pp_qr, pp_subst, pp_substcont, pp_trans, @@ -1401,10 +1409,22 @@ fprintf(PerlIO *stream, const char *format, ...) return PerlIO_vprintf(stream, format, arglist); } +#undef PERLVAR +#define PERLVAR(x, y) +#undef PERLVARI +#define PERLVARI(x, y, z) x = z; +#undef PERLVARIC +#define PERLVARIC(x, y, z) x = z; + CPerlObj::CPerlObj(IPerlMem* ipM, IPerlEnv* ipE, IPerlStdIO* ipStd, IPerlLIO* ipLIO, IPerlDir* ipD, IPerlSock* ipS, IPerlProc* ipP) { memset(((char*)this)+sizeof(void*), 0, sizeof(CPerlObj)-sizeof(void*)); + +#include "thrdvar.h" +#include "intrpvar.h" +#include "perlvars.h" + piMem = ipM; piENV = ipE; piStdIO = ipStd; @@ -1426,77 +1446,26 @@ CPerlObj::operator new(size_t nSize, IPerlMem *pvtbl) int& CPerlObj::ErrorNo(void) { - return error_no; + return errno; } void CPerlObj::Init(void) { - curcop = &compiling; - cxstack_ix = -1; - cxstack_max = 128; -#ifdef USE_THREADS - threadsv_names = THREADSV_NAMES; - chopset = " \n-"; - tmps_ix = -1; - tmps_floor = -1; - curcop = &compiling; - cxstack_ix = -1; - cxstack_max = 128; -#endif - maxo = MAXO; - sh_path = SH_PATH; - runops = RUNOPS_DEFAULT; -#ifdef CSH - cshname = CSH; -#endif - rsfp = Nullfp; - expect = XSTATE; -#ifdef USE_LOCALE_COLLATE - collation_standard = TRUE; - collxfrm_mult = 2; -#endif -#ifdef USE_LOCALE_NUMERIC - numeric_standard = TRUE; - numeric_local = TRUE; -#endif /* !USE_LOCALE_NUMERIC */ - -/* constants (these are not literals to facilitate pointer comparisons) */ - Yes = "1"; - No = ""; - hexdigit = "0123456789abcdef0123456789ABCDEFx"; - patleave = "\\.^$@dDwWsSbB+*?|()-nrtfeaxc0123456789[{]}"; - splitstr = " "; - perl_destruct_level = 0; - maxsysfd = MAXSYSFD; - statname = Nullsv; - maxscream = -1; - op_mask = NULL; - dlmax = 128; - curcopdb = NULL; - copline = NOLINE; - laststatval = -1; - laststype = OP_STAT; - -#ifdef WIN32 - New(2904, environ, 1, char*); - *environ = NULL; -#endif } -#ifdef WIN32 +#ifdef WIN32 /* XXX why are these needed? */ bool do_exec(char *cmd) { - return PerlProc_Cmd(cmd); + return PerlProc_Cmd(cmd); } int do_aspawn(void *vreally, void **vmark, void **vsp) { - return PerlProc_aspawn(vreally, vmark, vsp); + return PerlProc_aspawn(vreally, vmark, vsp); } - #endif /* WIN32 */ #endif /* PERL_OBJECT */