| 1 | /***********************************************/ |
| 2 | /* Global only to current interpreter instance */ |
| 3 | /***********************************************/ |
| 4 | |
| 5 | /* pseudo environmental stuff */ |
| 6 | PERLVAR(Iorigargc, int) |
| 7 | PERLVAR(Iorigargv, char **) |
| 8 | PERLVAR(Ienvgv, GV *) |
| 9 | PERLVAR(Isiggv, GV *) |
| 10 | PERLVAR(Iincgv, GV *) |
| 11 | PERLVAR(Iorigfilename, char *) |
| 12 | PERLVAR(Idiehook, SV *) |
| 13 | PERLVAR(Iwarnhook, SV *) |
| 14 | PERLVAR(Iparsehook, SV *) |
| 15 | PERLVAR(Icddir, char *) /* switches */ |
| 16 | PERLVAR(Iminus_c, bool) |
| 17 | PERLVAR(Ipatchlevel[10],char) |
| 18 | PERLVAR(Ilocalpatches, char **) |
| 19 | PERLVARI(Isplitstr, char *, " ") |
| 20 | PERLVAR(Ipreprocess, bool) |
| 21 | PERLVAR(Iminus_n, bool) |
| 22 | PERLVAR(Iminus_p, bool) |
| 23 | PERLVAR(Iminus_l, bool) |
| 24 | PERLVAR(Iminus_a, bool) |
| 25 | PERLVAR(Iminus_F, bool) |
| 26 | PERLVAR(Idoswitches, bool) |
| 27 | PERLVAR(Idowarn, bool) |
| 28 | PERLVAR(Idoextract, bool) |
| 29 | PERLVAR(Isawampersand, bool) /* must save all match strings */ |
| 30 | PERLVAR(Isawstudy, bool) /* do fbm_instr on all strings */ |
| 31 | PERLVAR(Isawvec, bool) |
| 32 | PERLVAR(Iunsafe, bool) |
| 33 | PERLVAR(Iinplace, char *) |
| 34 | PERLVAR(Ie_script, SV *) |
| 35 | PERLVAR(Iperldb, U32) |
| 36 | |
| 37 | /* This value may be raised by extensions for testing purposes */ |
| 38 | /* 0=none, 1=full, 2=full with checks */ |
| 39 | PERLVARI(Iperl_destruct_level, int, 0) |
| 40 | |
| 41 | /* magical thingies */ |
| 42 | PERLVAR(Ibasetime, Time_t) /* $^T */ |
| 43 | PERLVAR(Iformfeed, SV *) /* $^L */ |
| 44 | |
| 45 | |
| 46 | PERLVARI(Imaxsysfd, I32, MAXSYSFD) /* top fd to pass to subprocesses */ |
| 47 | PERLVAR(Imultiline, int) /* $*--do strings hold >1 line? */ |
| 48 | PERLVAR(Istatusvalue, I32) /* $? */ |
| 49 | #ifdef VMS |
| 50 | PERLVAR(Istatusvalue_vms, U32) |
| 51 | #endif |
| 52 | |
| 53 | PERLVAR(Istatcache, Stat_t) /* _ */ |
| 54 | PERLVAR(Istatgv, GV *) |
| 55 | PERLVARI(Istatname, SV *, Nullsv) |
| 56 | |
| 57 | /* shortcuts to various I/O objects */ |
| 58 | PERLVAR(Istdingv, GV *) |
| 59 | PERLVAR(Idefgv, GV *) |
| 60 | PERLVAR(Iargvgv, GV *) |
| 61 | PERLVAR(Iargvoutgv, GV *) |
| 62 | |
| 63 | /* shortcuts to regexp stuff */ |
| 64 | PERLVAR(Ileftgv, GV *) |
| 65 | PERLVAR(Iampergv, GV *) |
| 66 | PERLVAR(Irightgv, GV *) |
| 67 | PERLVAR(Iscreamfirst, I32 *) |
| 68 | PERLVAR(Iscreamnext, I32 *) |
| 69 | PERLVARI(Imaxscream, I32, -1) |
| 70 | PERLVAR(Ilastscream, SV *) |
| 71 | |
| 72 | /* shortcuts to misc objects */ |
| 73 | PERLVAR(Ierrgv, GV *) |
| 74 | |
| 75 | /* shortcuts to debugging objects */ |
| 76 | PERLVAR(IDBgv, GV *) |
| 77 | PERLVAR(IDBline, GV *) |
| 78 | PERLVAR(IDBsub, GV *) |
| 79 | PERLVAR(IDBsingle, SV *) |
| 80 | PERLVAR(IDBtrace, SV *) |
| 81 | PERLVAR(IDBsignal, SV *) |
| 82 | PERLVAR(Ilineary, AV *) /* lines of script for debugger */ |
| 83 | PERLVAR(Idbargs, AV *) /* args to call listed by caller function */ |
| 84 | |
| 85 | /* symbol tables */ |
| 86 | PERLVAR(Idebstash, HV *) /* symbol table for perldb package */ |
| 87 | PERLVAR(Iglobalstash, HV *) /* global keyword overrides imported here */ |
| 88 | PERLVAR(Icurstname, SV *) /* name of current package */ |
| 89 | PERLVAR(Ibeginav, AV *) /* names of BEGIN subroutines */ |
| 90 | PERLVAR(Iendav, AV *) /* names of END subroutines */ |
| 91 | PERLVAR(Iinitav, AV *) /* names of INIT subroutines */ |
| 92 | PERLVAR(Istrtab, HV *) /* shared string table */ |
| 93 | |
| 94 | /* memory management */ |
| 95 | PERLVAR(Isv_count, I32) /* how many SV* are currently allocated */ |
| 96 | PERLVAR(Isv_objcount, I32) /* how many objects are currently allocated */ |
| 97 | PERLVAR(Isv_root, SV*) /* storage for SVs belonging to interp */ |
| 98 | PERLVAR(Isv_arenaroot, SV*) /* list of areas for garbage collection */ |
| 99 | |
| 100 | /* funky return mechanisms */ |
| 101 | PERLVAR(Ilastspbase, I32) |
| 102 | PERLVAR(Ilastsize, I32) |
| 103 | PERLVAR(Iforkprocess, int) /* so do_open |- can return proc# */ |
| 104 | |
| 105 | /* subprocess state */ |
| 106 | PERLVAR(Ifdpid, AV *) /* keep fd-to-pid mappings for my_popen */ |
| 107 | |
| 108 | /* internal state */ |
| 109 | PERLVAR(Itainting, bool) /* doing taint checks */ |
| 110 | PERLVARI(Iop_mask, char *, NULL) /* masked operations for safe evals */ |
| 111 | |
| 112 | /* trace state */ |
| 113 | PERLVAR(Idlevel, I32) |
| 114 | PERLVARI(Idlmax, I32, 128) |
| 115 | PERLVAR(Idebname, char *) |
| 116 | PERLVAR(Idebdelim, char *) |
| 117 | |
| 118 | /* current interpreter roots */ |
| 119 | PERLVAR(Imain_cv, CV *) |
| 120 | PERLVAR(Imain_root, OP *) |
| 121 | PERLVAR(Imain_start, OP *) |
| 122 | PERLVAR(Ieval_root, OP *) |
| 123 | PERLVAR(Ieval_start, OP *) |
| 124 | |
| 125 | /* runtime control stuff */ |
| 126 | PERLVARI(Icurcopdb, COP *, NULL) |
| 127 | PERLVARI(Icopline, line_t, NOLINE) |
| 128 | |
| 129 | /* statics moved here for shared library purposes */ |
| 130 | PERLVAR(Istrchop, SV) /* return value from chop */ |
| 131 | PERLVAR(Ifilemode, int) /* so nextargv() can preserve mode */ |
| 132 | PERLVAR(Ilastfd, int) /* what to preserve mode on */ |
| 133 | PERLVAR(Ioldname, char *) /* what to preserve mode on */ |
| 134 | PERLVAR(IArgv, char **) /* stuff to free from do_aexec, vfork safe */ |
| 135 | PERLVAR(ICmd, char *) /* stuff to free from do_aexec, vfork safe */ |
| 136 | PERLVAR(Isortcop, OP *) /* user defined sort routine */ |
| 137 | PERLVAR(Isortstash, HV *) /* which is in some package or other */ |
| 138 | PERLVAR(Ifirstgv, GV *) /* $a */ |
| 139 | PERLVAR(Isecondgv, GV *) /* $b */ |
| 140 | PERLVAR(Imystrk, SV *) /* temp key string for do_each() */ |
| 141 | PERLVAR(Idumplvl, I32) /* indentation level on syntax tree dump */ |
| 142 | PERLVAR(Ioldlastpm, PMOP *) /* for saving regexp context during debugger */ |
| 143 | PERLVAR(Igensym, I32) /* next symbol for getsym() to define */ |
| 144 | PERLVAR(Ipreambled, bool) |
| 145 | PERLVAR(Ipreambleav, AV *) |
| 146 | PERLVARI(Ilaststatval, int, -1) |
| 147 | PERLVARI(Ilaststype, I32, OP_STAT) |
| 148 | PERLVAR(Imess_sv, SV *) |
| 149 | |
| 150 | PERLVAR(Iors, char *) /* $\ */ |
| 151 | PERLVAR(Iorslen, STRLEN) |
| 152 | PERLVAR(Iofmt, char *) /* $# */ |
| 153 | |
| 154 | /* interpreter atexit processing */ |
| 155 | PERLVARI(Iexitlist, PerlExitListEntry *, NULL) /* list of exit functions */ |
| 156 | PERLVARI(Iexitlistlen, I32, 0) /* length of same */ |
| 157 | PERLVAR(Imodglobal, HV *) /* per-interp module data */ |
| 158 | |
| 159 | #ifdef HAVE_INTERP_INTERN |
| 160 | PERLVAR(Isys_intern, struct interp_intern) /* platform internals */ |
| 161 | #endif |
| 162 | |
| 163 | #ifdef USE_THREADS |
| 164 | PERLVAR(Ithrsv, SV *) /* holds struct perl_thread for main thread */ |
| 165 | PERLVARI(Ithreadnum, U32, 0) /* incremented each thread creation */ |
| 166 | #endif /* USE_THREADS */ |