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