hand apply whitespace mutiliated patch
[p5sagit/p5-mst-13.2.git] / intrpvar.h
CommitLineData
49f531da 1/***********************************************/
2/* Global only to current interpreter instance */
3/***********************************************/
4
cb68f92d 5/* Don't forget to re-run embed.pl to propagate changes! */
6
7/* The 'I' prefix is only needed for vars that need appropriate #defines
8 * generated when built with or without MULTIPLICITY. It is also used
9 * to generate the appropriate export list for win32.
10 *
11 * When building without MULTIPLICITY, these variables will be truly global.
12 *
13 * Avoid build-specific #ifdefs here, like DEBUGGING. That way,
14 * we can keep binary compatibility of the curinterp structure */
15
49f531da 16/* pseudo environmental stuff */
cb68f92d 17PERLVAR(Iorigargc, int)
18PERLVAR(Iorigargv, char **)
19PERLVAR(Ienvgv, GV *)
20PERLVAR(Isiggv, GV *)
21PERLVAR(Iincgv, GV *)
22PERLVAR(Iorigfilename, char *)
23PERLVAR(Idiehook, SV *)
24PERLVAR(Iwarnhook, SV *)
25PERLVAR(Iparsehook, SV *)
d4cce5f1 26PERLVAR(Icddir, char *) /* switches */
cb68f92d 27PERLVAR(Iminus_c, bool)
28PERLVAR(Ipatchlevel[10],char)
29PERLVAR(Ilocalpatches, char **)
30PERLVARI(Isplitstr, char *, " ")
31PERLVAR(Ipreprocess, bool)
32PERLVAR(Iminus_n, bool)
33PERLVAR(Iminus_p, bool)
34PERLVAR(Iminus_l, bool)
35PERLVAR(Iminus_a, bool)
36PERLVAR(Iminus_F, bool)
37PERLVAR(Idoswitches, bool)
38PERLVAR(Idowarn, bool)
39PERLVAR(Idoextract, bool)
49f531da 40PERLVAR(Isawampersand, bool) /* must save all match strings */
41PERLVAR(Isawstudy, bool) /* do fbm_instr on all strings */
cb68f92d 42PERLVAR(Isawvec, bool)
43PERLVAR(Iunsafe, bool)
44PERLVAR(Iinplace, char *)
45PERLVAR(Ie_script, SV *)
46PERLVAR(Iperldb, U32)
d4cce5f1 47
48/* This value may be raised by extensions for testing purposes */
49/* 0=none, 1=full, 2=full with checks */
cb68f92d 50PERLVARI(Iperl_destruct_level, int, 0)
49f531da 51
52/* magical thingies */
53PERLVAR(Ibasetime, Time_t) /* $^T */
54PERLVAR(Iformfeed, SV *) /* $^L */
d4cce5f1 55
56
cb68f92d 57PERLVARI(Imaxsysfd, I32, MAXSYSFD)
58 /* top fd to pass to subprocesses */
49f531da 59PERLVAR(Imultiline, int) /* $*--do strings hold >1 line? */
60PERLVAR(Istatusvalue, I32) /* $? */
61#ifdef VMS
cb68f92d 62PERLVAR(Istatusvalue_vms,U32)
49f531da 63#endif
64
cb68f92d 65PERLVAR(Istatcache, Stat_t) /* _ */
66PERLVAR(Istatgv, GV *)
67PERLVARI(Istatname, SV *, Nullsv)
49f531da 68
69/* shortcuts to various I/O objects */
cb68f92d 70PERLVAR(Istdingv, GV *)
71PERLVAR(Idefgv, GV *)
72PERLVAR(Iargvgv, GV *)
73PERLVAR(Iargvoutgv, GV *)
49f531da 74
75/* shortcuts to regexp stuff */
cb68f92d 76PERLVAR(Ileftgv, GV *)
77PERLVAR(Iampergv, GV *)
78PERLVAR(Irightgv, GV *)
79PERLVAR(Iscreamfirst, I32 *)
80PERLVAR(Iscreamnext, I32 *)
81PERLVARI(Imaxscream, I32, -1)
82PERLVAR(Ilastscream, SV *)
83PERLVAR(Ireplgv, GV *)
49f531da 84
85/* shortcuts to misc objects */
cb68f92d 86PERLVAR(Ierrgv, GV *)
49f531da 87
88/* shortcuts to debugging objects */
cb68f92d 89PERLVAR(IDBgv, GV *)
90PERLVAR(IDBline, GV *)
91PERLVAR(IDBsub, GV *)
92PERLVAR(IDBsingle, SV *)
93PERLVAR(IDBtrace, SV *)
94PERLVAR(IDBsignal, SV *)
49f531da 95PERLVAR(Ilineary, AV *) /* lines of script for debugger */
96PERLVAR(Idbargs, AV *) /* args to call listed by caller function */
97
98/* symbol tables */
49f531da 99PERLVAR(Idebstash, HV *) /* symbol table for perldb package */
100PERLVAR(Iglobalstash, HV *) /* global keyword overrides imported here */
101PERLVAR(Icurstname, SV *) /* name of current package */
102PERLVAR(Ibeginav, AV *) /* names of BEGIN subroutines */
d4cce5f1 103PERLVAR(Iendav, AV *) /* names of END subroutines */
49f531da 104PERLVAR(Iinitav, AV *) /* names of INIT subroutines */
105PERLVAR(Istrtab, HV *) /* shared string table */
106
107/* memory management */
49f531da 108PERLVAR(Isv_count, I32) /* how many SV* are currently allocated */
109PERLVAR(Isv_objcount, I32) /* how many objects are currently allocated */
110PERLVAR(Isv_root, SV*) /* storage for SVs belonging to interp */
111PERLVAR(Isv_arenaroot, SV*) /* list of areas for garbage collection */
112
113/* funky return mechanisms */
cb68f92d 114PERLVAR(Ilastspbase, I32)
115PERLVAR(Ilastsize, I32)
49f531da 116PERLVAR(Iforkprocess, int) /* so do_open |- can return proc# */
117
118/* subprocess state */
d4cce5f1 119PERLVAR(Ifdpid, AV *) /* keep fd-to-pid mappings for my_popen */
49f531da 120
121/* internal state */
49f531da 122PERLVAR(Itainting, bool) /* doing taint checks */
123PERLVARI(Iop_mask, char *, NULL) /* masked operations for safe evals */
2a841d13 124PERLVAR(Ilast_proto, char *) /* Prototype of last sub seen. */
49f531da 125
126/* trace state */
cb68f92d 127PERLVAR(Idlevel, I32)
128PERLVARI(Idlmax, I32, 128)
129PERLVAR(Idebname, char *)
130PERLVAR(Idebdelim, char *)
49f531da 131
132/* current interpreter roots */
cb68f92d 133PERLVAR(Imain_cv, CV *)
134PERLVAR(Imain_root, OP *)
135PERLVAR(Imain_start, OP *)
136PERLVAR(Ieval_root, OP *)
137PERLVAR(Ieval_start, OP *)
49f531da 138
139/* runtime control stuff */
cb68f92d 140PERLVARI(Icurcopdb, COP *, NULL)
141PERLVARI(Icopline, line_t, NOLINE)
49f531da 142
143/* statics moved here for shared library purposes */
144PERLVAR(Istrchop, SV) /* return value from chop */
145PERLVAR(Ifilemode, int) /* so nextargv() can preserve mode */
146PERLVAR(Ilastfd, int) /* what to preserve mode on */
147PERLVAR(Ioldname, char *) /* what to preserve mode on */
d4cce5f1 148PERLVAR(IArgv, char **) /* stuff to free from do_aexec, vfork safe */
149PERLVAR(ICmd, char *) /* stuff to free from do_aexec, vfork safe */
49f531da 150PERLVAR(Isortcop, OP *) /* user defined sort routine */
151PERLVAR(Isortstash, HV *) /* which is in some package or other */
152PERLVAR(Ifirstgv, GV *) /* $a */
153PERLVAR(Isecondgv, GV *) /* $b */
49f531da 154PERLVAR(Imystrk, SV *) /* temp key string for do_each() */
155PERLVAR(Idumplvl, I32) /* indentation level on syntax tree dump */
cb68f92d 156PERLVAR(Ioldlastpm, PMOP *) /* for saving regexp context in debugger */
49f531da 157PERLVAR(Igensym, I32) /* next symbol for getsym() to define */
cb68f92d 158PERLVAR(Ipreambled, bool)
159PERLVAR(Ipreambleav, AV *)
160PERLVARI(Ilaststatval, int, -1)
161PERLVARI(Ilaststype, I32, OP_STAT)
162PERLVAR(Imess_sv, SV *)
49f531da 163
cb68f92d 164/* XXX shouldn't these be per-thread? --GSAR */
165PERLVAR(Iors, char *) /* output record separator $\ */
166PERLVAR(Iorslen, STRLEN)
167PERLVAR(Iofmt, char *) /* output format for numbers $# */
d4cce5f1 168
4b556e6c 169/* interpreter atexit processing */
cb68f92d 170PERLVARI(Iexitlist, PerlExitListEntry *, NULL)
171 /* list of exit functions */
172PERLVARI(Iexitlistlen, I32, 0) /* length of same */
173PERLVAR(Imodglobal, HV *) /* per-interp module data */
174
175/* these used to be in global before 5.004_68 */
176PERLVARI(Iprofiledata, U32 *, NULL) /* table of ops, counts */
177PERLVARI(Irsfp, PerlIO * VOL, Nullfp) /* current source file pointer */
178PERLVARI(Irsfp_filters, AV *, Nullav) /* keeps active source filters */
179
180PERLVAR(Icompiling, COP) /* compiling/done executing marker */
181
182PERLVAR(Icompcv, CV *) /* currently compiling subroutine */
183PERLVAR(Icomppad, AV *) /* storage for lexically scoped temporaries */
184PERLVAR(Icomppad_name, AV *) /* variable names for "my" variables */
185PERLVAR(Icomppad_name_fill, I32) /* last "introduced" variable offset */
186PERLVAR(Icomppad_name_floor, I32) /* start of vars in innermost block */
4b556e6c 187
188#ifdef HAVE_INTERP_INTERN
cb68f92d 189PERLVAR(Isys_intern, struct interp_intern)
190 /* platform internals */
4b556e6c 191#endif
192
7fae4e64 193/* more statics moved here */
7fae4e64 194PERLVARI(Igeneration, int, 100) /* from op.c */
195PERLVAR(IDBcv, CV *) /* from perl.c */
196PERLVAR(Iarchpat_auto, char*) /* from perl.c */
197PERLVAR(Isortcxix, I32) /* from pp_ctl.c */
198PERLVAR(Ilastgotoprobe, OP*) /* from pp_ctl.c */
199PERLVAR(Iregdummy, regnode) /* from regcomp.c */
77d41b28 200PERLVAR(Iregcomp_parse, char*) /* Input-scan pointer. */
7fae4e64 201PERLVAR(Iregxend, char*) /* End of input for compile */
cb68f92d 202PERLVAR(Iregcode, regnode*) /* Code-emit pointer; &regdummy = don't */
7fae4e64 203PERLVAR(Iregnaughty, I32) /* How bad is this pattern? */
204PERLVAR(Iregsawback, I32) /* Did we see \1, ...? */
205
206/* This guys appear both in regcomp.c and regexec.c, */
207PERLVAR(Iregprecomp, char *) /* uncompiled string. */
208PERLVAR(Iregnpar, I32) /* () count. */
209PERLVAR(Iregsize, I32) /* Code size. */
210PERLVAR(Iregflags, U16) /* are we folding, multilining? */
211
212PERLVAR(Iregseen, U32) /* from regcomp.c */
213PERLVAR(Iseen_zerolen, I32) /* from regcomp.c */
77d41b28 214PERLVAR(Iregcomp_rx, regexp *) /* from regcomp.c */
7fae4e64 215PERLVAR(Iextralen, I32) /* from regcomp.c */
7fae4e64 216PERLVAR(Icolorset, int) /* from regcomp.c */
217PERLVAR(Icolors[4], char *) /* from regcomp.c */
7fae4e64 218
219PERLVAR(Ireginput, char *) /* String-input pointer. */
220PERLVAR(Iregbol, char *) /* Beginning of input, for ^ check. */
221PERLVAR(Iregeol, char *) /* End of input, for $ check. */
222PERLVAR(Iregstartp, char **) /* Pointer to startp array. */
223PERLVAR(Iregendp, char **) /* Ditto for endp. */
224PERLVAR(Ireglastparen, U32 *) /* Similarly for lastparen. */
225PERLVAR(Iregtill, char *) /* How far we are required to go. */
226PERLVAR(Iregprev, char) /* char before regbol, \n if none */
227
228PERLVAR(Ireg_start_tmp, char **) /* from regexec.c */
229PERLVAR(Ireg_start_tmpl,U32) /* from regexec.c */
cb68f92d 230PERLVAR(Iregdata, struct reg_data *)
231 /* from regexec.c renamed was data */
7fae4e64 232PERLVAR(Ibostr, char *) /* from regexec.c */
233PERLVAR(Ireg_flags, U32) /* from regexec.c */
234PERLVAR(Ireg_eval_set, I32) /* from regexec.c */
235
7fae4e64 236PERLVAR(Iregnarrate, I32) /* from regexec.c */
237PERLVAR(Iregprogram, regnode *) /* from regexec.c */
238PERLVARI(Iregindent, int, 0) /* from regexec.c */
7fae4e64 239
240PERLVAR(Iregcc, CURCUR *) /* from regexec.c */
cb68f92d 241PERLVARI(Iin_clean_objs,bool, FALSE) /* from sv.c */
242PERLVARI(Iin_clean_all, bool, FALSE) /* from sv.c */
7fae4e64 243
244PERLVAR(Ilinestart, char *) /* beg. of most recently read line */
245PERLVAR(Ipending_ident, char) /* pending identifier lookup */
246PERLVAR(Isublex_info, SUBLEXINFO) /* from toke.c */
247
49f531da 248#ifdef USE_THREADS
cb68f92d 249PERLVAR(Ithrsv, SV *) /* struct perl_thread for main thread */
940cb80d 250PERLVARI(Ithreadnum, U32, 0) /* incremented each thread creation */
49f531da 251#endif /* USE_THREADS */
76e3520e 252
253#ifdef PERL_OBJECT
7fae4e64 254PERLVARI(piMem, IPerlMem*, NULL)
255PERLVARI(piENV, IPerlEnv*, NULL)
256PERLVARI(piStdIO, IPerlStdIO*, NULL)
257PERLVARI(piLIO, IPerlLIO*, NULL)
258PERLVARI(piDir, IPerlDir*, NULL)
259PERLVARI(piSock, IPerlSock*, NULL)
260PERLVARI(piProc, IPerlProc*, NULL)
76e3520e 261#endif