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