This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
DJGPP update from Laszlo Molnar.
[perl5.git] / embed.pl
1 #!/usr/bin/perl -w
2
3 require 5.003;  # keep this compatible, an old perl is all we may have before
4                 # we build the new one
5
6 #
7 # See database of global and static function prototypes at the __END__.
8 # This is used to generate prototype headers under various configurations,
9 # export symbols lists for different platforms, and macros to provide an
10 # implicit interpreter context argument.
11 #
12
13 my $END = tell DATA;
14
15 # walk table providing an array of components in each line to
16 # subroutine, printing the result
17 sub walk_table (&@) {
18     my $function = shift;
19     my $filename = shift || '-';
20     my $leader = shift;
21     my $trailer = shift;
22     my $F;
23     local *F;
24     if (ref $filename) {        # filehandle
25         $F = $filename;
26     }
27     else {
28         open F, ">$filename" or die "Can't open $filename: $!";
29         $F = \*F;
30     }
31     print $F $leader if $leader;
32     seek DATA, $END, 0;         # so we may restart
33     while (<DATA>) {
34         chomp;
35         next if /^:/;
36         while (s|\\$||) {
37             $_ .= <DATA>;
38             chomp;
39         }
40         my @args;
41         if (/^\s*(#|$)/) {
42             @args = $_;
43         }
44         else {
45             @args = split /\s*\|\s*/, $_;
46         }
47         print $F $function->(@args);
48     }
49     print $F $trailer if $trailer;
50     close $F unless ref $filename;
51 }
52
53 sub munge_c_files () {
54     my $functions = {};
55     unless (@ARGV) {
56         warn "\@ARGV empty, nothing to do\n";
57         return;
58     }
59     walk_table {
60         if (@_ > 1) {
61             $functions->{$_[2]} = \@_ if $_[@_-1] =~ /\.\.\./;
62         }
63     } '/dev/null';
64     local $^I = '.bak';
65     while (<>) {
66 #       if (/^#\s*include\s+"perl.h"/) {
67 #           my $file = uc $ARGV;
68 #           $file =~ s/\./_/g;
69 #           print "#define PERL_IN_$file\n";
70 #       }
71 #       s{^(\w+)\s*\(}
72 #        {
73 #           my $f = $1;
74 #           my $repl = "$f(";
75 #           if (exists $functions->{$f}) {
76 #               my $flags = $functions->{$f}[0];
77 #               $repl = "Perl_$repl" if $flags =~ /p/;
78 #               unless ($flags =~ /n/) {
79 #                   $repl .= "pTHX";
80 #                   $repl .= "_ " if @{$functions->{$f}} > 3;
81 #               }
82 #               warn("$ARGV:$.:$repl\n");
83 #           }
84 #           $repl;
85 #        }e;
86         s{(\b(\w+)[ \t]*\([ \t]*(?!aTHX))}
87          {
88             my $repl = $1;
89             my $f = $2;
90             if (exists $functions->{$f}) {
91                 $repl .= "aTHX_ ";
92                 warn("$ARGV:$.:$`#$repl#$'");
93             }
94             $repl;
95          }eg;
96         print;
97         close ARGV if eof;      # restart $.
98     }
99     exit;
100 }
101
102 #munge_c_files();
103
104 # generate proto.h
105 my $wrote_protected = 0;
106
107 sub write_protos {
108     my $ret = "";
109     if (@_ == 1) {
110         my $arg = shift;
111         $ret .= "$arg\n";
112     }
113     else {
114         my ($flags,$retval,$func,@args) = @_;
115         if ($flags =~ /s/) {
116             $retval = "STATIC $retval";
117             $func = "S_$func";
118         }
119         else {
120             $retval = "PERL_CALLCONV $retval";
121             if ($flags =~ /p/) {
122                 $func = "Perl_$func";
123             }
124         }
125         $ret .= "$retval\t$func(";
126         unless ($flags =~ /n/) {
127             $ret .= "pTHX";
128             $ret .= "_ " if @args;
129         }
130         if (@args) {
131             $ret .= join ", ", @args;
132         }
133         else {
134             $ret .= "void" if $flags =~ /n/;
135         }
136         $ret .= ")";
137         $ret .= " __attribute__((noreturn))" if $flags =~ /r/;
138         if( $flags =~ /f/ ) { 
139             my $prefix = $flags =~ /n/ ? '' : 'pTHX_';
140             my $args = scalar @args; 
141             $ret .= "\n#ifdef CHECK_FORMAT\n";
142             $ret .= sprintf " __attribute__((format(printf,%s%d,%s%d)))",
143                                     $prefix, $args - 1, $prefix, $args; 
144             $ret .= "\n#endif\n";
145         }
146         $ret .= ";\n";
147     }
148     $ret;
149 }
150
151 # generates global.sym (API export list), and populates %global with global symbols
152 sub write_global_sym {
153     my $ret = "";
154     if (@_ > 1) {
155         my ($flags,$retval,$func,@args) = @_;
156         if ($flags =~ /A/ && $flags !~ /x/) { # public API, so export
157             $func = "Perl_$func" if $flags =~ /p/;
158             $ret = "$func\n";
159         }
160     }
161     $ret;
162 }
163
164
165 walk_table(\&write_protos, 'proto.h', <<'EOT');
166 /*
167  * !!!!!!!   DO NOT EDIT THIS FILE   !!!!!!!
168  * This file is autogenerated from data in embed.pl.  Edit that file
169  * and run 'make regen_headers' to effect changes.
170  */
171
172 EOT
173
174 walk_table(\&write_global_sym, 'global.sym', <<'EOT');
175 #
176 # !!!!!!!   DO NOT EDIT THIS FILE   !!!!!!!
177 # This file is autogenerated from data in embed.pl.  Edit that file
178 # and run 'make regen_headers' to effect changes.
179 #
180
181 EOT
182
183 # XXX others that may need adding
184 #       warnhook
185 #       hints
186 #       copline
187 my @extvars = qw(sv_undef sv_yes sv_no na dowarn
188                  curcop compiling 
189                  tainting tainted stack_base stack_sp sv_arenaroot
190                  no_modify
191                  curstash DBsub DBsingle debstash
192                  rsfp 
193                  stdingv
194                  defgv
195                  errgv
196                  rsfp_filters
197                  perldb
198                  diehook
199                  dirty
200                  perl_destruct_level
201                 );
202
203 sub readsyms (\%$) {
204     my ($syms, $file) = @_;
205     local (*FILE, $_);
206     open(FILE, "< $file")
207         or die "embed.pl: Can't open $file: $!\n";
208     while (<FILE>) {
209         s/[ \t]*#.*//;          # Delete comments.
210         if (/^\s*(\S+)\s*$/) {
211             my $sym = $1;
212             warn "duplicate symbol $sym while processing $file\n"
213                 if exists $$syms{$sym};
214             $$syms{$sym} = 1;
215         }
216     }
217     close(FILE);
218 }
219
220 # Perl_pp_* and Perl_ck_* are in pp.sym
221 readsyms my %ppsym, 'pp.sym';
222
223 sub readvars(\%$$@) {
224     my ($syms, $file,$pre,$keep_pre) = @_;
225     local (*FILE, $_);
226     open(FILE, "< $file")
227         or die "embed.pl: Can't open $file: $!\n";
228     while (<FILE>) {
229         s/[ \t]*#.*//;          # Delete comments.
230         if (/PERLVARA?I?C?\($pre(\w+)/) {
231             my $sym = $1;
232             $sym = $pre . $sym if $keep_pre;
233             warn "duplicate symbol $sym while processing $file\n"
234                 if exists $$syms{$sym};
235             $$syms{$sym} = $pre || 1;
236         }
237     }
238     close(FILE);
239 }
240
241 my %intrp;
242 my %thread;
243
244 readvars %intrp,  'intrpvar.h','I';
245 readvars %thread, 'thrdvar.h','T';
246 readvars %globvar, 'perlvars.h','G';
247
248 foreach my $sym (sort keys %thread) {
249   warn "$sym in intrpvar.h as well as thrdvar.h\n" if exists $intrp{$sym};
250 }
251
252 sub undefine ($) {
253     my ($sym) = @_;
254     "#undef  $sym\n";
255 }
256
257 sub hide ($$) {
258     my ($from, $to) = @_;
259     my $t = int(length($from) / 8);
260     "#define $from" . "\t" x ($t < 3 ? 3 - $t : 1) . "$to\n";
261 }
262
263 sub bincompat_var ($$) {
264     my ($pfx, $sym) = @_;
265     my $arg = ($pfx eq 'G' ? 'NULL' : 'aTHXo');
266     undefine("PL_$sym") . hide("PL_$sym", "(*Perl_${pfx}${sym}_ptr($arg))");
267 }
268
269 sub multon ($$$) {
270     my ($sym,$pre,$ptr) = @_;
271     hide("PL_$sym", "($ptr$pre$sym)");
272 }
273
274 sub multoff ($$) {
275     my ($sym,$pre) = @_;
276     return hide("PL_$pre$sym", "PL_$sym");
277 }
278
279 unlink 'embed.h';
280 open(EM, '> embed.h') or die "Can't create embed.h: $!\n";
281
282 print EM <<'END';
283 /* !!!!!!!   DO NOT EDIT THIS FILE   !!!!!!! 
284    This file is built by embed.pl from data in embed.pl, pp.sym, intrpvar.h,
285    perlvars.h and thrdvar.h.  Any changes made here will be lost!
286 */
287
288 /* (Doing namespace management portably in C is really gross.) */
289
290 /* NO_EMBED is no longer supported. i.e. EMBED is always active. */
291
292 /* provide binary compatible (but inconsistent) names */
293 #if defined(PERL_BINCOMPAT_5005)
294 #  define  Perl_call_atexit             perl_atexit
295 #  define  Perl_eval_sv                 perl_eval_sv
296 #  define  Perl_eval_pv                 perl_eval_pv
297 #  define  Perl_call_argv               perl_call_argv
298 #  define  Perl_call_method             perl_call_method
299 #  define  Perl_call_pv                 perl_call_pv
300 #  define  Perl_call_sv                 perl_call_sv
301 #  define  Perl_get_av                  perl_get_av
302 #  define  Perl_get_cv                  perl_get_cv
303 #  define  Perl_get_hv                  perl_get_hv
304 #  define  Perl_get_sv                  perl_get_sv
305 #  define  Perl_init_i18nl10n           perl_init_i18nl10n
306 #  define  Perl_init_i18nl14n           perl_init_i18nl14n
307 #  define  Perl_new_collate             perl_new_collate
308 #  define  Perl_new_ctype               perl_new_ctype
309 #  define  Perl_new_numeric             perl_new_numeric
310 #  define  Perl_require_pv              perl_require_pv
311 #  define  Perl_safesyscalloc           Perl_safecalloc
312 #  define  Perl_safesysfree             Perl_safefree
313 #  define  Perl_safesysmalloc           Perl_safemalloc
314 #  define  Perl_safesysrealloc          Perl_saferealloc
315 #  define  Perl_set_numeric_local       perl_set_numeric_local
316 #  define  Perl_set_numeric_standard    perl_set_numeric_standard
317 /* malloc() pollution was the default in earlier versions, so enable
318  * it for bincompat; but not for systems that used to do prevent that,
319  * or when they ask for {HIDE,EMBED}MYMALLOC */
320 #  if !defined(EMBEDMYMALLOC) && !defined(HIDEMYMALLOC)
321 #    if !defined(NeXT) && !defined(__NeXT) && !defined(__MACHTEN__) && \
322         !defined(__QNX__)
323 #      define  PERL_POLLUTE_MALLOC
324 #    endif
325 #  endif
326 #endif
327
328 /* Hide global symbols */
329
330 #if !defined(PERL_OBJECT)
331 #if !defined(PERL_IMPLICIT_CONTEXT)
332
333 END
334
335 walk_table {
336     my $ret = "";
337     if (@_ == 1) {
338         my $arg = shift;
339         $ret .= "$arg\n" if $arg =~ /^#\s*(if|ifn?def|else|endif)\b/;
340     }
341     else {
342         my ($flags,$retval,$func,@args) = @_;
343         unless ($flags =~ /o/) {
344             if ($flags =~ /s/) {
345                 $ret .= hide($func,"S_$func");
346             }
347             elsif ($flags =~ /p/) {
348                 $ret .= hide($func,"Perl_$func");
349             }
350         }
351     }
352     $ret;
353 } \*EM;
354
355 for $sym (sort keys %ppsym) {
356     $sym =~ s/^Perl_//;
357     print EM hide($sym, "Perl_$sym");
358 }
359
360 print EM <<'END';
361
362 #else   /* PERL_IMPLICIT_CONTEXT */
363
364 END
365
366 my @az = ('a'..'z');
367
368 walk_table {
369     my $ret = "";
370     if (@_ == 1) {
371         my $arg = shift;
372         $ret .= "$arg\n" if $arg =~ /^#\s*(if|ifn?def|else|endif)\b/;
373     }
374     else {
375         my ($flags,$retval,$func,@args) = @_;
376         unless ($flags =~ /o/) {
377             my $args = scalar @args;
378             if ($args and $args[$args-1] =~ /\.\.\./) {
379                 # we're out of luck for varargs functions under CPP
380             }
381             elsif ($flags =~ /n/) {
382                 if ($flags =~ /s/) {
383                     $ret .= hide($func,"S_$func");
384                 }
385                 elsif ($flags =~ /p/) {
386                     $ret .= hide($func,"Perl_$func");
387                 }
388             }
389             else {
390                 my $alist = join(",", @az[0..$args-1]);
391                 $ret = "#define $func($alist)";
392                 my $t = int(length($ret) / 8);
393                 $ret .=  "\t" x ($t < 4 ? 4 - $t : 1);
394                 if ($flags =~ /s/) {
395                     $ret .= "S_$func(aTHX";
396                 }
397                 elsif ($flags =~ /p/) {
398                     $ret .= "Perl_$func(aTHX";
399                 }
400                 $ret .= "_ " if $alist;
401                 $ret .= $alist . ")\n";
402             }
403         }
404     }
405     $ret;
406 } \*EM;
407
408 for $sym (sort keys %ppsym) {
409     $sym =~ s/^Perl_//;
410     if ($sym =~ /^ck_/) {
411         print EM hide("$sym(a)", "Perl_$sym(aTHX_ a)");
412     }
413     elsif ($sym =~ /^pp_/) {
414         print EM hide("$sym()", "Perl_$sym(aTHX)");
415     }
416     else {
417         warn "Illegal symbol '$sym' in pp.sym";
418     }
419 }
420
421 print EM <<'END';
422
423 #endif  /* PERL_IMPLICIT_CONTEXT */
424 #else   /* PERL_OBJECT */
425
426 END
427
428 walk_table {
429     my $ret = "";
430     if (@_ == 1) {
431         my $arg = shift;
432         $ret .= "$arg\n" if $arg =~ /^#\s*(if|ifn?def|else|endif)\b/;
433     }
434     else {
435         my ($flags,$retval,$func,@args) = @_;
436         if ($flags =~ /s/) {
437             $ret .= hide("S_$func","CPerlObj::S_$func") if $flags !~ /j/;
438             $ret .= hide($func,"S_$func");
439         }
440         elsif ($flags =~ /p/) {
441             $ret .= hide("Perl_$func","CPerlObj::Perl_$func") if $flags !~ /j/;
442             $ret .= hide($func,"Perl_$func");
443         }
444         else {
445             $ret .= hide($func,"CPerlObj::$func") if $flags !~ /j/;
446         }
447     }
448     $ret;
449 } \*EM;
450
451 for $sym (sort keys %ppsym) {
452     $sym =~ s/^Perl_//;
453     print EM hide("Perl_$sym", "CPerlObj::Perl_$sym");
454     print EM hide($sym, "Perl_$sym");
455 }
456
457 print EM <<'END';
458
459 #endif  /* PERL_OBJECT */
460
461 /* Compatibility stubs.  Compile extensions with -DPERL_NOCOMPAT to
462    disable them.
463  */
464
465 #if !defined(PERL_CORE)
466 #  define sv_setptrobj(rv,ptr,name)     sv_setref_iv(rv,name,PTR2IV(ptr))
467 #  define sv_setptrref(rv,ptr)          sv_setref_iv(rv,Nullch,PTR2IV(ptr))
468 #endif
469
470 #if !defined(PERL_CORE) && !defined(PERL_NOCOMPAT) && !defined(PERL_BINCOMPAT_5005)
471
472 /* Compatibility for various misnamed functions.  All functions
473    in the API that begin with "perl_" (not "Perl_") take an explicit
474    interpreter context pointer.
475    The following are not like that, but since they had a "perl_"
476    prefix in previous versions, we provide compatibility macros.
477  */
478 #  define perl_atexit(a,b)              call_atexit(a,b)
479 #  define perl_call_argv(a,b,c)         call_argv(a,b,c)
480 #  define perl_call_pv(a,b)             call_pv(a,b)
481 #  define perl_call_method(a,b)         call_method(a,b)
482 #  define perl_call_sv(a,b)             call_sv(a,b)
483 #  define perl_eval_sv(a,b)             eval_sv(a,b)
484 #  define perl_eval_pv(a,b)             eval_pv(a,b)
485 #  define perl_require_pv(a)            require_pv(a)
486 #  define perl_get_sv(a,b)              get_sv(a,b)
487 #  define perl_get_av(a,b)              get_av(a,b)
488 #  define perl_get_hv(a,b)              get_hv(a,b)
489 #  define perl_get_cv(a,b)              get_cv(a,b)
490 #  define perl_init_i18nl10n(a)         init_i18nl10n(a)
491 #  define perl_init_i18nl14n(a)         init_i18nl14n(a)
492 #  define perl_new_ctype(a)             new_ctype(a)
493 #  define perl_new_collate(a)           new_collate(a)
494 #  define perl_new_numeric(a)           new_numeric(a)
495
496 /* varargs functions can't be handled with CPP macros. :-(
497    This provides a set of compatibility functions that don't take
498    an extra argument but grab the context pointer using the macro
499    dTHX.
500  */
501 #if defined(PERL_IMPLICIT_CONTEXT) && !defined(PERL_OBJECT)
502 #  define croak                         Perl_croak_nocontext
503 #  define deb                           Perl_deb_nocontext
504 #  define die                           Perl_die_nocontext
505 #  define form                          Perl_form_nocontext
506 #  define load_module                   Perl_load_module_nocontext
507 #  define mess                          Perl_mess_nocontext
508 #  define newSVpvf                      Perl_newSVpvf_nocontext
509 #  define sv_catpvf                     Perl_sv_catpvf_nocontext
510 #  define sv_setpvf                     Perl_sv_setpvf_nocontext
511 #  define warn                          Perl_warn_nocontext
512 #  define warner                        Perl_warner_nocontext
513 #  define sv_catpvf_mg                  Perl_sv_catpvf_mg_nocontext
514 #  define sv_setpvf_mg                  Perl_sv_setpvf_mg_nocontext
515 #endif
516
517 #endif /* !defined(PERL_CORE) && !defined(PERL_NOCOMPAT) */
518
519 #if !defined(PERL_IMPLICIT_CONTEXT)
520 /* undefined symbols, point them back at the usual ones */
521 #  define Perl_croak_nocontext          Perl_croak
522 #  define Perl_die_nocontext            Perl_die
523 #  define Perl_deb_nocontext            Perl_deb
524 #  define Perl_form_nocontext           Perl_form
525 #  define Perl_load_module_nocontext    Perl_load_module
526 #  define Perl_mess_nocontext           Perl_mess
527 #  define Perl_newSVpvf_nocontext       Perl_newSVpvf
528 #  define Perl_sv_catpvf_nocontext      Perl_sv_catpvf
529 #  define Perl_sv_setpvf_nocontext      Perl_sv_setpvf
530 #  define Perl_warn_nocontext           Perl_warn
531 #  define Perl_warner_nocontext         Perl_warner
532 #  define Perl_sv_catpvf_mg_nocontext   Perl_sv_catpvf_mg
533 #  define Perl_sv_setpvf_mg_nocontext   Perl_sv_setpvf_mg
534 #endif
535
536 END
537
538 close(EM);
539
540 unlink 'embedvar.h';
541 open(EM, '> embedvar.h')
542     or die "Can't create embedvar.h: $!\n";
543
544 print EM <<'END';
545 /* !!!!!!!   DO NOT EDIT THIS FILE   !!!!!!! 
546    This file is built by embed.pl from data in embed.pl, pp.sym, intrpvar.h,
547    perlvars.h and thrdvar.h.  Any changes made here will be lost!
548 */
549
550 /* (Doing namespace management portably in C is really gross.) */
551
552 /*
553    The following combinations of MULTIPLICITY, USE_THREADS, PERL_OBJECT
554    and PERL_IMPLICIT_CONTEXT are supported:
555      1) none
556      2) MULTIPLICITY    # supported for compatibility
557      3) MULTIPLICITY && PERL_IMPLICIT_CONTEXT
558      4) USE_THREADS && PERL_IMPLICIT_CONTEXT
559      5) MULTIPLICITY && USE_THREADS && PERL_IMPLICIT_CONTEXT
560      6) PERL_OBJECT && PERL_IMPLICIT_CONTEXT
561
562    All other combinations of these flags are errors.
563
564    #3, #4, #5, and #6 are supported directly, while #2 is a special
565    case of #3 (supported by redefining vTHX appropriately).
566 */
567
568 #if defined(MULTIPLICITY)
569 /* cases 2, 3 and 5 above */
570
571 #  if defined(PERL_IMPLICIT_CONTEXT)
572 #    define vTHX        aTHX
573 #  else
574 #    define vTHX        PERL_GET_INTERP
575 #  endif
576
577 END
578
579 for $sym (sort keys %thread) {
580     print EM multon($sym,'T','vTHX->');
581 }
582
583 print EM <<'END';
584
585 #  if defined(PERL_OBJECT)
586 #    include "error: PERL_OBJECT + MULTIPLICITY don't go together"
587 #  endif
588
589 #  if defined(USE_THREADS)
590 /* case 5 above */
591
592 END
593
594 for $sym (sort keys %intrp) {
595     print EM multon($sym,'I','PERL_GET_INTERP->');
596 }
597
598 print EM <<'END';
599
600 #  else         /* !USE_THREADS */
601 /* cases 2 and 3 above */
602
603 END
604
605 for $sym (sort keys %intrp) {
606     print EM multon($sym,'I','vTHX->');
607 }
608
609 print EM <<'END';
610
611 #  endif        /* USE_THREADS */
612
613 #else   /* !MULTIPLICITY */
614
615 #  if defined(PERL_OBJECT)
616 /* case 6 above */
617
618 END
619
620 for $sym (sort keys %thread) {
621     print EM multon($sym,'T','aTHXo->interp.');
622 }
623
624
625 for $sym (sort keys %intrp) {
626     print EM multon($sym,'I','aTHXo->interp.');
627 }
628
629 print EM <<'END';
630
631 #  else /* !PERL_OBJECT */
632
633 /* cases 1 and 4 above */
634
635 END
636
637 for $sym (sort keys %intrp) {
638     print EM multoff($sym,'I');
639 }
640
641 print EM <<'END';
642
643 #    if defined(USE_THREADS)
644 /* case 4 above */
645
646 END
647
648 for $sym (sort keys %thread) {
649     print EM multon($sym,'T','aTHX->');
650 }
651
652 print EM <<'END';
653
654 #    else       /* !USE_THREADS */
655 /* case 1 above */
656
657 END
658
659 for $sym (sort keys %thread) {
660     print EM multoff($sym,'T');
661 }
662
663 print EM <<'END';
664
665 #    endif      /* USE_THREADS */
666 #  endif        /* PERL_OBJECT */
667 #endif  /* MULTIPLICITY */
668
669 #if defined(PERL_GLOBAL_STRUCT)
670
671 END
672
673 for $sym (sort keys %globvar) {
674     print EM multon($sym,'G','PL_Vars.');
675 }
676
677 print EM <<'END';
678
679 #else /* !PERL_GLOBAL_STRUCT */
680
681 END
682
683 for $sym (sort keys %globvar) {
684     print EM multoff($sym,'G');
685 }
686
687 print EM <<'END';
688
689 #endif /* PERL_GLOBAL_STRUCT */
690
691 #ifdef PERL_POLLUTE             /* disabled by default in 5.6.0 */
692
693 END
694
695 for $sym (sort @extvars) {
696     print EM hide($sym,"PL_$sym");
697 }
698
699 print EM <<'END';
700
701 #endif /* PERL_POLLUTE */
702 END
703
704 close(EM);
705
706 unlink 'objXSUB.h';
707 open(OBX, '> objXSUB.h')
708     or die "Can't create objXSUB.h: $!\n";
709
710 print OBX <<'EOT';
711 /* !!!!!!!   DO NOT EDIT THIS FILE   !!!!!!! 
712    This file is built by embed.pl from data in embed.pl, pp.sym, intrpvar.h,
713    perlvars.h and thrdvar.h.  Any changes made here will be lost!
714 */
715
716 #ifndef __objXSUB_h__
717 #define __objXSUB_h__
718
719 /* method calls via pPerl (static functions without a "this" pointer need these) */
720
721 #if defined(PERL_CORE) && defined(PERL_OBJECT)
722
723 /* XXX soon to be eliminated, only a few things in PERLCORE need these now */
724
725 EOT
726
727 walk_table {
728     my $ret = "";
729     if (@_ == 1) {
730         my $arg = shift;
731         $ret .= "$arg\n" if $arg =~ /^#\s*(if|ifn?def|else|endif)\b/;
732     }
733     else {
734         my ($flags,$retval,$func,@args) = @_;
735         if ($flags =~ /A/ && $flags !~ /j/) { # API function needing macros
736             if ($flags =~ /p/) {
737                 $ret .= undefine("Perl_$func") . hide("Perl_$func","pPerl->Perl_$func");
738                 $ret .= undefine($func) . hide($func,"Perl_$func");
739             }
740             else {
741                 $ret .= undefine($func) . hide($func,"pPerl->$func");
742             }
743         }
744     }
745     $ret;
746 } \*OBX;
747
748 # NOTE: not part of API
749 #for $sym (sort keys %ppsym) {
750 #    $sym =~ s/^Perl_//;
751 #    print OBX undefine("Perl_$sym") . hide("Perl_$sym", "pPerl->Perl_$sym");
752 #    print OBX undefine($sym) . hide($sym, "Perl_$sym");
753 #}
754
755 print OBX <<'EOT';
756
757 #endif  /* PERL_CORE && PERL_OBJECT */
758 #endif  /* __objXSUB_h__ */
759 EOT
760
761 close(OBX);
762
763 unlink 'perlapi.h';
764 unlink 'perlapi.c';
765 open(CAPI, '> perlapi.c') or die "Can't create perlapi.c: $!\n";
766 open(CAPIH, '> perlapi.h') or die "Can't create perlapi.h: $!\n";
767
768 print CAPIH <<'EOT';
769 /* !!!!!!!   DO NOT EDIT THIS FILE   !!!!!!! 
770    This file is built by embed.pl from data in embed.pl, pp.sym, intrpvar.h,
771    perlvars.h and thrdvar.h.  Any changes made here will be lost!
772 */
773
774 /* declare accessor functions for Perl variables */
775 #ifndef __perlapi_h__
776 #define __perlapi_h__
777
778 #if defined(PERL_OBJECT) || defined (MULTIPLICITY)
779
780 #if defined(PERL_OBJECT)
781 #  undef  aTHXo
782 #  define aTHXo                 pPerl
783 #  undef  aTHXo_
784 #  define aTHXo_                aTHXo,
785 #endif /* PERL_OBJECT */
786
787 START_EXTERN_C
788
789 #undef PERLVAR
790 #undef PERLVARA
791 #undef PERLVARI
792 #undef PERLVARIC
793 #define PERLVAR(v,t)    EXTERN_C t* Perl_##v##_ptr(pTHXo);
794 #define PERLVARA(v,n,t) typedef t PL_##v##_t[n];                        \
795                         EXTERN_C PL_##v##_t* Perl_##v##_ptr(pTHXo);
796 #define PERLVARI(v,t,i) PERLVAR(v,t)
797 #define PERLVARIC(v,t,i) PERLVAR(v, const t)
798
799 #include "thrdvar.h"
800 #include "intrpvar.h"
801 #include "perlvars.h"
802
803 #undef PERLVAR
804 #undef PERLVARA
805 #undef PERLVARI
806 #undef PERLVARIC
807
808 END_EXTERN_C
809
810 #if defined(PERL_CORE)
811
812 /* accessor functions for Perl variables (provide binary compatibility) */
813
814 /* these need to be mentioned here, or most linkers won't put them in
815    the perl executable */
816
817 #ifndef PERL_NO_FORCE_LINK
818
819 START_EXTERN_C
820
821 #ifndef DOINIT
822 EXT void *PL_force_link_funcs[];
823 #else
824 EXT void *PL_force_link_funcs[] = {
825 #undef PERLVAR
826 #undef PERLVARA
827 #undef PERLVARI
828 #undef PERLVARIC
829 #define PERLVAR(v,t)    (void*)Perl_##v##_ptr,
830 #define PERLVARA(v,n,t) PERLVAR(v,t)
831 #define PERLVARI(v,t,i) PERLVAR(v,t)
832 #define PERLVARIC(v,t,i) PERLVAR(v,t)
833
834 #include "thrdvar.h"
835 #include "intrpvar.h"
836 #include "perlvars.h"
837
838 #undef PERLVAR
839 #undef PERLVARA
840 #undef PERLVARI
841 #undef PERLVARIC
842 };
843 #endif  /* DOINIT */
844
845 START_EXTERN_C
846
847 #endif  /* PERL_NO_FORCE_LINK */
848
849 #else   /* !PERL_CORE */
850
851 EOT
852
853 foreach my $sym (sort keys %intrp) {
854     print CAPIH bincompat_var('I',$sym);
855 }
856
857 foreach my $sym (sort keys %thread) {
858     print CAPIH bincompat_var('T',$sym);
859 }
860
861 foreach my $sym (sort keys %globvar) {
862     print CAPIH bincompat_var('G',$sym);
863 }
864
865 print CAPIH <<'EOT';
866
867 #endif /* !PERL_CORE */
868 #endif /* PERL_OBJECT || MULTIPLICITY */
869
870 #endif /* __perlapi_h__ */
871
872 EOT
873 close CAPIH;
874
875 print CAPI <<'EOT';
876 /* !!!!!!!   DO NOT EDIT THIS FILE   !!!!!!! 
877    This file is built by embed.pl from data in embed.pl, pp.sym, intrpvar.h,
878    perlvars.h and thrdvar.h.  Any changes made here will be lost!
879 */
880
881 #include "EXTERN.h"
882 #include "perl.h"
883 #include "perlapi.h"
884
885 #if defined(PERL_OBJECT) || defined (MULTIPLICITY)
886
887 /* accessor functions for Perl variables (provides binary compatibility) */
888 START_EXTERN_C
889
890 #undef PERLVAR
891 #undef PERLVARA
892 #undef PERLVARI
893 #undef PERLVARIC
894
895 #if defined(PERL_OBJECT)
896 #define PERLVAR(v,t)    t* Perl_##v##_ptr(pTHXo)                        \
897                         { return &(aTHXo->interp.v); }
898 #define PERLVARA(v,n,t) PL_##v##_t* Perl_##v##_ptr(pTHXo)               \
899                         { return &(aTHXo->interp.v); }
900 #else   /* MULTIPLICITY */
901 #define PERLVAR(v,t)    t* Perl_##v##_ptr(pTHX)                         \
902                         { return &(aTHX->v); }
903 #define PERLVARA(v,n,t) PL_##v##_t* Perl_##v##_ptr(pTHX)                \
904                         { return &(aTHX->v); }
905 #endif
906
907 #define PERLVARI(v,t,i) PERLVAR(v,t)
908 #define PERLVARIC(v,t,i) PERLVAR(v, const t)
909
910 #include "thrdvar.h"
911 #include "intrpvar.h"
912
913 #undef PERLVAR
914 #undef PERLVARA
915 #define PERLVAR(v,t)    t* Perl_##v##_ptr(pTHXo)                        \
916                         { return &(PL_##v); }
917 #define PERLVARA(v,n,t) PL_##v##_t* Perl_##v##_ptr(pTHXo)               \
918                         { return &(PL_##v); }
919 #undef PERLVARIC
920 #define PERLVARIC(v,t,i)        const t* Perl_##v##_ptr(pTHXo)          \
921                         { return (const t *)&(PL_##v); }
922 #include "perlvars.h"
923
924 #undef PERLVAR
925 #undef PERLVARA
926 #undef PERLVARI
927 #undef PERLVARIC
928
929 #if defined(PERL_OBJECT)
930
931 /* C-API layer for PERL_OBJECT */
932
933 EOT
934
935 # functions that take va_list* for implementing vararg functions
936 # NOTE: makedef.pl must be updated if you add symbols to %vfuncs
937 my %vfuncs = qw(
938     Perl_croak                  Perl_vcroak
939     Perl_warn                   Perl_vwarn
940     Perl_warner                 Perl_vwarner
941     Perl_die                    Perl_vdie
942     Perl_form                   Perl_vform
943     Perl_load_module            Perl_vload_module
944     Perl_mess                   Perl_vmess
945     Perl_deb                    Perl_vdeb
946     Perl_newSVpvf               Perl_vnewSVpvf
947     Perl_sv_setpvf              Perl_sv_vsetpvf
948     Perl_sv_setpvf_mg           Perl_sv_vsetpvf_mg
949     Perl_sv_catpvf              Perl_sv_vcatpvf
950     Perl_sv_catpvf_mg           Perl_sv_vcatpvf_mg
951     Perl_dump_indent            Perl_dump_vindent
952     Perl_default_protect        Perl_vdefault_protect
953 );
954
955 sub emit_func {
956     my ($addcontext, $rettype,$func,@args) = @_;
957     my @aargs = @args;
958     my $a;
959     for $a (@aargs) { $a =~ s/^.*\b(\w+)$/$1/ }
960     my $ctxarg = '';
961     if (not $addcontext) {
962         $ctxarg = 'pTHXo';
963         $ctxarg .= '_ ' if @args;
964     }
965     my $decl = '';
966     if ($addcontext) {
967         $decl .= "    dTHXo;\n";
968     }
969     local $" = ', ';
970     my $return = ($rettype =~ /^\s*(void|Free_t|Signal_t)\s*$/
971                   ? '' : 'return ');
972     my $emitval = '';
973     if (@args and $args[$#args] =~ /\.\.\./) {
974         pop @aargs;
975         my $retarg = '';
976         my $ctxfunc = $func;
977         $ctxfunc =~ s/_nocontext$//;
978         return $emitval unless exists $vfuncs{$ctxfunc};
979         if (length $return) {
980             $decl .= "    $rettype retval;\n";
981             $retarg .= "retval = ";
982             $return = "\n    ${return}retval;\n";
983         }
984         $emitval .= <<EOT
985 $rettype
986 $func($ctxarg@args)
987 {
988 $decl    va_list args;
989     va_start(args, $aargs[$#aargs]);
990     $retarg((CPerlObj*)pPerl)->$vfuncs{$ctxfunc}(@aargs, &args);
991     va_end(args);$return
992 }
993 EOT
994     }
995     else {
996         $emitval .= <<EOT
997 $rettype
998 $func($ctxarg@args)
999 {
1000 $decl    $return((CPerlObj*)pPerl)->$func(@aargs);
1001 }
1002 EOT
1003     }
1004     $emitval;
1005 }
1006
1007 # XXXX temporary hack
1008 my $sym;
1009 for $sym (qw(
1010                 perl_construct
1011                 perl_destruct
1012                 perl_free
1013                 perl_run
1014                 perl_parse
1015                 ))
1016 {
1017     $skipapi_funcs{$sym}++;
1018 }
1019
1020 walk_table {
1021     my $ret = "";
1022     if (@_ == 1) {
1023         my $arg = shift;
1024         $ret .= "$arg\n" if $arg =~ /^#\s*(if|ifn?def|else|endif)\b/;
1025     }
1026     else {
1027         my ($flags,$retval,$func,@args) = @_;
1028         return $ret if exists $skipapi_funcs{$func};
1029         if ($flags =~ /A/ && $flags !~ /j/) { # in public API, needed for XSUBS
1030             $ret .= "\n";
1031             my $addctx = 1 if $flags =~ /n/;
1032             if ($flags =~ /p/) {
1033                 $ret .= undefine("Perl_$func");
1034                 $ret .= emit_func($addctx,$retval,"Perl_$func",@args);
1035             }
1036             else {
1037                 $ret .= undefine($func);
1038                 $ret .= emit_func($addctx,$retval,$func,@args);
1039             }
1040         }
1041     }
1042     $ret;
1043 } \*CAPI;
1044
1045 # NOTE: not part of the API
1046 #for $sym (sort keys %ppsym) {
1047 #    $sym =~ s/^Perl_//;
1048 #    print CAPI "\n";
1049 #    print CAPI undefine("Perl_$sym");
1050 #    if ($sym =~ /^ck_/) {
1051 #       print CAPI emit_func(0, 'OP *',"Perl_$sym",'OP *o');
1052 #    }
1053 #   else {                                      # pp_foo
1054 #       print CAPI emit_func(0, 'OP *',"Perl_$sym");
1055 #    }
1056 #}
1057
1058 print CAPI <<'EOT';
1059
1060 #undef Perl_fprintf_nocontext
1061 int
1062 Perl_fprintf_nocontext(PerlIO *stream, const char *format, ...)
1063 {
1064     dTHXo;
1065     va_list(arglist);
1066     va_start(arglist, format);
1067     return (*PL_StdIO->pVprintf)(PL_StdIO, stream, format, arglist);
1068 }
1069
1070 END_EXTERN_C
1071
1072 #endif /* PERL_OBJECT */
1073 #endif /* PERL_OBJECT || MULTIPLICITY */
1074 EOT
1075
1076 close(CAPI);
1077
1078 # autogenerate documentation from comments in source files
1079
1080 my %apidocs;
1081 my %gutsdocs;
1082 my %docfuncs;
1083
1084 sub autodoc ($$) { # parse a file and extract documentation info
1085     my($fh,$file) = @_;
1086     my($in, $doc, $line);
1087 FUNC:
1088     while (defined($in = <$fh>)) {
1089         $line++;
1090         if ($in =~ /^=for\s+apidoc\s+(.*)\n/) {
1091             my $proto = $1;
1092             $proto = "||$proto" unless $proto =~ /\|/;
1093             my($flags, $ret, $name, @args) = split /\|/, $proto;
1094             my $docs = "";
1095 DOC:
1096             while (defined($doc = <$fh>)) {
1097                 $line++;
1098                 last DOC if $doc =~ /^=\w+/;
1099                 if ($doc =~ m:^\*/$:) {
1100                     warn "=cut missing? $file:$line:$doc";;
1101                     last DOC;
1102                 }
1103                 $docs .= $doc;
1104             }
1105             $docs = "\n$docs" if $docs and $docs !~ /^\n/;
1106             if ($flags =~ /m/) {
1107                 if ($flags =~ /A/) {
1108                     $apidocs{$name} = [$flags, $docs, $ret, $file, @args];
1109                 }
1110                 else {
1111                     $gutsdocs{$name} = [$flags, $docs, $ret, $file, @args];
1112                 }
1113             }
1114             else {
1115                 $docfuncs{$name} = [$flags, $docs, $ret, $file, @args];
1116             }
1117             if (defined $doc) {
1118                 if ($doc =~ /^=for/) {
1119                     $in = $doc;
1120                     redo FUNC;
1121                 }
1122             } else {
1123                 warn "$file:$line:$in";
1124             }
1125         }
1126     }
1127 }
1128
1129 sub docout ($$$) { # output the docs for one function
1130     my($fh, $name, $docref) = @_;
1131     my($flags, $docs, $ret, $file, @args) = @$docref;
1132
1133     $docs .= "NOTE: this function is experimental and may change or be
1134 removed without notice.\n\n" if $flags =~ /x/;
1135     $docs .= "NOTE: the perl_ form of this function is deprecated.\n\n" 
1136         if $flags =~ /p/;
1137
1138     print $fh "=item $name\n$docs";
1139
1140     if ($flags =~ /U/) { # no usage
1141         # nothing
1142     } elsif ($flags =~ /s/) { # semicolon ("dTHR;")
1143         print $fh "\t\t$name;\n\n";
1144     } elsif ($flags =~ /n/) { # no args
1145         print $fh "\t$ret\t$name\n\n";
1146     } else { # full usage
1147         print $fh "\t$ret\t$name";
1148         print $fh "(" . join(", ", @args) . ")";
1149         print $fh "\n\n";
1150     }
1151     print $fh "=for hackers\nFound in file $file\n\n";
1152 }
1153
1154 my $file;
1155 for $file (glob('*.c'), glob('*.h')) {
1156     open F, "< $file" or die "Cannot open $file for docs: $!\n";
1157     autodoc(\*F,$file);
1158     close F or die "Error closing $file: $!\n";
1159 }
1160
1161 unlink "pod/perlapi.pod";
1162 open (DOC, ">pod/perlapi.pod") or 
1163         die "Can't create pod/perlapi.pod: $!\n";
1164
1165 walk_table {    # load documented functions into approriate hash
1166     if (@_ > 1) {
1167         my($flags, $retval, $func, @args) = @_;
1168         return "" unless $flags =~ /d/;
1169         $func =~ s/\t//g; $flags =~ s/p//; # clean up fields from embed.pl
1170         $retval =~ s/\t//;
1171         if ($flags =~ /A/) {
1172             my $docref = delete $docfuncs{$func};
1173             warn "no docs for $func\n" unless $docref and @$docref;
1174         $docref->[0].="x" if $flags =~ /M/;
1175             $apidocs{$func} = [$docref->[0] . 'A', $docref->[1], $retval,
1176                                $docref->[3], @args];
1177         } else {
1178             my $docref = delete $docfuncs{$func};
1179             $gutsdocs{$func} = [$docref->[0], $docref->[1], $retval,
1180                                 $docref->[3], @args];
1181         }
1182     }
1183     return "";
1184 } \*DOC;
1185
1186 for (sort keys %docfuncs) {
1187     # Have you used a full for apidoc or just a func name?  
1188     # Have you used Ap instead of Am in the for apidoc?
1189     warn "Unable to place $_!\n";
1190 }
1191
1192 print DOC <<'_EOB_';
1193 =head1 NAME
1194
1195 perlapi - autogenerated documentation for the perl public API
1196
1197 =head1 DESCRIPTION
1198
1199 This file contains the documentation of the perl public API generated by 
1200 embed.pl, specifically a listing of functions, macros, flags, and variables 
1201 that may be used by extension writers.  The interfaces of any functions that 
1202 are not listed here are subject to change without notice.  For this reason,
1203 blindly using functions listed in proto.h is to be avoided when writing
1204 extensions.
1205
1206 Note that all Perl API global variables must be referenced with the C<PL_>
1207 prefix.  Some macros are provided for compatibility with the older,
1208 unadorned names, but this support may be disabled in a future release.
1209
1210 The listing is alphabetical, case insensitive.
1211
1212 =over 8
1213
1214 _EOB_
1215
1216 my $key;
1217 for $key (sort { uc($a) cmp uc($b); } keys %apidocs) { # case insensitive sort
1218     docout(\*DOC, $key, $apidocs{$key});
1219 }
1220
1221 print DOC <<'_EOE_';
1222 =back
1223
1224 =head1 AUTHORS
1225
1226 Until May 1997, this document was maintained by Jeff Okamoto
1227 <okamoto@corp.hp.com>.  It is now maintained as part of Perl itself.
1228
1229 With lots of help and suggestions from Dean Roehrich, Malcolm Beattie,
1230 Andreas Koenig, Paul Hudson, Ilya Zakharevich, Paul Marquess, Neil
1231 Bowers, Matthew Green, Tim Bunce, Spider Boardman, Ulrich Pfeifer,
1232 Stephen McCamant, and Gurusamy Sarathy.
1233
1234 API Listing originally by Dean Roehrich <roehrich@cray.com>.
1235
1236 Updated to be autogenerated from comments in the source by Benjamin Stuhl.
1237
1238 =head1 SEE ALSO
1239
1240 perlguts(1), perlxs(1), perlxstut(1), perlintern(1)
1241
1242 _EOE_
1243
1244
1245 close(DOC);
1246
1247 open(GUTS, ">pod/perlintern.pod") or 
1248                 die "Unable to create pod/perlintern.pod: $!\n";
1249 print GUTS <<'END';
1250 =head1 NAME
1251
1252 perlintern - autogenerated documentation of purely B<internal> 
1253                  Perl functions
1254
1255 =head1 DESCRIPTION
1256
1257 This file is the autogenerated documentation of functions in the 
1258 Perl interpreter that are documented using Perl's internal documentation
1259 format but are not marked as part of the Perl API. In other words, 
1260 B<they are not for use in extensions>!
1261
1262 =over 8
1263
1264 END
1265
1266 for $key (sort { uc($a) cmp uc($b); } keys %gutsdocs) {
1267     docout(\*GUTS, $key, $gutsdocs{$key});
1268 }
1269
1270 print GUTS <<'END';
1271 =back
1272
1273 =head1 AUTHORS
1274
1275 The autodocumentation system was originally added to the Perl core by 
1276 Benjamin Stuhl. Documentation is by whoever was kind enough to 
1277 document their functions.
1278
1279 =head1 SEE ALSO
1280
1281 perlguts(1), perlapi(1)
1282
1283 END
1284
1285 close GUTS;
1286
1287
1288 __END__
1289
1290 : Lines are of the form:
1291 :    flags|return_type|function_name|arg1|arg2|...|argN
1292 :
1293 : A line may be continued on another by ending it with a backslash.
1294 : Leading and trailing whitespace will be ignored in each component.
1295 :
1296 : flags are single letters with following meanings:
1297 :       A               member of public API
1298 :       d               function has documentation with its source
1299 :       s               static function, should have an S_ prefix in source
1300 :                               file
1301 :       n               has no implicit interpreter/thread context argument
1302 :       p               function has a Perl_ prefix
1303 :       f               function takes printf style format string, varargs
1304 :       r               function never returns
1305 :       o               has no compatibility macro (#define foo Perl_foo)
1306 :       j               not a member of CPerlObj
1307 :       x               not exported
1308 :       M               may change
1309 :
1310 : Individual flags may be separated by whitespace.
1311 :
1312 : New global functions should be added at the end for binary compatibility
1313 : in some configurations.
1314
1315 START_EXTERN_C
1316
1317 #if defined(PERL_IMPLICIT_SYS)
1318 Ajno    |PerlInterpreter*       |perl_alloc_using \
1319                                 |struct IPerlMem* m|struct IPerlMem* ms \
1320                                 |struct IPerlMem* mp|struct IPerlEnv* e \
1321                                 |struct IPerlStdIO* io|struct IPerlLIO* lio \
1322                                 |struct IPerlDir* d|struct IPerlSock* s \
1323                                 |struct IPerlProc* p
1324 #endif
1325 Ajnod   |PerlInterpreter*       |perl_alloc
1326 Ajnod   |void   |perl_construct |PerlInterpreter* interp
1327 Ajnod   |void   |perl_destruct  |PerlInterpreter* interp
1328 Ajnod   |void   |perl_free      |PerlInterpreter* interp
1329 Ajnod   |int    |perl_run       |PerlInterpreter* interp
1330 Ajnod   |int    |perl_parse     |PerlInterpreter* interp|XSINIT_t xsinit \
1331                                 |int argc|char** argv|char** env
1332 #if defined(USE_ITHREADS)
1333 : XXX: perl_clone needs docs
1334 Ajno    |PerlInterpreter*|perl_clone|PerlInterpreter* interp, UV flags
1335 #  if defined(PERL_IMPLICIT_SYS)
1336 Ajno    |PerlInterpreter*|perl_clone_using|PerlInterpreter *interp|UV flags \
1337                                 |struct IPerlMem* m|struct IPerlMem* ms \
1338                                 |struct IPerlMem* mp|struct IPerlEnv* e \
1339                                 |struct IPerlStdIO* io|struct IPerlLIO* lio \
1340                                 |struct IPerlDir* d|struct IPerlSock* s \
1341                                 |struct IPerlProc* p
1342 #  endif
1343 #endif
1344
1345 #if defined(MYMALLOC)
1346 Ajnop   |Malloc_t|malloc        |MEM_SIZE nbytes
1347 Ajnop   |Malloc_t|calloc        |MEM_SIZE elements|MEM_SIZE size
1348 Ajnop   |Malloc_t|realloc       |Malloc_t where|MEM_SIZE nbytes
1349 Ajnop   |Free_t |mfree          |Malloc_t where
1350 jnp     |MEM_SIZE|malloced_size |void *p
1351 #endif
1352
1353 Ajnp    |void*  |get_context
1354 Ajnp    |void   |set_context    |void *thx
1355
1356 END_EXTERN_C
1357
1358 /* functions with flag 'n' should come before here */
1359 #if defined(PERL_OBJECT)
1360 class CPerlObj {
1361 public:
1362         struct interpreter interp;
1363         CPerlObj(IPerlMem*, IPerlMem*, IPerlMem*, IPerlEnv*, IPerlStdIO*,
1364             IPerlLIO*, IPerlDir*, IPerlSock*, IPerlProc*);
1365         void* operator new(size_t nSize, IPerlMem *pvtbl);
1366 #ifndef __BORLANDC__
1367         static void operator delete(void* pPerl, IPerlMem *pvtbl);
1368 #endif
1369         int do_aspawn (void *vreally, void **vmark, void **vsp);
1370 #endif
1371 #if defined(PERL_OBJECT)
1372 public:
1373 #else
1374 START_EXTERN_C
1375 #endif
1376 #  include "pp_proto.h"
1377 Ap      |SV*    |amagic_call    |SV* left|SV* right|int method|int dir
1378 Ap      |bool   |Gv_AMupdate    |HV* stash
1379 p       |OP*    |append_elem    |I32 optype|OP* head|OP* tail
1380 p       |OP*    |append_list    |I32 optype|LISTOP* first|LISTOP* last
1381 p       |I32    |apply          |I32 type|SV** mark|SV** sp
1382 Ap      |void   |apply_attrs_string|char *stashpv|CV *cv|char *attrstr|STRLEN len
1383 Ap      |SV*    |avhv_delete_ent|AV *ar|SV* keysv|I32 flags|U32 hash
1384 Ap      |bool   |avhv_exists_ent|AV *ar|SV* keysv|U32 hash
1385 Ap      |SV**   |avhv_fetch_ent |AV *ar|SV* keysv|I32 lval|U32 hash
1386 Ap      |SV**   |avhv_store_ent |AV *ar|SV* keysv|SV* val|U32 hash
1387 Ap      |HE*    |avhv_iternext  |AV *ar
1388 Ap      |SV*    |avhv_iterval   |AV *ar|HE* entry
1389 Ap      |HV*    |avhv_keys      |AV *ar
1390 Apd     |void   |av_clear       |AV* ar
1391 Apd     |SV*    |av_delete      |AV* ar|I32 key|I32 flags
1392 Apd     |bool   |av_exists      |AV* ar|I32 key
1393 Apd     |void   |av_extend      |AV* ar|I32 key
1394 p       |AV*    |av_fake        |I32 size|SV** svp
1395 Apd     |SV**   |av_fetch       |AV* ar|I32 key|I32 lval
1396 Apd     |void   |av_fill        |AV* ar|I32 fill
1397 Apd     |I32    |av_len         |AV* ar
1398 Apd     |AV*    |av_make        |I32 size|SV** svp
1399 Apd     |SV*    |av_pop         |AV* ar
1400 Apd     |void   |av_push        |AV* ar|SV* val
1401 p       |void   |av_reify       |AV* ar
1402 Apd     |SV*    |av_shift       |AV* ar
1403 Apd     |SV**   |av_store       |AV* ar|I32 key|SV* val
1404 Apd     |void   |av_undef       |AV* ar
1405 Apd     |void   |av_unshift     |AV* ar|I32 num
1406 p       |OP*    |bind_match     |I32 type|OP* left|OP* pat
1407 p       |OP*    |block_end      |I32 floor|OP* seq
1408 Ap      |I32    |block_gimme
1409 p       |int    |block_start    |int full
1410 p       |void   |boot_core_UNIVERSAL
1411 Ap      |void   |call_list      |I32 oldscope|AV* av_list
1412 p       |bool   |cando          |Mode_t mode|Uid_t effective|Stat_t* statbufp
1413 Ap      |U32    |cast_ulong     |NV f
1414 Ap      |I32    |cast_i32       |NV f
1415 Ap      |IV     |cast_iv        |NV f
1416 Ap      |UV     |cast_uv        |NV f
1417 #if !defined(HAS_TRUNCATE) && !defined(HAS_CHSIZE) && defined(F_FREESP)
1418 Ap      |I32    |my_chsize      |int fd|Off_t length
1419 #endif
1420 #if defined(USE_THREADS)
1421 Ap      |MAGIC* |condpair_magic |SV *sv
1422 #endif
1423 p       |OP*    |convert        |I32 optype|I32 flags|OP* o
1424 Afprd   |void   |croak          |const char* pat|...
1425 Apr     |void   |vcroak         |const char* pat|va_list* args
1426 #if defined(PERL_IMPLICIT_CONTEXT)
1427 Afnrp   |void   |croak_nocontext|const char* pat|...
1428 Afnp    |OP*    |die_nocontext  |const char* pat|...
1429 Afnp    |void   |deb_nocontext  |const char* pat|...
1430 Afnp    |char*  |form_nocontext |const char* pat|...
1431 Afnp    |void   |load_module_nocontext|U32 flags|SV* name|SV* ver|...
1432 Afnp    |SV*    |mess_nocontext |const char* pat|...
1433 Afnp    |void   |warn_nocontext |const char* pat|...
1434 Afnp    |void   |warner_nocontext|U32 err|const char* pat|...
1435 Afnp    |SV*    |newSVpvf_nocontext|const char* pat|...
1436 Afnp    |void   |sv_catpvf_nocontext|SV* sv|const char* pat|...
1437 Afnp    |void   |sv_setpvf_nocontext|SV* sv|const char* pat|...
1438 Afnp    |void   |sv_catpvf_mg_nocontext|SV* sv|const char* pat|...
1439 Afnp    |void   |sv_setpvf_mg_nocontext|SV* sv|const char* pat|...
1440 Afnp    |int    |fprintf_nocontext|PerlIO* stream|const char* fmt|...
1441 #endif
1442 p       |void   |cv_ckproto     |CV* cv|GV* gv|char* p
1443 p       |CV*    |cv_clone       |CV* proto
1444 Ap      |SV*    |cv_const_sv    |CV* cv
1445 p       |SV*    |op_const_sv    |OP* o|CV* cv
1446 Ap      |void   |cv_undef       |CV* cv
1447 Ap      |void   |cx_dump        |PERL_CONTEXT* cs
1448 Ap      |SV*    |filter_add     |filter_t funcp|SV* datasv
1449 Ap      |void   |filter_del     |filter_t funcp
1450 Ap      |I32    |filter_read    |int idx|SV* buffer|int maxlen
1451 Ap      |char** |get_op_descs
1452 Ap      |char** |get_op_names
1453 p       |char*  |get_no_modify
1454 p       |U32*   |get_opargs
1455 Ap      |PPADDR_t*|get_ppaddr
1456 p       |I32    |cxinc
1457 Afp     |void   |deb            |const char* pat|...
1458 Ap      |void   |vdeb           |const char* pat|va_list* args
1459 Ap      |void   |debprofdump
1460 Ap      |I32    |debop          |OP* o
1461 Ap      |I32    |debstack
1462 Ap      |I32    |debstackptrs
1463 Ap      |char*  |delimcpy       |char* to|char* toend|char* from \
1464                                 |char* fromend|int delim|I32* retlen
1465 p       |void   |deprecate      |char* s
1466 Afp     |OP*    |die            |const char* pat|...
1467 p       |OP*    |vdie           |const char* pat|va_list* args
1468 p       |OP*    |die_where      |char* message|STRLEN msglen
1469 Ap      |void   |dounwind       |I32 cxix
1470 p       |bool   |do_aexec       |SV* really|SV** mark|SV** sp
1471 p       |bool   |do_aexec5      |SV* really|SV** mark|SV** sp|int fd|int flag
1472 Ap      |int    |do_binmode     |PerlIO *fp|int iotype|int mode
1473 p       |void   |do_chop        |SV* asv|SV* sv
1474 Ap      |bool   |do_close       |GV* gv|bool not_implicit
1475 p       |bool   |do_eof         |GV* gv
1476 p       |bool   |do_exec        |char* cmd
1477 #if !defined(WIN32)
1478 p       |bool   |do_exec3       |char* cmd|int fd|int flag
1479 #endif
1480 p       |void   |do_execfree
1481 #if defined(HAS_MSG) || defined(HAS_SEM) || defined(HAS_SHM)
1482 p       |I32    |do_ipcctl      |I32 optype|SV** mark|SV** sp
1483 p       |I32    |do_ipcget      |I32 optype|SV** mark|SV** sp
1484 p       |I32    |do_msgrcv      |SV** mark|SV** sp
1485 p       |I32    |do_msgsnd      |SV** mark|SV** sp
1486 p       |I32    |do_semop       |SV** mark|SV** sp
1487 p       |I32    |do_shmio       |I32 optype|SV** mark|SV** sp
1488 #endif
1489 Ap      |void   |do_join        |SV* sv|SV* del|SV** mark|SV** sp
1490 p       |OP*    |do_kv
1491 Ap      |bool   |do_open        |GV* gv|char* name|I32 len|int as_raw \
1492                                 |int rawmode|int rawperm|PerlIO* supplied_fp
1493 Ap      |bool   |do_open9       |GV *gv|char *name|I32 len|int as_raw \
1494                                 |int rawmode|int rawperm|PerlIO *supplied_fp \
1495                                 |SV *svs|I32 num
1496 p       |void   |do_pipe        |SV* sv|GV* rgv|GV* wgv
1497 p       |bool   |do_print       |SV* sv|PerlIO* fp
1498 p       |OP*    |do_readline
1499 p       |I32    |do_chomp       |SV* sv
1500 p       |bool   |do_seek        |GV* gv|Off_t pos|int whence
1501 p       |void   |do_sprintf     |SV* sv|I32 len|SV** sarg
1502 p       |Off_t  |do_sysseek     |GV* gv|Off_t pos|int whence
1503 p       |Off_t  |do_tell        |GV* gv
1504 p       |I32    |do_trans       |SV* sv
1505 p       |UV     |do_vecget      |SV* sv|I32 offset|I32 size
1506 p       |void   |do_vecset      |SV* sv
1507 p       |void   |do_vop         |I32 optype|SV* sv|SV* left|SV* right
1508 p       |OP*    |dofile         |OP* term
1509 Ap      |I32    |dowantarray
1510 Ap      |void   |dump_all
1511 Ap      |void   |dump_eval
1512 #if defined(DUMP_FDS)
1513 Ap      |void   |dump_fds       |char* s
1514 #endif
1515 Ap      |void   |dump_form      |GV* gv
1516 Ap      |void   |gv_dump        |GV* gv
1517 Ap      |void   |op_dump        |OP* arg
1518 Ap      |void   |pmop_dump      |PMOP* pm
1519 Ap      |void   |dump_packsubs  |HV* stash
1520 Ap      |void   |dump_sub       |GV* gv
1521 Apd     |void   |fbm_compile    |SV* sv|U32 flags
1522 Apd     |char*  |fbm_instr      |unsigned char* big|unsigned char* bigend \
1523                                 |SV* littlesv|U32 flags
1524 p       |char*  |find_script    |char *scriptname|bool dosearch \
1525                                 |char **search_ext|I32 flags
1526 #if defined(USE_THREADS)
1527 p       |PADOFFSET|find_threadsv|const char *name
1528 #endif
1529 p       |OP*    |force_list     |OP* arg
1530 p       |OP*    |fold_constants |OP* arg
1531 Afp     |char*  |form           |const char* pat|...
1532 Ap      |char*  |vform          |const char* pat|va_list* args
1533 Ap      |void   |free_tmps
1534 p       |OP*    |gen_constant_list|OP* o
1535 #if !defined(HAS_GETENV_LEN)
1536 p       |char*  |getenv_len     |const char* key|unsigned long *len
1537 #endif
1538 Ap      |void   |gp_free        |GV* gv
1539 Ap      |GP*    |gp_ref         |GP* gp
1540 Ap      |GV*    |gv_AVadd       |GV* gv
1541 Ap      |GV*    |gv_HVadd       |GV* gv
1542 Ap      |GV*    |gv_IOadd       |GV* gv
1543 Ap      |GV*    |gv_autoload4   |HV* stash|const char* name|STRLEN len \
1544                                 |I32 method
1545 Ap      |void   |gv_check       |HV* stash
1546 Ap      |void   |gv_efullname   |SV* sv|GV* gv
1547 Ap      |void   |gv_efullname3  |SV* sv|GV* gv|const char* prefix
1548 Ap      |void   |gv_efullname4  |SV* sv|GV* gv|const char* prefix|bool keepmain
1549 Ap      |GV*    |gv_fetchfile   |const char* name
1550 Apd     |GV*    |gv_fetchmeth   |HV* stash|const char* name|STRLEN len \
1551                                 |I32 level
1552 Apd     |GV*    |gv_fetchmethod |HV* stash|const char* name
1553 Apd     |GV*    |gv_fetchmethod_autoload|HV* stash|const char* name \
1554                                 |I32 autoload
1555 Ap      |GV*    |gv_fetchpv     |const char* name|I32 add|I32 sv_type
1556 Ap      |void   |gv_fullname    |SV* sv|GV* gv
1557 Ap      |void   |gv_fullname3   |SV* sv|GV* gv|const char* prefix
1558 Ap      |void   |gv_fullname4   |SV* sv|GV* gv|const char* prefix|bool keepmain
1559 Ap      |void   |gv_init        |GV* gv|HV* stash|const char* name \
1560                                 |STRLEN len|int multi
1561 Apd     |HV*    |gv_stashpv     |const char* name|I32 create
1562 Ap      |HV*    |gv_stashpvn    |const char* name|U32 namelen|I32 create
1563 Apd     |HV*    |gv_stashsv     |SV* sv|I32 create
1564 Apd     |void   |hv_clear       |HV* tb
1565 Ap      |void   |hv_delayfree_ent|HV* hv|HE* entry
1566 Apd     |SV*    |hv_delete      |HV* tb|const char* key|U32 klen|I32 flags
1567 Apd     |SV*    |hv_delete_ent  |HV* tb|SV* key|I32 flags|U32 hash
1568 Apd     |bool   |hv_exists      |HV* tb|const char* key|U32 klen
1569 Apd     |bool   |hv_exists_ent  |HV* tb|SV* key|U32 hash
1570 Apd     |SV**   |hv_fetch       |HV* tb|const char* key|U32 klen|I32 lval
1571 Apd     |HE*    |hv_fetch_ent   |HV* tb|SV* key|I32 lval|U32 hash
1572 Ap      |void   |hv_free_ent    |HV* hv|HE* entry
1573 Apd     |I32    |hv_iterinit    |HV* tb
1574 Apd     |char*  |hv_iterkey     |HE* entry|I32* retlen
1575 Apd     |SV*    |hv_iterkeysv   |HE* entry
1576 Apd     |HE*    |hv_iternext    |HV* tb
1577 Apd     |SV*    |hv_iternextsv  |HV* hv|char** key|I32* retlen
1578 Apd     |SV*    |hv_iterval     |HV* tb|HE* entry
1579 Ap      |void   |hv_ksplit      |HV* hv|IV newmax
1580 Apd     |void   |hv_magic       |HV* hv|GV* gv|int how
1581 Apd     |SV**   |hv_store       |HV* tb|const char* key|U32 klen|SV* val \
1582                                 |U32 hash
1583 Apd     |HE*    |hv_store_ent   |HV* tb|SV* key|SV* val|U32 hash
1584 Apd     |void   |hv_undef       |HV* tb
1585 Ap      |I32    |ibcmp          |const char* a|const char* b|I32 len
1586 Ap      |I32    |ibcmp_locale   |const char* a|const char* b|I32 len
1587 p       |bool   |ingroup        |Gid_t testgid|Uid_t effective
1588 p       |void   |init_debugger
1589 Ap      |void   |init_stacks
1590 p       |U32    |intro_my
1591 Ap      |char*  |instr          |const char* big|const char* little
1592 p       |bool   |io_close       |IO* io|bool not_implicit
1593 p       |OP*    |invert         |OP* cmd
1594 dp      |bool   |is_gv_magical  |char *name|STRLEN len|U32 flags
1595 Ap      |bool   |is_uni_alnum   |U32 c
1596 Ap      |bool   |is_uni_alnumc  |U32 c
1597 Ap      |bool   |is_uni_idfirst |U32 c
1598 Ap      |bool   |is_uni_alpha   |U32 c
1599 Ap      |bool   |is_uni_ascii   |U32 c
1600 Ap      |bool   |is_uni_space   |U32 c
1601 Ap      |bool   |is_uni_cntrl   |U32 c
1602 Ap      |bool   |is_uni_graph   |U32 c
1603 Ap      |bool   |is_uni_digit   |U32 c
1604 Ap      |bool   |is_uni_upper   |U32 c
1605 Ap      |bool   |is_uni_lower   |U32 c
1606 Ap      |bool   |is_uni_print   |U32 c
1607 Ap      |bool   |is_uni_punct   |U32 c
1608 Ap      |bool   |is_uni_xdigit  |U32 c
1609 Ap      |U32    |to_uni_upper   |U32 c
1610 Ap      |U32    |to_uni_title   |U32 c
1611 Ap      |U32    |to_uni_lower   |U32 c
1612 Ap      |bool   |is_uni_alnum_lc|U32 c
1613 Ap      |bool   |is_uni_alnumc_lc|U32 c
1614 Ap      |bool   |is_uni_idfirst_lc|U32 c
1615 Ap      |bool   |is_uni_alpha_lc|U32 c
1616 Ap      |bool   |is_uni_ascii_lc|U32 c
1617 Ap      |bool   |is_uni_space_lc|U32 c
1618 Ap      |bool   |is_uni_cntrl_lc|U32 c
1619 Ap      |bool   |is_uni_graph_lc|U32 c
1620 Ap      |bool   |is_uni_digit_lc|U32 c
1621 Ap      |bool   |is_uni_upper_lc|U32 c
1622 Ap      |bool   |is_uni_lower_lc|U32 c
1623 Ap      |bool   |is_uni_print_lc|U32 c
1624 Ap      |bool   |is_uni_punct_lc|U32 c
1625 Ap      |bool   |is_uni_xdigit_lc|U32 c
1626 Ap      |U32    |to_uni_upper_lc|U32 c
1627 Ap      |U32    |to_uni_title_lc|U32 c
1628 Ap      |U32    |to_uni_lower_lc|U32 c
1629 Ap      |int    |is_utf8_char   |U8 *p
1630 Ap      |bool   |is_utf8_string |U8 *s|STRLEN len
1631 Ap      |bool   |is_utf8_alnum  |U8 *p
1632 Ap      |bool   |is_utf8_alnumc |U8 *p
1633 Ap      |bool   |is_utf8_idfirst|U8 *p
1634 Ap      |bool   |is_utf8_alpha  |U8 *p
1635 Ap      |bool   |is_utf8_ascii  |U8 *p
1636 Ap      |bool   |is_utf8_space  |U8 *p
1637 Ap      |bool   |is_utf8_cntrl  |U8 *p
1638 Ap      |bool   |is_utf8_digit  |U8 *p
1639 Ap      |bool   |is_utf8_graph  |U8 *p
1640 Ap      |bool   |is_utf8_upper  |U8 *p
1641 Ap      |bool   |is_utf8_lower  |U8 *p
1642 Ap      |bool   |is_utf8_print  |U8 *p
1643 Ap      |bool   |is_utf8_punct  |U8 *p
1644 Ap      |bool   |is_utf8_xdigit |U8 *p
1645 Ap      |bool   |is_utf8_mark   |U8 *p
1646 p       |OP*    |jmaybe         |OP* arg
1647 p       |I32    |keyword        |char* d|I32 len
1648 Ap      |void   |leave_scope    |I32 base
1649 p       |void   |lex_end
1650 p       |void   |lex_start      |SV* line
1651 p       |OP*    |linklist       |OP* o
1652 p       |OP*    |list           |OP* o
1653 p       |OP*    |listkids       |OP* o
1654 Afp     |void   |load_module|U32 flags|SV* name|SV* ver|...
1655 Ap      |void   |vload_module|U32 flags|SV* name|SV* ver|va_list* args
1656 p       |OP*    |localize       |OP* arg|I32 lexical
1657 Apd     |I32    |looks_like_number|SV* sv
1658 p       |int    |magic_clearenv |SV* sv|MAGIC* mg
1659 p       |int    |magic_clear_all_env|SV* sv|MAGIC* mg
1660 p       |int    |magic_clearpack|SV* sv|MAGIC* mg
1661 p       |int    |magic_clearsig |SV* sv|MAGIC* mg
1662 p       |int    |magic_existspack|SV* sv|MAGIC* mg
1663 p       |int    |magic_freeregexp|SV* sv|MAGIC* mg
1664 p       |int    |magic_get      |SV* sv|MAGIC* mg
1665 p       |int    |magic_getarylen|SV* sv|MAGIC* mg
1666 p       |int    |magic_getdefelem|SV* sv|MAGIC* mg
1667 p       |int    |magic_getglob  |SV* sv|MAGIC* mg
1668 p       |int    |magic_getnkeys |SV* sv|MAGIC* mg
1669 p       |int    |magic_getpack  |SV* sv|MAGIC* mg
1670 p       |int    |magic_getpos   |SV* sv|MAGIC* mg
1671 p       |int    |magic_getsig   |SV* sv|MAGIC* mg
1672 p       |int    |magic_getsubstr|SV* sv|MAGIC* mg
1673 p       |int    |magic_gettaint |SV* sv|MAGIC* mg
1674 p       |int    |magic_getuvar  |SV* sv|MAGIC* mg
1675 p       |int    |magic_getvec   |SV* sv|MAGIC* mg
1676 p       |U32    |magic_len      |SV* sv|MAGIC* mg
1677 #if defined(USE_THREADS)
1678 p       |int    |magic_mutexfree|SV* sv|MAGIC* mg
1679 #endif
1680 p       |int    |magic_nextpack |SV* sv|MAGIC* mg|SV* key
1681 p       |U32    |magic_regdata_cnt|SV* sv|MAGIC* mg
1682 p       |int    |magic_regdatum_get|SV* sv|MAGIC* mg
1683 p       |int    |magic_regdatum_set|SV* sv|MAGIC* mg
1684 p       |int    |magic_set      |SV* sv|MAGIC* mg
1685 p       |int    |magic_setamagic|SV* sv|MAGIC* mg
1686 p       |int    |magic_setarylen|SV* sv|MAGIC* mg
1687 p       |int    |magic_setbm    |SV* sv|MAGIC* mg
1688 p       |int    |magic_setdbline|SV* sv|MAGIC* mg
1689 #if defined(USE_LOCALE_COLLATE)
1690 p       |int    |magic_setcollxfrm|SV* sv|MAGIC* mg
1691 #endif
1692 p       |int    |magic_setdefelem|SV* sv|MAGIC* mg
1693 p       |int    |magic_setenv   |SV* sv|MAGIC* mg
1694 p       |int    |magic_setfm    |SV* sv|MAGIC* mg
1695 p       |int    |magic_setisa   |SV* sv|MAGIC* mg
1696 p       |int    |magic_setglob  |SV* sv|MAGIC* mg
1697 p       |int    |magic_setmglob |SV* sv|MAGIC* mg
1698 p       |int    |magic_setnkeys |SV* sv|MAGIC* mg
1699 p       |int    |magic_setpack  |SV* sv|MAGIC* mg
1700 p       |int    |magic_setpos   |SV* sv|MAGIC* mg
1701 p       |int    |magic_setsig   |SV* sv|MAGIC* mg
1702 p       |int    |magic_setsubstr|SV* sv|MAGIC* mg
1703 p       |int    |magic_settaint |SV* sv|MAGIC* mg
1704 p       |int    |magic_setuvar  |SV* sv|MAGIC* mg
1705 p       |int    |magic_setvec   |SV* sv|MAGIC* mg
1706 p       |int    |magic_set_all_env|SV* sv|MAGIC* mg
1707 p       |U32    |magic_sizepack |SV* sv|MAGIC* mg
1708 p       |int    |magic_wipepack |SV* sv|MAGIC* mg
1709 p       |void   |magicname      |char* sym|char* name|I32 namlen
1710 Ap      |void   |markstack_grow
1711 #if defined(USE_LOCALE_COLLATE)
1712 p       |char*  |mem_collxfrm   |const char* s|STRLEN len|STRLEN* xlen
1713 #endif
1714 Afp     |SV*    |mess           |const char* pat|...
1715 Ap      |SV*    |vmess          |const char* pat|va_list* args
1716 p       |void   |qerror         |SV* err
1717 Apd     |int    |mg_clear       |SV* sv
1718 Apd     |int    |mg_copy        |SV* sv|SV* nsv|const char* key|I32 klen
1719 Apd     |MAGIC* |mg_find        |SV* sv|int type
1720 Apd     |int    |mg_free        |SV* sv
1721 Apd     |int    |mg_get         |SV* sv
1722 Apd     |U32    |mg_length      |SV* sv
1723 Apd     |void   |mg_magical     |SV* sv
1724 Apd     |int    |mg_set         |SV* sv
1725 Ap      |I32    |mg_size        |SV* sv
1726 p       |OP*    |mod            |OP* o|I32 type
1727 p       |int    |mode_from_discipline|SV* discp
1728 Ap      |char*  |moreswitches   |char* s
1729 p       |OP*    |my             |OP* o
1730 Ap      |NV     |my_atof        |const char *s
1731 #if !defined(HAS_BCOPY) || !defined(HAS_SAFE_BCOPY)
1732 Anp     |char*  |my_bcopy       |const char* from|char* to|I32 len
1733 #endif
1734 #if !defined(HAS_BZERO) && !defined(HAS_MEMSET)
1735 Anp     |char*  |my_bzero       |char* loc|I32 len
1736 #endif
1737 Apr     |void   |my_exit        |U32 status
1738 Apr     |void   |my_failure_exit
1739 Ap      |I32    |my_fflush_all
1740 Ap      |I32    |my_lstat
1741 #if !defined(HAS_MEMCMP) || !defined(HAS_SANE_MEMCMP)
1742 Anp     |I32    |my_memcmp      |const char* s1|const char* s2|I32 len
1743 #endif
1744 #if !defined(HAS_MEMSET)
1745 Anp     |void*  |my_memset      |char* loc|I32 ch|I32 len
1746 #endif
1747 #if !defined(PERL_OBJECT)
1748 Ap      |I32    |my_pclose      |PerlIO* ptr
1749 Ap      |PerlIO*|my_popen       |char* cmd|char* mode
1750 #endif
1751 Ap      |void   |my_setenv      |char* nam|char* val
1752 Ap      |I32    |my_stat
1753 #if defined(MYSWAP)
1754 Ap      |short  |my_swap        |short s
1755 Ap      |long   |my_htonl       |long l
1756 Ap      |long   |my_ntohl       |long l
1757 #endif
1758 p       |void   |my_unexec
1759 Ap      |OP*    |newANONLIST    |OP* o
1760 Ap      |OP*    |newANONHASH    |OP* o
1761 Ap      |OP*    |newANONSUB     |I32 floor|OP* proto|OP* block
1762 Ap      |OP*    |newASSIGNOP    |I32 flags|OP* left|I32 optype|OP* right
1763 Ap      |OP*    |newCONDOP      |I32 flags|OP* expr|OP* trueop|OP* falseop
1764 Apd     |void   |newCONSTSUB    |HV* stash|char* name|SV* sv
1765 Ap      |void   |newFORM        |I32 floor|OP* o|OP* block
1766 Ap      |OP*    |newFOROP       |I32 flags|char* label|line_t forline \
1767                                 |OP* sclr|OP* expr|OP*block|OP*cont
1768 Ap      |OP*    |newLOGOP       |I32 optype|I32 flags|OP* left|OP* right
1769 Ap      |OP*    |newLOOPEX      |I32 type|OP* label
1770 Ap      |OP*    |newLOOPOP      |I32 flags|I32 debuggable|OP* expr|OP* block
1771 Ap      |OP*    |newNULLLIST
1772 Ap      |OP*    |newOP          |I32 optype|I32 flags
1773 Ap      |void   |newPROG        |OP* o
1774 Ap      |OP*    |newRANGE       |I32 flags|OP* left|OP* right
1775 Ap      |OP*    |newSLICEOP     |I32 flags|OP* subscript|OP* listop
1776 Ap      |OP*    |newSTATEOP     |I32 flags|char* label|OP* o
1777 Ap      |CV*    |newSUB         |I32 floor|OP* o|OP* proto|OP* block
1778 Apd     |CV*    |newXS          |char* name|XSUBADDR_t f|char* filename
1779 Apd     |AV*    |newAV
1780 Ap      |OP*    |newAVREF       |OP* o
1781 Ap      |OP*    |newBINOP       |I32 type|I32 flags|OP* first|OP* last
1782 Ap      |OP*    |newCVREF       |I32 flags|OP* o
1783 Ap      |OP*    |newGVOP        |I32 type|I32 flags|GV* gv
1784 Ap      |GV*    |newGVgen       |char* pack
1785 Ap      |OP*    |newGVREF       |I32 type|OP* o
1786 Ap      |OP*    |newHVREF       |OP* o
1787 Apd     |HV*    |newHV
1788 Ap      |HV*    |newHVhv        |HV* hv
1789 Ap      |IO*    |newIO
1790 Ap      |OP*    |newLISTOP      |I32 type|I32 flags|OP* first|OP* last
1791 Ap      |OP*    |newPADOP       |I32 type|I32 flags|SV* sv
1792 Ap      |OP*    |newPMOP        |I32 type|I32 flags
1793 Ap      |OP*    |newPVOP        |I32 type|I32 flags|char* pv
1794 Ap      |SV*    |newRV          |SV* pref
1795 Apd     |SV*    |newRV_noinc    |SV *sv
1796 Ap      |SV*    |newSV          |STRLEN len
1797 Ap      |OP*    |newSVREF       |OP* o
1798 Ap      |OP*    |newSVOP        |I32 type|I32 flags|SV* sv
1799 Apd     |SV*    |newSViv        |IV i
1800 Apd     |SV*    |newSVuv        |UV u
1801 Apd     |SV*    |newSVnv        |NV n
1802 Apd     |SV*    |newSVpv        |const char* s|STRLEN len
1803 Apd     |SV*    |newSVpvn       |const char* s|STRLEN len
1804 Afpd    |SV*    |newSVpvf       |const char* pat|...
1805 Ap      |SV*    |vnewSVpvf      |const char* pat|va_list* args
1806 Apd     |SV*    |newSVrv        |SV* rv|const char* classname
1807 Apd     |SV*    |newSVsv        |SV* old
1808 Ap      |OP*    |newUNOP        |I32 type|I32 flags|OP* first
1809 Ap      |OP*    |newWHILEOP     |I32 flags|I32 debuggable|LOOP* loop \
1810                                 |I32 whileline|OP* expr|OP* block|OP* cont
1811
1812 Ap      |PERL_SI*|new_stackinfo|I32 stitems|I32 cxitems
1813 p       |PerlIO*|nextargv       |GV* gv
1814 Ap      |char*  |ninstr         |const char* big|const char* bigend \
1815                                 |const char* little|const char* lend
1816 p       |OP*    |oopsCV         |OP* o
1817 Ap      |void   |op_free        |OP* arg
1818 p       |void   |package        |OP* o
1819 p       |PADOFFSET|pad_alloc    |I32 optype|U32 tmptype
1820 p       |PADOFFSET|pad_allocmy  |char* name
1821 p       |PADOFFSET|pad_findmy   |char* name
1822 p       |OP*    |oopsAV         |OP* o
1823 p       |OP*    |oopsHV         |OP* o
1824 p       |void   |pad_leavemy    |I32 fill
1825 Ap      |SV*    |pad_sv         |PADOFFSET po
1826 p       |void   |pad_free       |PADOFFSET po
1827 p       |void   |pad_reset
1828 p       |void   |pad_swipe      |PADOFFSET po
1829 p       |void   |peep           |OP* o
1830 #if defined(PERL_OBJECT)
1831 Aox     |void   |Perl_construct
1832 Aox     |void   |Perl_destruct
1833 Aox     |void   |Perl_free
1834 Aox     |int    |Perl_run
1835 Aox     |int    |Perl_parse     |XSINIT_t xsinit \
1836                                 |int argc|char** argv|char** env
1837 #endif
1838 #if defined(USE_THREADS)
1839 Ap      |struct perl_thread*    |new_struct_thread|struct perl_thread *t
1840 #endif
1841 Ap      |void   |call_atexit    |ATEXIT_t fn|void *ptr
1842 Apd     |I32    |call_argv      |const char* sub_name|I32 flags|char** argv
1843 Apd     |I32    |call_method    |const char* methname|I32 flags
1844 Apd     |I32    |call_pv        |const char* sub_name|I32 flags
1845 Apd     |I32    |call_sv        |SV* sv|I32 flags
1846 Apd     |SV*    |eval_pv        |const char* p|I32 croak_on_error
1847 Apd     |I32    |eval_sv        |SV* sv|I32 flags
1848 Apd     |SV*    |get_sv         |const char* name|I32 create
1849 Apd     |AV*    |get_av         |const char* name|I32 create
1850 Apd     |HV*    |get_hv         |const char* name|I32 create
1851 Apd     |CV*    |get_cv         |const char* name|I32 create
1852 Ap      |int    |init_i18nl10n  |int printwarn
1853 Ap      |int    |init_i18nl14n  |int printwarn
1854 Ap      |void   |new_collate    |const char* newcoll
1855 Ap      |void   |new_ctype      |const char* newctype
1856 Ap      |void   |new_numeric    |const char* newcoll
1857 Ap      |void   |set_numeric_local
1858 Ap      |void   |set_numeric_radix
1859 Ap      |void   |set_numeric_standard
1860 Apd     |void   |require_pv     |const char* pv
1861 p       |void   |pidgone        |Pid_t pid|int status
1862 Ap      |void   |pmflag         |U16* pmfl|int ch
1863 p       |OP*    |pmruntime      |OP* pm|OP* expr|OP* repl
1864 p       |OP*    |pmtrans        |OP* o|OP* expr|OP* repl
1865 p       |OP*    |pop_return
1866 Ap      |void   |pop_scope
1867 p       |OP*    |prepend_elem   |I32 optype|OP* head|OP* tail
1868 p       |void   |push_return    |OP* o
1869 Ap      |void   |push_scope
1870 p       |OP*    |ref            |OP* o|I32 type
1871 p       |OP*    |refkids        |OP* o|I32 type
1872 Ap      |void   |regdump        |regexp* r
1873 Ap      |I32    |pregexec       |regexp* prog|char* stringarg \
1874                                 |char* strend|char* strbeg|I32 minend \
1875                                 |SV* screamer|U32 nosave
1876 Ap      |void   |pregfree       |struct regexp* r
1877 Ap      |regexp*|pregcomp       |char* exp|char* xend|PMOP* pm
1878 Ap      |char*  |re_intuit_start|regexp* prog|SV* sv|char* strpos \
1879                                 |char* strend|U32 flags \
1880                                 |struct re_scream_pos_data_s *data
1881 Ap      |SV*    |re_intuit_string|regexp* prog
1882 Ap      |I32    |regexec_flags  |regexp* prog|char* stringarg \
1883                                 |char* strend|char* strbeg|I32 minend \
1884                                 |SV* screamer|void* data|U32 flags
1885 Ap      |regnode*|regnext       |regnode* p
1886 p       |void   |regprop        |SV* sv|regnode* o
1887 Ap      |void   |repeatcpy      |char* to|const char* from|I32 len|I32 count
1888 Ap      |char*  |rninstr        |const char* big|const char* bigend \
1889                                 |const char* little|const char* lend
1890 Ap      |Sighandler_t|rsignal   |int i|Sighandler_t t
1891 p       |int    |rsignal_restore|int i|Sigsave_t* t
1892 p       |int    |rsignal_save   |int i|Sighandler_t t1|Sigsave_t* t2
1893 p       |Sighandler_t|rsignal_state|int i
1894 p       |void   |rxres_free     |void** rsp
1895 p       |void   |rxres_restore  |void** rsp|REGEXP* prx
1896 p       |void   |rxres_save     |void** rsp|REGEXP* prx
1897 #if !defined(HAS_RENAME)
1898 p       |I32    |same_dirent    |char* a|char* b
1899 #endif
1900 Apd     |char*  |savepv         |const char* sv
1901 Apd     |char*  |savepvn        |const char* sv|I32 len
1902 Ap      |void   |savestack_grow
1903 Ap      |void   |save_aelem     |AV* av|I32 idx|SV **sptr
1904 Ap      |I32    |save_alloc     |I32 size|I32 pad
1905 Ap      |void   |save_aptr      |AV** aptr
1906 Ap      |AV*    |save_ary       |GV* gv
1907 Ap      |void   |save_clearsv   |SV** svp
1908 Ap      |void   |save_delete    |HV* hv|char* key|I32 klen
1909 Ap      |void   |save_destructor|DESTRUCTORFUNC_NOCONTEXT_t f|void* p
1910 Ap      |void   |save_destructor_x|DESTRUCTORFUNC_t f|void* p
1911 Ap      |void   |save_freesv    |SV* sv
1912 p       |void   |save_freeop    |OP* o
1913 Ap      |void   |save_freepv    |char* pv
1914 Ap      |void   |save_generic_svref|SV** sptr
1915 Ap      |void   |save_generic_pvref|char** str
1916 Ap      |void   |save_gp        |GV* gv|I32 empty
1917 Ap      |HV*    |save_hash      |GV* gv
1918 Ap      |void   |save_helem     |HV* hv|SV *key|SV **sptr
1919 Ap      |void   |save_hints
1920 Ap      |void   |save_hptr      |HV** hptr
1921 Ap      |void   |save_I16       |I16* intp
1922 Ap      |void   |save_I32       |I32* intp
1923 Ap      |void   |save_I8        |I8* bytep
1924 Ap      |void   |save_int       |int* intp
1925 Ap      |void   |save_item      |SV* item
1926 Ap      |void   |save_iv        |IV* iv
1927 Ap      |void   |save_list      |SV** sarg|I32 maxsarg
1928 Ap      |void   |save_long      |long* longp
1929 Ap      |void   |save_nogv      |GV* gv
1930 p       |void   |save_op
1931 Ap      |SV*    |save_scalar    |GV* gv
1932 Ap      |void   |save_pptr      |char** pptr
1933 Ap      |void   |save_vptr      |void* pptr
1934 Ap      |void   |save_re_context
1935 Ap      |void   |save_sptr      |SV** sptr
1936 Ap      |SV*    |save_svref     |SV** sptr
1937 Ap      |SV**   |save_threadsv  |PADOFFSET i
1938 p       |OP*    |sawparens      |OP* o
1939 p       |OP*    |scalar         |OP* o
1940 p       |OP*    |scalarkids     |OP* o
1941 p       |OP*    |scalarseq      |OP* o
1942 p       |OP*    |scalarvoid     |OP* o
1943 Ap      |NV     |scan_bin       |char* start|I32 len|I32* retlen
1944 Ap      |NV     |scan_hex       |char* start|I32 len|I32* retlen
1945 Ap      |char*  |scan_num       |char* s
1946 Ap      |NV     |scan_oct       |char* start|I32 len|I32* retlen
1947 p       |OP*    |scope          |OP* o
1948 Ap      |char*  |screaminstr    |SV* bigsv|SV* littlesv|I32 start_shift \
1949                                 |I32 end_shift|I32 *state|I32 last
1950 #if !defined(VMS)
1951 p       |I32    |setenv_getix   |char* nam
1952 #endif
1953 p       |void   |setdefout      |GV* gv
1954 Ap      |char*  |sharepvn       |const char* sv|I32 len|U32 hash
1955 p       |HEK*   |share_hek      |const char* sv|I32 len|U32 hash
1956 np      |Signal_t |sighandler   |int sig
1957 Ap      |SV**   |stack_grow     |SV** sp|SV**p|int n
1958 Ap      |I32    |start_subparse |I32 is_format|U32 flags
1959 p       |void   |sub_crush_depth|CV* cv
1960 Ap      |bool   |sv_2bool       |SV* sv
1961 Ap      |CV*    |sv_2cv         |SV* sv|HV** st|GV** gvp|I32 lref
1962 Ap      |IO*    |sv_2io         |SV* sv
1963 Ap      |IV     |sv_2iv         |SV* sv
1964 Apd     |SV*    |sv_2mortal     |SV* sv
1965 Ap      |NV     |sv_2nv         |SV* sv
1966 Ap      |char*  |sv_2pv         |SV* sv|STRLEN* lp
1967 Ap      |char*  |sv_2pvutf8     |SV* sv|STRLEN* lp
1968 Ap      |char*  |sv_2pvbyte     |SV* sv|STRLEN* lp
1969 Ap      |UV     |sv_2uv         |SV* sv
1970 Ap      |IV     |sv_iv          |SV* sv
1971 Ap      |UV     |sv_uv          |SV* sv
1972 Ap      |NV     |sv_nv          |SV* sv
1973 Ap      |char*  |sv_pvn         |SV *sv|STRLEN *len
1974 Ap      |char*  |sv_pvutf8n     |SV *sv|STRLEN *len
1975 Ap      |char*  |sv_pvbyten     |SV *sv|STRLEN *len
1976 Apd     |I32    |sv_true        |SV *sv
1977 p       |void   |sv_add_arena   |char* ptr|U32 size|U32 flags
1978 Ap      |int    |sv_backoff     |SV* sv
1979 Apd     |SV*    |sv_bless       |SV* sv|HV* stash
1980 Afpd    |void   |sv_catpvf      |SV* sv|const char* pat|...
1981 Ap      |void   |sv_vcatpvf     |SV* sv|const char* pat|va_list* args
1982 Apd     |void   |sv_catpv       |SV* sv|const char* ptr
1983 Apd     |void   |sv_catpvn      |SV* sv|const char* ptr|STRLEN len
1984 Apd     |void   |sv_catsv       |SV* dsv|SV* ssv
1985 Apd     |void   |sv_chop        |SV* sv|char* ptr
1986 p       |void   |sv_clean_all
1987 p       |void   |sv_clean_objs
1988 Apd     |void   |sv_clear       |SV* sv
1989 Apd     |I32    |sv_cmp         |SV* sv1|SV* sv2
1990 Apd     |I32    |sv_cmp_locale  |SV* sv1|SV* sv2
1991 #if defined(USE_LOCALE_COLLATE)
1992 Ap      |char*  |sv_collxfrm    |SV* sv|STRLEN* nxp
1993 #endif
1994 Ap      |OP*    |sv_compile_2op |SV* sv|OP** startp|char* code|AV** avp
1995 Apd     |void   |sv_dec         |SV* sv
1996 Ap      |void   |sv_dump        |SV* sv
1997 Apd     |bool   |sv_derived_from|SV* sv|const char* name
1998 Apd     |I32    |sv_eq          |SV* sv1|SV* sv2
1999 Apd     |void   |sv_free        |SV* sv
2000 p       |void   |sv_free_arenas
2001 Apd     |char*  |sv_gets        |SV* sv|PerlIO* fp|I32 append
2002 Apd     |char*  |sv_grow        |SV* sv|STRLEN newlen
2003 Apd     |void   |sv_inc         |SV* sv
2004 Apd     |void   |sv_insert      |SV* bigsv|STRLEN offset|STRLEN len \
2005                                 |char* little|STRLEN littlelen
2006 Apd     |int    |sv_isa         |SV* sv|const char* name
2007 Apd     |int    |sv_isobject    |SV* sv
2008 Apd     |STRLEN |sv_len         |SV* sv
2009 Apd     |STRLEN |sv_len_utf8    |SV* sv
2010 Apd     |void   |sv_magic       |SV* sv|SV* obj|int how|const char* name \
2011                                 |I32 namlen
2012 Apd     |SV*    |sv_mortalcopy  |SV* oldsv
2013 Apd     |SV*    |sv_newmortal
2014 Ap      |SV*    |sv_newref      |SV* sv
2015 Ap      |char*  |sv_peek        |SV* sv
2016 Ap      |void   |sv_pos_u2b     |SV* sv|I32* offsetp|I32* lenp
2017 Ap      |void   |sv_pos_b2u     |SV* sv|I32* offsetp
2018 Apd     |char*  |sv_pvn_force   |SV* sv|STRLEN* lp
2019 Apd     |char*  |sv_pvutf8n_force|SV* sv|STRLEN* lp
2020 Ap      |char*  |sv_pvbyten_force|SV* sv|STRLEN* lp
2021 Apd     |char*  |sv_reftype     |SV* sv|int ob
2022 Apd     |void   |sv_replace     |SV* sv|SV* nsv
2023 Ap      |void   |sv_report_used
2024 Ap      |void   |sv_reset       |char* s|HV* stash
2025 Afpd    |void   |sv_setpvf      |SV* sv|const char* pat|...
2026 Ap      |void   |sv_vsetpvf     |SV* sv|const char* pat|va_list* args
2027 Apd     |void   |sv_setiv       |SV* sv|IV num
2028 Apd     |void   |sv_setpviv     |SV* sv|IV num
2029 Apd     |void   |sv_setuv       |SV* sv|UV num
2030 Apd     |void   |sv_setnv       |SV* sv|NV num
2031 Apd     |SV*    |sv_setref_iv   |SV* rv|const char* classname|IV iv
2032 Apd     |SV*    |sv_setref_nv   |SV* rv|const char* classname|NV nv
2033 Apd     |SV*    |sv_setref_pv   |SV* rv|const char* classname|void* pv
2034 Apd     |SV*    |sv_setref_pvn  |SV* rv|const char* classname|char* pv \
2035                                 |STRLEN n
2036 Apd     |void   |sv_setpv       |SV* sv|const char* ptr
2037 Apd     |void   |sv_setpvn      |SV* sv|const char* ptr|STRLEN len
2038 Apd     |void   |sv_setsv       |SV* dsv|SV* ssv
2039 Ap      |void   |sv_taint       |SV* sv
2040 Ap      |bool   |sv_tainted     |SV* sv
2041 Apd     |int    |sv_unmagic     |SV* sv|int type
2042 Apd     |void   |sv_unref       |SV* sv
2043 Ap      |void   |sv_untaint     |SV* sv
2044 Apd     |bool   |sv_upgrade     |SV* sv|U32 mt
2045 Apd     |void   |sv_usepvn      |SV* sv|char* ptr|STRLEN len
2046 Apd     |void   |sv_vcatpvfn    |SV* sv|const char* pat|STRLEN patlen \
2047                                 |va_list* args|SV** svargs|I32 svmax \
2048                                 |bool *maybe_tainted
2049 Apd     |void   |sv_vsetpvfn    |SV* sv|const char* pat|STRLEN patlen \
2050                                 |va_list* args|SV** svargs|I32 svmax \
2051                                 |bool *maybe_tainted
2052 Ap      |NV     |str_to_version |SV *sv
2053 Ap      |SV*    |swash_init     |char* pkg|char* name|SV* listsv \
2054                                 |I32 minbits|I32 none
2055 Ap      |UV     |swash_fetch    |SV *sv|U8 *ptr
2056 Ap      |void   |taint_env
2057 Ap      |void   |taint_proper   |const char* f|const char* s
2058 Ap      |UV     |to_utf8_lower  |U8 *p
2059 Ap      |UV     |to_utf8_upper  |U8 *p
2060 Ap      |UV     |to_utf8_title  |U8 *p
2061 #if defined(UNLINK_ALL_VERSIONS)
2062 Ap      |I32    |unlnk          |char* f
2063 #endif
2064 #if defined(USE_THREADS)
2065 Ap      |void   |unlock_condpair|void* svv
2066 #endif
2067 Ap      |void   |unsharepvn     |const char* sv|I32 len|U32 hash
2068 p       |void   |unshare_hek    |HEK* hek
2069 p       |void   |utilize        |int aver|I32 floor|OP* version|OP* id|OP* arg
2070 Ap      |U8*    |utf16_to_utf8  |U8* p|U8 *d|I32 bytelen|I32 *newlen
2071 Ap      |U8*    |utf16_to_utf8_reversed|U8* p|U8 *d|I32 bytelen|I32 *newlen
2072 Ap      |I32    |utf8_distance  |U8 *a|U8 *b
2073 Ap      |U8*    |utf8_hop       |U8 *s|I32 off
2074 ApM     |U8*    |utf8_to_bytes  |U8 *s|STRLEN len
2075 ApM     |U8*    |bytes_to_utf8  |U8 *s|STRLEN *len
2076 Ap      |UV     |utf8_to_uv     |U8 *s|I32* retlen
2077 Ap      |U8*    |uv_to_utf8     |U8 *d|UV uv
2078 p       |void   |vivify_defelem |SV* sv
2079 p       |void   |vivify_ref     |SV* sv|U32 to_what
2080 p       |I32    |wait4pid       |Pid_t pid|int* statusp|int flags
2081 p       |void   |report_evil_fh |GV *gv|IO *io|I32 op
2082 p       |void   |report_uninit
2083 Afpd    |void   |warn           |const char* pat|...
2084 Ap      |void   |vwarn          |const char* pat|va_list* args
2085 Afp     |void   |warner         |U32 err|const char* pat|...
2086 Ap      |void   |vwarner        |U32 err|const char* pat|va_list* args
2087 p       |void   |watch          |char** addr
2088 Ap      |I32    |whichsig       |char* sig
2089 p       |int    |yyerror        |char* s
2090 #if defined(USE_PURE_BISON)
2091 p       |int    |yylex          |YYSTYPE *lvalp|int *lcharp
2092 #else
2093 p       |int    |yylex
2094 #endif
2095 p       |int    |yyparse
2096 p       |int    |yywarn         |char* s
2097 #if defined(MYMALLOC)
2098 Ap      |void   |dump_mstats    |char* s
2099 Ap      |int    |get_mstats     |perl_mstats_t *buf|int buflen|int level
2100 #endif
2101 Anp     |Malloc_t|safesysmalloc |MEM_SIZE nbytes
2102 Anp     |Malloc_t|safesyscalloc |MEM_SIZE elements|MEM_SIZE size
2103 Anp     |Malloc_t|safesysrealloc|Malloc_t where|MEM_SIZE nbytes
2104 Anp     |Free_t |safesysfree    |Malloc_t where
2105 #if defined(LEAKTEST)
2106 Anp     |Malloc_t|safexmalloc   |I32 x|MEM_SIZE size
2107 Anp     |Malloc_t|safexcalloc   |I32 x|MEM_SIZE elements|MEM_SIZE size
2108 Anp     |Malloc_t|safexrealloc  |Malloc_t where|MEM_SIZE size
2109 Anp     |void   |safexfree      |Malloc_t where
2110 #endif
2111 #if defined(PERL_GLOBAL_STRUCT)
2112 Ap      |struct perl_vars *|GetVars
2113 #endif
2114 Ap      |int    |runops_standard
2115 Ap      |int    |runops_debug
2116 #if defined(USE_THREADS)
2117 Ap      |SV*    |sv_lock        |SV *sv
2118 #endif
2119 Afpd    |void   |sv_catpvf_mg   |SV *sv|const char* pat|...
2120 Ap      |void   |sv_vcatpvf_mg  |SV* sv|const char* pat|va_list* args
2121 Apd     |void   |sv_catpv_mg    |SV *sv|const char *ptr
2122 Apd     |void   |sv_catpvn_mg   |SV *sv|const char *ptr|STRLEN len
2123 Apd     |void   |sv_catsv_mg    |SV *dstr|SV *sstr
2124 Afpd    |void   |sv_setpvf_mg   |SV *sv|const char* pat|...
2125 Ap      |void   |sv_vsetpvf_mg  |SV* sv|const char* pat|va_list* args
2126 Apd     |void   |sv_setiv_mg    |SV *sv|IV i
2127 Apd     |void   |sv_setpviv_mg  |SV *sv|IV iv
2128 Apd     |void   |sv_setuv_mg    |SV *sv|UV u
2129 Apd     |void   |sv_setnv_mg    |SV *sv|NV num
2130 Apd     |void   |sv_setpv_mg    |SV *sv|const char *ptr
2131 Apd     |void   |sv_setpvn_mg   |SV *sv|const char *ptr|STRLEN len
2132 Apd     |void   |sv_setsv_mg    |SV *dstr|SV *sstr
2133 Apd     |void   |sv_usepvn_mg   |SV *sv|char *ptr|STRLEN len
2134 Ap      |MGVTBL*|get_vtbl       |int vtbl_id
2135 p       |char*  |pv_display     |SV *sv|char *pv|STRLEN cur|STRLEN len \
2136                                 |STRLEN pvlim
2137 Afp     |void   |dump_indent    |I32 level|PerlIO *file|const char* pat|...
2138 Ap      |void   |dump_vindent   |I32 level|PerlIO *file|const char* pat \
2139                                 |va_list *args
2140 Ap      |void   |do_gv_dump     |I32 level|PerlIO *file|char *name|GV *sv
2141 Ap      |void   |do_gvgv_dump   |I32 level|PerlIO *file|char *name|GV *sv
2142 Ap      |void   |do_hv_dump     |I32 level|PerlIO *file|char *name|HV *sv
2143 Ap      |void   |do_magic_dump  |I32 level|PerlIO *file|MAGIC *mg|I32 nest \
2144                                 |I32 maxnest|bool dumpops|STRLEN pvlim
2145 Ap      |void   |do_op_dump     |I32 level|PerlIO *file|OP *o
2146 Ap      |void   |do_pmop_dump   |I32 level|PerlIO *file|PMOP *pm
2147 Ap      |void   |do_sv_dump     |I32 level|PerlIO *file|SV *sv|I32 nest \
2148                                 |I32 maxnest|bool dumpops|STRLEN pvlim
2149 Ap      |void   |magic_dump     |MAGIC *mg
2150 #if defined(PERL_FLEXIBLE_EXCEPTIONS)
2151 Ap      |void*  |default_protect|volatile JMPENV *je|int *excpt \
2152                                 |protect_body_t body|...
2153 Ap      |void*  |vdefault_protect|volatile JMPENV *je|int *excpt \
2154                                 |protect_body_t body|va_list *args
2155 #endif
2156 Ap      |void   |reginitcolors
2157 Ap      |char*  |sv_2pv_nolen   |SV* sv
2158 Ap      |char*  |sv_2pvutf8_nolen|SV* sv
2159 Ap      |char*  |sv_2pvbyte_nolen|SV* sv
2160 Ap      |char*  |sv_pv          |SV *sv
2161 Ap      |char*  |sv_pvutf8      |SV *sv
2162 Ap      |char*  |sv_pvbyte      |SV *sv
2163 Apd      |void   |sv_utf8_upgrade|SV *sv
2164 ApdM      |bool   |sv_utf8_downgrade|SV *sv|bool fail_ok
2165 ApdM      |void   |sv_utf8_encode |SV *sv
2166 Ap      |bool   |sv_utf8_decode |SV *sv
2167 Ap      |void   |sv_force_normal|SV *sv
2168 Ap      |void   |tmps_grow      |I32 n
2169 Apd     |SV*    |sv_rvweaken    |SV *sv
2170 p       |int    |magic_killbackrefs|SV *sv|MAGIC *mg
2171 Ap      |OP*    |newANONATTRSUB |I32 floor|OP *proto|OP *attrs|OP *block
2172 Ap      |CV*    |newATTRSUB     |I32 floor|OP *o|OP *proto|OP *attrs|OP *block
2173 Ap      |void   |newMYSUB       |I32 floor|OP *o|OP *proto|OP *attrs|OP *block
2174 p       |OP *   |my_attrs       |OP *o|OP *attrs
2175 p       |void   |boot_core_xsutils
2176 #if defined(USE_ITHREADS)
2177 Ap      |PERL_CONTEXT*|cx_dup   |PERL_CONTEXT* cx|I32 ix|I32 max
2178 Ap      |PERL_SI*|si_dup        |PERL_SI* si
2179 Ap      |ANY*   |ss_dup         |PerlInterpreter* proto_perl
2180 Ap      |void*  |any_dup        |void* v|PerlInterpreter* proto_perl
2181 Ap      |HE*    |he_dup         |HE* e|bool shared
2182 Ap      |REGEXP*|re_dup         |REGEXP* r
2183 Ap      |PerlIO*|fp_dup         |PerlIO* fp|char type
2184 Ap      |DIR*   |dirp_dup       |DIR* dp
2185 Ap      |GP*    |gp_dup         |GP* gp
2186 Ap      |MAGIC* |mg_dup         |MAGIC* mg
2187 Ap      |SV*    |sv_dup         |SV* sstr
2188 #if defined(HAVE_INTERP_INTERN)
2189 Ap      |void   |sys_intern_dup |struct interp_intern* src \
2190                                 |struct interp_intern* dst
2191 #endif
2192 Ap      |PTR_TBL_t*|ptr_table_new
2193 Ap      |void*  |ptr_table_fetch|PTR_TBL_t *tbl|void *sv
2194 Ap      |void   |ptr_table_store|PTR_TBL_t *tbl|void *oldsv|void *newsv
2195 Ap      |void   |ptr_table_split|PTR_TBL_t *tbl
2196 #endif
2197 #if defined(HAVE_INTERP_INTERN)
2198 Ap      |void   |sys_intern_clear
2199 Ap      |void   |sys_intern_init
2200 #endif
2201
2202 #if defined(PERL_OBJECT)
2203 protected:
2204 #else
2205 END_EXTERN_C
2206 #endif
2207
2208 #if defined(PERL_IN_AV_C) || defined(PERL_DECL_PROT)
2209 s       |I32    |avhv_index_sv  |SV* sv
2210 s       |I32    |avhv_index     |AV* av|SV* sv|U32 hash
2211 #endif
2212
2213 #if defined(PERL_IN_DOOP_C) || defined(PERL_DECL_PROT)
2214 s       |I32    |do_trans_simple        |SV *sv
2215 s       |I32    |do_trans_count         |SV *sv
2216 s       |I32    |do_trans_complex       |SV *sv
2217 s       |I32    |do_trans_simple_utf8   |SV *sv
2218 s       |I32    |do_trans_count_utf8    |SV *sv
2219 s       |I32    |do_trans_complex_utf8  |SV *sv
2220 #endif
2221
2222 #if defined(PERL_IN_GV_C) || defined(PERL_DECL_PROT)
2223 s       |void   |gv_init_sv     |GV *gv|I32 sv_type
2224 #endif
2225
2226 #if defined(PERL_IN_HV_C) || defined(PERL_DECL_PROT)
2227 s       |void   |hsplit         |HV *hv
2228 s       |void   |hfreeentries   |HV *hv
2229 s       |void   |more_he
2230 s       |HE*    |new_he
2231 s       |void   |del_he         |HE *p
2232 s       |HEK*   |save_hek       |const char *str|I32 len|U32 hash
2233 s       |void   |hv_magic_check |HV *hv|bool *needs_copy|bool *needs_store
2234 #endif
2235
2236 #if defined(PERL_IN_MG_C) || defined(PERL_DECL_PROT)
2237 s       |void   |save_magic     |I32 mgs_ix|SV *sv
2238 s       |int    |magic_methpack |SV *sv|MAGIC *mg|char *meth
2239 s       |int    |magic_methcall |SV *sv|MAGIC *mg|char *meth|I32 f \
2240                                 |int n|SV *val
2241 #endif
2242
2243 #if defined(PERL_IN_OP_C) || defined(PERL_DECL_PROT)
2244 s       |I32    |list_assignment|OP *o
2245 s       |void   |bad_type       |I32 n|char *t|char *name|OP *kid
2246 s       |void   |cop_free       |COP *cop
2247 s       |OP*    |modkids        |OP *o|I32 type
2248 s       |void   |no_bareword_allowed|OP *o
2249 s       |OP*    |no_fh_allowed  |OP *o
2250 s       |OP*    |scalarboolean  |OP *o
2251 s       |OP*    |too_few_arguments|OP *o|char* name
2252 s       |OP*    |too_many_arguments|OP *o|char* name
2253 s       |void   |op_clear       |OP* o
2254 s       |void   |null           |OP* o
2255 s       |PADOFFSET|pad_addlex   |SV* name
2256 s       |PADOFFSET|pad_findlex  |char* name|PADOFFSET newoff|U32 seq \
2257                                 |CV* startcv|I32 cx_ix|I32 saweval|U32 flags
2258 s       |OP*    |newDEFSVOP
2259 s       |OP*    |new_logop      |I32 type|I32 flags|OP **firstp|OP **otherp
2260 s       |void   |simplify_sort  |OP *o
2261 s       |bool   |is_handle_constructor  |OP *o|I32 argnum
2262 s       |char*  |gv_ename       |GV *gv
2263 s       |void   |cv_dump        |CV *cv
2264 s       |CV*    |cv_clone2      |CV *proto|CV *outside
2265 s       |bool   |scalar_mod_type|OP *o|I32 type
2266 s       |OP *   |my_kid         |OP *o|OP *attrs
2267 s       |OP *   |dup_attrlist   |OP *o
2268 s       |void   |apply_attrs    |HV *stash|SV *target|OP *attrs
2269 #  if defined(PL_OP_SLAB_ALLOC)
2270 s       |void*  |Slab_Alloc     |int m|size_t sz
2271 #  endif
2272 #endif
2273
2274 #if defined(PERL_IN_PERL_C) || defined(PERL_DECL_PROT)
2275 s       |void   |find_beginning
2276 s       |void   |forbid_setid   |char *
2277 s       |void   |incpush        |char *|int|int
2278 s       |void   |init_interp
2279 s       |void   |init_ids
2280 s       |void   |init_lexer
2281 s       |void   |init_main_stash
2282 s       |void   |init_perllib
2283 s       |void   |init_postdump_symbols|int|char **|char **
2284 s       |void   |init_predump_symbols
2285 rs      |void   |my_exit_jump
2286 s       |void   |nuke_stacks
2287 s       |void   |open_script    |char *|bool|SV *|int *fd
2288 s       |void   |usage          |char *
2289 s       |void   |validate_suid  |char *|char*|int
2290 #  if defined(IAMSUID)
2291 s       |int    |fd_on_nosuid_fs|int fd
2292 #  endif
2293 s       |void*  |parse_body     |char **env|XSINIT_t xsinit
2294 s       |void*  |run_body       |I32 oldscope
2295 s       |void   |call_body      |OP *myop|int is_eval
2296 s       |void*  |call_list_body |CV *cv
2297 #if defined(PERL_FLEXIBLE_EXCEPTIONS)
2298 s       |void*  |vparse_body    |va_list args
2299 s       |void*  |vrun_body      |va_list args
2300 s       |void*  |vcall_body     |va_list args
2301 s       |void*  |vcall_list_body|va_list args
2302 #endif
2303 #  if defined(USE_THREADS)
2304 s       |struct perl_thread *   |init_main_thread
2305 #  endif
2306 #endif
2307
2308 #if defined(PERL_IN_PP_C) || defined(PERL_DECL_PROT)
2309 s       |void   |doencodes      |SV* sv|char* s|I32 len
2310 s       |SV*    |refto          |SV* sv
2311 s       |U32    |seed
2312 s       |SV*    |mul128         |SV *sv|U8 m
2313 s       |SV*    |is_an_int      |char *s|STRLEN l
2314 s       |int    |div128         |SV *pnum|bool *done
2315 #endif
2316
2317 #if defined(PERL_IN_PP_CTL_C) || defined(PERL_DECL_PROT)
2318 s       |OP*    |docatch        |OP *o
2319 s       |void*  |docatch_body
2320 #if defined(PERL_FLEXIBLE_EXCEPTIONS)
2321 s       |void*  |vdocatch_body  |va_list args
2322 #endif
2323 s       |OP*    |dofindlabel    |OP *o|char *label|OP **opstack|OP **oplimit
2324 s       |void   |doparseform    |SV *sv
2325 s       |I32    |dopoptoeval    |I32 startingblock
2326 s       |I32    |dopoptolabel   |char *label
2327 s       |I32    |dopoptoloop    |I32 startingblock
2328 s       |I32    |dopoptosub     |I32 startingblock
2329 s       |I32    |dopoptosub_at  |PERL_CONTEXT* cxstk|I32 startingblock
2330 s       |void   |free_closures
2331 s       |void   |save_lines     |AV *array|SV *sv
2332 s       |OP*    |doeval         |int gimme|OP** startop
2333 s       |PerlIO *|doopen_pmc    |const char *name|const char *mode
2334 s       |void   |qsortsv        |SV ** array|size_t num_elts|SVCOMPARE_t f
2335 #endif
2336
2337 #if defined(PERL_IN_PP_HOT_C) || defined(PERL_DECL_PROT)
2338 s       |int    |do_maybe_phash |AV *ary|SV **lelem|SV **firstlelem \
2339                                 |SV **relem|SV **lastrelem
2340 s       |void   |do_oddball     |HV *hash|SV **relem|SV **firstrelem
2341 s       |CV*    |get_db_sub     |SV **svp|CV *cv
2342 s       |SV*    |method_common  |SV* meth|U32* hashp
2343 #endif
2344
2345 #if defined(PERL_IN_PP_SYS_C) || defined(PERL_DECL_PROT)
2346 s       |OP*    |doform         |CV *cv|GV *gv|OP *retop
2347 s       |int    |emulate_eaccess|const char* path|Mode_t mode
2348 #  if !defined(HAS_MKDIR) || !defined(HAS_RMDIR)
2349 s       |int    |dooneliner     |char *cmd|char *filename
2350 #  endif
2351 #endif
2352
2353 #if defined(PERL_IN_REGCOMP_C) || defined(PERL_DECL_PROT)
2354 s       |regnode*|reg           |I32|I32 *
2355 s       |regnode*|reganode      |U8|U32
2356 s       |regnode*|regatom       |I32 *
2357 s       |regnode*|regbranch     |I32 *|I32
2358 s       |void   |reguni         |UV|char *|I32*
2359 s       |regnode*|regclass
2360 s       |regnode*|regclassutf8
2361 s       |I32    |regcurly       |char *
2362 s       |regnode*|reg_node      |U8
2363 s       |regnode*|regpiece      |I32 *
2364 s       |void   |reginsert      |U8|regnode *
2365 s       |void   |regoptail      |regnode *|regnode *
2366 s       |void   |regtail        |regnode *|regnode *
2367 s       |char*|regwhite |char *|char *
2368 s       |char*|nextchar
2369 s       |regnode*|dumpuntil     |regnode *start|regnode *node \
2370                                 |regnode *last|SV* sv|I32 l
2371 s       |void   |put_byte       |SV* sv|int c
2372 s       |void   |scan_commit    |struct scan_data_t *data
2373 s       |void   |cl_anything    |struct regnode_charclass_class *cl
2374 s       |int    |cl_is_anything |struct regnode_charclass_class *cl
2375 s       |void   |cl_init        |struct regnode_charclass_class *cl
2376 s       |void   |cl_init_zero   |struct regnode_charclass_class *cl
2377 s       |void   |cl_and         |struct regnode_charclass_class *cl \
2378                                 |struct regnode_charclass_class *and_with
2379 s       |void   |cl_or          |struct regnode_charclass_class *cl \
2380                                 |struct regnode_charclass_class *or_with
2381 s       |I32    |study_chunk    |regnode **scanp|I32 *deltap \
2382                                 |regnode *last|struct scan_data_t *data \
2383                                 |U32 flags
2384 s       |I32    |add_data       |I32 n|char *s
2385 rs      |void|re_croak2 |const char* pat1|const char* pat2|...
2386 s       |I32    |regpposixcc    |I32 value
2387 s       |void   |checkposixcc
2388 #endif
2389
2390 #if defined(PERL_IN_REGEXEC_C) || defined(PERL_DECL_PROT)
2391 s       |I32    |regmatch       |regnode *prog
2392 s       |I32    |regrepeat      |regnode *p|I32 max
2393 s       |I32    |regrepeat_hard |regnode *p|I32 max|I32 *lp
2394 s       |I32    |regtry         |regexp *prog|char *startpos
2395 s       |bool   |reginclass     |regnode *p|I32 c
2396 s       |bool   |reginclassutf8 |regnode *f|U8* p
2397 s       |CHECKPOINT|regcppush   |I32 parenfloor
2398 s       |char*|regcppop
2399 s       |char*|regcp_set_to     |I32 ss
2400 s       |void   |cache_re       |regexp *prog
2401 s       |U8*    |reghop         |U8 *pos|I32 off
2402 s       |U8*    |reghopmaybe    |U8 *pos|I32 off
2403 s       |char*  |find_byclass   |regexp * prog|regnode *c|char *s|char *strend|char *startpos|I32 norun
2404 #endif
2405
2406 #if defined(PERL_IN_RUN_C) || defined(PERL_DECL_PROT)
2407 s       |void   |debprof        |OP *o
2408 #endif
2409
2410 #if defined(PERL_IN_SCOPE_C) || defined(PERL_DECL_PROT)
2411 s       |SV*    |save_scalar_at |SV **sptr
2412 #endif
2413
2414 #if defined(PERL_IN_SV_C) || defined(PERL_DECL_PROT)
2415 s       |IV     |asIV           |SV* sv
2416 s       |UV     |asUV           |SV* sv
2417 s       |SV*    |more_sv
2418 s       |void   |more_xiv
2419 s       |void   |more_xnv
2420 s       |void   |more_xpv
2421 s       |void   |more_xpviv
2422 s       |void   |more_xpvnv
2423 s       |void   |more_xpvcv
2424 s       |void   |more_xpvav
2425 s       |void   |more_xpvhv
2426 s       |void   |more_xpvmg
2427 s       |void   |more_xpvlv
2428 s       |void   |more_xpvbm
2429 s       |void   |more_xrv
2430 s       |XPVIV* |new_xiv
2431 s       |XPVNV* |new_xnv
2432 s       |XPV*   |new_xpv
2433 s       |XPVIV* |new_xpviv
2434 s       |XPVNV* |new_xpvnv
2435 s       |XPVCV* |new_xpvcv
2436 s       |XPVAV* |new_xpvav
2437 s       |XPVHV* |new_xpvhv
2438 s       |XPVMG* |new_xpvmg
2439 s       |XPVLV* |new_xpvlv
2440 s       |XPVBM* |new_xpvbm
2441 s       |XRV*   |new_xrv
2442 s       |void   |del_xiv        |XPVIV* p
2443 s       |void   |del_xnv        |XPVNV* p
2444 s       |void   |del_xpv        |XPV* p
2445 s       |void   |del_xpviv      |XPVIV* p
2446 s       |void   |del_xpvnv      |XPVNV* p
2447 s       |void   |del_xpvcv      |XPVCV* p
2448 s       |void   |del_xpvav      |XPVAV* p
2449 s       |void   |del_xpvhv      |XPVHV* p
2450 s       |void   |del_xpvmg      |XPVMG* p
2451 s       |void   |del_xpvlv      |XPVLV* p
2452 s       |void   |del_xpvbm      |XPVBM* p
2453 s       |void   |del_xrv        |XRV* p
2454 s       |void   |sv_unglob      |SV* sv
2455 s       |void   |not_a_number   |SV *sv
2456 s       |void   |visit          |SVFUNC_t f
2457 s       |void   |sv_add_backref |SV *tsv|SV *sv
2458 s       |void   |sv_del_backref |SV *sv
2459 #  if defined(DEBUGGING)
2460 s       |void   |del_sv |SV *p
2461 #  endif
2462 #endif
2463
2464 #if defined(PERL_IN_TOKE_C) || defined(PERL_DECL_PROT)
2465 s       |void   |check_uni
2466 s       |void   |force_next     |I32 type
2467 s       |char*  |force_version  |char *start
2468 s       |char*  |force_word     |char *start|int token|int check_keyword \
2469                                 |int allow_pack|int allow_tick
2470 s       |SV*    |tokeq          |SV *sv
2471 s       |char*  |scan_const     |char *start
2472 s       |char*  |scan_formline  |char *s
2473 s       |char*  |scan_heredoc   |char *s
2474 s       |char*  |scan_ident     |char *s|char *send|char *dest \
2475                                 |STRLEN destlen|I32 ck_uni
2476 s       |char*  |scan_inputsymbol|char *start
2477 s       |char*  |scan_pat       |char *start|I32 type
2478 s       |char*  |scan_str       |char *start|int keep_quoted|int keep_delims
2479 s       |char*  |scan_subst     |char *start
2480 s       |char*  |scan_trans     |char *start
2481 s       |char*  |scan_word      |char *s|char *dest|STRLEN destlen \
2482                                 |int allow_package|STRLEN *slp
2483 s       |char*  |skipspace      |char *s
2484 s       |char*  |swallow_bom    |U8 *s
2485 s       |void   |checkcomma     |char *s|char *name|char *what
2486 s       |void   |force_ident    |char *s|int kind
2487 s       |void   |incline        |char *s
2488 s       |int    |intuit_method  |char *s|GV *gv
2489 s       |int    |intuit_more    |char *s
2490 s       |I32    |lop            |I32 f|int x|char *s
2491 s       |void   |missingterm    |char *s
2492 s       |void   |no_op          |char *what|char *s
2493 s       |void   |set_csh
2494 s       |I32    |sublex_done
2495 s       |I32    |sublex_push
2496 s       |I32    |sublex_start
2497 s       |char * |filter_gets    |SV *sv|PerlIO *fp|STRLEN append
2498 s       |HV *   |find_in_my_stash|char *pkgname|I32 len
2499 s       |SV*    |new_constant   |char *s|STRLEN len|const char *key|SV *sv \
2500                                 |SV *pv|const char *type
2501 s       |int    |ao             |int toketype
2502 s       |void   |depcom
2503 s       |char*  |incl_perldb
2504 #if 0
2505 s       |I32    |utf16_textfilter|int idx|SV *sv|int maxlen
2506 s       |I32    |utf16rev_textfilter|int idx|SV *sv|int maxlen
2507 #endif
2508 #  if defined(CRIPPLED_CC)
2509 s       |int    |uni            |I32 f|char *s
2510 #  endif
2511 #  if defined(PERL_CR_FILTER)
2512 s       |I32    |cr_textfilter  |int idx|SV *sv|int maxlen
2513 #  endif
2514 #endif
2515
2516 #if defined(PERL_IN_UNIVERSAL_C) || defined(PERL_DECL_PROT)
2517 s       |SV*|isa_lookup |HV *stash|const char *name|int len|int level
2518 #endif
2519
2520 #if defined(PERL_IN_UTIL_C) || defined(PERL_DECL_PROT)
2521 s       |SV*    |mess_alloc
2522 #  if defined(LEAKTEST)
2523 s       |void   |xstat          |int
2524 #  endif
2525 #endif
2526
2527 #if defined(PERL_OBJECT)
2528 };
2529 #endif