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