This is my patch patch.0a for perl5.000.
[p5sagit/p5-mst-13.2.git] / proto.h
CommitLineData
a0d0e21e 1#ifndef GNUC_ATTRIBUTE_CHECK /* disable GNUC attribute checking if not GNUC */
2#ifdef __attribute__ /* Avoid possible redefinition errors */
3#undef __attribute__
4#endif
5#define __attribute__(attr)
6#endif
7#ifdef OVERLOAD
8SV* amagic_call _((SV* left,SV* right,int method,int dir));
9#endif /* OVERLOAD */
10OP* append_elem _((I32 optype, OP* head, OP* tail));
11OP* append_list _((I32 optype, LISTOP* first, LISTOP* last));
12I32 apply _((I32 type, SV** mark, SV** sp));
13void assertref _((OP* op));
14void av_clear _((AV* ar));
15void av_extend _((AV* ar, I32 key));
16AV* av_fake _((I32 size, SV** svp));
17SV** av_fetch _((AV* ar, I32 key, I32 lval));
18void av_fill _((AV* ar, I32 fill));
19I32 av_len _((AV* ar));
20AV* av_make _((I32 size, SV** svp));
21SV* av_pop _((AV* ar));
22void av_push _((AV* ar, SV* val));
23SV* av_shift _((AV* ar));
24SV** av_store _((AV* ar, I32 key, SV* val));
25void av_undef _((AV* ar));
26void av_unshift _((AV* ar, I32 num));
27OP* bind_match _((I32 type, OP* left, OP* pat));
28OP* block_end _((int line, int floor, OP* seq));
29int block_start _((void));
30void calllist _((AV* list));
31I32 cando _((I32 bit, I32 effective, struct stat* statbufp));
32#ifndef CASTNEGFLOAT
33U32 cast_ulong _((double f));
34#endif
35#if !defined(HAS_TRUNCATE) && !defined(HAS_CHSIZE) && defined(F_FREESP)
36I32 chsize _((int fd, Off_t length));
37#endif
38OP * ck_gvconst _((OP * o));
39OP * ck_retarget _((OP *op));
40OP* convert _((I32 optype, I32 flags, OP* op));
41char* cpytill _((char* to, char* from, char* fromend, int delim, I32* retlen));
42void croak _((char* pat,...)) __attribute__((format(printf,1,2),noreturn));
43void cv_undef _((CV* cv));
44#ifdef DEBUGGING
45void cx_dump _((CONTEXT* cs));
46#endif
47void cryptswitch_add _((cryptswitch_t funcp));
48I32 cxinc _((void));
49void deb _((char* pat,...)) __attribute__((format(printf,1,2)));
50void deb_growlevel _((void));
51I32 debop _((OP* op));
52I32 debstackptrs _((void));
53#ifdef DEBUGGING
54void debprofdump _((void));
55#endif
56I32 debstack _((void));
57void deprecate _((char* s));
58OP* die _((char* pat,...)) __attribute__((format(printf,1,2)));
59OP* die_where _((char* message));
60void dounwind _((I32 cxix));
61bool do_aexec _((SV* really, SV** mark, SV** sp));
62void do_chop _((SV* asv, SV* sv));
63bool do_close _((GV* gv, bool explicit));
64bool do_eof _((GV* gv));
65bool do_exec _((char* cmd));
66void do_execfree _((void));
67#if defined(HAS_MSG) || defined(HAS_SEM) || defined(HAS_SHM)
68I32 do_ipcctl _((I32 optype, SV** mark, SV** sp));
69I32 do_ipcget _((I32 optype, SV** mark, SV** sp));
70#endif
71void do_join _((SV* sv, SV* del, SV** mark, SV** sp));
72OP* do_kv _((void));
73#if defined(HAS_MSG) || defined(HAS_SEM) || defined(HAS_SHM)
74I32 do_msgrcv _((SV** mark, SV** sp));
75I32 do_msgsnd _((SV** mark, SV** sp));
76#endif
77bool do_open _((GV* gv, char* name, I32 len, FILE* supplied_fp));
78void do_pipe _((SV* sv, GV* rgv, GV* wgv));
79bool do_print _((SV* sv, FILE* fp));
80OP * do_readline _((void));
81I32 do_chomp _((SV* sv));
82bool do_seek _((GV* gv, long pos, int whence));
83#if defined(HAS_MSG) || defined(HAS_SEM) || defined(HAS_SHM)
84I32 do_semop _((SV** mark, SV** sp));
85I32 do_shmio _((I32 optype, SV** mark, SV** sp));
86#endif
87void do_sprintf _((SV* sv, I32 len, SV** sarg));
88long do_tell _((GV* gv));
89I32 do_trans _((SV* sv, OP* arg));
90void do_vecset _((SV* sv));
91void do_vop _((I32 optype, SV* sv, SV* left, SV* right));
92void dump_all _((void));
93void dump_eval _((void));
94#ifdef NOTDEF /* See util.c */
95int dump_fds _((char* s));
96#endif
97void dump_form _((GV* gv));
98void dump_gv _((GV* gv));
99void dump_op _((OP* arg));
100void dump_pm _((PMOP* pm));
101void dump_packsubs _((HV* stash));
102void dump_sub _((GV* gv));
103void fbm_compile _((SV* sv, I32 iflag));
104char* fbm_instr _((unsigned char* big, unsigned char* bigend, SV* littlesv));
105OP* force_list _((OP* arg));
106OP* fold_constants _((OP * arg));
107void free_tmps _((void));
108OP* gen_constant_list _((OP* op));
109void gp_free _((GV* gv));
110GP* gp_ref _((GP* gp));
111GV* gv_AVadd _((GV* gv));
112GV* gv_HVadd _((GV* gv));
113GV* gv_IOadd _((GV* gv));
114void gv_check _((HV* stash));
115void gv_efullname _((SV* sv, GV* gv));
116GV* gv_fetchfile _((char* name));
117GV* gv_fetchmeth _((HV* stash, char* name, STRLEN len, I32 level));
118GV* gv_fetchmethod _((HV* stash, char* name));
119GV* gv_fetchpv _((char* name, I32 add, I32 sv_type));
120void gv_fullname _((SV* sv, GV* gv));
121void gv_init _((GV *gv, HV *stash, char *name, STRLEN len, int multi));
122HV* gv_stashpv _((char* name, I32 create));
123HV* gv_stashsv _((SV* sv, I32 create));
124void he_delayfree _((HE* hent));
125void he_free _((HE* hent));
126void hoistmust _((PMOP* pm));
127void hv_clear _((HV* tb));
128SV* hv_delete _((HV* tb, char* key, U32 klen));
129bool hv_exists _((HV* tb, char* key, U32 klen));
130SV** hv_fetch _((HV* tb, char* key, U32 klen, I32 lval));
131I32 hv_iterinit _((HV* tb));
132char* hv_iterkey _((HE* entry, I32* retlen));
133HE* hv_iternext _((HV* tb));
134SV * hv_iternextsv _((HV* hv, char** key, I32* retlen));
135SV* hv_iterval _((HV* tb, HE* entry));
136void hv_magic _((HV* hv, GV* gv, int how));
137SV** hv_store _((HV* tb, char* key, U32 klen, SV* val, U32 hash));
138void hv_undef _((HV* tb));
139I32 ibcmp _((U8* a, U8* b, I32 len));
140I32 ingroup _((I32 testgid, I32 effective));
141char* instr _((char* big, char* little));
142OP* invert _((OP* cmd));
143OP* jmaybe _((OP* arg));
144I32 keyword _((char* d, I32 len));
145void leave_scope _((I32 base));
146void lex_end _((void));
147void lex_start _((SV *line));
148OP* linklist _((OP* op));
149OP* list _((OP* o));
150OP* listkids _((OP* o));
151OP* localize _((OP* arg, I32 lexical));
152I32 looks_like_number _((SV* sv));
153int magic_clearenv _((SV* sv, MAGIC* mg));
154int magic_clearpack _((SV* sv, MAGIC* mg));
155int magic_existspack _((SV* sv, MAGIC* mg));
156int magic_get _((SV* sv, MAGIC* mg));
157int magic_getarylen _((SV* sv, MAGIC* mg));
158int magic_getpack _((SV* sv, MAGIC* mg));
159int magic_getglob _((SV* sv, MAGIC* mg));
160int magic_getpos _((SV* sv, MAGIC* mg));
161int magic_gettaint _((SV* sv, MAGIC* mg));
162int magic_getuvar _((SV* sv, MAGIC* mg));
163U32 magic_len _((SV* sv, MAGIC* mg));
164int magic_nextpack _((SV* sv, MAGIC* mg, SV* key));
165int magic_set _((SV* sv, MAGIC* mg));
166#ifdef OVERLOAD
167int magic_setamagic _((SV* sv, MAGIC* mg));
168#endif /* OVERLOAD */
169int magic_setarylen _((SV* sv, MAGIC* mg));
170int magic_setbm _((SV* sv, MAGIC* mg));
171int magic_setdbline _((SV* sv, MAGIC* mg));
172int magic_setenv _((SV* sv, MAGIC* mg));
173int magic_setisa _((SV* sv, MAGIC* mg));
174int magic_setglob _((SV* sv, MAGIC* mg));
175int magic_setmglob _((SV* sv, MAGIC* mg));
176int magic_setpack _((SV* sv, MAGIC* mg));
177int magic_setpos _((SV* sv, MAGIC* mg));
178int magic_setsig _((SV* sv, MAGIC* mg));
179int magic_setsubstr _((SV* sv, MAGIC* mg));
180int magic_settaint _((SV* sv, MAGIC* mg));
181int magic_setuvar _((SV* sv, MAGIC* mg));
182int magic_setvec _((SV* sv, MAGIC* mg));
183int magic_wipepack _((SV* sv, MAGIC* mg));
184void magicname _((char* sym, char* name, I32 namlen));
185int main _((int argc, char** argv, char** env));
93a17b20 186#ifndef STANDARD_C
a0d0e21e 187Malloc_t malloc _((MEM_SIZE nbytes));
93a17b20 188#endif
a0d0e21e 189void markstack_grow _((void));
190char* mess _((char* pat, va_list* args));
191int mg_clear _((SV* sv));
192int mg_copy _((SV *, SV *, char *, STRLEN));
193MAGIC* mg_find _((SV* sv, int type));
194int mg_free _((SV* sv));
195int mg_get _((SV* sv));
196U32 mg_len _((SV* sv));
197void mg_magical _((SV* sv));
198int mg_set _((SV* sv));
199OP* mod _((OP* op, I32 type));
200char* moreswitches _((char* s));
85e6fe83 201#ifdef MSTATS
a0d0e21e 202void mstats _((char* s));
203#endif
204OP * my _(( OP *));
205char* my_bcopy _((char* from, char* to, I32 len));
206#if !defined(HAS_BZERO) && !defined(HAS_MEMSET)
207char* my_bzero _((char* loc, I32 len));
85e6fe83 208#endif
a0d0e21e 209void my_exit _((I32 status)) __attribute__((noreturn));
210I32 my_lstat _((void));
211#ifndef HAS_MEMCMP
212I32 my_memcmp _((unsigned char* s1, unsigned char* s2, I32 len));
213#endif
214I32 my_pclose _((FILE* ptr));
215FILE* my_popen _((char* cmd, char* mode));
216void my_setenv _((char* nam, char* val));
217I32 my_stat _((void));
218#ifdef MYSWAP
219short my_swap _((short s));
220#endif
221void my_unexec _((void));
222OP* newANONLIST _((OP* op));
223OP* newANONHASH _((OP* op));
224OP* newANONSUB _((I32 floor, OP* block));
225OP* newASSIGNOP _((I32 flags, OP* left, I32 optype, OP* right));
226OP* newBINOP _((I32 optype, I32 flags, OP* left, OP* right));
227OP* newCONDOP _((I32 flags, OP* expr, OP* true, OP* false));
228void newFORM _((I32 floor, OP* op, OP* block));
229OP* newFOROP _((I32 flags, char* label, line_t forline, OP* scalar, OP* expr, OP*block, OP*cont));
230OP* newLOGOP _((I32 optype, I32 flags, OP* left, OP* right));
231OP* newLOOPEX _((I32 type, OP* label));
232OP* newLOOPOP _((I32 flags, I32 debuggable, OP* expr, OP* block));
233OP* newMETHOD _((OP* ref, OP* name));
234OP* newNULLLIST _((void));
235OP* newOP _((I32 optype, I32 flags));
236void newPROG _((OP* op));
237OP* newRANGE _((I32 flags, OP* left, OP* right));
238OP* newSLICEOP _((I32 flags, OP* subscript, OP* list));
239OP* newSTATEOP _((I32 flags, char* label, OP* o));
240CV* newSUB _((I32 floor, OP* op, OP* block));
241OP* newUNOP _((I32 optype, I32 flags, OP* child));
242CV* newXS _((char *name, void (*subaddr)(CV* cv), char *filename));
243#ifdef DEPRECATED
244CV* newXSUB _((char *name, I32 ix, I32 (*subaddr)(int,int,int), char *filename));
245#endif
246AV* newAV _((void));
247OP* newAVREF _((OP* o));
248OP* newBINOP _((I32 type, I32 flags, OP* first, OP* last));
249OP* newCVREF _((OP* o));
250OP* newCVOP _((I32 type, I32 flags, CV* cv, OP* cont));
251OP* newGVOP _((I32 type, I32 flags, GV* gv));
252GV* newGVgen _((char *pack));
253OP* newGVREF _((I32 type, OP* o));
254OP* newHVREF _((OP* o));
255HV* newHV _((void));
256IO* newIO _((void));
257OP* newLISTOP _((I32 type, I32 flags, OP* first, OP* last));
258OP* newPMOP _((I32 type, I32 flags));
259OP* newPVOP _((I32 type, I32 flags, char* pv));
260SV* newRV _((SV* ref));
79072805 261#ifdef LEAKTEST
a0d0e21e 262SV* newSV _((I32 x, STRLEN len));
79072805 263#else
a0d0e21e 264SV* newSV _((STRLEN len));
79072805 265#endif
a0d0e21e 266OP* newSVREF _((OP* o));
267OP* newSVOP _((I32 type, I32 flags, SV* sv));
268SV* newSViv _((IV i));
269SV* newSVnv _((double n));
270SV* newSVpv _((char* s, STRLEN len));
271SV* newSVrv _((SV* rv, char* classname));
272SV* newSVsv _((SV* old));
273OP* newUNOP _((I32 type, I32 flags, OP* first));
274OP * newWHILEOP _((I32 flags, I32 debuggable, LOOP* loop, OP* expr, OP* block, OP* cont));
275FILE* nextargv _((GV* gv));
276char* ninstr _((char* big, char* bigend, char* little, char* lend));
277OP * oopsCV _((OP* o));
278void op_free _((OP* arg));
279void package _((OP* op));
280PADOFFSET pad_alloc _((I32 optype, U32 tmptype));
281PADOFFSET pad_allocmy _((char* name));
282PADOFFSET pad_findmy _((char* name));
283OP* oopsAV _((OP* o));
284OP* oopsHV _((OP* o));
285void pad_leavemy _((I32 fill));
286SV* pad_sv _((PADOFFSET po));
287void pad_free _((PADOFFSET po));
288void pad_reset _((void));
289void pad_swipe _((PADOFFSET po));
290void peep _((OP* op));
291PerlInterpreter* perl_alloc _((void));
292I32 perl_call_argv _((char* subname, I32 flags, char** argv));
293I32 perl_call_method _((char* methname, I32 flags));
294I32 perl_call_pv _((char* subname, I32 flags));
295I32 perl_call_sv _((SV* sv, I32 flags));
296#ifdef DEPRECATED
297I32 perl_callargv _((char* subname, I32 sp, I32 gimme, char** argv));
298I32 perl_callpv _((char* subname, I32 sp, I32 gimme, I32 hasargs, I32 numargs));
299I32 perl_callsv _((SV* sv, I32 sp, I32 gimme, I32 hasargs, I32 numargs));
300#endif
301void perl_construct _((PerlInterpreter* sv_interp));
302void perl_destruct _((PerlInterpreter* sv_interp, int destruct_level));
303void perl_free _((PerlInterpreter* sv_interp));
304SV* perl_get_sv _((char* name, I32 create));
305AV* perl_get_av _((char* name, I32 create));
306HV* perl_get_hv _((char* name, I32 create));
307CV* perl_get_cv _((char* name, I32 create));
308int perl_parse _((PerlInterpreter* sv_interp, void(*xsinit)(void), int argc, char** argv, char** env));
309void perl_requirepv _((char* pv));
310int perl_run _((PerlInterpreter* sv_interp));
311void pidgone _((int pid, int status));
312void pmflag _((U16* pmfl, int ch));
313OP* pmruntime _((OP* pm, OP* expr, OP* repl));
314OP* pmtrans _((OP* op, OP* expr, OP* repl));
315OP* pop_return _((void));
316void pop_scope _((void));
317OP* prepend_elem _((I32 optype, OP* head, OP* tail));
318void push_return _((OP* op));
319void push_scope _((void));
320regexp* regcomp _((char* exp, char* xend, PMOP* pm));
321OP* ref _((OP* op, I32 type));
322OP* refkids _((OP* op, I32 type));
323void regdump _((regexp* r));
324I32 regexec _((regexp* prog, char* stringarg, char* strend, char* strbeg, I32 minend, SV* screamer, I32 safebase));
325void regfree _((struct regexp* r));
326char* regnext _((char* p));
327char* regprop _((char* op));
328void repeatcpy _((char* to, char* from, I32 len, I32 count));
329char* rninstr _((char* big, char* bigend, char* little, char* lend));
330int run _((void));
79072805 331#ifndef safemalloc
a0d0e21e 332void safefree _((char* where));
333char* safemalloc _((MEM_SIZE size));
85e6fe83 334#ifndef MSDOS
a0d0e21e 335char* saferealloc _((char* where, MEM_SIZE size));
85e6fe83 336#else
a0d0e21e 337char* saferealloc _((char* where, unsigned long size));
338#endif
339#endif
340#ifdef LEAKTEST
341void safexfree _((char* where));
342char* safexmalloc _((I32 x, MEM_SIZE size));
343char* safexrealloc _((char* where, MEM_SIZE size));
344#endif
345#ifndef HAS_RENAME
346I32 same_dirent _((char* a, char* b));
347#endif
348char* savepv _((char* sv));
349char* savepvn _((char* sv, I32 len));
350void savestack_grow _((void));
351void save_aptr _((AV** aptr));
352AV* save_ary _((GV* gv));
353void save_clearsv _((SV** svp));
354void save_delete _((HV* hv, char* key, I32 klen));
355#ifndef titan /* TitanOS cc can't handle this */
356void save_destructor _((void (*f)(void*), void* p));
357#endif /* titan */
358void save_freesv _((SV* sv));
359void save_freeop _((OP* op));
360void save_freepv _((char* pv));
361HV* save_hash _((GV* gv));
362void save_hptr _((HV** hptr));
363void save_I32 _((I32* intp));
364void save_int _((int* intp));
365void save_item _((SV* item));
366void save_list _((SV** sarg, I32 maxsarg));
367void save_long _((long *longp));
368void save_nogv _((GV* gv));
369SV* save_scalar _((GV* gv));
370void save_pptr _((char **pptr));
371void save_sptr _((SV** sptr));
372SV* save_svref _((SV** sptr));
373OP* sawparens _((OP* o));
374OP* scalar _((OP* o));
375OP* scalarkids _((OP* op));
376OP* scalarseq _((OP* o));
377OP* scalarvoid _((OP* op));
378unsigned long scan_hex _((char* start, I32 len, I32* retlen));
379char* scan_num _((char* s));
380unsigned long scan_oct _((char* start, I32 len, I32* retlen));
381#ifdef NOTDEF /* See toke.c pp_ctl.c and op.c */
382void scan_prefix _((PMOP* pm, char* string, I32 len));
79072805 383#endif
a0d0e21e 384OP* scope _((OP* o));
385char* screaminstr _((SV* bigsv, SV* littlesv));
386#ifndef VMS
387I32 setenv_getix _((char* nam));
85e6fe83 388#endif
a0d0e21e 389VOIDRET sighandler _((int sig));
390SV** stack_grow _((SV** sp, SV**p, int n));
391int start_subparse _((void));
392bool sv_2bool _((SV* sv));
393CV* sv_2cv _((SV* sv, HV** st, GV** gvp, I32 lref));
394IO* sv_2io _((SV* sv));
395IV sv_2iv _((SV* sv));
396SV* sv_2mortal _((SV* sv));
397double sv_2nv _((SV* sv));
398char* sv_2pv _((SV* sv, STRLEN* lp));
399int sv_backoff _((SV* sv));
400SV* sv_bless _((SV* sv, HV* stash));
401void sv_catpv _((SV* sv, char* ptr));
402void sv_catpvn _((SV* sv, char* ptr, STRLEN len));
403void sv_catsv _((SV* dsv, SV* ssv));
404void sv_chop _((SV* sv, char* ptr));
405void sv_clean_all _((void));
406void sv_clean_objs _((void));
407void sv_clear _((SV* sv));
408I32 sv_cmp _((SV* sv1, SV* sv2));
409void sv_dec _((SV* sv));
410void sv_dump _((SV* sv));
411I32 sv_eq _((SV* sv1, SV* sv2));
412void sv_free _((SV* sv));
413char* sv_gets _((SV* sv, FILE* fp, I32 append));
93a17b20 414#ifndef DOSISH
a0d0e21e 415char* sv_grow _((SV* sv, I32 newlen));
93a17b20 416#else
a0d0e21e 417char* sv_grow _((SV* sv, unsigned long newlen));
93a17b20 418#endif
a0d0e21e 419void sv_inc _((SV* sv));
420void sv_insert _((SV* bigsv, STRLEN offset, STRLEN len, char* little, STRLEN littlelen));
421int sv_isa _((SV* sv, char* name));
422int sv_isobject _((SV* sv));
423STRLEN sv_len _((SV* sv));
424void sv_magic _((SV* sv, SV* obj, int how, char* name, I32 namlen));
425SV* sv_mortalcopy _((SV* oldsv));
426SV* sv_newmortal _((void));
427SV* sv_newref _((SV* sv));
428char * sv_peek _((SV* sv));
429char * sv_pvn_force _((SV* sv, STRLEN* lp));
430char* sv_reftype _((SV* sv, int ob));
431void sv_replace _((SV* sv, SV* nsv));
432void sv_report_used _((void));
433void sv_reset _((char* s, HV* stash));
434void sv_setiv _((SV* sv, IV num));
435void sv_setnv _((SV* sv, double num));
436SV* sv_setref_iv _((SV *rv, char *classname, IV iv));
437SV* sv_setref_nv _((SV *rv, char *classname, double nv));
438SV* sv_setref_pv _((SV *rv, char *classname, void* pv));
439SV* sv_setref_pvn _((SV *rv, char *classname, char* pv, I32 n));
440void sv_setpv _((SV* sv, char* ptr));
441void sv_setpvn _((SV* sv, char* ptr, STRLEN len));
442void sv_setsv _((SV* dsv, SV* ssv));
443int sv_unmagic _((SV* sv, int type));
444void sv_unref _((SV* sv));
445bool sv_upgrade _((SV* sv, U32 mt));
446void sv_usepvn _((SV* sv, char* ptr, STRLEN len));
447void taint_env _((void));
448void taint_not _((char *s));
449void taint_proper _((char* f, char* s));
450I32 unlnk _((char* f));
451void utilize _((int aver, OP* id, OP* arg));
452I32 wait4pid _((int pid, int* statusp, int flags));
453void warn _((char* pat,...)) __attribute__((format(printf,1,2)));
454void watch _((char **addr));
455I32 whichsig _((char* sig));
456int yyerror _((char* s));
457int yylex _((void));
458int yyparse _((void));
459int yywarn _((char* s));