]> iEval git - audio-opusfile.git/blame_incremental - ppport.h
Add -I /usr/local/include/opus to compile on FreeBSD
[audio-opusfile.git] / ppport.h
... / ...
CommitLineData
1#if 0
2<<'SKIP';
3#endif
4/*
5----------------------------------------------------------------------
6
7 ppport.h -- Perl/Pollution/Portability Version 3.32
8
9 Automatically created by Devel::PPPort running under perl 5.024000.
10
11 Do NOT edit this file directly! -- Edit PPPort_pm.PL and the
12 includes in parts/inc/ instead.
13
14 Use 'perldoc ppport.h' to view the documentation below.
15
16----------------------------------------------------------------------
17
18SKIP
19
20=pod
21
22=head1 NAME
23
24ppport.h - Perl/Pollution/Portability version 3.32
25
26=head1 SYNOPSIS
27
28 perl ppport.h [options] [source files]
29
30 Searches current directory for files if no [source files] are given
31
32 --help show short help
33
34 --version show version
35
36 --patch=file write one patch file with changes
37 --copy=suffix write changed copies with suffix
38 --diff=program use diff program and options
39
40 --compat-version=version provide compatibility with Perl version
41 --cplusplus accept C++ comments
42
43 --quiet don't output anything except fatal errors
44 --nodiag don't show diagnostics
45 --nohints don't show hints
46 --nochanges don't suggest changes
47 --nofilter don't filter input files
48
49 --strip strip all script and doc functionality from
50 ppport.h
51
52 --list-provided list provided API
53 --list-unsupported list unsupported API
54 --api-info=name show Perl API portability information
55
56=head1 COMPATIBILITY
57
58This version of F<ppport.h> is designed to support operation with Perl
59installations back to 5.003, and has been tested up to 5.20.
60
61=head1 OPTIONS
62
63=head2 --help
64
65Display a brief usage summary.
66
67=head2 --version
68
69Display the version of F<ppport.h>.
70
71=head2 --patch=I<file>
72
73If this option is given, a single patch file will be created if
74any changes are suggested. This requires a working diff program
75to be installed on your system.
76
77=head2 --copy=I<suffix>
78
79If this option is given, a copy of each file will be saved with
80the given suffix that contains the suggested changes. This does
81not require any external programs. Note that this does not
82automagically add a dot between the original filename and the
83suffix. If you want the dot, you have to include it in the option
84argument.
85
86If neither C<--patch> or C<--copy> are given, the default is to
87simply print the diffs for each file. This requires either
88C<Text::Diff> or a C<diff> program to be installed.
89
90=head2 --diff=I<program>
91
92Manually set the diff program and options to use. The default
93is to use C<Text::Diff>, when installed, and output unified
94context diffs.
95
96=head2 --compat-version=I<version>
97
98Tell F<ppport.h> to check for compatibility with the given
99Perl version. The default is to check for compatibility with Perl
100version 5.003. You can use this option to reduce the output
101of F<ppport.h> if you intend to be backward compatible only
102down to a certain Perl version.
103
104=head2 --cplusplus
105
106Usually, F<ppport.h> will detect C++ style comments and
107replace them with C style comments for portability reasons.
108Using this option instructs F<ppport.h> to leave C++
109comments untouched.
110
111=head2 --quiet
112
113Be quiet. Don't print anything except fatal errors.
114
115=head2 --nodiag
116
117Don't output any diagnostic messages. Only portability
118alerts will be printed.
119
120=head2 --nohints
121
122Don't output any hints. Hints often contain useful portability
123notes. Warnings will still be displayed.
124
125=head2 --nochanges
126
127Don't suggest any changes. Only give diagnostic output and hints
128unless these are also deactivated.
129
130=head2 --nofilter
131
132Don't filter the list of input files. By default, files not looking
133like source code (i.e. not *.xs, *.c, *.cc, *.cpp or *.h) are skipped.
134
135=head2 --strip
136
137Strip all script and documentation functionality from F<ppport.h>.
138This reduces the size of F<ppport.h> dramatically and may be useful
139if you want to include F<ppport.h> in smaller modules without
140increasing their distribution size too much.
141
142The stripped F<ppport.h> will have a C<--unstrip> option that allows
143you to undo the stripping, but only if an appropriate C<Devel::PPPort>
144module is installed.
145
146=head2 --list-provided
147
148Lists the API elements for which compatibility is provided by
149F<ppport.h>. Also lists if it must be explicitly requested,
150if it has dependencies, and if there are hints or warnings for it.
151
152=head2 --list-unsupported
153
154Lists the API elements that are known not to be supported by
155F<ppport.h> and below which version of Perl they probably
156won't be available or work.
157
158=head2 --api-info=I<name>
159
160Show portability information for API elements matching I<name>.
161If I<name> is surrounded by slashes, it is interpreted as a regular
162expression.
163
164=head1 DESCRIPTION
165
166In order for a Perl extension (XS) module to be as portable as possible
167across differing versions of Perl itself, certain steps need to be taken.
168
169=over 4
170
171=item *
172
173Including this header is the first major one. This alone will give you
174access to a large part of the Perl API that hasn't been available in
175earlier Perl releases. Use
176
177 perl ppport.h --list-provided
178
179to see which API elements are provided by ppport.h.
180
181=item *
182
183You should avoid using deprecated parts of the API. For example, using
184global Perl variables without the C<PL_> prefix is deprecated. Also,
185some API functions used to have a C<perl_> prefix. Using this form is
186also deprecated. You can safely use the supported API, as F<ppport.h>
187will provide wrappers for older Perl versions.
188
189=item *
190
191If you use one of a few functions or variables that were not present in
192earlier versions of Perl, and that can't be provided using a macro, you
193have to explicitly request support for these functions by adding one or
194more C<#define>s in your source code before the inclusion of F<ppport.h>.
195
196These functions or variables will be marked C<explicit> in the list shown
197by C<--list-provided>.
198
199Depending on whether you module has a single or multiple files that
200use such functions or variables, you want either C<static> or global
201variants.
202
203For a C<static> function or variable (used only in a single source
204file), use:
205
206 #define NEED_function
207 #define NEED_variable
208
209For a global function or variable (used in multiple source files),
210use:
211
212 #define NEED_function_GLOBAL
213 #define NEED_variable_GLOBAL
214
215Note that you mustn't have more than one global request for the
216same function or variable in your project.
217
218 Function / Variable Static Request Global Request
219 -----------------------------------------------------------------------------------------
220 PL_parser NEED_PL_parser NEED_PL_parser_GLOBAL
221 PL_signals NEED_PL_signals NEED_PL_signals_GLOBAL
222 caller_cx() NEED_caller_cx NEED_caller_cx_GLOBAL
223 eval_pv() NEED_eval_pv NEED_eval_pv_GLOBAL
224 grok_bin() NEED_grok_bin NEED_grok_bin_GLOBAL
225 grok_hex() NEED_grok_hex NEED_grok_hex_GLOBAL
226 grok_number() NEED_grok_number NEED_grok_number_GLOBAL
227 grok_numeric_radix() NEED_grok_numeric_radix NEED_grok_numeric_radix_GLOBAL
228 grok_oct() NEED_grok_oct NEED_grok_oct_GLOBAL
229 load_module() NEED_load_module NEED_load_module_GLOBAL
230 mg_findext() NEED_mg_findext NEED_mg_findext_GLOBAL
231 my_snprintf() NEED_my_snprintf NEED_my_snprintf_GLOBAL
232 my_sprintf() NEED_my_sprintf NEED_my_sprintf_GLOBAL
233 my_strlcat() NEED_my_strlcat NEED_my_strlcat_GLOBAL
234 my_strlcpy() NEED_my_strlcpy NEED_my_strlcpy_GLOBAL
235 newCONSTSUB() NEED_newCONSTSUB NEED_newCONSTSUB_GLOBAL
236 newRV_noinc() NEED_newRV_noinc NEED_newRV_noinc_GLOBAL
237 newSV_type() NEED_newSV_type NEED_newSV_type_GLOBAL
238 newSVpvn_flags() NEED_newSVpvn_flags NEED_newSVpvn_flags_GLOBAL
239 newSVpvn_share() NEED_newSVpvn_share NEED_newSVpvn_share_GLOBAL
240 pv_display() NEED_pv_display NEED_pv_display_GLOBAL
241 pv_escape() NEED_pv_escape NEED_pv_escape_GLOBAL
242 pv_pretty() NEED_pv_pretty NEED_pv_pretty_GLOBAL
243 sv_2pv_flags() NEED_sv_2pv_flags NEED_sv_2pv_flags_GLOBAL
244 sv_2pvbyte() NEED_sv_2pvbyte NEED_sv_2pvbyte_GLOBAL
245 sv_catpvf_mg() NEED_sv_catpvf_mg NEED_sv_catpvf_mg_GLOBAL
246 sv_catpvf_mg_nocontext() NEED_sv_catpvf_mg_nocontext NEED_sv_catpvf_mg_nocontext_GLOBAL
247 sv_pvn_force_flags() NEED_sv_pvn_force_flags NEED_sv_pvn_force_flags_GLOBAL
248 sv_setpvf_mg() NEED_sv_setpvf_mg NEED_sv_setpvf_mg_GLOBAL
249 sv_setpvf_mg_nocontext() NEED_sv_setpvf_mg_nocontext NEED_sv_setpvf_mg_nocontext_GLOBAL
250 sv_unmagicext() NEED_sv_unmagicext NEED_sv_unmagicext_GLOBAL
251 vload_module() NEED_vload_module NEED_vload_module_GLOBAL
252 vnewSVpvf() NEED_vnewSVpvf NEED_vnewSVpvf_GLOBAL
253 warner() NEED_warner NEED_warner_GLOBAL
254
255To avoid namespace conflicts, you can change the namespace of the
256explicitly exported functions / variables using the C<DPPP_NAMESPACE>
257macro. Just C<#define> the macro before including C<ppport.h>:
258
259 #define DPPP_NAMESPACE MyOwnNamespace_
260 #include "ppport.h"
261
262The default namespace is C<DPPP_>.
263
264=back
265
266The good thing is that most of the above can be checked by running
267F<ppport.h> on your source code. See the next section for
268details.
269
270=head1 EXAMPLES
271
272To verify whether F<ppport.h> is needed for your module, whether you
273should make any changes to your code, and whether any special defines
274should be used, F<ppport.h> can be run as a Perl script to check your
275source code. Simply say:
276
277 perl ppport.h
278
279The result will usually be a list of patches suggesting changes
280that should at least be acceptable, if not necessarily the most
281efficient solution, or a fix for all possible problems.
282
283If you know that your XS module uses features only available in
284newer Perl releases, if you're aware that it uses C++ comments,
285and if you want all suggestions as a single patch file, you could
286use something like this:
287
288 perl ppport.h --compat-version=5.6.0 --cplusplus --patch=test.diff
289
290If you only want your code to be scanned without any suggestions
291for changes, use:
292
293 perl ppport.h --nochanges
294
295You can specify a different C<diff> program or options, using
296the C<--diff> option:
297
298 perl ppport.h --diff='diff -C 10'
299
300This would output context diffs with 10 lines of context.
301
302If you want to create patched copies of your files instead, use:
303
304 perl ppport.h --copy=.new
305
306To display portability information for the C<newSVpvn> function,
307use:
308
309 perl ppport.h --api-info=newSVpvn
310
311Since the argument to C<--api-info> can be a regular expression,
312you can use
313
314 perl ppport.h --api-info=/_nomg$/
315
316to display portability information for all C<_nomg> functions or
317
318 perl ppport.h --api-info=/./
319
320to display information for all known API elements.
321
322=head1 BUGS
323
324If this version of F<ppport.h> is causing failure during
325the compilation of this module, please check if newer versions
326of either this module or C<Devel::PPPort> are available on CPAN
327before sending a bug report.
328
329If F<ppport.h> was generated using the latest version of
330C<Devel::PPPort> and is causing failure of this module, please
331file a bug report here: L<https://github.com/mhx/Devel-PPPort/issues/>
332
333Please include the following information:
334
335=over 4
336
337=item 1.
338
339The complete output from running "perl -V"
340
341=item 2.
342
343This file.
344
345=item 3.
346
347The name and version of the module you were trying to build.
348
349=item 4.
350
351A full log of the build that failed.
352
353=item 5.
354
355Any other information that you think could be relevant.
356
357=back
358
359For the latest version of this code, please get the C<Devel::PPPort>
360module from CPAN.
361
362=head1 COPYRIGHT
363
364Version 3.x, Copyright (c) 2004-2013, Marcus Holland-Moritz.
365
366Version 2.x, Copyright (C) 2001, Paul Marquess.
367
368Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
369
370This program is free software; you can redistribute it and/or
371modify it under the same terms as Perl itself.
372
373=head1 SEE ALSO
374
375See L<Devel::PPPort>.
376
377=cut
378
379use strict;
380
381# Disable broken TRIE-optimization
382BEGIN { eval '${^RE_TRIE_MAXBUF} = -1' if $] >= 5.009004 && $] <= 5.009005 }
383
384my $VERSION = 3.32;
385
386my %opt = (
387 quiet => 0,
388 diag => 1,
389 hints => 1,
390 changes => 1,
391 cplusplus => 0,
392 filter => 1,
393 strip => 0,
394 version => 0,
395);
396
397my($ppport) = $0 =~ /([\w.]+)$/;
398my $LF = '(?:\r\n|[\r\n])'; # line feed
399my $HS = "[ \t]"; # horizontal whitespace
400
401# Never use C comments in this file!
402my $ccs = '/'.'*';
403my $cce = '*'.'/';
404my $rccs = quotemeta $ccs;
405my $rcce = quotemeta $cce;
406
407eval {
408 require Getopt::Long;
409 Getopt::Long::GetOptions(\%opt, qw(
410 help quiet diag! filter! hints! changes! cplusplus strip version
411 patch=s copy=s diff=s compat-version=s
412 list-provided list-unsupported api-info=s
413 )) or usage();
414};
415
416if ($@ and grep /^-/, @ARGV) {
417 usage() if "@ARGV" =~ /^--?h(?:elp)?$/;
418 die "Getopt::Long not found. Please don't use any options.\n";
419}
420
421if ($opt{version}) {
422 print "This is $0 $VERSION.\n";
423 exit 0;
424}
425
426usage() if $opt{help};
427strip() if $opt{strip};
428
429if (exists $opt{'compat-version'}) {
430 my($r,$v,$s) = eval { parse_version($opt{'compat-version'}) };
431 if ($@) {
432 die "Invalid version number format: '$opt{'compat-version'}'\n";
433 }
434 die "Only Perl 5 is supported\n" if $r != 5;
435 die "Invalid version number: $opt{'compat-version'}\n" if $v >= 1000 || $s >= 1000;
436 $opt{'compat-version'} = sprintf "%d.%03d%03d", $r, $v, $s;
437}
438else {
439 $opt{'compat-version'} = 5;
440}
441
442my %API = map { /^(\w+)\|([^|]*)\|([^|]*)\|(\w*)$/
443 ? ( $1 => {
444 ($2 ? ( base => $2 ) : ()),
445 ($3 ? ( todo => $3 ) : ()),
446 (index($4, 'v') >= 0 ? ( varargs => 1 ) : ()),
447 (index($4, 'p') >= 0 ? ( provided => 1 ) : ()),
448 (index($4, 'n') >= 0 ? ( nothxarg => 1 ) : ()),
449 } )
450 : die "invalid spec: $_" } qw(
451ASCII_TO_NEED||5.007001|n
452AvFILLp|5.004050||p
453AvFILL|||
454BhkDISABLE||5.021008|
455BhkENABLE||5.021008|
456BhkENTRY_set||5.021008|
457BhkENTRY|||
458BhkFLAGS|||
459CALL_BLOCK_HOOKS|||
460CLASS|||n
461CPERLscope|5.005000||p
462CX_CURPAD_SAVE|||
463CX_CURPAD_SV|||
464CopFILEAV|5.006000||p
465CopFILEGV_set|5.006000||p
466CopFILEGV|5.006000||p
467CopFILESV|5.006000||p
468CopFILE_set|5.006000||p
469CopFILE|5.006000||p
470CopSTASHPV_set|5.006000||p
471CopSTASHPV|5.006000||p
472CopSTASH_eq|5.006000||p
473CopSTASH_set|5.006000||p
474CopSTASH|5.006000||p
475CopyD|5.009002|5.004050|p
476Copy|||
477CvPADLIST||5.008001|
478CvSTASH|||
479CvWEAKOUTSIDE|||
480DEFSV_set|5.010001||p
481DEFSV|5.004050||p
482END_EXTERN_C|5.005000||p
483ENTER|||
484ERRSV|5.004050||p
485EXTEND|||
486EXTERN_C|5.005000||p
487F0convert|||n
488FREETMPS|||
489GIMME_V||5.004000|n
490GIMME|||n
491GROK_NUMERIC_RADIX|5.007002||p
492G_ARRAY|||
493G_DISCARD|||
494G_EVAL|||
495G_METHOD|5.006001||p
496G_NOARGS|||
497G_SCALAR|||
498G_VOID||5.004000|
499GetVars|||
500GvAV|||
501GvCV|||
502GvHV|||
503GvSVn|5.009003||p
504GvSV|||
505Gv_AMupdate||5.011000|
506HEf_SVKEY|5.003070||p
507HeHASH||5.003070|
508HeKEY||5.003070|
509HeKLEN||5.003070|
510HePV||5.004000|
511HeSVKEY_force||5.003070|
512HeSVKEY_set||5.004000|
513HeSVKEY||5.003070|
514HeUTF8|5.010001|5.008000|p
515HeVAL||5.003070|
516HvENAMELEN||5.015004|
517HvENAMEUTF8||5.015004|
518HvENAME||5.013007|
519HvNAMELEN_get|5.009003||p
520HvNAMELEN||5.015004|
521HvNAMEUTF8||5.015004|
522HvNAME_get|5.009003||p
523HvNAME|||
524INT2PTR|5.006000||p
525IN_LOCALE_COMPILETIME|5.007002||p
526IN_LOCALE_RUNTIME|5.007002||p
527IN_LOCALE|5.007002||p
528IN_PERL_COMPILETIME|5.008001||p
529IS_NUMBER_GREATER_THAN_UV_MAX|5.007002||p
530IS_NUMBER_INFINITY|5.007002||p
531IS_NUMBER_IN_UV|5.007002||p
532IS_NUMBER_NAN|5.007003||p
533IS_NUMBER_NEG|5.007002||p
534IS_NUMBER_NOT_INT|5.007002||p
535IVSIZE|5.006000||p
536IVTYPE|5.006000||p
537IVdf|5.006000||p
538LEAVE|||
539LINKLIST||5.013006|
540LVRET|||
541MARK|||
542MULTICALL||5.021008|
543MUTABLE_PTR|5.010001||p
544MUTABLE_SV|5.010001||p
545MY_CXT_CLONE|5.009002||p
546MY_CXT_INIT|5.007003||p
547MY_CXT|5.007003||p
548MoveD|5.009002|5.004050|p
549Move|||
550NATIVE_TO_NEED||5.007001|n
551NOOP|5.005000||p
552NUM2PTR|5.006000||p
553NVTYPE|5.006000||p
554NVef|5.006001||p
555NVff|5.006001||p
556NVgf|5.006001||p
557Newxc|5.009003||p
558Newxz|5.009003||p
559Newx|5.009003||p
560Nullav|||
561Nullch|||
562Nullcv|||
563Nullhv|||
564Nullsv|||
565OP_CLASS||5.013007|
566OP_DESC||5.007003|
567OP_NAME||5.007003|
568OP_TYPE_IS_OR_WAS||5.019010|
569OP_TYPE_IS||5.019007|
570ORIGMARK|||
571OpHAS_SIBLING||5.021007|
572OpSIBLING_set||5.021007|
573OpSIBLING||5.021007|
574PAD_BASE_SV|||
575PAD_CLONE_VARS|||
576PAD_COMPNAME_FLAGS|||
577PAD_COMPNAME_GEN_set|||
578PAD_COMPNAME_GEN|||
579PAD_COMPNAME_OURSTASH|||
580PAD_COMPNAME_PV|||
581PAD_COMPNAME_TYPE|||
582PAD_RESTORE_LOCAL|||
583PAD_SAVE_LOCAL|||
584PAD_SAVE_SETNULLPAD|||
585PAD_SETSV|||
586PAD_SET_CUR_NOSAVE|||
587PAD_SET_CUR|||
588PAD_SVl|||
589PAD_SV|||
590PERLIO_FUNCS_CAST|5.009003||p
591PERLIO_FUNCS_DECL|5.009003||p
592PERL_ABS|5.008001||p
593PERL_BCDVERSION|5.021008||p
594PERL_GCC_BRACE_GROUPS_FORBIDDEN|5.008001||p
595PERL_HASH|5.003070||p
596PERL_INT_MAX|5.003070||p
597PERL_INT_MIN|5.003070||p
598PERL_LONG_MAX|5.003070||p
599PERL_LONG_MIN|5.003070||p
600PERL_MAGIC_arylen|5.007002||p
601PERL_MAGIC_backref|5.007002||p
602PERL_MAGIC_bm|5.007002||p
603PERL_MAGIC_collxfrm|5.007002||p
604PERL_MAGIC_dbfile|5.007002||p
605PERL_MAGIC_dbline|5.007002||p
606PERL_MAGIC_defelem|5.007002||p
607PERL_MAGIC_envelem|5.007002||p
608PERL_MAGIC_env|5.007002||p
609PERL_MAGIC_ext|5.007002||p
610PERL_MAGIC_fm|5.007002||p
611PERL_MAGIC_glob|5.021008||p
612PERL_MAGIC_isaelem|5.007002||p
613PERL_MAGIC_isa|5.007002||p
614PERL_MAGIC_mutex|5.021008||p
615PERL_MAGIC_nkeys|5.007002||p
616PERL_MAGIC_overload_elem|5.021008||p
617PERL_MAGIC_overload_table|5.007002||p
618PERL_MAGIC_overload|5.021008||p
619PERL_MAGIC_pos|5.007002||p
620PERL_MAGIC_qr|5.007002||p
621PERL_MAGIC_regdata|5.007002||p
622PERL_MAGIC_regdatum|5.007002||p
623PERL_MAGIC_regex_global|5.007002||p
624PERL_MAGIC_shared_scalar|5.007003||p
625PERL_MAGIC_shared|5.007003||p
626PERL_MAGIC_sigelem|5.007002||p
627PERL_MAGIC_sig|5.007002||p
628PERL_MAGIC_substr|5.007002||p
629PERL_MAGIC_sv|5.007002||p
630PERL_MAGIC_taint|5.007002||p
631PERL_MAGIC_tiedelem|5.007002||p
632PERL_MAGIC_tiedscalar|5.007002||p
633PERL_MAGIC_tied|5.007002||p
634PERL_MAGIC_utf8|5.008001||p
635PERL_MAGIC_uvar_elem|5.007003||p
636PERL_MAGIC_uvar|5.007002||p
637PERL_MAGIC_vec|5.007002||p
638PERL_MAGIC_vstring|5.008001||p
639PERL_PV_ESCAPE_ALL|5.009004||p
640PERL_PV_ESCAPE_FIRSTCHAR|5.009004||p
641PERL_PV_ESCAPE_NOBACKSLASH|5.009004||p
642PERL_PV_ESCAPE_NOCLEAR|5.009004||p
643PERL_PV_ESCAPE_QUOTE|5.009004||p
644PERL_PV_ESCAPE_RE|5.009005||p
645PERL_PV_ESCAPE_UNI_DETECT|5.009004||p
646PERL_PV_ESCAPE_UNI|5.009004||p
647PERL_PV_PRETTY_DUMP|5.009004||p
648PERL_PV_PRETTY_ELLIPSES|5.010000||p
649PERL_PV_PRETTY_LTGT|5.009004||p
650PERL_PV_PRETTY_NOCLEAR|5.010000||p
651PERL_PV_PRETTY_QUOTE|5.009004||p
652PERL_PV_PRETTY_REGPROP|5.009004||p
653PERL_QUAD_MAX|5.003070||p
654PERL_QUAD_MIN|5.003070||p
655PERL_REVISION|5.006000||p
656PERL_SCAN_ALLOW_UNDERSCORES|5.007003||p
657PERL_SCAN_DISALLOW_PREFIX|5.007003||p
658PERL_SCAN_GREATER_THAN_UV_MAX|5.007003||p
659PERL_SCAN_SILENT_ILLDIGIT|5.008001||p
660PERL_SHORT_MAX|5.003070||p
661PERL_SHORT_MIN|5.003070||p
662PERL_SIGNALS_UNSAFE_FLAG|5.008001||p
663PERL_SUBVERSION|5.006000||p
664PERL_SYS_INIT3||5.006000|
665PERL_SYS_INIT|||
666PERL_SYS_TERM||5.021008|
667PERL_UCHAR_MAX|5.003070||p
668PERL_UCHAR_MIN|5.003070||p
669PERL_UINT_MAX|5.003070||p
670PERL_UINT_MIN|5.003070||p
671PERL_ULONG_MAX|5.003070||p
672PERL_ULONG_MIN|5.003070||p
673PERL_UNUSED_ARG|5.009003||p
674PERL_UNUSED_CONTEXT|5.009004||p
675PERL_UNUSED_DECL|5.007002||p
676PERL_UNUSED_VAR|5.007002||p
677PERL_UQUAD_MAX|5.003070||p
678PERL_UQUAD_MIN|5.003070||p
679PERL_USE_GCC_BRACE_GROUPS|5.009004||p
680PERL_USHORT_MAX|5.003070||p
681PERL_USHORT_MIN|5.003070||p
682PERL_VERSION|5.006000||p
683PL_DBsignal|5.005000||p
684PL_DBsingle|||pn
685PL_DBsub|||pn
686PL_DBtrace|||pn
687PL_Sv|5.005000||p
688PL_bufend|5.021008||p
689PL_bufptr|5.021008||p
690PL_check||5.006000|
691PL_compiling|5.004050||p
692PL_comppad_name||5.017004|
693PL_comppad||5.008001|
694PL_copline|5.021008||p
695PL_curcop|5.004050||p
696PL_curpad||5.005000|
697PL_curstash|5.004050||p
698PL_debstash|5.004050||p
699PL_defgv|5.004050||p
700PL_diehook|5.004050||p
701PL_dirty|5.004050||p
702PL_dowarn|||pn
703PL_errgv|5.004050||p
704PL_error_count|5.021008||p
705PL_expect|5.021008||p
706PL_hexdigit|5.005000||p
707PL_hints|5.005000||p
708PL_in_my_stash|5.021008||p
709PL_in_my|5.021008||p
710PL_keyword_plugin||5.011002|
711PL_last_in_gv|||n
712PL_laststatval|5.005000||p
713PL_lex_state|5.021008||p
714PL_lex_stuff|5.021008||p
715PL_linestr|5.021008||p
716PL_modglobal||5.005000|n
717PL_na|5.004050||pn
718PL_no_modify|5.006000||p
719PL_ofsgv|||n
720PL_opfreehook||5.011000|n
721PL_parser|5.009005||p
722PL_peepp||5.007003|n
723PL_perl_destruct_level|5.004050||p
724PL_perldb|5.004050||p
725PL_ppaddr|5.006000||p
726PL_rpeepp||5.013005|n
727PL_rsfp_filters|5.021008||p
728PL_rsfp|5.021008||p
729PL_rs|||n
730PL_signals|5.008001||p
731PL_stack_base|5.004050||p
732PL_stack_sp|5.004050||p
733PL_statcache|5.005000||p
734PL_stdingv|5.004050||p
735PL_sv_arenaroot|5.004050||p
736PL_sv_no|5.004050||pn
737PL_sv_undef|5.004050||pn
738PL_sv_yes|5.004050||pn
739PL_tainted|5.004050||p
740PL_tainting|5.004050||p
741PL_tokenbuf|5.021008||p
742POP_MULTICALL||5.021008|
743POPi|||n
744POPl|||n
745POPn|||n
746POPpbytex||5.007001|n
747POPpx||5.005030|n
748POPp|||n
749POPs|||n
750PTR2IV|5.006000||p
751PTR2NV|5.006000||p
752PTR2UV|5.006000||p
753PTR2nat|5.009003||p
754PTR2ul|5.007001||p
755PTRV|5.006000||p
756PUSHMARK|||
757PUSH_MULTICALL||5.021008|
758PUSHi|||
759PUSHmortal|5.009002||p
760PUSHn|||
761PUSHp|||
762PUSHs|||
763PUSHu|5.004000||p
764PUTBACK|||
765PadARRAY||5.021008|
766PadMAX||5.021008|
767PadlistARRAY||5.021008|
768PadlistMAX||5.021008|
769PadlistNAMESARRAY||5.021008|
770PadlistNAMESMAX||5.021008|
771PadlistNAMES||5.021008|
772PadlistREFCNT||5.017004|
773PadnameIsOUR|||
774PadnameIsSTATE|||
775PadnameLEN||5.021008|
776PadnameOURSTASH|||
777PadnameOUTER|||
778PadnamePV||5.021008|
779PadnameREFCNT_dec||5.021008|
780PadnameREFCNT||5.021008|
781PadnameSV||5.021008|
782PadnameTYPE|||
783PadnameUTF8||5.021007|
784PadnamelistARRAY||5.021008|
785PadnamelistMAX||5.021008|
786PadnamelistREFCNT_dec||5.021008|
787PadnamelistREFCNT||5.021008|
788PerlIO_clearerr||5.007003|
789PerlIO_close||5.007003|
790PerlIO_context_layers||5.009004|
791PerlIO_eof||5.007003|
792PerlIO_error||5.007003|
793PerlIO_fileno||5.007003|
794PerlIO_fill||5.007003|
795PerlIO_flush||5.007003|
796PerlIO_get_base||5.007003|
797PerlIO_get_bufsiz||5.007003|
798PerlIO_get_cnt||5.007003|
799PerlIO_get_ptr||5.007003|
800PerlIO_read||5.007003|
801PerlIO_restore_errno|||
802PerlIO_save_errno|||
803PerlIO_seek||5.007003|
804PerlIO_set_cnt||5.007003|
805PerlIO_set_ptrcnt||5.007003|
806PerlIO_setlinebuf||5.007003|
807PerlIO_stderr||5.007003|
808PerlIO_stdin||5.007003|
809PerlIO_stdout||5.007003|
810PerlIO_tell||5.007003|
811PerlIO_unread||5.007003|
812PerlIO_write||5.007003|
813Perl_signbit||5.009005|n
814PoisonFree|5.009004||p
815PoisonNew|5.009004||p
816PoisonWith|5.009004||p
817Poison|5.008000||p
818READ_XDIGIT||5.017006|
819RETVAL|||n
820Renewc|||
821Renew|||
822SAVECLEARSV|||
823SAVECOMPPAD|||
824SAVEPADSV|||
825SAVETMPS|||
826SAVE_DEFSV|5.004050||p
827SPAGAIN|||
828SP|||
829START_EXTERN_C|5.005000||p
830START_MY_CXT|5.007003||p
831STMT_END|||p
832STMT_START|||p
833STR_WITH_LEN|5.009003||p
834ST|||
835SV_CONST_RETURN|5.009003||p
836SV_COW_DROP_PV|5.008001||p
837SV_COW_SHARED_HASH_KEYS|5.009005||p
838SV_GMAGIC|5.007002||p
839SV_HAS_TRAILING_NUL|5.009004||p
840SV_IMMEDIATE_UNREF|5.007001||p
841SV_MUTABLE_RETURN|5.009003||p
842SV_NOSTEAL|5.009002||p
843SV_SMAGIC|5.009003||p
844SV_UTF8_NO_ENCODING|5.008001||p
845SVfARG|5.009005||p
846SVf_UTF8|5.006000||p
847SVf|5.006000||p
848SVt_INVLIST||5.019002|
849SVt_IV|||
850SVt_NULL|||
851SVt_NV|||
852SVt_PVAV|||
853SVt_PVCV|||
854SVt_PVFM|||
855SVt_PVGV|||
856SVt_PVHV|||
857SVt_PVIO|||
858SVt_PVIV|||
859SVt_PVLV|||
860SVt_PVMG|||
861SVt_PVNV|||
862SVt_PV|||
863SVt_REGEXP||5.011000|
864Safefree|||
865Slab_Alloc|||
866Slab_Free|||
867Slab_to_ro|||
868Slab_to_rw|||
869StructCopy|||
870SvCUR_set|||
871SvCUR|||
872SvEND|||
873SvGAMAGIC||5.006001|
874SvGETMAGIC|5.004050||p
875SvGROW|||
876SvIOK_UV||5.006000|
877SvIOK_notUV||5.006000|
878SvIOK_off|||
879SvIOK_only_UV||5.006000|
880SvIOK_only|||
881SvIOK_on|||
882SvIOKp|||
883SvIOK|||
884SvIVX|||
885SvIV_nomg|5.009001||p
886SvIV_set|||
887SvIVx|||
888SvIV|||
889SvIsCOW_shared_hash||5.008003|
890SvIsCOW||5.008003|
891SvLEN_set|||
892SvLEN|||
893SvLOCK||5.007003|
894SvMAGIC_set|5.009003||p
895SvNIOK_off|||
896SvNIOKp|||
897SvNIOK|||
898SvNOK_off|||
899SvNOK_only|||
900SvNOK_on|||
901SvNOKp|||
902SvNOK|||
903SvNVX|||
904SvNV_nomg||5.013002|
905SvNV_set|||
906SvNVx|||
907SvNV|||
908SvOK|||
909SvOOK_offset||5.011000|
910SvOOK|||
911SvPOK_off|||
912SvPOK_only_UTF8||5.006000|
913SvPOK_only|||
914SvPOK_on|||
915SvPOKp|||
916SvPOK|||
917SvPVX_const|5.009003||p
918SvPVX_mutable|5.009003||p
919SvPVX|||
920SvPV_const|5.009003||p
921SvPV_flags_const_nolen|5.009003||p
922SvPV_flags_const|5.009003||p
923SvPV_flags_mutable|5.009003||p
924SvPV_flags|5.007002||p
925SvPV_force_flags_mutable|5.009003||p
926SvPV_force_flags_nolen|5.009003||p
927SvPV_force_flags|5.007002||p
928SvPV_force_mutable|5.009003||p
929SvPV_force_nolen|5.009003||p
930SvPV_force_nomg_nolen|5.009003||p
931SvPV_force_nomg|5.007002||p
932SvPV_force|||p
933SvPV_mutable|5.009003||p
934SvPV_nolen_const|5.009003||p
935SvPV_nolen|5.006000||p
936SvPV_nomg_const_nolen|5.009003||p
937SvPV_nomg_const|5.009003||p
938SvPV_nomg_nolen|5.013007||p
939SvPV_nomg|5.007002||p
940SvPV_renew|5.009003||p
941SvPV_set|||
942SvPVbyte_force||5.009002|
943SvPVbyte_nolen||5.006000|
944SvPVbytex_force||5.006000|
945SvPVbytex||5.006000|
946SvPVbyte|5.006000||p
947SvPVutf8_force||5.006000|
948SvPVutf8_nolen||5.006000|
949SvPVutf8x_force||5.006000|
950SvPVutf8x||5.006000|
951SvPVutf8||5.006000|
952SvPVx|||
953SvPV|||
954SvREFCNT_dec_NN||5.017007|
955SvREFCNT_dec|||
956SvREFCNT_inc_NN|5.009004||p
957SvREFCNT_inc_simple_NN|5.009004||p
958SvREFCNT_inc_simple_void_NN|5.009004||p
959SvREFCNT_inc_simple_void|5.009004||p
960SvREFCNT_inc_simple|5.009004||p
961SvREFCNT_inc_void_NN|5.009004||p
962SvREFCNT_inc_void|5.009004||p
963SvREFCNT_inc|||p
964SvREFCNT|||
965SvROK_off|||
966SvROK_on|||
967SvROK|||
968SvRV_set|5.009003||p
969SvRV|||
970SvRXOK||5.009005|
971SvRX||5.009005|
972SvSETMAGIC|||
973SvSHARED_HASH|5.009003||p
974SvSHARE||5.007003|
975SvSTASH_set|5.009003||p
976SvSTASH|||
977SvSetMagicSV_nosteal||5.004000|
978SvSetMagicSV||5.004000|
979SvSetSV_nosteal||5.004000|
980SvSetSV|||
981SvTAINTED_off||5.004000|
982SvTAINTED_on||5.004000|
983SvTAINTED||5.004000|
984SvTAINT|||
985SvTHINKFIRST|||
986SvTRUE_nomg||5.013006|
987SvTRUE|||
988SvTYPE|||
989SvUNLOCK||5.007003|
990SvUOK|5.007001|5.006000|p
991SvUPGRADE|||
992SvUTF8_off||5.006000|
993SvUTF8_on||5.006000|
994SvUTF8||5.006000|
995SvUVXx|5.004000||p
996SvUVX|5.004000||p
997SvUV_nomg|5.009001||p
998SvUV_set|5.009003||p
999SvUVx|5.004000||p
1000SvUV|5.004000||p
1001SvVOK||5.008001|
1002SvVSTRING_mg|5.009004||p
1003THIS|||n
1004UNDERBAR|5.009002||p
1005UTF8_MAXBYTES|5.009002||p
1006UVSIZE|5.006000||p
1007UVTYPE|5.006000||p
1008UVXf|5.007001||p
1009UVof|5.006000||p
1010UVuf|5.006000||p
1011UVxf|5.006000||p
1012WARN_ALL|5.006000||p
1013WARN_AMBIGUOUS|5.006000||p
1014WARN_ASSERTIONS|5.021008||p
1015WARN_BAREWORD|5.006000||p
1016WARN_CLOSED|5.006000||p
1017WARN_CLOSURE|5.006000||p
1018WARN_DEBUGGING|5.006000||p
1019WARN_DEPRECATED|5.006000||p
1020WARN_DIGIT|5.006000||p
1021WARN_EXEC|5.006000||p
1022WARN_EXITING|5.006000||p
1023WARN_GLOB|5.006000||p
1024WARN_INPLACE|5.006000||p
1025WARN_INTERNAL|5.006000||p
1026WARN_IO|5.006000||p
1027WARN_LAYER|5.008000||p
1028WARN_MALLOC|5.006000||p
1029WARN_MISC|5.006000||p
1030WARN_NEWLINE|5.006000||p
1031WARN_NUMERIC|5.006000||p
1032WARN_ONCE|5.006000||p
1033WARN_OVERFLOW|5.006000||p
1034WARN_PACK|5.006000||p
1035WARN_PARENTHESIS|5.006000||p
1036WARN_PIPE|5.006000||p
1037WARN_PORTABLE|5.006000||p
1038WARN_PRECEDENCE|5.006000||p
1039WARN_PRINTF|5.006000||p
1040WARN_PROTOTYPE|5.006000||p
1041WARN_QW|5.006000||p
1042WARN_RECURSION|5.006000||p
1043WARN_REDEFINE|5.006000||p
1044WARN_REGEXP|5.006000||p
1045WARN_RESERVED|5.006000||p
1046WARN_SEMICOLON|5.006000||p
1047WARN_SEVERE|5.006000||p
1048WARN_SIGNAL|5.006000||p
1049WARN_SUBSTR|5.006000||p
1050WARN_SYNTAX|5.006000||p
1051WARN_TAINT|5.006000||p
1052WARN_THREADS|5.008000||p
1053WARN_UNINITIALIZED|5.006000||p
1054WARN_UNOPENED|5.006000||p
1055WARN_UNPACK|5.006000||p
1056WARN_UNTIE|5.006000||p
1057WARN_UTF8|5.006000||p
1058WARN_VOID|5.006000||p
1059WIDEST_UTYPE|5.015004||p
1060XCPT_CATCH|5.009002||p
1061XCPT_RETHROW|5.009002||p
1062XCPT_TRY_END|5.009002||p
1063XCPT_TRY_START|5.009002||p
1064XPUSHi|||
1065XPUSHmortal|5.009002||p
1066XPUSHn|||
1067XPUSHp|||
1068XPUSHs|||
1069XPUSHu|5.004000||p
1070XSPROTO|5.010000||p
1071XSRETURN_EMPTY|||
1072XSRETURN_IV|||
1073XSRETURN_NO|||
1074XSRETURN_NV|||
1075XSRETURN_PV|||
1076XSRETURN_UNDEF|||
1077XSRETURN_UV|5.008001||p
1078XSRETURN_YES|||
1079XSRETURN|||p
1080XST_mIV|||
1081XST_mNO|||
1082XST_mNV|||
1083XST_mPV|||
1084XST_mUNDEF|||
1085XST_mUV|5.008001||p
1086XST_mYES|||
1087XS_APIVERSION_BOOTCHECK||5.021008|
1088XS_EXTERNAL||5.021008|
1089XS_INTERNAL||5.021008|
1090XS_VERSION_BOOTCHECK||5.021008|
1091XS_VERSION|||
1092XSprePUSH|5.006000||p
1093XS|||
1094XopDISABLE||5.021008|
1095XopENABLE||5.021008|
1096XopENTRYCUSTOM||5.021008|
1097XopENTRY_set||5.021008|
1098XopENTRY||5.021008|
1099XopFLAGS||5.013007|
1100ZeroD|5.009002||p
1101Zero|||
1102_aMY_CXT|5.007003||p
1103_add_range_to_invlist|||
1104_append_range_to_invlist|||
1105_core_swash_init|||
1106_get_encoding|||
1107_get_regclass_nonbitmap_data|||
1108_get_swash_invlist|||
1109_invlist_array_init|||n
1110_invlist_contains_cp|||n
1111_invlist_contents|||
1112_invlist_dump|||
1113_invlist_intersection_maybe_complement_2nd|||
1114_invlist_intersection|||
1115_invlist_invert|||
1116_invlist_len|||n
1117_invlist_populate_swatch|||n
1118_invlist_search|||n
1119_invlist_subtract|||
1120_invlist_union_maybe_complement_2nd|||
1121_invlist_union|||
1122_is_cur_LC_category_utf8|||
1123_is_in_locale_category||5.021001|
1124_is_uni_FOO||5.017008|
1125_is_uni_perl_idcont||5.017008|
1126_is_uni_perl_idstart||5.017007|
1127_is_utf8_FOO||5.017008|
1128_is_utf8_char_slow||5.021001|n
1129_is_utf8_idcont||5.021001|
1130_is_utf8_idstart||5.021001|
1131_is_utf8_mark||5.017008|
1132_is_utf8_perl_idcont||5.017008|
1133_is_utf8_perl_idstart||5.017007|
1134_is_utf8_xidcont||5.021001|
1135_is_utf8_xidstart||5.021001|
1136_load_PL_utf8_foldclosures|||
1137_make_exactf_invlist|||
1138_new_invlist_C_array|||
1139_new_invlist|||
1140_pMY_CXT|5.007003||p
1141_setup_canned_invlist|||
1142_swash_inversion_hash|||
1143_swash_to_invlist|||
1144_to_fold_latin1|||
1145_to_uni_fold_flags||5.014000|
1146_to_upper_title_latin1|||
1147_to_utf8_fold_flags||5.019009|
1148_to_utf8_lower_flags||5.019009|
1149_to_utf8_title_flags||5.019009|
1150_to_utf8_upper_flags||5.019009|
1151_warn_problematic_locale|||n
1152aMY_CXT_|5.007003||p
1153aMY_CXT|5.007003||p
1154aTHXR_|5.021008||p
1155aTHXR|5.021008||p
1156aTHX_|5.006000||p
1157aTHX|5.006000||p
1158aassign_common_vars|||
1159add_above_Latin1_folds|||
1160add_cp_to_invlist|||
1161add_data|||n
1162add_multi_match|||
1163add_utf16_textfilter|||
1164adjust_size_and_find_bucket|||n
1165advance_one_SB|||
1166advance_one_WB|||
1167alloc_maybe_populate_EXACT|||
1168alloccopstash|||
1169allocmy|||
1170amagic_call|||
1171amagic_cmp_locale|||
1172amagic_cmp|||
1173amagic_deref_call||5.013007|
1174amagic_i_ncmp|||
1175amagic_is_enabled|||
1176amagic_ncmp|||
1177anonymise_cv_maybe|||
1178any_dup|||
1179ao|||
1180append_utf8_from_native_byte||5.019004|n
1181apply_attrs_my|||
1182apply_attrs_string||5.006001|
1183apply_attrs|||
1184apply|||
1185assert_uft8_cache_coherent|||
1186assignment_type|||
1187atfork_lock||5.007003|n
1188atfork_unlock||5.007003|n
1189av_arylen_p||5.009003|
1190av_clear|||
1191av_create_and_push||5.009005|
1192av_create_and_unshift_one||5.009005|
1193av_delete||5.006000|
1194av_exists||5.006000|
1195av_extend_guts|||
1196av_extend|||
1197av_fetch|||
1198av_fill|||
1199av_iter_p||5.011000|
1200av_len|||
1201av_make|||
1202av_pop|||
1203av_push|||
1204av_reify|||
1205av_shift|||
1206av_store|||
1207av_tindex||5.017009|
1208av_top_index||5.017009|
1209av_undef|||
1210av_unshift|||
1211ax|||n
1212backup_one_SB|||
1213backup_one_WB|||
1214bad_type_gv|||
1215bad_type_pv|||
1216bind_match|||
1217block_end||5.004000|
1218block_gimme||5.004000|
1219block_start||5.004000|
1220blockhook_register||5.013003|
1221boolSV|5.004000||p
1222boot_core_PerlIO|||
1223boot_core_UNIVERSAL|||
1224boot_core_mro|||
1225bytes_cmp_utf8||5.013007|
1226bytes_from_utf8||5.007001|
1227bytes_to_utf8||5.006001|
1228call_argv|5.006000||p
1229call_atexit||5.006000|
1230call_list||5.004000|
1231call_method|5.006000||p
1232call_pv|5.006000||p
1233call_sv|5.006000||p
1234caller_cx|5.013005|5.006000|p
1235calloc||5.007002|n
1236cando|||
1237cast_i32||5.006000|n
1238cast_iv||5.006000|n
1239cast_ulong||5.006000|n
1240cast_uv||5.006000|n
1241check_locale_boundary_crossing|||
1242check_type_and_open|||
1243check_uni|||
1244check_utf8_print|||
1245checkcomma|||
1246ckWARN|5.006000||p
1247ck_entersub_args_core|||
1248ck_entersub_args_list||5.013006|
1249ck_entersub_args_proto_or_list||5.013006|
1250ck_entersub_args_proto||5.013006|
1251ck_warner_d||5.011001|v
1252ck_warner||5.011001|v
1253ckwarn_common|||
1254ckwarn_d||5.009003|
1255ckwarn||5.009003|
1256clear_placeholders|||
1257clear_special_blocks|||
1258clone_params_del|||n
1259clone_params_new|||n
1260closest_cop|||
1261cntrl_to_mnemonic|||n
1262compute_EXACTish|||n
1263construct_ahocorasick_from_trie|||
1264cop_fetch_label||5.015001|
1265cop_free|||
1266cop_hints_2hv||5.013007|
1267cop_hints_fetch_pvn||5.013007|
1268cop_hints_fetch_pvs||5.013007|
1269cop_hints_fetch_pv||5.013007|
1270cop_hints_fetch_sv||5.013007|
1271cop_store_label||5.015001|
1272cophh_2hv||5.013007|
1273cophh_copy||5.013007|
1274cophh_delete_pvn||5.013007|
1275cophh_delete_pvs||5.013007|
1276cophh_delete_pv||5.013007|
1277cophh_delete_sv||5.013007|
1278cophh_fetch_pvn||5.013007|
1279cophh_fetch_pvs||5.013007|
1280cophh_fetch_pv||5.013007|
1281cophh_fetch_sv||5.013007|
1282cophh_free||5.013007|
1283cophh_new_empty||5.021008|
1284cophh_store_pvn||5.013007|
1285cophh_store_pvs||5.013007|
1286cophh_store_pv||5.013007|
1287cophh_store_sv||5.013007|
1288core_prototype|||
1289coresub_op|||
1290could_it_be_a_POSIX_class|||n
1291cr_textfilter|||
1292create_eval_scope|||
1293croak_memory_wrap||5.019003|n
1294croak_no_mem|||n
1295croak_no_modify||5.013003|n
1296croak_nocontext|||vn
1297croak_popstack|||n
1298croak_sv||5.013001|
1299croak_xs_usage||5.010001|n
1300croak|||v
1301csighandler||5.009003|n
1302current_re_engine|||
1303curse|||
1304custom_op_desc||5.007003|
1305custom_op_get_field|||
1306custom_op_name||5.007003|
1307custom_op_register||5.013007|
1308custom_op_xop||5.013007|
1309cv_ckproto_len_flags|||
1310cv_clone_into|||
1311cv_clone|||
1312cv_const_sv_or_av|||n
1313cv_const_sv||5.003070|n
1314cv_dump|||
1315cv_forget_slab|||
1316cv_get_call_checker||5.013006|
1317cv_name||5.021005|
1318cv_set_call_checker_flags||5.021004|
1319cv_set_call_checker||5.013006|
1320cv_undef_flags|||
1321cv_undef|||
1322cvgv_from_hek|||
1323cvgv_set|||
1324cvstash_set|||
1325cx_dump||5.005000|
1326cx_dup|||
1327cxinc|||
1328dAXMARK|5.009003||p
1329dAX|5.007002||p
1330dITEMS|5.007002||p
1331dMARK|||
1332dMULTICALL||5.009003|
1333dMY_CXT_SV|5.007003||p
1334dMY_CXT|5.007003||p
1335dNOOP|5.006000||p
1336dORIGMARK|||
1337dSP|||
1338dTHR|5.004050||p
1339dTHXR|5.021008||p
1340dTHXa|5.006000||p
1341dTHXoa|5.006000||p
1342dTHX|5.006000||p
1343dUNDERBAR|5.009002||p
1344dVAR|5.009003||p
1345dXCPT|5.009002||p
1346dXSARGS|||
1347dXSI32|||
1348dXSTARG|5.006000||p
1349deb_curcv|||
1350deb_nocontext|||vn
1351deb_stack_all|||
1352deb_stack_n|||
1353debop||5.005000|
1354debprofdump||5.005000|
1355debprof|||
1356debstackptrs||5.007003|
1357debstack||5.007003|
1358debug_start_match|||
1359deb||5.007003|v
1360defelem_target|||
1361del_sv|||
1362delete_eval_scope|||
1363delimcpy||5.004000|n
1364deprecate_commaless_var_list|||
1365despatch_signals||5.007001|
1366destroy_matcher|||
1367die_nocontext|||vn
1368die_sv||5.013001|
1369die_unwind|||
1370die|||v
1371dirp_dup|||
1372div128|||
1373djSP|||
1374do_aexec5|||
1375do_aexec|||
1376do_aspawn|||
1377do_binmode||5.004050|
1378do_chomp|||
1379do_close|||
1380do_delete_local|||
1381do_dump_pad|||
1382do_eof|||
1383do_exec3|||
1384do_execfree|||
1385do_exec|||
1386do_gv_dump||5.006000|
1387do_gvgv_dump||5.006000|
1388do_hv_dump||5.006000|
1389do_ipcctl|||
1390do_ipcget|||
1391do_join|||
1392do_magic_dump||5.006000|
1393do_msgrcv|||
1394do_msgsnd|||
1395do_ncmp|||
1396do_oddball|||
1397do_op_dump||5.006000|
1398do_open6|||
1399do_open9||5.006000|
1400do_open_raw|||
1401do_openn||5.007001|
1402do_open||5.003070|
1403do_pmop_dump||5.006000|
1404do_print|||
1405do_readline|||
1406do_seek|||
1407do_semop|||
1408do_shmio|||
1409do_smartmatch|||
1410do_spawn_nowait|||
1411do_spawn|||
1412do_sprintf|||
1413do_sv_dump||5.006000|
1414do_sysseek|||
1415do_tell|||
1416do_trans_complex_utf8|||
1417do_trans_complex|||
1418do_trans_count_utf8|||
1419do_trans_count|||
1420do_trans_simple_utf8|||
1421do_trans_simple|||
1422do_trans|||
1423do_vecget|||
1424do_vecset|||
1425do_vop|||
1426docatch|||
1427doeval|||
1428dofile|||
1429dofindlabel|||
1430doform|||
1431doing_taint||5.008001|n
1432dooneliner|||
1433doopen_pm|||
1434doparseform|||
1435dopoptoeval|||
1436dopoptogiven|||
1437dopoptolabel|||
1438dopoptoloop|||
1439dopoptosub_at|||
1440dopoptowhen|||
1441doref||5.009003|
1442dounwind|||
1443dowantarray|||
1444drand48_init_r|||n
1445drand48_r|||n
1446dump_all_perl|||
1447dump_all||5.006000|
1448dump_c_backtrace|||
1449dump_eval||5.006000|
1450dump_exec_pos|||
1451dump_form||5.006000|
1452dump_indent||5.006000|v
1453dump_mstats|||
1454dump_packsubs_perl|||
1455dump_packsubs||5.006000|
1456dump_sub_perl|||
1457dump_sub||5.006000|
1458dump_sv_child|||
1459dump_trie_interim_list|||
1460dump_trie_interim_table|||
1461dump_trie|||
1462dump_vindent||5.006000|
1463dumpuntil|||
1464dup_attrlist|||
1465emulate_cop_io|||
1466eval_pv|5.006000||p
1467eval_sv|5.006000||p
1468exec_failed|||
1469expect_number|||
1470fbm_compile||5.005000|
1471fbm_instr||5.005000|
1472feature_is_enabled|||
1473filter_add|||
1474filter_del|||
1475filter_gets|||
1476filter_read|||
1477finalize_optree|||
1478finalize_op|||
1479find_and_forget_pmops|||
1480find_array_subscript|||
1481find_beginning|||
1482find_byclass|||
1483find_default_stash|||
1484find_hash_subscript|||
1485find_in_my_stash|||
1486find_lexical_cv|||
1487find_runcv_where|||
1488find_runcv||5.008001|
1489find_rundefsv2|||
1490find_rundefsvoffset||5.009002|
1491find_rundefsv||5.013002|
1492find_script|||
1493find_uninit_var|||
1494first_symbol|||n
1495fixup_errno_string|||
1496foldEQ_latin1||5.013008|n
1497foldEQ_locale||5.013002|n
1498foldEQ_utf8_flags||5.013010|
1499foldEQ_utf8||5.013002|
1500foldEQ||5.013002|n
1501fold_constants|||
1502forbid_setid|||
1503force_ident_maybe_lex|||
1504force_ident|||
1505force_list|||
1506force_next|||
1507force_strict_version|||
1508force_version|||
1509force_word|||
1510forget_pmop|||
1511form_nocontext|||vn
1512form_short_octal_warning|||
1513form||5.004000|v
1514fp_dup|||
1515fprintf_nocontext|||vn
1516free_c_backtrace|||
1517free_global_struct|||
1518free_tied_hv_pool|||
1519free_tmps|||
1520gen_constant_list|||
1521get_ANYOF_cp_list_for_ssc|||
1522get_and_check_backslash_N_name|||
1523get_aux_mg|||
1524get_av|5.006000||p
1525get_c_backtrace_dump|||
1526get_c_backtrace|||
1527get_context||5.006000|n
1528get_cvn_flags|5.009005||p
1529get_cvs|5.011000||p
1530get_cv|5.006000||p
1531get_db_sub|||
1532get_debug_opts|||
1533get_hash_seed|||
1534get_hv|5.006000||p
1535get_invlist_iter_addr|||n
1536get_invlist_offset_addr|||n
1537get_invlist_previous_index_addr|||n
1538get_mstats|||
1539get_no_modify|||
1540get_num|||
1541get_op_descs||5.005000|
1542get_op_names||5.005000|
1543get_opargs|||
1544get_ppaddr||5.006000|
1545get_re_arg|||
1546get_sv|5.006000||p
1547get_vtbl||5.005030|
1548getcwd_sv||5.007002|
1549getenv_len|||
1550glob_2number|||
1551glob_assign_glob|||
1552gp_dup|||
1553gp_free|||
1554gp_ref|||
1555grok_atoUV|||n
1556grok_bin|5.007003||p
1557grok_bslash_N|||
1558grok_bslash_c|||
1559grok_bslash_o|||
1560grok_bslash_x|||
1561grok_hex|5.007003||p
1562grok_infnan||5.021004|
1563grok_number_flags||5.021002|
1564grok_number|5.007002||p
1565grok_numeric_radix|5.007002||p
1566grok_oct|5.007003||p
1567group_end|||
1568gv_AVadd|||
1569gv_HVadd|||
1570gv_IOadd|||
1571gv_SVadd|||
1572gv_add_by_type||5.011000|
1573gv_autoload4||5.004000|
1574gv_autoload_pvn||5.015004|
1575gv_autoload_pv||5.015004|
1576gv_autoload_sv||5.015004|
1577gv_check|||
1578gv_const_sv||5.009003|
1579gv_dump||5.006000|
1580gv_efullname3||5.003070|
1581gv_efullname4||5.006001|
1582gv_efullname|||
1583gv_fetchfile_flags||5.009005|
1584gv_fetchfile|||
1585gv_fetchmeth_autoload||5.007003|
1586gv_fetchmeth_internal|||
1587gv_fetchmeth_pv_autoload||5.015004|
1588gv_fetchmeth_pvn_autoload||5.015004|
1589gv_fetchmeth_pvn||5.015004|
1590gv_fetchmeth_pv||5.015004|
1591gv_fetchmeth_sv_autoload||5.015004|
1592gv_fetchmeth_sv||5.015004|
1593gv_fetchmethod_autoload||5.004000|
1594gv_fetchmethod_pv_flags||5.015004|
1595gv_fetchmethod_pvn_flags||5.015004|
1596gv_fetchmethod_sv_flags||5.015004|
1597gv_fetchmethod|||
1598gv_fetchmeth|||
1599gv_fetchpvn_flags|5.009002||p
1600gv_fetchpvs|5.009004||p
1601gv_fetchpv|||
1602gv_fetchsv|5.009002||p
1603gv_fullname3||5.003070|
1604gv_fullname4||5.006001|
1605gv_fullname|||
1606gv_handler||5.007001|
1607gv_init_pvn||5.015004|
1608gv_init_pv||5.015004|
1609gv_init_svtype|||
1610gv_init_sv||5.015004|
1611gv_init|||
1612gv_is_in_main|||
1613gv_magicalize_isa|||
1614gv_magicalize|||
1615gv_name_set||5.009004|
1616gv_override|||
1617gv_setref|||
1618gv_stashpvn_internal|||
1619gv_stashpvn|5.003070||p
1620gv_stashpvs|5.009003||p
1621gv_stashpv|||
1622gv_stashsvpvn_cached|||
1623gv_stashsv|||
1624gv_try_downgrade|||
1625handle_regex_sets|||
1626he_dup|||
1627hek_dup|||
1628hfree_next_entry|||
1629hfreeentries|||
1630hsplit|||
1631hv_assert|||
1632hv_auxinit_internal|||n
1633hv_auxinit|||
1634hv_backreferences_p|||
1635hv_clear_placeholders||5.009001|
1636hv_clear|||
1637hv_common_key_len||5.010000|
1638hv_common||5.010000|
1639hv_copy_hints_hv||5.009004|
1640hv_delayfree_ent||5.004000|
1641hv_delete_common|||
1642hv_delete_ent||5.003070|
1643hv_delete|||
1644hv_eiter_p||5.009003|
1645hv_eiter_set||5.009003|
1646hv_ename_add|||
1647hv_ename_delete|||
1648hv_exists_ent||5.003070|
1649hv_exists|||
1650hv_fetch_ent||5.003070|
1651hv_fetchs|5.009003||p
1652hv_fetch|||
1653hv_fill||5.013002|
1654hv_free_ent_ret|||
1655hv_free_ent||5.004000|
1656hv_iterinit|||
1657hv_iterkeysv||5.003070|
1658hv_iterkey|||
1659hv_iternext_flags||5.008000|
1660hv_iternextsv|||
1661hv_iternext|||
1662hv_iterval|||
1663hv_kill_backrefs|||
1664hv_ksplit||5.003070|
1665hv_magic_check|||n
1666hv_magic|||
1667hv_name_set||5.009003|
1668hv_notallowed|||
1669hv_placeholders_get||5.009003|
1670hv_placeholders_p|||
1671hv_placeholders_set||5.009003|
1672hv_rand_set||5.018000|
1673hv_riter_p||5.009003|
1674hv_riter_set||5.009003|
1675hv_scalar||5.009001|
1676hv_store_ent||5.003070|
1677hv_store_flags||5.008000|
1678hv_stores|5.009004||p
1679hv_store|||
1680hv_undef_flags|||
1681hv_undef|||
1682ibcmp_locale||5.004000|
1683ibcmp_utf8||5.007003|
1684ibcmp|||
1685incline|||
1686incpush_if_exists|||
1687incpush_use_sep|||
1688incpush|||
1689ingroup|||
1690init_argv_symbols|||
1691init_constants|||
1692init_dbargs|||
1693init_debugger|||
1694init_global_struct|||
1695init_i18nl10n||5.006000|
1696init_i18nl14n||5.006000|
1697init_ids|||
1698init_interp|||
1699init_main_stash|||
1700init_perllib|||
1701init_postdump_symbols|||
1702init_predump_symbols|||
1703init_stacks||5.005000|
1704init_tm||5.007002|
1705inplace_aassign|||
1706instr|||n
1707intro_my||5.004000|
1708intuit_method|||
1709intuit_more|||
1710invert|||
1711invlist_array|||n
1712invlist_clone|||
1713invlist_extend|||
1714invlist_highest|||n
1715invlist_is_iterating|||n
1716invlist_iterfinish|||n
1717invlist_iterinit|||n
1718invlist_iternext|||n
1719invlist_max|||n
1720invlist_previous_index|||n
1721invlist_set_len|||
1722invlist_set_previous_index|||n
1723invlist_trim|||n
1724invoke_exception_hook|||
1725io_close|||
1726isALNUMC|5.006000||p
1727isALNUM_lazy||5.021001|
1728isALPHANUMERIC||5.017008|
1729isALPHA|||
1730isASCII|5.006000||p
1731isBLANK|5.006001||p
1732isCNTRL|5.006000||p
1733isDIGIT|||
1734isFOO_lc|||
1735isFOO_utf8_lc|||
1736isGCB|||n
1737isGRAPH|5.006000||p
1738isGV_with_GP|5.009004||p
1739isIDCONT||5.017008|
1740isIDFIRST_lazy||5.021001|
1741isIDFIRST|||
1742isLOWER|||
1743isOCTAL||5.013005|
1744isPRINT|5.004000||p
1745isPSXSPC|5.006001||p
1746isPUNCT|5.006000||p
1747isSB|||
1748isSPACE|||
1749isUPPER|||
1750isUTF8_CHAR||5.021001|
1751isWB|||
1752isWORDCHAR||5.013006|
1753isXDIGIT|5.006000||p
1754is_an_int|||
1755is_ascii_string||5.011000|
1756is_handle_constructor|||n
1757is_invariant_string||5.021007|n
1758is_lvalue_sub||5.007001|
1759is_safe_syscall||5.019004|
1760is_ssc_worth_it|||n
1761is_uni_alnum_lc||5.006000|
1762is_uni_alnumc_lc||5.017007|
1763is_uni_alnumc||5.017007|
1764is_uni_alnum||5.006000|
1765is_uni_alpha_lc||5.006000|
1766is_uni_alpha||5.006000|
1767is_uni_ascii_lc||5.006000|
1768is_uni_ascii||5.006000|
1769is_uni_blank_lc||5.017002|
1770is_uni_blank||5.017002|
1771is_uni_cntrl_lc||5.006000|
1772is_uni_cntrl||5.006000|
1773is_uni_digit_lc||5.006000|
1774is_uni_digit||5.006000|
1775is_uni_graph_lc||5.006000|
1776is_uni_graph||5.006000|
1777is_uni_idfirst_lc||5.006000|
1778is_uni_idfirst||5.006000|
1779is_uni_lower_lc||5.006000|
1780is_uni_lower||5.006000|
1781is_uni_print_lc||5.006000|
1782is_uni_print||5.006000|
1783is_uni_punct_lc||5.006000|
1784is_uni_punct||5.006000|
1785is_uni_space_lc||5.006000|
1786is_uni_space||5.006000|
1787is_uni_upper_lc||5.006000|
1788is_uni_upper||5.006000|
1789is_uni_xdigit_lc||5.006000|
1790is_uni_xdigit||5.006000|
1791is_utf8_alnumc||5.017007|
1792is_utf8_alnum||5.006000|
1793is_utf8_alpha||5.006000|
1794is_utf8_ascii||5.006000|
1795is_utf8_blank||5.017002|
1796is_utf8_char_buf||5.015008|n
1797is_utf8_char||5.006000|n
1798is_utf8_cntrl||5.006000|
1799is_utf8_common|||
1800is_utf8_digit||5.006000|
1801is_utf8_graph||5.006000|
1802is_utf8_idcont||5.008000|
1803is_utf8_idfirst||5.006000|
1804is_utf8_lower||5.006000|
1805is_utf8_mark||5.006000|
1806is_utf8_perl_space||5.011001|
1807is_utf8_perl_word||5.011001|
1808is_utf8_posix_digit||5.011001|
1809is_utf8_print||5.006000|
1810is_utf8_punct||5.006000|
1811is_utf8_space||5.006000|
1812is_utf8_string_loclen||5.009003|n
1813is_utf8_string_loc||5.008001|n
1814is_utf8_string||5.006001|n
1815is_utf8_upper||5.006000|
1816is_utf8_xdigit||5.006000|
1817is_utf8_xidcont||5.013010|
1818is_utf8_xidfirst||5.013010|
1819isa_lookup|||
1820isinfnansv|||
1821isinfnan||5.021004|n
1822items|||n
1823ix|||n
1824jmaybe|||
1825join_exact|||
1826keyword_plugin_standard|||
1827keyword|||
1828leave_common|||
1829leave_scope|||
1830lex_bufutf8||5.011002|
1831lex_discard_to||5.011002|
1832lex_grow_linestr||5.011002|
1833lex_next_chunk||5.011002|
1834lex_peek_unichar||5.011002|
1835lex_read_space||5.011002|
1836lex_read_to||5.011002|
1837lex_read_unichar||5.011002|
1838lex_start||5.009005|
1839lex_stuff_pvn||5.011002|
1840lex_stuff_pvs||5.013005|
1841lex_stuff_pv||5.013006|
1842lex_stuff_sv||5.011002|
1843lex_unstuff||5.011002|
1844listkids|||
1845list|||
1846load_module_nocontext|||vn
1847load_module|5.006000||pv
1848localize|||
1849looks_like_bool|||
1850looks_like_number|||
1851lop|||
1852mPUSHi|5.009002||p
1853mPUSHn|5.009002||p
1854mPUSHp|5.009002||p
1855mPUSHs|5.010001||p
1856mPUSHu|5.009002||p
1857mXPUSHi|5.009002||p
1858mXPUSHn|5.009002||p
1859mXPUSHp|5.009002||p
1860mXPUSHs|5.010001||p
1861mXPUSHu|5.009002||p
1862magic_clear_all_env|||
1863magic_cleararylen_p|||
1864magic_clearenv|||
1865magic_clearhints|||
1866magic_clearhint|||
1867magic_clearisa|||
1868magic_clearpack|||
1869magic_clearsig|||
1870magic_copycallchecker|||
1871magic_dump||5.006000|
1872magic_existspack|||
1873magic_freearylen_p|||
1874magic_freeovrld|||
1875magic_getarylen|||
1876magic_getdebugvar|||
1877magic_getdefelem|||
1878magic_getnkeys|||
1879magic_getpack|||
1880magic_getpos|||
1881magic_getsig|||
1882magic_getsubstr|||
1883magic_gettaint|||
1884magic_getuvar|||
1885magic_getvec|||
1886magic_get|||
1887magic_killbackrefs|||
1888magic_methcall1|||
1889magic_methcall|||v
1890magic_methpack|||
1891magic_nextpack|||
1892magic_regdata_cnt|||
1893magic_regdatum_get|||
1894magic_regdatum_set|||
1895magic_scalarpack|||
1896magic_set_all_env|||
1897magic_setarylen|||
1898magic_setcollxfrm|||
1899magic_setdbline|||
1900magic_setdebugvar|||
1901magic_setdefelem|||
1902magic_setenv|||
1903magic_sethint|||
1904magic_setisa|||
1905magic_setlvref|||
1906magic_setmglob|||
1907magic_setnkeys|||
1908magic_setpack|||
1909magic_setpos|||
1910magic_setregexp|||
1911magic_setsig|||
1912magic_setsubstr|||
1913magic_settaint|||
1914magic_setutf8|||
1915magic_setuvar|||
1916magic_setvec|||
1917magic_set|||
1918magic_sizepack|||
1919magic_wipepack|||
1920make_matcher|||
1921make_trie|||
1922malloc_good_size|||n
1923malloced_size|||n
1924malloc||5.007002|n
1925markstack_grow||5.021001|
1926matcher_matches_sv|||
1927maybe_multimagic_gv|||
1928mayberelocate|||
1929measure_struct|||
1930memEQs|5.009005||p
1931memEQ|5.004000||p
1932memNEs|5.009005||p
1933memNE|5.004000||p
1934mem_collxfrm|||
1935mem_log_common|||n
1936mess_alloc|||
1937mess_nocontext|||vn
1938mess_sv||5.013001|
1939mess||5.006000|v
1940mfree||5.007002|n
1941mg_clear|||
1942mg_copy|||
1943mg_dup|||
1944mg_find_mglob|||
1945mg_findext|5.013008||pn
1946mg_find|||n
1947mg_free_type||5.013006|
1948mg_free|||
1949mg_get|||
1950mg_length||5.005000|
1951mg_localize|||
1952mg_magical|||n
1953mg_set|||
1954mg_size||5.005000|
1955mini_mktime||5.007002|n
1956minus_v|||
1957missingterm|||
1958mode_from_discipline|||
1959modkids|||
1960more_bodies|||
1961more_sv|||
1962moreswitches|||
1963move_proto_attr|||
1964mro_clean_isarev|||
1965mro_gather_and_rename|||
1966mro_get_from_name||5.010001|
1967mro_get_linear_isa_dfs|||
1968mro_get_linear_isa||5.009005|
1969mro_get_private_data||5.010001|
1970mro_isa_changed_in|||
1971mro_meta_dup|||
1972mro_meta_init|||
1973mro_method_changed_in||5.009005|
1974mro_package_moved|||
1975mro_register||5.010001|
1976mro_set_mro||5.010001|
1977mro_set_private_data||5.010001|
1978mul128|||
1979mulexp10|||n
1980multideref_stringify|||
1981my_atof2||5.007002|
1982my_atof||5.006000|
1983my_attrs|||
1984my_bcopy|||n
1985my_bytes_to_utf8|||n
1986my_bzero|||n
1987my_chsize|||
1988my_clearenv|||
1989my_cxt_index|||
1990my_cxt_init|||
1991my_dirfd||5.009005|n
1992my_exit_jump|||
1993my_exit|||
1994my_failure_exit||5.004000|
1995my_fflush_all||5.006000|
1996my_fork||5.007003|n
1997my_kid|||
1998my_lstat_flags|||
1999my_lstat||5.021008|
2000my_memcmp|||n
2001my_memset|||n
2002my_pclose||5.003070|
2003my_popen_list||5.007001|
2004my_popen||5.003070|
2005my_setenv|||
2006my_setlocale|||
2007my_snprintf|5.009004||pvn
2008my_socketpair||5.007003|n
2009my_sprintf|5.009003||pvn
2010my_stat_flags|||
2011my_stat||5.021008|
2012my_strerror||5.021001|
2013my_strftime||5.007002|
2014my_strlcat|5.009004||pn
2015my_strlcpy|5.009004||pn
2016my_unexec|||
2017my_vsnprintf||5.009004|n
2018need_utf8|||n
2019newANONATTRSUB||5.006000|
2020newANONHASH|||
2021newANONLIST|||
2022newANONSUB|||
2023newASSIGNOP|||
2024newATTRSUB_x|||
2025newATTRSUB||5.006000|
2026newAVREF|||
2027newAV|||
2028newBINOP|||
2029newCONDOP|||
2030newCONSTSUB_flags||5.015006|
2031newCONSTSUB|5.004050||p
2032newCVREF|||
2033newDEFSVOP||5.021006|
2034newFORM|||
2035newFOROP||5.013007|
2036newGIVENOP||5.009003|
2037newGIVWHENOP|||
2038newGP|||
2039newGVOP|||
2040newGVREF|||
2041newGVgen_flags||5.015004|
2042newGVgen|||
2043newHVREF|||
2044newHVhv||5.005000|
2045newHV|||
2046newIO|||
2047newLISTOP|||
2048newLOGOP|||
2049newLOOPEX|||
2050newLOOPOP|||
2051newMETHOP_internal|||
2052newMETHOP_named||5.021005|
2053newMETHOP||5.021005|
2054newMYSUB||5.017004|
2055newNULLLIST|||
2056newOP|||
2057newPADNAMELIST||5.021007|n
2058newPADNAMEouter||5.021007|n
2059newPADNAMEpvn||5.021007|n
2060newPADOP|||
2061newPMOP|||
2062newPROG|||
2063newPVOP|||
2064newRANGE|||
2065newRV_inc|5.004000||p
2066newRV_noinc|5.004000||p
2067newRV|||
2068newSLICEOP|||
2069newSTATEOP|||
2070newSTUB|||
2071newSUB|||
2072newSVOP|||
2073newSVREF|||
2074newSV_type|5.009005||p
2075newSVavdefelem|||
2076newSVhek||5.009003|
2077newSViv|||
2078newSVnv|||
2079newSVpadname||5.017004|
2080newSVpv_share||5.013006|
2081newSVpvf_nocontext|||vn
2082newSVpvf||5.004000|v
2083newSVpvn_flags|5.010001||p
2084newSVpvn_share|5.007001||p
2085newSVpvn_utf8|5.010001||p
2086newSVpvn|5.004050||p
2087newSVpvs_flags|5.010001||p
2088newSVpvs_share|5.009003||p
2089newSVpvs|5.009003||p
2090newSVpv|||
2091newSVrv|||
2092newSVsv|||
2093newSVuv|5.006000||p
2094newSV|||
2095newUNOP_AUX||5.021007|
2096newUNOP|||
2097newWHENOP||5.009003|
2098newWHILEOP||5.013007|
2099newXS_deffile|||
2100newXS_flags||5.009004|
2101newXS_len_flags|||
2102newXSproto||5.006000|
2103newXS||5.006000|
2104new_collate||5.006000|
2105new_constant|||
2106new_ctype||5.006000|
2107new_he|||
2108new_logop|||
2109new_numeric||5.006000|
2110new_stackinfo||5.005000|
2111new_version||5.009000|
2112new_warnings_bitfield|||
2113next_symbol|||
2114nextargv|||
2115nextchar|||
2116ninstr|||n
2117no_bareword_allowed|||
2118no_fh_allowed|||
2119no_op|||
2120noperl_die|||vn
2121not_a_number|||
2122not_incrementable|||
2123nothreadhook||5.008000|
2124nuke_stacks|||
2125num_overflow|||n
2126oopsAV|||
2127oopsHV|||
2128op_append_elem||5.013006|
2129op_append_list||5.013006|
2130op_clear|||
2131op_contextualize||5.013006|
2132op_convert_list||5.021006|
2133op_dump||5.006000|
2134op_free|||
2135op_integerize|||
2136op_linklist||5.013006|
2137op_lvalue_flags|||
2138op_lvalue||5.013007|
2139op_null||5.007002|
2140op_parent||5.021002|n
2141op_prepend_elem||5.013006|
2142op_refcnt_dec|||
2143op_refcnt_inc|||
2144op_refcnt_lock||5.009002|
2145op_refcnt_unlock||5.009002|
2146op_relocate_sv|||
2147op_scope||5.013007|
2148op_sibling_splice||5.021002|n
2149op_std_init|||
2150op_unscope|||
2151open_script|||
2152openn_cleanup|||
2153openn_setup|||
2154opmethod_stash|||
2155opslab_force_free|||
2156opslab_free_nopad|||
2157opslab_free|||
2158pMY_CXT_|5.007003||p
2159pMY_CXT|5.007003||p
2160pTHX_|5.006000||p
2161pTHX|5.006000||p
2162packWARN|5.007003||p
2163pack_cat||5.007003|
2164pack_rec|||
2165package_version|||
2166package|||
2167packlist||5.008001|
2168pad_add_anon||5.008001|
2169pad_add_name_pvn||5.015001|
2170pad_add_name_pvs||5.015001|
2171pad_add_name_pv||5.015001|
2172pad_add_name_sv||5.015001|
2173pad_add_weakref|||
2174pad_alloc_name|||
2175pad_alloc|||
2176pad_block_start|||
2177pad_check_dup|||
2178pad_compname_type||5.009003|
2179pad_findlex|||
2180pad_findmy_pvn||5.015001|
2181pad_findmy_pvs||5.015001|
2182pad_findmy_pv||5.015001|
2183pad_findmy_sv||5.015001|
2184pad_fixup_inner_anons|||
2185pad_free|||
2186pad_leavemy|||
2187pad_new||5.008001|
2188pad_push|||
2189pad_reset|||
2190pad_setsv|||
2191pad_sv|||
2192pad_swipe|||
2193pad_tidy||5.008001|
2194padlist_dup|||
2195padlist_store|||
2196padname_dup|||
2197padname_free|||
2198padnamelist_dup|||
2199padnamelist_fetch||5.021007|n
2200padnamelist_free|||
2201padnamelist_store||5.021007|
2202parse_arithexpr||5.013008|
2203parse_barestmt||5.013007|
2204parse_block||5.013007|
2205parse_body|||
2206parse_fullexpr||5.013008|
2207parse_fullstmt||5.013005|
2208parse_gv_stash_name|||
2209parse_ident|||
2210parse_label||5.013007|
2211parse_listexpr||5.013008|
2212parse_lparen_question_flags|||
2213parse_stmtseq||5.013006|
2214parse_subsignature|||
2215parse_termexpr||5.013008|
2216parse_unicode_opts|||
2217parser_dup|||
2218parser_free_nexttoke_ops|||
2219parser_free|||
2220path_is_searchable|||n
2221peep|||
2222pending_ident|||
2223perl_alloc_using|||n
2224perl_alloc|||n
2225perl_clone_using|||n
2226perl_clone|||n
2227perl_construct|||n
2228perl_destruct||5.007003|n
2229perl_free|||n
2230perl_parse||5.006000|n
2231perl_run|||n
2232pidgone|||
2233pm_description|||
2234pmop_dump||5.006000|
2235pmruntime|||
2236pmtrans|||
2237pop_scope|||
2238populate_ANYOF_from_invlist|||
2239populate_isa|||v
2240pregcomp||5.009005|
2241pregexec|||
2242pregfree2||5.011000|
2243pregfree|||
2244prescan_version||5.011004|
2245printbuf|||
2246printf_nocontext|||vn
2247process_special_blocks|||
2248ptr_hash|||n
2249ptr_table_clear||5.009005|
2250ptr_table_fetch||5.009005|
2251ptr_table_find|||n
2252ptr_table_free||5.009005|
2253ptr_table_new||5.009005|
2254ptr_table_split||5.009005|
2255ptr_table_store||5.009005|
2256push_scope|||
2257put_charclass_bitmap_innards|||
2258put_code_point|||
2259put_range|||
2260pv_display|5.006000||p
2261pv_escape|5.009004||p
2262pv_pretty|5.009004||p
2263pv_uni_display||5.007003|
2264qerror|||
2265qsortsvu|||
2266quadmath_format_needed|||n
2267quadmath_format_single|||n
2268re_compile||5.009005|
2269re_croak2|||
2270re_dup_guts|||
2271re_intuit_start||5.019001|
2272re_intuit_string||5.006000|
2273re_op_compile|||
2274realloc||5.007002|n
2275reentrant_free||5.021008|
2276reentrant_init||5.021008|
2277reentrant_retry||5.021008|vn
2278reentrant_size||5.021008|
2279ref_array_or_hash|||
2280refcounted_he_chain_2hv|||
2281refcounted_he_fetch_pvn|||
2282refcounted_he_fetch_pvs|||
2283refcounted_he_fetch_pv|||
2284refcounted_he_fetch_sv|||
2285refcounted_he_free|||
2286refcounted_he_inc|||
2287refcounted_he_new_pvn|||
2288refcounted_he_new_pvs|||
2289refcounted_he_new_pv|||
2290refcounted_he_new_sv|||
2291refcounted_he_value|||
2292refkids|||
2293refto|||
2294ref||5.021008|
2295reg2Lanode|||
2296reg_check_named_buff_matched|||n
2297reg_named_buff_all||5.009005|
2298reg_named_buff_exists||5.009005|
2299reg_named_buff_fetch||5.009005|
2300reg_named_buff_firstkey||5.009005|
2301reg_named_buff_iter|||
2302reg_named_buff_nextkey||5.009005|
2303reg_named_buff_scalar||5.009005|
2304reg_named_buff|||
2305reg_node|||
2306reg_numbered_buff_fetch|||
2307reg_numbered_buff_length|||
2308reg_numbered_buff_store|||
2309reg_qr_package|||
2310reg_recode|||
2311reg_scan_name|||
2312reg_skipcomment|||n
2313reg_temp_copy|||
2314reganode|||
2315regatom|||
2316regbranch|||
2317regclass_swash||5.009004|
2318regclass|||
2319regcppop|||
2320regcppush|||
2321regcurly|||n
2322regdump_extflags|||
2323regdump_intflags|||
2324regdump||5.005000|
2325regdupe_internal|||
2326regexec_flags||5.005000|
2327regfree_internal||5.009005|
2328reghop3|||n
2329reghop4|||n
2330reghopmaybe3|||n
2331reginclass|||
2332reginitcolors||5.006000|
2333reginsert|||
2334regmatch|||
2335regnext||5.005000|
2336regnode_guts|||
2337regpatws|||n
2338regpiece|||
2339regpposixcc|||
2340regprop|||
2341regrepeat|||
2342regtail_study|||
2343regtail|||
2344regtry|||
2345reg|||
2346repeatcpy|||n
2347report_evil_fh|||
2348report_redefined_cv|||
2349report_uninit|||
2350report_wrongway_fh|||
2351require_pv||5.006000|
2352require_tie_mod|||
2353restore_magic|||
2354rninstr|||n
2355rpeep|||
2356rsignal_restore|||
2357rsignal_save|||
2358rsignal_state||5.004000|
2359rsignal||5.004000|
2360run_body|||
2361run_user_filter|||
2362runops_debug||5.005000|
2363runops_standard||5.005000|
2364rv2cv_op_cv||5.013006|
2365rvpv_dup|||
2366rxres_free|||
2367rxres_restore|||
2368rxres_save|||
2369safesyscalloc||5.006000|n
2370safesysfree||5.006000|n
2371safesysmalloc||5.006000|n
2372safesysrealloc||5.006000|n
2373same_dirent|||
2374save_I16||5.004000|
2375save_I32|||
2376save_I8||5.006000|
2377save_adelete||5.011000|
2378save_aelem_flags||5.011000|
2379save_aelem||5.004050|
2380save_aliased_sv|||
2381save_alloc||5.006000|
2382save_aptr|||
2383save_ary|||
2384save_bool||5.008001|
2385save_clearsv|||
2386save_delete|||
2387save_destructor_x||5.006000|
2388save_destructor||5.006000|
2389save_freeop|||
2390save_freepv|||
2391save_freesv|||
2392save_generic_pvref||5.006001|
2393save_generic_svref||5.005030|
2394save_gp||5.004000|
2395save_hash|||
2396save_hdelete||5.011000|
2397save_hek_flags|||n
2398save_helem_flags||5.011000|
2399save_helem||5.004050|
2400save_hints||5.010001|
2401save_hptr|||
2402save_int|||
2403save_item|||
2404save_iv||5.005000|
2405save_lines|||
2406save_list|||
2407save_long|||
2408save_magic_flags|||
2409save_mortalizesv||5.007001|
2410save_nogv|||
2411save_op||5.005000|
2412save_padsv_and_mortalize||5.010001|
2413save_pptr|||
2414save_pushi32ptr||5.010001|
2415save_pushptri32ptr|||
2416save_pushptrptr||5.010001|
2417save_pushptr||5.010001|
2418save_re_context||5.006000|
2419save_scalar_at|||
2420save_scalar|||
2421save_set_svflags||5.009000|
2422save_shared_pvref||5.007003|
2423save_sptr|||
2424save_strlen|||
2425save_svref|||
2426save_vptr||5.006000|
2427savepvn|||
2428savepvs||5.009003|
2429savepv|||
2430savesharedpvn||5.009005|
2431savesharedpvs||5.013006|
2432savesharedpv||5.007003|
2433savesharedsvpv||5.013006|
2434savestack_grow_cnt||5.008001|
2435savestack_grow|||
2436savesvpv||5.009002|
2437sawparens|||
2438scalar_mod_type|||n
2439scalarboolean|||
2440scalarkids|||
2441scalarseq|||
2442scalarvoid|||
2443scalar|||
2444scan_bin||5.006000|
2445scan_commit|||
2446scan_const|||
2447scan_formline|||
2448scan_heredoc|||
2449scan_hex|||
2450scan_ident|||
2451scan_inputsymbol|||
2452scan_num||5.007001|
2453scan_oct|||
2454scan_pat|||
2455scan_str|||
2456scan_subst|||
2457scan_trans|||
2458scan_version||5.009001|
2459scan_vstring||5.009005|
2460scan_word|||
2461search_const|||
2462seed||5.008001|
2463sequence_num|||
2464set_ANYOF_arg|||
2465set_caret_X|||
2466set_context||5.006000|n
2467set_numeric_local||5.006000|
2468set_numeric_radix||5.006000|
2469set_numeric_standard||5.006000|
2470set_padlist|||n
2471setdefout|||
2472share_hek_flags|||
2473share_hek||5.004000|
2474should_warn_nl|||n
2475si_dup|||
2476sighandler|||n
2477simplify_sort|||
2478skipspace_flags|||
2479softref2xv|||
2480sortcv_stacked|||
2481sortcv_xsub|||
2482sortcv|||
2483sortsv_flags||5.009003|
2484sortsv||5.007003|
2485space_join_names_mortal|||
2486ss_dup|||
2487ssc_add_range|||
2488ssc_and|||
2489ssc_anything|||
2490ssc_clear_locale|||n
2491ssc_cp_and|||
2492ssc_finalize|||
2493ssc_init|||
2494ssc_intersection|||
2495ssc_is_anything|||n
2496ssc_is_cp_posixl_init|||n
2497ssc_or|||
2498ssc_union|||
2499stack_grow|||
2500start_glob|||
2501start_subparse||5.004000|
2502stdize_locale|||
2503strEQ|||
2504strGE|||
2505strGT|||
2506strLE|||
2507strLT|||
2508strNE|||
2509str_to_version||5.006000|
2510strip_return|||
2511strnEQ|||
2512strnNE|||
2513study_chunk|||
2514sub_crush_depth|||
2515sublex_done|||
2516sublex_push|||
2517sublex_start|||
2518sv_2bool_flags||5.013006|
2519sv_2bool|||
2520sv_2cv|||
2521sv_2io|||
2522sv_2iuv_common|||
2523sv_2iuv_non_preserve|||
2524sv_2iv_flags||5.009001|
2525sv_2iv|||
2526sv_2mortal|||
2527sv_2num|||
2528sv_2nv_flags||5.013001|
2529sv_2pv_flags|5.007002||p
2530sv_2pv_nolen|5.006000||p
2531sv_2pvbyte_nolen|5.006000||p
2532sv_2pvbyte|5.006000||p
2533sv_2pvutf8_nolen||5.006000|
2534sv_2pvutf8||5.006000|
2535sv_2pv|||
2536sv_2uv_flags||5.009001|
2537sv_2uv|5.004000||p
2538sv_add_arena|||
2539sv_add_backref|||
2540sv_backoff|||n
2541sv_bless|||
2542sv_buf_to_ro|||
2543sv_buf_to_rw|||
2544sv_cat_decode||5.008001|
2545sv_catpv_flags||5.013006|
2546sv_catpv_mg|5.004050||p
2547sv_catpv_nomg||5.013006|
2548sv_catpvf_mg_nocontext|||pvn
2549sv_catpvf_mg|5.006000|5.004000|pv
2550sv_catpvf_nocontext|||vn
2551sv_catpvf||5.004000|v
2552sv_catpvn_flags||5.007002|
2553sv_catpvn_mg|5.004050||p
2554sv_catpvn_nomg|5.007002||p
2555sv_catpvn|||
2556sv_catpvs_flags||5.013006|
2557sv_catpvs_mg||5.013006|
2558sv_catpvs_nomg||5.013006|
2559sv_catpvs|5.009003||p
2560sv_catpv|||
2561sv_catsv_flags||5.007002|
2562sv_catsv_mg|5.004050||p
2563sv_catsv_nomg|5.007002||p
2564sv_catsv|||
2565sv_chop|||
2566sv_clean_all|||
2567sv_clean_objs|||
2568sv_clear|||
2569sv_cmp_flags||5.013006|
2570sv_cmp_locale_flags||5.013006|
2571sv_cmp_locale||5.004000|
2572sv_cmp|||
2573sv_collxfrm_flags||5.013006|
2574sv_collxfrm|||
2575sv_copypv_flags||5.017002|
2576sv_copypv_nomg||5.017002|
2577sv_copypv|||
2578sv_dec_nomg||5.013002|
2579sv_dec|||
2580sv_del_backref|||
2581sv_derived_from_pvn||5.015004|
2582sv_derived_from_pv||5.015004|
2583sv_derived_from_sv||5.015004|
2584sv_derived_from||5.004000|
2585sv_destroyable||5.010000|
2586sv_display|||
2587sv_does_pvn||5.015004|
2588sv_does_pv||5.015004|
2589sv_does_sv||5.015004|
2590sv_does||5.009004|
2591sv_dump|||
2592sv_dup_common|||
2593sv_dup_inc_multiple|||
2594sv_dup_inc|||
2595sv_dup|||
2596sv_eq_flags||5.013006|
2597sv_eq|||
2598sv_exp_grow|||
2599sv_force_normal_flags||5.007001|
2600sv_force_normal||5.006000|
2601sv_free2|||
2602sv_free_arenas|||
2603sv_free|||
2604sv_get_backrefs||5.021008|n
2605sv_gets||5.003070|
2606sv_grow|||
2607sv_i_ncmp|||
2608sv_inc_nomg||5.013002|
2609sv_inc|||
2610sv_insert_flags||5.010001|
2611sv_insert|||
2612sv_isa|||
2613sv_isobject|||
2614sv_iv||5.005000|
2615sv_kill_backrefs|||
2616sv_len_utf8_nomg|||
2617sv_len_utf8||5.006000|
2618sv_len|||
2619sv_magic_portable|5.021008|5.004000|p
2620sv_magicext_mglob|||
2621sv_magicext||5.007003|
2622sv_magic|||
2623sv_mortalcopy_flags|||
2624sv_mortalcopy|||
2625sv_ncmp|||
2626sv_newmortal|||
2627sv_newref|||
2628sv_nolocking||5.007003|
2629sv_nosharing||5.007003|
2630sv_nounlocking|||
2631sv_nv||5.005000|
2632sv_only_taint_gmagic|||n
2633sv_or_pv_pos_u2b|||
2634sv_peek||5.005000|
2635sv_pos_b2u_flags||5.019003|
2636sv_pos_b2u_midway|||
2637sv_pos_b2u||5.006000|
2638sv_pos_u2b_cached|||
2639sv_pos_u2b_flags||5.011005|
2640sv_pos_u2b_forwards|||n
2641sv_pos_u2b_midway|||n
2642sv_pos_u2b||5.006000|
2643sv_pvbyten_force||5.006000|
2644sv_pvbyten||5.006000|
2645sv_pvbyte||5.006000|
2646sv_pvn_force_flags|5.007002||p
2647sv_pvn_force|||
2648sv_pvn_nomg|5.007003|5.005000|p
2649sv_pvn||5.005000|
2650sv_pvutf8n_force||5.006000|
2651sv_pvutf8n||5.006000|
2652sv_pvutf8||5.006000|
2653sv_pv||5.006000|
2654sv_recode_to_utf8||5.007003|
2655sv_reftype|||
2656sv_ref|||
2657sv_release_COW|||
2658sv_replace|||
2659sv_report_used|||
2660sv_resetpvn|||
2661sv_reset|||
2662sv_rvweaken||5.006000|
2663sv_sethek|||
2664sv_setiv_mg|5.004050||p
2665sv_setiv|||
2666sv_setnv_mg|5.006000||p
2667sv_setnv|||
2668sv_setpv_mg|5.004050||p
2669sv_setpvf_mg_nocontext|||pvn
2670sv_setpvf_mg|5.006000|5.004000|pv
2671sv_setpvf_nocontext|||vn
2672sv_setpvf||5.004000|v
2673sv_setpviv_mg||5.008001|
2674sv_setpviv||5.008001|
2675sv_setpvn_mg|5.004050||p
2676sv_setpvn|||
2677sv_setpvs_mg||5.013006|
2678sv_setpvs|5.009004||p
2679sv_setpv|||
2680sv_setref_iv|||
2681sv_setref_nv|||
2682sv_setref_pvn|||
2683sv_setref_pvs||5.021008|
2684sv_setref_pv|||
2685sv_setref_uv||5.007001|
2686sv_setsv_cow|||
2687sv_setsv_flags||5.007002|
2688sv_setsv_mg|5.004050||p
2689sv_setsv_nomg|5.007002||p
2690sv_setsv|||
2691sv_setuv_mg|5.004050||p
2692sv_setuv|5.004000||p
2693sv_tainted||5.004000|
2694sv_taint||5.004000|
2695sv_true||5.005000|
2696sv_unglob|||
2697sv_uni_display||5.007003|
2698sv_unmagicext|5.013008||p
2699sv_unmagic|||
2700sv_unref_flags||5.007001|
2701sv_unref|||
2702sv_untaint||5.004000|
2703sv_upgrade|||
2704sv_usepvn_flags||5.009004|
2705sv_usepvn_mg|5.004050||p
2706sv_usepvn|||
2707sv_utf8_decode||5.006000|
2708sv_utf8_downgrade||5.006000|
2709sv_utf8_encode||5.006000|
2710sv_utf8_upgrade_flags_grow||5.011000|
2711sv_utf8_upgrade_flags||5.007002|
2712sv_utf8_upgrade_nomg||5.007002|
2713sv_utf8_upgrade||5.007001|
2714sv_uv|5.005000||p
2715sv_vcatpvf_mg|5.006000|5.004000|p
2716sv_vcatpvfn_flags||5.017002|
2717sv_vcatpvfn||5.004000|
2718sv_vcatpvf|5.006000|5.004000|p
2719sv_vsetpvf_mg|5.006000|5.004000|p
2720sv_vsetpvfn||5.004000|
2721sv_vsetpvf|5.006000|5.004000|p
2722svtype|||
2723swallow_bom|||
2724swash_fetch||5.007002|
2725swash_init||5.006000|
2726swash_scan_list_line|||
2727swatch_get|||
2728sync_locale||5.021004|
2729sys_init3||5.010000|n
2730sys_init||5.010000|n
2731sys_intern_clear|||
2732sys_intern_dup|||
2733sys_intern_init|||
2734sys_term||5.010000|n
2735taint_env|||
2736taint_proper|||
2737tied_method|||v
2738tmps_grow_p|||
2739toFOLD_uni||5.007003|
2740toFOLD_utf8||5.019001|
2741toFOLD||5.019001|
2742toLOWER_L1||5.019001|
2743toLOWER_LC||5.004000|
2744toLOWER_uni||5.007003|
2745toLOWER_utf8||5.015007|
2746toLOWER|||
2747toTITLE_uni||5.007003|
2748toTITLE_utf8||5.015007|
2749toTITLE||5.019001|
2750toUPPER_uni||5.007003|
2751toUPPER_utf8||5.015007|
2752toUPPER|||
2753to_byte_substr|||
2754to_lower_latin1|||n
2755to_uni_fold||5.007003|
2756to_uni_lower_lc||5.006000|
2757to_uni_lower||5.007003|
2758to_uni_title_lc||5.006000|
2759to_uni_title||5.007003|
2760to_uni_upper_lc||5.006000|
2761to_uni_upper||5.007003|
2762to_utf8_case||5.007003|
2763to_utf8_fold||5.015007|
2764to_utf8_lower||5.015007|
2765to_utf8_substr|||
2766to_utf8_title||5.015007|
2767to_utf8_upper||5.015007|
2768tokenize_use|||
2769tokeq|||
2770tokereport|||
2771too_few_arguments_pv|||
2772too_many_arguments_pv|||
2773translate_substr_offsets|||n
2774try_amagic_bin|||
2775try_amagic_un|||
2776uiv_2buf|||n
2777unlnk|||
2778unpack_rec|||
2779unpack_str||5.007003|
2780unpackstring||5.008001|
2781unreferenced_to_tmp_stack|||
2782unshare_hek_or_pvn|||
2783unshare_hek|||
2784unsharepvn||5.003070|
2785unwind_handler_stack|||
2786update_debugger_info|||
2787upg_version||5.009005|
2788usage|||
2789utf16_textfilter|||
2790utf16_to_utf8_reversed||5.006001|
2791utf16_to_utf8||5.006001|
2792utf8_distance||5.006000|
2793utf8_hop||5.006000|n
2794utf8_length||5.007001|
2795utf8_mg_len_cache_update|||
2796utf8_mg_pos_cache_update|||
2797utf8_to_bytes||5.006001|
2798utf8_to_uvchr_buf||5.015009|
2799utf8_to_uvchr||5.007001|
2800utf8_to_uvuni_buf||5.015009|
2801utf8_to_uvuni||5.007001|
2802utf8n_to_uvchr||5.007001|
2803utf8n_to_uvuni||5.007001|
2804utilize|||
2805uvchr_to_utf8_flags||5.007003|
2806uvchr_to_utf8||5.007001|
2807uvoffuni_to_utf8_flags||5.019004|
2808uvuni_to_utf8_flags||5.007003|
2809uvuni_to_utf8||5.007001|
2810valid_utf8_to_uvchr||5.015009|
2811valid_utf8_to_uvuni||5.015009|
2812validate_proto|||
2813validate_suid|||
2814varname|||
2815vcmp||5.009000|
2816vcroak||5.006000|
2817vdeb||5.007003|
2818vform||5.006000|
2819visit|||
2820vivify_defelem|||
2821vivify_ref|||
2822vload_module|5.006000||p
2823vmess||5.006000|
2824vnewSVpvf|5.006000|5.004000|p
2825vnormal||5.009002|
2826vnumify||5.009000|
2827vstringify||5.009000|
2828vverify||5.009003|
2829vwarner||5.006000|
2830vwarn||5.006000|
2831wait4pid|||
2832warn_nocontext|||vn
2833warn_sv||5.013001|
2834warner_nocontext|||vn
2835warner|5.006000|5.004000|pv
2836warn|||v
2837was_lvalue_sub|||
2838watch|||
2839whichsig_pvn||5.015004|
2840whichsig_pv||5.015004|
2841whichsig_sv||5.015004|
2842whichsig|||
2843win32_croak_not_implemented|||n
2844with_queued_errors|||
2845wrap_op_checker||5.015008|
2846write_to_stderr|||
2847xs_boot_epilog|||
2848xs_handshake|||vn
2849xs_version_bootcheck|||
2850yyerror_pvn|||
2851yyerror_pv|||
2852yyerror|||
2853yylex|||
2854yyparse|||
2855yyunlex|||
2856yywarn|||
2857);
2858
2859if (exists $opt{'list-unsupported'}) {
2860 my $f;
2861 for $f (sort { lc $a cmp lc $b } keys %API) {
2862 next unless $API{$f}{todo};
2863 print "$f ", '.'x(40-length($f)), " ", format_version($API{$f}{todo}), "\n";
2864 }
2865 exit 0;
2866}
2867
2868# Scan for possible replacement candidates
2869
2870my(%replace, %need, %hints, %warnings, %depends);
2871my $replace = 0;
2872my($hint, $define, $function);
2873
2874sub find_api
2875{
2876 my $code = shift;
2877 $code =~ s{
2878 / (?: \*[^*]*\*+(?:[^$ccs][^*]*\*+)* / | /[^\r\n]*)
2879 | "[^"\\]*(?:\\.[^"\\]*)*"
2880 | '[^'\\]*(?:\\.[^'\\]*)*' }{}egsx;
2881 grep { exists $API{$_} } $code =~ /(\w+)/mg;
2882}
2883
2884while (<DATA>) {
2885 if ($hint) {
2886 my $h = $hint->[0] eq 'Hint' ? \%hints : \%warnings;
2887 if (m{^\s*\*\s(.*?)\s*$}) {
2888 for (@{$hint->[1]}) {
2889 $h->{$_} ||= ''; # suppress warning with older perls
2890 $h->{$_} .= "$1\n";
2891 }
2892 }
2893 else { undef $hint }
2894 }
2895
2896 $hint = [$1, [split /,?\s+/, $2]]
2897 if m{^\s*$rccs\s+(Hint|Warning):\s+(\w+(?:,?\s+\w+)*)\s*$};
2898
2899 if ($define) {
2900 if ($define->[1] =~ /\\$/) {
2901 $define->[1] .= $_;
2902 }
2903 else {
2904 if (exists $API{$define->[0]} && $define->[1] !~ /^DPPP_\(/) {
2905 my @n = find_api($define->[1]);
2906 push @{$depends{$define->[0]}}, @n if @n
2907 }
2908 undef $define;
2909 }
2910 }
2911
2912 $define = [$1, $2] if m{^\s*#\s*define\s+(\w+)(?:\([^)]*\))?\s+(.*)};
2913
2914 if ($function) {
2915 if (/^}/) {
2916 if (exists $API{$function->[0]}) {
2917 my @n = find_api($function->[1]);
2918 push @{$depends{$function->[0]}}, @n if @n
2919 }
2920 undef $function;
2921 }
2922 else {
2923 $function->[1] .= $_;
2924 }
2925 }
2926
2927 $function = [$1, ''] if m{^DPPP_\(my_(\w+)\)};
2928
2929 $replace = $1 if m{^\s*$rccs\s+Replace:\s+(\d+)\s+$rcce\s*$};
2930 $replace{$2} = $1 if $replace and m{^\s*#\s*define\s+(\w+)(?:\([^)]*\))?\s+(\w+)};
2931 $replace{$2} = $1 if m{^\s*#\s*define\s+(\w+)(?:\([^)]*\))?\s+(\w+).*$rccs\s+Replace\s+$rcce};
2932 $replace{$1} = $2 if m{^\s*$rccs\s+Replace (\w+) with (\w+)\s+$rcce\s*$};
2933
2934 if (m{^\s*$rccs\s+(\w+(\s*,\s*\w+)*)\s+depends\s+on\s+(\w+(\s*,\s*\w+)*)\s+$rcce\s*$}) {
2935 my @deps = map { s/\s+//g; $_ } split /,/, $3;
2936 my $d;
2937 for $d (map { s/\s+//g; $_ } split /,/, $1) {
2938 push @{$depends{$d}}, @deps;
2939 }
2940 }
2941
2942 $need{$1} = 1 if m{^#if\s+defined\(NEED_(\w+)(?:_GLOBAL)?\)};
2943}
2944
2945for (values %depends) {
2946 my %s;
2947 $_ = [sort grep !$s{$_}++, @$_];
2948}
2949
2950if (exists $opt{'api-info'}) {
2951 my $f;
2952 my $count = 0;
2953 my $match = $opt{'api-info'} =~ m!^/(.*)/$! ? $1 : "^\Q$opt{'api-info'}\E\$";
2954 for $f (sort { lc $a cmp lc $b } keys %API) {
2955 next unless $f =~ /$match/;
2956 print "\n=== $f ===\n\n";
2957 my $info = 0;
2958 if ($API{$f}{base} || $API{$f}{todo}) {
2959 my $base = format_version($API{$f}{base} || $API{$f}{todo});
2960 print "Supported at least starting from perl-$base.\n";
2961 $info++;
2962 }
2963 if ($API{$f}{provided}) {
2964 my $todo = $API{$f}{todo} ? format_version($API{$f}{todo}) : "5.003";
2965 print "Support by $ppport provided back to perl-$todo.\n";
2966 print "Support needs to be explicitly requested by NEED_$f.\n" if exists $need{$f};
2967 print "Depends on: ", join(', ', @{$depends{$f}}), ".\n" if exists $depends{$f};
2968 print "\n$hints{$f}" if exists $hints{$f};
2969 print "\nWARNING:\n$warnings{$f}" if exists $warnings{$f};
2970 $info++;
2971 }
2972 print "No portability information available.\n" unless $info;
2973 $count++;
2974 }
2975 $count or print "Found no API matching '$opt{'api-info'}'.";
2976 print "\n";
2977 exit 0;
2978}
2979
2980if (exists $opt{'list-provided'}) {
2981 my $f;
2982 for $f (sort { lc $a cmp lc $b } keys %API) {
2983 next unless $API{$f}{provided};
2984 my @flags;
2985 push @flags, 'explicit' if exists $need{$f};
2986 push @flags, 'depend' if exists $depends{$f};
2987 push @flags, 'hint' if exists $hints{$f};
2988 push @flags, 'warning' if exists $warnings{$f};
2989 my $flags = @flags ? ' ['.join(', ', @flags).']' : '';
2990 print "$f$flags\n";
2991 }
2992 exit 0;
2993}
2994
2995my @files;
2996my @srcext = qw( .xs .c .h .cc .cpp -c.inc -xs.inc );
2997my $srcext = join '|', map { quotemeta $_ } @srcext;
2998
2999if (@ARGV) {
3000 my %seen;
3001 for (@ARGV) {
3002 if (-e) {
3003 if (-f) {
3004 push @files, $_ unless $seen{$_}++;
3005 }
3006 else { warn "'$_' is not a file.\n" }
3007 }
3008 else {
3009 my @new = grep { -f } glob $_
3010 or warn "'$_' does not exist.\n";
3011 push @files, grep { !$seen{$_}++ } @new;
3012 }
3013 }
3014}
3015else {
3016 eval {
3017 require File::Find;
3018 File::Find::find(sub {
3019 $File::Find::name =~ /($srcext)$/i
3020 and push @files, $File::Find::name;
3021 }, '.');
3022 };
3023 if ($@) {
3024 @files = map { glob "*$_" } @srcext;
3025 }
3026}
3027
3028if (!@ARGV || $opt{filter}) {
3029 my(@in, @out);
3030 my %xsc = map { /(.*)\.xs$/ ? ("$1.c" => 1, "$1.cc" => 1) : () } @files;
3031 for (@files) {
3032 my $out = exists $xsc{$_} || /\b\Q$ppport\E$/i || !/($srcext)$/i;
3033 push @{ $out ? \@out : \@in }, $_;
3034 }
3035 if (@ARGV && @out) {
3036 warning("Skipping the following files (use --nofilter to avoid this):\n| ", join "\n| ", @out);
3037 }
3038 @files = @in;
3039}
3040
3041die "No input files given!\n" unless @files;
3042
3043my(%files, %global, %revreplace);
3044%revreplace = reverse %replace;
3045my $filename;
3046my $patch_opened = 0;
3047
3048for $filename (@files) {
3049 unless (open IN, "<$filename") {
3050 warn "Unable to read from $filename: $!\n";
3051 next;
3052 }
3053
3054 info("Scanning $filename ...");
3055
3056 my $c = do { local $/; <IN> };
3057 close IN;
3058
3059 my %file = (orig => $c, changes => 0);
3060
3061 # Temporarily remove C/XS comments and strings from the code
3062 my @ccom;
3063
3064 $c =~ s{
3065 ( ^$HS*\#$HS*include\b[^\r\n]+\b(?:\Q$ppport\E|XSUB\.h)\b[^\r\n]*
3066 | ^$HS*\#$HS*(?:define|elif|if(?:def)?)\b[^\r\n]* )
3067 | ( ^$HS*\#[^\r\n]*
3068 | "[^"\\]*(?:\\.[^"\\]*)*"
3069 | '[^'\\]*(?:\\.[^'\\]*)*'
3070 | / (?: \*[^*]*\*+(?:[^$ccs][^*]*\*+)* / | /[^\r\n]* ) )
3071 }{ defined $2 and push @ccom, $2;
3072 defined $1 ? $1 : "$ccs$#ccom$cce" }mgsex;
3073
3074 $file{ccom} = \@ccom;
3075 $file{code} = $c;
3076 $file{has_inc_ppport} = $c =~ /^$HS*#$HS*include[^\r\n]+\b\Q$ppport\E\b/m;
3077
3078 my $func;
3079
3080 for $func (keys %API) {
3081 my $match = $func;
3082 $match .= "|$revreplace{$func}" if exists $revreplace{$func};
3083 if ($c =~ /\b(?:Perl_)?($match)\b/) {
3084 $file{uses_replace}{$1}++ if exists $revreplace{$func} && $1 eq $revreplace{$func};
3085 $file{uses_Perl}{$func}++ if $c =~ /\bPerl_$func\b/;
3086 if (exists $API{$func}{provided}) {
3087 $file{uses_provided}{$func}++;
3088 if (!exists $API{$func}{base} || $API{$func}{base} > $opt{'compat-version'}) {
3089 $file{uses}{$func}++;
3090 my @deps = rec_depend($func);
3091 if (@deps) {
3092 $file{uses_deps}{$func} = \@deps;
3093 for (@deps) {
3094 $file{uses}{$_} = 0 unless exists $file{uses}{$_};
3095 }
3096 }
3097 for ($func, @deps) {
3098 $file{needs}{$_} = 'static' if exists $need{$_};
3099 }
3100 }
3101 }
3102 if (exists $API{$func}{todo} && $API{$func}{todo} > $opt{'compat-version'}) {
3103 if ($c =~ /\b$func\b/) {
3104 $file{uses_todo}{$func}++;
3105 }
3106 }
3107 }
3108 }
3109
3110 while ($c =~ /^$HS*#$HS*define$HS+(NEED_(\w+?)(_GLOBAL)?)\b/mg) {
3111 if (exists $need{$2}) {
3112 $file{defined $3 ? 'needed_global' : 'needed_static'}{$2}++;
3113 }
3114 else { warning("Possibly wrong #define $1 in $filename") }
3115 }
3116
3117 for (qw(uses needs uses_todo needed_global needed_static)) {
3118 for $func (keys %{$file{$_}}) {
3119 push @{$global{$_}{$func}}, $filename;
3120 }
3121 }
3122
3123 $files{$filename} = \%file;
3124}
3125
3126# Globally resolve NEED_'s
3127my $need;
3128for $need (keys %{$global{needs}}) {
3129 if (@{$global{needs}{$need}} > 1) {
3130 my @targets = @{$global{needs}{$need}};
3131 my @t = grep $files{$_}{needed_global}{$need}, @targets;
3132 @targets = @t if @t;
3133 @t = grep /\.xs$/i, @targets;
3134 @targets = @t if @t;
3135 my $target = shift @targets;
3136 $files{$target}{needs}{$need} = 'global';
3137 for (@{$global{needs}{$need}}) {
3138 $files{$_}{needs}{$need} = 'extern' if $_ ne $target;
3139 }
3140 }
3141}
3142
3143for $filename (@files) {
3144 exists $files{$filename} or next;
3145
3146 info("=== Analyzing $filename ===");
3147
3148 my %file = %{$files{$filename}};
3149 my $func;
3150 my $c = $file{code};
3151 my $warnings = 0;
3152
3153 for $func (sort keys %{$file{uses_Perl}}) {
3154 if ($API{$func}{varargs}) {
3155 unless ($API{$func}{nothxarg}) {
3156 my $changes = ($c =~ s{\b(Perl_$func\s*\(\s*)(?!aTHX_?)(\)|[^\s)]*\))}
3157 { $1 . ($2 eq ')' ? 'aTHX' : 'aTHX_ ') . $2 }ge);
3158 if ($changes) {
3159 warning("Doesn't pass interpreter argument aTHX to Perl_$func");
3160 $file{changes} += $changes;
3161 }
3162 }
3163 }
3164 else {
3165 warning("Uses Perl_$func instead of $func");
3166 $file{changes} += ($c =~ s{\bPerl_$func(\s*)\((\s*aTHX_?)?\s*}
3167 {$func$1(}g);
3168 }
3169 }
3170
3171 for $func (sort keys %{$file{uses_replace}}) {
3172 warning("Uses $func instead of $replace{$func}");
3173 $file{changes} += ($c =~ s/\b$func\b/$replace{$func}/g);
3174 }
3175
3176 for $func (sort keys %{$file{uses_provided}}) {
3177 if ($file{uses}{$func}) {
3178 if (exists $file{uses_deps}{$func}) {
3179 diag("Uses $func, which depends on ", join(', ', @{$file{uses_deps}{$func}}));
3180 }
3181 else {
3182 diag("Uses $func");
3183 }
3184 }
3185 $warnings += hint($func);
3186 }
3187
3188 unless ($opt{quiet}) {
3189 for $func (sort keys %{$file{uses_todo}}) {
3190 print "*** WARNING: Uses $func, which may not be portable below perl ",
3191 format_version($API{$func}{todo}), ", even with '$ppport'\n";
3192 $warnings++;
3193 }
3194 }
3195
3196 for $func (sort keys %{$file{needed_static}}) {
3197 my $message = '';
3198 if (not exists $file{uses}{$func}) {
3199 $message = "No need to define NEED_$func if $func is never used";
3200 }
3201 elsif (exists $file{needs}{$func} && $file{needs}{$func} ne 'static') {
3202 $message = "No need to define NEED_$func when already needed globally";
3203 }
3204 if ($message) {
3205 diag($message);
3206 $file{changes} += ($c =~ s/^$HS*#$HS*define$HS+NEED_$func\b.*$LF//mg);
3207 }
3208 }
3209
3210 for $func (sort keys %{$file{needed_global}}) {
3211 my $message = '';
3212 if (not exists $global{uses}{$func}) {
3213 $message = "No need to define NEED_${func}_GLOBAL if $func is never used";
3214 }
3215 elsif (exists $file{needs}{$func}) {
3216 if ($file{needs}{$func} eq 'extern') {
3217 $message = "No need to define NEED_${func}_GLOBAL when already needed globally";
3218 }
3219 elsif ($file{needs}{$func} eq 'static') {
3220 $message = "No need to define NEED_${func}_GLOBAL when only used in this file";
3221 }
3222 }
3223 if ($message) {
3224 diag($message);
3225 $file{changes} += ($c =~ s/^$HS*#$HS*define$HS+NEED_${func}_GLOBAL\b.*$LF//mg);
3226 }
3227 }
3228
3229 $file{needs_inc_ppport} = keys %{$file{uses}};
3230
3231 if ($file{needs_inc_ppport}) {
3232 my $pp = '';
3233
3234 for $func (sort keys %{$file{needs}}) {
3235 my $type = $file{needs}{$func};
3236 next if $type eq 'extern';
3237 my $suffix = $type eq 'global' ? '_GLOBAL' : '';
3238 unless (exists $file{"needed_$type"}{$func}) {
3239 if ($type eq 'global') {
3240 diag("Files [@{$global{needs}{$func}}] need $func, adding global request");
3241 }
3242 else {
3243 diag("File needs $func, adding static request");
3244 }
3245 $pp .= "#define NEED_$func$suffix\n";
3246 }
3247 }
3248
3249 if ($pp && ($c =~ s/^(?=$HS*#$HS*define$HS+NEED_\w+)/$pp/m)) {
3250 $pp = '';
3251 $file{changes}++;
3252 }
3253
3254 unless ($file{has_inc_ppport}) {
3255 diag("Needs to include '$ppport'");
3256 $pp .= qq(#include "$ppport"\n)
3257 }
3258
3259 if ($pp) {
3260 $file{changes} += ($c =~ s/^($HS*#$HS*define$HS+NEED_\w+.*?)^/$1$pp/ms)
3261 || ($c =~ s/^(?=$HS*#$HS*include.*\Q$ppport\E)/$pp/m)
3262 || ($c =~ s/^($HS*#$HS*include.*XSUB.*\s*?)^/$1$pp/m)
3263 || ($c =~ s/^/$pp/);
3264 }
3265 }
3266 else {
3267 if ($file{has_inc_ppport}) {
3268 diag("No need to include '$ppport'");
3269 $file{changes} += ($c =~ s/^$HS*?#$HS*include.*\Q$ppport\E.*?$LF//m);
3270 }
3271 }
3272
3273 # put back in our C comments
3274 my $ix;
3275 my $cppc = 0;
3276 my @ccom = @{$file{ccom}};
3277 for $ix (0 .. $#ccom) {
3278 if (!$opt{cplusplus} && $ccom[$ix] =~ s!^//!!) {
3279 $cppc++;
3280 $file{changes} += $c =~ s/$rccs$ix$rcce/$ccs$ccom[$ix] $cce/;
3281 }
3282 else {
3283 $c =~ s/$rccs$ix$rcce/$ccom[$ix]/;
3284 }
3285 }
3286
3287 if ($cppc) {
3288 my $s = $cppc != 1 ? 's' : '';
3289 warning("Uses $cppc C++ style comment$s, which is not portable");
3290 }
3291
3292 my $s = $warnings != 1 ? 's' : '';
3293 my $warn = $warnings ? " ($warnings warning$s)" : '';
3294 info("Analysis completed$warn");
3295
3296 if ($file{changes}) {
3297 if (exists $opt{copy}) {
3298 my $newfile = "$filename$opt{copy}";
3299 if (-e $newfile) {
3300 error("'$newfile' already exists, refusing to write copy of '$filename'");
3301 }
3302 else {
3303 local *F;
3304 if (open F, ">$newfile") {
3305 info("Writing copy of '$filename' with changes to '$newfile'");
3306 print F $c;
3307 close F;
3308 }
3309 else {
3310 error("Cannot open '$newfile' for writing: $!");
3311 }
3312 }
3313 }
3314 elsif (exists $opt{patch} || $opt{changes}) {
3315 if (exists $opt{patch}) {
3316 unless ($patch_opened) {
3317 if (open PATCH, ">$opt{patch}") {
3318 $patch_opened = 1;
3319 }
3320 else {
3321 error("Cannot open '$opt{patch}' for writing: $!");
3322 delete $opt{patch};
3323 $opt{changes} = 1;
3324 goto fallback;
3325 }
3326 }
3327 mydiff(\*PATCH, $filename, $c);
3328 }
3329 else {
3330fallback:
3331 info("Suggested changes:");
3332 mydiff(\*STDOUT, $filename, $c);
3333 }
3334 }
3335 else {
3336 my $s = $file{changes} == 1 ? '' : 's';
3337 info("$file{changes} potentially required change$s detected");
3338 }
3339 }
3340 else {
3341 info("Looks good");
3342 }
3343}
3344
3345close PATCH if $patch_opened;
3346
3347exit 0;
3348
3349
3350sub try_use { eval "use @_;"; return $@ eq '' }
3351
3352sub mydiff
3353{
3354 local *F = shift;
3355 my($file, $str) = @_;
3356 my $diff;
3357
3358 if (exists $opt{diff}) {
3359 $diff = run_diff($opt{diff}, $file, $str);
3360 }
3361
3362 if (!defined $diff and try_use('Text::Diff')) {
3363 $diff = Text::Diff::diff($file, \$str, { STYLE => 'Unified' });
3364 $diff = <<HEADER . $diff;
3365--- $file
3366+++ $file.patched
3367HEADER
3368 }
3369
3370 if (!defined $diff) {
3371 $diff = run_diff('diff -u', $file, $str);
3372 }
3373
3374 if (!defined $diff) {
3375 $diff = run_diff('diff', $file, $str);
3376 }
3377
3378 if (!defined $diff) {
3379 error("Cannot generate a diff. Please install Text::Diff or use --copy.");
3380 return;
3381 }
3382
3383 print F $diff;
3384}
3385
3386sub run_diff
3387{
3388 my($prog, $file, $str) = @_;
3389 my $tmp = 'dppptemp';
3390 my $suf = 'aaa';
3391 my $diff = '';
3392 local *F;
3393
3394 while (-e "$tmp.$suf") { $suf++ }
3395 $tmp = "$tmp.$suf";
3396
3397 if (open F, ">$tmp") {
3398 print F $str;
3399 close F;
3400
3401 if (open F, "$prog $file $tmp |") {
3402 while (<F>) {
3403 s/\Q$tmp\E/$file.patched/;
3404 $diff .= $_;
3405 }
3406 close F;
3407 unlink $tmp;
3408 return $diff;
3409 }
3410
3411 unlink $tmp;
3412 }
3413 else {
3414 error("Cannot open '$tmp' for writing: $!");
3415 }
3416
3417 return undef;
3418}
3419
3420sub rec_depend
3421{
3422 my($func, $seen) = @_;
3423 return () unless exists $depends{$func};
3424 $seen = {%{$seen||{}}};
3425 return () if $seen->{$func}++;
3426 my %s;
3427 grep !$s{$_}++, map { ($_, rec_depend($_, $seen)) } @{$depends{$func}};
3428}
3429
3430sub parse_version
3431{
3432 my $ver = shift;
3433
3434 if ($ver =~ /^(\d+)\.(\d+)\.(\d+)$/) {
3435 return ($1, $2, $3);
3436 }
3437 elsif ($ver !~ /^\d+\.[\d_]+$/) {
3438 die "cannot parse version '$ver'\n";
3439 }
3440
3441 $ver =~ s/_//g;
3442 $ver =~ s/$/000000/;
3443
3444 my($r,$v,$s) = $ver =~ /(\d+)\.(\d{3})(\d{3})/;
3445
3446 $v = int $v;
3447 $s = int $s;
3448
3449 if ($r < 5 || ($r == 5 && $v < 6)) {
3450 if ($s % 10) {
3451 die "cannot parse version '$ver'\n";
3452 }
3453 }
3454
3455 return ($r, $v, $s);
3456}
3457
3458sub format_version
3459{
3460 my $ver = shift;
3461
3462 $ver =~ s/$/000000/;
3463 my($r,$v,$s) = $ver =~ /(\d+)\.(\d{3})(\d{3})/;
3464
3465 $v = int $v;
3466 $s = int $s;
3467
3468 if ($r < 5 || ($r == 5 && $v < 6)) {
3469 if ($s % 10) {
3470 die "invalid version '$ver'\n";
3471 }
3472 $s /= 10;
3473
3474 $ver = sprintf "%d.%03d", $r, $v;
3475 $s > 0 and $ver .= sprintf "_%02d", $s;
3476
3477 return $ver;
3478 }
3479
3480 return sprintf "%d.%d.%d", $r, $v, $s;
3481}
3482
3483sub info
3484{
3485 $opt{quiet} and return;
3486 print @_, "\n";
3487}
3488
3489sub diag
3490{
3491 $opt{quiet} and return;
3492 $opt{diag} and print @_, "\n";
3493}
3494
3495sub warning
3496{
3497 $opt{quiet} and return;
3498 print "*** ", @_, "\n";
3499}
3500
3501sub error
3502{
3503 print "*** ERROR: ", @_, "\n";
3504}
3505
3506my %given_hints;
3507my %given_warnings;
3508sub hint
3509{
3510 $opt{quiet} and return;
3511 my $func = shift;
3512 my $rv = 0;
3513 if (exists $warnings{$func} && !$given_warnings{$func}++) {
3514 my $warn = $warnings{$func};
3515 $warn =~ s!^!*** !mg;
3516 print "*** WARNING: $func\n", $warn;
3517 $rv++;
3518 }
3519 if ($opt{hints} && exists $hints{$func} && !$given_hints{$func}++) {
3520 my $hint = $hints{$func};
3521 $hint =~ s/^/ /mg;
3522 print " --- hint for $func ---\n", $hint;
3523 }
3524 $rv;
3525}
3526
3527sub usage
3528{
3529 my($usage) = do { local(@ARGV,$/)=($0); <> } =~ /^=head\d$HS+SYNOPSIS\s*^(.*?)\s*^=/ms;
3530 my %M = ( 'I' => '*' );
3531 $usage =~ s/^\s*perl\s+\S+/$^X $0/;
3532 $usage =~ s/([A-Z])<([^>]+)>/$M{$1}$2$M{$1}/g;
3533
3534 print <<ENDUSAGE;
3535
3536Usage: $usage
3537
3538See perldoc $0 for details.
3539
3540ENDUSAGE
3541
3542 exit 2;
3543}
3544
3545sub strip
3546{
3547 my $self = do { local(@ARGV,$/)=($0); <> };
3548 my($copy) = $self =~ /^=head\d\s+COPYRIGHT\s*^(.*?)^=\w+/ms;
3549 $copy =~ s/^(?=\S+)/ /gms;
3550 $self =~ s/^$HS+Do NOT edit.*?(?=^-)/$copy/ms;
3551 $self =~ s/^SKIP.*(?=^__DATA__)/SKIP
3552if (\@ARGV && \$ARGV[0] eq '--unstrip') {
3553 eval { require Devel::PPPort };
3554 \$@ and die "Cannot require Devel::PPPort, please install.\\n";
3555 if (eval \$Devel::PPPort::VERSION < $VERSION) {
3556 die "$0 was originally generated with Devel::PPPort $VERSION.\\n"
3557 . "Your Devel::PPPort is only version \$Devel::PPPort::VERSION.\\n"
3558 . "Please install a newer version, or --unstrip will not work.\\n";
3559 }
3560 Devel::PPPort::WriteFile(\$0);
3561 exit 0;
3562}
3563print <<END;
3564
3565Sorry, but this is a stripped version of \$0.
3566
3567To be able to use its original script and doc functionality,
3568please try to regenerate this file using:
3569
3570 \$^X \$0 --unstrip
3571
3572END
3573/ms;
3574 my($pl, $c) = $self =~ /(.*^__DATA__)(.*)/ms;
3575 $c =~ s{
3576 / (?: \*[^*]*\*+(?:[^$ccs][^*]*\*+)* / | /[^\r\n]*)
3577 | ( "[^"\\]*(?:\\.[^"\\]*)*"
3578 | '[^'\\]*(?:\\.[^'\\]*)*' )
3579 | ($HS+) }{ defined $2 ? ' ' : ($1 || '') }gsex;
3580 $c =~ s!\s+$!!mg;
3581 $c =~ s!^$LF!!mg;
3582 $c =~ s!^\s*#\s*!#!mg;
3583 $c =~ s!^\s+!!mg;
3584
3585 open OUT, ">$0" or die "cannot strip $0: $!\n";
3586 print OUT "$pl$c\n";
3587
3588 exit 0;
3589}
3590
3591__DATA__
3592*/
3593
3594#ifndef _P_P_PORTABILITY_H_
3595#define _P_P_PORTABILITY_H_
3596
3597#ifndef DPPP_NAMESPACE
3598# define DPPP_NAMESPACE DPPP_
3599#endif
3600
3601#define DPPP_CAT2(x,y) CAT2(x,y)
3602#define DPPP_(name) DPPP_CAT2(DPPP_NAMESPACE, name)
3603
3604#ifndef PERL_REVISION
3605# if !defined(__PATCHLEVEL_H_INCLUDED__) && !(defined(PATCHLEVEL) && defined(SUBVERSION))
3606# define PERL_PATCHLEVEL_H_IMPLICIT
3607# include <patchlevel.h>
3608# endif
3609# if !(defined(PERL_VERSION) || (defined(SUBVERSION) && defined(PATCHLEVEL)))
3610# include <could_not_find_Perl_patchlevel.h>
3611# endif
3612# ifndef PERL_REVISION
3613# define PERL_REVISION (5)
3614 /* Replace: 1 */
3615# define PERL_VERSION PATCHLEVEL
3616# define PERL_SUBVERSION SUBVERSION
3617 /* Replace PERL_PATCHLEVEL with PERL_VERSION */
3618 /* Replace: 0 */
3619# endif
3620#endif
3621
3622#define _dpppDEC2BCD(dec) ((((dec)/100)<<8)|((((dec)%100)/10)<<4)|((dec)%10))
3623#define PERL_BCDVERSION ((_dpppDEC2BCD(PERL_REVISION)<<24)|(_dpppDEC2BCD(PERL_VERSION)<<12)|_dpppDEC2BCD(PERL_SUBVERSION))
3624
3625/* It is very unlikely that anyone will try to use this with Perl 6
3626 (or greater), but who knows.
3627 */
3628#if PERL_REVISION != 5
3629# error ppport.h only works with Perl version 5
3630#endif /* PERL_REVISION != 5 */
3631#ifndef dTHR
3632# define dTHR dNOOP
3633#endif
3634#ifndef dTHX
3635# define dTHX dNOOP
3636#endif
3637
3638#ifndef dTHXa
3639# define dTHXa(x) dNOOP
3640#endif
3641#ifndef pTHX
3642# define pTHX void
3643#endif
3644
3645#ifndef pTHX_
3646# define pTHX_
3647#endif
3648
3649#ifndef aTHX
3650# define aTHX
3651#endif
3652
3653#ifndef aTHX_
3654# define aTHX_
3655#endif
3656
3657#if (PERL_BCDVERSION < 0x5006000)
3658# ifdef USE_THREADS
3659# define aTHXR thr
3660# define aTHXR_ thr,
3661# else
3662# define aTHXR
3663# define aTHXR_
3664# endif
3665# define dTHXR dTHR
3666#else
3667# define aTHXR aTHX
3668# define aTHXR_ aTHX_
3669# define dTHXR dTHX
3670#endif
3671#ifndef dTHXoa
3672# define dTHXoa(x) dTHXa(x)
3673#endif
3674
3675#ifdef I_LIMITS
3676# include <limits.h>
3677#endif
3678
3679#ifndef PERL_UCHAR_MIN
3680# define PERL_UCHAR_MIN ((unsigned char)0)
3681#endif
3682
3683#ifndef PERL_UCHAR_MAX
3684# ifdef UCHAR_MAX
3685# define PERL_UCHAR_MAX ((unsigned char)UCHAR_MAX)
3686# else
3687# ifdef MAXUCHAR
3688# define PERL_UCHAR_MAX ((unsigned char)MAXUCHAR)
3689# else
3690# define PERL_UCHAR_MAX ((unsigned char)~(unsigned)0)
3691# endif
3692# endif
3693#endif
3694
3695#ifndef PERL_USHORT_MIN
3696# define PERL_USHORT_MIN ((unsigned short)0)
3697#endif
3698
3699#ifndef PERL_USHORT_MAX
3700# ifdef USHORT_MAX
3701# define PERL_USHORT_MAX ((unsigned short)USHORT_MAX)
3702# else
3703# ifdef MAXUSHORT
3704# define PERL_USHORT_MAX ((unsigned short)MAXUSHORT)
3705# else
3706# ifdef USHRT_MAX
3707# define PERL_USHORT_MAX ((unsigned short)USHRT_MAX)
3708# else
3709# define PERL_USHORT_MAX ((unsigned short)~(unsigned)0)
3710# endif
3711# endif
3712# endif
3713#endif
3714
3715#ifndef PERL_SHORT_MAX
3716# ifdef SHORT_MAX
3717# define PERL_SHORT_MAX ((short)SHORT_MAX)
3718# else
3719# ifdef MAXSHORT /* Often used in <values.h> */
3720# define PERL_SHORT_MAX ((short)MAXSHORT)
3721# else
3722# ifdef SHRT_MAX
3723# define PERL_SHORT_MAX ((short)SHRT_MAX)
3724# else
3725# define PERL_SHORT_MAX ((short) (PERL_USHORT_MAX >> 1))
3726# endif
3727# endif
3728# endif
3729#endif
3730
3731#ifndef PERL_SHORT_MIN
3732# ifdef SHORT_MIN
3733# define PERL_SHORT_MIN ((short)SHORT_MIN)
3734# else
3735# ifdef MINSHORT
3736# define PERL_SHORT_MIN ((short)MINSHORT)
3737# else
3738# ifdef SHRT_MIN
3739# define PERL_SHORT_MIN ((short)SHRT_MIN)
3740# else
3741# define PERL_SHORT_MIN (-PERL_SHORT_MAX - ((3 & -1) == 3))
3742# endif
3743# endif
3744# endif
3745#endif
3746
3747#ifndef PERL_UINT_MAX
3748# ifdef UINT_MAX
3749# define PERL_UINT_MAX ((unsigned int)UINT_MAX)
3750# else
3751# ifdef MAXUINT
3752# define PERL_UINT_MAX ((unsigned int)MAXUINT)
3753# else
3754# define PERL_UINT_MAX (~(unsigned int)0)
3755# endif
3756# endif
3757#endif
3758
3759#ifndef PERL_UINT_MIN
3760# define PERL_UINT_MIN ((unsigned int)0)
3761#endif
3762
3763#ifndef PERL_INT_MAX
3764# ifdef INT_MAX
3765# define PERL_INT_MAX ((int)INT_MAX)
3766# else
3767# ifdef MAXINT /* Often used in <values.h> */
3768# define PERL_INT_MAX ((int)MAXINT)
3769# else
3770# define PERL_INT_MAX ((int)(PERL_UINT_MAX >> 1))
3771# endif
3772# endif
3773#endif
3774
3775#ifndef PERL_INT_MIN
3776# ifdef INT_MIN
3777# define PERL_INT_MIN ((int)INT_MIN)
3778# else
3779# ifdef MININT
3780# define PERL_INT_MIN ((int)MININT)
3781# else
3782# define PERL_INT_MIN (-PERL_INT_MAX - ((3 & -1) == 3))
3783# endif
3784# endif
3785#endif
3786
3787#ifndef PERL_ULONG_MAX
3788# ifdef ULONG_MAX
3789# define PERL_ULONG_MAX ((unsigned long)ULONG_MAX)
3790# else
3791# ifdef MAXULONG
3792# define PERL_ULONG_MAX ((unsigned long)MAXULONG)
3793# else
3794# define PERL_ULONG_MAX (~(unsigned long)0)
3795# endif
3796# endif
3797#endif
3798
3799#ifndef PERL_ULONG_MIN
3800# define PERL_ULONG_MIN ((unsigned long)0L)
3801#endif
3802
3803#ifndef PERL_LONG_MAX
3804# ifdef LONG_MAX
3805# define PERL_LONG_MAX ((long)LONG_MAX)
3806# else
3807# ifdef MAXLONG
3808# define PERL_LONG_MAX ((long)MAXLONG)
3809# else
3810# define PERL_LONG_MAX ((long) (PERL_ULONG_MAX >> 1))
3811# endif
3812# endif
3813#endif
3814
3815#ifndef PERL_LONG_MIN
3816# ifdef LONG_MIN
3817# define PERL_LONG_MIN ((long)LONG_MIN)
3818# else
3819# ifdef MINLONG
3820# define PERL_LONG_MIN ((long)MINLONG)
3821# else
3822# define PERL_LONG_MIN (-PERL_LONG_MAX - ((3 & -1) == 3))
3823# endif
3824# endif
3825#endif
3826
3827#if defined(HAS_QUAD) && (defined(convex) || defined(uts))
3828# ifndef PERL_UQUAD_MAX
3829# ifdef ULONGLONG_MAX
3830# define PERL_UQUAD_MAX ((unsigned long long)ULONGLONG_MAX)
3831# else
3832# ifdef MAXULONGLONG
3833# define PERL_UQUAD_MAX ((unsigned long long)MAXULONGLONG)
3834# else
3835# define PERL_UQUAD_MAX (~(unsigned long long)0)
3836# endif
3837# endif
3838# endif
3839
3840# ifndef PERL_UQUAD_MIN
3841# define PERL_UQUAD_MIN ((unsigned long long)0L)
3842# endif
3843
3844# ifndef PERL_QUAD_MAX
3845# ifdef LONGLONG_MAX
3846# define PERL_QUAD_MAX ((long long)LONGLONG_MAX)
3847# else
3848# ifdef MAXLONGLONG
3849# define PERL_QUAD_MAX ((long long)MAXLONGLONG)
3850# else
3851# define PERL_QUAD_MAX ((long long) (PERL_UQUAD_MAX >> 1))
3852# endif
3853# endif
3854# endif
3855
3856# ifndef PERL_QUAD_MIN
3857# ifdef LONGLONG_MIN
3858# define PERL_QUAD_MIN ((long long)LONGLONG_MIN)
3859# else
3860# ifdef MINLONGLONG
3861# define PERL_QUAD_MIN ((long long)MINLONGLONG)
3862# else
3863# define PERL_QUAD_MIN (-PERL_QUAD_MAX - ((3 & -1) == 3))
3864# endif
3865# endif
3866# endif
3867#endif
3868
3869/* This is based on code from 5.003 perl.h */
3870#ifdef HAS_QUAD
3871# ifdef cray
3872#ifndef IVTYPE
3873# define IVTYPE int
3874#endif
3875
3876#ifndef IV_MIN
3877# define IV_MIN PERL_INT_MIN
3878#endif
3879
3880#ifndef IV_MAX
3881# define IV_MAX PERL_INT_MAX
3882#endif
3883
3884#ifndef UV_MIN
3885# define UV_MIN PERL_UINT_MIN
3886#endif
3887
3888#ifndef UV_MAX
3889# define UV_MAX PERL_UINT_MAX
3890#endif
3891
3892# ifdef INTSIZE
3893#ifndef IVSIZE
3894# define IVSIZE INTSIZE
3895#endif
3896
3897# endif
3898# else
3899# if defined(convex) || defined(uts)
3900#ifndef IVTYPE
3901# define IVTYPE long long
3902#endif
3903
3904#ifndef IV_MIN
3905# define IV_MIN PERL_QUAD_MIN
3906#endif
3907
3908#ifndef IV_MAX
3909# define IV_MAX PERL_QUAD_MAX
3910#endif
3911
3912#ifndef UV_MIN
3913# define UV_MIN PERL_UQUAD_MIN
3914#endif
3915
3916#ifndef UV_MAX
3917# define UV_MAX PERL_UQUAD_MAX
3918#endif
3919
3920# ifdef LONGLONGSIZE
3921#ifndef IVSIZE
3922# define IVSIZE LONGLONGSIZE
3923#endif
3924
3925# endif
3926# else
3927#ifndef IVTYPE
3928# define IVTYPE long
3929#endif
3930
3931#ifndef IV_MIN
3932# define IV_MIN PERL_LONG_MIN
3933#endif
3934
3935#ifndef IV_MAX
3936# define IV_MAX PERL_LONG_MAX
3937#endif
3938
3939#ifndef UV_MIN
3940# define UV_MIN PERL_ULONG_MIN
3941#endif
3942
3943#ifndef UV_MAX
3944# define UV_MAX PERL_ULONG_MAX
3945#endif
3946
3947# ifdef LONGSIZE
3948#ifndef IVSIZE
3949# define IVSIZE LONGSIZE
3950#endif
3951
3952# endif
3953# endif
3954# endif
3955#ifndef IVSIZE
3956# define IVSIZE 8
3957#endif
3958
3959#ifndef LONGSIZE
3960# define LONGSIZE 8
3961#endif
3962
3963#ifndef PERL_QUAD_MIN
3964# define PERL_QUAD_MIN IV_MIN
3965#endif
3966
3967#ifndef PERL_QUAD_MAX
3968# define PERL_QUAD_MAX IV_MAX
3969#endif
3970
3971#ifndef PERL_UQUAD_MIN
3972# define PERL_UQUAD_MIN UV_MIN
3973#endif
3974
3975#ifndef PERL_UQUAD_MAX
3976# define PERL_UQUAD_MAX UV_MAX
3977#endif
3978
3979#else
3980#ifndef IVTYPE
3981# define IVTYPE long
3982#endif
3983
3984#ifndef LONGSIZE
3985# define LONGSIZE 4
3986#endif
3987
3988#ifndef IV_MIN
3989# define IV_MIN PERL_LONG_MIN
3990#endif
3991
3992#ifndef IV_MAX
3993# define IV_MAX PERL_LONG_MAX
3994#endif
3995
3996#ifndef UV_MIN
3997# define UV_MIN PERL_ULONG_MIN
3998#endif
3999
4000#ifndef UV_MAX
4001# define UV_MAX PERL_ULONG_MAX
4002#endif
4003
4004#endif
4005
4006#ifndef IVSIZE
4007# ifdef LONGSIZE
4008# define IVSIZE LONGSIZE
4009# else
4010# define IVSIZE 4 /* A bold guess, but the best we can make. */
4011# endif
4012#endif
4013#ifndef UVTYPE
4014# define UVTYPE unsigned IVTYPE
4015#endif
4016
4017#ifndef UVSIZE
4018# define UVSIZE IVSIZE
4019#endif
4020#ifndef sv_setuv
4021# define sv_setuv(sv, uv) \
4022 STMT_START { \
4023 UV TeMpUv = uv; \
4024 if (TeMpUv <= IV_MAX) \
4025 sv_setiv(sv, TeMpUv); \
4026 else \
4027 sv_setnv(sv, (double)TeMpUv); \
4028 } STMT_END
4029#endif
4030#ifndef newSVuv
4031# define newSVuv(uv) ((uv) <= IV_MAX ? newSViv((IV)uv) : newSVnv((NV)uv))
4032#endif
4033#ifndef sv_2uv
4034# define sv_2uv(sv) ((PL_Sv = (sv)), (UV) (SvNOK(PL_Sv) ? SvNV(PL_Sv) : sv_2nv(PL_Sv)))
4035#endif
4036
4037#ifndef SvUVX
4038# define SvUVX(sv) ((UV)SvIVX(sv))
4039#endif
4040
4041#ifndef SvUVXx
4042# define SvUVXx(sv) SvUVX(sv)
4043#endif
4044
4045#ifndef SvUV
4046# define SvUV(sv) (SvIOK(sv) ? SvUVX(sv) : sv_2uv(sv))
4047#endif
4048
4049#ifndef SvUVx
4050# define SvUVx(sv) ((PL_Sv = (sv)), SvUV(PL_Sv))
4051#endif
4052
4053/* Hint: sv_uv
4054 * Always use the SvUVx() macro instead of sv_uv().
4055 */
4056#ifndef sv_uv
4057# define sv_uv(sv) SvUVx(sv)
4058#endif
4059
4060#if !defined(SvUOK) && defined(SvIOK_UV)
4061# define SvUOK(sv) SvIOK_UV(sv)
4062#endif
4063#ifndef XST_mUV
4064# define XST_mUV(i,v) (ST(i) = sv_2mortal(newSVuv(v)) )
4065#endif
4066
4067#ifndef XSRETURN_UV
4068# define XSRETURN_UV(v) STMT_START { XST_mUV(0,v); XSRETURN(1); } STMT_END
4069#endif
4070#ifndef PUSHu
4071# define PUSHu(u) STMT_START { sv_setuv(TARG, (UV)(u)); PUSHTARG; } STMT_END
4072#endif
4073
4074#ifndef XPUSHu
4075# define XPUSHu(u) STMT_START { sv_setuv(TARG, (UV)(u)); XPUSHTARG; } STMT_END
4076#endif
4077
4078#ifdef HAS_MEMCMP
4079#ifndef memNE
4080# define memNE(s1,s2,l) (memcmp(s1,s2,l))
4081#endif
4082
4083#ifndef memEQ
4084# define memEQ(s1,s2,l) (!memcmp(s1,s2,l))
4085#endif
4086
4087#else
4088#ifndef memNE
4089# define memNE(s1,s2,l) (bcmp(s1,s2,l))
4090#endif
4091
4092#ifndef memEQ
4093# define memEQ(s1,s2,l) (!bcmp(s1,s2,l))
4094#endif
4095
4096#endif
4097#ifndef memEQs
4098# define memEQs(s1, l, s2) \
4099 (sizeof(s2)-1 == l && memEQ(s1, (s2 ""), (sizeof(s2)-1)))
4100#endif
4101
4102#ifndef memNEs
4103# define memNEs(s1, l, s2) !memEQs(s1, l, s2)
4104#endif
4105#ifndef MoveD
4106# define MoveD(s,d,n,t) memmove((char*)(d),(char*)(s), (n) * sizeof(t))
4107#endif
4108
4109#ifndef CopyD
4110# define CopyD(s,d,n,t) memcpy((char*)(d),(char*)(s), (n) * sizeof(t))
4111#endif
4112
4113#ifdef HAS_MEMSET
4114#ifndef ZeroD
4115# define ZeroD(d,n,t) memzero((char*)(d), (n) * sizeof(t))
4116#endif
4117
4118#else
4119#ifndef ZeroD
4120# define ZeroD(d,n,t) ((void)memzero((char*)(d), (n) * sizeof(t)), d)
4121#endif
4122
4123#endif
4124#ifndef PoisonWith
4125# define PoisonWith(d,n,t,b) (void)memset((char*)(d), (U8)(b), (n) * sizeof(t))
4126#endif
4127
4128#ifndef PoisonNew
4129# define PoisonNew(d,n,t) PoisonWith(d,n,t,0xAB)
4130#endif
4131
4132#ifndef PoisonFree
4133# define PoisonFree(d,n,t) PoisonWith(d,n,t,0xEF)
4134#endif
4135
4136#ifndef Poison
4137# define Poison(d,n,t) PoisonFree(d,n,t)
4138#endif
4139#ifndef Newx
4140# define Newx(v,n,t) New(0,v,n,t)
4141#endif
4142
4143#ifndef Newxc
4144# define Newxc(v,n,t,c) Newc(0,v,n,t,c)
4145#endif
4146
4147#ifndef Newxz
4148# define Newxz(v,n,t) Newz(0,v,n,t)
4149#endif
4150
4151#ifndef PERL_UNUSED_DECL
4152# ifdef HASATTRIBUTE
4153# if (defined(__GNUC__) && defined(__cplusplus)) || defined(__INTEL_COMPILER)
4154# define PERL_UNUSED_DECL
4155# else
4156# define PERL_UNUSED_DECL __attribute__((unused))
4157# endif
4158# else
4159# define PERL_UNUSED_DECL
4160# endif
4161#endif
4162
4163#ifndef PERL_UNUSED_ARG
4164# if defined(lint) && defined(S_SPLINT_S) /* www.splint.org */
4165# include <note.h>
4166# define PERL_UNUSED_ARG(x) NOTE(ARGUNUSED(x))
4167# else
4168# define PERL_UNUSED_ARG(x) ((void)x)
4169# endif
4170#endif
4171
4172#ifndef PERL_UNUSED_VAR
4173# define PERL_UNUSED_VAR(x) ((void)x)
4174#endif
4175
4176#ifndef PERL_UNUSED_CONTEXT
4177# ifdef USE_ITHREADS
4178# define PERL_UNUSED_CONTEXT PERL_UNUSED_ARG(my_perl)
4179# else
4180# define PERL_UNUSED_CONTEXT
4181# endif
4182#endif
4183#ifndef NOOP
4184# define NOOP /*EMPTY*/(void)0
4185#endif
4186
4187#ifndef dNOOP
4188# define dNOOP extern int /*@unused@*/ Perl___notused PERL_UNUSED_DECL
4189#endif
4190
4191#ifndef NVTYPE
4192# if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE)
4193# define NVTYPE long double
4194# else
4195# define NVTYPE double
4196# endif
4197typedef NVTYPE NV;
4198#endif
4199
4200#ifndef INT2PTR
4201# if (IVSIZE == PTRSIZE) && (UVSIZE == PTRSIZE)
4202# define PTRV UV
4203# define INT2PTR(any,d) (any)(d)
4204# else
4205# if PTRSIZE == LONGSIZE
4206# define PTRV unsigned long
4207# else
4208# define PTRV unsigned
4209# endif
4210# define INT2PTR(any,d) (any)(PTRV)(d)
4211# endif
4212#endif
4213
4214#ifndef PTR2ul
4215# if PTRSIZE == LONGSIZE
4216# define PTR2ul(p) (unsigned long)(p)
4217# else
4218# define PTR2ul(p) INT2PTR(unsigned long,p)
4219# endif
4220#endif
4221#ifndef PTR2nat
4222# define PTR2nat(p) (PTRV)(p)
4223#endif
4224
4225#ifndef NUM2PTR
4226# define NUM2PTR(any,d) (any)PTR2nat(d)
4227#endif
4228
4229#ifndef PTR2IV
4230# define PTR2IV(p) INT2PTR(IV,p)
4231#endif
4232
4233#ifndef PTR2UV
4234# define PTR2UV(p) INT2PTR(UV,p)
4235#endif
4236
4237#ifndef PTR2NV
4238# define PTR2NV(p) NUM2PTR(NV,p)
4239#endif
4240
4241#undef START_EXTERN_C
4242#undef END_EXTERN_C
4243#undef EXTERN_C
4244#ifdef __cplusplus
4245# define START_EXTERN_C extern "C" {
4246# define END_EXTERN_C }
4247# define EXTERN_C extern "C"
4248#else
4249# define START_EXTERN_C
4250# define END_EXTERN_C
4251# define EXTERN_C extern
4252#endif
4253
4254#if defined(PERL_GCC_PEDANTIC)
4255# ifndef PERL_GCC_BRACE_GROUPS_FORBIDDEN
4256# define PERL_GCC_BRACE_GROUPS_FORBIDDEN
4257# endif
4258#endif
4259
4260#if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN) && !defined(__cplusplus)
4261# ifndef PERL_USE_GCC_BRACE_GROUPS
4262# define PERL_USE_GCC_BRACE_GROUPS
4263# endif
4264#endif
4265
4266#undef STMT_START
4267#undef STMT_END
4268#ifdef PERL_USE_GCC_BRACE_GROUPS
4269# define STMT_START (void)( /* gcc supports ``({ STATEMENTS; })'' */
4270# define STMT_END )
4271#else
4272# if defined(VOIDFLAGS) && (VOIDFLAGS) && (defined(sun) || defined(__sun__)) && !defined(__GNUC__)
4273# define STMT_START if (1)
4274# define STMT_END else (void)0
4275# else
4276# define STMT_START do
4277# define STMT_END while (0)
4278# endif
4279#endif
4280#ifndef boolSV
4281# define boolSV(b) ((b) ? &PL_sv_yes : &PL_sv_no)
4282#endif
4283
4284/* DEFSV appears first in 5.004_56 */
4285#ifndef DEFSV
4286# define DEFSV GvSV(PL_defgv)
4287#endif
4288
4289#ifndef SAVE_DEFSV
4290# define SAVE_DEFSV SAVESPTR(GvSV(PL_defgv))
4291#endif
4292
4293#ifndef DEFSV_set
4294# define DEFSV_set(sv) (DEFSV = (sv))
4295#endif
4296
4297/* Older perls (<=5.003) lack AvFILLp */
4298#ifndef AvFILLp
4299# define AvFILLp AvFILL
4300#endif
4301#ifndef ERRSV
4302# define ERRSV get_sv("@",FALSE)
4303#endif
4304
4305/* Hint: gv_stashpvn
4306 * This function's backport doesn't support the length parameter, but
4307 * rather ignores it. Portability can only be ensured if the length
4308 * parameter is used for speed reasons, but the length can always be
4309 * correctly computed from the string argument.
4310 */
4311#ifndef gv_stashpvn
4312# define gv_stashpvn(str,len,create) gv_stashpv(str,create)
4313#endif
4314
4315/* Replace: 1 */
4316#ifndef get_cv
4317# define get_cv perl_get_cv
4318#endif
4319
4320#ifndef get_sv
4321# define get_sv perl_get_sv
4322#endif
4323
4324#ifndef get_av
4325# define get_av perl_get_av
4326#endif
4327
4328#ifndef get_hv
4329# define get_hv perl_get_hv
4330#endif
4331
4332/* Replace: 0 */
4333#ifndef dUNDERBAR
4334# define dUNDERBAR dNOOP
4335#endif
4336
4337#ifndef UNDERBAR
4338# define UNDERBAR DEFSV
4339#endif
4340#ifndef dAX
4341# define dAX I32 ax = MARK - PL_stack_base + 1
4342#endif
4343
4344#ifndef dITEMS
4345# define dITEMS I32 items = SP - MARK
4346#endif
4347#ifndef dXSTARG
4348# define dXSTARG SV * targ = sv_newmortal()
4349#endif
4350#ifndef dAXMARK
4351# define dAXMARK I32 ax = POPMARK; \
4352 register SV ** const mark = PL_stack_base + ax++
4353#endif
4354#ifndef XSprePUSH
4355# define XSprePUSH (sp = PL_stack_base + ax - 1)
4356#endif
4357
4358#if (PERL_BCDVERSION < 0x5005000)
4359# undef XSRETURN
4360# define XSRETURN(off) \
4361 STMT_START { \
4362 PL_stack_sp = PL_stack_base + ax + ((off) - 1); \
4363 return; \
4364 } STMT_END
4365#endif
4366#ifndef XSPROTO
4367# define XSPROTO(name) void name(pTHX_ CV* cv)
4368#endif
4369
4370#ifndef SVfARG
4371# define SVfARG(p) ((void*)(p))
4372#endif
4373#ifndef PERL_ABS
4374# define PERL_ABS(x) ((x) < 0 ? -(x) : (x))
4375#endif
4376#ifndef dVAR
4377# define dVAR dNOOP
4378#endif
4379#ifndef SVf
4380# define SVf "_"
4381#endif
4382#ifndef UTF8_MAXBYTES
4383# define UTF8_MAXBYTES UTF8_MAXLEN
4384#endif
4385#ifndef CPERLscope
4386# define CPERLscope(x) x
4387#endif
4388#ifndef PERL_HASH
4389# define PERL_HASH(hash,str,len) \
4390 STMT_START { \
4391 const char *s_PeRlHaSh = str; \
4392 I32 i_PeRlHaSh = len; \
4393 U32 hash_PeRlHaSh = 0; \
4394 while (i_PeRlHaSh--) \
4395 hash_PeRlHaSh = hash_PeRlHaSh * 33 + *s_PeRlHaSh++; \
4396 (hash) = hash_PeRlHaSh; \
4397 } STMT_END
4398#endif
4399
4400#ifndef PERLIO_FUNCS_DECL
4401# ifdef PERLIO_FUNCS_CONST
4402# define PERLIO_FUNCS_DECL(funcs) const PerlIO_funcs funcs
4403# define PERLIO_FUNCS_CAST(funcs) (PerlIO_funcs*)(funcs)
4404# else
4405# define PERLIO_FUNCS_DECL(funcs) PerlIO_funcs funcs
4406# define PERLIO_FUNCS_CAST(funcs) (funcs)
4407# endif
4408#endif
4409
4410/* provide these typedefs for older perls */
4411#if (PERL_BCDVERSION < 0x5009003)
4412
4413# ifdef ARGSproto
4414typedef OP* (CPERLscope(*Perl_ppaddr_t))(ARGSproto);
4415# else
4416typedef OP* (CPERLscope(*Perl_ppaddr_t))(pTHX);
4417# endif
4418
4419typedef OP* (CPERLscope(*Perl_check_t)) (pTHX_ OP*);
4420
4421#endif
4422#ifndef isPSXSPC
4423# define isPSXSPC(c) (isSPACE(c) || (c) == '\v')
4424#endif
4425
4426#ifndef isBLANK
4427# define isBLANK(c) ((c) == ' ' || (c) == '\t')
4428#endif
4429
4430#ifdef EBCDIC
4431#ifndef isALNUMC
4432# define isALNUMC(c) isalnum(c)
4433#endif
4434
4435#ifndef isASCII
4436# define isASCII(c) isascii(c)
4437#endif
4438
4439#ifndef isCNTRL
4440# define isCNTRL(c) iscntrl(c)
4441#endif
4442
4443#ifndef isGRAPH
4444# define isGRAPH(c) isgraph(c)
4445#endif
4446
4447#ifndef isPRINT
4448# define isPRINT(c) isprint(c)
4449#endif
4450
4451#ifndef isPUNCT
4452# define isPUNCT(c) ispunct(c)
4453#endif
4454
4455#ifndef isXDIGIT
4456# define isXDIGIT(c) isxdigit(c)
4457#endif
4458
4459#else
4460# if (PERL_BCDVERSION < 0x5010000)
4461/* Hint: isPRINT
4462 * The implementation in older perl versions includes all of the
4463 * isSPACE() characters, which is wrong. The version provided by
4464 * Devel::PPPort always overrides a present buggy version.
4465 */
4466# undef isPRINT
4467# endif
4468
4469#ifdef HAS_QUAD
4470# ifdef U64TYPE
4471# define WIDEST_UTYPE U64TYPE
4472# else
4473# define WIDEST_UTYPE Quad_t
4474# endif
4475#else
4476# define WIDEST_UTYPE U32
4477#endif
4478#ifndef isALNUMC
4479# define isALNUMC(c) (isALPHA(c) || isDIGIT(c))
4480#endif
4481
4482#ifndef isASCII
4483# define isASCII(c) ((WIDEST_UTYPE) (c) <= 127)
4484#endif
4485
4486#ifndef isCNTRL
4487# define isCNTRL(c) ((WIDEST_UTYPE) (c) < ' ' || (c) == 127)
4488#endif
4489
4490#ifndef isGRAPH
4491# define isGRAPH(c) (isALNUM(c) || isPUNCT(c))
4492#endif
4493
4494#ifndef isPRINT
4495# define isPRINT(c) (((c) >= 32 && (c) < 127))
4496#endif
4497
4498#ifndef isPUNCT
4499# define isPUNCT(c) (((c) >= 33 && (c) <= 47) || ((c) >= 58 && (c) <= 64) || ((c) >= 91 && (c) <= 96) || ((c) >= 123 && (c) <= 126))
4500#endif
4501
4502#ifndef isXDIGIT
4503# define isXDIGIT(c) (isDIGIT(c) || ((c) >= 'a' && (c) <= 'f') || ((c) >= 'A' && (c) <= 'F'))
4504#endif
4505
4506#endif
4507
4508/* Until we figure out how to support this in older perls... */
4509#if (PERL_BCDVERSION >= 0x5008000)
4510#ifndef HeUTF8
4511# define HeUTF8(he) ((HeKLEN(he) == HEf_SVKEY) ? \
4512 SvUTF8(HeKEY_sv(he)) : \
4513 (U32)HeKUTF8(he))
4514#endif
4515
4516#endif
4517
4518#ifndef PERL_SIGNALS_UNSAFE_FLAG
4519
4520#define PERL_SIGNALS_UNSAFE_FLAG 0x0001
4521
4522#if (PERL_BCDVERSION < 0x5008000)
4523# define D_PPP_PERL_SIGNALS_INIT PERL_SIGNALS_UNSAFE_FLAG
4524#else
4525# define D_PPP_PERL_SIGNALS_INIT 0
4526#endif
4527
4528#if defined(NEED_PL_signals)
4529static U32 DPPP_(my_PL_signals) = D_PPP_PERL_SIGNALS_INIT;
4530#elif defined(NEED_PL_signals_GLOBAL)
4531U32 DPPP_(my_PL_signals) = D_PPP_PERL_SIGNALS_INIT;
4532#else
4533extern U32 DPPP_(my_PL_signals);
4534#endif
4535#define PL_signals DPPP_(my_PL_signals)
4536
4537#endif
4538
4539/* Hint: PL_ppaddr
4540 * Calling an op via PL_ppaddr requires passing a context argument
4541 * for threaded builds. Since the context argument is different for
4542 * 5.005 perls, you can use aTHXR (supplied by ppport.h), which will
4543 * automatically be defined as the correct argument.
4544 */
4545
4546#if (PERL_BCDVERSION <= 0x5005005)
4547/* Replace: 1 */
4548# define PL_ppaddr ppaddr
4549# define PL_no_modify no_modify
4550/* Replace: 0 */
4551#endif
4552
4553#if (PERL_BCDVERSION <= 0x5004005)
4554/* Replace: 1 */
4555# define PL_DBsignal DBsignal
4556# define PL_DBsingle DBsingle
4557# define PL_DBsub DBsub
4558# define PL_DBtrace DBtrace
4559# define PL_Sv Sv
4560# define PL_bufend bufend
4561# define PL_bufptr bufptr
4562# define PL_compiling compiling
4563# define PL_copline copline
4564# define PL_curcop curcop
4565# define PL_curstash curstash
4566# define PL_debstash debstash
4567# define PL_defgv defgv
4568# define PL_diehook diehook
4569# define PL_dirty dirty
4570# define PL_dowarn dowarn
4571# define PL_errgv errgv
4572# define PL_error_count error_count
4573# define PL_expect expect
4574# define PL_hexdigit hexdigit
4575# define PL_hints hints
4576# define PL_in_my in_my
4577# define PL_laststatval laststatval
4578# define PL_lex_state lex_state
4579# define PL_lex_stuff lex_stuff
4580# define PL_linestr linestr
4581# define PL_na na
4582# define PL_perl_destruct_level perl_destruct_level
4583# define PL_perldb perldb
4584# define PL_rsfp_filters rsfp_filters
4585# define PL_rsfp rsfp
4586# define PL_stack_base stack_base
4587# define PL_stack_sp stack_sp
4588# define PL_statcache statcache
4589# define PL_stdingv stdingv
4590# define PL_sv_arenaroot sv_arenaroot
4591# define PL_sv_no sv_no
4592# define PL_sv_undef sv_undef
4593# define PL_sv_yes sv_yes
4594# define PL_tainted tainted
4595# define PL_tainting tainting
4596# define PL_tokenbuf tokenbuf
4597/* Replace: 0 */
4598#endif
4599
4600/* Warning: PL_parser
4601 * For perl versions earlier than 5.9.5, this is an always
4602 * non-NULL dummy. Also, it cannot be dereferenced. Don't
4603 * use it if you can avoid is and unless you absolutely know
4604 * what you're doing.
4605 * If you always check that PL_parser is non-NULL, you can
4606 * define DPPP_PL_parser_NO_DUMMY to avoid the creation of
4607 * a dummy parser structure.
4608 */
4609
4610#if (PERL_BCDVERSION >= 0x5009005)
4611# ifdef DPPP_PL_parser_NO_DUMMY
4612# define D_PPP_my_PL_parser_var(var) ((PL_parser ? PL_parser : \
4613 (croak("panic: PL_parser == NULL in %s:%d", \
4614 __FILE__, __LINE__), (yy_parser *) NULL))->var)
4615# else
4616# ifdef DPPP_PL_parser_NO_DUMMY_WARNING
4617# define D_PPP_parser_dummy_warning(var)
4618# else
4619# define D_PPP_parser_dummy_warning(var) \
4620 warn("warning: dummy PL_" #var " used in %s:%d", __FILE__, __LINE__),
4621# endif
4622# define D_PPP_my_PL_parser_var(var) ((PL_parser ? PL_parser : \
4623 (D_PPP_parser_dummy_warning(var) &DPPP_(dummy_PL_parser)))->var)
4624#if defined(NEED_PL_parser)
4625static yy_parser DPPP_(dummy_PL_parser);
4626#elif defined(NEED_PL_parser_GLOBAL)
4627yy_parser DPPP_(dummy_PL_parser);
4628#else
4629extern yy_parser DPPP_(dummy_PL_parser);
4630#endif
4631
4632# endif
4633
4634/* PL_expect, PL_copline, PL_rsfp, PL_rsfp_filters, PL_linestr, PL_bufptr, PL_bufend, PL_lex_state, PL_lex_stuff, PL_tokenbuf depends on PL_parser */
4635/* Warning: PL_expect, PL_copline, PL_rsfp, PL_rsfp_filters, PL_linestr, PL_bufptr, PL_bufend, PL_lex_state, PL_lex_stuff, PL_tokenbuf
4636 * Do not use this variable unless you know exactly what you're
4637 * doint. It is internal to the perl parser and may change or even
4638 * be removed in the future. As of perl 5.9.5, you have to check
4639 * for (PL_parser != NULL) for this variable to have any effect.
4640 * An always non-NULL PL_parser dummy is provided for earlier
4641 * perl versions.
4642 * If PL_parser is NULL when you try to access this variable, a
4643 * dummy is being accessed instead and a warning is issued unless
4644 * you define DPPP_PL_parser_NO_DUMMY_WARNING.
4645 * If DPPP_PL_parser_NO_DUMMY is defined, the code trying to access
4646 * this variable will croak with a panic message.
4647 */
4648
4649# define PL_expect D_PPP_my_PL_parser_var(expect)
4650# define PL_copline D_PPP_my_PL_parser_var(copline)
4651# define PL_rsfp D_PPP_my_PL_parser_var(rsfp)
4652# define PL_rsfp_filters D_PPP_my_PL_parser_var(rsfp_filters)
4653# define PL_linestr D_PPP_my_PL_parser_var(linestr)
4654# define PL_bufptr D_PPP_my_PL_parser_var(bufptr)
4655# define PL_bufend D_PPP_my_PL_parser_var(bufend)
4656# define PL_lex_state D_PPP_my_PL_parser_var(lex_state)
4657# define PL_lex_stuff D_PPP_my_PL_parser_var(lex_stuff)
4658# define PL_tokenbuf D_PPP_my_PL_parser_var(tokenbuf)
4659# define PL_in_my D_PPP_my_PL_parser_var(in_my)
4660# define PL_in_my_stash D_PPP_my_PL_parser_var(in_my_stash)
4661# define PL_error_count D_PPP_my_PL_parser_var(error_count)
4662
4663
4664#else
4665
4666/* ensure that PL_parser != NULL and cannot be dereferenced */
4667# define PL_parser ((void *) 1)
4668
4669#endif
4670#ifndef mPUSHs
4671# define mPUSHs(s) PUSHs(sv_2mortal(s))
4672#endif
4673
4674#ifndef PUSHmortal
4675# define PUSHmortal PUSHs(sv_newmortal())
4676#endif
4677
4678#ifndef mPUSHp
4679# define mPUSHp(p,l) sv_setpvn(PUSHmortal, (p), (l))
4680#endif
4681
4682#ifndef mPUSHn
4683# define mPUSHn(n) sv_setnv(PUSHmortal, (NV)(n))
4684#endif
4685
4686#ifndef mPUSHi
4687# define mPUSHi(i) sv_setiv(PUSHmortal, (IV)(i))
4688#endif
4689
4690#ifndef mPUSHu
4691# define mPUSHu(u) sv_setuv(PUSHmortal, (UV)(u))
4692#endif
4693#ifndef mXPUSHs
4694# define mXPUSHs(s) XPUSHs(sv_2mortal(s))
4695#endif
4696
4697#ifndef XPUSHmortal
4698# define XPUSHmortal XPUSHs(sv_newmortal())
4699#endif
4700
4701#ifndef mXPUSHp
4702# define mXPUSHp(p,l) STMT_START { EXTEND(sp,1); sv_setpvn(PUSHmortal, (p), (l)); } STMT_END
4703#endif
4704
4705#ifndef mXPUSHn
4706# define mXPUSHn(n) STMT_START { EXTEND(sp,1); sv_setnv(PUSHmortal, (NV)(n)); } STMT_END
4707#endif
4708
4709#ifndef mXPUSHi
4710# define mXPUSHi(i) STMT_START { EXTEND(sp,1); sv_setiv(PUSHmortal, (IV)(i)); } STMT_END
4711#endif
4712
4713#ifndef mXPUSHu
4714# define mXPUSHu(u) STMT_START { EXTEND(sp,1); sv_setuv(PUSHmortal, (UV)(u)); } STMT_END
4715#endif
4716
4717/* Replace: 1 */
4718#ifndef call_sv
4719# define call_sv perl_call_sv
4720#endif
4721
4722#ifndef call_pv
4723# define call_pv perl_call_pv
4724#endif
4725
4726#ifndef call_argv
4727# define call_argv perl_call_argv
4728#endif
4729
4730#ifndef call_method
4731# define call_method perl_call_method
4732#endif
4733#ifndef eval_sv
4734# define eval_sv perl_eval_sv
4735#endif
4736
4737/* Replace: 0 */
4738#ifndef PERL_LOADMOD_DENY
4739# define PERL_LOADMOD_DENY 0x1
4740#endif
4741
4742#ifndef PERL_LOADMOD_NOIMPORT
4743# define PERL_LOADMOD_NOIMPORT 0x2
4744#endif
4745
4746#ifndef PERL_LOADMOD_IMPORT_OPS
4747# define PERL_LOADMOD_IMPORT_OPS 0x4
4748#endif
4749
4750#ifndef G_METHOD
4751# define G_METHOD 64
4752# ifdef call_sv
4753# undef call_sv
4754# endif
4755# if (PERL_BCDVERSION < 0x5006000)
4756# define call_sv(sv, flags) ((flags) & G_METHOD ? perl_call_method((char *) SvPV_nolen_const(sv), \
4757 (flags) & ~G_METHOD) : perl_call_sv(sv, flags))
4758# else
4759# define call_sv(sv, flags) ((flags) & G_METHOD ? Perl_call_method(aTHX_ (char *) SvPV_nolen_const(sv), \
4760 (flags) & ~G_METHOD) : Perl_call_sv(aTHX_ sv, flags))
4761# endif
4762#endif
4763
4764/* Replace perl_eval_pv with eval_pv */
4765
4766#ifndef eval_pv
4767#if defined(NEED_eval_pv)
4768static SV* DPPP_(my_eval_pv)(char *p, I32 croak_on_error);
4769static
4770#else
4771extern SV* DPPP_(my_eval_pv)(char *p, I32 croak_on_error);
4772#endif
4773
4774#ifdef eval_pv
4775# undef eval_pv
4776#endif
4777#define eval_pv(a,b) DPPP_(my_eval_pv)(aTHX_ a,b)
4778#define Perl_eval_pv DPPP_(my_eval_pv)
4779
4780#if defined(NEED_eval_pv) || defined(NEED_eval_pv_GLOBAL)
4781
4782SV*
4783DPPP_(my_eval_pv)(char *p, I32 croak_on_error)
4784{
4785 dSP;
4786 SV* sv = newSVpv(p, 0);
4787
4788 PUSHMARK(sp);
4789 eval_sv(sv, G_SCALAR);
4790 SvREFCNT_dec(sv);
4791
4792 SPAGAIN;
4793 sv = POPs;
4794 PUTBACK;
4795
4796 if (croak_on_error && SvTRUE(GvSV(errgv)))
4797 croak(SvPVx(GvSV(errgv), na));
4798
4799 return sv;
4800}
4801
4802#endif
4803#endif
4804
4805#ifndef vload_module
4806#if defined(NEED_vload_module)
4807static void DPPP_(my_vload_module)(U32 flags, SV *name, SV *ver, va_list *args);
4808static
4809#else
4810extern void DPPP_(my_vload_module)(U32 flags, SV *name, SV *ver, va_list *args);
4811#endif
4812
4813#ifdef vload_module
4814# undef vload_module
4815#endif
4816#define vload_module(a,b,c,d) DPPP_(my_vload_module)(aTHX_ a,b,c,d)
4817#define Perl_vload_module DPPP_(my_vload_module)
4818
4819#if defined(NEED_vload_module) || defined(NEED_vload_module_GLOBAL)
4820
4821void
4822DPPP_(my_vload_module)(U32 flags, SV *name, SV *ver, va_list *args)
4823{
4824 dTHR;
4825 dVAR;
4826 OP *veop, *imop;
4827
4828 OP * const modname = newSVOP(OP_CONST, 0, name);
4829 /* 5.005 has a somewhat hacky force_normal that doesn't croak on
4830 SvREADONLY() if PL_compling is true. Current perls take care in
4831 ck_require() to correctly turn off SvREADONLY before calling
4832 force_normal_flags(). This seems a better fix than fudging PL_compling
4833 */
4834 SvREADONLY_off(((SVOP*)modname)->op_sv);
4835 modname->op_private |= OPpCONST_BARE;
4836 if (ver) {
4837 veop = newSVOP(OP_CONST, 0, ver);
4838 }
4839 else
4840 veop = NULL;
4841 if (flags & PERL_LOADMOD_NOIMPORT) {
4842 imop = sawparens(newNULLLIST());
4843 }
4844 else if (flags & PERL_LOADMOD_IMPORT_OPS) {
4845 imop = va_arg(*args, OP*);
4846 }
4847 else {
4848 SV *sv;
4849 imop = NULL;
4850 sv = va_arg(*args, SV*);
4851 while (sv) {
4852 imop = append_elem(OP_LIST, imop, newSVOP(OP_CONST, 0, sv));
4853 sv = va_arg(*args, SV*);
4854 }
4855 }
4856 {
4857 const line_t ocopline = PL_copline;
4858 COP * const ocurcop = PL_curcop;
4859 const int oexpect = PL_expect;
4860
4861#if (PERL_BCDVERSION >= 0x5004000)
4862 utilize(!(flags & PERL_LOADMOD_DENY), start_subparse(FALSE, 0),
4863 veop, modname, imop);
4864#elif (PERL_BCDVERSION > 0x5003000)
4865 utilize(!(flags & PERL_LOADMOD_DENY), start_subparse(),
4866 veop, modname, imop);
4867#else
4868 utilize(!(flags & PERL_LOADMOD_DENY), start_subparse(),
4869 modname, imop);
4870#endif
4871 PL_expect = oexpect;
4872 PL_copline = ocopline;
4873 PL_curcop = ocurcop;
4874 }
4875}
4876
4877#endif
4878#endif
4879
4880#ifndef load_module
4881#if defined(NEED_load_module)
4882static void DPPP_(my_load_module)(U32 flags, SV *name, SV *ver, ...);
4883static
4884#else
4885extern void DPPP_(my_load_module)(U32 flags, SV *name, SV *ver, ...);
4886#endif
4887
4888#ifdef load_module
4889# undef load_module
4890#endif
4891#define load_module DPPP_(my_load_module)
4892#define Perl_load_module DPPP_(my_load_module)
4893
4894#if defined(NEED_load_module) || defined(NEED_load_module_GLOBAL)
4895
4896void
4897DPPP_(my_load_module)(U32 flags, SV *name, SV *ver, ...)
4898{
4899 va_list args;
4900 va_start(args, ver);
4901 vload_module(flags, name, ver, &args);
4902 va_end(args);
4903}
4904
4905#endif
4906#endif
4907#ifndef newRV_inc
4908# define newRV_inc(sv) newRV(sv) /* Replace */
4909#endif
4910
4911#ifndef newRV_noinc
4912#if defined(NEED_newRV_noinc)
4913static SV * DPPP_(my_newRV_noinc)(SV *sv);
4914static
4915#else
4916extern SV * DPPP_(my_newRV_noinc)(SV *sv);
4917#endif
4918
4919#ifdef newRV_noinc
4920# undef newRV_noinc
4921#endif
4922#define newRV_noinc(a) DPPP_(my_newRV_noinc)(aTHX_ a)
4923#define Perl_newRV_noinc DPPP_(my_newRV_noinc)
4924
4925#if defined(NEED_newRV_noinc) || defined(NEED_newRV_noinc_GLOBAL)
4926SV *
4927DPPP_(my_newRV_noinc)(SV *sv)
4928{
4929 SV *rv = (SV *)newRV(sv);
4930 SvREFCNT_dec(sv);
4931 return rv;
4932}
4933#endif
4934#endif
4935
4936/* Hint: newCONSTSUB
4937 * Returns a CV* as of perl-5.7.1. This return value is not supported
4938 * by Devel::PPPort.
4939 */
4940
4941/* newCONSTSUB from IO.xs is in the core starting with 5.004_63 */
4942#if (PERL_BCDVERSION < 0x5004063) && (PERL_BCDVERSION != 0x5004005)
4943#if defined(NEED_newCONSTSUB)
4944static void DPPP_(my_newCONSTSUB)(HV *stash, const char *name, SV *sv);
4945static
4946#else
4947extern void DPPP_(my_newCONSTSUB)(HV *stash, const char *name, SV *sv);
4948#endif
4949
4950#ifdef newCONSTSUB
4951# undef newCONSTSUB
4952#endif
4953#define newCONSTSUB(a,b,c) DPPP_(my_newCONSTSUB)(aTHX_ a,b,c)
4954#define Perl_newCONSTSUB DPPP_(my_newCONSTSUB)
4955
4956#if defined(NEED_newCONSTSUB) || defined(NEED_newCONSTSUB_GLOBAL)
4957
4958/* This is just a trick to avoid a dependency of newCONSTSUB on PL_parser */
4959/* (There's no PL_parser in perl < 5.005, so this is completely safe) */
4960#define D_PPP_PL_copline PL_copline
4961
4962void
4963DPPP_(my_newCONSTSUB)(HV *stash, const char *name, SV *sv)
4964{
4965 U32 oldhints = PL_hints;
4966 HV *old_cop_stash = PL_curcop->cop_stash;
4967 HV *old_curstash = PL_curstash;
4968 line_t oldline = PL_curcop->cop_line;
4969 PL_curcop->cop_line = D_PPP_PL_copline;
4970
4971 PL_hints &= ~HINT_BLOCK_SCOPE;
4972 if (stash)
4973 PL_curstash = PL_curcop->cop_stash = stash;
4974
4975 newSUB(
4976
4977#if (PERL_BCDVERSION < 0x5003022)
4978 start_subparse(),
4979#elif (PERL_BCDVERSION == 0x5003022)
4980 start_subparse(0),
4981#else /* 5.003_23 onwards */
4982 start_subparse(FALSE, 0),
4983#endif
4984
4985 newSVOP(OP_CONST, 0, newSVpv((char *) name, 0)),
4986 newSVOP(OP_CONST, 0, &PL_sv_no), /* SvPV(&PL_sv_no) == "" -- GMB */
4987 newSTATEOP(0, Nullch, newSVOP(OP_CONST, 0, sv))
4988 );
4989
4990 PL_hints = oldhints;
4991 PL_curcop->cop_stash = old_cop_stash;
4992 PL_curstash = old_curstash;
4993 PL_curcop->cop_line = oldline;
4994}
4995#endif
4996#endif
4997
4998/*
4999 * Boilerplate macros for initializing and accessing interpreter-local
5000 * data from C. All statics in extensions should be reworked to use
5001 * this, if you want to make the extension thread-safe. See ext/re/re.xs
5002 * for an example of the use of these macros.
5003 *
5004 * Code that uses these macros is responsible for the following:
5005 * 1. #define MY_CXT_KEY to a unique string, e.g. "DynaLoader_guts"
5006 * 2. Declare a typedef named my_cxt_t that is a structure that contains
5007 * all the data that needs to be interpreter-local.
5008 * 3. Use the START_MY_CXT macro after the declaration of my_cxt_t.
5009 * 4. Use the MY_CXT_INIT macro such that it is called exactly once
5010 * (typically put in the BOOT: section).
5011 * 5. Use the members of the my_cxt_t structure everywhere as
5012 * MY_CXT.member.
5013 * 6. Use the dMY_CXT macro (a declaration) in all the functions that
5014 * access MY_CXT.
5015 */
5016
5017#if defined(MULTIPLICITY) || defined(PERL_OBJECT) || \
5018 defined(PERL_CAPI) || defined(PERL_IMPLICIT_CONTEXT)
5019
5020#ifndef START_MY_CXT
5021
5022/* This must appear in all extensions that define a my_cxt_t structure,
5023 * right after the definition (i.e. at file scope). The non-threads
5024 * case below uses it to declare the data as static. */
5025#define START_MY_CXT
5026
5027#if (PERL_BCDVERSION < 0x5004068)
5028/* Fetches the SV that keeps the per-interpreter data. */
5029#define dMY_CXT_SV \
5030 SV *my_cxt_sv = get_sv(MY_CXT_KEY, FALSE)
5031#else /* >= perl5.004_68 */
5032#define dMY_CXT_SV \
5033 SV *my_cxt_sv = *hv_fetch(PL_modglobal, MY_CXT_KEY, \
5034 sizeof(MY_CXT_KEY)-1, TRUE)
5035#endif /* < perl5.004_68 */
5036
5037/* This declaration should be used within all functions that use the
5038 * interpreter-local data. */
5039#define dMY_CXT \
5040 dMY_CXT_SV; \
5041 my_cxt_t *my_cxtp = INT2PTR(my_cxt_t*,SvUV(my_cxt_sv))
5042
5043/* Creates and zeroes the per-interpreter data.
5044 * (We allocate my_cxtp in a Perl SV so that it will be released when
5045 * the interpreter goes away.) */
5046#define MY_CXT_INIT \
5047 dMY_CXT_SV; \
5048 /* newSV() allocates one more than needed */ \
5049 my_cxt_t *my_cxtp = (my_cxt_t*)SvPVX(newSV(sizeof(my_cxt_t)-1));\
5050 Zero(my_cxtp, 1, my_cxt_t); \
5051 sv_setuv(my_cxt_sv, PTR2UV(my_cxtp))
5052
5053/* This macro must be used to access members of the my_cxt_t structure.
5054 * e.g. MYCXT.some_data */
5055#define MY_CXT (*my_cxtp)
5056
5057/* Judicious use of these macros can reduce the number of times dMY_CXT
5058 * is used. Use is similar to pTHX, aTHX etc. */
5059#define pMY_CXT my_cxt_t *my_cxtp
5060#define pMY_CXT_ pMY_CXT,
5061#define _pMY_CXT ,pMY_CXT
5062#define aMY_CXT my_cxtp
5063#define aMY_CXT_ aMY_CXT,
5064#define _aMY_CXT ,aMY_CXT
5065
5066#endif /* START_MY_CXT */
5067
5068#ifndef MY_CXT_CLONE
5069/* Clones the per-interpreter data. */
5070#define MY_CXT_CLONE \
5071 dMY_CXT_SV; \
5072 my_cxt_t *my_cxtp = (my_cxt_t*)SvPVX(newSV(sizeof(my_cxt_t)-1));\
5073 Copy(INT2PTR(my_cxt_t*, SvUV(my_cxt_sv)), my_cxtp, 1, my_cxt_t);\
5074 sv_setuv(my_cxt_sv, PTR2UV(my_cxtp))
5075#endif
5076
5077#else /* single interpreter */
5078
5079#ifndef START_MY_CXT
5080
5081#define START_MY_CXT static my_cxt_t my_cxt;
5082#define dMY_CXT_SV dNOOP
5083#define dMY_CXT dNOOP
5084#define MY_CXT_INIT NOOP
5085#define MY_CXT my_cxt
5086
5087#define pMY_CXT void
5088#define pMY_CXT_
5089#define _pMY_CXT
5090#define aMY_CXT
5091#define aMY_CXT_
5092#define _aMY_CXT
5093
5094#endif /* START_MY_CXT */
5095
5096#ifndef MY_CXT_CLONE
5097#define MY_CXT_CLONE NOOP
5098#endif
5099
5100#endif
5101
5102#ifndef IVdf
5103# if IVSIZE == LONGSIZE
5104# define IVdf "ld"
5105# define UVuf "lu"
5106# define UVof "lo"
5107# define UVxf "lx"
5108# define UVXf "lX"
5109# elif IVSIZE == INTSIZE
5110# define IVdf "d"
5111# define UVuf "u"
5112# define UVof "o"
5113# define UVxf "x"
5114# define UVXf "X"
5115# else
5116# error "cannot define IV/UV formats"
5117# endif
5118#endif
5119
5120#ifndef NVef
5121# if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE) && \
5122 defined(PERL_PRIfldbl) && (PERL_BCDVERSION != 0x5006000)
5123 /* Not very likely, but let's try anyway. */
5124# define NVef PERL_PRIeldbl
5125# define NVff PERL_PRIfldbl
5126# define NVgf PERL_PRIgldbl
5127# else
5128# define NVef "e"
5129# define NVff "f"
5130# define NVgf "g"
5131# endif
5132#endif
5133
5134#ifndef SvREFCNT_inc
5135# ifdef PERL_USE_GCC_BRACE_GROUPS
5136# define SvREFCNT_inc(sv) \
5137 ({ \
5138 SV * const _sv = (SV*)(sv); \
5139 if (_sv) \
5140 (SvREFCNT(_sv))++; \
5141 _sv; \
5142 })
5143# else
5144# define SvREFCNT_inc(sv) \
5145 ((PL_Sv=(SV*)(sv)) ? (++(SvREFCNT(PL_Sv)),PL_Sv) : NULL)
5146# endif
5147#endif
5148
5149#ifndef SvREFCNT_inc_simple
5150# ifdef PERL_USE_GCC_BRACE_GROUPS
5151# define SvREFCNT_inc_simple(sv) \
5152 ({ \
5153 if (sv) \
5154 (SvREFCNT(sv))++; \
5155 (SV *)(sv); \
5156 })
5157# else
5158# define SvREFCNT_inc_simple(sv) \
5159 ((sv) ? (SvREFCNT(sv)++,(SV*)(sv)) : NULL)
5160# endif
5161#endif
5162
5163#ifndef SvREFCNT_inc_NN
5164# ifdef PERL_USE_GCC_BRACE_GROUPS
5165# define SvREFCNT_inc_NN(sv) \
5166 ({ \
5167 SV * const _sv = (SV*)(sv); \
5168 SvREFCNT(_sv)++; \
5169 _sv; \
5170 })
5171# else
5172# define SvREFCNT_inc_NN(sv) \
5173 (PL_Sv=(SV*)(sv),++(SvREFCNT(PL_Sv)),PL_Sv)
5174# endif
5175#endif
5176
5177#ifndef SvREFCNT_inc_void
5178# ifdef PERL_USE_GCC_BRACE_GROUPS
5179# define SvREFCNT_inc_void(sv) \
5180 ({ \
5181 SV * const _sv = (SV*)(sv); \
5182 if (_sv) \
5183 (void)(SvREFCNT(_sv)++); \
5184 })
5185# else
5186# define SvREFCNT_inc_void(sv) \
5187 (void)((PL_Sv=(SV*)(sv)) ? ++(SvREFCNT(PL_Sv)) : 0)
5188# endif
5189#endif
5190#ifndef SvREFCNT_inc_simple_void
5191# define SvREFCNT_inc_simple_void(sv) STMT_START { if (sv) SvREFCNT(sv)++; } STMT_END
5192#endif
5193
5194#ifndef SvREFCNT_inc_simple_NN
5195# define SvREFCNT_inc_simple_NN(sv) (++SvREFCNT(sv), (SV*)(sv))
5196#endif
5197
5198#ifndef SvREFCNT_inc_void_NN
5199# define SvREFCNT_inc_void_NN(sv) (void)(++SvREFCNT((SV*)(sv)))
5200#endif
5201
5202#ifndef SvREFCNT_inc_simple_void_NN
5203# define SvREFCNT_inc_simple_void_NN(sv) (void)(++SvREFCNT((SV*)(sv)))
5204#endif
5205
5206#ifndef newSV_type
5207
5208#if defined(NEED_newSV_type)
5209static SV* DPPP_(my_newSV_type)(pTHX_ svtype const t);
5210static
5211#else
5212extern SV* DPPP_(my_newSV_type)(pTHX_ svtype const t);
5213#endif
5214
5215#ifdef newSV_type
5216# undef newSV_type
5217#endif
5218#define newSV_type(a) DPPP_(my_newSV_type)(aTHX_ a)
5219#define Perl_newSV_type DPPP_(my_newSV_type)
5220
5221#if defined(NEED_newSV_type) || defined(NEED_newSV_type_GLOBAL)
5222
5223SV*
5224DPPP_(my_newSV_type)(pTHX_ svtype const t)
5225{
5226 SV* const sv = newSV(0);
5227 sv_upgrade(sv, t);
5228 return sv;
5229}
5230
5231#endif
5232
5233#endif
5234
5235#if (PERL_BCDVERSION < 0x5006000)
5236# define D_PPP_CONSTPV_ARG(x) ((char *) (x))
5237#else
5238# define D_PPP_CONSTPV_ARG(x) (x)
5239#endif
5240#ifndef newSVpvn
5241# define newSVpvn(data,len) ((data) \
5242 ? ((len) ? newSVpv((data), (len)) : newSVpv("", 0)) \
5243 : newSV(0))
5244#endif
5245#ifndef newSVpvn_utf8
5246# define newSVpvn_utf8(s, len, u) newSVpvn_flags((s), (len), (u) ? SVf_UTF8 : 0)
5247#endif
5248#ifndef SVf_UTF8
5249# define SVf_UTF8 0
5250#endif
5251
5252#ifndef newSVpvn_flags
5253
5254#if defined(NEED_newSVpvn_flags)
5255static SV * DPPP_(my_newSVpvn_flags)(pTHX_ const char *s, STRLEN len, U32 flags);
5256static
5257#else
5258extern SV * DPPP_(my_newSVpvn_flags)(pTHX_ const char *s, STRLEN len, U32 flags);
5259#endif
5260
5261#ifdef newSVpvn_flags
5262# undef newSVpvn_flags
5263#endif
5264#define newSVpvn_flags(a,b,c) DPPP_(my_newSVpvn_flags)(aTHX_ a,b,c)
5265#define Perl_newSVpvn_flags DPPP_(my_newSVpvn_flags)
5266
5267#if defined(NEED_newSVpvn_flags) || defined(NEED_newSVpvn_flags_GLOBAL)
5268
5269SV *
5270DPPP_(my_newSVpvn_flags)(pTHX_ const char *s, STRLEN len, U32 flags)
5271{
5272 SV *sv = newSVpvn(D_PPP_CONSTPV_ARG(s), len);
5273 SvFLAGS(sv) |= (flags & SVf_UTF8);
5274 return (flags & SVs_TEMP) ? sv_2mortal(sv) : sv;
5275}
5276
5277#endif
5278
5279#endif
5280
5281/* Backwards compatibility stuff... :-( */
5282#if !defined(NEED_sv_2pv_flags) && defined(NEED_sv_2pv_nolen)
5283# define NEED_sv_2pv_flags
5284#endif
5285#if !defined(NEED_sv_2pv_flags_GLOBAL) && defined(NEED_sv_2pv_nolen_GLOBAL)
5286# define NEED_sv_2pv_flags_GLOBAL
5287#endif
5288
5289/* Hint: sv_2pv_nolen
5290 * Use the SvPV_nolen() or SvPV_nolen_const() macros instead of sv_2pv_nolen().
5291 */
5292#ifndef sv_2pv_nolen
5293# define sv_2pv_nolen(sv) SvPV_nolen(sv)
5294#endif
5295
5296#ifdef SvPVbyte
5297
5298/* Hint: SvPVbyte
5299 * Does not work in perl-5.6.1, ppport.h implements a version
5300 * borrowed from perl-5.7.3.
5301 */
5302
5303#if (PERL_BCDVERSION < 0x5007000)
5304
5305#if defined(NEED_sv_2pvbyte)
5306static char * DPPP_(my_sv_2pvbyte)(pTHX_ SV *sv, STRLEN *lp);
5307static
5308#else
5309extern char * DPPP_(my_sv_2pvbyte)(pTHX_ SV *sv, STRLEN *lp);
5310#endif
5311
5312#ifdef sv_2pvbyte
5313# undef sv_2pvbyte
5314#endif
5315#define sv_2pvbyte(a,b) DPPP_(my_sv_2pvbyte)(aTHX_ a,b)
5316#define Perl_sv_2pvbyte DPPP_(my_sv_2pvbyte)
5317
5318#if defined(NEED_sv_2pvbyte) || defined(NEED_sv_2pvbyte_GLOBAL)
5319
5320char *
5321DPPP_(my_sv_2pvbyte)(pTHX_ SV *sv, STRLEN *lp)
5322{
5323 sv_utf8_downgrade(sv,0);
5324 return SvPV(sv,*lp);
5325}
5326
5327#endif
5328
5329/* Hint: sv_2pvbyte
5330 * Use the SvPVbyte() macro instead of sv_2pvbyte().
5331 */
5332
5333#undef SvPVbyte
5334
5335#define SvPVbyte(sv, lp) \
5336 ((SvFLAGS(sv) & (SVf_POK|SVf_UTF8)) == (SVf_POK) \
5337 ? ((lp = SvCUR(sv)), SvPVX(sv)) : sv_2pvbyte(sv, &lp))
5338
5339#endif
5340
5341#else
5342
5343# define SvPVbyte SvPV
5344# define sv_2pvbyte sv_2pv
5345
5346#endif
5347#ifndef sv_2pvbyte_nolen
5348# define sv_2pvbyte_nolen(sv) sv_2pv_nolen(sv)
5349#endif
5350
5351/* Hint: sv_pvn
5352 * Always use the SvPV() macro instead of sv_pvn().
5353 */
5354
5355/* Hint: sv_pvn_force
5356 * Always use the SvPV_force() macro instead of sv_pvn_force().
5357 */
5358
5359/* If these are undefined, they're not handled by the core anyway */
5360#ifndef SV_IMMEDIATE_UNREF
5361# define SV_IMMEDIATE_UNREF 0
5362#endif
5363
5364#ifndef SV_GMAGIC
5365# define SV_GMAGIC 0
5366#endif
5367
5368#ifndef SV_COW_DROP_PV
5369# define SV_COW_DROP_PV 0
5370#endif
5371
5372#ifndef SV_UTF8_NO_ENCODING
5373# define SV_UTF8_NO_ENCODING 0
5374#endif
5375
5376#ifndef SV_NOSTEAL
5377# define SV_NOSTEAL 0
5378#endif
5379
5380#ifndef SV_CONST_RETURN
5381# define SV_CONST_RETURN 0
5382#endif
5383
5384#ifndef SV_MUTABLE_RETURN
5385# define SV_MUTABLE_RETURN 0
5386#endif
5387
5388#ifndef SV_SMAGIC
5389# define SV_SMAGIC 0
5390#endif
5391
5392#ifndef SV_HAS_TRAILING_NUL
5393# define SV_HAS_TRAILING_NUL 0
5394#endif
5395
5396#ifndef SV_COW_SHARED_HASH_KEYS
5397# define SV_COW_SHARED_HASH_KEYS 0
5398#endif
5399
5400#if (PERL_BCDVERSION < 0x5007002)
5401
5402#if defined(NEED_sv_2pv_flags)
5403static char * DPPP_(my_sv_2pv_flags)(pTHX_ SV *sv, STRLEN *lp, I32 flags);
5404static
5405#else
5406extern char * DPPP_(my_sv_2pv_flags)(pTHX_ SV *sv, STRLEN *lp, I32 flags);
5407#endif
5408
5409#ifdef sv_2pv_flags
5410# undef sv_2pv_flags
5411#endif
5412#define sv_2pv_flags(a,b,c) DPPP_(my_sv_2pv_flags)(aTHX_ a,b,c)
5413#define Perl_sv_2pv_flags DPPP_(my_sv_2pv_flags)
5414
5415#if defined(NEED_sv_2pv_flags) || defined(NEED_sv_2pv_flags_GLOBAL)
5416
5417char *
5418DPPP_(my_sv_2pv_flags)(pTHX_ SV *sv, STRLEN *lp, I32 flags)
5419{
5420 STRLEN n_a = (STRLEN) flags;
5421 return sv_2pv(sv, lp ? lp : &n_a);
5422}
5423
5424#endif
5425
5426#if defined(NEED_sv_pvn_force_flags)
5427static char * DPPP_(my_sv_pvn_force_flags)(pTHX_ SV *sv, STRLEN *lp, I32 flags);
5428static
5429#else
5430extern char * DPPP_(my_sv_pvn_force_flags)(pTHX_ SV *sv, STRLEN *lp, I32 flags);
5431#endif
5432
5433#ifdef sv_pvn_force_flags
5434# undef sv_pvn_force_flags
5435#endif
5436#define sv_pvn_force_flags(a,b,c) DPPP_(my_sv_pvn_force_flags)(aTHX_ a,b,c)
5437#define Perl_sv_pvn_force_flags DPPP_(my_sv_pvn_force_flags)
5438
5439#if defined(NEED_sv_pvn_force_flags) || defined(NEED_sv_pvn_force_flags_GLOBAL)
5440
5441char *
5442DPPP_(my_sv_pvn_force_flags)(pTHX_ SV *sv, STRLEN *lp, I32 flags)
5443{
5444 STRLEN n_a = (STRLEN) flags;
5445 return sv_pvn_force(sv, lp ? lp : &n_a);
5446}
5447
5448#endif
5449
5450#endif
5451
5452#if (PERL_BCDVERSION < 0x5008008) || ( (PERL_BCDVERSION >= 0x5009000) && (PERL_BCDVERSION < 0x5009003) )
5453# define DPPP_SVPV_NOLEN_LP_ARG &PL_na
5454#else
5455# define DPPP_SVPV_NOLEN_LP_ARG 0
5456#endif
5457#ifndef SvPV_const
5458# define SvPV_const(sv, lp) SvPV_flags_const(sv, lp, SV_GMAGIC)
5459#endif
5460
5461#ifndef SvPV_mutable
5462# define SvPV_mutable(sv, lp) SvPV_flags_mutable(sv, lp, SV_GMAGIC)
5463#endif
5464#ifndef SvPV_flags
5465# define SvPV_flags(sv, lp, flags) \
5466 ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
5467 ? ((lp = SvCUR(sv)), SvPVX(sv)) : sv_2pv_flags(sv, &lp, flags))
5468#endif
5469#ifndef SvPV_flags_const
5470# define SvPV_flags_const(sv, lp, flags) \
5471 ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
5472 ? ((lp = SvCUR(sv)), SvPVX_const(sv)) : \
5473 (const char*) sv_2pv_flags(sv, &lp, flags|SV_CONST_RETURN))
5474#endif
5475#ifndef SvPV_flags_const_nolen
5476# define SvPV_flags_const_nolen(sv, flags) \
5477 ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
5478 ? SvPVX_const(sv) : \
5479 (const char*) sv_2pv_flags(sv, DPPP_SVPV_NOLEN_LP_ARG, flags|SV_CONST_RETURN))
5480#endif
5481#ifndef SvPV_flags_mutable
5482# define SvPV_flags_mutable(sv, lp, flags) \
5483 ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
5484 ? ((lp = SvCUR(sv)), SvPVX_mutable(sv)) : \
5485 sv_2pv_flags(sv, &lp, flags|SV_MUTABLE_RETURN))
5486#endif
5487#ifndef SvPV_force
5488# define SvPV_force(sv, lp) SvPV_force_flags(sv, lp, SV_GMAGIC)
5489#endif
5490
5491#ifndef SvPV_force_nolen
5492# define SvPV_force_nolen(sv) SvPV_force_flags_nolen(sv, SV_GMAGIC)
5493#endif
5494
5495#ifndef SvPV_force_mutable
5496# define SvPV_force_mutable(sv, lp) SvPV_force_flags_mutable(sv, lp, SV_GMAGIC)
5497#endif
5498
5499#ifndef SvPV_force_nomg
5500# define SvPV_force_nomg(sv, lp) SvPV_force_flags(sv, lp, 0)
5501#endif
5502
5503#ifndef SvPV_force_nomg_nolen
5504# define SvPV_force_nomg_nolen(sv) SvPV_force_flags_nolen(sv, 0)
5505#endif
5506#ifndef SvPV_force_flags
5507# define SvPV_force_flags(sv, lp, flags) \
5508 ((SvFLAGS(sv) & (SVf_POK|SVf_THINKFIRST)) == SVf_POK \
5509 ? ((lp = SvCUR(sv)), SvPVX(sv)) : sv_pvn_force_flags(sv, &lp, flags))
5510#endif
5511#ifndef SvPV_force_flags_nolen
5512# define SvPV_force_flags_nolen(sv, flags) \
5513 ((SvFLAGS(sv) & (SVf_POK|SVf_THINKFIRST)) == SVf_POK \
5514 ? SvPVX(sv) : sv_pvn_force_flags(sv, DPPP_SVPV_NOLEN_LP_ARG, flags))
5515#endif
5516#ifndef SvPV_force_flags_mutable
5517# define SvPV_force_flags_mutable(sv, lp, flags) \
5518 ((SvFLAGS(sv) & (SVf_POK|SVf_THINKFIRST)) == SVf_POK \
5519 ? ((lp = SvCUR(sv)), SvPVX_mutable(sv)) \
5520 : sv_pvn_force_flags(sv, &lp, flags|SV_MUTABLE_RETURN))
5521#endif
5522#ifndef SvPV_nolen
5523# define SvPV_nolen(sv) \
5524 ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
5525 ? SvPVX(sv) : sv_2pv_flags(sv, DPPP_SVPV_NOLEN_LP_ARG, SV_GMAGIC))
5526#endif
5527#ifndef SvPV_nolen_const
5528# define SvPV_nolen_const(sv) \
5529 ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
5530 ? SvPVX_const(sv) : sv_2pv_flags(sv, DPPP_SVPV_NOLEN_LP_ARG, SV_GMAGIC|SV_CONST_RETURN))
5531#endif
5532#ifndef SvPV_nomg
5533# define SvPV_nomg(sv, lp) SvPV_flags(sv, lp, 0)
5534#endif
5535
5536#ifndef SvPV_nomg_const
5537# define SvPV_nomg_const(sv, lp) SvPV_flags_const(sv, lp, 0)
5538#endif
5539
5540#ifndef SvPV_nomg_const_nolen
5541# define SvPV_nomg_const_nolen(sv) SvPV_flags_const_nolen(sv, 0)
5542#endif
5543
5544#ifndef SvPV_nomg_nolen
5545# define SvPV_nomg_nolen(sv) ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
5546 ? SvPVX(sv) : sv_2pv_flags(sv, DPPP_SVPV_NOLEN_LP_ARG, 0))
5547#endif
5548#ifndef SvPV_renew
5549# define SvPV_renew(sv,n) STMT_START { SvLEN_set(sv, n); \
5550 SvPV_set((sv), (char *) saferealloc( \
5551 (Malloc_t)SvPVX(sv), (MEM_SIZE)((n)))); \
5552 } STMT_END
5553#endif
5554#ifndef SvMAGIC_set
5555# define SvMAGIC_set(sv, val) \
5556 STMT_START { assert(SvTYPE(sv) >= SVt_PVMG); \
5557 (((XPVMG*) SvANY(sv))->xmg_magic = (val)); } STMT_END
5558#endif
5559
5560#if (PERL_BCDVERSION < 0x5009003)
5561#ifndef SvPVX_const
5562# define SvPVX_const(sv) ((const char*) (0 + SvPVX(sv)))
5563#endif
5564
5565#ifndef SvPVX_mutable
5566# define SvPVX_mutable(sv) (0 + SvPVX(sv))
5567#endif
5568#ifndef SvRV_set
5569# define SvRV_set(sv, val) \
5570 STMT_START { assert(SvTYPE(sv) >= SVt_RV); \
5571 (((XRV*) SvANY(sv))->xrv_rv = (val)); } STMT_END
5572#endif
5573
5574#else
5575#ifndef SvPVX_const
5576# define SvPVX_const(sv) ((const char*)((sv)->sv_u.svu_pv))
5577#endif
5578
5579#ifndef SvPVX_mutable
5580# define SvPVX_mutable(sv) ((sv)->sv_u.svu_pv)
5581#endif
5582#ifndef SvRV_set
5583# define SvRV_set(sv, val) \
5584 STMT_START { assert(SvTYPE(sv) >= SVt_RV); \
5585 ((sv)->sv_u.svu_rv = (val)); } STMT_END
5586#endif
5587
5588#endif
5589#ifndef SvSTASH_set
5590# define SvSTASH_set(sv, val) \
5591 STMT_START { assert(SvTYPE(sv) >= SVt_PVMG); \
5592 (((XPVMG*) SvANY(sv))->xmg_stash = (val)); } STMT_END
5593#endif
5594
5595#if (PERL_BCDVERSION < 0x5004000)
5596#ifndef SvUV_set
5597# define SvUV_set(sv, val) \
5598 STMT_START { assert(SvTYPE(sv) == SVt_IV || SvTYPE(sv) >= SVt_PVIV); \
5599 (((XPVIV*) SvANY(sv))->xiv_iv = (IV) (val)); } STMT_END
5600#endif
5601
5602#else
5603#ifndef SvUV_set
5604# define SvUV_set(sv, val) \
5605 STMT_START { assert(SvTYPE(sv) == SVt_IV || SvTYPE(sv) >= SVt_PVIV); \
5606 (((XPVUV*) SvANY(sv))->xuv_uv = (val)); } STMT_END
5607#endif
5608
5609#endif
5610
5611#if (PERL_BCDVERSION >= 0x5004000) && !defined(vnewSVpvf)
5612#if defined(NEED_vnewSVpvf)
5613static SV * DPPP_(my_vnewSVpvf)(pTHX_ const char *pat, va_list *args);
5614static
5615#else
5616extern SV * DPPP_(my_vnewSVpvf)(pTHX_ const char *pat, va_list *args);
5617#endif
5618
5619#ifdef vnewSVpvf
5620# undef vnewSVpvf
5621#endif
5622#define vnewSVpvf(a,b) DPPP_(my_vnewSVpvf)(aTHX_ a,b)
5623#define Perl_vnewSVpvf DPPP_(my_vnewSVpvf)
5624
5625#if defined(NEED_vnewSVpvf) || defined(NEED_vnewSVpvf_GLOBAL)
5626
5627SV *
5628DPPP_(my_vnewSVpvf)(pTHX_ const char *pat, va_list *args)
5629{
5630 register SV *sv = newSV(0);
5631 sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*));
5632 return sv;
5633}
5634
5635#endif
5636#endif
5637
5638#if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_vcatpvf)
5639# define sv_vcatpvf(sv, pat, args) sv_vcatpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*))
5640#endif
5641
5642#if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_vsetpvf)
5643# define sv_vsetpvf(sv, pat, args) sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*))
5644#endif
5645
5646#if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_catpvf_mg)
5647#if defined(NEED_sv_catpvf_mg)
5648static void DPPP_(my_sv_catpvf_mg)(pTHX_ SV *sv, const char *pat, ...);
5649static
5650#else
5651extern void DPPP_(my_sv_catpvf_mg)(pTHX_ SV *sv, const char *pat, ...);
5652#endif
5653
5654#define Perl_sv_catpvf_mg DPPP_(my_sv_catpvf_mg)
5655
5656#if defined(NEED_sv_catpvf_mg) || defined(NEED_sv_catpvf_mg_GLOBAL)
5657
5658void
5659DPPP_(my_sv_catpvf_mg)(pTHX_ SV *sv, const char *pat, ...)
5660{
5661 va_list args;
5662 va_start(args, pat);
5663 sv_vcatpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*));
5664 SvSETMAGIC(sv);
5665 va_end(args);
5666}
5667
5668#endif
5669#endif
5670
5671#ifdef PERL_IMPLICIT_CONTEXT
5672#if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_catpvf_mg_nocontext)
5673#if defined(NEED_sv_catpvf_mg_nocontext)
5674static void DPPP_(my_sv_catpvf_mg_nocontext)(SV *sv, const char *pat, ...);
5675static
5676#else
5677extern void DPPP_(my_sv_catpvf_mg_nocontext)(SV *sv, const char *pat, ...);
5678#endif
5679
5680#define sv_catpvf_mg_nocontext DPPP_(my_sv_catpvf_mg_nocontext)
5681#define Perl_sv_catpvf_mg_nocontext DPPP_(my_sv_catpvf_mg_nocontext)
5682
5683#if defined(NEED_sv_catpvf_mg_nocontext) || defined(NEED_sv_catpvf_mg_nocontext_GLOBAL)
5684
5685void
5686DPPP_(my_sv_catpvf_mg_nocontext)(SV *sv, const char *pat, ...)
5687{
5688 dTHX;
5689 va_list args;
5690 va_start(args, pat);
5691 sv_vcatpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*));
5692 SvSETMAGIC(sv);
5693 va_end(args);
5694}
5695
5696#endif
5697#endif
5698#endif
5699
5700/* sv_catpvf_mg depends on sv_catpvf_mg_nocontext */
5701#ifndef sv_catpvf_mg
5702# ifdef PERL_IMPLICIT_CONTEXT
5703# define sv_catpvf_mg Perl_sv_catpvf_mg_nocontext
5704# else
5705# define sv_catpvf_mg Perl_sv_catpvf_mg
5706# endif
5707#endif
5708
5709#if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_vcatpvf_mg)
5710# define sv_vcatpvf_mg(sv, pat, args) \
5711 STMT_START { \
5712 sv_vcatpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*)); \
5713 SvSETMAGIC(sv); \
5714 } STMT_END
5715#endif
5716
5717#if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_setpvf_mg)
5718#if defined(NEED_sv_setpvf_mg)
5719static void DPPP_(my_sv_setpvf_mg)(pTHX_ SV *sv, const char *pat, ...);
5720static
5721#else
5722extern void DPPP_(my_sv_setpvf_mg)(pTHX_ SV *sv, const char *pat, ...);
5723#endif
5724
5725#define Perl_sv_setpvf_mg DPPP_(my_sv_setpvf_mg)
5726
5727#if defined(NEED_sv_setpvf_mg) || defined(NEED_sv_setpvf_mg_GLOBAL)
5728
5729void
5730DPPP_(my_sv_setpvf_mg)(pTHX_ SV *sv, const char *pat, ...)
5731{
5732 va_list args;
5733 va_start(args, pat);
5734 sv_vsetpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*));
5735 SvSETMAGIC(sv);
5736 va_end(args);
5737}
5738
5739#endif
5740#endif
5741
5742#ifdef PERL_IMPLICIT_CONTEXT
5743#if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_setpvf_mg_nocontext)
5744#if defined(NEED_sv_setpvf_mg_nocontext)
5745static void DPPP_(my_sv_setpvf_mg_nocontext)(SV *sv, const char *pat, ...);
5746static
5747#else
5748extern void DPPP_(my_sv_setpvf_mg_nocontext)(SV *sv, const char *pat, ...);
5749#endif
5750
5751#define sv_setpvf_mg_nocontext DPPP_(my_sv_setpvf_mg_nocontext)
5752#define Perl_sv_setpvf_mg_nocontext DPPP_(my_sv_setpvf_mg_nocontext)
5753
5754#if defined(NEED_sv_setpvf_mg_nocontext) || defined(NEED_sv_setpvf_mg_nocontext_GLOBAL)
5755
5756void
5757DPPP_(my_sv_setpvf_mg_nocontext)(SV *sv, const char *pat, ...)
5758{
5759 dTHX;
5760 va_list args;
5761 va_start(args, pat);
5762 sv_vsetpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*));
5763 SvSETMAGIC(sv);
5764 va_end(args);
5765}
5766
5767#endif
5768#endif
5769#endif
5770
5771/* sv_setpvf_mg depends on sv_setpvf_mg_nocontext */
5772#ifndef sv_setpvf_mg
5773# ifdef PERL_IMPLICIT_CONTEXT
5774# define sv_setpvf_mg Perl_sv_setpvf_mg_nocontext
5775# else
5776# define sv_setpvf_mg Perl_sv_setpvf_mg
5777# endif
5778#endif
5779
5780#if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_vsetpvf_mg)
5781# define sv_vsetpvf_mg(sv, pat, args) \
5782 STMT_START { \
5783 sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*)); \
5784 SvSETMAGIC(sv); \
5785 } STMT_END
5786#endif
5787
5788/* Hint: newSVpvn_share
5789 * The SVs created by this function only mimic the behaviour of
5790 * shared PVs without really being shared. Only use if you know
5791 * what you're doing.
5792 */
5793
5794#ifndef newSVpvn_share
5795
5796#if defined(NEED_newSVpvn_share)
5797static SV * DPPP_(my_newSVpvn_share)(pTHX_ const char *src, I32 len, U32 hash);
5798static
5799#else
5800extern SV * DPPP_(my_newSVpvn_share)(pTHX_ const char *src, I32 len, U32 hash);
5801#endif
5802
5803#ifdef newSVpvn_share
5804# undef newSVpvn_share
5805#endif
5806#define newSVpvn_share(a,b,c) DPPP_(my_newSVpvn_share)(aTHX_ a,b,c)
5807#define Perl_newSVpvn_share DPPP_(my_newSVpvn_share)
5808
5809#if defined(NEED_newSVpvn_share) || defined(NEED_newSVpvn_share_GLOBAL)
5810
5811SV *
5812DPPP_(my_newSVpvn_share)(pTHX_ const char *src, I32 len, U32 hash)
5813{
5814 SV *sv;
5815 if (len < 0)
5816 len = -len;
5817 if (!hash)
5818 PERL_HASH(hash, (char*) src, len);
5819 sv = newSVpvn((char *) src, len);
5820 sv_upgrade(sv, SVt_PVIV);
5821 SvIVX(sv) = hash;
5822 SvREADONLY_on(sv);
5823 SvPOK_on(sv);
5824 return sv;
5825}
5826
5827#endif
5828
5829#endif
5830#ifndef SvSHARED_HASH
5831# define SvSHARED_HASH(sv) (0 + SvUVX(sv))
5832#endif
5833#ifndef HvNAME_get
5834# define HvNAME_get(hv) HvNAME(hv)
5835#endif
5836#ifndef HvNAMELEN_get
5837# define HvNAMELEN_get(hv) (HvNAME_get(hv) ? (I32)strlen(HvNAME_get(hv)) : 0)
5838#endif
5839#ifndef GvSVn
5840# define GvSVn(gv) GvSV(gv)
5841#endif
5842
5843#ifndef isGV_with_GP
5844# define isGV_with_GP(gv) isGV(gv)
5845#endif
5846
5847#ifndef gv_fetchpvn_flags
5848# define gv_fetchpvn_flags(name, len, flags, svt) gv_fetchpv(name, flags, svt)
5849#endif
5850
5851#ifndef gv_fetchsv
5852# define gv_fetchsv(name, flags, svt) gv_fetchpv(SvPV_nolen_const(name), flags, svt)
5853#endif
5854#ifndef get_cvn_flags
5855# define get_cvn_flags(name, namelen, flags) get_cv(name, flags)
5856#endif
5857#ifndef WARN_ALL
5858# define WARN_ALL 0
5859#endif
5860
5861#ifndef WARN_CLOSURE
5862# define WARN_CLOSURE 1
5863#endif
5864
5865#ifndef WARN_DEPRECATED
5866# define WARN_DEPRECATED 2
5867#endif
5868
5869#ifndef WARN_EXITING
5870# define WARN_EXITING 3
5871#endif
5872
5873#ifndef WARN_GLOB
5874# define WARN_GLOB 4
5875#endif
5876
5877#ifndef WARN_IO
5878# define WARN_IO 5
5879#endif
5880
5881#ifndef WARN_CLOSED
5882# define WARN_CLOSED 6
5883#endif
5884
5885#ifndef WARN_EXEC
5886# define WARN_EXEC 7
5887#endif
5888
5889#ifndef WARN_LAYER
5890# define WARN_LAYER 8
5891#endif
5892
5893#ifndef WARN_NEWLINE
5894# define WARN_NEWLINE 9
5895#endif
5896
5897#ifndef WARN_PIPE
5898# define WARN_PIPE 10
5899#endif
5900
5901#ifndef WARN_UNOPENED
5902# define WARN_UNOPENED 11
5903#endif
5904
5905#ifndef WARN_MISC
5906# define WARN_MISC 12
5907#endif
5908
5909#ifndef WARN_NUMERIC
5910# define WARN_NUMERIC 13
5911#endif
5912
5913#ifndef WARN_ONCE
5914# define WARN_ONCE 14
5915#endif
5916
5917#ifndef WARN_OVERFLOW
5918# define WARN_OVERFLOW 15
5919#endif
5920
5921#ifndef WARN_PACK
5922# define WARN_PACK 16
5923#endif
5924
5925#ifndef WARN_PORTABLE
5926# define WARN_PORTABLE 17
5927#endif
5928
5929#ifndef WARN_RECURSION
5930# define WARN_RECURSION 18
5931#endif
5932
5933#ifndef WARN_REDEFINE
5934# define WARN_REDEFINE 19
5935#endif
5936
5937#ifndef WARN_REGEXP
5938# define WARN_REGEXP 20
5939#endif
5940
5941#ifndef WARN_SEVERE
5942# define WARN_SEVERE 21
5943#endif
5944
5945#ifndef WARN_DEBUGGING
5946# define WARN_DEBUGGING 22
5947#endif
5948
5949#ifndef WARN_INPLACE
5950# define WARN_INPLACE 23
5951#endif
5952
5953#ifndef WARN_INTERNAL
5954# define WARN_INTERNAL 24
5955#endif
5956
5957#ifndef WARN_MALLOC
5958# define WARN_MALLOC 25
5959#endif
5960
5961#ifndef WARN_SIGNAL
5962# define WARN_SIGNAL 26
5963#endif
5964
5965#ifndef WARN_SUBSTR
5966# define WARN_SUBSTR 27
5967#endif
5968
5969#ifndef WARN_SYNTAX
5970# define WARN_SYNTAX 28
5971#endif
5972
5973#ifndef WARN_AMBIGUOUS
5974# define WARN_AMBIGUOUS 29
5975#endif
5976
5977#ifndef WARN_BAREWORD
5978# define WARN_BAREWORD 30
5979#endif
5980
5981#ifndef WARN_DIGIT
5982# define WARN_DIGIT 31
5983#endif
5984
5985#ifndef WARN_PARENTHESIS
5986# define WARN_PARENTHESIS 32
5987#endif
5988
5989#ifndef WARN_PRECEDENCE
5990# define WARN_PRECEDENCE 33
5991#endif
5992
5993#ifndef WARN_PRINTF
5994# define WARN_PRINTF 34
5995#endif
5996
5997#ifndef WARN_PROTOTYPE
5998# define WARN_PROTOTYPE 35
5999#endif
6000
6001#ifndef WARN_QW
6002# define WARN_QW 36
6003#endif
6004
6005#ifndef WARN_RESERVED
6006# define WARN_RESERVED 37
6007#endif
6008
6009#ifndef WARN_SEMICOLON
6010# define WARN_SEMICOLON 38
6011#endif
6012
6013#ifndef WARN_TAINT
6014# define WARN_TAINT 39
6015#endif
6016
6017#ifndef WARN_THREADS
6018# define WARN_THREADS 40
6019#endif
6020
6021#ifndef WARN_UNINITIALIZED
6022# define WARN_UNINITIALIZED 41
6023#endif
6024
6025#ifndef WARN_UNPACK
6026# define WARN_UNPACK 42
6027#endif
6028
6029#ifndef WARN_UNTIE
6030# define WARN_UNTIE 43
6031#endif
6032
6033#ifndef WARN_UTF8
6034# define WARN_UTF8 44
6035#endif
6036
6037#ifndef WARN_VOID
6038# define WARN_VOID 45
6039#endif
6040
6041#ifndef WARN_ASSERTIONS
6042# define WARN_ASSERTIONS 46
6043#endif
6044#ifndef packWARN
6045# define packWARN(a) (a)
6046#endif
6047
6048#ifndef ckWARN
6049# ifdef G_WARN_ON
6050# define ckWARN(a) (PL_dowarn & G_WARN_ON)
6051# else
6052# define ckWARN(a) PL_dowarn
6053# endif
6054#endif
6055
6056#if (PERL_BCDVERSION >= 0x5004000) && !defined(warner)
6057#if defined(NEED_warner)
6058static void DPPP_(my_warner)(U32 err, const char *pat, ...);
6059static
6060#else
6061extern void DPPP_(my_warner)(U32 err, const char *pat, ...);
6062#endif
6063
6064#define Perl_warner DPPP_(my_warner)
6065
6066#if defined(NEED_warner) || defined(NEED_warner_GLOBAL)
6067
6068void
6069DPPP_(my_warner)(U32 err, const char *pat, ...)
6070{
6071 SV *sv;
6072 va_list args;
6073
6074 PERL_UNUSED_ARG(err);
6075
6076 va_start(args, pat);
6077 sv = vnewSVpvf(pat, &args);
6078 va_end(args);
6079 sv_2mortal(sv);
6080 warn("%s", SvPV_nolen(sv));
6081}
6082
6083#define warner Perl_warner
6084
6085#define Perl_warner_nocontext Perl_warner
6086
6087#endif
6088#endif
6089
6090/* concatenating with "" ensures that only literal strings are accepted as argument
6091 * note that STR_WITH_LEN() can't be used as argument to macros or functions that
6092 * under some configurations might be macros
6093 */
6094#ifndef STR_WITH_LEN
6095# define STR_WITH_LEN(s) (s ""), (sizeof(s)-1)
6096#endif
6097#ifndef newSVpvs
6098# define newSVpvs(str) newSVpvn(str "", sizeof(str) - 1)
6099#endif
6100
6101#ifndef newSVpvs_flags
6102# define newSVpvs_flags(str, flags) newSVpvn_flags(str "", sizeof(str) - 1, flags)
6103#endif
6104
6105#ifndef newSVpvs_share
6106# define newSVpvs_share(str) newSVpvn_share(str "", sizeof(str) - 1, 0)
6107#endif
6108
6109#ifndef sv_catpvs
6110# define sv_catpvs(sv, str) sv_catpvn(sv, str "", sizeof(str) - 1)
6111#endif
6112
6113#ifndef sv_setpvs
6114# define sv_setpvs(sv, str) sv_setpvn(sv, str "", sizeof(str) - 1)
6115#endif
6116
6117#ifndef hv_fetchs
6118# define hv_fetchs(hv, key, lval) hv_fetch(hv, key "", sizeof(key) - 1, lval)
6119#endif
6120
6121#ifndef hv_stores
6122# define hv_stores(hv, key, val) hv_store(hv, key "", sizeof(key) - 1, val, 0)
6123#endif
6124#ifndef gv_fetchpvs
6125# define gv_fetchpvs(name, flags, svt) gv_fetchpvn_flags(name "", sizeof(name) - 1, flags, svt)
6126#endif
6127
6128#ifndef gv_stashpvs
6129# define gv_stashpvs(name, flags) gv_stashpvn(name "", sizeof(name) - 1, flags)
6130#endif
6131#ifndef get_cvs
6132# define get_cvs(name, flags) get_cvn_flags(name "", sizeof(name)-1, flags)
6133#endif
6134#ifndef SvGETMAGIC
6135# define SvGETMAGIC(x) STMT_START { if (SvGMAGICAL(x)) mg_get(x); } STMT_END
6136#endif
6137
6138/* Some random bits for sv_unmagicext. These should probably be pulled in for
6139 real and organized at some point */
6140#ifndef HEf_SVKEY
6141# define HEf_SVKEY -2
6142#endif
6143
6144#if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN)
6145# define MUTABLE_PTR(p) ({ void *_p = (p); _p; })
6146#else
6147# define MUTABLE_PTR(p) ((void *) (p))
6148#endif
6149
6150#define MUTABLE_SV(p) ((SV *)MUTABLE_PTR(p))
6151
6152/* end of random bits */
6153#ifndef PERL_MAGIC_sv
6154# define PERL_MAGIC_sv '\0'
6155#endif
6156
6157#ifndef PERL_MAGIC_overload
6158# define PERL_MAGIC_overload 'A'
6159#endif
6160
6161#ifndef PERL_MAGIC_overload_elem
6162# define PERL_MAGIC_overload_elem 'a'
6163#endif
6164
6165#ifndef PERL_MAGIC_overload_table
6166# define PERL_MAGIC_overload_table 'c'
6167#endif
6168
6169#ifndef PERL_MAGIC_bm
6170# define PERL_MAGIC_bm 'B'
6171#endif
6172
6173#ifndef PERL_MAGIC_regdata
6174# define PERL_MAGIC_regdata 'D'
6175#endif
6176
6177#ifndef PERL_MAGIC_regdatum
6178# define PERL_MAGIC_regdatum 'd'
6179#endif
6180
6181#ifndef PERL_MAGIC_env
6182# define PERL_MAGIC_env 'E'
6183#endif
6184
6185#ifndef PERL_MAGIC_envelem
6186# define PERL_MAGIC_envelem 'e'
6187#endif
6188
6189#ifndef PERL_MAGIC_fm
6190# define PERL_MAGIC_fm 'f'
6191#endif
6192
6193#ifndef PERL_MAGIC_regex_global
6194# define PERL_MAGIC_regex_global 'g'
6195#endif
6196
6197#ifndef PERL_MAGIC_isa
6198# define PERL_MAGIC_isa 'I'
6199#endif
6200
6201#ifndef PERL_MAGIC_isaelem
6202# define PERL_MAGIC_isaelem 'i'
6203#endif
6204
6205#ifndef PERL_MAGIC_nkeys
6206# define PERL_MAGIC_nkeys 'k'
6207#endif
6208
6209#ifndef PERL_MAGIC_dbfile
6210# define PERL_MAGIC_dbfile 'L'
6211#endif
6212
6213#ifndef PERL_MAGIC_dbline
6214# define PERL_MAGIC_dbline 'l'
6215#endif
6216
6217#ifndef PERL_MAGIC_mutex
6218# define PERL_MAGIC_mutex 'm'
6219#endif
6220
6221#ifndef PERL_MAGIC_shared
6222# define PERL_MAGIC_shared 'N'
6223#endif
6224
6225#ifndef PERL_MAGIC_shared_scalar
6226# define PERL_MAGIC_shared_scalar 'n'
6227#endif
6228
6229#ifndef PERL_MAGIC_collxfrm
6230# define PERL_MAGIC_collxfrm 'o'
6231#endif
6232
6233#ifndef PERL_MAGIC_tied
6234# define PERL_MAGIC_tied 'P'
6235#endif
6236
6237#ifndef PERL_MAGIC_tiedelem
6238# define PERL_MAGIC_tiedelem 'p'
6239#endif
6240
6241#ifndef PERL_MAGIC_tiedscalar
6242# define PERL_MAGIC_tiedscalar 'q'
6243#endif
6244
6245#ifndef PERL_MAGIC_qr
6246# define PERL_MAGIC_qr 'r'
6247#endif
6248
6249#ifndef PERL_MAGIC_sig
6250# define PERL_MAGIC_sig 'S'
6251#endif
6252
6253#ifndef PERL_MAGIC_sigelem
6254# define PERL_MAGIC_sigelem 's'
6255#endif
6256
6257#ifndef PERL_MAGIC_taint
6258# define PERL_MAGIC_taint 't'
6259#endif
6260
6261#ifndef PERL_MAGIC_uvar
6262# define PERL_MAGIC_uvar 'U'
6263#endif
6264
6265#ifndef PERL_MAGIC_uvar_elem
6266# define PERL_MAGIC_uvar_elem 'u'
6267#endif
6268
6269#ifndef PERL_MAGIC_vstring
6270# define PERL_MAGIC_vstring 'V'
6271#endif
6272
6273#ifndef PERL_MAGIC_vec
6274# define PERL_MAGIC_vec 'v'
6275#endif
6276
6277#ifndef PERL_MAGIC_utf8
6278# define PERL_MAGIC_utf8 'w'
6279#endif
6280
6281#ifndef PERL_MAGIC_substr
6282# define PERL_MAGIC_substr 'x'
6283#endif
6284
6285#ifndef PERL_MAGIC_defelem
6286# define PERL_MAGIC_defelem 'y'
6287#endif
6288
6289#ifndef PERL_MAGIC_glob
6290# define PERL_MAGIC_glob '*'
6291#endif
6292
6293#ifndef PERL_MAGIC_arylen
6294# define PERL_MAGIC_arylen '#'
6295#endif
6296
6297#ifndef PERL_MAGIC_pos
6298# define PERL_MAGIC_pos '.'
6299#endif
6300
6301#ifndef PERL_MAGIC_backref
6302# define PERL_MAGIC_backref '<'
6303#endif
6304
6305#ifndef PERL_MAGIC_ext
6306# define PERL_MAGIC_ext '~'
6307#endif
6308
6309/* That's the best we can do... */
6310#ifndef sv_catpvn_nomg
6311# define sv_catpvn_nomg sv_catpvn
6312#endif
6313
6314#ifndef sv_catsv_nomg
6315# define sv_catsv_nomg sv_catsv
6316#endif
6317
6318#ifndef sv_setsv_nomg
6319# define sv_setsv_nomg sv_setsv
6320#endif
6321
6322#ifndef sv_pvn_nomg
6323# define sv_pvn_nomg sv_pvn
6324#endif
6325
6326#ifndef SvIV_nomg
6327# define SvIV_nomg SvIV
6328#endif
6329
6330#ifndef SvUV_nomg
6331# define SvUV_nomg SvUV
6332#endif
6333
6334#ifndef sv_catpv_mg
6335# define sv_catpv_mg(sv, ptr) \
6336 STMT_START { \
6337 SV *TeMpSv = sv; \
6338 sv_catpv(TeMpSv,ptr); \
6339 SvSETMAGIC(TeMpSv); \
6340 } STMT_END
6341#endif
6342
6343#ifndef sv_catpvn_mg
6344# define sv_catpvn_mg(sv, ptr, len) \
6345 STMT_START { \
6346 SV *TeMpSv = sv; \
6347 sv_catpvn(TeMpSv,ptr,len); \
6348 SvSETMAGIC(TeMpSv); \
6349 } STMT_END
6350#endif
6351
6352#ifndef sv_catsv_mg
6353# define sv_catsv_mg(dsv, ssv) \
6354 STMT_START { \
6355 SV *TeMpSv = dsv; \
6356 sv_catsv(TeMpSv,ssv); \
6357 SvSETMAGIC(TeMpSv); \
6358 } STMT_END
6359#endif
6360
6361#ifndef sv_setiv_mg
6362# define sv_setiv_mg(sv, i) \
6363 STMT_START { \
6364 SV *TeMpSv = sv; \
6365 sv_setiv(TeMpSv,i); \
6366 SvSETMAGIC(TeMpSv); \
6367 } STMT_END
6368#endif
6369
6370#ifndef sv_setnv_mg
6371# define sv_setnv_mg(sv, num) \
6372 STMT_START { \
6373 SV *TeMpSv = sv; \
6374 sv_setnv(TeMpSv,num); \
6375 SvSETMAGIC(TeMpSv); \
6376 } STMT_END
6377#endif
6378
6379#ifndef sv_setpv_mg
6380# define sv_setpv_mg(sv, ptr) \
6381 STMT_START { \
6382 SV *TeMpSv = sv; \
6383 sv_setpv(TeMpSv,ptr); \
6384 SvSETMAGIC(TeMpSv); \
6385 } STMT_END
6386#endif
6387
6388#ifndef sv_setpvn_mg
6389# define sv_setpvn_mg(sv, ptr, len) \
6390 STMT_START { \
6391 SV *TeMpSv = sv; \
6392 sv_setpvn(TeMpSv,ptr,len); \
6393 SvSETMAGIC(TeMpSv); \
6394 } STMT_END
6395#endif
6396
6397#ifndef sv_setsv_mg
6398# define sv_setsv_mg(dsv, ssv) \
6399 STMT_START { \
6400 SV *TeMpSv = dsv; \
6401 sv_setsv(TeMpSv,ssv); \
6402 SvSETMAGIC(TeMpSv); \
6403 } STMT_END
6404#endif
6405
6406#ifndef sv_setuv_mg
6407# define sv_setuv_mg(sv, i) \
6408 STMT_START { \
6409 SV *TeMpSv = sv; \
6410 sv_setuv(TeMpSv,i); \
6411 SvSETMAGIC(TeMpSv); \
6412 } STMT_END
6413#endif
6414
6415#ifndef sv_usepvn_mg
6416# define sv_usepvn_mg(sv, ptr, len) \
6417 STMT_START { \
6418 SV *TeMpSv = sv; \
6419 sv_usepvn(TeMpSv,ptr,len); \
6420 SvSETMAGIC(TeMpSv); \
6421 } STMT_END
6422#endif
6423#ifndef SvVSTRING_mg
6424# define SvVSTRING_mg(sv) (SvMAGICAL(sv) ? mg_find(sv, PERL_MAGIC_vstring) : NULL)
6425#endif
6426
6427/* Hint: sv_magic_portable
6428 * This is a compatibility function that is only available with
6429 * Devel::PPPort. It is NOT in the perl core.
6430 * Its purpose is to mimic the 5.8.0 behaviour of sv_magic() when
6431 * it is being passed a name pointer with namlen == 0. In that
6432 * case, perl 5.8.0 and later store the pointer, not a copy of it.
6433 * The compatibility can be provided back to perl 5.004. With
6434 * earlier versions, the code will not compile.
6435 */
6436
6437#if (PERL_BCDVERSION < 0x5004000)
6438
6439 /* code that uses sv_magic_portable will not compile */
6440
6441#elif (PERL_BCDVERSION < 0x5008000)
6442
6443# define sv_magic_portable(sv, obj, how, name, namlen) \
6444 STMT_START { \
6445 SV *SvMp_sv = (sv); \
6446 char *SvMp_name = (char *) (name); \
6447 I32 SvMp_namlen = (namlen); \
6448 if (SvMp_name && SvMp_namlen == 0) \
6449 { \
6450 MAGIC *mg; \
6451 sv_magic(SvMp_sv, obj, how, 0, 0); \
6452 mg = SvMAGIC(SvMp_sv); \
6453 mg->mg_len = -42; /* XXX: this is the tricky part */ \
6454 mg->mg_ptr = SvMp_name; \
6455 } \
6456 else \
6457 { \
6458 sv_magic(SvMp_sv, obj, how, SvMp_name, SvMp_namlen); \
6459 } \
6460 } STMT_END
6461
6462#else
6463
6464# define sv_magic_portable(a, b, c, d, e) sv_magic(a, b, c, d, e)
6465
6466#endif
6467
6468#if !defined(mg_findext)
6469#if defined(NEED_mg_findext)
6470static MAGIC * DPPP_(my_mg_findext)(SV * sv, int type, const MGVTBL *vtbl);
6471static
6472#else
6473extern MAGIC * DPPP_(my_mg_findext)(SV * sv, int type, const MGVTBL *vtbl);
6474#endif
6475
6476#define mg_findext DPPP_(my_mg_findext)
6477#define Perl_mg_findext DPPP_(my_mg_findext)
6478
6479#if defined(NEED_mg_findext) || defined(NEED_mg_findext_GLOBAL)
6480
6481MAGIC *
6482DPPP_(my_mg_findext)(SV * sv, int type, const MGVTBL *vtbl) {
6483 if (sv) {
6484 MAGIC *mg;
6485
6486#ifdef AvPAD_NAMELIST
6487 assert(!(SvTYPE(sv) == SVt_PVAV && AvPAD_NAMELIST(sv)));
6488#endif
6489
6490 for (mg = SvMAGIC (sv); mg; mg = mg->mg_moremagic) {
6491 if (mg->mg_type == type && mg->mg_virtual == vtbl)
6492 return mg;
6493 }
6494 }
6495
6496 return NULL;
6497}
6498
6499#endif
6500#endif
6501
6502#if !defined(sv_unmagicext)
6503#if defined(NEED_sv_unmagicext)
6504static int DPPP_(my_sv_unmagicext)(pTHX_ SV * const sv, const int type, MGVTBL * vtbl);
6505static
6506#else
6507extern int DPPP_(my_sv_unmagicext)(pTHX_ SV * const sv, const int type, MGVTBL * vtbl);
6508#endif
6509
6510#ifdef sv_unmagicext
6511# undef sv_unmagicext
6512#endif
6513#define sv_unmagicext(a,b,c) DPPP_(my_sv_unmagicext)(aTHX_ a,b,c)
6514#define Perl_sv_unmagicext DPPP_(my_sv_unmagicext)
6515
6516#if defined(NEED_sv_unmagicext) || defined(NEED_sv_unmagicext_GLOBAL)
6517
6518int
6519DPPP_(my_sv_unmagicext)(pTHX_ SV *const sv, const int type, MGVTBL *vtbl)
6520{
6521 MAGIC* mg;
6522 MAGIC** mgp;
6523
6524 if (SvTYPE(sv) < SVt_PVMG || !SvMAGIC(sv))
6525 return 0;
6526 mgp = &(SvMAGIC(sv));
6527 for (mg = *mgp; mg; mg = *mgp) {
6528 const MGVTBL* const virt = mg->mg_virtual;
6529 if (mg->mg_type == type && virt == vtbl) {
6530 *mgp = mg->mg_moremagic;
6531 if (virt && virt->svt_free)
6532 virt->svt_free(aTHX_ sv, mg);
6533 if (mg->mg_ptr && mg->mg_type != PERL_MAGIC_regex_global) {
6534 if (mg->mg_len > 0)
6535 Safefree(mg->mg_ptr);
6536 else if (mg->mg_len == HEf_SVKEY) /* Questionable on older perls... */
6537 SvREFCNT_dec(MUTABLE_SV(mg->mg_ptr));
6538 else if (mg->mg_type == PERL_MAGIC_utf8)
6539 Safefree(mg->mg_ptr);
6540 }
6541 if (mg->mg_flags & MGf_REFCOUNTED)
6542 SvREFCNT_dec(mg->mg_obj);
6543 Safefree(mg);
6544 }
6545 else
6546 mgp = &mg->mg_moremagic;
6547 }
6548 if (SvMAGIC(sv)) {
6549 if (SvMAGICAL(sv)) /* if we're under save_magic, wait for restore_magic; */
6550 mg_magical(sv); /* else fix the flags now */
6551 }
6552 else {
6553 SvMAGICAL_off(sv);
6554 SvFLAGS(sv) |= (SvFLAGS(sv) & (SVp_IOK|SVp_NOK|SVp_POK)) >> PRIVSHIFT;
6555 }
6556 return 0;
6557}
6558
6559#endif
6560#endif
6561
6562#ifdef USE_ITHREADS
6563#ifndef CopFILE
6564# define CopFILE(c) ((c)->cop_file)
6565#endif
6566
6567#ifndef CopFILEGV
6568# define CopFILEGV(c) (CopFILE(c) ? gv_fetchfile(CopFILE(c)) : Nullgv)
6569#endif
6570
6571#ifndef CopFILE_set
6572# define CopFILE_set(c,pv) ((c)->cop_file = savepv(pv))
6573#endif
6574
6575#ifndef CopFILESV
6576# define CopFILESV(c) (CopFILE(c) ? GvSV(gv_fetchfile(CopFILE(c))) : Nullsv)
6577#endif
6578
6579#ifndef CopFILEAV
6580# define CopFILEAV(c) (CopFILE(c) ? GvAV(gv_fetchfile(CopFILE(c))) : Nullav)
6581#endif
6582
6583#ifndef CopSTASHPV
6584# define CopSTASHPV(c) ((c)->cop_stashpv)
6585#endif
6586
6587#ifndef CopSTASHPV_set
6588# define CopSTASHPV_set(c,pv) ((c)->cop_stashpv = ((pv) ? savepv(pv) : Nullch))
6589#endif
6590
6591#ifndef CopSTASH
6592# define CopSTASH(c) (CopSTASHPV(c) ? gv_stashpv(CopSTASHPV(c),GV_ADD) : Nullhv)
6593#endif
6594
6595#ifndef CopSTASH_set
6596# define CopSTASH_set(c,hv) CopSTASHPV_set(c, (hv) ? HvNAME(hv) : Nullch)
6597#endif
6598
6599#ifndef CopSTASH_eq
6600# define CopSTASH_eq(c,hv) ((hv) && (CopSTASHPV(c) == HvNAME(hv) \
6601 || (CopSTASHPV(c) && HvNAME(hv) \
6602 && strEQ(CopSTASHPV(c), HvNAME(hv)))))
6603#endif
6604
6605#else
6606#ifndef CopFILEGV
6607# define CopFILEGV(c) ((c)->cop_filegv)
6608#endif
6609
6610#ifndef CopFILEGV_set
6611# define CopFILEGV_set(c,gv) ((c)->cop_filegv = (GV*)SvREFCNT_inc(gv))
6612#endif
6613
6614#ifndef CopFILE_set
6615# define CopFILE_set(c,pv) CopFILEGV_set((c), gv_fetchfile(pv))
6616#endif
6617
6618#ifndef CopFILESV
6619# define CopFILESV(c) (CopFILEGV(c) ? GvSV(CopFILEGV(c)) : Nullsv)
6620#endif
6621
6622#ifndef CopFILEAV
6623# define CopFILEAV(c) (CopFILEGV(c) ? GvAV(CopFILEGV(c)) : Nullav)
6624#endif
6625
6626#ifndef CopFILE
6627# define CopFILE(c) (CopFILESV(c) ? SvPVX(CopFILESV(c)) : Nullch)
6628#endif
6629
6630#ifndef CopSTASH
6631# define CopSTASH(c) ((c)->cop_stash)
6632#endif
6633
6634#ifndef CopSTASH_set
6635# define CopSTASH_set(c,hv) ((c)->cop_stash = (hv))
6636#endif
6637
6638#ifndef CopSTASHPV
6639# define CopSTASHPV(c) (CopSTASH(c) ? HvNAME(CopSTASH(c)) : Nullch)
6640#endif
6641
6642#ifndef CopSTASHPV_set
6643# define CopSTASHPV_set(c,pv) CopSTASH_set((c), gv_stashpv(pv,GV_ADD))
6644#endif
6645
6646#ifndef CopSTASH_eq
6647# define CopSTASH_eq(c,hv) (CopSTASH(c) == (hv))
6648#endif
6649
6650#endif /* USE_ITHREADS */
6651
6652#if (PERL_BCDVERSION >= 0x5006000)
6653#ifndef caller_cx
6654
6655# if defined(NEED_caller_cx) || defined(NEED_caller_cx_GLOBAL)
6656static I32
6657DPPP_dopoptosub_at(const PERL_CONTEXT *cxstk, I32 startingblock)
6658{
6659 I32 i;
6660
6661 for (i = startingblock; i >= 0; i--) {
6662 register const PERL_CONTEXT * const cx = &cxstk[i];
6663 switch (CxTYPE(cx)) {
6664 default:
6665 continue;
6666 case CXt_EVAL:
6667 case CXt_SUB:
6668 case CXt_FORMAT:
6669 return i;
6670 }
6671 }
6672 return i;
6673}
6674# endif
6675
6676# if defined(NEED_caller_cx)
6677static const PERL_CONTEXT * DPPP_(my_caller_cx)(pTHX_ I32 count, const PERL_CONTEXT **dbcxp);
6678static
6679#else
6680extern const PERL_CONTEXT * DPPP_(my_caller_cx)(pTHX_ I32 count, const PERL_CONTEXT **dbcxp);
6681#endif
6682
6683#ifdef caller_cx
6684# undef caller_cx
6685#endif
6686#define caller_cx(a,b) DPPP_(my_caller_cx)(aTHX_ a,b)
6687#define Perl_caller_cx DPPP_(my_caller_cx)
6688
6689#if defined(NEED_caller_cx) || defined(NEED_caller_cx_GLOBAL)
6690
6691const PERL_CONTEXT *
6692DPPP_(my_caller_cx)(pTHX_ I32 count, const PERL_CONTEXT **dbcxp)
6693{
6694 register I32 cxix = DPPP_dopoptosub_at(cxstack, cxstack_ix);
6695 register const PERL_CONTEXT *cx;
6696 register const PERL_CONTEXT *ccstack = cxstack;
6697 const PERL_SI *top_si = PL_curstackinfo;
6698
6699 for (;;) {
6700 /* we may be in a higher stacklevel, so dig down deeper */
6701 while (cxix < 0 && top_si->si_type != PERLSI_MAIN) {
6702 top_si = top_si->si_prev;
6703 ccstack = top_si->si_cxstack;
6704 cxix = DPPP_dopoptosub_at(ccstack, top_si->si_cxix);
6705 }
6706 if (cxix < 0)
6707 return NULL;
6708 /* caller() should not report the automatic calls to &DB::sub */
6709 if (PL_DBsub && GvCV(PL_DBsub) && cxix >= 0 &&
6710 ccstack[cxix].blk_sub.cv == GvCV(PL_DBsub))
6711 count++;
6712 if (!count--)
6713 break;
6714 cxix = DPPP_dopoptosub_at(ccstack, cxix - 1);
6715 }
6716
6717 cx = &ccstack[cxix];
6718 if (dbcxp) *dbcxp = cx;
6719
6720 if (CxTYPE(cx) == CXt_SUB || CxTYPE(cx) == CXt_FORMAT) {
6721 const I32 dbcxix = DPPP_dopoptosub_at(ccstack, cxix - 1);
6722 /* We expect that ccstack[dbcxix] is CXt_SUB, anyway, the
6723 field below is defined for any cx. */
6724 /* caller() should not report the automatic calls to &DB::sub */
6725 if (PL_DBsub && GvCV(PL_DBsub) && dbcxix >= 0 && ccstack[dbcxix].blk_sub.cv == GvCV(PL_DBsub))
6726 cx = &ccstack[dbcxix];
6727 }
6728
6729 return cx;
6730}
6731
6732# endif
6733#endif /* caller_cx */
6734#endif /* 5.6.0 */
6735#ifndef IN_PERL_COMPILETIME
6736# define IN_PERL_COMPILETIME (PL_curcop == &PL_compiling)
6737#endif
6738
6739#ifndef IN_LOCALE_RUNTIME
6740# define IN_LOCALE_RUNTIME (PL_curcop->op_private & HINT_LOCALE)
6741#endif
6742
6743#ifndef IN_LOCALE_COMPILETIME
6744# define IN_LOCALE_COMPILETIME (PL_hints & HINT_LOCALE)
6745#endif
6746
6747#ifndef IN_LOCALE
6748# define IN_LOCALE (IN_PERL_COMPILETIME ? IN_LOCALE_COMPILETIME : IN_LOCALE_RUNTIME)
6749#endif
6750#ifndef IS_NUMBER_IN_UV
6751# define IS_NUMBER_IN_UV 0x01
6752#endif
6753
6754#ifndef IS_NUMBER_GREATER_THAN_UV_MAX
6755# define IS_NUMBER_GREATER_THAN_UV_MAX 0x02
6756#endif
6757
6758#ifndef IS_NUMBER_NOT_INT
6759# define IS_NUMBER_NOT_INT 0x04
6760#endif
6761
6762#ifndef IS_NUMBER_NEG
6763# define IS_NUMBER_NEG 0x08
6764#endif
6765
6766#ifndef IS_NUMBER_INFINITY
6767# define IS_NUMBER_INFINITY 0x10
6768#endif
6769
6770#ifndef IS_NUMBER_NAN
6771# define IS_NUMBER_NAN 0x20
6772#endif
6773#ifndef GROK_NUMERIC_RADIX
6774# define GROK_NUMERIC_RADIX(sp, send) grok_numeric_radix(sp, send)
6775#endif
6776#ifndef PERL_SCAN_GREATER_THAN_UV_MAX
6777# define PERL_SCAN_GREATER_THAN_UV_MAX 0x02
6778#endif
6779
6780#ifndef PERL_SCAN_SILENT_ILLDIGIT
6781# define PERL_SCAN_SILENT_ILLDIGIT 0x04
6782#endif
6783
6784#ifndef PERL_SCAN_ALLOW_UNDERSCORES
6785# define PERL_SCAN_ALLOW_UNDERSCORES 0x01
6786#endif
6787
6788#ifndef PERL_SCAN_DISALLOW_PREFIX
6789# define PERL_SCAN_DISALLOW_PREFIX 0x02
6790#endif
6791
6792#ifndef grok_numeric_radix
6793#if defined(NEED_grok_numeric_radix)
6794static bool DPPP_(my_grok_numeric_radix)(pTHX_ const char ** sp, const char * send);
6795static
6796#else
6797extern bool DPPP_(my_grok_numeric_radix)(pTHX_ const char ** sp, const char * send);
6798#endif
6799
6800#ifdef grok_numeric_radix
6801# undef grok_numeric_radix
6802#endif
6803#define grok_numeric_radix(a,b) DPPP_(my_grok_numeric_radix)(aTHX_ a,b)
6804#define Perl_grok_numeric_radix DPPP_(my_grok_numeric_radix)
6805
6806#if defined(NEED_grok_numeric_radix) || defined(NEED_grok_numeric_radix_GLOBAL)
6807bool
6808DPPP_(my_grok_numeric_radix)(pTHX_ const char **sp, const char *send)
6809{
6810#ifdef USE_LOCALE_NUMERIC
6811#ifdef PL_numeric_radix_sv
6812 if (PL_numeric_radix_sv && IN_LOCALE) {
6813 STRLEN len;
6814 char* radix = SvPV(PL_numeric_radix_sv, len);
6815 if (*sp + len <= send && memEQ(*sp, radix, len)) {
6816 *sp += len;
6817 return TRUE;
6818 }
6819 }
6820#else
6821 /* older perls don't have PL_numeric_radix_sv so the radix
6822 * must manually be requested from locale.h
6823 */
6824#include <locale.h>
6825 dTHR; /* needed for older threaded perls */
6826 struct lconv *lc = localeconv();
6827 char *radix = lc->decimal_point;
6828 if (radix && IN_LOCALE) {
6829 STRLEN len = strlen(radix);
6830 if (*sp + len <= send && memEQ(*sp, radix, len)) {
6831 *sp += len;
6832 return TRUE;
6833 }
6834 }
6835#endif
6836#endif /* USE_LOCALE_NUMERIC */
6837 /* always try "." if numeric radix didn't match because
6838 * we may have data from different locales mixed */
6839 if (*sp < send && **sp == '.') {
6840 ++*sp;
6841 return TRUE;
6842 }
6843 return FALSE;
6844}
6845#endif
6846#endif
6847
6848#ifndef grok_number
6849#if defined(NEED_grok_number)
6850static int DPPP_(my_grok_number)(pTHX_ const char * pv, STRLEN len, UV * valuep);
6851static
6852#else
6853extern int DPPP_(my_grok_number)(pTHX_ const char * pv, STRLEN len, UV * valuep);
6854#endif
6855
6856#ifdef grok_number
6857# undef grok_number
6858#endif
6859#define grok_number(a,b,c) DPPP_(my_grok_number)(aTHX_ a,b,c)
6860#define Perl_grok_number DPPP_(my_grok_number)
6861
6862#if defined(NEED_grok_number) || defined(NEED_grok_number_GLOBAL)
6863int
6864DPPP_(my_grok_number)(pTHX_ const char *pv, STRLEN len, UV *valuep)
6865{
6866 const char *s = pv;
6867 const char *send = pv + len;
6868 const UV max_div_10 = UV_MAX / 10;
6869 const char max_mod_10 = UV_MAX % 10;
6870 int numtype = 0;
6871 int sawinf = 0;
6872 int sawnan = 0;
6873
6874 while (s < send && isSPACE(*s))
6875 s++;
6876 if (s == send) {
6877 return 0;
6878 } else if (*s == '-') {
6879 s++;
6880 numtype = IS_NUMBER_NEG;
6881 }
6882 else if (*s == '+')
6883 s++;
6884
6885 if (s == send)
6886 return 0;
6887
6888 /* next must be digit or the radix separator or beginning of infinity */
6889 if (isDIGIT(*s)) {
6890 /* UVs are at least 32 bits, so the first 9 decimal digits cannot
6891 overflow. */
6892 UV value = *s - '0';
6893 /* This construction seems to be more optimiser friendly.
6894 (without it gcc does the isDIGIT test and the *s - '0' separately)
6895 With it gcc on arm is managing 6 instructions (6 cycles) per digit.
6896 In theory the optimiser could deduce how far to unroll the loop
6897 before checking for overflow. */
6898 if (++s < send) {
6899 int digit = *s - '0';
6900 if (digit >= 0 && digit <= 9) {
6901 value = value * 10 + digit;
6902 if (++s < send) {
6903 digit = *s - '0';
6904 if (digit >= 0 && digit <= 9) {
6905 value = value * 10 + digit;
6906 if (++s < send) {
6907 digit = *s - '0';
6908 if (digit >= 0 && digit <= 9) {
6909 value = value * 10 + digit;
6910 if (++s < send) {
6911 digit = *s - '0';
6912 if (digit >= 0 && digit <= 9) {
6913 value = value * 10 + digit;
6914 if (++s < send) {
6915 digit = *s - '0';
6916 if (digit >= 0 && digit <= 9) {
6917 value = value * 10 + digit;
6918 if (++s < send) {
6919 digit = *s - '0';
6920 if (digit >= 0 && digit <= 9) {
6921 value = value * 10 + digit;
6922 if (++s < send) {
6923 digit = *s - '0';
6924 if (digit >= 0 && digit <= 9) {
6925 value = value * 10 + digit;
6926 if (++s < send) {
6927 digit = *s - '0';
6928 if (digit >= 0 && digit <= 9) {
6929 value = value * 10 + digit;
6930 if (++s < send) {
6931 /* Now got 9 digits, so need to check
6932 each time for overflow. */
6933 digit = *s - '0';
6934 while (digit >= 0 && digit <= 9
6935 && (value < max_div_10
6936 || (value == max_div_10
6937 && digit <= max_mod_10))) {
6938 value = value * 10 + digit;
6939 if (++s < send)
6940 digit = *s - '0';
6941 else
6942 break;
6943 }
6944 if (digit >= 0 && digit <= 9
6945 && (s < send)) {
6946 /* value overflowed.
6947 skip the remaining digits, don't
6948 worry about setting *valuep. */
6949 do {
6950 s++;
6951 } while (s < send && isDIGIT(*s));
6952 numtype |=
6953 IS_NUMBER_GREATER_THAN_UV_MAX;
6954 goto skip_value;
6955 }
6956 }
6957 }
6958 }
6959 }
6960 }
6961 }
6962 }
6963 }
6964 }
6965 }
6966 }
6967 }
6968 }
6969 }
6970 }
6971 }
6972 }
6973 numtype |= IS_NUMBER_IN_UV;
6974 if (valuep)
6975 *valuep = value;
6976
6977 skip_value:
6978 if (GROK_NUMERIC_RADIX(&s, send)) {
6979 numtype |= IS_NUMBER_NOT_INT;
6980 while (s < send && isDIGIT(*s)) /* optional digits after the radix */
6981 s++;
6982 }
6983 }
6984 else if (GROK_NUMERIC_RADIX(&s, send)) {
6985 numtype |= IS_NUMBER_NOT_INT | IS_NUMBER_IN_UV; /* valuep assigned below */
6986 /* no digits before the radix means we need digits after it */
6987 if (s < send && isDIGIT(*s)) {
6988 do {
6989 s++;
6990 } while (s < send && isDIGIT(*s));
6991 if (valuep) {
6992 /* integer approximation is valid - it's 0. */
6993 *valuep = 0;
6994 }
6995 }
6996 else
6997 return 0;
6998 } else if (*s == 'I' || *s == 'i') {
6999 s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
7000 s++; if (s == send || (*s != 'F' && *s != 'f')) return 0;
7001 s++; if (s < send && (*s == 'I' || *s == 'i')) {
7002 s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
7003 s++; if (s == send || (*s != 'I' && *s != 'i')) return 0;
7004 s++; if (s == send || (*s != 'T' && *s != 't')) return 0;
7005 s++; if (s == send || (*s != 'Y' && *s != 'y')) return 0;
7006 s++;
7007 }
7008 sawinf = 1;
7009 } else if (*s == 'N' || *s == 'n') {
7010 /* XXX TODO: There are signaling NaNs and quiet NaNs. */
7011 s++; if (s == send || (*s != 'A' && *s != 'a')) return 0;
7012 s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
7013 s++;
7014 sawnan = 1;
7015 } else
7016 return 0;
7017
7018 if (sawinf) {
7019 numtype &= IS_NUMBER_NEG; /* Keep track of sign */
7020 numtype |= IS_NUMBER_INFINITY | IS_NUMBER_NOT_INT;
7021 } else if (sawnan) {
7022 numtype &= IS_NUMBER_NEG; /* Keep track of sign */
7023 numtype |= IS_NUMBER_NAN | IS_NUMBER_NOT_INT;
7024 } else if (s < send) {
7025 /* we can have an optional exponent part */
7026 if (*s == 'e' || *s == 'E') {
7027 /* The only flag we keep is sign. Blow away any "it's UV" */
7028 numtype &= IS_NUMBER_NEG;
7029 numtype |= IS_NUMBER_NOT_INT;
7030 s++;
7031 if (s < send && (*s == '-' || *s == '+'))
7032 s++;
7033 if (s < send && isDIGIT(*s)) {
7034 do {
7035 s++;
7036 } while (s < send && isDIGIT(*s));
7037 }
7038 else
7039 return 0;
7040 }
7041 }
7042 while (s < send && isSPACE(*s))
7043 s++;
7044 if (s >= send)
7045 return numtype;
7046 if (len == 10 && memEQ(pv, "0 but true", 10)) {
7047 if (valuep)
7048 *valuep = 0;
7049 return IS_NUMBER_IN_UV;
7050 }
7051 return 0;
7052}
7053#endif
7054#endif
7055
7056/*
7057 * The grok_* routines have been modified to use warn() instead of
7058 * Perl_warner(). Also, 'hexdigit' was the former name of PL_hexdigit,
7059 * which is why the stack variable has been renamed to 'xdigit'.
7060 */
7061
7062#ifndef grok_bin
7063#if defined(NEED_grok_bin)
7064static UV DPPP_(my_grok_bin)(pTHX_ const char * start, STRLEN * len_p, I32 * flags, NV * result);
7065static
7066#else
7067extern UV DPPP_(my_grok_bin)(pTHX_ const char * start, STRLEN * len_p, I32 * flags, NV * result);
7068#endif
7069
7070#ifdef grok_bin
7071# undef grok_bin
7072#endif
7073#define grok_bin(a,b,c,d) DPPP_(my_grok_bin)(aTHX_ a,b,c,d)
7074#define Perl_grok_bin DPPP_(my_grok_bin)
7075
7076#if defined(NEED_grok_bin) || defined(NEED_grok_bin_GLOBAL)
7077UV
7078DPPP_(my_grok_bin)(pTHX_ const char *start, STRLEN *len_p, I32 *flags, NV *result)
7079{
7080 const char *s = start;
7081 STRLEN len = *len_p;
7082 UV value = 0;
7083 NV value_nv = 0;
7084
7085 const UV max_div_2 = UV_MAX / 2;
7086 bool allow_underscores = *flags & PERL_SCAN_ALLOW_UNDERSCORES;
7087 bool overflowed = FALSE;
7088
7089 if (!(*flags & PERL_SCAN_DISALLOW_PREFIX)) {
7090 /* strip off leading b or 0b.
7091 for compatibility silently suffer "b" and "0b" as valid binary
7092 numbers. */
7093 if (len >= 1) {
7094 if (s[0] == 'b') {
7095 s++;
7096 len--;
7097 }
7098 else if (len >= 2 && s[0] == '0' && s[1] == 'b') {
7099 s+=2;
7100 len-=2;
7101 }
7102 }
7103 }
7104
7105 for (; len-- && *s; s++) {
7106 char bit = *s;
7107 if (bit == '0' || bit == '1') {
7108 /* Write it in this wonky order with a goto to attempt to get the
7109 compiler to make the common case integer-only loop pretty tight.
7110 With gcc seems to be much straighter code than old scan_bin. */
7111 redo:
7112 if (!overflowed) {
7113 if (value <= max_div_2) {
7114 value = (value << 1) | (bit - '0');
7115 continue;
7116 }
7117 /* Bah. We're just overflowed. */
7118 warn("Integer overflow in binary number");
7119 overflowed = TRUE;
7120 value_nv = (NV) value;
7121 }
7122 value_nv *= 2.0;
7123 /* If an NV has not enough bits in its mantissa to
7124 * represent a UV this summing of small low-order numbers
7125 * is a waste of time (because the NV cannot preserve
7126 * the low-order bits anyway): we could just remember when
7127 * did we overflow and in the end just multiply value_nv by the
7128 * right amount. */
7129 value_nv += (NV)(bit - '0');
7130 continue;
7131 }
7132 if (bit == '_' && len && allow_underscores && (bit = s[1])
7133 && (bit == '0' || bit == '1'))
7134 {
7135 --len;
7136 ++s;
7137 goto redo;
7138 }
7139 if (!(*flags & PERL_SCAN_SILENT_ILLDIGIT))
7140 warn("Illegal binary digit '%c' ignored", *s);
7141 break;
7142 }
7143
7144 if ( ( overflowed && value_nv > 4294967295.0)
7145#if UVSIZE > 4
7146 || (!overflowed && value > 0xffffffff )
7147#endif
7148 ) {
7149 warn("Binary number > 0b11111111111111111111111111111111 non-portable");
7150 }
7151 *len_p = s - start;
7152 if (!overflowed) {
7153 *flags = 0;
7154 return value;
7155 }
7156 *flags = PERL_SCAN_GREATER_THAN_UV_MAX;
7157 if (result)
7158 *result = value_nv;
7159 return UV_MAX;
7160}
7161#endif
7162#endif
7163
7164#ifndef grok_hex
7165#if defined(NEED_grok_hex)
7166static UV DPPP_(my_grok_hex)(pTHX_ const char * start, STRLEN * len_p, I32 * flags, NV * result);
7167static
7168#else
7169extern UV DPPP_(my_grok_hex)(pTHX_ const char * start, STRLEN * len_p, I32 * flags, NV * result);
7170#endif
7171
7172#ifdef grok_hex
7173# undef grok_hex
7174#endif
7175#define grok_hex(a,b,c,d) DPPP_(my_grok_hex)(aTHX_ a,b,c,d)
7176#define Perl_grok_hex DPPP_(my_grok_hex)
7177
7178#if defined(NEED_grok_hex) || defined(NEED_grok_hex_GLOBAL)
7179UV
7180DPPP_(my_grok_hex)(pTHX_ const char *start, STRLEN *len_p, I32 *flags, NV *result)
7181{
7182 const char *s = start;
7183 STRLEN len = *len_p;
7184 UV value = 0;
7185 NV value_nv = 0;
7186
7187 const UV max_div_16 = UV_MAX / 16;
7188 bool allow_underscores = *flags & PERL_SCAN_ALLOW_UNDERSCORES;
7189 bool overflowed = FALSE;
7190 const char *xdigit;
7191
7192 if (!(*flags & PERL_SCAN_DISALLOW_PREFIX)) {
7193 /* strip off leading x or 0x.
7194 for compatibility silently suffer "x" and "0x" as valid hex numbers.
7195 */
7196 if (len >= 1) {
7197 if (s[0] == 'x') {
7198 s++;
7199 len--;
7200 }
7201 else if (len >= 2 && s[0] == '0' && s[1] == 'x') {
7202 s+=2;
7203 len-=2;
7204 }
7205 }
7206 }
7207
7208 for (; len-- && *s; s++) {
7209 xdigit = strchr((char *) PL_hexdigit, *s);
7210 if (xdigit) {
7211 /* Write it in this wonky order with a goto to attempt to get the
7212 compiler to make the common case integer-only loop pretty tight.
7213 With gcc seems to be much straighter code than old scan_hex. */
7214 redo:
7215 if (!overflowed) {
7216 if (value <= max_div_16) {
7217 value = (value << 4) | ((xdigit - PL_hexdigit) & 15);
7218 continue;
7219 }
7220 warn("Integer overflow in hexadecimal number");
7221 overflowed = TRUE;
7222 value_nv = (NV) value;
7223 }
7224 value_nv *= 16.0;
7225 /* If an NV has not enough bits in its mantissa to
7226 * represent a UV this summing of small low-order numbers
7227 * is a waste of time (because the NV cannot preserve
7228 * the low-order bits anyway): we could just remember when
7229 * did we overflow and in the end just multiply value_nv by the
7230 * right amount of 16-tuples. */
7231 value_nv += (NV)((xdigit - PL_hexdigit) & 15);
7232 continue;
7233 }
7234 if (*s == '_' && len && allow_underscores && s[1]
7235 && (xdigit = strchr((char *) PL_hexdigit, s[1])))
7236 {
7237 --len;
7238 ++s;
7239 goto redo;
7240 }
7241 if (!(*flags & PERL_SCAN_SILENT_ILLDIGIT))
7242 warn("Illegal hexadecimal digit '%c' ignored", *s);
7243 break;
7244 }
7245
7246 if ( ( overflowed && value_nv > 4294967295.0)
7247#if UVSIZE > 4
7248 || (!overflowed && value > 0xffffffff )
7249#endif
7250 ) {
7251 warn("Hexadecimal number > 0xffffffff non-portable");
7252 }
7253 *len_p = s - start;
7254 if (!overflowed) {
7255 *flags = 0;
7256 return value;
7257 }
7258 *flags = PERL_SCAN_GREATER_THAN_UV_MAX;
7259 if (result)
7260 *result = value_nv;
7261 return UV_MAX;
7262}
7263#endif
7264#endif
7265
7266#ifndef grok_oct
7267#if defined(NEED_grok_oct)
7268static UV DPPP_(my_grok_oct)(pTHX_ const char * start, STRLEN * len_p, I32 * flags, NV * result);
7269static
7270#else
7271extern UV DPPP_(my_grok_oct)(pTHX_ const char * start, STRLEN * len_p, I32 * flags, NV * result);
7272#endif
7273
7274#ifdef grok_oct
7275# undef grok_oct
7276#endif
7277#define grok_oct(a,b,c,d) DPPP_(my_grok_oct)(aTHX_ a,b,c,d)
7278#define Perl_grok_oct DPPP_(my_grok_oct)
7279
7280#if defined(NEED_grok_oct) || defined(NEED_grok_oct_GLOBAL)
7281UV
7282DPPP_(my_grok_oct)(pTHX_ const char *start, STRLEN *len_p, I32 *flags, NV *result)
7283{
7284 const char *s = start;
7285 STRLEN len = *len_p;
7286 UV value = 0;
7287 NV value_nv = 0;
7288
7289 const UV max_div_8 = UV_MAX / 8;
7290 bool allow_underscores = *flags & PERL_SCAN_ALLOW_UNDERSCORES;
7291 bool overflowed = FALSE;
7292
7293 for (; len-- && *s; s++) {
7294 /* gcc 2.95 optimiser not smart enough to figure that this subtraction
7295 out front allows slicker code. */
7296 int digit = *s - '0';
7297 if (digit >= 0 && digit <= 7) {
7298 /* Write it in this wonky order with a goto to attempt to get the
7299 compiler to make the common case integer-only loop pretty tight.
7300 */
7301 redo:
7302 if (!overflowed) {
7303 if (value <= max_div_8) {
7304 value = (value << 3) | digit;
7305 continue;
7306 }
7307 /* Bah. We're just overflowed. */
7308 warn("Integer overflow in octal number");
7309 overflowed = TRUE;
7310 value_nv = (NV) value;
7311 }
7312 value_nv *= 8.0;
7313 /* If an NV has not enough bits in its mantissa to
7314 * represent a UV this summing of small low-order numbers
7315 * is a waste of time (because the NV cannot preserve
7316 * the low-order bits anyway): we could just remember when
7317 * did we overflow and in the end just multiply value_nv by the
7318 * right amount of 8-tuples. */
7319 value_nv += (NV)digit;
7320 continue;
7321 }
7322 if (digit == ('_' - '0') && len && allow_underscores
7323 && (digit = s[1] - '0') && (digit >= 0 && digit <= 7))
7324 {
7325 --len;
7326 ++s;
7327 goto redo;
7328 }
7329 /* Allow \octal to work the DWIM way (that is, stop scanning
7330 * as soon as non-octal characters are seen, complain only iff
7331 * someone seems to want to use the digits eight and nine). */
7332 if (digit == 8 || digit == 9) {
7333 if (!(*flags & PERL_SCAN_SILENT_ILLDIGIT))
7334 warn("Illegal octal digit '%c' ignored", *s);
7335 }
7336 break;
7337 }
7338
7339 if ( ( overflowed && value_nv > 4294967295.0)
7340#if UVSIZE > 4
7341 || (!overflowed && value > 0xffffffff )
7342#endif
7343 ) {
7344 warn("Octal number > 037777777777 non-portable");
7345 }
7346 *len_p = s - start;
7347 if (!overflowed) {
7348 *flags = 0;
7349 return value;
7350 }
7351 *flags = PERL_SCAN_GREATER_THAN_UV_MAX;
7352 if (result)
7353 *result = value_nv;
7354 return UV_MAX;
7355}
7356#endif
7357#endif
7358
7359#if !defined(my_snprintf)
7360#if defined(NEED_my_snprintf)
7361static int DPPP_(my_my_snprintf)(char * buffer, const Size_t len, const char * format, ...);
7362static
7363#else
7364extern int DPPP_(my_my_snprintf)(char * buffer, const Size_t len, const char * format, ...);
7365#endif
7366
7367#define my_snprintf DPPP_(my_my_snprintf)
7368#define Perl_my_snprintf DPPP_(my_my_snprintf)
7369
7370#if defined(NEED_my_snprintf) || defined(NEED_my_snprintf_GLOBAL)
7371
7372int
7373DPPP_(my_my_snprintf)(char *buffer, const Size_t len, const char *format, ...)
7374{
7375 dTHX;
7376 int retval;
7377 va_list ap;
7378 va_start(ap, format);
7379#ifdef HAS_VSNPRINTF
7380 retval = vsnprintf(buffer, len, format, ap);
7381#else
7382 retval = vsprintf(buffer, format, ap);
7383#endif
7384 va_end(ap);
7385 if (retval < 0 || (len > 0 && (Size_t)retval >= len))
7386 Perl_croak(aTHX_ "panic: my_snprintf buffer overflow");
7387 return retval;
7388}
7389
7390#endif
7391#endif
7392
7393#if !defined(my_sprintf)
7394#if defined(NEED_my_sprintf)
7395static int DPPP_(my_my_sprintf)(char * buffer, const char * pat, ...);
7396static
7397#else
7398extern int DPPP_(my_my_sprintf)(char * buffer, const char * pat, ...);
7399#endif
7400
7401#define my_sprintf DPPP_(my_my_sprintf)
7402#define Perl_my_sprintf DPPP_(my_my_sprintf)
7403
7404#if defined(NEED_my_sprintf) || defined(NEED_my_sprintf_GLOBAL)
7405
7406int
7407DPPP_(my_my_sprintf)(char *buffer, const char* pat, ...)
7408{
7409 va_list args;
7410 va_start(args, pat);
7411 vsprintf(buffer, pat, args);
7412 va_end(args);
7413 return strlen(buffer);
7414}
7415
7416#endif
7417#endif
7418
7419#ifdef NO_XSLOCKS
7420# ifdef dJMPENV
7421# define dXCPT dJMPENV; int rEtV = 0
7422# define XCPT_TRY_START JMPENV_PUSH(rEtV); if (rEtV == 0)
7423# define XCPT_TRY_END JMPENV_POP;
7424# define XCPT_CATCH if (rEtV != 0)
7425# define XCPT_RETHROW JMPENV_JUMP(rEtV)
7426# else
7427# define dXCPT Sigjmp_buf oldTOP; int rEtV = 0
7428# define XCPT_TRY_START Copy(top_env, oldTOP, 1, Sigjmp_buf); rEtV = Sigsetjmp(top_env, 1); if (rEtV == 0)
7429# define XCPT_TRY_END Copy(oldTOP, top_env, 1, Sigjmp_buf);
7430# define XCPT_CATCH if (rEtV != 0)
7431# define XCPT_RETHROW Siglongjmp(top_env, rEtV)
7432# endif
7433#endif
7434
7435#if !defined(my_strlcat)
7436#if defined(NEED_my_strlcat)
7437static Size_t DPPP_(my_my_strlcat)(char * dst, const char * src, Size_t size);
7438static
7439#else
7440extern Size_t DPPP_(my_my_strlcat)(char * dst, const char * src, Size_t size);
7441#endif
7442
7443#define my_strlcat DPPP_(my_my_strlcat)
7444#define Perl_my_strlcat DPPP_(my_my_strlcat)
7445
7446#if defined(NEED_my_strlcat) || defined(NEED_my_strlcat_GLOBAL)
7447
7448Size_t
7449DPPP_(my_my_strlcat)(char *dst, const char *src, Size_t size)
7450{
7451 Size_t used, length, copy;
7452
7453 used = strlen(dst);
7454 length = strlen(src);
7455 if (size > 0 && used < size - 1) {
7456 copy = (length >= size - used) ? size - used - 1 : length;
7457 memcpy(dst + used, src, copy);
7458 dst[used + copy] = '\0';
7459 }
7460 return used + length;
7461}
7462#endif
7463#endif
7464
7465#if !defined(my_strlcpy)
7466#if defined(NEED_my_strlcpy)
7467static Size_t DPPP_(my_my_strlcpy)(char * dst, const char * src, Size_t size);
7468static
7469#else
7470extern Size_t DPPP_(my_my_strlcpy)(char * dst, const char * src, Size_t size);
7471#endif
7472
7473#define my_strlcpy DPPP_(my_my_strlcpy)
7474#define Perl_my_strlcpy DPPP_(my_my_strlcpy)
7475
7476#if defined(NEED_my_strlcpy) || defined(NEED_my_strlcpy_GLOBAL)
7477
7478Size_t
7479DPPP_(my_my_strlcpy)(char *dst, const char *src, Size_t size)
7480{
7481 Size_t length, copy;
7482
7483 length = strlen(src);
7484 if (size > 0) {
7485 copy = (length >= size) ? size - 1 : length;
7486 memcpy(dst, src, copy);
7487 dst[copy] = '\0';
7488 }
7489 return length;
7490}
7491
7492#endif
7493#endif
7494#ifndef PERL_PV_ESCAPE_QUOTE
7495# define PERL_PV_ESCAPE_QUOTE 0x0001
7496#endif
7497
7498#ifndef PERL_PV_PRETTY_QUOTE
7499# define PERL_PV_PRETTY_QUOTE PERL_PV_ESCAPE_QUOTE
7500#endif
7501
7502#ifndef PERL_PV_PRETTY_ELLIPSES
7503# define PERL_PV_PRETTY_ELLIPSES 0x0002
7504#endif
7505
7506#ifndef PERL_PV_PRETTY_LTGT
7507# define PERL_PV_PRETTY_LTGT 0x0004
7508#endif
7509
7510#ifndef PERL_PV_ESCAPE_FIRSTCHAR
7511# define PERL_PV_ESCAPE_FIRSTCHAR 0x0008
7512#endif
7513
7514#ifndef PERL_PV_ESCAPE_UNI
7515# define PERL_PV_ESCAPE_UNI 0x0100
7516#endif
7517
7518#ifndef PERL_PV_ESCAPE_UNI_DETECT
7519# define PERL_PV_ESCAPE_UNI_DETECT 0x0200
7520#endif
7521
7522#ifndef PERL_PV_ESCAPE_ALL
7523# define PERL_PV_ESCAPE_ALL 0x1000
7524#endif
7525
7526#ifndef PERL_PV_ESCAPE_NOBACKSLASH
7527# define PERL_PV_ESCAPE_NOBACKSLASH 0x2000
7528#endif
7529
7530#ifndef PERL_PV_ESCAPE_NOCLEAR
7531# define PERL_PV_ESCAPE_NOCLEAR 0x4000
7532#endif
7533
7534#ifndef PERL_PV_ESCAPE_RE
7535# define PERL_PV_ESCAPE_RE 0x8000
7536#endif
7537
7538#ifndef PERL_PV_PRETTY_NOCLEAR
7539# define PERL_PV_PRETTY_NOCLEAR PERL_PV_ESCAPE_NOCLEAR
7540#endif
7541#ifndef PERL_PV_PRETTY_DUMP
7542# define PERL_PV_PRETTY_DUMP PERL_PV_PRETTY_ELLIPSES|PERL_PV_PRETTY_QUOTE
7543#endif
7544
7545#ifndef PERL_PV_PRETTY_REGPROP
7546# define PERL_PV_PRETTY_REGPROP PERL_PV_PRETTY_ELLIPSES|PERL_PV_PRETTY_LTGT|PERL_PV_ESCAPE_RE
7547#endif
7548
7549/* Hint: pv_escape
7550 * Note that unicode functionality is only backported to
7551 * those perl versions that support it. For older perl
7552 * versions, the implementation will fall back to bytes.
7553 */
7554
7555#ifndef pv_escape
7556#if defined(NEED_pv_escape)
7557static char * DPPP_(my_pv_escape)(pTHX_ SV * dsv, char const * const str, const STRLEN count, const STRLEN max, STRLEN * const escaped, const U32 flags);
7558static
7559#else
7560extern char * DPPP_(my_pv_escape)(pTHX_ SV * dsv, char const * const str, const STRLEN count, const STRLEN max, STRLEN * const escaped, const U32 flags);
7561#endif
7562
7563#ifdef pv_escape
7564# undef pv_escape
7565#endif
7566#define pv_escape(a,b,c,d,e,f) DPPP_(my_pv_escape)(aTHX_ a,b,c,d,e,f)
7567#define Perl_pv_escape DPPP_(my_pv_escape)
7568
7569#if defined(NEED_pv_escape) || defined(NEED_pv_escape_GLOBAL)
7570
7571char *
7572DPPP_(my_pv_escape)(pTHX_ SV *dsv, char const * const str,
7573 const STRLEN count, const STRLEN max,
7574 STRLEN * const escaped, const U32 flags)
7575{
7576 const char esc = flags & PERL_PV_ESCAPE_RE ? '%' : '\\';
7577 const char dq = flags & PERL_PV_ESCAPE_QUOTE ? '"' : esc;
7578 char octbuf[32] = "%123456789ABCDF";
7579 STRLEN wrote = 0;
7580 STRLEN chsize = 0;
7581 STRLEN readsize = 1;
7582#if defined(is_utf8_string) && defined(utf8_to_uvchr)
7583 bool isuni = flags & PERL_PV_ESCAPE_UNI ? 1 : 0;
7584#endif
7585 const char *pv = str;
7586 const char * const end = pv + count;
7587 octbuf[0] = esc;
7588
7589 if (!(flags & PERL_PV_ESCAPE_NOCLEAR))
7590 sv_setpvs(dsv, "");
7591
7592#if defined(is_utf8_string) && defined(utf8_to_uvchr)
7593 if ((flags & PERL_PV_ESCAPE_UNI_DETECT) && is_utf8_string((U8*)pv, count))
7594 isuni = 1;
7595#endif
7596
7597 for (; pv < end && (!max || wrote < max) ; pv += readsize) {
7598 const UV u =
7599#if defined(is_utf8_string) && defined(utf8_to_uvchr)
7600 isuni ? utf8_to_uvchr((U8*)pv, &readsize) :
7601#endif
7602 (U8)*pv;
7603 const U8 c = (U8)u & 0xFF;
7604
7605 if (u > 255 || (flags & PERL_PV_ESCAPE_ALL)) {
7606 if (flags & PERL_PV_ESCAPE_FIRSTCHAR)
7607 chsize = my_snprintf(octbuf, sizeof octbuf,
7608 "%" UVxf, u);
7609 else
7610 chsize = my_snprintf(octbuf, sizeof octbuf,
7611 "%cx{%" UVxf "}", esc, u);
7612 } else if (flags & PERL_PV_ESCAPE_NOBACKSLASH) {
7613 chsize = 1;
7614 } else {
7615 if (c == dq || c == esc || !isPRINT(c)) {
7616 chsize = 2;
7617 switch (c) {
7618 case '\\' : /* fallthrough */
7619 case '%' : if (c == esc)
7620 octbuf[1] = esc;
7621 else
7622 chsize = 1;
7623 break;
7624 case '\v' : octbuf[1] = 'v'; break;
7625 case '\t' : octbuf[1] = 't'; break;
7626 case '\r' : octbuf[1] = 'r'; break;
7627 case '\n' : octbuf[1] = 'n'; break;
7628 case '\f' : octbuf[1] = 'f'; break;
7629 case '"' : if (dq == '"')
7630 octbuf[1] = '"';
7631 else
7632 chsize = 1;
7633 break;
7634 default: chsize = my_snprintf(octbuf, sizeof octbuf,
7635 pv < end && isDIGIT((U8)*(pv+readsize))
7636 ? "%c%03o" : "%c%o", esc, c);
7637 }
7638 } else {
7639 chsize = 1;
7640 }
7641 }
7642 if (max && wrote + chsize > max) {
7643 break;
7644 } else if (chsize > 1) {
7645 sv_catpvn(dsv, octbuf, chsize);
7646 wrote += chsize;
7647 } else {
7648 char tmp[2];
7649 my_snprintf(tmp, sizeof tmp, "%c", c);
7650 sv_catpvn(dsv, tmp, 1);
7651 wrote++;
7652 }
7653 if (flags & PERL_PV_ESCAPE_FIRSTCHAR)
7654 break;
7655 }
7656 if (escaped != NULL)
7657 *escaped= pv - str;
7658 return SvPVX(dsv);
7659}
7660
7661#endif
7662#endif
7663
7664#ifndef pv_pretty
7665#if defined(NEED_pv_pretty)
7666static char * DPPP_(my_pv_pretty)(pTHX_ SV * dsv, char const * const str, const STRLEN count, const STRLEN max, char const * const start_color, char const * const end_color, const U32 flags);
7667static
7668#else
7669extern char * DPPP_(my_pv_pretty)(pTHX_ SV * dsv, char const * const str, const STRLEN count, const STRLEN max, char const * const start_color, char const * const end_color, const U32 flags);
7670#endif
7671
7672#ifdef pv_pretty
7673# undef pv_pretty
7674#endif
7675#define pv_pretty(a,b,c,d,e,f,g) DPPP_(my_pv_pretty)(aTHX_ a,b,c,d,e,f,g)
7676#define Perl_pv_pretty DPPP_(my_pv_pretty)
7677
7678#if defined(NEED_pv_pretty) || defined(NEED_pv_pretty_GLOBAL)
7679
7680char *
7681DPPP_(my_pv_pretty)(pTHX_ SV *dsv, char const * const str, const STRLEN count,
7682 const STRLEN max, char const * const start_color, char const * const end_color,
7683 const U32 flags)
7684{
7685 const U8 dq = (flags & PERL_PV_PRETTY_QUOTE) ? '"' : '%';
7686 STRLEN escaped;
7687
7688 if (!(flags & PERL_PV_PRETTY_NOCLEAR))
7689 sv_setpvs(dsv, "");
7690
7691 if (dq == '"')
7692 sv_catpvs(dsv, "\"");
7693 else if (flags & PERL_PV_PRETTY_LTGT)
7694 sv_catpvs(dsv, "<");
7695
7696 if (start_color != NULL)
7697 sv_catpv(dsv, D_PPP_CONSTPV_ARG(start_color));
7698
7699 pv_escape(dsv, str, count, max, &escaped, flags | PERL_PV_ESCAPE_NOCLEAR);
7700
7701 if (end_color != NULL)
7702 sv_catpv(dsv, D_PPP_CONSTPV_ARG(end_color));
7703
7704 if (dq == '"')
7705 sv_catpvs(dsv, "\"");
7706 else if (flags & PERL_PV_PRETTY_LTGT)
7707 sv_catpvs(dsv, ">");
7708
7709 if ((flags & PERL_PV_PRETTY_ELLIPSES) && escaped < count)
7710 sv_catpvs(dsv, "...");
7711
7712 return SvPVX(dsv);
7713}
7714
7715#endif
7716#endif
7717
7718#ifndef pv_display
7719#if defined(NEED_pv_display)
7720static char * DPPP_(my_pv_display)(pTHX_ SV * dsv, const char * pv, STRLEN cur, STRLEN len, STRLEN pvlim);
7721static
7722#else
7723extern char * DPPP_(my_pv_display)(pTHX_ SV * dsv, const char * pv, STRLEN cur, STRLEN len, STRLEN pvlim);
7724#endif
7725
7726#ifdef pv_display
7727# undef pv_display
7728#endif
7729#define pv_display(a,b,c,d,e) DPPP_(my_pv_display)(aTHX_ a,b,c,d,e)
7730#define Perl_pv_display DPPP_(my_pv_display)
7731
7732#if defined(NEED_pv_display) || defined(NEED_pv_display_GLOBAL)
7733
7734char *
7735DPPP_(my_pv_display)(pTHX_ SV *dsv, const char *pv, STRLEN cur, STRLEN len, STRLEN pvlim)
7736{
7737 pv_pretty(dsv, pv, cur, pvlim, NULL, NULL, PERL_PV_PRETTY_DUMP);
7738 if (len > cur && pv[cur] == '\0')
7739 sv_catpvs(dsv, "\\0");
7740 return SvPVX(dsv);
7741}
7742
7743#endif
7744#endif
7745
7746#endif /* _P_P_PORTABILITY_H_ */
7747
7748/* End of File ppport.h */
This page took 0.08403 seconds and 4 git commands to generate.