Fix printing of uids and gids; regen Configure.
[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 *)
cb68f92d 20PERLVAR(Iincgv, GV *)
b3ac6de7 21PERLVAR(Ihintgv, GV *)
cb68f92d 22PERLVAR(Iorigfilename, char *)
23PERLVAR(Idiehook, SV *)
24PERLVAR(Iwarnhook, SV *)
f4c556ac 25
26/* switches */
cb68f92d 27PERLVAR(Iminus_c, bool)
51371543 28PERLVARA(Ipatchlevel,10,char)
cb68f92d 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 */
cb68f92d 41PERLVAR(Iunsafe, bool)
42PERLVAR(Iinplace, char *)
43PERLVAR(Ie_script, SV *)
44PERLVAR(Iperldb, U32)
d4cce5f1 45
f4c556ac 46/* This value may be set when embedding for full cleanup */
d4cce5f1 47/* 0=none, 1=full, 2=full with checks */
cb68f92d 48PERLVARI(Iperl_destruct_level, int, 0)
49f531da 49
50/* magical thingies */
51PERLVAR(Ibasetime, Time_t) /* $^T */
52PERLVAR(Iformfeed, SV *) /* $^L */
d4cce5f1 53
54
cb68f92d 55PERLVARI(Imaxsysfd, I32, MAXSYSFD)
56 /* top fd to pass to subprocesses */
49f531da 57PERLVAR(Imultiline, int) /* $*--do strings hold >1 line? */
58PERLVAR(Istatusvalue, I32) /* $? */
59#ifdef VMS
cb68f92d 60PERLVAR(Istatusvalue_vms,U32)
49f531da 61#endif
62
49f531da 63/* shortcuts to various I/O objects */
cb68f92d 64PERLVAR(Istdingv, GV *)
bf49b057 65PERLVAR(Istderrgv, GV *)
cb68f92d 66PERLVAR(Idefgv, GV *)
67PERLVAR(Iargvgv, GV *)
68PERLVAR(Iargvoutgv, GV *)
49f531da 69
70/* shortcuts to regexp stuff */
5c0ca799 71/* this one needs to be moved to thrdvar.h and accessed via
72 * find_threadsv() when USE_THREADS */
cb68f92d 73PERLVAR(Ireplgv, GV *)
49f531da 74
75/* shortcuts to misc objects */
cb68f92d 76PERLVAR(Ierrgv, GV *)
49f531da 77
78/* shortcuts to debugging objects */
cb68f92d 79PERLVAR(IDBgv, GV *)
80PERLVAR(IDBline, GV *)
81PERLVAR(IDBsub, GV *)
82PERLVAR(IDBsingle, SV *)
83PERLVAR(IDBtrace, SV *)
84PERLVAR(IDBsignal, SV *)
49f531da 85PERLVAR(Ilineary, AV *) /* lines of script for debugger */
86PERLVAR(Idbargs, AV *) /* args to call listed by caller function */
87
88/* symbol tables */
49f531da 89PERLVAR(Idebstash, HV *) /* symbol table for perldb package */
90PERLVAR(Iglobalstash, HV *) /* global keyword overrides imported here */
91PERLVAR(Icurstname, SV *) /* name of current package */
92PERLVAR(Ibeginav, AV *) /* names of BEGIN subroutines */
d4cce5f1 93PERLVAR(Iendav, AV *) /* names of END subroutines */
49f531da 94PERLVAR(Iinitav, AV *) /* names of INIT subroutines */
95PERLVAR(Istrtab, HV *) /* shared string table */
005a453c 96PERLVARI(Isub_generation,U32,1) /* incr to invalidate method cache */
49f531da 97
98/* memory management */
49f531da 99PERLVAR(Isv_count, I32) /* how many SV* are currently allocated */
100PERLVAR(Isv_objcount, I32) /* how many objects are currently allocated */
101PERLVAR(Isv_root, SV*) /* storage for SVs belonging to interp */
102PERLVAR(Isv_arenaroot, SV*) /* list of areas for garbage collection */
103
104/* funky return mechanisms */
49f531da 105PERLVAR(Iforkprocess, int) /* so do_open |- can return proc# */
106
107/* subprocess state */
d4cce5f1 108PERLVAR(Ifdpid, AV *) /* keep fd-to-pid mappings for my_popen */
49f531da 109
110/* internal state */
49f531da 111PERLVAR(Itainting, bool) /* doing taint checks */
112PERLVARI(Iop_mask, char *, NULL) /* masked operations for safe evals */
113
49f531da 114/* current interpreter roots */
cb68f92d 115PERLVAR(Imain_cv, CV *)
116PERLVAR(Imain_root, OP *)
117PERLVAR(Imain_start, OP *)
118PERLVAR(Ieval_root, OP *)
119PERLVAR(Ieval_start, OP *)
49f531da 120
121/* runtime control stuff */
cb68f92d 122PERLVARI(Icurcopdb, COP *, NULL)
123PERLVARI(Icopline, line_t, NOLINE)
49f531da 124
125/* statics moved here for shared library purposes */
49f531da 126PERLVAR(Ifilemode, int) /* so nextargv() can preserve mode */
127PERLVAR(Ilastfd, int) /* what to preserve mode on */
128PERLVAR(Ioldname, char *) /* what to preserve mode on */
d4cce5f1 129PERLVAR(IArgv, char **) /* stuff to free from do_aexec, vfork safe */
130PERLVAR(ICmd, char *) /* stuff to free from do_aexec, vfork safe */
49f531da 131PERLVAR(Igensym, I32) /* next symbol for getsym() to define */
cb68f92d 132PERLVAR(Ipreambled, bool)
133PERLVAR(Ipreambleav, AV *)
134PERLVARI(Ilaststatval, int, -1)
135PERLVARI(Ilaststype, I32, OP_STAT)
136PERLVAR(Imess_sv, SV *)
49f531da 137
cb68f92d 138/* XXX shouldn't these be per-thread? --GSAR */
139PERLVAR(Iors, char *) /* output record separator $\ */
140PERLVAR(Iorslen, STRLEN)
141PERLVAR(Iofmt, char *) /* output format for numbers $# */
d4cce5f1 142
4b556e6c 143/* interpreter atexit processing */
cb68f92d 144PERLVARI(Iexitlist, PerlExitListEntry *, NULL)
145 /* list of exit functions */
146PERLVARI(Iexitlistlen, I32, 0) /* length of same */
147PERLVAR(Imodglobal, HV *) /* per-interp module data */
148
149/* these used to be in global before 5.004_68 */
150PERLVARI(Iprofiledata, U32 *, NULL) /* table of ops, counts */
151PERLVARI(Irsfp, PerlIO * VOL, Nullfp) /* current source file pointer */
152PERLVARI(Irsfp_filters, AV *, Nullav) /* keeps active source filters */
153
154PERLVAR(Icompiling, COP) /* compiling/done executing marker */
155
156PERLVAR(Icompcv, CV *) /* currently compiling subroutine */
157PERLVAR(Icomppad, AV *) /* storage for lexically scoped temporaries */
158PERLVAR(Icomppad_name, AV *) /* variable names for "my" variables */
159PERLVAR(Icomppad_name_fill, I32) /* last "introduced" variable offset */
160PERLVAR(Icomppad_name_floor, I32) /* start of vars in innermost block */
4b556e6c 161
162#ifdef HAVE_INTERP_INTERN
cb68f92d 163PERLVAR(Isys_intern, struct interp_intern)
164 /* platform internals */
4b556e6c 165#endif
166
7fae4e64 167/* more statics moved here */
7fae4e64 168PERLVARI(Igeneration, int, 100) /* from op.c */
169PERLVAR(IDBcv, CV *) /* from perl.c */
170PERLVAR(Iarchpat_auto, char*) /* from perl.c */
56953603 171
cb68f92d 172PERLVARI(Iin_clean_objs,bool, FALSE) /* from sv.c */
173PERLVARI(Iin_clean_all, bool, FALSE) /* from sv.c */
7fae4e64 174
175PERLVAR(Ilinestart, char *) /* beg. of most recently read line */
176PERLVAR(Ipending_ident, char) /* pending identifier lookup */
177PERLVAR(Isublex_info, SUBLEXINFO) /* from toke.c */
178
49f531da 179#ifdef USE_THREADS
cb68f92d 180PERLVAR(Ithrsv, SV *) /* struct perl_thread for main thread */
940cb80d 181PERLVARI(Ithreadnum, U32, 0) /* incremented each thread creation */
5f08fbcd 182PERLVAR(Istrtab_mutex, perl_mutex) /* Mutex for string table access */
49f531da 183#endif /* USE_THREADS */
76e3520e 184
d8eceb89 185PERLVAR(Iuid, Uid_t) /* current real user id */
186PERLVAR(Ieuid, Uid_t) /* current effective user id */
187PERLVAR(Igid, Gid_t) /* current real group id */
188PERLVAR(Iegid, Gid_t) /* current effective group id */
0672f40e 189PERLVAR(Inomemok, bool) /* let malloc context handle nomem */
190PERLVAR(Ian, U32) /* malloc sequence number */
191PERLVAR(Icop_seqmax, U32) /* statement sequence number */
192PERLVAR(Iop_seqmax, U16) /* op sequence number */
193PERLVAR(Ievalseq, U32) /* eval sequence number */
194PERLVAR(Iorigenviron, char **)
195PERLVAR(Iorigalen, U32)
196PERLVAR(Ipidstatus, HV *) /* pid-to-status mappings for waitpid */
197PERLVARI(Imaxo, int, MAXO) /* maximum number of ops */
198PERLVAR(Iosname, char *) /* operating system */
199PERLVARI(Ish_path, char *, SH_PATH)/* full path of shell */
200PERLVAR(Isighandlerp, Sighandler_t)
201
202PERLVAR(Ixiv_arenaroot, XPV*) /* list of allocated xiv areas */
203PERLVAR(Ixiv_root, IV *) /* free xiv list--shared by interpreters */
cad2e5aa 204PERLVAR(Ixnv_root, NV *) /* free xnv list--shared by interpreters */
0672f40e 205PERLVAR(Ixrv_root, XRV *) /* free xrv list--shared by interpreters */
206PERLVAR(Ixpv_root, XPV *) /* free xpv list--shared by interpreters */
932e9ff9 207PERLVAR(Ixpviv_root, XPVIV *) /* free xpviv list--shared by interpreters */
208PERLVAR(Ixpvnv_root, XPVNV *) /* free xpvnv list--shared by interpreters */
209PERLVAR(Ixpvcv_root, XPVCV *) /* free xpvcv list--shared by interpreters */
210PERLVAR(Ixpvav_root, XPVAV *) /* free xpvav list--shared by interpreters */
211PERLVAR(Ixpvhv_root, XPVHV *) /* free xpvhv list--shared by interpreters */
212PERLVAR(Ixpvmg_root, XPVMG *) /* free xpvmg list--shared by interpreters */
213PERLVAR(Ixpvlv_root, XPVLV *) /* free xpvlv list--shared by interpreters */
214PERLVAR(Ixpvbm_root, XPVBM *) /* free xpvbm list--shared by interpreters */
0672f40e 215PERLVAR(Ihe_root, HE *) /* free he list--shared by interpreters */
216PERLVAR(Inice_chunk, char *) /* a nice chunk of memory to reuse */
217PERLVAR(Inice_chunk_size, U32) /* how nice the chunk of memory is */
218
0b94c7bb 219PERLVARI(Irunops, runops_proc_t, MEMBER_TO_FPTR(RUNOPS_DEFAULT))
0672f40e 220
51371543 221PERLVARA(Itokenbuf,256, char)
0672f40e 222
223PERLVAR(Isv_undef, SV)
224PERLVAR(Isv_no, SV)
225PERLVAR(Isv_yes, SV)
226
227#ifdef CSH
228PERLVARI(Icshname, char *, CSH)
229PERLVAR(Icshlen, I32)
230#endif
231
232PERLVAR(Ilex_state, U32) /* next token is determined */
233PERLVAR(Ilex_defer, U32) /* state after determined token */
234PERLVAR(Ilex_expect, expectation) /* expect after determined token */
235PERLVAR(Ilex_brackets, I32) /* bracket count */
236PERLVAR(Ilex_formbrack, I32) /* bracket count at outer format level */
237PERLVAR(Ilex_fakebrack, I32) /* outer bracket is mere delimiter */
238PERLVAR(Ilex_casemods, I32) /* casemod count */
239PERLVAR(Ilex_dojoin, I32) /* doing an array interpolation */
240PERLVAR(Ilex_starts, I32) /* how many interps done on level */
241PERLVAR(Ilex_stuff, SV *) /* runtime pattern from m// or s/// */
242PERLVAR(Ilex_repl, SV *) /* runtime replacement from s/// */
243PERLVAR(Ilex_op, OP *) /* extra info to pass back on op */
244PERLVAR(Ilex_inpat, OP *) /* in pattern $) and $| are special */
245PERLVAR(Ilex_inwhat, I32) /* what kind of quoting are we in */
246PERLVAR(Ilex_brackstack,char *) /* what kind of brackets to pop */
247PERLVAR(Ilex_casestack, char *) /* what kind of case mods in effect */
248
249/* What we know when we're in LEX_KNOWNEXT state. */
51371543 250PERLVARA(Inextval,5, YYSTYPE) /* value of next token, if any */
251PERLVARA(Inexttype,5, I32) /* type of next token */
0672f40e 252PERLVAR(Inexttoke, I32)
253
254PERLVAR(Ilinestr, SV *)
255PERLVAR(Ibufptr, char *)
256PERLVAR(Ioldbufptr, char *)
257PERLVAR(Ioldoldbufptr, char *)
258PERLVAR(Ibufend, char *)
259PERLVARI(Iexpect,expectation, XSTATE) /* how to interpret ambiguous tokens */
260
261PERLVAR(Imulti_start, I32) /* 1st line of multi-line string */
262PERLVAR(Imulti_end, I32) /* last line of multi-line string */
263PERLVAR(Imulti_open, I32) /* delimiter of said string */
264PERLVAR(Imulti_close, I32) /* delimiter of said string */
265
266PERLVAR(Ierror_count, I32) /* how many errors so far, max 10 */
267PERLVAR(Isubline, I32) /* line this subroutine began on */
268PERLVAR(Isubname, SV *) /* name of current subroutine */
269
270PERLVAR(Imin_intro_pending, I32) /* start of vars to introduce */
271PERLVAR(Imax_intro_pending, I32) /* end of vars to introduce */
272PERLVAR(Ipadix, I32) /* max used index in current "register" pad */
273PERLVAR(Ipadix_floor, I32) /* how low may inner block reset padix */
274PERLVAR(Ipad_reset_pending, I32) /* reset pad on next attempted alloc */
275
0672f40e 276PERLVAR(Ilast_uni, char *) /* position of last named-unary op */
277PERLVAR(Ilast_lop, char *) /* position of last list operator */
278PERLVAR(Ilast_lop_op, OPCODE) /* last list operator */
77ca0c92 279PERLVAR(Iin_my, I32) /* we're compiling a "my" (or "our") declaration */
0672f40e 280PERLVAR(Iin_my_stash, HV *) /* declared class of this "my" declaration */
281#ifdef FCRYPT
f4c556ac 282PERLVAR(Icryptseen, bool) /* has fast crypt() been initialized? */
0672f40e 283#endif
284
f4c556ac 285PERLVAR(Ihints, U32) /* pragma-tic compile-time flags */
0672f40e 286
287PERLVAR(Idebug, VOL U32) /* flags given to -D switch */
288
289PERLVAR(Iamagic_generation, long)
290
291#ifdef USE_LOCALE_COLLATE
292PERLVAR(Icollation_ix, U32) /* Collation generation index */
293PERLVAR(Icollation_name,char *) /* Name of current collation */
294PERLVARI(Icollation_standard, bool, TRUE)
295 /* Assume simple collation */
296PERLVAR(Icollxfrm_base, Size_t) /* Basic overhead in *xfrm() */
297PERLVARI(Icollxfrm_mult,Size_t, 2) /* Expansion factor in *xfrm() */
298#endif /* USE_LOCALE_COLLATE */
299
300#ifdef USE_LOCALE_NUMERIC
301
302PERLVAR(Inumeric_name, char *) /* Name of current numeric locale */
303PERLVARI(Inumeric_standard, bool, TRUE)
304 /* Assume simple numerics */
305PERLVARI(Inumeric_local, bool, TRUE)
306 /* Assume local numerics */
097ee67d 307PERLVAR(Inumeric_radix, char)
308 /* The radix character if not '.' */
0672f40e 309
310#endif /* !USE_LOCALE_NUMERIC */
311
312/* utf8 character classes */
313PERLVAR(Iutf8_alnum, SV *)
b8c5462f 314PERLVAR(Iutf8_alnumc, SV *)
315PERLVAR(Iutf8_ascii, SV *)
0672f40e 316PERLVAR(Iutf8_alpha, SV *)
317PERLVAR(Iutf8_space, SV *)
b8c5462f 318PERLVAR(Iutf8_cntrl, SV *)
319PERLVAR(Iutf8_graph, SV *)
0672f40e 320PERLVAR(Iutf8_digit, SV *)
321PERLVAR(Iutf8_upper, SV *)
322PERLVAR(Iutf8_lower, SV *)
323PERLVAR(Iutf8_print, SV *)
b8c5462f 324PERLVAR(Iutf8_punct, SV *)
325PERLVAR(Iutf8_xdigit, SV *)
0672f40e 326PERLVAR(Iutf8_mark, SV *)
327PERLVAR(Iutf8_toupper, SV *)
328PERLVAR(Iutf8_totitle, SV *)
329PERLVAR(Iutf8_tolower, SV *)
330PERLVAR(Ilast_swash_hv, HV *)
331PERLVAR(Ilast_swash_klen, U32)
51371543 332PERLVARA(Ilast_swash_key,10, U8)
0672f40e 333PERLVAR(Ilast_swash_tmps, U8 *)
334PERLVAR(Ilast_swash_slen, STRLEN)
335
336/* perly.c globals */
337PERLVAR(Iyydebug, int)
338PERLVAR(Iyynerrs, int)
339PERLVAR(Iyyerrflag, int)
340PERLVAR(Iyychar, int)
341PERLVAR(Iyyval, YYSTYPE)
342PERLVAR(Iyylval, YYSTYPE)
343
344PERLVAR(Iglob_index, int)
0672f40e 345PERLVAR(Isrand_called, bool)
51371543 346PERLVARA(Iuudmap,256, char)
0672f40e 347PERLVAR(Ibitcount, char *)
0672f40e 348
43165c05 349#ifdef USE_THREADS
350PERLVAR(Ithr_key, perl_key) /* For per-thread struct perl_thread* */
351PERLVAR(Isv_mutex, perl_mutex) /* Mutex for allocating SVs in sv.c */
43165c05 352PERLVAR(Ieval_mutex, perl_mutex) /* Mutex for doeval */
353PERLVAR(Ieval_cond, perl_cond) /* Condition variable for doeval */
354PERLVAR(Ieval_owner, struct perl_thread *)
355 /* Owner thread for doeval */
356PERLVAR(Inthreads, int) /* Number of threads currently */
357PERLVAR(Ithreads_mutex, perl_mutex) /* Mutex for nthreads and thread list */
358PERLVAR(Inthreads_cond, perl_cond) /* Condition variable for nthreads */
359PERLVAR(Isvref_mutex, perl_mutex) /* Mutex for SvREFCNT_{inc,dec} */
360PERLVARI(Ithreadsv_names,char *, THREADSV_NAMES)
361#ifdef FAKE_THREADS
362PERLVAR(Icurthr, struct perl_thread *)
363 /* Currently executing (fake) thread */
364#endif
365
366PERLVAR(Icred_mutex, perl_mutex) /* altered credentials in effect */
367
368#endif /* USE_THREADS */
369
c5be433b 370#if defined(PERL_IMPLICIT_SYS)
32e30700 371PERLVAR(IMem, struct IPerlMem*)
372PERLVAR(IEnv, struct IPerlEnv*)
373PERLVAR(IStdIO, struct IPerlStdIO*)
374PERLVAR(ILIO, struct IPerlLIO*)
375PERLVAR(IDir, struct IPerlDir*)
376PERLVAR(ISock, struct IPerlSock*)
377PERLVAR(IProc, struct IPerlProc*)
76e3520e 378#endif