This is a live mirror of the Perl 5 development currently hosted at
clean up some stray "global" symbols
[perl5.git] / proto.h
76e3520e 5#ifdef PERL_OBJECT
aab1f907 6#define VIRTUAL virtual PERL_CALLCONV
76e3520e 7#else
aab1f907 8#define VIRTUAL PERL_CALLCONV
22239a37 9START_EXTERN_C
76e3520e 10#endif
22239a37 11
12/* NOTE!!! When new virtual functions are added, they must be added at
13 * the end of this file to maintain binary compatibility with PERL_OBJECT
14 */
fed7345c 17#ifndef NEXT30_NO_ATTRIBUTE
18#ifndef HASATTRIBUTE /* disable GNU-cc attribute checking? */
19#ifdef __attribute__ /* Avoid possible redefinition errors */
a0d0e21e 20#undef __attribute__
ecfc5424 21#endif
a0d0e21e 22#define __attribute__(attr)
aeea060c 23#endif
a0d0e21e 24#endif
25VIRTUAL SV* amagic_call (SV* left,SV* right,int method,int dir);
26VIRTUAL bool Gv_AMupdate (HV* stash);
27VIRTUAL OP* append_elem (I32 optype, OP* head, OP* tail);
28VIRTUAL OP* append_list (I32 optype, LISTOP* first, LISTOP* last);
29VIRTUAL I32 apply (I32 type, SV** mark, SV** sp);
30VIRTUAL void assertref (OP* o);
31VIRTUAL bool avhv_exists_ent (AV *ar, SV* keysv, U32 hash);
32VIRTUAL SV** avhv_fetch_ent (AV *ar, SV* keysv, I32 lval, U32 hash);
33VIRTUAL HE* avhv_iternext (AV *ar);
34VIRTUAL SV* avhv_iterval (AV *ar, HE* entry);
35VIRTUAL HV* avhv_keys (AV *ar);
36VIRTUAL void av_clear (AV* ar);
37VIRTUAL void av_extend (AV* ar, I32 key);
38VIRTUAL AV* av_fake (I32 size, SV** svp);
39VIRTUAL SV** av_fetch (AV* ar, I32 key, I32 lval);
40VIRTUAL void av_fill (AV* ar, I32 fill);
41VIRTUAL I32 av_len (AV* ar);
42VIRTUAL AV* av_make (I32 size, SV** svp);
43VIRTUAL SV* av_pop (AV* ar);
44VIRTUAL void av_push (AV* ar, SV* val);
45VIRTUAL void av_reify (AV* ar);
46VIRTUAL SV* av_shift (AV* ar);
47VIRTUAL SV** av_store (AV* ar, I32 key, SV* val);
48VIRTUAL void av_undef (AV* ar);
49VIRTUAL void av_unshift (AV* ar, I32 num);
50VIRTUAL OP* bind_match (I32 type, OP* left, OP* pat);
51VIRTUAL OP* block_end (I32 floor, OP* seq);
52VIRTUAL I32 block_gimme (void);
53VIRTUAL int block_start (int full);
54VIRTUAL void boot_core_UNIVERSAL (void);
55VIRTUAL void call_list (I32 oldscope, AV* av_list);
56VIRTUAL I32 cando (I32 bit, I32 effective, Stat_t* statbufp);
57VIRTUAL U32 cast_ulong (double f);
58VIRTUAL I32 cast_i32 (double f);
59VIRTUAL IV cast_iv (double f);
60VIRTUAL UV cast_uv (double f);
a0d0e21e 61#if !defined(HAS_TRUNCATE) && !defined(HAS_CHSIZE) && defined(F_FREESP)
20ce7b12 62VIRTUAL I32 my_chsize (int fd, Off_t length);
a0d0e21e 63#endif
22c35a8c 64
f93b4edd 65#ifdef USE_THREADS
66VIRTUAL MAGIC * condpair_magic (SV *sv);
68VIRTUAL OP* convert (I32 optype, I32 flags, OP* o);
69VIRTUAL void croak (const char* pat,...) __attribute__((noreturn));
70VIRTUAL void cv_ckproto (CV* cv, GV* gv, char* p);
71VIRTUAL CV* cv_clone (CV* proto);
72VIRTUAL SV* cv_const_sv (CV* cv);
73VIRTUAL SV* op_const_sv (OP* o, CV* cv);
74VIRTUAL void cv_undef (CV* cv);
75VIRTUAL void cx_dump (PERL_CONTEXT* cs);
76VIRTUAL SV* filter_add (filter_t funcp, SV* datasv);
77VIRTUAL void filter_del (filter_t funcp);
78VIRTUAL I32 filter_read (int idx, SV* buffer, int maxlen);
79VIRTUAL char ** get_op_descs (void);
80VIRTUAL char ** get_op_names (void);
81VIRTUAL char * get_no_modify (void);
82VIRTUAL U32 * get_opargs (void);
83VIRTUAL I32 cxinc (void);
84VIRTUAL void deb (const char* pat,...);
85VIRTUAL void deb_growlevel (void);
86VIRTUAL void debprofdump (void);
87VIRTUAL I32 debop (OP* o);
88VIRTUAL I32 debstack (void);
89VIRTUAL I32 debstackptrs (void);
90VIRTUAL char* delimcpy (char* to, char* toend, char* from, char* fromend,
91 int delim, I32* retlen);
92VIRTUAL void deprecate (char* s);
93VIRTUAL OP* die (const char* pat,...);
94VIRTUAL OP* die_where (char* message, STRLEN msglen);
95VIRTUAL void dounwind (I32 cxix);
96VIRTUAL bool do_aexec (SV* really, SV** mark, SV** sp);
97VIRTUAL int do_binmode (PerlIO *fp, int iotype, int flag);
98VIRTUAL void do_chop (SV* asv, SV* sv);
99VIRTUAL bool do_close (GV* gv, bool not_implicit);
100VIRTUAL bool do_eof (GV* gv);
101VIRTUAL bool do_exec (char* cmd);
a6c40364 102#ifndef WIN32
20ce7b12 103VIRTUAL bool do_exec3 (char* cmd, int fd, int flag);
a6c40364 104#endif
20ce7b12 105VIRTUAL void do_execfree (void);
a0d0e21e 106#if defined(HAS_MSG) || defined(HAS_SEM) || defined(HAS_SHM)
107VIRTUAL I32 do_ipcctl (I32 optype, SV** mark, SV** sp);
108VIRTUAL I32 do_ipcget (I32 optype, SV** mark, SV** sp);
a0d0e21e 109#endif
110VIRTUAL void do_join (SV* sv, SV* del, SV** mark, SV** sp);
111VIRTUAL OP* do_kv (ARGSproto);
a0d0e21e 112#if defined(HAS_MSG) || defined(HAS_SEM) || defined(HAS_SHM)
113VIRTUAL I32 do_msgrcv (SV** mark, SV** sp);
114VIRTUAL I32 do_msgsnd (SV** mark, SV** sp);
116VIRTUAL bool do_open (GV* gv, char* name, I32 len,
117 int as_raw, int rawmode, int rawperm, PerlIO* supplied_fp);
118VIRTUAL void do_pipe (SV* sv, GV* rgv, GV* wgv);
119VIRTUAL bool do_print (SV* sv, PerlIO* fp);
120VIRTUAL OP* do_readline (void);
121VIRTUAL I32 do_chomp (SV* sv);
122VIRTUAL bool do_seek (GV* gv, Off_t pos, int whence);
a0d0e21e 123#if defined(HAS_MSG) || defined(HAS_SEM) || defined(HAS_SHM)
124VIRTUAL I32 do_semop (SV** mark, SV** sp);
125VIRTUAL I32 do_shmio (I32 optype, SV** mark, SV** sp);
127VIRTUAL void do_sprintf (SV* sv, I32 len, SV** sarg);
128VIRTUAL Off_t do_sysseek (GV* gv, Off_t pos, int whence);
129VIRTUAL Off_t do_tell (GV* gv);
130VIRTUAL I32 do_trans (SV* sv);
131VIRTUAL void do_vecset (SV* sv);
132VIRTUAL void do_vop (I32 optype, SV* sv, SV* left, SV* right);
133VIRTUAL OP* dofile (OP* term);
134VIRTUAL I32 dowantarray (void);
135VIRTUAL void dump_all (void);
136VIRTUAL void dump_eval (void);
748a9306 137#ifdef DUMP_FDS /* See util.c */
20ce7b12 138VIRTUAL void dump_fds (char* s);
a0d0e21e 139#endif
140VIRTUAL void dump_form (GV* gv);
141VIRTUAL void gv_dump (GV* gv);
8eccb90b 142#ifdef MYMALLOC
143VIRTUAL void dump_mstats (char* s);
145VIRTUAL void op_dump (OP* arg);
146VIRTUAL void pmop_dump (PMOP* pm);
147VIRTUAL void dump_packsubs (HV* stash);
148VIRTUAL void dump_sub (GV* gv);
149VIRTUAL void fbm_compile (SV* sv, U32 flags);
150VIRTUAL char* fbm_instr (unsigned char* big, unsigned char* bigend, SV* littlesv, U32 flags);
151VIRTUAL char* find_script (char *scriptname, bool dosearch, char **search_ext, I32 flags);
aeea060c 152#ifdef USE_THREADS
20ce7b12 153VIRTUAL PADOFFSET find_threadsv (const char *name);
76e3520e 154#endif
155VIRTUAL OP* force_list (OP* arg);
156VIRTUAL OP* fold_constants (OP* arg);
157VIRTUAL char* form (const char* pat, ...);
158VIRTUAL void free_tmps (void);
159VIRTUAL OP* gen_constant_list (OP* o);
a6c40364 160#ifndef HAS_GETENV_LEN
161VIRTUAL char* getenv_len (char* key, unsigned long *len);
163VIRTUAL void gp_free (GV* gv);
164VIRTUAL GP* gp_ref (GP* gp);
165VIRTUAL GV* gv_AVadd (GV* gv);
166VIRTUAL GV* gv_HVadd (GV* gv);
167VIRTUAL GV* gv_IOadd (GV* gv);
168VIRTUAL GV* gv_autoload4 (HV* stash, const char* name, STRLEN len, I32 method);
169VIRTUAL void gv_check (HV* stash);
170VIRTUAL void gv_efullname (SV* sv, GV* gv);
171VIRTUAL void gv_efullname3 (SV* sv, GV* gv, const char* prefix);
172VIRTUAL GV* gv_fetchfile (const char* name);
173VIRTUAL GV* gv_fetchmeth (HV* stash, const char* name, STRLEN len, I32 level);
174VIRTUAL GV* gv_fetchmethod (HV* stash, const char* name);
175VIRTUAL GV* gv_fetchmethod_autoload (HV* stash, const char* name, I32 autoload);
176VIRTUAL GV* gv_fetchpv (const char* name, I32 add, I32 sv_type);
177VIRTUAL void gv_fullname (SV* sv, GV* gv);
178VIRTUAL void gv_fullname3 (SV* sv, GV* gv, const char* prefix);
179VIRTUAL void gv_init (GV* gv, HV* stash, const char* name, STRLEN len, int multi);
180VIRTUAL HV* gv_stashpv (const char* name, I32 create);
181VIRTUAL HV* gv_stashpvn (const char* name, U32 namelen, I32 create);
182VIRTUAL HV* gv_stashsv (SV* sv, I32 create);
183VIRTUAL void hv_clear (HV* tb);
184VIRTUAL void hv_delayfree_ent (HV* hv, HE* entry);
185VIRTUAL SV* hv_delete (HV* tb, const char* key, U32 klen, I32 flags);
186VIRTUAL SV* hv_delete_ent (HV* tb, SV* key, I32 flags, U32 hash);
187VIRTUAL bool hv_exists (HV* tb, const char* key, U32 klen);
188VIRTUAL bool hv_exists_ent (HV* tb, SV* key, U32 hash);
189VIRTUAL SV** hv_fetch (HV* tb, const char* key, U32 klen, I32 lval);
190VIRTUAL HE* hv_fetch_ent (HV* tb, SV* key, I32 lval, U32 hash);
191VIRTUAL void hv_free_ent (HV* hv, HE* entry);
192VIRTUAL I32 hv_iterinit (HV* tb);
193VIRTUAL char* hv_iterkey (HE* entry, I32* retlen);
194VIRTUAL SV* hv_iterkeysv (HE* entry);
195VIRTUAL HE* hv_iternext (HV* tb);
196VIRTUAL SV* hv_iternextsv (HV* hv, char** key, I32* retlen);
197VIRTUAL SV* hv_iterval (HV* tb, HE* entry);
198VIRTUAL void hv_ksplit (HV* hv, IV newmax);
199VIRTUAL void hv_magic (HV* hv, GV* gv, int how);
200VIRTUAL SV** hv_store (HV* tb, const char* key, U32 klen, SV* val, U32 hash);
201VIRTUAL HE* hv_store_ent (HV* tb, SV* key, SV* val, U32 hash);
202VIRTUAL void hv_undef (HV* tb);
203VIRTUAL I32 ibcmp (const char* a, const char* b, I32 len);
204VIRTUAL I32 ibcmp_locale (const char* a, const char* b, I32 len);
205VIRTUAL I32 ingroup (I32 testgid, I32 effective);
206VIRTUAL void init_stacks (ARGSproto);
207VIRTUAL U32 intro_my (void);
208VIRTUAL char* instr (const char* big, const char* little);
209VIRTUAL bool io_close (IO* io);
210VIRTUAL OP* invert (OP* cmd);
211VIRTUAL bool is_uni_alnum (U32 c);
212VIRTUAL bool is_uni_idfirst (U32 c);
213VIRTUAL bool is_uni_alpha (U32 c);
214VIRTUAL bool is_uni_space (U32 c);
215VIRTUAL bool is_uni_digit (U32 c);
216VIRTUAL bool is_uni_upper (U32 c);
217VIRTUAL bool is_uni_lower (U32 c);
218VIRTUAL bool is_uni_print (U32 c);
219VIRTUAL U32 to_uni_upper (U32 c);
220VIRTUAL U32 to_uni_title (U32 c);
221VIRTUAL U32 to_uni_lower (U32 c);
222VIRTUAL bool is_uni_alnum_lc (U32 c);
223VIRTUAL bool is_uni_idfirst_lc (U32 c);
224VIRTUAL bool is_uni_alpha_lc (U32 c);
225VIRTUAL bool is_uni_space_lc (U32 c);
226VIRTUAL bool is_uni_digit_lc (U32 c);
227VIRTUAL bool is_uni_upper_lc (U32 c);
228VIRTUAL bool is_uni_lower_lc (U32 c);
229VIRTUAL bool is_uni_print_lc (U32 c);
230VIRTUAL U32 to_uni_upper_lc (U32 c);
231VIRTUAL U32 to_uni_title_lc (U32 c);
232VIRTUAL U32 to_uni_lower_lc (U32 c);
233VIRTUAL bool is_utf8_alnum (U8 *p);
234VIRTUAL bool is_utf8_idfirst (U8 *p);
235VIRTUAL bool is_utf8_alpha (U8 *p);
236VIRTUAL bool is_utf8_space (U8 *p);
237VIRTUAL bool is_utf8_digit (U8 *p);
238VIRTUAL bool is_utf8_upper (U8 *p);
239VIRTUAL bool is_utf8_lower (U8 *p);
240VIRTUAL bool is_utf8_print (U8 *p);
241VIRTUAL bool is_utf8_mark (U8 *p);
242VIRTUAL OP* jmaybe (OP* arg);
243VIRTUAL I32 keyword (char* d, I32 len);
244VIRTUAL void leave_scope (I32 base);
245VIRTUAL void lex_end (void);
246VIRTUAL void lex_start (SV* line);
247VIRTUAL OP* linklist (OP* o);
248VIRTUAL OP* list (OP* o);
249VIRTUAL OP* listkids (OP* o);
250VIRTUAL OP* localize (OP* arg, I32 lexical);
251VIRTUAL I32 looks_like_number (SV* sv);
252VIRTUAL int magic_clearenv (SV* sv, MAGIC* mg);
253VIRTUAL int magic_clear_all_env (SV* sv, MAGIC* mg);
254VIRTUAL int magic_clearpack (SV* sv, MAGIC* mg);
255VIRTUAL int magic_clearsig (SV* sv, MAGIC* mg);
256VIRTUAL int magic_existspack (SV* sv, MAGIC* mg);
257VIRTUAL int magic_freeregexp (SV* sv, MAGIC* mg);
258VIRTUAL int magic_get (SV* sv, MAGIC* mg);
259VIRTUAL int magic_getarylen (SV* sv, MAGIC* mg);
260VIRTUAL int magic_getdefelem (SV* sv, MAGIC* mg);
261VIRTUAL int magic_getglob (SV* sv, MAGIC* mg);
262VIRTUAL int magic_getnkeys (SV* sv, MAGIC* mg);
263VIRTUAL int magic_getpack (SV* sv, MAGIC* mg);
264VIRTUAL int magic_getpos (SV* sv, MAGIC* mg);
265VIRTUAL int magic_getsig (SV* sv, MAGIC* mg);
266VIRTUAL int magic_getsubstr (SV* sv, MAGIC* mg);
267VIRTUAL int magic_gettaint (SV* sv, MAGIC* mg);
268VIRTUAL int magic_getuvar (SV* sv, MAGIC* mg);
269VIRTUAL int magic_getvec (SV* sv, MAGIC* mg);
270VIRTUAL U32 magic_len (SV* sv, MAGIC* mg);
f93b4edd 271#ifdef USE_THREADS
20ce7b12 272VIRTUAL int magic_mutexfree (SV* sv, MAGIC* mg);
f93b4edd 273#endif /* USE_THREADS */
274VIRTUAL int magic_nextpack (SV* sv, MAGIC* mg, SV* key);
275VIRTUAL U32 magic_regdata_cnt (SV* sv, MAGIC* mg);
276VIRTUAL int magic_regdatum_get (SV* sv, MAGIC* mg);
277VIRTUAL int magic_set (SV* sv, MAGIC* mg);
278VIRTUAL int magic_setamagic (SV* sv, MAGIC* mg);
279VIRTUAL int magic_setarylen (SV* sv, MAGIC* mg);
280VIRTUAL int magic_setbm (SV* sv, MAGIC* mg);
281VIRTUAL int magic_setdbline (SV* sv, MAGIC* mg);
44a8e56a 282#ifdef USE_LOCALE_COLLATE
283VIRTUAL int magic_setcollxfrm (SV* sv, MAGIC* mg);
285VIRTUAL int magic_setdefelem (SV* sv, MAGIC* mg);
286VIRTUAL int magic_setenv (SV* sv, MAGIC* mg);
287VIRTUAL int magic_setfm (SV* sv, MAGIC* mg);
288VIRTUAL int magic_setisa (SV* sv, MAGIC* mg);
289VIRTUAL int magic_setglob (SV* sv, MAGIC* mg);
290VIRTUAL int magic_setmglob (SV* sv, MAGIC* mg);
291VIRTUAL int magic_setnkeys (SV* sv, MAGIC* mg);
292VIRTUAL int magic_setpack (SV* sv, MAGIC* mg);
293VIRTUAL int magic_setpos (SV* sv, MAGIC* mg);
294VIRTUAL int magic_setsig (SV* sv, MAGIC* mg);
295VIRTUAL int magic_setsubstr (SV* sv, MAGIC* mg);
296VIRTUAL int magic_settaint (SV* sv, MAGIC* mg);
297VIRTUAL int magic_setuvar (SV* sv, MAGIC* mg);
298VIRTUAL int magic_setvec (SV* sv, MAGIC* mg);
299VIRTUAL int magic_set_all_env (SV* sv, MAGIC* mg);
300VIRTUAL U32 magic_sizepack (SV* sv, MAGIC* mg);
301VIRTUAL int magic_wipepack (SV* sv, MAGIC* mg);
302VIRTUAL void magicname (char* sym, char* name, I32 namlen);
303int main (int argc, char** argv, char** env);
066ef5b5 304#ifdef MYMALLOC
20ce7b12 305VIRTUAL MEM_SIZE malloced_size (void *p);
066ef5b5 306#endif
20ce7b12 307VIRTUAL void markstack_grow (void);
5f05dabc 308#ifdef USE_LOCALE_COLLATE
309VIRTUAL char* mem_collxfrm (const char* s, STRLEN len, STRLEN* xlen);
311VIRTUAL SV* mess (const char* pat, va_list* args);
312VIRTUAL int mg_clear (SV* sv);
313VIRTUAL int mg_copy (SV* sv, SV* nsv, const char* key, I32 klen);
314VIRTUAL MAGIC* mg_find (SV* sv, int type);
315VIRTUAL int mg_free (SV* sv);
316VIRTUAL int mg_get (SV* sv);
317VIRTUAL U32 mg_length (SV* sv);
318VIRTUAL void mg_magical (SV* sv);
319VIRTUAL int mg_set (SV* sv);
320VIRTUAL I32 mg_size (SV* sv);
321VIRTUAL OP* mod (OP* o, I32 type);
322VIRTUAL char* moreswitches (char* s);
323VIRTUAL OP* my (OP* o);
5f05dabc 324#if !defined(HAS_BCOPY) || !defined(HAS_SAFE_BCOPY)
20ce7b12 325VIRTUAL char* my_bcopy (const char* from, char* to, I32 len);
5f05dabc 326#endif
a0d0e21e 327#if !defined(HAS_BZERO) && !defined(HAS_MEMSET)
fdf13494 328VIRTUAL char* my_bzero (char* loc, I32 len);
85e6fe83 329#endif
330VIRTUAL void my_exit (U32 status) __attribute__((noreturn));
331VIRTUAL void my_failure_exit (void) __attribute__((noreturn));
332VIRTUAL I32 my_fflush_all (void);
333VIRTUAL I32 my_lstat (ARGSproto);
5f05dabc 334#if !defined(HAS_MEMCMP) || !defined(HAS_SANE_MEMCMP)
20ce7b12 335VIRTUAL I32 my_memcmp (const char* s1, const char* s2, I32 len);
a0d0e21e 336#endif
fc36a67e 337#if !defined(HAS_MEMSET)
20ce7b12 338VIRTUAL void* my_memset (char* loc, I32 ch, I32 len);
fc36a67e 339#endif
76e3520e 340#ifndef PERL_OBJECT
341VIRTUAL I32 my_pclose (PerlIO* ptr);
342VIRTUAL PerlIO* my_popen (char* cmd, char* mode);
76e3520e 343#endif
344VIRTUAL void my_setenv (char* nam, char* val);
345VIRTUAL I32 my_stat (ARGSproto);
a0d0e21e 346#ifdef MYSWAP
347VIRTUAL short my_swap (short s);
348VIRTUAL long my_htonl (long l);
349VIRTUAL long my_ntohl (long l);
351VIRTUAL void my_unexec (void);
354VIRTUAL OP* newANONSUB (I32 floor, OP* proto, OP* block);
355VIRTUAL OP* newASSIGNOP (I32 flags, OP* left, I32 optype, OP* right);
356VIRTUAL OP* newCONDOP (I32 flags, OP* expr, OP* trueop, OP* falseop);
357VIRTUAL void newCONSTSUB (HV* stash, char* name, SV* sv);
358VIRTUAL void newFORM (I32 floor, OP* o, OP* block);
359VIRTUAL OP* newFOROP (I32 flags, char* label, line_t forline, OP* sclr, OP* expr, OP*block, OP*cont);
360VIRTUAL OP* newLOGOP (I32 optype, I32 flags, OP* left, OP* right);
361VIRTUAL OP* newLOOPEX (I32 type, OP* label);
362VIRTUAL OP* newLOOPOP (I32 flags, I32 debuggable, OP* expr, OP* block);
363VIRTUAL OP* newNULLLIST (void);
364VIRTUAL OP* newOP (I32 optype, I32 flags);
365VIRTUAL void newPROG (OP* o);
366VIRTUAL OP* newRANGE (I32 flags, OP* left, OP* right);
367VIRTUAL OP* newSLICEOP (I32 flags, OP* subscript, OP* listop);
368VIRTUAL OP* newSTATEOP (I32 flags, char* label, OP* o);
369VIRTUAL CV* newSUB (I32 floor, OP* o, OP* proto, OP* block);
370VIRTUAL CV* newXS (char* name, void (*subaddr)(CV* cv _CPERLproto), char* filename);
371VIRTUAL AV* newAV (void);
372VIRTUAL OP* newAVREF (OP* o);
373VIRTUAL OP* newBINOP (I32 type, I32 flags, OP* first, OP* last);
374VIRTUAL OP* newCVREF (I32 flags, OP* o);
375VIRTUAL OP* newGVOP (I32 type, I32 flags, GV* gv);
376VIRTUAL GV* newGVgen (char* pack);
377VIRTUAL OP* newGVREF (I32 type, OP* o);
378VIRTUAL OP* newHVREF (OP* o);
379VIRTUAL HV* newHV (void);
380VIRTUAL HV* newHVhv (HV* hv);
381VIRTUAL IO* newIO (void);
382VIRTUAL OP* newLISTOP (I32 type, I32 flags, OP* first, OP* last);
383VIRTUAL OP* newPMOP (I32 type, I32 flags);
384VIRTUAL OP* newPVOP (I32 type, I32 flags, char* pv);
385VIRTUAL SV* newRV (SV* pref);
386VIRTUAL SV* newRV_noinc (SV *sv);
387VIRTUAL SV* newSV (STRLEN len);
388VIRTUAL OP* newSVREF (OP* o);
389VIRTUAL OP* newSVOP (I32 type, I32 flags, SV* sv);
390VIRTUAL SV* newSViv (IV i);
391VIRTUAL SV* newSVnv (double n);
392VIRTUAL SV* newSVpv (const char* s, STRLEN len);
393VIRTUAL SV* newSVpvn (const char *s, STRLEN len);
394VIRTUAL SV* newSVpvf (const char* pat, ...);
395VIRTUAL SV* newSVrv (SV* rv, const char* classname);
396VIRTUAL SV* newSVsv (SV* old);
397VIRTUAL OP* newUNOP (I32 type, I32 flags, OP* first);
398VIRTUAL OP* newWHILEOP (I32 flags, I32 debuggable, LOOP* loop,
399 I32 whileline, OP* expr, OP* block, OP* cont);
aeea060c 400#ifdef USE_THREADS
401VIRTUAL struct perl_thread * new_struct_thread (struct perl_thread *t);
403VIRTUAL PERL_SI * new_stackinfo (I32 stitems, I32 cxitems);
404VIRTUAL PerlIO* nextargv (GV* gv);
405VIRTUAL char* ninstr (const char* big, const char* bigend, const char* little, const char* lend);
406VIRTUAL OP* oopsCV (OP* o);
407VIRTUAL void op_free (OP* arg);
408VIRTUAL void package (OP* o);
409VIRTUAL PADOFFSET pad_alloc (I32 optype, U32 tmptype);
410VIRTUAL PADOFFSET pad_allocmy (char* name);
411VIRTUAL PADOFFSET pad_findmy (char* name);
412VIRTUAL OP* oopsAV (OP* o);
413VIRTUAL OP* oopsHV (OP* o);
414VIRTUAL void pad_leavemy (I32 fill);
415VIRTUAL SV* pad_sv (PADOFFSET po);
416VIRTUAL void pad_free (PADOFFSET po);
417VIRTUAL void pad_reset (void);
418VIRTUAL void pad_swipe (PADOFFSET po);
419VIRTUAL void peep (OP* o);
76e3520e 420#ifndef PERL_OBJECT
20ce7b12 421PerlInterpreter* perl_alloc (void);
76e3520e 422#endif
873ef191 423#ifdef PERL_OBJECT
20ce7b12 424VIRTUAL void perl_atexit (void(*fn)(CPerlObj *, void *), void* ptr);
873ef191 425#else
20ce7b12 426void perl_atexit (void(*fn)(void *), void*);
873ef191 427#endif
428VIRTUAL I32 perl_call_argv (const char* sub_name, I32 flags, char** argv);
429VIRTUAL I32 perl_call_method (const char* methname, I32 flags);
430VIRTUAL I32 perl_call_pv (const char* sub_name, I32 flags);
431VIRTUAL I32 perl_call_sv (SV* sv, I32 flags);
76e3520e 432#ifdef PERL_OBJECT
433VIRTUAL void perl_construct (void);
434VIRTUAL void perl_destruct (void);
76e3520e 435#else
436void perl_construct (PerlInterpreter* sv_interp);
437void perl_destruct (PerlInterpreter* sv_interp);
76e3520e 438#endif
439VIRTUAL SV* perl_eval_pv (const char* p, I32 croak_on_error);
440VIRTUAL I32 perl_eval_sv (SV* sv, I32 flags);
76e3520e 441#ifdef PERL_OBJECT
20ce7b12 442VIRTUAL void perl_free (void);
76e3520e 443#else
444void perl_free (PerlInterpreter* sv_interp);
446VIRTUAL SV* perl_get_sv (const char* name, I32 create);
447VIRTUAL AV* perl_get_av (const char* name, I32 create);
448VIRTUAL HV* perl_get_hv (const char* name, I32 create);
449VIRTUAL CV* perl_get_cv (const char* name, I32 create);
450VIRTUAL int perl_init_i18nl10n (int printwarn);
451VIRTUAL int perl_init_i18nl14n (int printwarn);
452VIRTUAL void perl_new_collate (const char* newcoll);
453VIRTUAL void perl_new_ctype (const char* newctype);
454VIRTUAL void perl_new_numeric (const char* newcoll);
455VIRTUAL void perl_set_numeric_local (void);
456VIRTUAL void perl_set_numeric_standard (void);
76e3520e 457#ifdef PERL_OBJECT
20ce7b12 458VIRTUAL int perl_parse (void(*xsinit)(CPerlObj*), int argc, char** argv, char** env);
76e3520e 459#else
20ce7b12 460int perl_parse (PerlInterpreter* sv_interp, void(*xsinit)(void), int argc, char** argv, char** env);
76e3520e 461#endif
20ce7b12 462VIRTUAL void perl_require_pv (const char* pv);
4633a7c4 463#define perl_requirepv perl_require_pv
76e3520e 464#ifdef PERL_OBJECT
20ce7b12 465VIRTUAL int perl_run (void);
76e3520e 466#else
467int perl_run (PerlInterpreter* sv_interp);
469VIRTUAL void pidgone (int pid, int status);
470VIRTUAL void pmflag (U16* pmfl, int ch);
471VIRTUAL OP* pmruntime (OP* pm, OP* expr, OP* repl);
472VIRTUAL OP* pmtrans (OP* o, OP* expr, OP* repl);
473VIRTUAL OP* pop_return (void);
474VIRTUAL void pop_scope (void);
475VIRTUAL OP* prepend_elem (I32 optype, OP* head, OP* tail);
476VIRTUAL void push_return (OP* o);
477VIRTUAL void push_scope (void);
478VIRTUAL OP* ref (OP* o, I32 type);
479VIRTUAL OP* refkids (OP* o, I32 type);
480VIRTUAL void regdump (regexp* r);
481VIRTUAL I32 pregexec (regexp* prog, char* stringarg, char* strend, char* strbeg, I32 minend, SV* screamer, U32 nosave);
482VIRTUAL void pregfree (struct regexp* r);
483VIRTUAL regexp* pregcomp (char* exp, char* xend, PMOP* pm);
484VIRTUAL I32 regexec_flags (regexp* prog, char* stringarg, char* strend,
f34e5ce4 485 char* strbeg, I32 minend, SV* screamer,
486 void* data, U32 flags);
487VIRTUAL regnode* regnext (regnode* p);
488VIRTUAL void regprop (SV* sv, regnode* o);
489VIRTUAL void repeatcpy (char* to, const char* from, I32 len, I32 count);
490VIRTUAL char* rninstr (const char* big, const char* bigend, const char* little, const char* lend);
491VIRTUAL Sighandler_t rsignal (int i, Sighandler_t t);
492VIRTUAL int rsignal_restore (int i, Sigsave_t* t);
493VIRTUAL int rsignal_save (int i, Sighandler_t t1, Sigsave_t* t2);
494VIRTUAL Sighandler_t rsignal_state (int i);
495VIRTUAL void rxres_free (void** rsp);
496VIRTUAL void rxres_restore (void** rsp, REGEXP* prx);
497VIRTUAL void rxres_save (void** rsp, REGEXP* prx);
a0d0e21e 498#ifndef HAS_RENAME
499VIRTUAL I32 same_dirent (char* a, char* b);
501VIRTUAL char* savepv (const char* sv);
502VIRTUAL char* savepvn (const char* sv, I32 len);
503VIRTUAL void savestack_grow (void);
504VIRTUAL void save_aelem (AV* av, I32 idx, SV **sptr);
505VIRTUAL I32 save_alloc (I32 size, I32 pad);
506VIRTUAL void save_aptr (AV** aptr);
507VIRTUAL AV* save_ary (GV* gv);
508VIRTUAL void save_clearsv (SV** svp);
509VIRTUAL void save_delete (HV* hv, char* key, I32 klen);
a0d0e21e 510#ifndef titan /* TitanOS cc can't handle this */
76e3520e 511#ifdef PERL_OBJECT
512typedef void (CPerlObj::*DESTRUCTORFUNC) (void*);
513VIRTUAL void save_destructor (DESTRUCTORFUNC f, void* p);
76e3520e 514#else
20ce7b12 515void save_destructor (void (*f)(void*), void* p);
76e3520e 516#endif
a0d0e21e 517#endif /* titan */
518VIRTUAL void save_freesv (SV* sv);
519VIRTUAL void save_freeop (OP* o);
520VIRTUAL void save_freepv (char* pv);
521VIRTUAL void save_generic_svref (SV** sptr);
522VIRTUAL void save_gp (GV* gv, I32 empty);
523VIRTUAL HV* save_hash (GV* gv);
524VIRTUAL void save_helem (HV* hv, SV *key, SV **sptr);
525VIRTUAL void save_hints (void);
526VIRTUAL void save_hptr (HV** hptr);
527VIRTUAL void save_I16 (I16* intp);
528VIRTUAL void save_I32 (I32* intp);
529VIRTUAL void save_int (int* intp);
530VIRTUAL void save_item (SV* item);
531VIRTUAL void save_iv (IV* iv);
532VIRTUAL void save_list (SV** sarg, I32 maxsarg);
533VIRTUAL void save_long (long* longp);
534VIRTUAL void save_nogv (GV* gv);
535VIRTUAL void save_op (void);
536VIRTUAL SV* save_scalar (GV* gv);
537VIRTUAL void save_pptr (char** pptr);
538VIRTUAL void save_re_context (void);
539VIRTUAL void save_sptr (SV** sptr);
540VIRTUAL SV* save_svref (SV** sptr);
541VIRTUAL SV** save_threadsv (PADOFFSET i);
542VIRTUAL OP* sawparens (OP* o);
543VIRTUAL OP* scalar (OP* o);
544VIRTUAL OP* scalarkids (OP* o);
545VIRTUAL OP* scalarseq (OP* o);
546VIRTUAL OP* scalarvoid (OP* o);
547VIRTUAL UV scan_bin (char* start, I32 len, I32* retlen);
548VIRTUAL UV scan_hex (char* start, I32 len, I32* retlen);
549VIRTUAL char* scan_num (char* s);
550VIRTUAL UV scan_oct (char* start, I32 len, I32* retlen);
551VIRTUAL OP* scope (OP* o);
552VIRTUAL char* screaminstr (SV* bigsv, SV* littlesv, I32 start_shift, I32 end_shift, I32 *state, I32 last);
a0d0e21e 553#ifndef VMS
554VIRTUAL I32 setenv_getix (char* nam);
556VIRTUAL void setdefout (GV* gv);
557VIRTUAL char* sharepvn (const char* sv, I32 len, U32 hash);
558VIRTUAL HEK* share_hek (const char* sv, I32 len, U32 hash);
559VIRTUAL Signal_t sighandler (int sig);
560VIRTUAL SV** stack_grow (SV** sp, SV**p, int n);
561VIRTUAL I32 start_subparse (I32 is_format, U32 flags);
562VIRTUAL void sub_crush_depth (CV* cv);
563VIRTUAL bool sv_2bool (SV* sv);
564VIRTUAL CV* sv_2cv (SV* sv, HV** st, GV** gvp, I32 lref);
565VIRTUAL IO* sv_2io (SV* sv);
566VIRTUAL IV sv_2iv (SV* sv);
567VIRTUAL SV* sv_2mortal (SV* sv);
568VIRTUAL double sv_2nv (SV* sv);
569VIRTUAL char* sv_2pv (SV* sv, STRLEN* lp);
570VIRTUAL UV sv_2uv (SV* sv);
571VIRTUAL IV sv_iv (SV* sv);
572VIRTUAL UV sv_uv (SV* sv);
573VIRTUAL double sv_nv (SV* sv);
574VIRTUAL char * sv_pvn (SV *sv, STRLEN *len);
575VIRTUAL I32 sv_true (SV *sv);
576VIRTUAL void sv_add_arena (char* ptr, U32 size, U32 flags);
577VIRTUAL int sv_backoff (SV* sv);
578VIRTUAL SV* sv_bless (SV* sv, HV* stash);
579VIRTUAL void sv_catpvf (SV* sv, const char* pat, ...);
580VIRTUAL void sv_catpv (SV* sv, const char* ptr);
581VIRTUAL void sv_catpvn (SV* sv, const char* ptr, STRLEN len);
582VIRTUAL void sv_catsv (SV* dsv, SV* ssv);
583VIRTUAL void sv_chop (SV* sv, char* ptr);
584VIRTUAL void sv_clean_all (void);
585VIRTUAL void sv_clean_objs (void);
586VIRTUAL void sv_clear (SV* sv);
587VIRTUAL I32 sv_cmp (SV* sv1, SV* sv2);
588VIRTUAL I32 sv_cmp_locale (SV* sv1, SV* sv2);
5f05dabc 589#ifdef USE_LOCALE_COLLATE
590VIRTUAL char* sv_collxfrm (SV* sv, STRLEN* nxp);
592VIRTUAL OP* sv_compile_2op (SV* sv, OP** startp, char* code, AV** avp);
593VIRTUAL void sv_dec (SV* sv);
594VIRTUAL void sv_dump (SV* sv);
595VIRTUAL bool sv_derived_from (SV* sv, const char* name);
596VIRTUAL I32 sv_eq (SV* sv1, SV* sv2);
597VIRTUAL void sv_free (SV* sv);
598VIRTUAL void sv_free_arenas (void);
599VIRTUAL char* sv_gets (SV* sv, PerlIO* fp, I32 append);
600VIRTUAL char* sv_grow (SV* sv, STRLEN newlen);
601VIRTUAL void sv_inc (SV* sv);
602VIRTUAL void sv_insert (SV* bigsv, STRLEN offset, STRLEN len, char* little, STRLEN littlelen);
603VIRTUAL int sv_isa (SV* sv, const char* name);
604VIRTUAL int sv_isobject (SV* sv);
605VIRTUAL STRLEN sv_len (SV* sv);
606VIRTUAL STRLEN sv_len_utf8 (SV* sv);
607VIRTUAL void sv_magic (SV* sv, SV* obj, int how, const char* name, I32 namlen);
608VIRTUAL SV* sv_mortalcopy (SV* oldsv);
609VIRTUAL SV* sv_newmortal (void);
610VIRTUAL SV* sv_newref (SV* sv);
611VIRTUAL char* sv_peek (SV* sv);
612VIRTUAL void sv_pos_u2b (SV* sv, I32* offsetp, I32* lenp);
613VIRTUAL void sv_pos_b2u (SV* sv, I32* offsetp);
614VIRTUAL char* sv_pvn_force (SV* sv, STRLEN* lp);
615VIRTUAL char* sv_reftype (SV* sv, int ob);
616VIRTUAL void sv_replace (SV* sv, SV* nsv);
617VIRTUAL void sv_report_used (void);
618VIRTUAL void sv_reset (char* s, HV* stash);
619VIRTUAL void sv_setpvf (SV* sv, const char* pat, ...);
620VIRTUAL void sv_setiv (SV* sv, IV num);
621VIRTUAL void sv_setpviv (SV* sv, IV num);
622VIRTUAL void sv_setuv (SV* sv, UV num);
623VIRTUAL void sv_setnv (SV* sv, double num);
624VIRTUAL SV* sv_setref_iv (SV* rv, const char* classname, IV iv);
625VIRTUAL SV* sv_setref_nv (SV* rv, const char* classname, double nv);
626VIRTUAL SV* sv_setref_pv (SV* rv, const char* classname, void* pv);
627VIRTUAL SV* sv_setref_pvn (SV* rv, const char* classname, char* pv, STRLEN n);
628VIRTUAL void sv_setpv (SV* sv, const char* ptr);
629VIRTUAL void sv_setpvn (SV* sv, const char* ptr, STRLEN len);
630VIRTUAL void sv_setsv (SV* dsv, SV* ssv);
631VIRTUAL void sv_taint (SV* sv);
632VIRTUAL bool sv_tainted (SV* sv);
633VIRTUAL int sv_unmagic (SV* sv, int type);
634VIRTUAL void sv_unref (SV* sv);
635VIRTUAL void sv_untaint (SV* sv);
636VIRTUAL bool sv_upgrade (SV* sv, U32 mt);
637VIRTUAL void sv_usepvn (SV* sv, char* ptr, STRLEN len);
638VIRTUAL void sv_vcatpvfn (SV* sv, const char* pat, STRLEN patlen,
46fc3d4c 639 va_list* args, SV** svargs, I32 svmax,
640 bool *used_locale);
641VIRTUAL void sv_vsetpvfn (SV* sv, const char* pat, STRLEN patlen,
46fc3d4c 642 va_list* args, SV** svargs, I32 svmax,
643 bool *used_locale);
644VIRTUAL SV* swash_init (char* pkg, char* name, SV* listsv, I32 minbits, I32 none);
645VIRTUAL UV swash_fetch (SV *sv, U8 *ptr);
646VIRTUAL void taint_env (void);
647VIRTUAL void taint_proper (const char* f, char* s);
648VIRTUAL UV to_utf8_lower (U8 *p);
649VIRTUAL UV to_utf8_upper (U8 *p);
650VIRTUAL UV to_utf8_title (U8 *p);
16d20bd9 651#ifdef UNLINK_ALL_VERSIONS
20ce7b12 652VIRTUAL I32 unlnk (char* f);
16d20bd9 653#endif
77a005ab 654#ifdef USE_THREADS
655VIRTUAL void unlock_condpair (void* svv);
657VIRTUAL void unsharepvn (const char* sv, I32 len, U32 hash);
658VIRTUAL void unshare_hek (HEK* hek);
659VIRTUAL void utilize (int aver, I32 floor, OP* version, OP* id, OP* arg);
660VIRTUAL U8* utf16_to_utf8 (U16* p, U8 *d, I32 bytelen);
661VIRTUAL U8* utf16_to_utf8_reversed (U16* p, U8 *d, I32 bytelen);
662VIRTUAL I32 utf8_distance (U8 *a, U8 *b);
663VIRTUAL U8* utf8_hop (U8 *s, I32 off);
664VIRTUAL UV utf8_to_uv (U8 *s, I32* retlen);
665VIRTUAL U8* uv_to_utf8 (U8 *d, UV uv);
666VIRTUAL void vivify_defelem (SV* sv);
667VIRTUAL void vivify_ref (SV* sv, U32 to_what);
668VIRTUAL I32 wait4pid (int pid, int* statusp, int flags);
669VIRTUAL void warn (const char* pat,...);
670VIRTUAL void warner (U32 err, const char* pat,...);
671VIRTUAL void watch (char** addr);
672VIRTUAL I32 whichsig (char* sig);
673VIRTUAL int yyerror (char* s);
a1a0e61e 674#ifdef USE_PURE_BISON
70931121 675# define PERL_YYLEX_PARAM_DECL YYSTYPE *lvalp, int *lcharp
a1a0e61e 676#else
22c35a8c 677# define PERL_YYLEX_PARAM_DECL void
a1a0e61e 678#endif
680VIRTUAL int yyparse (void);
681VIRTUAL int yywarn (char* s);
0824fdcb 682
683VIRTUAL Malloc_t safesysmalloc (MEM_SIZE nbytes);
684VIRTUAL Malloc_t safesyscalloc (MEM_SIZE elements, MEM_SIZE size);
685VIRTUAL Malloc_t safesysrealloc (Malloc_t where, MEM_SIZE nbytes);
686VIRTUAL Free_t safesysfree (Malloc_t where);
0824fdcb 687
55497cff 688#ifdef LEAKTEST
689VIRTUAL Malloc_t safexmalloc (I32 x, MEM_SIZE size);
690VIRTUAL Malloc_t safexcalloc (I32 x, MEM_SIZE elements, MEM_SIZE size);
691VIRTUAL Malloc_t safexrealloc (Malloc_t where, MEM_SIZE size);
692VIRTUAL void safexfree (Malloc_t where);
55497cff 693#endif
20ce7b12 696VIRTUAL struct perl_vars *Perl_GetVars (void);
699#ifdef PERL_OBJECT
701void hsplit (HV *hv);
702void hfreeentries (HV *hv);
703void more_he (void);
704HE* new_he (void);
705void del_he (HE *p);
706HEK *save_hek (const char *str, I32 len, U32 hash);
707SV *mess_alloc (void);
708void gv_init_sv (GV *gv, I32 sv_type);
709SV *save_scalar_at (SV **sptr);
710IV asIV (SV* sv);
711UV asUV (SV* sv);
712SV *more_sv (void);
713void more_xiv (void);
714void more_xnv (void);
715void more_xpv (void);
716void more_xrv (void);
717XPVIV *new_xiv (void);
718XPVNV *new_xnv (void);
719XPV *new_xpv (void);
720XRV *new_xrv (void);
721void del_xiv (XPVIV* p);
722void del_xnv (XPVNV* p);
723void del_xpv (XPV* p);
724void del_xrv (XRV* p);
725void sv_unglob (SV* sv);
726I32 avhv_index_sv (SV* sv);
9d8a25dc 727
728void do_report_used (SV *sv);
729void do_clean_objs (SV *sv);
730void do_clean_named_objs (SV *sv);
731void do_clean_all (SV *sv);
732void not_a_number (SV *sv);
733void* my_safemalloc (MEM_SIZE size);
76e3520e 734
735typedef void (CPerlObj::*SVFUNC) (SV*);
736void visit (SVFUNC f);
76e3520e 737
738typedef I32 (CPerlObj::*SVCOMPARE) (SV*, SV*);
739void qsortsv (SV ** array, size_t num_elts, SVCOMPARE f);
740I32 sortcv (SV *a, SV *b);
741void save_magic (I32 mgs_ix, SV *sv);
742int magic_methpack (SV *sv, MAGIC *mg, char *meth);
743int magic_methcall (SV *sv, MAGIC *mg, char *meth, I32 f, int n, SV *val);
744int magic_methcall (MAGIC *mg, char *meth, I32 flags, int n, SV *val);
745OP * doform (CV *cv, GV *gv, OP *retop);
746void doencodes (SV* sv, char* s, I32 len);
747SV* refto (SV* sv);
748U32 seed (void);
749OP *docatch (OP *o);
750void *docatch_body (va_list args);
751void *perl_parse_body (va_list args);
752void *perl_run_body (va_list args);
753void *perl_call_body (va_list args);
754void perl_call_xbody (OP *myop, int is_eval);
755void *call_list_body (va_list args);
756OP *dofindlabel (OP *o, char *label, OP **opstack, OP **oplimit);
757void doparseform (SV *sv);
758I32 dopoptoeval (I32 startingblock);
759I32 dopoptolabel (char *label);
760I32 dopoptoloop (I32 startingblock);
761I32 dopoptosub (I32 startingblock);
762I32 dopoptosub_at (PERL_CONTEXT* cxstk, I32 startingblock);
763void free_closures (void);
764void save_lines (AV *array, SV *sv);
765OP *doeval (int gimme, OP** startop);
766PerlIO *doopen_pmc (const char *name, const char *mode);
767I32 sv_ncmp (SV *a, SV *b);
768I32 sv_i_ncmp (SV *a, SV *b);
769I32 amagic_ncmp (SV *a, SV *b);
770I32 amagic_i_ncmp (SV *a, SV *b);
771I32 amagic_cmp (SV *str1, SV *str2);
772I32 amagic_cmp_locale (SV *str1, SV *str2);
d0ecd44c 773
774SV *mul128 (SV *sv, U8 m);
775SV *is_an_int (char *s, STRLEN l);
776int div128 (SV *pnum, bool *done);
777void check_uni (void);
778void force_next (I32 type);
779char *force_version (char *start);
780char *force_word (char *start, int token, int check_keyword, int allow_pack, int allow_tick);
781SV *tokeq (SV *sv);
782char *scan_const (char *start);
783char *scan_formline (char *s);
784char *scan_heredoc (char *s);
785char *scan_ident (char *s, char *send, char *dest, STRLEN destlen, I32 ck_uni);
786char *scan_inputsymbol (char *start);
787char *scan_pat (char *start, I32 type);
788char *scan_str (char *start);
789char *scan_subst (char *start);
790char *scan_trans (char *start);
791char *scan_word (char *s, char *dest, STRLEN destlen, int allow_package, STRLEN *slp);
792char *skipspace (char *s);
793void checkcomma (char *s, char *name, char *what);
794void force_ident (char *s, int kind);
795void incline (char *s);
796int intuit_method (char *s, GV *gv);
797int intuit_more (char *s);
798I32 lop (I32 f, expectation x, char *s);
799void missingterm (char *s);
800void no_op (char *what, char *s);
801void set_csh (void);
802I32 sublex_done (void);
803I32 sublex_push (void);
804I32 sublex_start (void);
76e3520e 805#ifdef CRIPPLED_CC
20ce7b12 806int uni (I32 f, char *s);
76e3520e 807#endif
808char * filter_gets (SV *sv, PerlIO *fp, STRLEN append);
809SV *new_constant (char *s, STRLEN len, char *key, SV *sv, SV *pv, char *type);
810int ao (int toketype);
811void depcom (void);
76e3520e 812#ifdef WIN32
813I32 win32_textfilter (int idx, SV *sv, int maxlen);
815char* incl_perldb (void);
816SV *isa_lookup (HV *stash, const char *name, int len, int level);
817CV *get_db_sub (SV **svp, CV *cv);
818I32 list_assignment (OP *o);
819void bad_type (I32 n, char *t, char *name, OP *kid);
820OP *modkids (OP *o, I32 type);
821void no_bareword_allowed (OP *o);
822OP *no_fh_allowed (OP *o);
823OP *scalarboolean (OP *o);
824OP *too_few_arguments (OP *o, char* name);
825OP *too_many_arguments (OP *o, char* name);
826void null (OP* o);
827PADOFFSET pad_findlex (char* name, PADOFFSET newoff, U32 seq, CV* startcv, I32 cx_ix, I32 saweval, U32 flags);
828OP *newDEFSVOP (void);
829char* gv_ename (GV *gv);
830CV *cv_clone2 (CV *proto, CV *outside);
22239a37 831
832void find_beginning (void);
833void forbid_setid (char *);
834void incpush (char *, int);
835void init_interp (void);
836void init_ids (void);
837void init_debugger (void);
838void init_lexer (void);
839void init_main_stash (void);
76e3520e 840#ifdef USE_THREADS
20ce7b12 841struct perl_thread * init_main_thread (void);
76e3520e 842#endif /* USE_THREADS */
843void init_perllib (void);
844void init_postdump_symbols (int, char **, char **);
845void init_predump_symbols (void);
846void my_exit_jump (void) __attribute__((noreturn));
847void nuke_stacks (void);
848void open_script (char *, bool, SV *, int *fd);
849void usage (char *);
850void validate_suid (char *, char*, int);
851int emulate_eaccess (const char* path, int mode);
76e3520e 852
853regnode *reg (I32, I32 *);
854regnode *reganode (U8, U32);
855regnode *regatom (I32 *);
856regnode *regbranch (I32 *, I32);
857void regc (U8, char *);
858void reguni (UV, char *, I32*);
859regnode *regclass (void);
860regnode *regclassutf8 (void);
861I32 regcurly (char *);
862regnode *reg_node (U8);
863regnode *regpiece (I32 *);
864void reginsert (U8, regnode *);
865void regoptail (regnode *, regnode *);
866void regset (char *, I32);
867void regtail (regnode *, regnode *);
868char* regwhite (char *, char *);
869char* nextchar (void);
870regnode *dumpuntil (regnode *start, regnode *node, regnode *last, SV* sv, I32 l);
871void scan_commit (scan_data_t *data);
872I32 study_chunk (regnode **scanp, I32 *deltap, regnode *last, scan_data_t *data, U32 flags);
873I32 add_data (I32 n, char *s);
874void re_croak2 (const char* pat1,const char* pat2,...) __attribute__((noreturn));
875char* regpposixcc (I32 value);
876void clear_re (void *r);
877I32 regmatch (regnode *prog);
878I32 regrepeat (regnode *p, I32 max);
879I32 regrepeat_hard (regnode *p, I32 max, I32 *lp);
880I32 regtry (regexp *prog, char *startpos);
881bool reginclass (char *p, I32 c);
882bool reginclassutf8 (regnode *f, U8* p);
883CHECKPOINT regcppush (I32 parenfloor);
884char * regcppop (void);
885char * regcp_set_to (I32 ss);
886void cache_re (regexp *prog);
887void restore_pos (void *arg);
888U8 * reghop (U8 *pos, I32 off);
889U8 * reghopmaybe (U8 *pos, I32 off);
890void dump (char *pat,...);
76e3520e 891#ifdef WIN32
20ce7b12 892int do_aspawn (void *vreally, void **vmark, void **vsp);
895#ifdef DEBUGGING
20ce7b12 896void del_sv (SV *p);
76e3520e 897#endif
20ce7b12 898void debprof (OP *o);
76e3520e 899
900OP *new_logop (I32 type, I32 flags, OP **firstp, OP **otherp);
901void simplify_sort (OP *o);
902bool is_handle_constructor (OP *o, I32 argnum);
903void sv_add_backref (SV *tsv, SV *sv);
904void sv_del_backref (SV *sv);
01f988be 905
906I32 do_trans_CC_simple (SV *sv);
907I32 do_trans_CC_count (SV *sv);
908I32 do_trans_CC_complex (SV *sv);
909I32 do_trans_UU_simple (SV *sv);
910I32 do_trans_UU_count (SV *sv);
911I32 do_trans_UU_complex (SV *sv);
912I32 do_trans_UC_simple (SV *sv);
913I32 do_trans_CU_simple (SV *sv);
914I32 do_trans_UC_trivial (SV *sv);
915I32 do_trans_CU_trivial (SV *sv);
942e002e 916
917#undef PERL_CKDEF
918#undef PERL_PPDEF
919#define PERL_CKDEF(s) OP* s (OP *o);
920#define PERL_PPDEF(s) OP* s (ARGSproto);
6f7f9b3e 921public:
9e6b2b00 922
735e0d5c 923#include "pp_proto.h"
76e3520e 924
925void unwind_handler_stack (void *p);
926void restore_magic (void *p);
927void restore_rsfp (void *f);
928void restore_expect (void *e);
929void restore_lex_expect (void *e);
fdf13494 930VIRTUAL void yydestruct (void *ptr);
20ce7b12 931VIRTUAL int fprintf (PerlIO *pf, const char *pat, ...);
932VIRTUAL int runops_standard (void);
933VIRTUAL int runops_debug (void);
935#ifdef WIN32
20ce7b12 936VIRTUAL int& ErrorNo (void);
937#endif /* WIN32 */
938#else /* !PERL_OBJECT */
22239a37 939END_EXTERN_C
940#endif /* PERL_OBJECT */
942VIRTUAL void sv_catpvf_mg (SV *sv, const char* pat, ...);
943VIRTUAL void sv_catpv_mg (SV *sv, const char *ptr);
944VIRTUAL void sv_catpvn_mg (SV *sv, const char *ptr, STRLEN len);
945VIRTUAL void sv_catsv_mg (SV *dstr, SV *sstr);
946VIRTUAL void sv_setpvf_mg (SV *sv, const char* pat, ...);
947VIRTUAL void sv_setiv_mg (SV *sv, IV i);
948VIRTUAL void sv_setpviv_mg (SV *sv, IV iv);
949VIRTUAL void sv_setuv_mg (SV *sv, UV u);
950VIRTUAL void sv_setnv_mg (SV *sv, double num);
951VIRTUAL void sv_setpv_mg (SV *sv, const char *ptr);
952VIRTUAL void sv_setpvn_mg (SV *sv, const char *ptr, STRLEN len);
953VIRTUAL void sv_setsv_mg (SV *dstr, SV *sstr);
954VIRTUAL void sv_usepvn_mg (SV *sv, char *ptr, STRLEN len);
d0c1b099 955
20ce7b12 956VIRTUAL MGVTBL* get_vtbl (int vtbl_id);
dc9e4912 957
958/* New virtual functions must be added here to maintain binary
959 * compatablity with PERL_OBJECT
960 */
962VIRTUAL char* pv_display (SV *sv, char *pv, STRLEN cur, STRLEN len, STRLEN pvlim);
963VIRTUAL void dump_indent (I32 level, PerlIO *file, const char* pat, ...);
3967c732 964
965VIRTUAL void do_gv_dump (I32 level, PerlIO *file, char *name, GV *sv);
966VIRTUAL void do_gvgv_dump (I32 level, PerlIO *file, char *name, GV *sv);
967VIRTUAL void do_hv_dump (I32 level, PerlIO *file, char *name, HV *sv);
968VIRTUAL void do_magic_dump (I32 level, PerlIO *file, MAGIC *mg, I32 nest, I32 maxnest, bool dumpops, STRLEN pvlim);
969VIRTUAL void do_op_dump (I32 level, PerlIO *file, OP *o);
970VIRTUAL void do_pmop_dump (I32 level, PerlIO *file, PMOP *pm);
971VIRTUAL void do_sv_dump (I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bool dumpops, STRLEN pvlim);
972VIRTUAL void magic_dump (MAGIC *mg);
973VIRTUAL void* default_protect (int *excpt, protect_body_t body, ...);
974VIRTUAL void reginitcolors (void);
975VIRTUAL char* sv_2pv_nolen (SV* sv);
976VIRTUAL char* sv_pv (SV *sv);
977VIRTUAL void sv_force_normal (SV *sv);
978VIRTUAL void tmps_grow (I32 n);
979VIRTUAL void *bset_obj_store (void *obj, I32 ix);
677b06e3 980
981VIRTUAL SV* sv_rvweaken (SV *sv);
982VIRTUAL int magic_killbackrefs (SV *sv, MAGIC *mg);