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