This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
New lightweight Carp has a require. If Carp is used in a __DIE__ handler
[perl5.git] / embed.pl
CommitLineData
5f05dabc 1#!/usr/bin/perl -w
e50aee73 2
5f05dabc
PP
3require 5.003;
4
cea2e8a9
GS
5#
6# See database of global and static function prototypes at the __END__.
7# This is used to generate prototype headers under various configurations,
8# export symbols lists for different platforms, and macros to provide an
9# implicit interpreter context argument.
10#
11
12my $END = tell DATA;
13
14# walk table providing an array of components in each line to
15# subroutine, printing the result
16sub walk_table (&@) {
17 my $function = shift;
18 my $filename = shift || '-';
19 my $leader = shift;
20 my $trailer = shift;
21 my $F;
22 local *F;
23 if (ref $filename) { # filehandle
24 $F = $filename;
25 }
26 else {
27 open F, ">$filename" or die "Can't open $filename: $!";
28 $F = \*F;
29 }
30 print $F $leader if $leader;
31 seek DATA, $END, 0; # so we may restart
32 while (<DATA>) {
33 chomp;
34 while (s|\\$||) {
35 $_ .= <DATA>;
36 chomp;
37 }
38 my @args;
39 if (/^\s*(#|$)/) {
40 @args = $_;
41 }
42 else {
43 @args = split /\s*\|\s*/, $_;
44 }
45 print $F $function->(@args);
46 }
47 print $F $trailer if $trailer;
48 close $F unless ref $filename;
49}
50
51sub munge_c_files () {
52 my $functions = {};
53 unless (@ARGV) {
54 warn "\@ARGV empty, nothing to do\n";
55 return;
56 }
57 walk_table {
58 if (@_ > 1) {
59 $functions->{$_[2]} = \@_ if $_[@_-1] =~ /\.\.\./;
60 }
61 } '/dev/null';
62 local $^I = '.bak';
63 while (<>) {
64# if (/^#\s*include\s+"perl.h"/) {
65# my $file = uc $ARGV;
66# $file =~ s/\./_/g;
67# print "#define PERL_IN_$file\n";
68# }
69# s{^(\w+)\s*\(}
70# {
71# my $f = $1;
72# my $repl = "$f(";
73# if (exists $functions->{$f}) {
74# my $flags = $functions->{$f}[0];
75# $repl = "Perl_$repl" if $flags =~ /p/;
76# unless ($flags =~ /n/) {
77# $repl .= "pTHX";
78# $repl .= "_ " if @{$functions->{$f}} > 3;
79# }
80# warn("$ARGV:$.:$repl\n");
81# }
82# $repl;
83# }e;
84 s{(\b(\w+)[ \t]*\([ \t]*(?!aTHX))}
85 {
86 my $repl = $1;
87 my $f = $2;
88 if (exists $functions->{$f}) {
89 $repl .= "aTHX_ ";
90 warn("$ARGV:$.:$`#$repl#$'");
91 }
92 $repl;
93 }eg;
94 print;
95 close ARGV if eof; # restart $.
96 }
97 exit;
98}
99
100#munge_c_files();
101
102# generate proto.h
0cb96387
GS
103my $wrote_protected = 0;
104
cea2e8a9
GS
105sub write_protos {
106 my $ret = "";
107 if (@_ == 1) {
108 my $arg = shift;
0cb96387
GS
109 $ret .= "$arg\n" if $arg =~ /^#\s*(if|ifdef|else|endif)\b/
110 or $arg =~ /^\s*(public|protected|private):/;
cea2e8a9
GS
111 }
112 else {
113 my ($flags,$retval,$func,@args) = @_;
114 if ($flags =~ /s/) {
115 $retval = "STATIC $retval";
116 $func = "S_$func";
117 }
0cb96387
GS
118 else {
119 $retval = "VIRTUAL $retval";
120 if ($flags =~ /p/) {
121 $func = "Perl_$func";
122 }
cea2e8a9
GS
123 }
124 $ret .= "$retval\t$func(";
125 unless ($flags =~ /n/) {
126 $ret .= "pTHX";
127 $ret .= "_ " if @args;
128 }
129 if (@args) {
130 $ret .= join ", ", @args;
131 }
132 else {
133 $ret .= "void" if $flags =~ /n/;
134 }
135 $ret .= ")";
136 $ret .= " __attribute__((noreturn))" if $flags =~ /r/;
137 $ret .= ";\n";
138 }
139 $ret;
140}
141
142# generates global.sym, and populates %global with global symbols
143sub write_global_sym {
144 my $ret = "";
145 if (@_ > 1) {
146 my ($flags,$retval,$func,@args) = @_;
147 unless ($flags =~ /s/) {
148 $func = "Perl_$func" if $flags =~ /p/;
149 $ret = "$func\n";
150 }
151 }
152 $ret;
153}
154
155
156walk_table(\&write_protos, 'proto.h', <<'EOT');
157/*
158 * !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
159 * This file is autogenerated from data in embed.pl. Edit that file
160 * and run 'make regen_headers' to effect changes.
161 */
162
163EOT
164
165walk_table(\&write_global_sym, 'global.sym', <<'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
172EOT
173
709f4e38
GS
174# XXX others that may need adding
175# warnhook
176# hints
177# copline
84fee439
NIS
178my @extvars = qw(sv_undef sv_yes sv_no na dowarn
179 curcop compiling
180 tainting tainted stack_base stack_sp sv_arenaroot
256a4781 181 no_modify
84fee439
NIS
182 curstash DBsub DBsingle debstash
183 rsfp
184 stdingv
6b88bc9c
GS
185 defgv
186 errgv
3070f6ec
GS
187 rsfp_filters
188 perldb
709f4e38
GS
189 diehook
190 dirty
191 perl_destruct_level
84fee439
NIS
192 );
193
5f05dabc
PP
194sub readsyms (\%$) {
195 my ($syms, $file) = @_;
5f05dabc
PP
196 local (*FILE, $_);
197 open(FILE, "< $file")
198 or die "embed.pl: Can't open $file: $!\n";
199 while (<FILE>) {
200 s/[ \t]*#.*//; # Delete comments.
201 if (/^\s*(\S+)\s*$/) {
22c35a8c
GS
202 my $sym = $1;
203 warn "duplicate symbol $sym while processing $file\n"
204 if exists $$syms{$sym};
205 $$syms{$sym} = 1;
5f05dabc
PP
206 }
207 }
208 close(FILE);
209}
210
cea2e8a9
GS
211# Perl_pp_* and Perl_ck_* are in pp.sym
212readsyms my %ppsym, 'pp.sym';
5f05dabc 213
c6af7a1a
GS
214sub readvars(\%$$@) {
215 my ($syms, $file,$pre,$keep_pre) = @_;
d4cce5f1
NIS
216 local (*FILE, $_);
217 open(FILE, "< $file")
218 or die "embed.pl: Can't open $file: $!\n";
219 while (<FILE>) {
220 s/[ \t]*#.*//; # Delete comments.
51371543 221 if (/PERLVARA?I?C?\($pre(\w+)/) {
22c35a8c 222 my $sym = $1;
c6af7a1a 223 $sym = $pre . $sym if $keep_pre;
22c35a8c
GS
224 warn "duplicate symbol $sym while processing $file\n"
225 if exists $$syms{$sym};
51371543 226 $$syms{$sym} = $pre || 1;
d4cce5f1
NIS
227 }
228 }
229 close(FILE);
230}
231
232my %intrp;
233my %thread;
234
235readvars %intrp, 'intrpvar.h','I';
236readvars %thread, 'thrdvar.h','T';
22239a37 237readvars %globvar, 'perlvars.h','G';
d4cce5f1 238
51371543 239foreach my $sym (sort keys %thread) {
34b58025 240 warn "$sym in intrpvar.h as well as thrdvar.h\n" if exists $intrp{$sym};
51371543 241}
d4cce5f1 242
c6af7a1a
GS
243sub undefine ($) {
244 my ($sym) = @_;
245 "#undef $sym\n";
246}
247
5f05dabc
PP
248sub hide ($$) {
249 my ($from, $to) = @_;
250 my $t = int(length($from) / 8);
251 "#define $from" . "\t" x ($t < 3 ? 3 - $t : 1) . "$to\n";
252}
c6af7a1a 253
51371543
GS
254sub objxsub_var ($$) {
255 my ($pfx, $sym) = @_;
c5be433b
GS
256 my $arg = ($pfx eq 'G' ? 'NULL' : 'aTHXo');
257 undefine("PL_$sym") . hide("PL_$sym", "(*Perl_${pfx}${sym}_ptr($arg))");
c6af7a1a
GS
258}
259
3280af22
NIS
260sub embedvar ($) {
261 my ($sym) = @_;
262# hide($sym, "Perl_$sym");
263 return '';
264}
265
d4cce5f1
NIS
266sub multon ($$$) {
267 my ($sym,$pre,$ptr) = @_;
3280af22 268 hide("PL_$sym", "($ptr$pre$sym)");
5f05dabc 269}
d4cce5f1
NIS
270sub multoff ($$) {
271 my ($sym,$pre) = @_;
533c011a 272 return hide("PL_$pre$sym", "PL_$sym");
5f05dabc
PP
273}
274
275unlink 'embed.h';
cea2e8a9 276open(EM, '> embed.h') or die "Can't create embed.h: $!\n";
e50aee73
AD
277
278print EM <<'END';
76b72cf1 279/* !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
cea2e8a9 280 This file is built by embed.pl from data in embed.pl, pp.sym, intrpvar.h,
c6af7a1a 281 perlvars.h and thrdvar.h. Any changes made here will be lost!
76b72cf1 282*/
e50aee73
AD
283
284/* (Doing namespace management portably in C is really gross.) */
285
22c35a8c 286/* NO_EMBED is no longer supported. i.e. EMBED is always active. */
820c3be9 287
538feb02
GS
288/* provide binary compatible (but inconsistent) names */
289#if defined(PERL_BINCOMPAT_5005)
290# define Perl_call_argv perl_call_argv
291# define Perl_call_method perl_call_method
292# define Perl_call_pv perl_call_pv
293# define Perl_call_sv perl_call_sv
294# define Perl_get_av perl_get_av
295# define Perl_get_cv perl_get_cv
296# define Perl_get_hv perl_get_hv
297# define Perl_get_sv perl_get_sv
298# define Perl_init_i18nl10n perl_init_i18nl10n
299# define Perl_init_i18nl14n perl_init_i18nl14n
300# define Perl_new_collate perl_new_collate
301# define Perl_new_ctype perl_new_ctype
302# define Perl_new_numeric perl_new_numeric
303# define Perl_require_pv perl_require_pv
304# define Perl_safesyscalloc Perl_safecalloc
305# define Perl_safesysfree Perl_safefree
306# define Perl_safesysmalloc Perl_safemalloc
307# define Perl_safesysrealloc Perl_saferealloc
308# define Perl_set_numeric_local perl_set_numeric_local
309# define Perl_set_numeric_standard perl_set_numeric_standard
310# define PERL_POLLUTE
3d3b6b6a
GS
311# ifndef EMBEDMYMALLOC
312# define PERL_POLLUTE_MALLOC
313# endif
538feb02
GS
314#endif
315
22c35a8c 316/* Hide global symbols */
5f05dabc 317
22c35a8c 318#if !defined(PERL_OBJECT)
cea2e8a9 319#if !defined(PERL_IMPLICIT_CONTEXT)
e50aee73 320
e50aee73
AD
321END
322
cea2e8a9
GS
323walk_table {
324 my $ret = "";
325 if (@_ == 1) {
326 my $arg = shift;
327 $ret .= "$arg\n" if $arg =~ /^#\s*(if|ifdef|else|endif)\b/;
328 }
329 else {
330 my ($flags,$retval,$func,@args) = @_;
331 unless ($flags =~ /o/) {
332 if ($flags =~ /s/) {
333 $ret .= hide($func,"S_$func");
334 }
335 elsif ($flags =~ /p/) {
336 $ret .= hide($func,"Perl_$func");
337 }
338 }
339 }
340 $ret;
341} \*EM;
342
343for $sym (sort keys %ppsym) {
344 $sym =~ s/^Perl_//;
345 print EM hide($sym, "Perl_$sym");
346}
347
348print EM <<'END';
349
350#else /* PERL_IMPLICIT_CONTEXT */
351
352END
353
354my @az = ('a'..'z');
355
356walk_table {
357 my $ret = "";
358 if (@_ == 1) {
359 my $arg = shift;
360 $ret .= "$arg\n" if $arg =~ /^#\s*(if|ifdef|else|endif)\b/;
361 }
362 else {
363 my ($flags,$retval,$func,@args) = @_;
364 unless ($flags =~ /o/) {
365 my $args = scalar @args;
366 if ($args and $args[$args-1] =~ /\.\.\./) {
367 # we're out of luck for varargs functions under CPP
368 }
369 elsif ($flags =~ /n/) {
370 if ($flags =~ /s/) {
371 $ret .= hide($func,"S_$func");
372 }
373 elsif ($flags =~ /p/) {
374 $ret .= hide($func,"Perl_$func");
375 }
376 }
377 else {
378 my $alist = join(",", @az[0..$args-1]);
379 $ret = "#define $func($alist)";
380 my $t = int(length($ret) / 8);
381 $ret .= "\t" x ($t < 4 ? 4 - $t : 1);
382 if ($flags =~ /s/) {
383 $ret .= "S_$func(aTHX";
384 }
385 elsif ($flags =~ /p/) {
386 $ret .= "Perl_$func(aTHX";
387 }
388 $ret .= "_ " if $alist;
389 $ret .= $alist . ")\n";
390 }
391 }
392 }
393 $ret;
394} \*EM;
395
396for $sym (sort keys %ppsym) {
397 $sym =~ s/^Perl_//;
398 if ($sym =~ /^ck_/) {
399 print EM hide("$sym(a)", "Perl_$sym(aTHX_ a)");
400 }
401 elsif ($sym =~ /^pp_/) {
402 print EM hide("$sym()", "Perl_$sym(aTHX)");
403 }
404 else {
405 warn "Illegal symbol '$sym' in pp.sym";
406 }
e50aee73
AD
407}
408
e50aee73
AD
409print EM <<'END';
410
cea2e8a9 411#endif /* PERL_IMPLICIT_CONTEXT */
22c35a8c
GS
412#else /* PERL_OBJECT */
413
414END
415
cea2e8a9
GS
416walk_table {
417 my $ret = "";
418 if (@_ == 1) {
419 my $arg = shift;
420 $ret .= "$arg\n" if $arg =~ /^#\s*(if|ifdef|else|endif)\b/;
421 }
422 else {
423 my ($flags,$retval,$func,@args) = @_;
0cb96387
GS
424 if ($flags =~ /s/) {
425 $ret .= hide("S_$func","CPerlObj::S_$func");
426 $ret .= hide($func,"S_$func");
427 }
428 elsif ($flags =~ /p/) {
429 $ret .= hide("Perl_$func","CPerlObj::Perl_$func");
430 $ret .= hide($func,"Perl_$func");
431 }
432 else {
433 $ret .= hide($func,"CPerlObj::$func");
cea2e8a9
GS
434 }
435 }
436 $ret;
437} \*EM;
438
439for $sym (sort keys %ppsym) {
440 $sym =~ s/^Perl_//;
0cb96387
GS
441 print EM hide("Perl_$sym", "CPerlObj::Perl_$sym");
442 print EM hide($sym, "Perl_$sym");
22c35a8c
GS
443}
444
445print EM <<'END';
446
447#endif /* PERL_OBJECT */
e50aee73 448
cea2e8a9
GS
449/* Compatibility stubs. Compile extensions with -DPERL_NOCOMPAT to
450 disable them.
451 */
452
538feb02 453#if !defined(PERL_CORE)
cea2e8a9
GS
454# define sv_setptrobj(rv,ptr,name) sv_setref_iv(rv,name,(IV)ptr)
455# define sv_setptrref(rv,ptr) sv_setref_iv(rv,Nullch,(IV)ptr)
538feb02 456#endif
cea2e8a9 457
538feb02 458#if !defined(PERL_CORE) && !defined(PERL_NOCOMPAT) && !defined(PERL_BINCOMPAT_5005)
cea2e8a9
GS
459
460/* Compatibility for various misnamed functions. All functions
461 in the API that begin with "perl_" (not "Perl_") take an explicit
462 interpreter context pointer.
463 The following are not like that, but since they had a "perl_"
464 prefix in previous versions, we provide compatibility macros.
465 */
466# define perl_atexit call_atexit
467# define perl_call_argv call_argv
468# define perl_call_pv call_pv
469# define perl_call_method call_method
470# define perl_call_sv call_sv
471# define perl_eval_sv eval_sv
472# define perl_eval_pv eval_pv
473# define perl_require_pv require_pv
474# define perl_get_sv get_sv
475# define perl_get_av get_av
476# define perl_get_hv get_hv
477# define perl_get_cv get_cv
478# define perl_init_i18nl10n init_i18nl10n
479# define perl_init_i18nl14n init_i18nl14n
480# define perl_new_ctype new_ctype
481# define perl_new_collate new_collate
482# define perl_new_numeric new_numeric
483
484/* varargs functions can't be handled with CPP macros. :-(
485 This provides a set of compatibility functions that don't take
486 an extra argument but grab the context pointer using the macro
487 dTHX.
488 */
c5be433b 489#if defined(PERL_IMPLICIT_CONTEXT) && !defined(PERL_OBJECT)
cea2e8a9 490# define croak Perl_croak_nocontext
c5be433b 491# define deb Perl_deb_nocontext
cea2e8a9
GS
492# define die Perl_die_nocontext
493# define form Perl_form_nocontext
494# define newSVpvf Perl_newSVpvf_nocontext
495# define sv_catpvf Perl_sv_catpvf_nocontext
496# define sv_setpvf Perl_sv_setpvf_nocontext
497# define warn Perl_warn_nocontext
c5be433b 498# define warner Perl_warner_nocontext
cea2e8a9
GS
499# define sv_catpvf_mg Perl_sv_catpvf_mg_nocontext
500# define sv_setpvf_mg Perl_sv_setpvf_mg_nocontext
501#endif
502
503#endif /* !defined(PERL_CORE) && !defined(PERL_NOCOMPAT) */
504
505#if !defined(PERL_IMPLICIT_CONTEXT)
506/* undefined symbols, point them back at the usual ones */
507# define Perl_croak_nocontext Perl_croak
508# define Perl_die_nocontext Perl_die
c5be433b 509# define Perl_deb_nocontext Perl_deb
cea2e8a9 510# define Perl_form_nocontext Perl_form
c5be433b
GS
511# define Perl_newSVpvf_nocontext Perl_newSVpvf
512# define Perl_sv_catpvf_nocontext Perl_sv_catpvf
513# define Perl_sv_setpvf_nocontext Perl_sv_setpvf
cea2e8a9 514# define Perl_warn_nocontext Perl_warn
c5be433b 515# define Perl_warner_nocontext Perl_warner
cea2e8a9
GS
516# define Perl_sv_catpvf_mg_nocontext Perl_sv_catpvf_mg
517# define Perl_sv_setpvf_mg_nocontext Perl_sv_setpvf_mg
518#endif
db5cf5a9 519
d4cce5f1
NIS
520END
521
522close(EM);
523
524unlink 'embedvar.h';
525open(EM, '> embedvar.h')
526 or die "Can't create embedvar.h: $!\n";
527
528print EM <<'END';
529/* !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
cea2e8a9 530 This file is built by embed.pl from data in embed.pl, pp.sym, intrpvar.h,
c6af7a1a 531 perlvars.h and thrdvar.h. Any changes made here will be lost!
d4cce5f1
NIS
532*/
533
534/* (Doing namespace management portably in C is really gross.) */
535
5f05dabc 536/* Put interpreter-specific symbols into a struct? */
e50aee73
AD
537
538#ifdef MULTIPLICITY
539
d4cce5f1
NIS
540#ifndef USE_THREADS
541/* If we do not have threads then per-thread vars are per-interpreter */
542
cea2e8a9
GS
543#ifdef PERL_IMPLICIT_CONTEXT
544
545/* everything has an implicit context pointer */
546
547END
548
549for $sym (sort keys %thread) {
550 print EM multon($sym,'T','my_perl->');
551}
552
553print EM <<'END';
554
555#else /* !PERL_IMPLICIT_CONTEXT */
556
557/* traditional MULTIPLICITY (intepreter is in a global) */
558
e50aee73
AD
559END
560
cea2e8a9 561
d4cce5f1 562for $sym (sort keys %thread) {
c5be433b 563 print EM multon($sym,'T','PERL_GET_INTERP->');
d4cce5f1
NIS
564}
565
566print EM <<'END';
567
cea2e8a9 568#endif /* !PERL_IMPLICIT_CONTEXT */
d4cce5f1
NIS
569#endif /* !USE_THREADS */
570
571/* These are always per-interpreter if there is more than one */
572
573END
574
575for $sym (sort keys %intrp) {
c5be433b 576 print EM multon($sym,'I','PERL_GET_INTERP->');
760ac839 577}
760ac839 578
55497cff
PP
579print EM <<'END';
580
5f05dabc 581#else /* !MULTIPLICITY */
55497cff
PP
582
583END
760ac839 584
d4cce5f1
NIS
585for $sym (sort keys %intrp) {
586 print EM multoff($sym,'I');
e50aee73 587}
e50aee73 588
56d28764
CS
589print EM <<'END';
590
d4cce5f1
NIS
591#ifndef USE_THREADS
592
593END
594
595for $sym (sort keys %thread) {
596 print EM multoff($sym,'T');
597}
598
599print EM <<'END';
600
601#endif /* USE_THREADS */
602
603/* Hide what would have been interpreter-specific symbols? */
5f05dabc 604
56d28764 605END
e50aee73 606
d4cce5f1 607for $sym (sort keys %intrp) {
3280af22 608 print EM embedvar($sym);
d4cce5f1
NIS
609}
610
611print EM <<'END';
612
613#ifndef USE_THREADS
614
615END
616
617for $sym (sort keys %thread) {
3280af22 618 print EM embedvar($sym);
5f05dabc
PP
619}
620
621print EM <<'END';
622
d4cce5f1 623#endif /* USE_THREADS */
e50aee73 624#endif /* MULTIPLICITY */
d4cce5f1
NIS
625
626/* Now same trickey for per-thread variables */
627
628#ifdef USE_THREADS
629
630END
631
632for $sym (sort keys %thread) {
22239a37 633 print EM multon($sym,'T','thr->');
d4cce5f1
NIS
634}
635
636print EM <<'END';
637
638#endif /* USE_THREADS */
639
22239a37
NIS
640#ifdef PERL_GLOBAL_STRUCT
641
642END
643
644for $sym (sort keys %globvar) {
533c011a 645 print EM multon($sym,'G','PL_Vars.');
22239a37
NIS
646}
647
648print EM <<'END';
649
650#else /* !PERL_GLOBAL_STRUCT */
651
652END
653
654for $sym (sort keys %globvar) {
655 print EM multoff($sym,'G');
656}
657
658print EM <<'END';
659
22239a37
NIS
660END
661
662for $sym (sort keys %globvar) {
3280af22 663 print EM embedvar($sym);
22239a37
NIS
664}
665
666print EM <<'END';
667
22239a37
NIS
668#endif /* PERL_GLOBAL_STRUCT */
669
e50aee73
AD
670END
671
84fee439
NIS
672print EM <<'END';
673
db5cf5a9 674#ifdef PERL_POLLUTE /* disabled by default in 5.006 */
84fee439
NIS
675
676END
677
678for $sym (sort @extvars) {
679 print EM hide($sym,"PL_$sym");
680}
681
682print EM <<'END';
683
db5cf5a9 684#endif /* PERL_POLLUTE */
84fee439
NIS
685END
686
687
3fe35a81 688close(EM);
c6af7a1a
GS
689
690unlink 'objXSUB.h';
691open(OBX, '> objXSUB.h')
692 or die "Can't create objXSUB.h: $!\n";
693
694print OBX <<'EOT';
695/* !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
cea2e8a9 696 This file is built by embed.pl from data in embed.pl, pp.sym, intrpvar.h,
c6af7a1a
GS
697 perlvars.h and thrdvar.h. Any changes made here will be lost!
698*/
699
700#ifndef __objXSUB_h__
701#define __objXSUB_h__
702
703/* Variables */
704
705EOT
706
51371543
GS
707foreach my $sym (sort keys %intrp) {
708 print OBX objxsub_var('I',$sym);
709}
710
711foreach my $sym (sort keys %thread) {
712 print OBX objxsub_var('T',$sym);
713}
714
715foreach my $sym (sort keys %globvar) {
716 print OBX objxsub_var('G',$sym);
c6af7a1a
GS
717}
718
719print OBX <<'EOT';
720
721/* Functions */
722
c5be433b
GS
723#if defined(PERL_OBJECT)
724
725/* XXX soon to be eliminated, only a few things in PERLCORE need these now */
726
c6af7a1a
GS
727EOT
728
cea2e8a9
GS
729walk_table {
730 my $ret = "";
731 if (@_ == 1) {
732 my $arg = shift;
733 $ret .= "$arg\n" if $arg =~ /^#\s*(if|ifdef|else|endif)\b/;
734 }
735 else {
736 my ($flags,$retval,$func,@args) = @_;
0cb96387 737 unless ($flags =~ /s/) {
cea2e8a9 738 if ($flags =~ /p/) {
0cb96387
GS
739 $ret .= undefine("Perl_$func") . hide("Perl_$func","pPerl->Perl_$func");
740 $ret .= undefine($func) . hide($func,"Perl_$func");
741 }
742 else {
cea2e8a9
GS
743 $ret .= undefine($func) . hide($func,"pPerl->$func");
744 }
745 }
746 }
747 $ret;
748} \*OBX;
c6af7a1a 749
cea2e8a9
GS
750for $sym (sort keys %ppsym) {
751 $sym =~ s/^Perl_//;
0cb96387
GS
752 print OBX undefine("Perl_$sym") . hide("Perl_$sym", "pPerl->Perl_$sym");
753 print OBX undefine($sym) . hide($sym, "Perl_$sym");
c6af7a1a
GS
754}
755
c6af7a1a
GS
756print OBX <<'EOT';
757
c5be433b 758#endif /* PERL_OBJECT */
c6af7a1a
GS
759#endif /* __objXSUB_h__ */
760EOT
761
762close(OBX);
cea2e8a9 763
51371543
GS
764unlink 'perlapi.h';
765unlink 'perlapi.c';
766open(CAPI, '> perlapi.c') or die "Can't create perlapi.c: $!\n";
767open(CAPIH, '> perlapi.h') or die "Can't create perlapi.h: $!\n";
768
769print CAPIH <<'EOT';
770/* !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
771 This file is built by embed.pl from data in embed.pl, pp.sym, intrpvar.h,
772 perlvars.h and thrdvar.h. Any changes made here will be lost!
773*/
774
51371543
GS
775/* declare accessor functions for Perl variables */
776
c5be433b
GS
777#if defined(PERL_OBJECT) || defined (PERL_CAPI)
778
779#if defined(PERL_OBJECT)
780# undef aTHXo
781# define aTHXo pPerl
782# undef aTHXo_
783# define aTHXo_ aTHXo,
784# undef _aTHXo
785# define _aTHXo ,aTHXo
786#endif /* PERL_OBJECT */
787
51371543
GS
788START_EXTERN_C
789
790#undef PERLVAR
791#undef PERLVARA
792#undef PERLVARI
793#undef PERLVARIC
c5be433b 794#define PERLVAR(v,t) EXTERN_C t* Perl_##v##_ptr(pTHXo);
51371543 795#define PERLVARA(v,n,t) typedef t PL_##v##_t[n]; \
c5be433b 796 EXTERN_C PL_##v##_t* Perl_##v##_ptr(pTHXo);
51371543 797#define PERLVARI(v,t,i) PERLVAR(v,t)
c5be433b 798#define PERLVARIC(v,t,i) PERLVAR(v, const t)
51371543
GS
799
800#include "thrdvar.h"
801#include "intrpvar.h"
802#include "perlvars.h"
803
804#undef PERLVAR
805#undef PERLVARA
806#undef PERLVARI
807#undef PERLVARIC
808
809END_EXTERN_C
810
c5be433b 811#endif /* PERL_OBJECT || PERL_CAPI */
51371543
GS
812
813EOT
814
815
816print CAPI <<'EOT';
817/* !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
818 This file is built by embed.pl from data in embed.pl, pp.sym, intrpvar.h,
819 perlvars.h and thrdvar.h. Any changes made here will be lost!
820*/
821
822#include "EXTERN.h"
823#include "perl.h"
824#include "perlapi.h"
825
826#if defined(PERL_OBJECT)
827
828/* accessor functions for Perl variables (provides binary compatibility) */
829START_EXTERN_C
830
831#undef PERLVAR
832#undef PERLVARA
833#undef PERLVARI
834#undef PERLVARIC
c5be433b
GS
835#define PERLVAR(v,t) t* Perl_##v##_ptr(pTHXo) \
836 { return &(aTHXo->PL_##v); }
837#define PERLVARA(v,n,t) PL_##v##_t* Perl_##v##_ptr(pTHXo) \
838 { return &(aTHXo->PL_##v); }
51371543 839#define PERLVARI(v,t,i) PERLVAR(v,t)
c5be433b 840#define PERLVARIC(v,t,i) PERLVAR(v, const t)
51371543
GS
841
842#include "thrdvar.h"
843#include "intrpvar.h"
c5be433b
GS
844
845#undef PERLVAR
846#undef PERLVARA
847#define PERLVAR(v,t) t* Perl_##v##_ptr(pTHXo) \
848 { return &(PL_##v); }
849#define PERLVARA(v,n,t) PL_##v##_t* Perl_##v##_ptr(pTHXo) \
850 { return &(PL_##v); }
51371543
GS
851#include "perlvars.h"
852
853#undef PERLVAR
854#undef PERLVARA
855#undef PERLVARI
856#undef PERLVARIC
857
858EOT
859
c5be433b
GS
860# functions that take va_list* for implementing vararg functions
861my %vfuncs = qw(
862 Perl_croak Perl_vcroak
863 Perl_warn Perl_vwarn
864 Perl_warner Perl_vwarner
865 Perl_die Perl_vdie
866 Perl_form Perl_vform
867 Perl_deb Perl_vdeb
868 Perl_newSVpvf Perl_vnewSVpvf
869 Perl_sv_setpvf Perl_sv_vsetpvf
870 Perl_sv_setpvf_mg Perl_sv_vsetpvf_mg
871 Perl_sv_catpvf Perl_sv_vcatpvf
872 Perl_sv_catpvf_mg Perl_sv_vcatpvf_mg
873 Perl_dump_indent Perl_dump_vindent
874 Perl_default_protect Perl_vdefault_protect
875);
876
51371543 877sub emit_func {
c5be433b 878 my ($addcontext, $rettype,$func,@args) = @_;
51371543
GS
879 my @aargs = @args;
880 for my $a (@aargs) { $a =~ s/^.*\b(\w+)$/$1/ }
c5be433b
GS
881 my $ctxarg = '';
882 if (not $addcontext) {
883 $ctxarg = 'pTHXo';
884 $ctxarg .= '_ ' if @args;
885 }
886 my $decl = '';
887 if ($addcontext) {
888 $decl .= " dTHXo;\n";
889 }
51371543 890 local $" = ', ';
c5be433b
GS
891 my $return = ($rettype =~ /^\s*(void|Free_t|Signal_t)\s*$/
892 ? '' : 'return ');
893 my $emitval = '';
894 if (@args and $args[$#args] =~ /\.\.\./) {
895 pop @args;
896 pop @aargs;
897 my $retarg = '';
898 my $ctxfunc = $func;
899 $ctxfunc =~ s/_nocontext$//;
900 return $emitval unless exists $vfuncs{$ctxfunc};
901 if (length $return) {
902 $decl .= " $rettype retval;\n";
903 $retarg .= "retval = ";
904 $return = "\n ${return}retval;\n";
905 }
906 $emitval .= <<EOT
907$rettype
908$func($ctxarg@args)
51371543 909{
c5be433b
GS
910$decl va_list args;
911 va_start(args, $aargs[$#aargs]);
912 $retarg((CPerlObj*)pPerl)->$vfuncs{$ctxfunc}(@aargs, &args);
913 va_end(args);$return
51371543
GS
914}
915EOT
c5be433b
GS
916 }
917 else {
918 $emitval .= <<EOT
919$rettype
920$func($ctxarg@args)
921{
922$decl $return((CPerlObj*)pPerl)->$func(@aargs);
923}
924EOT
925 }
926 $emitval;
51371543
GS
927}
928
929# XXXX temporary hack
930for my $sym (qw(
931 perl_construct
932 perl_destruct
933 perl_free
934 perl_run
935 perl_parse
936 ))
937{
938 $skipapi_funcs{$sym}++;
939}
940
941walk_table {
942 my $ret = "";
943 if (@_ == 1) {
944 my $arg = shift;
945 $ret .= "$arg\n" if $arg =~ /^#\s*(if|ifdef|else|endif)\b/;
946 }
947 else {
948 my ($flags,$retval,$func,@args) = @_;
949 return $ret if exists $skipapi_funcs{$func};
c5be433b
GS
950 unless ($flags =~ /s/) {
951 $ret .= "\n";
952 my $addctx = 1 if $flags =~ /n/;
953 if ($flags =~ /p/) {
954 $ret .= undefine("Perl_$func");
955 $ret .= emit_func($addctx,$retval,"Perl_$func",@args);
956 }
957 else {
958 $ret .= undefine($func);
959 $ret .= emit_func($addctx,$retval,$func,@args);
51371543
GS
960 }
961 }
962 }
963 $ret;
964} \*CAPI;
965
966for $sym (sort keys %ppsym) {
967 $sym =~ s/^Perl_//;
968 print CAPI "\n";
969 print CAPI undefine("Perl_$sym");
970 if ($sym =~ /^ck_/) {
c5be433b 971 print CAPI emit_func(0, 'OP *',"Perl_$sym",'OP *o');
51371543
GS
972 }
973 else { # pp_foo
c5be433b 974 print CAPI emit_func(0, 'OP *',"Perl_$sym");
51371543
GS
975 }
976}
977
978print CAPI <<'EOT';
979
c5be433b
GS
980#undef Perl_fprintf_nocontext
981int
982Perl_fprintf_nocontext(PerlIO *stream, const char *format, ...)
983{
984 dTHXo;
985 va_list(arglist);
986 va_start(arglist, format);
987 return (*pPerl->PL_StdIO->pVprintf)(pPerl->PL_StdIO, stream, format, arglist);
988}
989
51371543
GS
990END_EXTERN_C
991
992#endif /* PERL_OBJECT */
993EOT
994
cea2e8a9
GS
995__END__
996
997# Lines are of the form:
998# flags|return_type|function_name|return_type|arg1|arg2|...|argN
999#
1000# They may continue on multiple lines when \w| begins the next line.
1001# Leading and trailing whitespace will be ignored in each component.
1002#
1003# flags are single letters with following meanings:
1004# s static function, should have an S_ prefix in source
1005# file
1006# n has no implicit interpreter/thread context argument
1007# p function has a Perl_ prefix
1008# r function never returns
1009# o has no compatibility macro (#define foo Perl_foo)
1010#
1011# Individual flags may be separated by whitespace.
1012#
1013# New global functions should be added at the end for binary compatibility
1014# in some configurations.
1015#
1016# TODO: 1) Add a flag to mark the functions that are part of the public API.
1017# 2) Add a field for documentation, so that L<perlguts/"API LISTING">
1018# may be autogenerated.
1019#
1020
0cb96387
GS
1021#if defined(PERL_OBJECT)
1022public:
1023#endif
cea2e8a9
GS
1024p |SV* |amagic_call |SV* left|SV* right|int method|int dir
1025p |bool |Gv_AMupdate |HV* stash
1026p |OP* |append_elem |I32 optype|OP* head|OP* tail
1027p |OP* |append_list |I32 optype|LISTOP* first|LISTOP* last
1028p |I32 |apply |I32 type|SV** mark|SV** sp
cea2e8a9
GS
1029p |bool |avhv_exists_ent|AV *ar|SV* keysv|U32 hash
1030p |SV** |avhv_fetch_ent |AV *ar|SV* keysv|I32 lval|U32 hash
1031p |HE* |avhv_iternext |AV *ar
1032p |SV* |avhv_iterval |AV *ar|HE* entry
1033p |HV* |avhv_keys |AV *ar
1034p |void |av_clear |AV* ar
1035p |void |av_extend |AV* ar|I32 key
1036p |AV* |av_fake |I32 size|SV** svp
1037p |SV** |av_fetch |AV* ar|I32 key|I32 lval
1038p |void |av_fill |AV* ar|I32 fill
1039p |I32 |av_len |AV* ar
1040p |AV* |av_make |I32 size|SV** svp
1041p |SV* |av_pop |AV* ar
1042p |void |av_push |AV* ar|SV* val
1043p |void |av_reify |AV* ar
1044p |SV* |av_shift |AV* ar
1045p |SV** |av_store |AV* ar|I32 key|SV* val
1046p |void |av_undef |AV* ar
1047p |void |av_unshift |AV* ar|I32 num
1048p |OP* |bind_match |I32 type|OP* left|OP* pat
1049p |OP* |block_end |I32 floor|OP* seq
1050p |I32 |block_gimme
1051p |int |block_start |int full
1052p |void |boot_core_UNIVERSAL
1053p |void |call_list |I32 oldscope|AV* av_list
1054p |I32 |cando |I32 bit|I32 effective|Stat_t* statbufp
cad2e5aa
JH
1055p |U32 |cast_ulong |NV f
1056p |I32 |cast_i32 |NV f
1057p |IV |cast_iv |NV f
1058p |UV |cast_uv |NV f
cea2e8a9
GS
1059#if !defined(HAS_TRUNCATE) && !defined(HAS_CHSIZE) && defined(F_FREESP)
1060p |I32 |my_chsize |int fd|Off_t length
1061#endif
1062#if defined(USE_THREADS)
1063p |MAGIC* |condpair_magic |SV *sv
1064#endif
1065p |OP* |convert |I32 optype|I32 flags|OP* o
1066pr |void |croak |const char* pat|...
c5be433b 1067pr |void |vcroak |const char* pat|va_list* args
cea2e8a9
GS
1068#if defined(PERL_IMPLICIT_CONTEXT)
1069npr |void |croak_nocontext|const char* pat|...
1070np |OP* |die_nocontext |const char* pat|...
c5be433b 1071np |void |deb_nocontext |const char* pat|...
cea2e8a9
GS
1072np |char* |form_nocontext |const char* pat|...
1073np |void |warn_nocontext |const char* pat|...
c5be433b 1074np |void |warner_nocontext|U32 err|const char* pat|...
cea2e8a9
GS
1075np |SV* |newSVpvf_nocontext|const char* pat|...
1076np |void |sv_catpvf_nocontext|SV* sv|const char* pat|...
1077np |void |sv_setpvf_nocontext|SV* sv|const char* pat|...
1078np |void |sv_catpvf_mg_nocontext|SV* sv|const char* pat|...
1079np |void |sv_setpvf_mg_nocontext|SV* sv|const char* pat|...
c5be433b 1080np |int |fprintf_nocontext|PerlIO* stream|const char* fmt|...
cea2e8a9
GS
1081#endif
1082p |void |cv_ckproto |CV* cv|GV* gv|char* p
1083p |CV* |cv_clone |CV* proto
1084p |SV* |cv_const_sv |CV* cv
1085p |SV* |op_const_sv |OP* o|CV* cv
1086p |void |cv_undef |CV* cv
1087p |void |cx_dump |PERL_CONTEXT* cs
1088p |SV* |filter_add |filter_t funcp|SV* datasv
1089p |void |filter_del |filter_t funcp
1090p |I32 |filter_read |int idx|SV* buffer|int maxlen
1091p |char** |get_op_descs
1092p |char** |get_op_names
1093p |char* |get_no_modify
1094p |U32* |get_opargs
0cb96387 1095p |PPADDR_t*|get_ppaddr
cea2e8a9
GS
1096p |I32 |cxinc
1097p |void |deb |const char* pat|...
c5be433b 1098p |void |vdeb |const char* pat|va_list* args
cea2e8a9
GS
1099p |void |deb_growlevel
1100p |void |debprofdump
1101p |I32 |debop |OP* o
1102p |I32 |debstack
1103p |I32 |debstackptrs
1104p |char* |delimcpy |char* to|char* toend|char* from \
1105 |char* fromend|int delim|I32* retlen
1106p |void |deprecate |char* s
1107p |OP* |die |const char* pat|...
c5be433b 1108p |OP* |vdie |const char* pat|va_list* args
cea2e8a9
GS
1109p |OP* |die_where |char* message|STRLEN msglen
1110p |void |dounwind |I32 cxix
1111p |bool |do_aexec |SV* really|SV** mark|SV** sp
d5a9bfb0 1112p |bool |do_aexec5 |SV* really|SV** mark|SV** sp|int fd|int flag
cea2e8a9
GS
1113p |int |do_binmode |PerlIO *fp|int iotype|int flag
1114p |void |do_chop |SV* asv|SV* sv
1115p |bool |do_close |GV* gv|bool not_implicit
1116p |bool |do_eof |GV* gv
1117p |bool |do_exec |char* cmd
1118#if !defined(WIN32)
1119p |bool |do_exec3 |char* cmd|int fd|int flag
1120#endif
1121p |void |do_execfree
1122#if defined(HAS_MSG) || defined(HAS_SEM) || defined(HAS_SHM)
1123p |I32 |do_ipcctl |I32 optype|SV** mark|SV** sp
1124p |I32 |do_ipcget |I32 optype|SV** mark|SV** sp
1125p |I32 |do_msgrcv |SV** mark|SV** sp
1126p |I32 |do_msgsnd |SV** mark|SV** sp
1127p |I32 |do_semop |SV** mark|SV** sp
1128p |I32 |do_shmio |I32 optype|SV** mark|SV** sp
1129#endif
1130p |void |do_join |SV* sv|SV* del|SV** mark|SV** sp
1131p |OP* |do_kv
1132p |bool |do_open |GV* gv|char* name|I32 len|int as_raw \
1133 |int rawmode|int rawperm|PerlIO* supplied_fp
6170680b
IZ
1134p |bool |do_open9 |GV *gv|char *name|I32 len|int as_raw \
1135 |int rawmode|int rawperm|PerlIO *supplied_fp \
1136 |SV *svs|I32 num
cea2e8a9
GS
1137p |void |do_pipe |SV* sv|GV* rgv|GV* wgv
1138p |bool |do_print |SV* sv|PerlIO* fp
1139p |OP* |do_readline
1140p |I32 |do_chomp |SV* sv
1141p |bool |do_seek |GV* gv|Off_t pos|int whence
1142p |void |do_sprintf |SV* sv|I32 len|SV** sarg
1143p |Off_t |do_sysseek |GV* gv|Off_t pos|int whence
1144p |Off_t |do_tell |GV* gv
1145p |I32 |do_trans |SV* sv
1146p |void |do_vecset |SV* sv
1147p |void |do_vop |I32 optype|SV* sv|SV* left|SV* right
1148p |OP* |dofile |OP* term
1149p |I32 |dowantarray
1150p |void |dump_all
1151p |void |dump_eval
1152#if defined(DUMP_FDS)
1153p |void |dump_fds |char* s
1154#endif
1155p |void |dump_form |GV* gv
1156p |void |gv_dump |GV* gv
1157p |void |op_dump |OP* arg
1158p |void |pmop_dump |PMOP* pm
1159p |void |dump_packsubs |HV* stash
1160p |void |dump_sub |GV* gv
1161p |void |fbm_compile |SV* sv|U32 flags
1162p |char* |fbm_instr |unsigned char* big|unsigned char* bigend \
1163 |SV* littlesv|U32 flags
1164p |char* |find_script |char *scriptname|bool dosearch \
1165 |char **search_ext|I32 flags
1166#if defined(USE_THREADS)
1167p |PADOFFSET|find_threadsv|const char *name
1168#endif
1169p |OP* |force_list |OP* arg
1170p |OP* |fold_constants |OP* arg
1171p |char* |form |const char* pat|...
c5be433b 1172p |char* |vform |const char* pat|va_list* args
cea2e8a9
GS
1173p |void |free_tmps
1174p |OP* |gen_constant_list|OP* o
1175#if !defined(HAS_GETENV_LEN)
1176p |char* |getenv_len |char* key|unsigned long *len
1177#endif
1178p |void |gp_free |GV* gv
1179p |GP* |gp_ref |GP* gp
1180p |GV* |gv_AVadd |GV* gv
1181p |GV* |gv_HVadd |GV* gv
1182p |GV* |gv_IOadd |GV* gv
1183p |GV* |gv_autoload4 |HV* stash|const char* name|STRLEN len \
1184 |I32 method
1185p |void |gv_check |HV* stash
1186p |void |gv_efullname |SV* sv|GV* gv
1187p |void |gv_efullname3 |SV* sv|GV* gv|const char* prefix
1188p |GV* |gv_fetchfile |const char* name
1189p |GV* |gv_fetchmeth |HV* stash|const char* name|STRLEN len \
1190 |I32 level
1191p |GV* |gv_fetchmethod |HV* stash|const char* name
1192p |GV* |gv_fetchmethod_autoload|HV* stash|const char* name \
1193 |I32 autoload
1194p |GV* |gv_fetchpv |const char* name|I32 add|I32 sv_type
1195p |void |gv_fullname |SV* sv|GV* gv
1196p |void |gv_fullname3 |SV* sv|GV* gv|const char* prefix
1197p |void |gv_init |GV* gv|HV* stash|const char* name \
1198 |STRLEN len|int multi
1199p |HV* |gv_stashpv |const char* name|I32 create
1200p |HV* |gv_stashpvn |const char* name|U32 namelen|I32 create
1201p |HV* |gv_stashsv |SV* sv|I32 create
1202p |void |hv_clear |HV* tb
1203p |void |hv_delayfree_ent|HV* hv|HE* entry
1204p |SV* |hv_delete |HV* tb|const char* key|U32 klen|I32 flags
1205p |SV* |hv_delete_ent |HV* tb|SV* key|I32 flags|U32 hash
1206p |bool |hv_exists |HV* tb|const char* key|U32 klen
1207p |bool |hv_exists_ent |HV* tb|SV* key|U32 hash
1208p |SV** |hv_fetch |HV* tb|const char* key|U32 klen|I32 lval
1209p |HE* |hv_fetch_ent |HV* tb|SV* key|I32 lval|U32 hash
1210p |void |hv_free_ent |HV* hv|HE* entry
1211p |I32 |hv_iterinit |HV* tb
1212p |char* |hv_iterkey |HE* entry|I32* retlen
1213p |SV* |hv_iterkeysv |HE* entry
1214p |HE* |hv_iternext |HV* tb
1215p |SV* |hv_iternextsv |HV* hv|char** key|I32* retlen
1216p |SV* |hv_iterval |HV* tb|HE* entry
1217p |void |hv_ksplit |HV* hv|IV newmax
1218p |void |hv_magic |HV* hv|GV* gv|int how
1219p |SV** |hv_store |HV* tb|const char* key|U32 klen|SV* val \
1220 |U32 hash
1221p |HE* |hv_store_ent |HV* tb|SV* key|SV* val|U32 hash
1222p |void |hv_undef |HV* tb
1223p |I32 |ibcmp |const char* a|const char* b|I32 len
1224p |I32 |ibcmp_locale |const char* a|const char* b|I32 len
1225p |I32 |ingroup |I32 testgid|I32 effective
1ee4443e 1226p |void |init_debugger
cea2e8a9
GS
1227p |void |init_stacks
1228p |U32 |intro_my
1229p |char* |instr |const char* big|const char* little
f2b5be74 1230p |bool |io_close |IO* io|bool not_implicit
cea2e8a9
GS
1231p |OP* |invert |OP* cmd
1232p |bool |is_uni_alnum |U32 c
b8c5462f 1233p |bool |is_uni_alnumc |U32 c
cea2e8a9
GS
1234p |bool |is_uni_idfirst |U32 c
1235p |bool |is_uni_alpha |U32 c
b8c5462f 1236p |bool |is_uni_ascii |U32 c
cea2e8a9 1237p |bool |is_uni_space |U32 c
b8c5462f
JH
1238p |bool |is_uni_cntrl |U32 c
1239p |bool |is_uni_graph |U32 c
cea2e8a9
GS
1240p |bool |is_uni_digit |U32 c
1241p |bool |is_uni_upper |U32 c
1242p |bool |is_uni_lower |U32 c
1243p |bool |is_uni_print |U32 c
b8c5462f
JH
1244p |bool |is_uni_punct |U32 c
1245p |bool |is_uni_xdigit |U32 c
cea2e8a9
GS
1246p |U32 |to_uni_upper |U32 c
1247p |U32 |to_uni_title |U32 c
1248p |U32 |to_uni_lower |U32 c
1249p |bool |is_uni_alnum_lc|U32 c
b8c5462f 1250p |bool |is_uni_alnumc_lc|U32 c
cea2e8a9
GS
1251p |bool |is_uni_idfirst_lc|U32 c
1252p |bool |is_uni_alpha_lc|U32 c
b8c5462f 1253p |bool |is_uni_ascii_lc|U32 c
cea2e8a9 1254p |bool |is_uni_space_lc|U32 c
b8c5462f
JH
1255p |bool |is_uni_cntrl_lc|U32 c
1256p |bool |is_uni_graph_lc|U32 c
cea2e8a9
GS
1257p |bool |is_uni_digit_lc|U32 c
1258p |bool |is_uni_upper_lc|U32 c
1259p |bool |is_uni_lower_lc|U32 c
1260p |bool |is_uni_print_lc|U32 c
b8c5462f
JH
1261p |bool |is_uni_punct_lc|U32 c
1262p |bool |is_uni_xdigit_lc|U32 c
cea2e8a9
GS
1263p |U32 |to_uni_upper_lc|U32 c
1264p |U32 |to_uni_title_lc|U32 c
1265p |U32 |to_uni_lower_lc|U32 c
1266p |bool |is_utf8_alnum |U8 *p
b8c5462f 1267p |bool |is_utf8_alnumc |U8 *p
cea2e8a9
GS
1268p |bool |is_utf8_idfirst|U8 *p
1269p |bool |is_utf8_alpha |U8 *p
b8c5462f 1270p |bool |is_utf8_ascii |U8 *p
cea2e8a9 1271p |bool |is_utf8_space |U8 *p
b8c5462f 1272p |bool |is_utf8_cntrl |U8 *p
cea2e8a9 1273p |bool |is_utf8_digit |U8 *p
b8c5462f 1274p |bool |is_utf8_graph |U8 *p
cea2e8a9
GS
1275p |bool |is_utf8_upper |U8 *p
1276p |bool |is_utf8_lower |U8 *p
1277p |bool |is_utf8_print |U8 *p
b8c5462f
JH
1278p |bool |is_utf8_punct |U8 *p
1279p |bool |is_utf8_xdigit |U8 *p
cea2e8a9
GS
1280p |bool |is_utf8_mark |U8 *p
1281p |OP* |jmaybe |OP* arg
1282p |I32 |keyword |char* d|I32 len
1283p |void |leave_scope |I32 base
1284p |void |lex_end
1285p |void |lex_start |SV* line
1286p |OP* |linklist |OP* o
1287p |OP* |list |OP* o
1288p |OP* |listkids |OP* o
1289p |OP* |localize |OP* arg|I32 lexical
1290p |I32 |looks_like_number|SV* sv
1291p |int |magic_clearenv |SV* sv|MAGIC* mg
1292p |int |magic_clear_all_env|SV* sv|MAGIC* mg
1293p |int |magic_clearpack|SV* sv|MAGIC* mg
1294p |int |magic_clearsig |SV* sv|MAGIC* mg
1295p |int |magic_existspack|SV* sv|MAGIC* mg
1296p |int |magic_freeregexp|SV* sv|MAGIC* mg
1297p |int |magic_get |SV* sv|MAGIC* mg
1298p |int |magic_getarylen|SV* sv|MAGIC* mg
1299p |int |magic_getdefelem|SV* sv|MAGIC* mg
1300p |int |magic_getglob |SV* sv|MAGIC* mg
1301p |int |magic_getnkeys |SV* sv|MAGIC* mg
1302p |int |magic_getpack |SV* sv|MAGIC* mg
1303p |int |magic_getpos |SV* sv|MAGIC* mg
1304p |int |magic_getsig |SV* sv|MAGIC* mg
1305p |int |magic_getsubstr|SV* sv|MAGIC* mg
1306p |int |magic_gettaint |SV* sv|MAGIC* mg
1307p |int |magic_getuvar |SV* sv|MAGIC* mg
1308p |int |magic_getvec |SV* sv|MAGIC* mg
1309p |U32 |magic_len |SV* sv|MAGIC* mg
1310#if defined(USE_THREADS)
1311p |int |magic_mutexfree|SV* sv|MAGIC* mg
1312#endif
1313p |int |magic_nextpack |SV* sv|MAGIC* mg|SV* key
1314p |U32 |magic_regdata_cnt|SV* sv|MAGIC* mg
1315p |int |magic_regdatum_get|SV* sv|MAGIC* mg
1316p |int |magic_set |SV* sv|MAGIC* mg
1317p |int |magic_setamagic|SV* sv|MAGIC* mg
1318p |int |magic_setarylen|SV* sv|MAGIC* mg
1319p |int |magic_setbm |SV* sv|MAGIC* mg
1320p |int |magic_setdbline|SV* sv|MAGIC* mg
1321#if defined(USE_LOCALE_COLLATE)
1322p |int |magic_setcollxfrm|SV* sv|MAGIC* mg
1323#endif
1324p |int |magic_setdefelem|SV* sv|MAGIC* mg
1325p |int |magic_setenv |SV* sv|MAGIC* mg
1326p |int |magic_setfm |SV* sv|MAGIC* mg
1327p |int |magic_setisa |SV* sv|MAGIC* mg
1328p |int |magic_setglob |SV* sv|MAGIC* mg
1329p |int |magic_setmglob |SV* sv|MAGIC* mg
1330p |int |magic_setnkeys |SV* sv|MAGIC* mg
1331p |int |magic_setpack |SV* sv|MAGIC* mg
1332p |int |magic_setpos |SV* sv|MAGIC* mg
1333p |int |magic_setsig |SV* sv|MAGIC* mg
1334p |int |magic_setsubstr|SV* sv|MAGIC* mg
1335p |int |magic_settaint |SV* sv|MAGIC* mg
1336p |int |magic_setuvar |SV* sv|MAGIC* mg
1337p |int |magic_setvec |SV* sv|MAGIC* mg
1338p |int |magic_set_all_env|SV* sv|MAGIC* mg
1339p |U32 |magic_sizepack |SV* sv|MAGIC* mg
1340p |int |magic_wipepack |SV* sv|MAGIC* mg
1341p |void |magicname |char* sym|char* name|I32 namlen
cea2e8a9
GS
1342#if defined(MYMALLOC)
1343np |MEM_SIZE|malloced_size |void *p
1344#endif
1345p |void |markstack_grow
1346#if defined(USE_LOCALE_COLLATE)
1347p |char* |mem_collxfrm |const char* s|STRLEN len|STRLEN* xlen
1348#endif
1349p |SV* |mess |const char* pat|va_list* args
1350p |int |mg_clear |SV* sv
1351p |int |mg_copy |SV* sv|SV* nsv|const char* key|I32 klen
1352p |MAGIC* |mg_find |SV* sv|int type
1353p |int |mg_free |SV* sv
1354p |int |mg_get |SV* sv
1355p |U32 |mg_length |SV* sv
1356p |void |mg_magical |SV* sv
1357p |int |mg_set |SV* sv
1358p |I32 |mg_size |SV* sv
1359p |OP* |mod |OP* o|I32 type
1360p |char* |moreswitches |char* s
1361p |OP* |my |OP* o
cad2e5aa 1362p |NV |my_atof |const char *s
cea2e8a9
GS
1363#if !defined(HAS_BCOPY) || !defined(HAS_SAFE_BCOPY)
1364p |char* |my_bcopy |const char* from|char* to|I32 len
1365#endif
1366#if !defined(HAS_BZERO) && !defined(HAS_MEMSET)
1367p |char* |my_bzero |char* loc|I32 len
1368#endif
1369pr |void |my_exit |U32 status
1370pr |void |my_failure_exit
1371p |I32 |my_fflush_all
1372p |I32 |my_lstat
1373#if !defined(HAS_MEMCMP) || !defined(HAS_SANE_MEMCMP)
1374p |I32 |my_memcmp |const char* s1|const char* s2|I32 len
1375#endif
1376#if !defined(HAS_MEMSET)
1377p |void* |my_memset |char* loc|I32 ch|I32 len
1378#endif
1379#if !defined(PERL_OBJECT)
1380p |I32 |my_pclose |PerlIO* ptr
1381p |PerlIO*|my_popen |char* cmd|char* mode
1382#endif
1383p |void |my_setenv |char* nam|char* val
1384p |I32 |my_stat
1385#if defined(MYSWAP)
1386p |short |my_swap |short s
1387p |long |my_htonl |long l
1388p |long |my_ntohl |long l
1389#endif
1390p |void |my_unexec
1391p |OP* |newANONLIST |OP* o
1392p |OP* |newANONHASH |OP* o
1393p |OP* |newANONSUB |I32 floor|OP* proto|OP* block
1394p |OP* |newASSIGNOP |I32 flags|OP* left|I32 optype|OP* right
1395p |OP* |newCONDOP |I32 flags|OP* expr|OP* trueop|OP* falseop
1396p |void |newCONSTSUB |HV* stash|char* name|SV* sv
1397p |void |newFORM |I32 floor|OP* o|OP* block
1398p |OP* |newFOROP |I32 flags|char* label|line_t forline \
1399 |OP* sclr|OP* expr|OP*block|OP*cont
1400p |OP* |newLOGOP |I32 optype|I32 flags|OP* left|OP* right
1401p |OP* |newLOOPEX |I32 type|OP* label
1402p |OP* |newLOOPOP |I32 flags|I32 debuggable|OP* expr|OP* block
1403p |OP* |newNULLLIST
1404p |OP* |newOP |I32 optype|I32 flags
1405p |void |newPROG |OP* o
1406p |OP* |newRANGE |I32 flags|OP* left|OP* right
1407p |OP* |newSLICEOP |I32 flags|OP* subscript|OP* listop
1408p |OP* |newSTATEOP |I32 flags|char* label|OP* o
1409p |CV* |newSUB |I32 floor|OP* o|OP* proto|OP* block
1410p |CV* |newXS |char* name|XSUBADDR_t f|char* filename
1411p |AV* |newAV
1412p |OP* |newAVREF |OP* o
1413p |OP* |newBINOP |I32 type|I32 flags|OP* first|OP* last
1414p |OP* |newCVREF |I32 flags|OP* o
1415p |OP* |newGVOP |I32 type|I32 flags|GV* gv
1416p |GV* |newGVgen |char* pack
1417p |OP* |newGVREF |I32 type|OP* o
1418p |OP* |newHVREF |OP* o
1419p |HV* |newHV
1420p |HV* |newHVhv |HV* hv
1421p |IO* |newIO
1422p |OP* |newLISTOP |I32 type|I32 flags|OP* first|OP* last
1423p |OP* |newPMOP |I32 type|I32 flags
1424p |OP* |newPVOP |I32 type|I32 flags|char* pv
1425p |SV* |newRV |SV* pref
1426p |SV* |newRV_noinc |SV *sv
1427p |SV* |newSV |STRLEN len
1428p |OP* |newSVREF |OP* o
1429p |OP* |newSVOP |I32 type|I32 flags|SV* sv
1430p |SV* |newSViv |IV i
cad2e5aa 1431p |SV* |newSVnv |NV n
cea2e8a9
GS
1432p |SV* |newSVpv |const char* s|STRLEN len
1433p |SV* |newSVpvn |const char* s|STRLEN len
1434p |SV* |newSVpvf |const char* pat|...
c5be433b 1435p |SV* |vnewSVpvf |const char* pat|va_list* args
cea2e8a9
GS
1436p |SV* |newSVrv |SV* rv|const char* classname
1437p |SV* |newSVsv |SV* old
1438p |OP* |newUNOP |I32 type|I32 flags|OP* first
1439p |OP* |newWHILEOP |I32 flags|I32 debuggable|LOOP* loop \
1440 |I32 whileline|OP* expr|OP* block|OP* cont
c5be433b 1441
cea2e8a9
GS
1442p |PERL_SI*|new_stackinfo|I32 stitems|I32 cxitems
1443p |PerlIO*|nextargv |GV* gv
1444p |char* |ninstr |const char* big|const char* bigend \
1445 |const char* little|const char* lend
1446p |OP* |oopsCV |OP* o
1447p |void |op_free |OP* arg
1448p |void |package |OP* o
1449p |PADOFFSET|pad_alloc |I32 optype|U32 tmptype
1450p |PADOFFSET|pad_allocmy |char* name
1451p |PADOFFSET|pad_findmy |char* name
1452p |OP* |oopsAV |OP* o
1453p |OP* |oopsHV |OP* o
1454p |void |pad_leavemy |I32 fill
1455p |SV* |pad_sv |PADOFFSET po
1456p |void |pad_free |PADOFFSET po
1457p |void |pad_reset
1458p |void |pad_swipe |PADOFFSET po
1459p |void |peep |OP* o
0cb96387
GS
1460#if defined(PERL_OBJECT)
1461no |void |perl_construct
1462no |void |perl_destruct
1463no |void |perl_free
1464no |int |perl_run
1465no |int |perl_parse |XSINIT_t xsinit \
1466 |int argc|char** argv|char** env
1467#else
cea2e8a9 1468no |PerlInterpreter* |perl_alloc
0cb96387
GS
1469no |void |perl_construct |PerlInterpreter* sv_interp
1470no |void |perl_destruct |PerlInterpreter* sv_interp
1471no |void |perl_free |PerlInterpreter* sv_interp
1472no |int |perl_run |PerlInterpreter* sv_interp
1473no |int |perl_parse |PerlInterpreter* sv_interp|XSINIT_t xsinit \
1474 |int argc|char** argv|char** env
c5be433b
GS
1475#if defined(USE_THREADS)
1476p |struct perl_thread* |new_struct_thread|struct perl_thread *t
1477#endif
0cb96387 1478#endif
cea2e8a9
GS
1479p |void |call_atexit |ATEXIT_t fn|void *ptr
1480p |I32 |call_argv |const char* sub_name|I32 flags|char** argv
1481p |I32 |call_method |const char* methname|I32 flags
1482p |I32 |call_pv |const char* sub_name|I32 flags
1483p |I32 |call_sv |SV* sv|I32 flags
cea2e8a9
GS
1484p |SV* |eval_pv |const char* p|I32 croak_on_error
1485p |I32 |eval_sv |SV* sv|I32 flags
cea2e8a9
GS
1486p |SV* |get_sv |const char* name|I32 create
1487p |AV* |get_av |const char* name|I32 create
1488p |HV* |get_hv |const char* name|I32 create
1489p |CV* |get_cv |const char* name|I32 create
1490p |int |init_i18nl10n |int printwarn
1491p |int |init_i18nl14n |int printwarn
1492p |void |new_collate |const char* newcoll
1493p |void |new_ctype |const char* newctype
1494p |void |new_numeric |const char* newcoll
1495p |void |set_numeric_local
097ee67d 1496p |void |set_numeric_radix
cea2e8a9 1497p |void |set_numeric_standard
cea2e8a9 1498p |void |require_pv |const char* pv
cea2e8a9
GS
1499p |void |pidgone |int pid|int status
1500p |void |pmflag |U16* pmfl|int ch
1501p |OP* |pmruntime |OP* pm|OP* expr|OP* repl
1502p |OP* |pmtrans |OP* o|OP* expr|OP* repl
1503p |OP* |pop_return
1504p |void |pop_scope
1505p |OP* |prepend_elem |I32 optype|OP* head|OP* tail
1506p |void |push_return |OP* o
1507p |void |push_scope
1508p |OP* |ref |OP* o|I32 type
1509p |OP* |refkids |OP* o|I32 type
1510p |void |regdump |regexp* r
1511p |I32 |pregexec |regexp* prog|char* stringarg \
1512 |char* strend|char* strbeg|I32 minend \
1513 |SV* screamer|U32 nosave
1514p |void |pregfree |struct regexp* r
1515p |regexp*|pregcomp |char* exp|char* xend|PMOP* pm
cad2e5aa
JH
1516p |char* |re_intuit_start|regexp* prog|SV* sv|char* strpos \
1517 |char* strend|U32 flags \
1518 |struct re_scream_pos_data_s *data
1519p |SV* |re_intuit_string|regexp* prog
cea2e8a9
GS
1520p |I32 |regexec_flags |regexp* prog|char* stringarg \
1521 |char* strend|char* strbeg|I32 minend \
1522 |SV* screamer|void* data|U32 flags
1523p |regnode*|regnext |regnode* p
1524p |void |regprop |SV* sv|regnode* o
1525p |void |repeatcpy |char* to|const char* from|I32 len|I32 count
1526p |char* |rninstr |const char* big|const char* bigend \
1527 |const char* little|const char* lend
1528p |Sighandler_t|rsignal |int i|Sighandler_t t
1529p |int |rsignal_restore|int i|Sigsave_t* t
1530p |int |rsignal_save |int i|Sighandler_t t1|Sigsave_t* t2
1531p |Sighandler_t|rsignal_state|int i
1532p |void |rxres_free |void** rsp
1533p |void |rxres_restore |void** rsp|REGEXP* prx
1534p |void |rxres_save |void** rsp|REGEXP* prx
1535#if !defined(HAS_RENAME)
1536p |I32 |same_dirent |char* a|char* b
1537#endif
1538p |char* |savepv |const char* sv
1539p |char* |savepvn |const char* sv|I32 len
1540p |void |savestack_grow
1541p |void |save_aelem |AV* av|I32 idx|SV **sptr
1542p |I32 |save_alloc |I32 size|I32 pad
1543p |void |save_aptr |AV** aptr
1544p |AV* |save_ary |GV* gv
1545p |void |save_clearsv |SV** svp
1546p |void |save_delete |HV* hv|char* key|I32 klen
1547p |void |save_destructor|DESTRUCTORFUNC_t f|void* p
1548p |void |save_freesv |SV* sv
1549p |void |save_freeop |OP* o
1550p |void |save_freepv |char* pv
1551p |void |save_generic_svref|SV** sptr
1552p |void |save_gp |GV* gv|I32 empty
1553p |HV* |save_hash |GV* gv
1554p |void |save_helem |HV* hv|SV *key|SV **sptr
1555p |void |save_hints
1556p |void |save_hptr |HV** hptr
1557p |void |save_I16 |I16* intp
1558p |void |save_I32 |I32* intp
1559p |void |save_int |int* intp
1560p |void |save_item |SV* item
1561p |void |save_iv |IV* iv
1562p |void |save_list |SV** sarg|I32 maxsarg
1563p |void |save_long |long* longp
1564p |void |save_nogv |GV* gv
1565p |void |save_op
1566p |SV* |save_scalar |GV* gv
1567p |void |save_pptr |char** pptr
1568p |void |save_re_context
1569p |void |save_sptr |SV** sptr
1570p |SV* |save_svref |SV** sptr
1571p |SV** |save_threadsv |PADOFFSET i
1572p |OP* |sawparens |OP* o
1573p |OP* |scalar |OP* o
1574p |OP* |scalarkids |OP* o
1575p |OP* |scalarseq |OP* o
1576p |OP* |scalarvoid |OP* o
9e24b6e2
JH
1577p |NV |scan_bin |char* start|I32 len|I32* retlen
1578p |NV |scan_hex |char* start|I32 len|I32* retlen
cea2e8a9 1579p |char* |scan_num |char* s
9e24b6e2 1580p |NV |scan_oct |char* start|I32 len|I32* retlen
cea2e8a9
GS
1581p |OP* |scope |OP* o
1582p |char* |screaminstr |SV* bigsv|SV* littlesv|I32 start_shift \
1583 |I32 end_shift|I32 *state|I32 last
1584#if !defined(VMS)
1585p |I32 |setenv_getix |char* nam
1586#endif
1587p |void |setdefout |GV* gv
1588p |char* |sharepvn |const char* sv|I32 len|U32 hash
1589p |HEK* |share_hek |const char* sv|I32 len|U32 hash
1590np |Signal_t |sighandler |int sig
1591p |SV** |stack_grow |SV** sp|SV**p|int n
1592p |I32 |start_subparse |I32 is_format|U32 flags
1593p |void |sub_crush_depth|CV* cv
1594p |bool |sv_2bool |SV* sv
1595p |CV* |sv_2cv |SV* sv|HV** st|GV** gvp|I32 lref
1596p |IO* |sv_2io |SV* sv
1597p |IV |sv_2iv |SV* sv
1598p |SV* |sv_2mortal |SV* sv
cad2e5aa 1599p |NV |sv_2nv |SV* sv
cea2e8a9
GS
1600p |char* |sv_2pv |SV* sv|STRLEN* lp
1601p |UV |sv_2uv |SV* sv
1602p |IV |sv_iv |SV* sv
1603p |UV |sv_uv |SV* sv
cad2e5aa 1604p |NV |sv_nv |SV* sv
cea2e8a9
GS
1605p |char* |sv_pvn |SV *sv|STRLEN *len
1606p |I32 |sv_true |SV *sv
1607p |void |sv_add_arena |char* ptr|U32 size|U32 flags
1608p |int |sv_backoff |SV* sv
1609p |SV* |sv_bless |SV* sv|HV* stash
1610p |void |sv_catpvf |SV* sv|const char* pat|...
c5be433b 1611p |void |sv_vcatpvf |SV* sv|const char* pat|va_list* args
cea2e8a9
GS
1612p |void |sv_catpv |SV* sv|const char* ptr
1613p |void |sv_catpvn |SV* sv|const char* ptr|STRLEN len
1614p |void |sv_catsv |SV* dsv|SV* ssv
1615p |void |sv_chop |SV* sv|char* ptr
1616p |void |sv_clean_all
1617p |void |sv_clean_objs
1618p |void |sv_clear |SV* sv
1619p |I32 |sv_cmp |SV* sv1|SV* sv2
1620p |I32 |sv_cmp_locale |SV* sv1|SV* sv2
1621#if defined(USE_LOCALE_COLLATE)
1622p |char* |sv_collxfrm |SV* sv|STRLEN* nxp
1623#endif
1624p |OP* |sv_compile_2op |SV* sv|OP** startp|char* code|AV** avp
1625p |void |sv_dec |SV* sv
1626p |void |sv_dump |SV* sv
1627p |bool |sv_derived_from|SV* sv|const char* name
1628p |I32 |sv_eq |SV* sv1|SV* sv2
1629p |void |sv_free |SV* sv
1630p |void |sv_free_arenas
1631p |char* |sv_gets |SV* sv|PerlIO* fp|I32 append
1632p |char* |sv_grow |SV* sv|STRLEN newlen
1633p |void |sv_inc |SV* sv
1634p |void |sv_insert |SV* bigsv|STRLEN offset|STRLEN len \
1635 |char* little|STRLEN littlelen
1636p |int |sv_isa |SV* sv|const char* name
1637p |int |sv_isobject |SV* sv
1638p |STRLEN |sv_len |SV* sv
1639p |STRLEN |sv_len_utf8 |SV* sv
1640p |void |sv_magic |SV* sv|SV* obj|int how|const char* name \
1641 |I32 namlen
1642p |SV* |sv_mortalcopy |SV* oldsv
1643p |SV* |sv_newmortal
1644p |SV* |sv_newref |SV* sv
1645p |char* |sv_peek |SV* sv
1646p |void |sv_pos_u2b |SV* sv|I32* offsetp|I32* lenp
1647p |void |sv_pos_b2u |SV* sv|I32* offsetp
1648p |char* |sv_pvn_force |SV* sv|STRLEN* lp
1649p |char* |sv_reftype |SV* sv|int ob
1650p |void |sv_replace |SV* sv|SV* nsv
1651p |void |sv_report_used
1652p |void |sv_reset |char* s|HV* stash
1653p |void |sv_setpvf |SV* sv|const char* pat|...
c5be433b 1654p |void |sv_vsetpvf |SV* sv|const char* pat|va_list* args
cea2e8a9
GS
1655p |void |sv_setiv |SV* sv|IV num
1656p |void |sv_setpviv |SV* sv|IV num
1657p |void |sv_setuv |SV* sv|UV num
cad2e5aa 1658p |void |sv_setnv |SV* sv|NV num
cea2e8a9 1659p |SV* |sv_setref_iv |SV* rv|const char* classname|IV iv
cad2e5aa 1660p |SV* |sv_setref_nv |SV* rv|const char* classname|NV nv
cea2e8a9
GS
1661p |SV* |sv_setref_pv |SV* rv|const char* classname|void* pv
1662p |SV* |sv_setref_pvn |SV* rv|const char* classname|char* pv \
1663 |STRLEN n
1664p |void |sv_setpv |SV* sv|const char* ptr
1665p |void |sv_setpvn |SV* sv|const char* ptr|STRLEN len
1666p |void |sv_setsv |SV* dsv|SV* ssv
1667p |void |sv_taint |SV* sv
1668p |bool |sv_tainted |SV* sv
1669p |int |sv_unmagic |SV* sv|int type
1670p |void |sv_unref |SV* sv
1671p |void |sv_untaint |SV* sv
1672p |bool |sv_upgrade |SV* sv|U32 mt
1673p |void |sv_usepvn |SV* sv|char* ptr|STRLEN len
1674p |void |sv_vcatpvfn |SV* sv|const char* pat|STRLEN patlen \
1675 |va_list* args|SV** svargs|I32 svmax \
1676 |bool *used_locale
1677p |void |sv_vsetpvfn |SV* sv|const char* pat|STRLEN patlen \
1678 |va_list* args|SV** svargs|I32 svmax \
1679 |bool *used_locale
1680p |SV* |swash_init |char* pkg|char* name|SV* listsv \
1681 |I32 minbits|I32 none
1682p |UV |swash_fetch |SV *sv|U8 *ptr
1683p |void |taint_env
1684p |void |taint_proper |const char* f|char* s
1685p |UV |to_utf8_lower |U8 *p
1686p |UV |to_utf8_upper |U8 *p
1687p |UV |to_utf8_title |U8 *p
1688#if defined(UNLINK_ALL_VERSIONS)
1689p |I32 |unlnk |char* f
1690#endif
1691#if defined(USE_THREADS)
1692p |void |unlock_condpair|void* svv
1693#endif
1694p |void |unsharepvn |const char* sv|I32 len|U32 hash
1695p |void |unshare_hek |HEK* hek
1696p |void |utilize |int aver|I32 floor|OP* version|OP* id|OP* arg
1697p |U8* |utf16_to_utf8 |U16* p|U8 *d|I32 bytelen
1698p |U8* |utf16_to_utf8_reversed|U16* p|U8 *d|I32 bytelen
1699p |I32 |utf8_distance |U8 *a|U8 *b
1700p |U8* |utf8_hop |U8 *s|I32 off
1701p |UV |utf8_to_uv |U8 *s|I32* retlen
1702p |U8* |uv_to_utf8 |U8 *d|UV uv
1703p |void |vivify_defelem |SV* sv
1704p |void |vivify_ref |SV* sv|U32 to_what
1705p |I32 |wait4pid |int pid|int* statusp|int flags
1706p |void |warn |const char* pat|...
c5be433b 1707p |void |vwarn |const char* pat|va_list* args
cea2e8a9 1708p |void |warner |U32 err|const char* pat|...
c5be433b 1709p |void |vwarner |U32 err|const char* pat|va_list* args
cea2e8a9
GS
1710p |void |watch |char** addr
1711p |I32 |whichsig |char* sig
1712p |int |yyerror |char* s
1713#if defined(USE_PURE_BISON)
1714p |int |yylex |YYSTYPE *lvalp|int *lcharp
1715#else
1716p |int |yylex
1717#endif
1718p |int |yyparse
1719p |int |yywarn |char* s
1720#if defined(MYMALLOC)
1721p |void |dump_mstats |char* s
1722pno |Malloc_t|malloc |MEM_SIZE nbytes
1723pno |Malloc_t|calloc |MEM_SIZE elements|MEM_SIZE size
1724pno |Malloc_t|realloc |Malloc_t where|MEM_SIZE nbytes
1725pno |Free_t |mfree |Malloc_t where
1726#endif
4f63d024
GS
1727pn |Malloc_t|safesysmalloc |MEM_SIZE nbytes
1728pn |Malloc_t|safesyscalloc |MEM_SIZE elements|MEM_SIZE size
1729pn |Malloc_t|safesysrealloc|Malloc_t where|MEM_SIZE nbytes
1730pn |Free_t |safesysfree |Malloc_t where
cea2e8a9 1731#if defined(LEAKTEST)
4f63d024
GS
1732pn |Malloc_t|safexmalloc |I32 x|MEM_SIZE size
1733pn |Malloc_t|safexcalloc |I32 x|MEM_SIZE elements|MEM_SIZE size
1734pn |Malloc_t|safexrealloc |Malloc_t where|MEM_SIZE size
1735pn |void |safexfree |Malloc_t where
cea2e8a9
GS
1736#endif
1737#if defined(PERL_GLOBAL_STRUCT)
1738p |struct perl_vars *|GetVars
1739#endif
cea2e8a9
GS
1740p |int |runops_standard
1741p |int |runops_debug
cea2e8a9 1742p |void |sv_catpvf_mg |SV *sv|const char* pat|...
c5be433b 1743p |void |sv_vcatpvf_mg |SV* sv|const char* pat|va_list* args
cea2e8a9
GS
1744p |void |sv_catpv_mg |SV *sv|const char *ptr
1745p |void |sv_catpvn_mg |SV *sv|const char *ptr|STRLEN len
1746p |void |sv_catsv_mg |SV *dstr|SV *sstr
1747p |void |sv_setpvf_mg |SV *sv|const char* pat|...
c5be433b 1748p |void |sv_vsetpvf_mg |SV* sv|const char* pat|va_list* args
cea2e8a9
GS
1749p |void |sv_setiv_mg |SV *sv|IV i
1750p |void |sv_setpviv_mg |SV *sv|IV iv
1751p |void |sv_setuv_mg |SV *sv|UV u
cad2e5aa 1752p |void |sv_setnv_mg |SV *sv|NV num
cea2e8a9
GS
1753p |void |sv_setpv_mg |SV *sv|const char *ptr
1754p |void |sv_setpvn_mg |SV *sv|const char *ptr|STRLEN len
1755p |void |sv_setsv_mg |SV *dstr|SV *sstr
1756p |void |sv_usepvn_mg |SV *sv|char *ptr|STRLEN len
1757p |MGVTBL*|get_vtbl |int vtbl_id
1758p |char* |pv_display |SV *sv|char *pv|STRLEN cur|STRLEN len \
1759 |STRLEN pvlim
1760p |void |dump_indent |I32 level|PerlIO *file|const char* pat|...
c5be433b
GS
1761p |void |dump_vindent |I32 level|PerlIO *file|const char* pat \
1762 |va_list *args
cea2e8a9
GS
1763p |void |do_gv_dump |I32 level|PerlIO *file|char *name|GV *sv
1764p |void |do_gvgv_dump |I32 level|PerlIO *file|char *name|GV *sv
1765p |void |do_hv_dump |I32 level|PerlIO *file|char *name|HV *sv
1766p |void |do_magic_dump |I32 level|PerlIO *file|MAGIC *mg|I32 nest \
1767 |I32 maxnest|bool dumpops|STRLEN pvlim
1768p |void |do_op_dump |I32 level|PerlIO *file|OP *o
1769p |void |do_pmop_dump |I32 level|PerlIO *file|PMOP *pm
1770p |void |do_sv_dump |I32 level|PerlIO *file|SV *sv|I32 nest \
1771 |I32 maxnest|bool dumpops|STRLEN pvlim
1772p |void |magic_dump |MAGIC *mg
1773p |void* |default_protect|int *excpt|protect_body_t body|...
c5be433b 1774p |void* |vdefault_protect|int *excpt|protect_body_t body|va_list *args
cea2e8a9
GS
1775p |void |reginitcolors
1776p |char* |sv_2pv_nolen |SV* sv
1777p |char* |sv_pv |SV *sv
1778p |void |sv_force_normal|SV *sv
1779p |void |tmps_grow |I32 n
1780p |SV* |sv_rvweaken |SV *sv
1781p |int |magic_killbackrefs|SV *sv|MAGIC *mg
1782
0cb96387
GS
1783#if defined(PERL_OBJECT)
1784protected:
1785#endif
1786#if defined(PERL_IN_AV_C) || defined(PERL_DECL_PROT)
cea2e8a9
GS
1787s |I32 |avhv_index_sv |SV* sv
1788#endif
1789
0cb96387 1790#if defined(PERL_IN_DOOP_C) || defined(PERL_DECL_PROT)
cea2e8a9
GS
1791s |I32 |do_trans_CC_simple |SV *sv
1792s |I32 |do_trans_CC_count |SV *sv
1793s |I32 |do_trans_CC_complex |SV *sv
1794s |I32 |do_trans_UU_simple |SV *sv
1795s |I32 |do_trans_UU_count |SV *sv
1796s |I32 |do_trans_UU_complex |SV *sv
1797s |I32 |do_trans_UC_simple |SV *sv
1798s |I32 |do_trans_CU_simple |SV *sv
1799s |I32 |do_trans_UC_trivial |SV *sv
1800s |I32 |do_trans_CU_trivial |SV *sv
1801#endif
1802
0cb96387 1803#if defined(PERL_IN_GV_C) || defined(PERL_DECL_PROT)
cea2e8a9
GS
1804s |void |gv_init_sv |GV *gv|I32 sv_type
1805#endif
1806
0cb96387 1807#if defined(PERL_IN_HV_C) || defined(PERL_DECL_PROT)
cea2e8a9
GS
1808s |void |hsplit |HV *hv
1809s |void |hfreeentries |HV *hv
1810s |void |more_he
1811s |HE* |new_he
1812s |void |del_he |HE *p
1813s |HEK* |save_hek |const char *str|I32 len|U32 hash
1814s |void |hv_magic_check |HV *hv|bool *needs_copy|bool *needs_store
1815#endif
1816
0cb96387 1817#if defined(PERL_IN_MG_C) || defined(PERL_DECL_PROT)
cea2e8a9
GS
1818s |void |save_magic |I32 mgs_ix|SV *sv
1819s |int |magic_methpack |SV *sv|MAGIC *mg|char *meth
1820s |int |magic_methcall |SV *sv|MAGIC *mg|char *meth|I32 f \
1821 |int n|SV *val
cea2e8a9
GS
1822#endif
1823
0cb96387 1824#if defined(PERL_IN_OP_C) || defined(PERL_DECL_PROT)
cea2e8a9
GS
1825s |I32 |list_assignment|OP *o
1826s |void |bad_type |I32 n|char *t|char *name|OP *kid
3eb57f73 1827s |void |cop_free |COP *cop
cea2e8a9
GS
1828s |OP* |modkids |OP *o|I32 type
1829s |void |no_bareword_allowed|OP *o
1830s |OP* |no_fh_allowed |OP *o
1831s |OP* |scalarboolean |OP *o
1832s |OP* |too_few_arguments|OP *o|char* name
1833s |OP* |too_many_arguments|OP *o|char* name
acb36ea4 1834s |void |op_clear |OP* o
cea2e8a9
GS
1835s |void |null |OP* o
1836s |PADOFFSET|pad_findlex |char* name|PADOFFSET newoff|U32 seq \
1837 |CV* startcv|I32 cx_ix|I32 saweval|U32 flags
1838s |OP* |newDEFSVOP
1839s |OP* |new_logop |I32 type|I32 flags|OP **firstp|OP **otherp
1840s |void |simplify_sort |OP *o
1841s |bool |is_handle_constructor |OP *o|I32 argnum
1842s |char* |gv_ename |GV *gv
1843s |CV* |cv_clone2 |CV *proto|CV *outside
1844s |bool |scalar_mod_type|OP *o|I32 type
1845# if defined(PL_OP_SLAB_ALLOC)
1846s |void* |Slab_Alloc |int m|size_t sz
1847# endif
1848#endif
1849
0cb96387 1850#if defined(PERL_IN_PERL_C) || defined(PERL_DECL_PROT)
cea2e8a9
GS
1851s |void |find_beginning
1852s |void |forbid_setid |char *
1853s |void |incpush |char *|int
1854s |void |init_interp
1855s |void |init_ids
cea2e8a9
GS
1856s |void |init_lexer
1857s |void |init_main_stash
1858s |void |init_perllib
1859s |void |init_postdump_symbols|int|char **|char **
1860s |void |init_predump_symbols
1861rs |void |my_exit_jump
1862s |void |nuke_stacks
1863s |void |open_script |char *|bool|SV *|int *fd
1864s |void |usage |char *
1865s |void |validate_suid |char *|char*|int
cea2e8a9
GS
1866# if defined(IAMSUID)
1867s |int |fd_on_nosuid_fs|int fd
1868# endif
1869s |void* |parse_body |va_list args
1870s |void* |run_body |va_list args
1871s |void* |call_body |va_list args
1872s |void |call_xbody |OP *myop|int is_eval
1873s |void* |call_list_body |va_list args
1874# if defined(USE_THREADS)
1875s |struct perl_thread * |init_main_thread
1876# endif
1877#endif
1878
0cb96387 1879#if defined(PERL_IN_PP_C) || defined(PERL_DECL_PROT)
cea2e8a9
GS
1880s |void |doencodes |SV* sv|char* s|I32 len
1881s |SV* |refto |SV* sv
1882s |U32 |seed
1883s |SV* |mul128 |SV *sv|U8 m
1884s |SV* |is_an_int |char *s|STRLEN l
1885s |int |div128 |SV *pnum|bool *done
1886#endif
1887
0cb96387 1888#if defined(PERL_IN_PP_CTL_C) || defined(PERL_DECL_PROT)
cea2e8a9
GS
1889s |OP* |docatch |OP *o
1890s |void* |docatch_body |va_list args
1891s |OP* |dofindlabel |OP *o|char *label|OP **opstack|OP **oplimit
1892s |void |doparseform |SV *sv
1893s |I32 |dopoptoeval |I32 startingblock
1894s |I32 |dopoptolabel |char *label
1895s |I32 |dopoptoloop |I32 startingblock
1896s |I32 |dopoptosub |I32 startingblock
1897s |I32 |dopoptosub_at |PERL_CONTEXT* cxstk|I32 startingblock
1898s |void |free_closures
1899s |void |save_lines |AV *array|SV *sv
1900s |OP* |doeval |int gimme|OP** startop
1901s |PerlIO *|doopen_pmc |const char *name|const char *mode
1902s |void |qsortsv |SV ** array|size_t num_elts|SVCOMPARE_t f
cea2e8a9
GS
1903#endif
1904
0cb96387 1905#if defined(PERL_IN_PP_HOT_C) || defined(PERL_DECL_PROT)
cea2e8a9 1906s |CV* |get_db_sub |SV **svp|CV *cv
f5d5a27c 1907s |SV* |method_common |SV* meth|U32* hashp
cea2e8a9
GS
1908#endif
1909
0cb96387 1910#if defined(PERL_IN_PP_SYS_C) || defined(PERL_DECL_PROT)
cea2e8a9
GS
1911s |OP* |doform |CV *cv|GV *gv|OP *retop
1912s |int |emulate_eaccess|const char* path|int mode
1913# if !defined(HAS_MKDIR) || !defined(HAS_RMDIR)
1914s |int |dooneliner |char *cmd|char *filename
1915# endif
1916#endif
1917
0cb96387 1918#if defined(PERL_IN_REGCOMP_C) || defined(PERL_DECL_PROT)
cea2e8a9
GS
1919s |regnode*|reg |I32|I32 *
1920s |regnode*|reganode |U8|U32
1921s |regnode*|regatom |I32 *
1922s |regnode*|regbranch |I32 *|I32
1923s |void |regc |U8|char *
1924s |void |reguni |UV|char *|I32*
1925s |regnode*|regclass
1926s |regnode*|regclassutf8
1927s |I32 |regcurly |char *
1928s |regnode*|reg_node |U8
1929s |regnode*|regpiece |I32 *
1930s |void |reginsert |U8|regnode *
1931s |void |regoptail |regnode *|regnode *
1932s |void |regtail |regnode *|regnode *
1933s |char*|regwhite |char *|char *
1934s |char*|nextchar
1935s |regnode*|dumpuntil |regnode *start|regnode *node \
1936 |regnode *last|SV* sv|I32 l
82ba1be6 1937s |void |scan_commit |struct scan_data_t *data
cea2e8a9 1938s |I32 |study_chunk |regnode **scanp|I32 *deltap \
82ba1be6
IZ
1939 |regnode *last|struct scan_data_t *data \
1940 |U32 flags
cea2e8a9
GS
1941s |I32 |add_data |I32 n|char *s
1942rs |void|re_croak2 |const char* pat1|const char* pat2|...
b8c5462f
JH
1943s |I32 |regpposixcc |I32 value
1944s |void |checkposixcc
cea2e8a9
GS
1945#endif
1946
0cb96387 1947#if defined(PERL_IN_REGEXEC_C) || defined(PERL_DECL_PROT)
cea2e8a9
GS
1948s |I32 |regmatch |regnode *prog
1949s |I32 |regrepeat |regnode *p|I32 max
1950s |I32 |regrepeat_hard |regnode *p|I32 max|I32 *lp
1951s |I32 |regtry |regexp *prog|char *startpos
1952s |bool |reginclass |char *p|I32 c
1953s |bool |reginclassutf8 |regnode *f|U8* p
1954s |CHECKPOINT|regcppush |I32 parenfloor
1955s |char*|regcppop
1956s |char*|regcp_set_to |I32 ss
1957s |void |cache_re |regexp *prog
cea2e8a9
GS
1958s |U8* |reghop |U8 *pos|I32 off
1959s |U8* |reghopmaybe |U8 *pos|I32 off
1960#endif
1961
0cb96387 1962#if defined(PERL_IN_RUN_C) || defined(PERL_DECL_PROT)
cea2e8a9
GS
1963s |void |debprof |OP *o
1964#endif
1965
0cb96387 1966#if defined(PERL_IN_SCOPE_C) || defined(PERL_DECL_PROT)
cea2e8a9
GS
1967s |SV* |save_scalar_at |SV **sptr
1968#endif
1969
0cb96387 1970#if defined(PERL_IN_SV_C) || defined(PERL_DECL_PROT)
cea2e8a9
GS
1971s |IV |asIV |SV* sv
1972s |UV |asUV |SV* sv
1973s |SV* |more_sv
1974s |void |more_xiv
1975s |void |more_xnv
1976s |void |more_xpv
1977s |void |more_xrv
1978s |XPVIV* |new_xiv
1979s |XPVNV* |new_xnv
1980s |XPV* |new_xpv
1981s |XRV* |new_xrv
1982s |void |del_xiv |XPVIV* p
1983s |void |del_xnv |XPVNV* p
1984s |void |del_xpv |XPV* p
1985s |void |del_xrv |XRV* p
1986s |void |sv_unglob |SV* sv
cea2e8a9
GS
1987s |void |not_a_number |SV *sv
1988s |void |visit |SVFUNC_t f
1989# if defined(PURIFY)
1990s |void |reg_add |SV *sv
1991s |void |reg_remove |SV *sv
1992# else
4f63d024 1993ns |void* |my_safemalloc |MEM_SIZE size
cea2e8a9
GS
1994# endif
1995s |void |sv_add_backref |SV *tsv|SV *sv
1996s |void |sv_del_backref |SV *sv
1997# if defined(DEBUGGING)
1998s |void |del_sv |SV *p
1999# endif
2000#endif
2001
0cb96387 2002#if defined(PERL_IN_TOKE_C) || defined(PERL_DECL_PROT)
cea2e8a9
GS
2003s |void |check_uni
2004s |void |force_next |I32 type
2005s |char* |force_version |char *start
2006s |char* |force_word |char *start|int token|int check_keyword \
2007 |int allow_pack|int allow_tick
2008s |SV* |tokeq |SV *sv
2009s |char* |scan_const |char *start
2010s |char* |scan_formline |char *s
2011s |char* |scan_heredoc |char *s
2012s |char* |scan_ident |char *s|char *send|char *dest \
2013 |STRLEN destlen|I32 ck_uni
2014s |char* |scan_inputsymbol|char *start
2015s |char* |scan_pat |char *start|I32 type
2016s |char* |scan_str |char *start
2017s |char* |scan_subst |char *start
2018s |char* |scan_trans |char *start
2019s |char* |scan_word |char *s|char *dest|STRLEN destlen \
2020 |int allow_package|STRLEN *slp
2021s |char* |skipspace |char *s
2022s |void |checkcomma |char *s|char *name|char *what
2023s |void |force_ident |char *s|int kind
2024s |void |incline |char *s
2025s |int |intuit_method |char *s|GV *gv
2026s |int |intuit_more |char *s
2027s |I32 |lop |I32 f|expectation x|char *s
2028s |void |missingterm |char *s
2029s |void |no_op |char *what|char *s
2030s |void |set_csh
2031s |I32 |sublex_done
2032s |I32 |sublex_push
2033s |I32 |sublex_start
2034s |char * |filter_gets |SV *sv|PerlIO *fp|STRLEN append
2035s |SV* |new_constant |char *s|STRLEN len|char *key|SV *sv \
2036 |SV *pv|char *type
2037s |int |ao |int toketype
2038s |void |depcom
2039s |char* |incl_perldb
2040s |I32 |utf16_textfilter|int idx|SV *sv|int maxlen
2041s |I32 |utf16rev_textfilter|int idx|SV *sv|int maxlen
cea2e8a9
GS
2042# if defined(CRIPPLED_CC)
2043s |int |uni |I32 f|char *s
2044# endif
2045# if defined(WIN32)
2046s |I32 |win32_textfilter |int idx|SV *sv|int maxlen
2047# endif
2048#endif
2049
0cb96387 2050#if defined(PERL_IN_UNIVERSAL_C) || defined(PERL_DECL_PROT)
cea2e8a9
GS
2051s |SV*|isa_lookup |HV *stash|const char *name|int len|int level
2052#endif
2053
0cb96387 2054#if defined(PERL_IN_UTIL_C) || defined(PERL_DECL_PROT)
cea2e8a9 2055s |SV* |mess_alloc
cea2e8a9
GS
2056# if defined(LEAKTEST)
2057s |void |xstat |int
2058# endif
2059#endif