This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl 5.0 alpha 2
[perl5.git] / embed.h
CommitLineData
79072805
LW
1/* This file is derived from global.var and interp.var */
2
3/* (Doing namespace management portably in C is really gross.) */
4
5#ifdef EMBEDDED
6
7/* globals we need to hide from the world */
8#define No PERLNo
9#define Sv PERLSv
10#define Yes PERLYes
11#define an PERLan
12#define buf PERLbuf
13#define bufend PERLbufend
14#define bufptr PERLbufptr
15#define compiling PERLcompiling
16#define comppad PERLcomppad
17#define cryptseen PERLcryptseen
18#define cshlen PERLcshlen
19#define cshname PERLcshname
20#define curinterp PERLcurinterp
21#define curpad PERLcurpad
22#define dc PERLdc
23#define di PERLdi
24#define ds PERLds
25#define egid PERLegid
26#define error_count PERLerror_count
27#define euid PERLeuid
28#define evstr PERLevstr
29#define expectterm PERLexpectterm
30#define fold PERLfold
31#define freq PERLfreq
32#define gid PERLgid
33#define hexdigit PERLhexdigit
34#define in_format PERLin_format
35#define know_next PERLknow_next
36#define last_lop PERLlast_lop
37#define last_uni PERLlast_uni
38#define linestr PERLlinestr
39#define multi_close PERLmulti_close
40#define multi_end PERLmulti_end
41#define multi_open PERLmulti_open
42#define multi_start PERLmulti_start
43#define nexttype PERLnexttype
44#define nextval PERLnextval
45#define nointrp PERLnointrp
46#define nomem PERLnomem
47#define nomemok PERLnomemok
48#define oldbufptr PERLoldbufptr
49#define oldoldbufptr PERLoldoldbufptr
50#define origalen PERLorigalen
51#define origenviron PERLorigenviron
52#define pad PERLpad
53#define padix PERLpadix
54#define patleave PERLpatleave
55#define regbol PERLregbol
56#define regcode PERLregcode
57#define regendp PERLregendp
58#define regeol PERLregeol
59#define regfold PERLregfold
60#define reginput PERLreginput
61#define reglastparen PERLreglastparen
62#define regmyendp PERLregmyendp
63#define regmyp_size PERLregmyp_size
64#define regmystartp PERLregmystartp
65#define regnpar PERLregnpar
66#define regparse PERLregparse
67#define regprecomp PERLregprecomp
68#define regprev PERLregprev
69#define regsawback PERLregsawback
70#define regsawbracket PERLregsawbracket
71#define regsize PERLregsize
72#define regstartp PERLregstartp
73#define regtill PERLregtill
74#define regxend PERLregxend
75#define rsfp PERLrsfp
76#define saw_return PERLsaw_return
77#define statbuf PERLstatbuf
78#define subline PERLsubline
79#define subname PERLsubname
80#define sv_no PERLsv_no
81#define sv_undef PERLsv_undef
82#define sv_yes PERLsv_yes
83#define thisexpr PERLthisexpr
84#define timesbuf PERLtimesbuf
85#define tokenbuf PERLtokenbuf
86#define uid PERLuid
87#define vert PERLvert
88
89/* interpreter specific variables */
90
91#define Argv (curinterp->IArgv)
92#define Cmd (curinterp->ICmd)
93#define DBgv (curinterp->IDBgv)
94#define DBline (curinterp->IDBline)
95#define DBsignal (curinterp->IDBsignal)
96#define DBsingle (curinterp->IDBsingle)
97#define DBsub (curinterp->IDBsub)
98#define DBtrace (curinterp->IDBtrace)
99#define allgvs (curinterp->Iallgvs)
100#define ampergv (curinterp->Iampergv)
101#define argvgv (curinterp->Iargvgv)
102#define argvoutgv (curinterp->Iargvoutgv)
103#define arybase (curinterp->Iarybase)
104#define basetime (curinterp->Ibasetime)
105#define bodytarget (curinterp->Ibodytarget)
106#define cddir (curinterp->Icddir)
107#define chopset (curinterp->Ichopset)
108#define copline (curinterp->Icopline)
109#define curblock (curinterp->Icurblock)
110#define curcop (curinterp->Icurcop)
111#define curcsv (curinterp->Icurcsv)
112#define curoutgv (curinterp->Icuroutgv)
113#define curpm (curinterp->Icurpm)
114#define curstash (curinterp->Icurstash)
115#define curstname (curinterp->Icurstname)
116#define cxstack (curinterp->Icxstack)
117#define cxstack_ix (curinterp->Icxstack_ix)
118#define cxstack_max (curinterp->Icxstack_max)
119#define dbargs (curinterp->Idbargs)
120#define dbmrefcnt (curinterp->Idbmrefcnt)
121#define debdelim (curinterp->Idebdelim)
122#define debname (curinterp->Idebname)
123#define debstash (curinterp->Idebstash)
124#define debug (curinterp->Idebug)
125#define defgv (curinterp->Idefgv)
126#define defoutgv (curinterp->Idefoutgv)
127#define defstash (curinterp->Idefstash)
128#define delaymagic (curinterp->Idelaymagic)
129#define dirty (curinterp->Idirty)
130#define dlevel (curinterp->Idlevel)
131#define dlmax (curinterp->Idlmax)
132#define do_undump (curinterp->Ido_undump)
133#define doextract (curinterp->Idoextract)
134#define doswitches (curinterp->Idoswitches)
135#define dowarn (curinterp->Idowarn)
136#define dumplvl (curinterp->Idumplvl)
137#define e_fp (curinterp->Ie_fp)
138#define e_tmpname (curinterp->Ie_tmpname)
139#define envgv (curinterp->Ienvgv)
140#define eval_root (curinterp->Ieval_root)
141#define eval_start (curinterp->Ieval_start)
142#define fdpid (curinterp->Ifdpid)
143#define filemode (curinterp->Ifilemode)
144#define firstgv (curinterp->Ifirstgv)
145#define forkprocess (curinterp->Iforkprocess)
146#define formfeed (curinterp->Iformfeed)
147#define formtarget (curinterp->Iformtarget)
148#define freestrroot (curinterp->Ifreestrroot)
149#define gensym (curinterp->Igensym)
150#define hint (curinterp->Ihint)
151#define in_eval (curinterp->Iin_eval)
152#define incgv (curinterp->Iincgv)
153#define inplace (curinterp->Iinplace)
154#define last_elen (curinterp->Ilast_elen)
155#define last_eval (curinterp->Ilast_eval)
156#define last_in_gv (curinterp->Ilast_in_gv)
157#define last_root (curinterp->Ilast_root)
158#define lastfd (curinterp->Ilastfd)
159#define lastretstr (curinterp->Ilastretstr)
160#define lastscream (curinterp->Ilastscream)
161#define lastsize (curinterp->Ilastsize)
162#define lastspbase (curinterp->Ilastspbase)
163#define laststatval (curinterp->Ilaststatval)
164#define laststype (curinterp->Ilaststype)
165#define leftgv (curinterp->Ileftgv)
166#define lineary (curinterp->Ilineary)
167#define localizing (curinterp->Ilocalizing)
168#define main_root (curinterp->Imain_root)
169#define main_start (curinterp->Imain_start)
170#define mainstack (curinterp->Imainstack)
171#define maxscream (curinterp->Imaxscream)
172#define maxsysfd (curinterp->Imaxsysfd)
173#define minus_a (curinterp->Iminus_a)
174#define minus_c (curinterp->Iminus_c)
175#define minus_l (curinterp->Iminus_l)
176#define minus_n (curinterp->Iminus_n)
177#define minus_p (curinterp->Iminus_p)
178#define multiline (curinterp->Imultiline)
179#define mystack_base (curinterp->Imystack_base)
180#define mystack_mark (curinterp->Imystack_mark)
181#define mystack_max (curinterp->Imystack_max)
182#define mystack_sp (curinterp->Imystack_sp)
183#define mystrk (curinterp->Imystrk)
184#define nrs (curinterp->Inrs)
185#define nrschar (curinterp->Inrschar)
186#define nrslen (curinterp->Inrslen)
187#define ofmt (curinterp->Iofmt)
188#define ofs (curinterp->Iofs)
189#define ofslen (curinterp->Iofslen)
190#define oldlastpm (curinterp->Ioldlastpm)
191#define oldname (curinterp->Ioldname)
192#define origargc (curinterp->Iorigargc)
193#define origargv (curinterp->Iorigargv)
194#define origfilename (curinterp->Iorigfilename)
195#define ors (curinterp->Iors)
196#define orslen (curinterp->Iorslen)
197#define patchlevel (curinterp->Ipatchlevel)
198#define perldb (curinterp->Iperldb)
199#define pidstatus (curinterp->Ipidstatus)
200#define preambled (curinterp->Ipreambled)
201#define preprocess (curinterp->Ipreprocess)
202#define restartop (curinterp->Irestartop)
203#define rightgv (curinterp->Irightgv)
204#define rs (curinterp->Irs)
205#define rschar (curinterp->Irschar)
206#define rslen (curinterp->Irslen)
207#define rspara (curinterp->Irspara)
208#define sawampersand (curinterp->Isawampersand)
209#define sawi (curinterp->Isawi)
210#define sawstudy (curinterp->Isawstudy)
211#define sawvec (curinterp->Isawvec)
212#define screamfirst (curinterp->Iscreamfirst)
213#define screamnext (curinterp->Iscreamnext)
214#define secondgv (curinterp->Isecondgv)
215#define siggv (curinterp->Isiggv)
216#define signalstack (curinterp->Isignalstack)
217#define sortcop (curinterp->Isortcop)
218#define sortstack (curinterp->Isortstack)
219#define sortstash (curinterp->Isortstash)
220#define stack (curinterp->Istack)
221#define statcache (curinterp->Istatcache)
222#define statgv (curinterp->Istatgv)
223#define statname (curinterp->Istatname)
224#define statusvalue (curinterp->Istatusvalue)
225#define stdingv (curinterp->Istdingv)
226#define strchop (curinterp->Istrchop)
227#define taintanyway (curinterp->Itaintanyway)
228#define tainted (curinterp->Itainted)
229#define tmps_floor (curinterp->Itmps_floor)
230#define tmps_ix (curinterp->Itmps_ix)
231#define tmps_max (curinterp->Itmps_max)
232#define tmps_stack (curinterp->Itmps_stack)
233#define top_env (curinterp->Itop_env)
234#define toptarget (curinterp->Itoptarget)
235#define unsafe (curinterp->Iunsafe)
236
237#else /* not embedded, so translate interpreter variables the other way... */
238
239#define IArgv Argv
240#define ICmd Cmd
241#define IDBgv DBgv
242#define IDBline DBline
243#define IDBsignal DBsignal
244#define IDBsingle DBsingle
245#define IDBsub DBsub
246#define IDBtrace DBtrace
247#define Iallgvs allgvs
248#define Iampergv ampergv
249#define Iargvgv argvgv
250#define Iargvoutgv argvoutgv
251#define Iarybase arybase
252#define Ibasetime basetime
253#define Ibodytarget bodytarget
254#define Icddir cddir
255#define Ichopset chopset
256#define Icopline copline
257#define Icurblock curblock
258#define Icurcop curcop
259#define Icurcsv curcsv
260#define Icuroutgv curoutgv
261#define Icurpm curpm
262#define Icurstash curstash
263#define Icurstname curstname
264#define Icxstack cxstack
265#define Icxstack_ix cxstack_ix
266#define Icxstack_max cxstack_max
267#define Idbargs dbargs
268#define Idbmrefcnt dbmrefcnt
269#define Idebdelim debdelim
270#define Idebname debname
271#define Idebstash debstash
272#define Idebug debug
273#define Idefgv defgv
274#define Idefoutgv defoutgv
275#define Idefstash defstash
276#define Idelaymagic delaymagic
277#define Idirty dirty
278#define Idlevel dlevel
279#define Idlmax dlmax
280#define Ido_undump do_undump
281#define Idoextract doextract
282#define Idoswitches doswitches
283#define Idowarn dowarn
284#define Idumplvl dumplvl
285#define Ie_fp e_fp
286#define Ie_tmpname e_tmpname
287#define Ienvgv envgv
288#define Ieval_root eval_root
289#define Ieval_start eval_start
290#define Ifdpid fdpid
291#define Ifilemode filemode
292#define Ifirstgv firstgv
293#define Iforkprocess forkprocess
294#define Iformfeed formfeed
295#define Iformtarget formtarget
296#define Ifreestrroot freestrroot
297#define Igensym gensym
298#define Ihint hint
299#define Iin_eval in_eval
300#define Iincgv incgv
301#define Iinplace inplace
302#define Ilast_elen last_elen
303#define Ilast_eval last_eval
304#define Ilast_in_gv last_in_gv
305#define Ilast_root last_root
306#define Ilastfd lastfd
307#define Ilastretstr lastretstr
308#define Ilastscream lastscream
309#define Ilastsize lastsize
310#define Ilastspbase lastspbase
311#define Ilaststatval laststatval
312#define Ilaststype laststype
313#define Ileftgv leftgv
314#define Ilineary lineary
315#define Ilocalizing localizing
316#define Imain_root main_root
317#define Imain_start main_start
318#define Imainstack mainstack
319#define Imaxscream maxscream
320#define Imaxsysfd maxsysfd
321#define Iminus_a minus_a
322#define Iminus_c minus_c
323#define Iminus_l minus_l
324#define Iminus_n minus_n
325#define Iminus_p minus_p
326#define Imultiline multiline
327#define Imystack_base mystack_base
328#define Imystack_mark mystack_mark
329#define Imystack_max mystack_max
330#define Imystack_sp mystack_sp
331#define Imystrk mystrk
332#define Inrs nrs
333#define Inrschar nrschar
334#define Inrslen nrslen
335#define Iofmt ofmt
336#define Iofs ofs
337#define Iofslen ofslen
338#define Ioldlastpm oldlastpm
339#define Ioldname oldname
340#define Iorigargc origargc
341#define Iorigargv origargv
342#define Iorigfilename origfilename
343#define Iors ors
344#define Iorslen orslen
345#define Ipatchlevel patchlevel
346#define Iperldb perldb
347#define Ipidstatus pidstatus
348#define Ipreambled preambled
349#define Ipreprocess preprocess
350#define Irestartop restartop
351#define Irightgv rightgv
352#define Irs rs
353#define Irschar rschar
354#define Irslen rslen
355#define Irspara rspara
356#define Isawampersand sawampersand
357#define Isawi sawi
358#define Isawstudy sawstudy
359#define Isawvec sawvec
360#define Iscreamfirst screamfirst
361#define Iscreamnext screamnext
362#define Isecondgv secondgv
363#define Isiggv siggv
364#define Isignalstack signalstack
365#define Isortcop sortcop
366#define Isortstack sortstack
367#define Isortstash sortstash
368#define Istack stack
369#define Istatcache statcache
370#define Istatgv statgv
371#define Istatname statname
372#define Istatusvalue statusvalue
373#define Istdingv stdingv
374#define Istrchop strchop
375#define Itaintanyway taintanyway
376#define Itainted tainted
377#define Itmps_floor tmps_floor
378#define Itmps_ix tmps_ix
379#define Itmps_max tmps_max
380#define Itmps_stack tmps_stack
381#define Itop_env top_env
382#define Itoptarget toptarget
383#define Iunsafe unsafe
384
385#endif