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