0393b8f4d24c3092c83eeb35d40f770174abde1e
[p5sagit/p5-mst-13.2.git] / intrpvar.h
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 /* switches */
16 PERLVAR(Icddir, char *)         
17 PERLVAR(Iminus_c,       bool)           
18 PERLVAR(Ipatchlevel[10],        char)           
19 PERLVAR(Ilocalpatches,  char **)                
20 PERLVAR(Inrs,   SV *)           
21 PERLVARI(Isplitstr,     char *, " ")    
22 PERLVAR(Ipreprocess,    bool)           
23 PERLVAR(Iminus_n,       bool)           
24 PERLVAR(Iminus_p,       bool)           
25 PERLVAR(Iminus_l,       bool)           
26 PERLVAR(Iminus_a,       bool)           
27 PERLVAR(Iminus_F,       bool)           
28 PERLVAR(Idoswitches,    bool)           
29 PERLVAR(Idowarn,        bool)           
30 PERLVAR(Idoextract,     bool)           
31 PERLVAR(Isawampersand,  bool)           /* must save all match strings */
32 PERLVAR(Isawstudy,      bool)           /* do fbm_instr on all strings */
33 PERLVAR(Isawvec,        bool)           
34 PERLVAR(Iunsafe,        bool)           
35 PERLVAR(Iinplace,       char *)         
36 PERLVAR(Ie_tmpname,     char *)         
37 PERLVAR(Ie_fp,  PerlIO *)               
38 PERLVAR(Iperldb,        U32)            
39         /* This value may be raised by extensions for testing purposes */
40 PERLVARI(Iperl_destruct_level,  int,    0)      /* 0=none, 1=full, 2=full with checks */
41
42 /* magical thingies */
43 PERLVAR(Ibasetime,      Time_t)         /* $^T */
44 PERLVAR(Iformfeed,      SV *)           /* $^L */
45 PERLVARI(Ichopset,      char *, " \n-") /* $: */
46 PERLVAR(Irs,    SV *)           /* $/ */
47 PERLVAR(Iofs,   char *)         /* $, */
48 PERLVAR(Iofslen,        STRLEN)         
49 PERLVAR(Iors,   char *)         /* $\ */
50 PERLVAR(Iorslen,        STRLEN)         
51 PERLVAR(Iofmt,  char *)         /* $# */
52 PERLVARI(Imaxsysfd,     I32,    MAXSYSFD)       /* top fd to pass to subprocesses */
53 PERLVAR(Imultiline,     int)            /* $*--do strings hold >1 line? */
54 PERLVAR(Istatusvalue,   I32)            /* $? */
55 #ifdef VMS
56 PERLVAR(Istatusvalue_vms,       U32)            
57 #endif
58
59 PERLVAR(Istatcache,     struct stat)            /* _ */
60 PERLVAR(Istatgv,        GV *)           
61 PERLVARI(Istatname,     SV *,   Nullsv) 
62
63 /* shortcuts to various I/O objects */
64 PERLVAR(Istdingv,       GV *)           
65 PERLVAR(Ilast_in_gv,    GV *)           
66 PERLVAR(Idefgv, GV *)           
67 PERLVAR(Iargvgv,        GV *)           
68 PERLVAR(Idefoutgv,      GV *)           
69 PERLVAR(Iargvoutgv,     GV *)           
70
71 /* shortcuts to regexp stuff */
72 PERLVAR(Ileftgv,        GV *)           
73 PERLVAR(Iampergv,       GV *)           
74 PERLVAR(Irightgv,       GV *)           
75 PERLVAR(Icurpm, PMOP *)         /* what to do \ interps from */
76 PERLVAR(Iscreamfirst,   I32 *)          
77 PERLVAR(Iscreamnext,    I32 *)          
78 PERLVARI(Imaxscream,    I32,    -1)     
79 PERLVAR(Ilastscream,    SV *)           
80
81 /* shortcuts to misc objects */
82 PERLVAR(Ierrgv, GV *)           
83
84 /* shortcuts to debugging objects */
85 PERLVAR(IDBgv,  GV *)           
86 PERLVAR(IDBline,        GV *)           
87 PERLVAR(IDBsub, GV *)           
88 PERLVAR(IDBsingle,      SV *)           
89 PERLVAR(IDBtrace,       SV *)           
90 PERLVAR(IDBsignal,      SV *)           
91 PERLVAR(Ilineary,       AV *)           /* lines of script for debugger */
92 PERLVAR(Idbargs,        AV *)           /* args to call listed by caller function */
93
94 /* symbol tables */
95 PERLVAR(Idefstash,      HV *)           /* main symbol table */
96 PERLVAR(Icurstash,      HV *)           /* symbol table for current package */
97 PERLVAR(Idebstash,      HV *)           /* symbol table for perldb package */
98 PERLVAR(Iglobalstash,   HV *)           /* global keyword overrides imported here */
99 PERLVAR(Icurstname,     SV *)           /* name of current package */
100 PERLVAR(Ibeginav,       AV *)           /* names of BEGIN subroutines */
101 PERLVAR(Iendav, AV *)           /* names of END subroutines */
102 PERLVAR(Iinitav,        AV *)           /* names of INIT subroutines */
103 PERLVAR(Istrtab,        HV *)           /* shared string table */
104
105 /* memory management */
106 PERLVAR(Itmps_stack,    SV **)          
107 PERLVARI(Itmps_ix,      I32,    -1)     
108 PERLVARI(Itmps_floor,   I32,    -1)     
109 PERLVAR(Itmps_max,      I32)            
110 PERLVAR(Isv_count,      I32)            /* how many SV* are currently allocated */
111 PERLVAR(Isv_objcount,   I32)            /* how many objects are currently allocated */
112 PERLVAR(Isv_root,       SV*)            /* storage for SVs belonging to interp */
113 PERLVAR(Isv_arenaroot,  SV*)            /* list of areas for garbage collection */
114
115 /* funky return mechanisms */
116 PERLVAR(Ilastspbase,    I32)            
117 PERLVAR(Ilastsize,      I32)            
118 PERLVAR(Iforkprocess,   int)            /* so do_open |- can return proc# */
119
120 /* subprocess state */
121 PERLVAR(Ifdpid, AV *)           /* keep fd-to-pid mappings for my_popen */
122
123 /* internal state */
124 PERLVAR(Iin_eval,       VOL int)                /* trap "fatal" errors? */
125 PERLVAR(Irestartop,     OP *)           /* Are we propagating an error from croak? */
126 PERLVAR(Idelaymagic,    int)            /* ($<,$>) = ... */
127 PERLVAR(Idirty, bool)           /* In the middle of tearing things down? */
128 PERLVAR(Ilocalizing,    U8)             /* are we processing a local() list? */
129 PERLVAR(Itainted,       bool)           /* using variables controlled by $< */
130 PERLVAR(Itainting,      bool)           /* doing taint checks */
131 PERLVARI(Iop_mask,      char *, NULL)   /* masked operations for safe evals */
132
133 /* trace state */
134 PERLVAR(Idlevel,        I32)            
135 PERLVARI(Idlmax,        I32,    128)    
136 PERLVAR(Idebname,       char *)         
137 PERLVAR(Idebdelim,      char *)         
138
139 /* current interpreter roots */
140 PERLVAR(Imain_cv,       CV *)           
141 PERLVAR(Imain_root,     OP *)           
142 PERLVAR(Imain_start,    OP *)           
143 PERLVAR(Ieval_root,     OP *)           
144 PERLVAR(Ieval_start,    OP *)           
145
146 /* runtime control stuff */
147 PERLVARI(Icurcop,       COP * VOL,      &compiling)     
148 PERLVARI(Icurcopdb,     COP *,  NULL)   
149 PERLVARI(Icopline,      line_t, NOLINE) 
150 PERLVAR(Icxstack,       PERL_CONTEXT *)         
151 PERLVARI(Icxstack_ix,   I32,    -1)     
152 PERLVARI(Icxstack_max,  I32,    128)    
153 PERLVAR(Istart_env,     JMPENV)         /* empty startup sigjmp() environment */
154 PERLVAR(Itop_env,       JMPENV *)               /* ptr. to current sigjmp() environment */
155
156 /* stack stuff */
157 PERLVAR(Icurstack,      AV *)           /* THE STACK */
158 PERLVAR(Imainstack,     AV *)           /* the stack when nothing funny is happening */
159
160 /* format accumulators */
161 PERLVAR(Iformtarget,    SV *)           
162 PERLVAR(Ibodytarget,    SV *)           
163 PERLVAR(Itoptarget,     SV *)           
164
165 /* statics moved here for shared library purposes */
166 PERLVAR(Istrchop,       SV)             /* return value from chop */
167 PERLVAR(Ifilemode,      int)            /* so nextargv() can preserve mode */
168 PERLVAR(Ilastfd,        int)            /* what to preserve mode on */
169 PERLVAR(Ioldname,       char *)         /* what to preserve mode on */
170 PERLVAR(IArgv,  char **)                /* stuff to free from do_aexec, vfork safe */
171 PERLVAR(ICmd,   char *)         /* stuff to free from do_aexec, vfork safe */
172 PERLVAR(Isortcop,       OP *)           /* user defined sort routine */
173 PERLVAR(Isortstash,     HV *)           /* which is in some package or other */
174 PERLVAR(Ifirstgv,       GV *)           /* $a */
175 PERLVAR(Isecondgv,      GV *)           /* $b */
176 PERLVAR(Isortstack,     AV *)           /* temp stack during pp_sort() */
177 PERLVAR(Isignalstack,   AV *)           /* temp stack during sighandler() */
178 PERLVAR(Imystrk,        SV *)           /* temp key string for do_each() */
179 PERLVAR(Idumplvl,       I32)            /* indentation level on syntax tree dump */
180 PERLVAR(Ioldlastpm,     PMOP *)         /* for saving regexp context during debugger */
181 PERLVAR(Igensym,        I32)            /* next symbol for getsym() to define */
182 PERLVAR(Ipreambled,     bool)           
183 PERLVAR(Ipreambleav,    AV *)           
184 PERLVARI(Ilaststatval,  int,    -1)     
185 PERLVARI(Ilaststype,    I32,    OP_STAT)        
186 PERLVAR(Imess_sv,       SV *)           
187
188 #ifdef USE_THREADS
189 /* threads stuff */
190 PERLVAR(Ithrsv, SV *)           /* holds struct perl_thread for main thread */
191 #endif /* USE_THREADS */
192
193