Header And Logo

PostgreSQL
| The world's most advanced open source database.

ppport.h

Go to the documentation of this file.
00001 #if 0
00002 <<'SKIP';
00003 #endif
00004 /*
00005 ----------------------------------------------------------------------
00006 
00007     ppport.h -- Perl/Pollution/Portability Version 3.19
00008 
00009     Automatically created by Devel::PPPort running under perl 5.011002.
00010 
00011     Do NOT edit this file directly! -- Edit PPPort_pm.PL and the
00012     includes in parts/inc/ instead.
00013 
00014     Use 'perldoc ppport.h' to view the documentation below.
00015 
00016 ----------------------------------------------------------------------
00017 
00018 SKIP
00019 
00020 =pod
00021 
00022 =head1 NAME
00023 
00024 ppport.h - Perl/Pollution/Portability version 3.19
00025 
00026 =head1 SYNOPSIS
00027 
00028   perl ppport.h [options] [source files]
00029 
00030   Searches current directory for files if no [source files] are given
00031 
00032   --help                      show short help
00033 
00034   --version                   show version
00035 
00036   --patch=file                write one patch file with changes
00037   --copy=suffix               write changed copies with suffix
00038   --diff=program              use diff program and options
00039 
00040   --compat-version=version    provide compatibility with Perl version
00041   --cplusplus                 accept C++ comments
00042 
00043   --quiet                     don't output anything except fatal errors
00044   --nodiag                    don't show diagnostics
00045   --nohints                   don't show hints
00046   --nochanges                 don't suggest changes
00047   --nofilter                  don't filter input files
00048 
00049   --strip                     strip all script and doc functionality from
00050                               ppport.h
00051 
00052   --list-provided             list provided API
00053   --list-unsupported          list unsupported API
00054   --api-info=name             show Perl API portability information
00055 
00056 =head1 COMPATIBILITY
00057 
00058 This version of F<ppport.h> is designed to support operation with Perl
00059 installations back to 5.003, and has been tested up to 5.10.0.
00060 
00061 =head1 OPTIONS
00062 
00063 =head2 --help
00064 
00065 Display a brief usage summary.
00066 
00067 =head2 --version
00068 
00069 Display the version of F<ppport.h>.
00070 
00071 =head2 --patch=I<file>
00072 
00073 If this option is given, a single patch file will be created if
00074 any changes are suggested. This requires a working diff program
00075 to be installed on your system.
00076 
00077 =head2 --copy=I<suffix>
00078 
00079 If this option is given, a copy of each file will be saved with
00080 the given suffix that contains the suggested changes. This does
00081 not require any external programs. Note that this does not
00082 automagially add a dot between the original filename and the
00083 suffix. If you want the dot, you have to include it in the option
00084 argument.
00085 
00086 If neither C<--patch> or C<--copy> are given, the default is to
00087 simply print the diffs for each file. This requires either
00088 C<Text::Diff> or a C<diff> program to be installed.
00089 
00090 =head2 --diff=I<program>
00091 
00092 Manually set the diff program and options to use. The default
00093 is to use C<Text::Diff>, when installed, and output unified
00094 context diffs.
00095 
00096 =head2 --compat-version=I<version>
00097 
00098 Tell F<ppport.h> to check for compatibility with the given
00099 Perl version. The default is to check for compatibility with Perl
00100 version 5.003. You can use this option to reduce the output
00101 of F<ppport.h> if you intend to be backward compatible only
00102 down to a certain Perl version.
00103 
00104 =head2 --cplusplus
00105 
00106 Usually, F<ppport.h> will detect C++ style comments and
00107 replace them with C style comments for portability reasons.
00108 Using this option instructs F<ppport.h> to leave C++
00109 comments untouched.
00110 
00111 =head2 --quiet
00112 
00113 Be quiet. Don't print anything except fatal errors.
00114 
00115 =head2 --nodiag
00116 
00117 Don't output any diagnostic messages. Only portability
00118 alerts will be printed.
00119 
00120 =head2 --nohints
00121 
00122 Don't output any hints. Hints often contain useful portability
00123 notes. Warnings will still be displayed.
00124 
00125 =head2 --nochanges
00126 
00127 Don't suggest any changes. Only give diagnostic output and hints
00128 unless these are also deactivated.
00129 
00130 =head2 --nofilter
00131 
00132 Don't filter the list of input files. By default, files not looking
00133 like source code (i.e. not *.xs, *.c, *.cc, *.cpp or *.h) are skipped.
00134 
00135 =head2 --strip
00136 
00137 Strip all script and documentation functionality from F<ppport.h>.
00138 This reduces the size of F<ppport.h> dramatically and may be useful
00139 if you want to include F<ppport.h> in smaller modules without
00140 increasing their distribution size too much.
00141 
00142 The stripped F<ppport.h> will have a C<--unstrip> option that allows
00143 you to undo the stripping, but only if an appropriate C<Devel::PPPort>
00144 module is installed.
00145 
00146 =head2 --list-provided
00147 
00148 Lists the API elements for which compatibility is provided by
00149 F<ppport.h>. Also lists if it must be explicitly requested,
00150 if it has dependencies, and if there are hints or warnings for it.
00151 
00152 =head2 --list-unsupported
00153 
00154 Lists the API elements that are known not to be supported by
00155 F<ppport.h> and below which version of Perl they probably
00156 won't be available or work.
00157 
00158 =head2 --api-info=I<name>
00159 
00160 Show portability information for API elements matching I<name>.
00161 If I<name> is surrounded by slashes, it is interpreted as a regular
00162 expression.
00163 
00164 =head1 DESCRIPTION
00165 
00166 In order for a Perl extension (XS) module to be as portable as possible
00167 across differing versions of Perl itself, certain steps need to be taken.
00168 
00169 =over 4
00170 
00171 =item *
00172 
00173 Including this header is the first major one. This alone will give you
00174 access to a large part of the Perl API that hasn't been available in
00175 earlier Perl releases. Use
00176 
00177     perl ppport.h --list-provided
00178 
00179 to see which API elements are provided by ppport.h.
00180 
00181 =item *
00182 
00183 You should avoid using deprecated parts of the API. For example, using
00184 global Perl variables without the C<PL_> prefix is deprecated. Also,
00185 some API functions used to have a C<perl_> prefix. Using this form is
00186 also deprecated. You can safely use the supported API, as F<ppport.h>
00187 will provide wrappers for older Perl versions.
00188 
00189 =item *
00190 
00191 If you use one of a few functions or variables that were not present in
00192 earlier versions of Perl, and that can't be provided using a macro, you
00193 have to explicitly request support for these functions by adding one or
00194 more C<#define>s in your source code before the inclusion of F<ppport.h>.
00195 
00196 These functions or variables will be marked C<explicit> in the list shown
00197 by C<--list-provided>.
00198 
00199 Depending on whether you module has a single or multiple files that
00200 use such functions or variables, you want either C<static> or global
00201 variants.
00202 
00203 For a C<static> function or variable (used only in a single source
00204 file), use:
00205 
00206     #define NEED_function
00207     #define NEED_variable
00208 
00209 For a global function or variable (used in multiple source files),
00210 use:
00211 
00212     #define NEED_function_GLOBAL
00213     #define NEED_variable_GLOBAL
00214 
00215 Note that you mustn't have more than one global request for the
00216 same function or variable in your project.
00217 
00218     Function / Variable       Static Request               Global Request
00219     -----------------------------------------------------------------------------------------
00220     PL_parser                 NEED_PL_parser               NEED_PL_parser_GLOBAL
00221     PL_signals                NEED_PL_signals              NEED_PL_signals_GLOBAL
00222     eval_pv()                 NEED_eval_pv                 NEED_eval_pv_GLOBAL
00223     grok_bin()                NEED_grok_bin                NEED_grok_bin_GLOBAL
00224     grok_hex()                NEED_grok_hex                NEED_grok_hex_GLOBAL
00225     grok_number()             NEED_grok_number             NEED_grok_number_GLOBAL
00226     grok_numeric_radix()      NEED_grok_numeric_radix      NEED_grok_numeric_radix_GLOBAL
00227     grok_oct()                NEED_grok_oct                NEED_grok_oct_GLOBAL
00228     load_module()             NEED_load_module             NEED_load_module_GLOBAL
00229     my_snprintf()             NEED_my_snprintf             NEED_my_snprintf_GLOBAL
00230     my_sprintf()              NEED_my_sprintf              NEED_my_sprintf_GLOBAL
00231     my_strlcat()              NEED_my_strlcat              NEED_my_strlcat_GLOBAL
00232     my_strlcpy()              NEED_my_strlcpy              NEED_my_strlcpy_GLOBAL
00233     newCONSTSUB()             NEED_newCONSTSUB             NEED_newCONSTSUB_GLOBAL
00234     newRV_noinc()             NEED_newRV_noinc             NEED_newRV_noinc_GLOBAL
00235     newSV_type()              NEED_newSV_type              NEED_newSV_type_GLOBAL
00236     newSVpvn_flags()          NEED_newSVpvn_flags          NEED_newSVpvn_flags_GLOBAL
00237     newSVpvn_share()          NEED_newSVpvn_share          NEED_newSVpvn_share_GLOBAL
00238     pv_display()              NEED_pv_display              NEED_pv_display_GLOBAL
00239     pv_escape()               NEED_pv_escape               NEED_pv_escape_GLOBAL
00240     pv_pretty()               NEED_pv_pretty               NEED_pv_pretty_GLOBAL
00241     sv_2pv_flags()            NEED_sv_2pv_flags            NEED_sv_2pv_flags_GLOBAL
00242     sv_2pvbyte()              NEED_sv_2pvbyte              NEED_sv_2pvbyte_GLOBAL
00243     sv_catpvf_mg()            NEED_sv_catpvf_mg            NEED_sv_catpvf_mg_GLOBAL
00244     sv_catpvf_mg_nocontext()  NEED_sv_catpvf_mg_nocontext  NEED_sv_catpvf_mg_nocontext_GLOBAL
00245     sv_pvn_force_flags()      NEED_sv_pvn_force_flags      NEED_sv_pvn_force_flags_GLOBAL
00246     sv_setpvf_mg()            NEED_sv_setpvf_mg            NEED_sv_setpvf_mg_GLOBAL
00247     sv_setpvf_mg_nocontext()  NEED_sv_setpvf_mg_nocontext  NEED_sv_setpvf_mg_nocontext_GLOBAL
00248     vload_module()            NEED_vload_module            NEED_vload_module_GLOBAL
00249     vnewSVpvf()               NEED_vnewSVpvf               NEED_vnewSVpvf_GLOBAL
00250     warner()                  NEED_warner                  NEED_warner_GLOBAL
00251 
00252 To avoid namespace conflicts, you can change the namespace of the
00253 explicitly exported functions / variables using the C<DPPP_NAMESPACE>
00254 macro. Just C<#define> the macro before including C<ppport.h>:
00255 
00256     #define DPPP_NAMESPACE MyOwnNamespace_
00257     #include "ppport.h"
00258 
00259 The default namespace is C<DPPP_>.
00260 
00261 =back
00262 
00263 The good thing is that most of the above can be checked by running
00264 F<ppport.h> on your source code. See the next section for
00265 details.
00266 
00267 =head1 EXAMPLES
00268 
00269 To verify whether F<ppport.h> is needed for your module, whether you
00270 should make any changes to your code, and whether any special defines
00271 should be used, F<ppport.h> can be run as a Perl script to check your
00272 source code. Simply say:
00273 
00274     perl ppport.h
00275 
00276 The result will usually be a list of patches suggesting changes
00277 that should at least be acceptable, if not necessarily the most
00278 efficient solution, or a fix for all possible problems.
00279 
00280 If you know that your XS module uses features only available in
00281 newer Perl releases, if you're aware that it uses C++ comments,
00282 and if you want all suggestions as a single patch file, you could
00283 use something like this:
00284 
00285     perl ppport.h --compat-version=5.6.0 --cplusplus --patch=test.diff
00286 
00287 If you only want your code to be scanned without any suggestions
00288 for changes, use:
00289 
00290     perl ppport.h --nochanges
00291 
00292 You can specify a different C<diff> program or options, using
00293 the C<--diff> option:
00294 
00295     perl ppport.h --diff='diff -C 10'
00296 
00297 This would output context diffs with 10 lines of context.
00298 
00299 If you want to create patched copies of your files instead, use:
00300 
00301     perl ppport.h --copy=.new
00302 
00303 To display portability information for the C<newSVpvn> function,
00304 use:
00305 
00306     perl ppport.h --api-info=newSVpvn
00307 
00308 Since the argument to C<--api-info> can be a regular expression,
00309 you can use
00310 
00311     perl ppport.h --api-info=/_nomg$/
00312 
00313 to display portability information for all C<_nomg> functions or
00314 
00315     perl ppport.h --api-info=/./
00316 
00317 to display information for all known API elements.
00318 
00319 =head1 BUGS
00320 
00321 If this version of F<ppport.h> is causing failure during
00322 the compilation of this module, please check if newer versions
00323 of either this module or C<Devel::PPPort> are available on CPAN
00324 before sending a bug report.
00325 
00326 If F<ppport.h> was generated using the latest version of
00327 C<Devel::PPPort> and is causing failure of this module, please
00328 file a bug report using the CPAN Request Tracker at L<http://rt.cpan.org/>.
00329 
00330 Please include the following information:
00331 
00332 =over 4
00333 
00334 =item 1.
00335 
00336 The complete output from running "perl -V"
00337 
00338 =item 2.
00339 
00340 This file.
00341 
00342 =item 3.
00343 
00344 The name and version of the module you were trying to build.
00345 
00346 =item 4.
00347 
00348 A full log of the build that failed.
00349 
00350 =item 5.
00351 
00352 Any other information that you think could be relevant.
00353 
00354 =back
00355 
00356 For the latest version of this code, please get the C<Devel::PPPort>
00357 module from CPAN.
00358 
00359 =head1 COPYRIGHT
00360 
00361 Version 3.x, Copyright (c) 2004-2009, Marcus Holland-Moritz.
00362 
00363 Version 2.x, Copyright (C) 2001, Paul Marquess.
00364 
00365 Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
00366 
00367 This program is free software; you can redistribute it and/or
00368 modify it under the same terms as Perl itself.
00369 
00370 =head1 SEE ALSO
00371 
00372 See L<Devel::PPPort>.
00373 
00374 =cut
00375 
00376 use strict;
00377 
00378 # Disable broken TRIE-optimization
00379 BEGIN { eval '${^RE_TRIE_MAXBUF} = -1' if $] >= 5.009004 && $] <= 5.009005 }
00380 
00381 my $VERSION = 3.19;
00382 
00383 my %opt = (
00384   quiet     => 0,
00385   diag      => 1,
00386   hints     => 1,
00387   changes   => 1,
00388   cplusplus => 0,
00389   filter    => 1,
00390   strip     => 0,
00391   version   => 0,
00392 );
00393 
00394 my($ppport) = $0 =~ /([\w.]+)$/;
00395 my $LF = '(?:\r\n|[\r\n])';   # line feed
00396 my $HS = "[ \t]";             # horizontal whitespace
00397 
00398 # Never use C comments in this file!
00399 my $ccs  = '/'.'*';
00400 my $cce  = '*'.'/';
00401 my $rccs = quotemeta $ccs;
00402 my $rcce = quotemeta $cce;
00403 
00404 eval {
00405   require Getopt::Long;
00406   Getopt::Long::GetOptions(\%opt, qw(
00407     help quiet diag! filter! hints! changes! cplusplus strip version
00408     patch=s copy=s diff=s compat-version=s
00409     list-provided list-unsupported api-info=s
00410   )) or usage();
00411 };
00412 
00413 if ($@ and grep /^-/, @ARGV) {
00414   usage() if "@ARGV" =~ /^--?h(?:elp)?$/;
00415   die "Getopt::Long not found. Please don't use any options.\n";
00416 }
00417 
00418 if ($opt{version}) {
00419   print "This is $0 $VERSION.\n";
00420   exit 0;
00421 }
00422 
00423 usage() if $opt{help};
00424 strip() if $opt{strip};
00425 
00426 if (exists $opt{'compat-version'}) {
00427   my($r,$v,$s) = eval { parse_version($opt{'compat-version'}) };
00428   if ($@) {
00429     die "Invalid version number format: '$opt{'compat-version'}'\n";
00430   }
00431   die "Only Perl 5 is supported\n" if $r != 5;
00432   die "Invalid version number: $opt{'compat-version'}\n" if $v >= 1000 || $s >= 1000;
00433   $opt{'compat-version'} = sprintf "%d.%03d%03d", $r, $v, $s;
00434 }
00435 else {
00436   $opt{'compat-version'} = 5;
00437 }
00438 
00439 my %API = map { /^(\w+)\|([^|]*)\|([^|]*)\|(\w*)$/
00440                 ? ( $1 => {
00441                       ($2                  ? ( base     => $2 ) : ()),
00442                       ($3                  ? ( todo     => $3 ) : ()),
00443                       (index($4, 'v') >= 0 ? ( varargs  => 1  ) : ()),
00444                       (index($4, 'p') >= 0 ? ( provided => 1  ) : ()),
00445                       (index($4, 'n') >= 0 ? ( nothxarg => 1  ) : ()),
00446                     } )
00447                 : die "invalid spec: $_" } qw(
00448 AvFILLp|5.004050||p
00449 AvFILL|||
00450 CLASS|||n
00451 CPERLscope|5.005000||p
00452 CX_CURPAD_SAVE|||
00453 CX_CURPAD_SV|||
00454 CopFILEAV|5.006000||p
00455 CopFILEGV_set|5.006000||p
00456 CopFILEGV|5.006000||p
00457 CopFILESV|5.006000||p
00458 CopFILE_set|5.006000||p
00459 CopFILE|5.006000||p
00460 CopSTASHPV_set|5.006000||p
00461 CopSTASHPV|5.006000||p
00462 CopSTASH_eq|5.006000||p
00463 CopSTASH_set|5.006000||p
00464 CopSTASH|5.006000||p
00465 CopyD|5.009002||p
00466 Copy|||
00467 CvPADLIST|||
00468 CvSTASH|||
00469 CvWEAKOUTSIDE|||
00470 DEFSV_set|5.011000||p
00471 DEFSV|5.004050||p
00472 END_EXTERN_C|5.005000||p
00473 ENTER|||
00474 ERRSV|5.004050||p
00475 EXTEND|||
00476 EXTERN_C|5.005000||p
00477 F0convert|||n
00478 FREETMPS|||
00479 GIMME_V||5.004000|n
00480 GIMME|||n
00481 GROK_NUMERIC_RADIX|5.007002||p
00482 G_ARRAY|||
00483 G_DISCARD|||
00484 G_EVAL|||
00485 G_METHOD|5.006001||p
00486 G_NOARGS|||
00487 G_SCALAR|||
00488 G_VOID||5.004000|
00489 GetVars|||
00490 GvSVn|5.009003||p
00491 GvSV|||
00492 Gv_AMupdate|||
00493 HEf_SVKEY||5.004000|
00494 HeHASH||5.004000|
00495 HeKEY||5.004000|
00496 HeKLEN||5.004000|
00497 HePV||5.004000|
00498 HeSVKEY_force||5.004000|
00499 HeSVKEY_set||5.004000|
00500 HeSVKEY||5.004000|
00501 HeUTF8||5.011000|
00502 HeVAL||5.004000|
00503 HvNAMELEN_get|5.009003||p
00504 HvNAME_get|5.009003||p
00505 HvNAME|||
00506 INT2PTR|5.006000||p
00507 IN_LOCALE_COMPILETIME|5.007002||p
00508 IN_LOCALE_RUNTIME|5.007002||p
00509 IN_LOCALE|5.007002||p
00510 IN_PERL_COMPILETIME|5.008001||p
00511 IS_NUMBER_GREATER_THAN_UV_MAX|5.007002||p
00512 IS_NUMBER_INFINITY|5.007002||p
00513 IS_NUMBER_IN_UV|5.007002||p
00514 IS_NUMBER_NAN|5.007003||p
00515 IS_NUMBER_NEG|5.007002||p
00516 IS_NUMBER_NOT_INT|5.007002||p
00517 IVSIZE|5.006000||p
00518 IVTYPE|5.006000||p
00519 IVdf|5.006000||p
00520 LEAVE|||
00521 LVRET|||
00522 MARK|||
00523 MULTICALL||5.011000|
00524 MY_CXT_CLONE|5.009002||p
00525 MY_CXT_INIT|5.007003||p
00526 MY_CXT|5.007003||p
00527 MoveD|5.009002||p
00528 Move|||
00529 NOOP|5.005000||p
00530 NUM2PTR|5.006000||p
00531 NVTYPE|5.006000||p
00532 NVef|5.006001||p
00533 NVff|5.006001||p
00534 NVgf|5.006001||p
00535 Newxc|5.009003||p
00536 Newxz|5.009003||p
00537 Newx|5.009003||p
00538 Nullav|||
00539 Nullch|||
00540 Nullcv|||
00541 Nullhv|||
00542 Nullsv|||
00543 ORIGMARK|||
00544 PAD_BASE_SV|||
00545 PAD_CLONE_VARS|||
00546 PAD_COMPNAME_FLAGS|||
00547 PAD_COMPNAME_GEN_set|||
00548 PAD_COMPNAME_GEN|||
00549 PAD_COMPNAME_OURSTASH|||
00550 PAD_COMPNAME_PV|||
00551 PAD_COMPNAME_TYPE|||
00552 PAD_DUP|||
00553 PAD_RESTORE_LOCAL|||
00554 PAD_SAVE_LOCAL|||
00555 PAD_SAVE_SETNULLPAD|||
00556 PAD_SETSV|||
00557 PAD_SET_CUR_NOSAVE|||
00558 PAD_SET_CUR|||
00559 PAD_SVl|||
00560 PAD_SV|||
00561 PERLIO_FUNCS_CAST|5.009003||p
00562 PERLIO_FUNCS_DECL|5.009003||p
00563 PERL_ABS|5.008001||p
00564 PERL_BCDVERSION|5.011000||p
00565 PERL_GCC_BRACE_GROUPS_FORBIDDEN|5.008001||p
00566 PERL_HASH|5.004000||p
00567 PERL_INT_MAX|5.004000||p
00568 PERL_INT_MIN|5.004000||p
00569 PERL_LONG_MAX|5.004000||p
00570 PERL_LONG_MIN|5.004000||p
00571 PERL_MAGIC_arylen|5.007002||p
00572 PERL_MAGIC_backref|5.007002||p
00573 PERL_MAGIC_bm|5.007002||p
00574 PERL_MAGIC_collxfrm|5.007002||p
00575 PERL_MAGIC_dbfile|5.007002||p
00576 PERL_MAGIC_dbline|5.007002||p
00577 PERL_MAGIC_defelem|5.007002||p
00578 PERL_MAGIC_envelem|5.007002||p
00579 PERL_MAGIC_env|5.007002||p
00580 PERL_MAGIC_ext|5.007002||p
00581 PERL_MAGIC_fm|5.007002||p
00582 PERL_MAGIC_glob|5.011000||p
00583 PERL_MAGIC_isaelem|5.007002||p
00584 PERL_MAGIC_isa|5.007002||p
00585 PERL_MAGIC_mutex|5.011000||p
00586 PERL_MAGIC_nkeys|5.007002||p
00587 PERL_MAGIC_overload_elem|5.007002||p
00588 PERL_MAGIC_overload_table|5.007002||p
00589 PERL_MAGIC_overload|5.007002||p
00590 PERL_MAGIC_pos|5.007002||p
00591 PERL_MAGIC_qr|5.007002||p
00592 PERL_MAGIC_regdata|5.007002||p
00593 PERL_MAGIC_regdatum|5.007002||p
00594 PERL_MAGIC_regex_global|5.007002||p
00595 PERL_MAGIC_shared_scalar|5.007003||p
00596 PERL_MAGIC_shared|5.007003||p
00597 PERL_MAGIC_sigelem|5.007002||p
00598 PERL_MAGIC_sig|5.007002||p
00599 PERL_MAGIC_substr|5.007002||p
00600 PERL_MAGIC_sv|5.007002||p
00601 PERL_MAGIC_taint|5.007002||p
00602 PERL_MAGIC_tiedelem|5.007002||p
00603 PERL_MAGIC_tiedscalar|5.007002||p
00604 PERL_MAGIC_tied|5.007002||p
00605 PERL_MAGIC_utf8|5.008001||p
00606 PERL_MAGIC_uvar_elem|5.007003||p
00607 PERL_MAGIC_uvar|5.007002||p
00608 PERL_MAGIC_vec|5.007002||p
00609 PERL_MAGIC_vstring|5.008001||p
00610 PERL_PV_ESCAPE_ALL|5.009004||p
00611 PERL_PV_ESCAPE_FIRSTCHAR|5.009004||p
00612 PERL_PV_ESCAPE_NOBACKSLASH|5.009004||p
00613 PERL_PV_ESCAPE_NOCLEAR|5.009004||p
00614 PERL_PV_ESCAPE_QUOTE|5.009004||p
00615 PERL_PV_ESCAPE_RE|5.009005||p
00616 PERL_PV_ESCAPE_UNI_DETECT|5.009004||p
00617 PERL_PV_ESCAPE_UNI|5.009004||p
00618 PERL_PV_PRETTY_DUMP|5.009004||p
00619 PERL_PV_PRETTY_ELLIPSES|5.010000||p
00620 PERL_PV_PRETTY_LTGT|5.009004||p
00621 PERL_PV_PRETTY_NOCLEAR|5.010000||p
00622 PERL_PV_PRETTY_QUOTE|5.009004||p
00623 PERL_PV_PRETTY_REGPROP|5.009004||p
00624 PERL_QUAD_MAX|5.004000||p
00625 PERL_QUAD_MIN|5.004000||p
00626 PERL_REVISION|5.006000||p
00627 PERL_SCAN_ALLOW_UNDERSCORES|5.007003||p
00628 PERL_SCAN_DISALLOW_PREFIX|5.007003||p
00629 PERL_SCAN_GREATER_THAN_UV_MAX|5.007003||p
00630 PERL_SCAN_SILENT_ILLDIGIT|5.008001||p
00631 PERL_SHORT_MAX|5.004000||p
00632 PERL_SHORT_MIN|5.004000||p
00633 PERL_SIGNALS_UNSAFE_FLAG|5.008001||p
00634 PERL_SUBVERSION|5.006000||p
00635 PERL_SYS_INIT3||5.006000|
00636 PERL_SYS_INIT|||
00637 PERL_SYS_TERM||5.011000|
00638 PERL_UCHAR_MAX|5.004000||p
00639 PERL_UCHAR_MIN|5.004000||p
00640 PERL_UINT_MAX|5.004000||p
00641 PERL_UINT_MIN|5.004000||p
00642 PERL_ULONG_MAX|5.004000||p
00643 PERL_ULONG_MIN|5.004000||p
00644 PERL_UNUSED_ARG|5.009003||p
00645 PERL_UNUSED_CONTEXT|5.009004||p
00646 PERL_UNUSED_DECL|5.007002||p
00647 PERL_UNUSED_VAR|5.007002||p
00648 PERL_UQUAD_MAX|5.004000||p
00649 PERL_UQUAD_MIN|5.004000||p
00650 PERL_USE_GCC_BRACE_GROUPS|5.009004||p
00651 PERL_USHORT_MAX|5.004000||p
00652 PERL_USHORT_MIN|5.004000||p
00653 PERL_VERSION|5.006000||p
00654 PL_DBsignal|5.005000||p
00655 PL_DBsingle|||pn
00656 PL_DBsub|||pn
00657 PL_DBtrace|||pn
00658 PL_Sv|5.005000||p
00659 PL_bufend|5.011000||p
00660 PL_bufptr|5.011000||p
00661 PL_compiling|5.004050||p
00662 PL_copline|5.011000||p
00663 PL_curcop|5.004050||p
00664 PL_curstash|5.004050||p
00665 PL_debstash|5.004050||p
00666 PL_defgv|5.004050||p
00667 PL_diehook|5.004050||p
00668 PL_dirty|5.004050||p
00669 PL_dowarn|||pn
00670 PL_errgv|5.004050||p
00671 PL_error_count|5.011000||p
00672 PL_expect|5.011000||p
00673 PL_hexdigit|5.005000||p
00674 PL_hints|5.005000||p
00675 PL_in_my_stash|5.011000||p
00676 PL_in_my|5.011000||p
00677 PL_last_in_gv|||n
00678 PL_laststatval|5.005000||p
00679 PL_lex_state|5.011000||p
00680 PL_lex_stuff|5.011000||p
00681 PL_linestr|5.011000||p
00682 PL_modglobal||5.005000|n
00683 PL_na|5.004050||pn
00684 PL_no_modify|5.006000||p
00685 PL_ofsgv|||n
00686 PL_parser|5.009005||p
00687 PL_perl_destruct_level|5.004050||p
00688 PL_perldb|5.004050||p
00689 PL_ppaddr|5.006000||p
00690 PL_rsfp_filters|5.004050||p
00691 PL_rsfp|5.004050||p
00692 PL_rs|||n
00693 PL_signals|5.008001||p
00694 PL_stack_base|5.004050||p
00695 PL_stack_sp|5.004050||p
00696 PL_statcache|5.005000||p
00697 PL_stdingv|5.004050||p
00698 PL_sv_arenaroot|5.004050||p
00699 PL_sv_no|5.004050||pn
00700 PL_sv_undef|5.004050||pn
00701 PL_sv_yes|5.004050||pn
00702 PL_tainted|5.004050||p
00703 PL_tainting|5.004050||p
00704 PL_tokenbuf|5.011000||p
00705 POP_MULTICALL||5.011000|
00706 POPi|||n
00707 POPl|||n
00708 POPn|||n
00709 POPpbytex||5.007001|n
00710 POPpx||5.005030|n
00711 POPp|||n
00712 POPs|||n
00713 PTR2IV|5.006000||p
00714 PTR2NV|5.006000||p
00715 PTR2UV|5.006000||p
00716 PTR2nat|5.009003||p
00717 PTR2ul|5.007001||p
00718 PTRV|5.006000||p
00719 PUSHMARK|||
00720 PUSH_MULTICALL||5.011000|
00721 PUSHi|||
00722 PUSHmortal|5.009002||p
00723 PUSHn|||
00724 PUSHp|||
00725 PUSHs|||
00726 PUSHu|5.004000||p
00727 PUTBACK|||
00728 PerlIO_clearerr||5.007003|
00729 PerlIO_close||5.007003|
00730 PerlIO_context_layers||5.009004|
00731 PerlIO_eof||5.007003|
00732 PerlIO_error||5.007003|
00733 PerlIO_fileno||5.007003|
00734 PerlIO_fill||5.007003|
00735 PerlIO_flush||5.007003|
00736 PerlIO_get_base||5.007003|
00737 PerlIO_get_bufsiz||5.007003|
00738 PerlIO_get_cnt||5.007003|
00739 PerlIO_get_ptr||5.007003|
00740 PerlIO_read||5.007003|
00741 PerlIO_seek||5.007003|
00742 PerlIO_set_cnt||5.007003|
00743 PerlIO_set_ptrcnt||5.007003|
00744 PerlIO_setlinebuf||5.007003|
00745 PerlIO_stderr||5.007003|
00746 PerlIO_stdin||5.007003|
00747 PerlIO_stdout||5.007003|
00748 PerlIO_tell||5.007003|
00749 PerlIO_unread||5.007003|
00750 PerlIO_write||5.007003|
00751 Perl_signbit||5.009005|n
00752 PoisonFree|5.009004||p
00753 PoisonNew|5.009004||p
00754 PoisonWith|5.009004||p
00755 Poison|5.008000||p
00756 RETVAL|||n
00757 Renewc|||
00758 Renew|||
00759 SAVECLEARSV|||
00760 SAVECOMPPAD|||
00761 SAVEPADSV|||
00762 SAVETMPS|||
00763 SAVE_DEFSV|5.004050||p
00764 SPAGAIN|||
00765 SP|||
00766 START_EXTERN_C|5.005000||p
00767 START_MY_CXT|5.007003||p
00768 STMT_END|||p
00769 STMT_START|||p
00770 STR_WITH_LEN|5.009003||p
00771 ST|||
00772 SV_CONST_RETURN|5.009003||p
00773 SV_COW_DROP_PV|5.008001||p
00774 SV_COW_SHARED_HASH_KEYS|5.009005||p
00775 SV_GMAGIC|5.007002||p
00776 SV_HAS_TRAILING_NUL|5.009004||p
00777 SV_IMMEDIATE_UNREF|5.007001||p
00778 SV_MUTABLE_RETURN|5.009003||p
00779 SV_NOSTEAL|5.009002||p
00780 SV_SMAGIC|5.009003||p
00781 SV_UTF8_NO_ENCODING|5.008001||p
00782 SVfARG|5.009005||p
00783 SVf_UTF8|5.006000||p
00784 SVf|5.006000||p
00785 SVt_IV|||
00786 SVt_NV|||
00787 SVt_PVAV|||
00788 SVt_PVCV|||
00789 SVt_PVHV|||
00790 SVt_PVMG|||
00791 SVt_PV|||
00792 Safefree|||
00793 Slab_Alloc|||
00794 Slab_Free|||
00795 Slab_to_rw|||
00796 StructCopy|||
00797 SvCUR_set|||
00798 SvCUR|||
00799 SvEND|||
00800 SvGAMAGIC||5.006001|
00801 SvGETMAGIC|5.004050||p
00802 SvGROW|||
00803 SvIOK_UV||5.006000|
00804 SvIOK_notUV||5.006000|
00805 SvIOK_off|||
00806 SvIOK_only_UV||5.006000|
00807 SvIOK_only|||
00808 SvIOK_on|||
00809 SvIOKp|||
00810 SvIOK|||
00811 SvIVX|||
00812 SvIV_nomg|5.009001||p
00813 SvIV_set|||
00814 SvIVx|||
00815 SvIV|||
00816 SvIsCOW_shared_hash||5.008003|
00817 SvIsCOW||5.008003|
00818 SvLEN_set|||
00819 SvLEN|||
00820 SvLOCK||5.007003|
00821 SvMAGIC_set|5.009003||p
00822 SvNIOK_off|||
00823 SvNIOKp|||
00824 SvNIOK|||
00825 SvNOK_off|||
00826 SvNOK_only|||
00827 SvNOK_on|||
00828 SvNOKp|||
00829 SvNOK|||
00830 SvNVX|||
00831 SvNV_set|||
00832 SvNVx|||
00833 SvNV|||
00834 SvOK|||
00835 SvOOK_offset||5.011000|
00836 SvOOK|||
00837 SvPOK_off|||
00838 SvPOK_only_UTF8||5.006000|
00839 SvPOK_only|||
00840 SvPOK_on|||
00841 SvPOKp|||
00842 SvPOK|||
00843 SvPVX_const|5.009003||p
00844 SvPVX_mutable|5.009003||p
00845 SvPVX|||
00846 SvPV_const|5.009003||p
00847 SvPV_flags_const_nolen|5.009003||p
00848 SvPV_flags_const|5.009003||p
00849 SvPV_flags_mutable|5.009003||p
00850 SvPV_flags|5.007002||p
00851 SvPV_force_flags_mutable|5.009003||p
00852 SvPV_force_flags_nolen|5.009003||p
00853 SvPV_force_flags|5.007002||p
00854 SvPV_force_mutable|5.009003||p
00855 SvPV_force_nolen|5.009003||p
00856 SvPV_force_nomg_nolen|5.009003||p
00857 SvPV_force_nomg|5.007002||p
00858 SvPV_force|||p
00859 SvPV_mutable|5.009003||p
00860 SvPV_nolen_const|5.009003||p
00861 SvPV_nolen|5.006000||p
00862 SvPV_nomg_const_nolen|5.009003||p
00863 SvPV_nomg_const|5.009003||p
00864 SvPV_nomg|5.007002||p
00865 SvPV_renew|5.009003||p
00866 SvPV_set|||
00867 SvPVbyte_force||5.009002|
00868 SvPVbyte_nolen||5.006000|
00869 SvPVbytex_force||5.006000|
00870 SvPVbytex||5.006000|
00871 SvPVbyte|5.006000||p
00872 SvPVutf8_force||5.006000|
00873 SvPVutf8_nolen||5.006000|
00874 SvPVutf8x_force||5.006000|
00875 SvPVutf8x||5.006000|
00876 SvPVutf8||5.006000|
00877 SvPVx|||
00878 SvPV|||
00879 SvREFCNT_dec|||
00880 SvREFCNT_inc_NN|5.009004||p
00881 SvREFCNT_inc_simple_NN|5.009004||p
00882 SvREFCNT_inc_simple_void_NN|5.009004||p
00883 SvREFCNT_inc_simple_void|5.009004||p
00884 SvREFCNT_inc_simple|5.009004||p
00885 SvREFCNT_inc_void_NN|5.009004||p
00886 SvREFCNT_inc_void|5.009004||p
00887 SvREFCNT_inc|||p
00888 SvREFCNT|||
00889 SvROK_off|||
00890 SvROK_on|||
00891 SvROK|||
00892 SvRV_set|5.009003||p
00893 SvRV|||
00894 SvRXOK||5.009005|
00895 SvRX||5.009005|
00896 SvSETMAGIC|||
00897 SvSHARED_HASH|5.009003||p
00898 SvSHARE||5.007003|
00899 SvSTASH_set|5.009003||p
00900 SvSTASH|||
00901 SvSetMagicSV_nosteal||5.004000|
00902 SvSetMagicSV||5.004000|
00903 SvSetSV_nosteal||5.004000|
00904 SvSetSV|||
00905 SvTAINTED_off||5.004000|
00906 SvTAINTED_on||5.004000|
00907 SvTAINTED||5.004000|
00908 SvTAINT|||
00909 SvTRUE|||
00910 SvTYPE|||
00911 SvUNLOCK||5.007003|
00912 SvUOK|5.007001|5.006000|p
00913 SvUPGRADE|||
00914 SvUTF8_off||5.006000|
00915 SvUTF8_on||5.006000|
00916 SvUTF8||5.006000|
00917 SvUVXx|5.004000||p
00918 SvUVX|5.004000||p
00919 SvUV_nomg|5.009001||p
00920 SvUV_set|5.009003||p
00921 SvUVx|5.004000||p
00922 SvUV|5.004000||p
00923 SvVOK||5.008001|
00924 SvVSTRING_mg|5.009004||p
00925 THIS|||n
00926 UNDERBAR|5.009002||p
00927 UTF8_MAXBYTES|5.009002||p
00928 UVSIZE|5.006000||p
00929 UVTYPE|5.006000||p
00930 UVXf|5.007001||p
00931 UVof|5.006000||p
00932 UVuf|5.006000||p
00933 UVxf|5.006000||p
00934 WARN_ALL|5.006000||p
00935 WARN_AMBIGUOUS|5.006000||p
00936 WARN_ASSERTIONS|5.011000||p
00937 WARN_BAREWORD|5.006000||p
00938 WARN_CLOSED|5.006000||p
00939 WARN_CLOSURE|5.006000||p
00940 WARN_DEBUGGING|5.006000||p
00941 WARN_DEPRECATED|5.006000||p
00942 WARN_DIGIT|5.006000||p
00943 WARN_EXEC|5.006000||p
00944 WARN_EXITING|5.006000||p
00945 WARN_GLOB|5.006000||p
00946 WARN_INPLACE|5.006000||p
00947 WARN_INTERNAL|5.006000||p
00948 WARN_IO|5.006000||p
00949 WARN_LAYER|5.008000||p
00950 WARN_MALLOC|5.006000||p
00951 WARN_MISC|5.006000||p
00952 WARN_NEWLINE|5.006000||p
00953 WARN_NUMERIC|5.006000||p
00954 WARN_ONCE|5.006000||p
00955 WARN_OVERFLOW|5.006000||p
00956 WARN_PACK|5.006000||p
00957 WARN_PARENTHESIS|5.006000||p
00958 WARN_PIPE|5.006000||p
00959 WARN_PORTABLE|5.006000||p
00960 WARN_PRECEDENCE|5.006000||p
00961 WARN_PRINTF|5.006000||p
00962 WARN_PROTOTYPE|5.006000||p
00963 WARN_QW|5.006000||p
00964 WARN_RECURSION|5.006000||p
00965 WARN_REDEFINE|5.006000||p
00966 WARN_REGEXP|5.006000||p
00967 WARN_RESERVED|5.006000||p
00968 WARN_SEMICOLON|5.006000||p
00969 WARN_SEVERE|5.006000||p
00970 WARN_SIGNAL|5.006000||p
00971 WARN_SUBSTR|5.006000||p
00972 WARN_SYNTAX|5.006000||p
00973 WARN_TAINT|5.006000||p
00974 WARN_THREADS|5.008000||p
00975 WARN_UNINITIALIZED|5.006000||p
00976 WARN_UNOPENED|5.006000||p
00977 WARN_UNPACK|5.006000||p
00978 WARN_UNTIE|5.006000||p
00979 WARN_UTF8|5.006000||p
00980 WARN_VOID|5.006000||p
00981 XCPT_CATCH|5.009002||p
00982 XCPT_RETHROW|5.009002||p
00983 XCPT_TRY_END|5.009002||p
00984 XCPT_TRY_START|5.009002||p
00985 XPUSHi|||
00986 XPUSHmortal|5.009002||p
00987 XPUSHn|||
00988 XPUSHp|||
00989 XPUSHs|||
00990 XPUSHu|5.004000||p
00991 XSPROTO|5.010000||p
00992 XSRETURN_EMPTY|||
00993 XSRETURN_IV|||
00994 XSRETURN_NO|||
00995 XSRETURN_NV|||
00996 XSRETURN_PV|||
00997 XSRETURN_UNDEF|||
00998 XSRETURN_UV|5.008001||p
00999 XSRETURN_YES|||
01000 XSRETURN|||p
01001 XST_mIV|||
01002 XST_mNO|||
01003 XST_mNV|||
01004 XST_mPV|||
01005 XST_mUNDEF|||
01006 XST_mUV|5.008001||p
01007 XST_mYES|||
01008 XS_VERSION_BOOTCHECK|||
01009 XS_VERSION|||
01010 XSprePUSH|5.006000||p
01011 XS|||
01012 ZeroD|5.009002||p
01013 Zero|||
01014 _aMY_CXT|5.007003||p
01015 _pMY_CXT|5.007003||p
01016 aMY_CXT_|5.007003||p
01017 aMY_CXT|5.007003||p
01018 aTHXR_|5.011000||p
01019 aTHXR|5.011000||p
01020 aTHX_|5.006000||p
01021 aTHX|5.006000||p
01022 add_data|||n
01023 addmad|||
01024 allocmy|||
01025 amagic_call|||
01026 amagic_cmp_locale|||
01027 amagic_cmp|||
01028 amagic_i_ncmp|||
01029 amagic_ncmp|||
01030 any_dup|||
01031 ao|||
01032 append_elem|||
01033 append_list|||
01034 append_madprops|||
01035 apply_attrs_my|||
01036 apply_attrs_string||5.006001|
01037 apply_attrs|||
01038 apply|||
01039 atfork_lock||5.007003|n
01040 atfork_unlock||5.007003|n
01041 av_arylen_p||5.009003|
01042 av_clear|||
01043 av_create_and_push||5.009005|
01044 av_create_and_unshift_one||5.009005|
01045 av_delete||5.006000|
01046 av_exists||5.006000|
01047 av_extend|||
01048 av_fetch|||
01049 av_fill|||
01050 av_iter_p||5.011000|
01051 av_len|||
01052 av_make|||
01053 av_pop|||
01054 av_push|||
01055 av_reify|||
01056 av_shift|||
01057 av_store|||
01058 av_undef|||
01059 av_unshift|||
01060 ax|||n
01061 bad_type|||
01062 bind_match|||
01063 block_end|||
01064 block_gimme||5.004000|
01065 block_start|||
01066 boolSV|5.004000||p
01067 boot_core_PerlIO|||
01068 boot_core_UNIVERSAL|||
01069 boot_core_mro|||
01070 bytes_from_utf8||5.007001|
01071 bytes_to_uni|||n
01072 bytes_to_utf8||5.006001|
01073 call_argv|5.006000||p
01074 call_atexit||5.006000|
01075 call_list||5.004000|
01076 call_method|5.006000||p
01077 call_pv|5.006000||p
01078 call_sv|5.006000||p
01079 calloc||5.007002|n
01080 cando|||
01081 cast_i32||5.006000|
01082 cast_iv||5.006000|
01083 cast_ulong||5.006000|
01084 cast_uv||5.006000|
01085 check_type_and_open|||
01086 check_uni|||
01087 checkcomma|||
01088 checkposixcc|||
01089 ckWARN|5.006000||p
01090 ck_anoncode|||
01091 ck_bitop|||
01092 ck_concat|||
01093 ck_defined|||
01094 ck_delete|||
01095 ck_die|||
01096 ck_each|||
01097 ck_eof|||
01098 ck_eval|||
01099 ck_exec|||
01100 ck_exists|||
01101 ck_exit|||
01102 ck_ftst|||
01103 ck_fun|||
01104 ck_glob|||
01105 ck_grep|||
01106 ck_index|||
01107 ck_join|||
01108 ck_lfun|||
01109 ck_listiob|||
01110 ck_match|||
01111 ck_method|||
01112 ck_null|||
01113 ck_open|||
01114 ck_readline|||
01115 ck_repeat|||
01116 ck_require|||
01117 ck_return|||
01118 ck_rfun|||
01119 ck_rvconst|||
01120 ck_sassign|||
01121 ck_select|||
01122 ck_shift|||
01123 ck_sort|||
01124 ck_spair|||
01125 ck_split|||
01126 ck_subr|||
01127 ck_substr|||
01128 ck_svconst|||
01129 ck_trunc|||
01130 ck_unpack|||
01131 ckwarn_d||5.009003|
01132 ckwarn||5.009003|
01133 cl_and|||n
01134 cl_anything|||n
01135 cl_init_zero|||n
01136 cl_init|||n
01137 cl_is_anything|||n
01138 cl_or|||n
01139 clear_placeholders|||
01140 closest_cop|||
01141 convert|||
01142 cop_free|||
01143 cr_textfilter|||
01144 create_eval_scope|||
01145 croak_nocontext|||vn
01146 croak_xs_usage||5.011000|
01147 croak|||v
01148 csighandler||5.009003|n
01149 curmad|||
01150 custom_op_desc||5.007003|
01151 custom_op_name||5.007003|
01152 cv_ckproto_len|||
01153 cv_clone|||
01154 cv_const_sv||5.004000|
01155 cv_dump|||
01156 cv_undef|||
01157 cx_dump||5.005000|
01158 cx_dup|||
01159 cxinc|||
01160 dAXMARK|5.009003||p
01161 dAX|5.007002||p
01162 dITEMS|5.007002||p
01163 dMARK|||
01164 dMULTICALL||5.009003|
01165 dMY_CXT_SV|5.007003||p
01166 dMY_CXT|5.007003||p
01167 dNOOP|5.006000||p
01168 dORIGMARK|||
01169 dSP|||
01170 dTHR|5.004050||p
01171 dTHXR|5.011000||p
01172 dTHXa|5.006000||p
01173 dTHXoa|5.006000||p
01174 dTHX|5.006000||p
01175 dUNDERBAR|5.009002||p
01176 dVAR|5.009003||p
01177 dXCPT|5.009002||p
01178 dXSARGS|||
01179 dXSI32|||
01180 dXSTARG|5.006000||p
01181 deb_curcv|||
01182 deb_nocontext|||vn
01183 deb_stack_all|||
01184 deb_stack_n|||
01185 debop||5.005000|
01186 debprofdump||5.005000|
01187 debprof|||
01188 debstackptrs||5.007003|
01189 debstack||5.007003|
01190 debug_start_match|||
01191 deb||5.007003|v
01192 del_sv|||
01193 delete_eval_scope|||
01194 delimcpy||5.004000|
01195 deprecate_old|||
01196 deprecate|||
01197 despatch_signals||5.007001|
01198 destroy_matcher|||
01199 die_nocontext|||vn
01200 die_where|||
01201 die|||v
01202 dirp_dup|||
01203 div128|||
01204 djSP|||
01205 do_aexec5|||
01206 do_aexec|||
01207 do_aspawn|||
01208 do_binmode||5.004050|
01209 do_chomp|||
01210 do_chop|||
01211 do_close|||
01212 do_dump_pad|||
01213 do_eof|||
01214 do_exec3|||
01215 do_execfree|||
01216 do_exec|||
01217 do_gv_dump||5.006000|
01218 do_gvgv_dump||5.006000|
01219 do_hv_dump||5.006000|
01220 do_ipcctl|||
01221 do_ipcget|||
01222 do_join|||
01223 do_kv|||
01224 do_magic_dump||5.006000|
01225 do_msgrcv|||
01226 do_msgsnd|||
01227 do_oddball|||
01228 do_op_dump||5.006000|
01229 do_op_xmldump|||
01230 do_open9||5.006000|
01231 do_openn||5.007001|
01232 do_open||5.004000|
01233 do_pmop_dump||5.006000|
01234 do_pmop_xmldump|||
01235 do_print|||
01236 do_readline|||
01237 do_seek|||
01238 do_semop|||
01239 do_shmio|||
01240 do_smartmatch|||
01241 do_spawn_nowait|||
01242 do_spawn|||
01243 do_sprintf|||
01244 do_sv_dump||5.006000|
01245 do_sysseek|||
01246 do_tell|||
01247 do_trans_complex_utf8|||
01248 do_trans_complex|||
01249 do_trans_count_utf8|||
01250 do_trans_count|||
01251 do_trans_simple_utf8|||
01252 do_trans_simple|||
01253 do_trans|||
01254 do_vecget|||
01255 do_vecset|||
01256 do_vop|||
01257 docatch|||
01258 doeval|||
01259 dofile|||
01260 dofindlabel|||
01261 doform|||
01262 doing_taint||5.008001|n
01263 dooneliner|||
01264 doopen_pm|||
01265 doparseform|||
01266 dopoptoeval|||
01267 dopoptogiven|||
01268 dopoptolabel|||
01269 dopoptoloop|||
01270 dopoptosub_at|||
01271 dopoptowhen|||
01272 doref||5.009003|
01273 dounwind|||
01274 dowantarray|||
01275 dump_all||5.006000|
01276 dump_eval||5.006000|
01277 dump_exec_pos|||
01278 dump_fds|||
01279 dump_form||5.006000|
01280 dump_indent||5.006000|v
01281 dump_mstats|||
01282 dump_packsubs||5.006000|
01283 dump_sub||5.006000|
01284 dump_sv_child|||
01285 dump_trie_interim_list|||
01286 dump_trie_interim_table|||
01287 dump_trie|||
01288 dump_vindent||5.006000|
01289 dumpuntil|||
01290 dup_attrlist|||
01291 emulate_cop_io|||
01292 eval_pv|5.006000||p
01293 eval_sv|5.006000||p
01294 exec_failed|||
01295 expect_number|||
01296 fbm_compile||5.005000|
01297 fbm_instr||5.005000|
01298 feature_is_enabled|||
01299 fetch_cop_label||5.011000|
01300 filter_add|||
01301 filter_del|||
01302 filter_gets|||
01303 filter_read|||
01304 find_and_forget_pmops|||
01305 find_array_subscript|||
01306 find_beginning|||
01307 find_byclass|||
01308 find_hash_subscript|||
01309 find_in_my_stash|||
01310 find_runcv||5.008001|
01311 find_rundefsvoffset||5.009002|
01312 find_script|||
01313 find_uninit_var|||
01314 first_symbol|||n
01315 fold_constants|||
01316 forbid_setid|||
01317 force_ident|||
01318 force_list|||
01319 force_next|||
01320 force_version|||
01321 force_word|||
01322 forget_pmop|||
01323 form_nocontext|||vn
01324 form||5.004000|v
01325 fp_dup|||
01326 fprintf_nocontext|||vn
01327 free_global_struct|||
01328 free_tied_hv_pool|||
01329 free_tmps|||
01330 gen_constant_list|||
01331 get_arena|||
01332 get_aux_mg|||
01333 get_av|5.006000||p
01334 get_context||5.006000|n
01335 get_cvn_flags||5.009005|
01336 get_cv|5.006000||p
01337 get_db_sub|||
01338 get_debug_opts|||
01339 get_hash_seed|||
01340 get_hv|5.006000||p
01341 get_isa_hash|||
01342 get_mstats|||
01343 get_no_modify|||
01344 get_num|||
01345 get_op_descs||5.005000|
01346 get_op_names||5.005000|
01347 get_opargs|||
01348 get_ppaddr||5.006000|
01349 get_re_arg|||
01350 get_sv|5.006000||p
01351 get_vtbl||5.005030|
01352 getcwd_sv||5.007002|
01353 getenv_len|||
01354 glob_2number|||
01355 glob_assign_glob|||
01356 glob_assign_ref|||
01357 gp_dup|||
01358 gp_free|||
01359 gp_ref|||
01360 grok_bin|5.007003||p
01361 grok_hex|5.007003||p
01362 grok_number|5.007002||p
01363 grok_numeric_radix|5.007002||p
01364 grok_oct|5.007003||p
01365 group_end|||
01366 gv_AVadd|||
01367 gv_HVadd|||
01368 gv_IOadd|||
01369 gv_SVadd|||
01370 gv_autoload4||5.004000|
01371 gv_check|||
01372 gv_const_sv||5.009003|
01373 gv_dump||5.006000|
01374 gv_efullname3||5.004000|
01375 gv_efullname4||5.006001|
01376 gv_efullname|||
01377 gv_ename|||
01378 gv_fetchfile_flags||5.009005|
01379 gv_fetchfile|||
01380 gv_fetchmeth_autoload||5.007003|
01381 gv_fetchmethod_autoload||5.004000|
01382 gv_fetchmethod_flags||5.011000|
01383 gv_fetchmethod|||
01384 gv_fetchmeth|||
01385 gv_fetchpvn_flags|5.009002||p
01386 gv_fetchpvs|5.009004||p
01387 gv_fetchpv|||
01388 gv_fetchsv||5.009002|
01389 gv_fullname3||5.004000|
01390 gv_fullname4||5.006001|
01391 gv_fullname|||
01392 gv_get_super_pkg|||
01393 gv_handler||5.007001|
01394 gv_init_sv|||
01395 gv_init|||
01396 gv_name_set||5.009004|
01397 gv_stashpvn|5.004000||p
01398 gv_stashpvs|5.009003||p
01399 gv_stashpv|||
01400 gv_stashsv|||
01401 he_dup|||
01402 hek_dup|||
01403 hfreeentries|||
01404 hsplit|||
01405 hv_assert||5.011000|
01406 hv_auxinit|||n
01407 hv_backreferences_p|||
01408 hv_clear_placeholders||5.009001|
01409 hv_clear|||
01410 hv_common_key_len||5.010000|
01411 hv_common||5.010000|
01412 hv_copy_hints_hv|||
01413 hv_delayfree_ent||5.004000|
01414 hv_delete_common|||
01415 hv_delete_ent||5.004000|
01416 hv_delete|||
01417 hv_eiter_p||5.009003|
01418 hv_eiter_set||5.009003|
01419 hv_exists_ent||5.004000|
01420 hv_exists|||
01421 hv_fetch_ent||5.004000|
01422 hv_fetchs|5.009003||p
01423 hv_fetch|||
01424 hv_free_ent||5.004000|
01425 hv_iterinit|||
01426 hv_iterkeysv||5.004000|
01427 hv_iterkey|||
01428 hv_iternext_flags||5.008000|
01429 hv_iternextsv|||
01430 hv_iternext|||
01431 hv_iterval|||
01432 hv_kill_backrefs|||
01433 hv_ksplit||5.004000|
01434 hv_magic_check|||n
01435 hv_magic|||
01436 hv_name_set||5.009003|
01437 hv_notallowed|||
01438 hv_placeholders_get||5.009003|
01439 hv_placeholders_p||5.009003|
01440 hv_placeholders_set||5.009003|
01441 hv_riter_p||5.009003|
01442 hv_riter_set||5.009003|
01443 hv_scalar||5.009001|
01444 hv_store_ent||5.004000|
01445 hv_store_flags||5.008000|
01446 hv_stores|5.009004||p
01447 hv_store|||
01448 hv_undef|||
01449 ibcmp_locale||5.004000|
01450 ibcmp_utf8||5.007003|
01451 ibcmp|||
01452 incline|||
01453 incpush_if_exists|||
01454 incpush_use_sep|||
01455 incpush|||
01456 ingroup|||
01457 init_argv_symbols|||
01458 init_debugger|||
01459 init_global_struct|||
01460 init_i18nl10n||5.006000|
01461 init_i18nl14n||5.006000|
01462 init_ids|||
01463 init_interp|||
01464 init_main_stash|||
01465 init_perllib|||
01466 init_postdump_symbols|||
01467 init_predump_symbols|||
01468 init_stacks||5.005000|
01469 init_tm||5.007002|
01470 instr|||
01471 intro_my|||
01472 intuit_method|||
01473 intuit_more|||
01474 invert|||
01475 io_close|||
01476 isALNUMC|5.006000||p
01477 isALNUM|||
01478 isALPHA|||
01479 isASCII|5.006000||p
01480 isBLANK|5.006001||p
01481 isCNTRL|5.006000||p
01482 isDIGIT|||
01483 isGRAPH|5.006000||p
01484 isGV_with_GP|5.009004||p
01485 isLOWER|||
01486 isPRINT|5.004000||p
01487 isPSXSPC|5.006001||p
01488 isPUNCT|5.006000||p
01489 isSPACE|||
01490 isUPPER|||
01491 isXDIGIT|5.006000||p
01492 is_an_int|||
01493 is_gv_magical_sv|||
01494 is_handle_constructor|||n
01495 is_list_assignment|||
01496 is_lvalue_sub||5.007001|
01497 is_uni_alnum_lc||5.006000|
01498 is_uni_alnumc_lc||5.006000|
01499 is_uni_alnumc||5.006000|
01500 is_uni_alnum||5.006000|
01501 is_uni_alpha_lc||5.006000|
01502 is_uni_alpha||5.006000|
01503 is_uni_ascii_lc||5.006000|
01504 is_uni_ascii||5.006000|
01505 is_uni_cntrl_lc||5.006000|
01506 is_uni_cntrl||5.006000|
01507 is_uni_digit_lc||5.006000|
01508 is_uni_digit||5.006000|
01509 is_uni_graph_lc||5.006000|
01510 is_uni_graph||5.006000|
01511 is_uni_idfirst_lc||5.006000|
01512 is_uni_idfirst||5.006000|
01513 is_uni_lower_lc||5.006000|
01514 is_uni_lower||5.006000|
01515 is_uni_print_lc||5.006000|
01516 is_uni_print||5.006000|
01517 is_uni_punct_lc||5.006000|
01518 is_uni_punct||5.006000|
01519 is_uni_space_lc||5.006000|
01520 is_uni_space||5.006000|
01521 is_uni_upper_lc||5.006000|
01522 is_uni_upper||5.006000|
01523 is_uni_xdigit_lc||5.006000|
01524 is_uni_xdigit||5.006000|
01525 is_utf8_alnumc||5.006000|
01526 is_utf8_alnum||5.006000|
01527 is_utf8_alpha||5.006000|
01528 is_utf8_ascii||5.006000|
01529 is_utf8_char_slow|||n
01530 is_utf8_char||5.006000|
01531 is_utf8_cntrl||5.006000|
01532 is_utf8_common|||
01533 is_utf8_digit||5.006000|
01534 is_utf8_graph||5.006000|
01535 is_utf8_idcont||5.008000|
01536 is_utf8_idfirst||5.006000|
01537 is_utf8_lower||5.006000|
01538 is_utf8_mark||5.006000|
01539 is_utf8_print||5.006000|
01540 is_utf8_punct||5.006000|
01541 is_utf8_space||5.006000|
01542 is_utf8_string_loclen||5.009003|
01543 is_utf8_string_loc||5.008001|
01544 is_utf8_string||5.006001|
01545 is_utf8_upper||5.006000|
01546 is_utf8_xdigit||5.006000|
01547 isa_lookup|||
01548 items|||n
01549 ix|||n
01550 jmaybe|||
01551 join_exact|||
01552 keyword|||
01553 leave_scope|||
01554 lex_end|||
01555 lex_start|||
01556 linklist|||
01557 listkids|||
01558 list|||
01559 load_module_nocontext|||vn
01560 load_module|5.006000||pv
01561 localize|||
01562 looks_like_bool|||
01563 looks_like_number|||
01564 lop|||
01565 mPUSHi|5.009002||p
01566 mPUSHn|5.009002||p
01567 mPUSHp|5.009002||p
01568 mPUSHs|5.011000||p
01569 mPUSHu|5.009002||p
01570 mXPUSHi|5.009002||p
01571 mXPUSHn|5.009002||p
01572 mXPUSHp|5.009002||p
01573 mXPUSHs|5.011000||p
01574 mXPUSHu|5.009002||p
01575 mad_free|||
01576 madlex|||
01577 madparse|||
01578 magic_clear_all_env|||
01579 magic_clearenv|||
01580 magic_clearhint|||
01581 magic_clearisa|||
01582 magic_clearpack|||
01583 magic_clearsig|||
01584 magic_dump||5.006000|
01585 magic_existspack|||
01586 magic_freearylen_p|||
01587 magic_freeovrld|||
01588 magic_getarylen|||
01589 magic_getdefelem|||
01590 magic_getnkeys|||
01591 magic_getpack|||
01592 magic_getpos|||
01593 magic_getsig|||
01594 magic_getsubstr|||
01595 magic_gettaint|||
01596 magic_getuvar|||
01597 magic_getvec|||
01598 magic_get|||
01599 magic_killbackrefs|||
01600 magic_len|||
01601 magic_methcall|||
01602 magic_methpack|||
01603 magic_nextpack|||
01604 magic_regdata_cnt|||
01605 magic_regdatum_get|||
01606 magic_regdatum_set|||
01607 magic_scalarpack|||
01608 magic_set_all_env|||
01609 magic_setamagic|||
01610 magic_setarylen|||
01611 magic_setcollxfrm|||
01612 magic_setdbline|||
01613 magic_setdefelem|||
01614 magic_setenv|||
01615 magic_sethint|||
01616 magic_setisa|||
01617 magic_setmglob|||
01618 magic_setnkeys|||
01619 magic_setpack|||
01620 magic_setpos|||
01621 magic_setregexp|||
01622 magic_setsig|||
01623 magic_setsubstr|||
01624 magic_settaint|||
01625 magic_setutf8|||
01626 magic_setuvar|||
01627 magic_setvec|||
01628 magic_set|||
01629 magic_sizepack|||
01630 magic_wipepack|||
01631 make_matcher|||
01632 make_trie_failtable|||
01633 make_trie|||
01634 malloc_good_size|||n
01635 malloced_size|||n
01636 malloc||5.007002|n
01637 markstack_grow|||
01638 matcher_matches_sv|||
01639 measure_struct|||
01640 memEQ|5.004000||p
01641 memNE|5.004000||p
01642 mem_collxfrm|||
01643 mem_log_common|||n
01644 mess_alloc|||
01645 mess_nocontext|||vn
01646 mess||5.006000|v
01647 method_common|||
01648 mfree||5.007002|n
01649 mg_clear|||
01650 mg_copy|||
01651 mg_dup|||
01652 mg_find|||
01653 mg_free|||
01654 mg_get|||
01655 mg_length||5.005000|
01656 mg_localize|||
01657 mg_magical|||
01658 mg_set|||
01659 mg_size||5.005000|
01660 mini_mktime||5.007002|
01661 missingterm|||
01662 mode_from_discipline|||
01663 modkids|||
01664 mod|||
01665 more_bodies|||
01666 more_sv|||
01667 moreswitches|||
01668 mro_get_from_name||5.011000|
01669 mro_get_linear_isa_dfs|||
01670 mro_get_linear_isa||5.009005|
01671 mro_get_private_data||5.011000|
01672 mro_isa_changed_in|||
01673 mro_meta_dup|||
01674 mro_meta_init|||
01675 mro_method_changed_in||5.009005|
01676 mro_register||5.011000|
01677 mro_set_mro||5.011000|
01678 mro_set_private_data||5.011000|
01679 mul128|||
01680 mulexp10|||n
01681 my_atof2||5.007002|
01682 my_atof||5.006000|
01683 my_attrs|||
01684 my_bcopy|||n
01685 my_betoh16|||n
01686 my_betoh32|||n
01687 my_betoh64|||n
01688 my_betohi|||n
01689 my_betohl|||n
01690 my_betohs|||n
01691 my_bzero|||n
01692 my_chsize|||
01693 my_clearenv|||
01694 my_cxt_index|||
01695 my_cxt_init|||
01696 my_dirfd||5.009005|
01697 my_exit_jump|||
01698 my_exit|||
01699 my_failure_exit||5.004000|
01700 my_fflush_all||5.006000|
01701 my_fork||5.007003|n
01702 my_htobe16|||n
01703 my_htobe32|||n
01704 my_htobe64|||n
01705 my_htobei|||n
01706 my_htobel|||n
01707 my_htobes|||n
01708 my_htole16|||n
01709 my_htole32|||n
01710 my_htole64|||n
01711 my_htolei|||n
01712 my_htolel|||n
01713 my_htoles|||n
01714 my_htonl|||
01715 my_kid|||
01716 my_letoh16|||n
01717 my_letoh32|||n
01718 my_letoh64|||n
01719 my_letohi|||n
01720 my_letohl|||n
01721 my_letohs|||n
01722 my_lstat|||
01723 my_memcmp||5.004000|n
01724 my_memset|||n
01725 my_ntohl|||
01726 my_pclose||5.004000|
01727 my_popen_list||5.007001|
01728 my_popen||5.004000|
01729 my_setenv|||
01730 my_snprintf|5.009004||pvn
01731 my_socketpair||5.007003|n
01732 my_sprintf|5.009003||pvn
01733 my_stat|||
01734 my_strftime||5.007002|
01735 my_strlcat|5.009004||pn
01736 my_strlcpy|5.009004||pn
01737 my_swabn|||n
01738 my_swap|||
01739 my_unexec|||
01740 my_vsnprintf||5.009004|n
01741 need_utf8|||n
01742 newANONATTRSUB||5.006000|
01743 newANONHASH|||
01744 newANONLIST|||
01745 newANONSUB|||
01746 newASSIGNOP|||
01747 newATTRSUB||5.006000|
01748 newAVREF|||
01749 newAV|||
01750 newBINOP|||
01751 newCONDOP|||
01752 newCONSTSUB|5.004050||p
01753 newCVREF|||
01754 newDEFSVOP|||
01755 newFORM|||
01756 newFOROP|||
01757 newGIVENOP||5.009003|
01758 newGIVWHENOP|||
01759 newGP|||
01760 newGVOP|||
01761 newGVREF|||
01762 newGVgen|||
01763 newHVREF|||
01764 newHVhv||5.005000|
01765 newHV|||
01766 newIO|||
01767 newLISTOP|||
01768 newLOGOP|||
01769 newLOOPEX|||
01770 newLOOPOP|||
01771 newMADPROP|||
01772 newMADsv|||
01773 newMYSUB|||
01774 newNULLLIST|||
01775 newOP|||
01776 newPADOP|||
01777 newPMOP|||
01778 newPROG|||
01779 newPVOP|||
01780 newRANGE|||
01781 newRV_inc|5.004000||p
01782 newRV_noinc|5.004000||p
01783 newRV|||
01784 newSLICEOP|||
01785 newSTATEOP|||
01786 newSUB|||
01787 newSVOP|||
01788 newSVREF|||
01789 newSV_type|5.009005||p
01790 newSVhek||5.009003|
01791 newSViv|||
01792 newSVnv|||
01793 newSVpvf_nocontext|||vn
01794 newSVpvf||5.004000|v
01795 newSVpvn_flags|5.011000||p
01796 newSVpvn_share|5.007001||p
01797 newSVpvn_utf8|5.011000||p
01798 newSVpvn|5.004050||p
01799 newSVpvs_flags|5.011000||p
01800 newSVpvs_share||5.009003|
01801 newSVpvs|5.009003||p
01802 newSVpv|||
01803 newSVrv|||
01804 newSVsv|||
01805 newSVuv|5.006000||p
01806 newSV|||
01807 newTOKEN|||
01808 newUNOP|||
01809 newWHENOP||5.009003|
01810 newWHILEOP||5.009003|
01811 newXS_flags||5.009004|
01812 newXSproto||5.006000|
01813 newXS||5.006000|
01814 new_collate||5.006000|
01815 new_constant|||
01816 new_ctype||5.006000|
01817 new_he|||
01818 new_logop|||
01819 new_numeric||5.006000|
01820 new_stackinfo||5.005000|
01821 new_version||5.009000|
01822 new_warnings_bitfield|||
01823 next_symbol|||
01824 nextargv|||
01825 nextchar|||
01826 ninstr|||
01827 no_bareword_allowed|||
01828 no_fh_allowed|||
01829 no_op|||
01830 not_a_number|||
01831 nothreadhook||5.008000|
01832 nuke_stacks|||
01833 num_overflow|||n
01834 offer_nice_chunk|||
01835 oopsAV|||
01836 oopsHV|||
01837 op_clear|||
01838 op_const_sv|||
01839 op_dump||5.006000|
01840 op_free|||
01841 op_getmad_weak|||
01842 op_getmad|||
01843 op_null||5.007002|
01844 op_refcnt_dec|||
01845 op_refcnt_inc|||
01846 op_refcnt_lock||5.009002|
01847 op_refcnt_unlock||5.009002|
01848 op_xmldump|||
01849 open_script|||
01850 pMY_CXT_|5.007003||p
01851 pMY_CXT|5.007003||p
01852 pTHX_|5.006000||p
01853 pTHX|5.006000||p
01854 packWARN|5.007003||p
01855 pack_cat||5.007003|
01856 pack_rec|||
01857 package|||
01858 packlist||5.008001|
01859 pad_add_anon|||
01860 pad_add_name|||
01861 pad_alloc|||
01862 pad_block_start|||
01863 pad_check_dup|||
01864 pad_compname_type|||
01865 pad_findlex|||
01866 pad_findmy|||
01867 pad_fixup_inner_anons|||
01868 pad_free|||
01869 pad_leavemy|||
01870 pad_new|||
01871 pad_peg|||n
01872 pad_push|||
01873 pad_reset|||
01874 pad_setsv|||
01875 pad_sv||5.011000|
01876 pad_swipe|||
01877 pad_tidy|||
01878 pad_undef|||
01879 parse_body|||
01880 parse_unicode_opts|||
01881 parser_dup|||
01882 parser_free|||
01883 path_is_absolute|||n
01884 peep|||
01885 pending_Slabs_to_ro|||
01886 perl_alloc_using|||n
01887 perl_alloc|||n
01888 perl_clone_using|||n
01889 perl_clone|||n
01890 perl_construct|||n
01891 perl_destruct||5.007003|n
01892 perl_free|||n
01893 perl_parse||5.006000|n
01894 perl_run|||n
01895 pidgone|||
01896 pm_description|||
01897 pmflag|||
01898 pmop_dump||5.006000|
01899 pmop_xmldump|||
01900 pmruntime|||
01901 pmtrans|||
01902 pop_scope|||
01903 pregcomp||5.009005|
01904 pregexec|||
01905 pregfree2||5.011000|
01906 pregfree|||
01907 prepend_elem|||
01908 prepend_madprops|||
01909 printbuf|||
01910 printf_nocontext|||vn
01911 process_special_blocks|||
01912 ptr_table_clear||5.009005|
01913 ptr_table_fetch||5.009005|
01914 ptr_table_find|||n
01915 ptr_table_free||5.009005|
01916 ptr_table_new||5.009005|
01917 ptr_table_split||5.009005|
01918 ptr_table_store||5.009005|
01919 push_scope|||
01920 put_byte|||
01921 pv_display|5.006000||p
01922 pv_escape|5.009004||p
01923 pv_pretty|5.009004||p
01924 pv_uni_display||5.007003|
01925 qerror|||
01926 qsortsvu|||
01927 re_compile||5.009005|
01928 re_croak2|||
01929 re_dup_guts|||
01930 re_intuit_start||5.009005|
01931 re_intuit_string||5.006000|
01932 readpipe_override|||
01933 realloc||5.007002|n
01934 reentrant_free|||
01935 reentrant_init|||
01936 reentrant_retry|||vn
01937 reentrant_size|||
01938 ref_array_or_hash|||
01939 refcounted_he_chain_2hv|||
01940 refcounted_he_fetch|||
01941 refcounted_he_free|||
01942 refcounted_he_new_common|||
01943 refcounted_he_new|||
01944 refcounted_he_value|||
01945 refkids|||
01946 refto|||
01947 ref||5.011000|
01948 reg_check_named_buff_matched|||
01949 reg_named_buff_all||5.009005|
01950 reg_named_buff_exists||5.009005|
01951 reg_named_buff_fetch||5.009005|
01952 reg_named_buff_firstkey||5.009005|
01953 reg_named_buff_iter|||
01954 reg_named_buff_nextkey||5.009005|
01955 reg_named_buff_scalar||5.009005|
01956 reg_named_buff|||
01957 reg_namedseq|||
01958 reg_node|||
01959 reg_numbered_buff_fetch|||
01960 reg_numbered_buff_length|||
01961 reg_numbered_buff_store|||
01962 reg_qr_package|||
01963 reg_recode|||
01964 reg_scan_name|||
01965 reg_skipcomment|||
01966 reg_temp_copy|||
01967 reganode|||
01968 regatom|||
01969 regbranch|||
01970 regclass_swash||5.009004|
01971 regclass|||
01972 regcppop|||
01973 regcppush|||
01974 regcurly|||n
01975 regdump_extflags|||
01976 regdump||5.005000|
01977 regdupe_internal|||
01978 regexec_flags||5.005000|
01979 regfree_internal||5.009005|
01980 reghop3|||n
01981 reghop4|||n
01982 reghopmaybe3|||n
01983 reginclass|||
01984 reginitcolors||5.006000|
01985 reginsert|||
01986 regmatch|||
01987 regnext||5.005000|
01988 regpiece|||
01989 regpposixcc|||
01990 regprop|||
01991 regrepeat|||
01992 regtail_study|||
01993 regtail|||
01994 regtry|||
01995 reguni|||
01996 regwhite|||n
01997 reg|||
01998 repeatcpy|||
01999 report_evil_fh|||
02000 report_uninit|||
02001 require_pv||5.006000|
02002 require_tie_mod|||
02003 restore_magic|||
02004 rninstr|||
02005 rsignal_restore|||
02006 rsignal_save|||
02007 rsignal_state||5.004000|
02008 rsignal||5.004000|
02009 run_body|||
02010 run_user_filter|||
02011 runops_debug||5.005000|
02012 runops_standard||5.005000|
02013 rvpv_dup|||
02014 rxres_free|||
02015 rxres_restore|||
02016 rxres_save|||
02017 safesyscalloc||5.006000|n
02018 safesysfree||5.006000|n
02019 safesysmalloc||5.006000|n
02020 safesysrealloc||5.006000|n
02021 same_dirent|||
02022 save_I16||5.004000|
02023 save_I32|||
02024 save_I8||5.006000|
02025 save_adelete||5.011000|
02026 save_aelem||5.004050|
02027 save_alloc||5.006000|
02028 save_aptr|||
02029 save_ary|||
02030 save_bool||5.008001|
02031 save_clearsv|||
02032 save_delete|||
02033 save_destructor_x||5.006000|
02034 save_destructor||5.006000|
02035 save_freeop|||
02036 save_freepv|||
02037 save_freesv|||
02038 save_generic_pvref||5.006001|
02039 save_generic_svref||5.005030|
02040 save_gp||5.004000|
02041 save_hash|||
02042 save_hek_flags|||n
02043 save_helem_flags||5.011000|
02044 save_helem||5.004050|
02045 save_hints|||
02046 save_hptr|||
02047 save_int|||
02048 save_item|||
02049 save_iv||5.005000|
02050 save_lines|||
02051 save_list|||
02052 save_long|||
02053 save_magic|||
02054 save_mortalizesv||5.007001|
02055 save_nogv|||
02056 save_op|||
02057 save_padsv_and_mortalize||5.011000|
02058 save_pptr|||
02059 save_pushi32ptr|||
02060 save_pushptri32ptr|||
02061 save_pushptrptr|||
02062 save_pushptr||5.011000|
02063 save_re_context||5.006000|
02064 save_scalar_at|||
02065 save_scalar|||
02066 save_set_svflags||5.009000|
02067 save_shared_pvref||5.007003|
02068 save_sptr|||
02069 save_svref|||
02070 save_vptr||5.006000|
02071 savepvn|||
02072 savepvs||5.009003|
02073 savepv|||
02074 savesharedpvn||5.009005|
02075 savesharedpv||5.007003|
02076 savestack_grow_cnt||5.008001|
02077 savestack_grow|||
02078 savesvpv||5.009002|
02079 sawparens|||
02080 scalar_mod_type|||n
02081 scalarboolean|||
02082 scalarkids|||
02083 scalarseq|||
02084 scalarvoid|||
02085 scalar|||
02086 scan_bin||5.006000|
02087 scan_commit|||
02088 scan_const|||
02089 scan_formline|||
02090 scan_heredoc|||
02091 scan_hex|||
02092 scan_ident|||
02093 scan_inputsymbol|||
02094 scan_num||5.007001|
02095 scan_oct|||
02096 scan_pat|||
02097 scan_str|||
02098 scan_subst|||
02099 scan_trans|||
02100 scan_version||5.009001|
02101 scan_vstring||5.009005|
02102 scan_word|||
02103 scope|||
02104 screaminstr||5.005000|
02105 search_const|||
02106 seed||5.008001|
02107 sequence_num|||
02108 sequence_tail|||
02109 sequence|||
02110 set_context||5.006000|n
02111 set_numeric_local||5.006000|
02112 set_numeric_radix||5.006000|
02113 set_numeric_standard||5.006000|
02114 setdefout|||
02115 share_hek_flags|||
02116 share_hek||5.004000|
02117 si_dup|||
02118 sighandler|||n
02119 simplify_sort|||
02120 skipspace0|||
02121 skipspace1|||
02122 skipspace2|||
02123 skipspace|||
02124 softref2xv|||
02125 sortcv_stacked|||
02126 sortcv_xsub|||
02127 sortcv|||
02128 sortsv_flags||5.009003|
02129 sortsv||5.007003|
02130 space_join_names_mortal|||
02131 ss_dup|||
02132 stack_grow|||
02133 start_force|||
02134 start_glob|||
02135 start_subparse||5.004000|
02136 stashpv_hvname_match||5.011000|
02137 stdize_locale|||
02138 store_cop_label|||
02139 strEQ|||
02140 strGE|||
02141 strGT|||
02142 strLE|||
02143 strLT|||
02144 strNE|||
02145 str_to_version||5.006000|
02146 strip_return|||
02147 strnEQ|||
02148 strnNE|||
02149 study_chunk|||
02150 sub_crush_depth|||
02151 sublex_done|||
02152 sublex_push|||
02153 sublex_start|||
02154 sv_2bool|||
02155 sv_2cv|||
02156 sv_2io|||
02157 sv_2iuv_common|||
02158 sv_2iuv_non_preserve|||
02159 sv_2iv_flags||5.009001|
02160 sv_2iv|||
02161 sv_2mortal|||
02162 sv_2num|||
02163 sv_2nv|||
02164 sv_2pv_flags|5.007002||p
02165 sv_2pv_nolen|5.006000||p
02166 sv_2pvbyte_nolen|5.006000||p
02167 sv_2pvbyte|5.006000||p
02168 sv_2pvutf8_nolen||5.006000|
02169 sv_2pvutf8||5.006000|
02170 sv_2pv|||
02171 sv_2uv_flags||5.009001|
02172 sv_2uv|5.004000||p
02173 sv_add_arena|||
02174 sv_add_backref|||
02175 sv_backoff|||
02176 sv_bless|||
02177 sv_cat_decode||5.008001|
02178 sv_catpv_mg|5.004050||p
02179 sv_catpvf_mg_nocontext|||pvn
02180 sv_catpvf_mg|5.006000|5.004000|pv
02181 sv_catpvf_nocontext|||vn
02182 sv_catpvf||5.004000|v
02183 sv_catpvn_flags||5.007002|
02184 sv_catpvn_mg|5.004050||p
02185 sv_catpvn_nomg|5.007002||p
02186 sv_catpvn|||
02187 sv_catpvs|5.009003||p
02188 sv_catpv|||
02189 sv_catsv_flags||5.007002|
02190 sv_catsv_mg|5.004050||p
02191 sv_catsv_nomg|5.007002||p
02192 sv_catsv|||
02193 sv_catxmlpvn|||
02194 sv_catxmlsv|||
02195 sv_chop|||
02196 sv_clean_all|||
02197 sv_clean_objs|||
02198 sv_clear|||
02199 sv_cmp_locale||5.004000|
02200 sv_cmp|||
02201 sv_collxfrm|||
02202 sv_compile_2op||5.008001|
02203 sv_copypv||5.007003|
02204 sv_dec|||
02205 sv_del_backref|||
02206 sv_derived_from||5.004000|
02207 sv_destroyable||5.010000|
02208 sv_does||5.009004|
02209 sv_dump|||
02210 sv_dup_inc_multiple|||
02211 sv_dup|||
02212 sv_eq|||
02213 sv_exp_grow|||
02214 sv_force_normal_flags||5.007001|
02215 sv_force_normal||5.006000|
02216 sv_free2|||
02217 sv_free_arenas|||
02218 sv_free|||
02219 sv_gets||5.004000|
02220 sv_grow|||
02221 sv_i_ncmp|||
02222 sv_inc|||
02223 sv_insert_flags||5.011000|
02224 sv_insert|||
02225 sv_isa|||
02226 sv_isobject|||
02227 sv_iv||5.005000|
02228 sv_kill_backrefs|||
02229 sv_len_utf8||5.006000|
02230 sv_len|||
02231 sv_magic_portable|5.011000|5.004000|p
02232 sv_magicext||5.007003|
02233 sv_magic|||
02234 sv_mortalcopy|||
02235 sv_ncmp|||
02236 sv_newmortal|||
02237 sv_newref|||
02238 sv_nolocking||5.007003|
02239 sv_nosharing||5.007003|
02240 sv_nounlocking|||
02241 sv_nv||5.005000|
02242 sv_peek||5.005000|
02243 sv_pos_b2u_midway|||
02244 sv_pos_b2u||5.006000|
02245 sv_pos_u2b_cached|||
02246 sv_pos_u2b_forwards|||n
02247 sv_pos_u2b_midway|||n
02248 sv_pos_u2b||5.006000|
02249 sv_pvbyten_force||5.006000|
02250 sv_pvbyten||5.006000|
02251 sv_pvbyte||5.006000|
02252 sv_pvn_force_flags|5.007002||p
02253 sv_pvn_force|||
02254 sv_pvn_nomg|5.007003|5.005000|p
02255 sv_pvn||5.005000|
02256 sv_pvutf8n_force||5.006000|
02257 sv_pvutf8n||5.006000|
02258 sv_pvutf8||5.006000|
02259 sv_pv||5.006000|
02260 sv_recode_to_utf8||5.007003|
02261 sv_reftype|||
02262 sv_release_COW|||
02263 sv_replace|||
02264 sv_report_used|||
02265 sv_reset|||
02266 sv_rvweaken||5.006000|
02267 sv_setiv_mg|5.004050||p
02268 sv_setiv|||
02269 sv_setnv_mg|5.006000||p
02270 sv_setnv|||
02271 sv_setpv_mg|5.004050||p
02272 sv_setpvf_mg_nocontext|||pvn
02273 sv_setpvf_mg|5.006000|5.004000|pv
02274 sv_setpvf_nocontext|||vn
02275 sv_setpvf||5.004000|v
02276 sv_setpviv_mg||5.008001|
02277 sv_setpviv||5.008001|
02278 sv_setpvn_mg|5.004050||p
02279 sv_setpvn|||
02280 sv_setpvs|5.009004||p
02281 sv_setpv|||
02282 sv_setref_iv|||
02283 sv_setref_nv|||
02284 sv_setref_pvn|||
02285 sv_setref_pv|||
02286 sv_setref_uv||5.007001|
02287 sv_setsv_cow|||
02288 sv_setsv_flags||5.007002|
02289 sv_setsv_mg|5.004050||p
02290 sv_setsv_nomg|5.007002||p
02291 sv_setsv|||
02292 sv_setuv_mg|5.004050||p
02293 sv_setuv|5.004000||p
02294 sv_tainted||5.004000|
02295 sv_taint||5.004000|
02296 sv_true||5.005000|
02297 sv_unglob|||
02298 sv_uni_display||5.007003|
02299 sv_unmagic|||
02300 sv_unref_flags||5.007001|
02301 sv_unref|||
02302 sv_untaint||5.004000|
02303 sv_upgrade|||
02304 sv_usepvn_flags||5.009004|
02305 sv_usepvn_mg|5.004050||p
02306 sv_usepvn|||
02307 sv_utf8_decode||5.006000|
02308 sv_utf8_downgrade||5.006000|
02309 sv_utf8_encode||5.006000|
02310 sv_utf8_upgrade_flags_grow||5.011000|
02311 sv_utf8_upgrade_flags||5.007002|
02312 sv_utf8_upgrade_nomg||5.007002|
02313 sv_utf8_upgrade||5.007001|
02314 sv_uv|5.005000||p
02315 sv_vcatpvf_mg|5.006000|5.004000|p
02316 sv_vcatpvfn||5.004000|
02317 sv_vcatpvf|5.006000|5.004000|p
02318 sv_vsetpvf_mg|5.006000|5.004000|p
02319 sv_vsetpvfn||5.004000|
02320 sv_vsetpvf|5.006000|5.004000|p
02321 sv_xmlpeek|||
02322 svtype|||
02323 swallow_bom|||
02324 swap_match_buff|||
02325 swash_fetch||5.007002|
02326 swash_get|||
02327 swash_init||5.006000|
02328 sys_init3||5.010000|n
02329 sys_init||5.010000|n
02330 sys_intern_clear|||
02331 sys_intern_dup|||
02332 sys_intern_init|||
02333 sys_term||5.010000|n
02334 taint_env|||
02335 taint_proper|||
02336 tmps_grow||5.006000|
02337 toLOWER|||
02338 toUPPER|||
02339 to_byte_substr|||
02340 to_uni_fold||5.007003|
02341 to_uni_lower_lc||5.006000|
02342 to_uni_lower||5.007003|
02343 to_uni_title_lc||5.006000|
02344 to_uni_title||5.007003|
02345 to_uni_upper_lc||5.006000|
02346 to_uni_upper||5.007003|
02347 to_utf8_case||5.007003|
02348 to_utf8_fold||5.007003|
02349 to_utf8_lower||5.007003|
02350 to_utf8_substr|||
02351 to_utf8_title||5.007003|
02352 to_utf8_upper||5.007003|
02353 token_free|||
02354 token_getmad|||
02355 tokenize_use|||
02356 tokeq|||
02357 tokereport|||
02358 too_few_arguments|||
02359 too_many_arguments|||
02360 uiv_2buf|||n
02361 unlnk|||
02362 unpack_rec|||
02363 unpack_str||5.007003|
02364 unpackstring||5.008001|
02365 unshare_hek_or_pvn|||
02366 unshare_hek|||
02367 unsharepvn||5.004000|
02368 unwind_handler_stack|||
02369 update_debugger_info|||
02370 upg_version||5.009005|
02371 usage|||
02372 utf16_to_utf8_reversed||5.006001|
02373 utf16_to_utf8||5.006001|
02374 utf8_distance||5.006000|
02375 utf8_hop||5.006000|
02376 utf8_length||5.007001|
02377 utf8_mg_pos_cache_update|||
02378 utf8_to_bytes||5.006001|
02379 utf8_to_uvchr||5.007001|
02380 utf8_to_uvuni||5.007001|
02381 utf8n_to_uvchr|||
02382 utf8n_to_uvuni||5.007001|
02383 utilize|||
02384 uvchr_to_utf8_flags||5.007003|
02385 uvchr_to_utf8|||
02386 uvuni_to_utf8_flags||5.007003|
02387 uvuni_to_utf8||5.007001|
02388 validate_suid|||
02389 varname|||
02390 vcmp||5.009000|
02391 vcroak||5.006000|
02392 vdeb||5.007003|
02393 vdie_common|||
02394 vdie_croak_common|||
02395 vdie|||
02396 vform||5.006000|
02397 visit|||
02398 vivify_defelem|||
02399 vivify_ref|||
02400 vload_module|5.006000||p
02401 vmess||5.006000|
02402 vnewSVpvf|5.006000|5.004000|p
02403 vnormal||5.009002|
02404 vnumify||5.009000|
02405 vstringify||5.009000|
02406 vverify||5.009003|
02407 vwarner||5.006000|
02408 vwarn||5.006000|
02409 wait4pid|||
02410 warn_nocontext|||vn
02411 warner_nocontext|||vn
02412 warner|5.006000|5.004000|pv
02413 warn|||v
02414 watch|||
02415 whichsig|||
02416 write_no_mem|||
02417 write_to_stderr|||
02418 xmldump_all|||
02419 xmldump_attr|||
02420 xmldump_eval|||
02421 xmldump_form|||
02422 xmldump_indent|||v
02423 xmldump_packsubs|||
02424 xmldump_sub|||
02425 xmldump_vindent|||
02426 yyerror|||
02427 yylex|||
02428 yyparse|||
02429 yywarn|||
02430 );
02431 
02432 if (exists $opt{'list-unsupported'}) {
02433   my $f;
02434   for $f (sort { lc $a cmp lc $b } keys %API) {
02435     next unless $API{$f}{todo};
02436     print "$f ", '.'x(40-length($f)), " ", format_version($API{$f}{todo}), "\n";
02437   }
02438   exit 0;
02439 }
02440 
02441 # Scan for possible replacement candidates
02442 
02443 my(%replace, %need, %hints, %warnings, %depends);
02444 my $replace = 0;
02445 my($hint, $define, $function);
02446 
02447 sub find_api
02448 {
02449   my $code = shift;
02450   $code =~ s{
02451     / (?: \*[^*]*\*+(?:[^$ccs][^*]*\*+)* / | /[^\r\n]*)
02452   | "[^"\\]*(?:\\.[^"\\]*)*"
02453   | '[^'\\]*(?:\\.[^'\\]*)*' }{}egsx;
02454   grep { exists $API{$_} } $code =~ /(\w+)/mg;
02455 }
02456 
02457 while (<DATA>) {
02458   if ($hint) {
02459     my $h = $hint->[0] eq 'Hint' ? \%hints : \%warnings;
02460     if (m{^\s*\*\s(.*?)\s*$}) {
02461       for (@{$hint->[1]}) {
02462         $h->{$_} ||= '';  # suppress warning with older perls
02463         $h->{$_} .= "$1\n";
02464       }
02465     }
02466     else { undef $hint }
02467   }
02468 
02469   $hint = [$1, [split /,?\s+/, $2]]
02470       if m{^\s*$rccs\s+(Hint|Warning):\s+(\w+(?:,?\s+\w+)*)\s*$};
02471 
02472   if ($define) {
02473     if ($define->[1] =~ /\\$/) {
02474       $define->[1] .= $_;
02475     }
02476     else {
02477       if (exists $API{$define->[0]} && $define->[1] !~ /^DPPP_\(/) {
02478         my @n = find_api($define->[1]);
02479         push @{$depends{$define->[0]}}, @n if @n
02480       }
02481       undef $define;
02482     }
02483   }
02484 
02485   $define = [$1, $2] if m{^\s*#\s*define\s+(\w+)(?:\([^)]*\))?\s+(.*)};
02486 
02487   if ($function) {
02488     if (/^}/) {
02489       if (exists $API{$function->[0]}) {
02490         my @n = find_api($function->[1]);
02491         push @{$depends{$function->[0]}}, @n if @n
02492       }
02493       undef $function;
02494     }
02495     else {
02496       $function->[1] .= $_;
02497     }
02498   }
02499 
02500   $function = [$1, ''] if m{^DPPP_\(my_(\w+)\)};
02501 
02502   $replace     = $1 if m{^\s*$rccs\s+Replace:\s+(\d+)\s+$rcce\s*$};
02503   $replace{$2} = $1 if $replace and m{^\s*#\s*define\s+(\w+)(?:\([^)]*\))?\s+(\w+)};
02504   $replace{$2} = $1 if m{^\s*#\s*define\s+(\w+)(?:\([^)]*\))?\s+(\w+).*$rccs\s+Replace\s+$rcce};
02505   $replace{$1} = $2 if m{^\s*$rccs\s+Replace (\w+) with (\w+)\s+$rcce\s*$};
02506 
02507   if (m{^\s*$rccs\s+(\w+(\s*,\s*\w+)*)\s+depends\s+on\s+(\w+(\s*,\s*\w+)*)\s+$rcce\s*$}) {
02508     my @deps = map { s/\s+//g; $_ } split /,/, $3;
02509     my $d;
02510     for $d (map { s/\s+//g; $_ } split /,/, $1) {
02511       push @{$depends{$d}}, @deps;
02512     }
02513   }
02514 
02515   $need{$1} = 1 if m{^#if\s+defined\(NEED_(\w+)(?:_GLOBAL)?\)};
02516 }
02517 
02518 for (values %depends) {
02519   my %s;
02520   $_ = [sort grep !$s{$_}++, @$_];
02521 }
02522 
02523 if (exists $opt{'api-info'}) {
02524   my $f;
02525   my $count = 0;
02526   my $match = $opt{'api-info'} =~ m!^/(.*)/$! ? $1 : "^\Q$opt{'api-info'}\E\$";
02527   for $f (sort { lc $a cmp lc $b } keys %API) {
02528     next unless $f =~ /$match/;
02529     print "\n=== $f ===\n\n";
02530     my $info = 0;
02531     if ($API{$f}{base} || $API{$f}{todo}) {
02532       my $base = format_version($API{$f}{base} || $API{$f}{todo});
02533       print "Supported at least starting from perl-$base.\n";
02534       $info++;
02535     }
02536     if ($API{$f}{provided}) {
02537       my $todo = $API{$f}{todo} ? format_version($API{$f}{todo}) : "5.003";
02538       print "Support by $ppport provided back to perl-$todo.\n";
02539       print "Support needs to be explicitly requested by NEED_$f.\n" if exists $need{$f};
02540       print "Depends on: ", join(', ', @{$depends{$f}}), ".\n" if exists $depends{$f};
02541       print "\n$hints{$f}" if exists $hints{$f};
02542       print "\nWARNING:\n$warnings{$f}" if exists $warnings{$f};
02543       $info++;
02544     }
02545     print "No portability information available.\n" unless $info;
02546     $count++;
02547   }
02548   $count or print "Found no API matching '$opt{'api-info'}'.";
02549   print "\n";
02550   exit 0;
02551 }
02552 
02553 if (exists $opt{'list-provided'}) {
02554   my $f;
02555   for $f (sort { lc $a cmp lc $b } keys %API) {
02556     next unless $API{$f}{provided};
02557     my @flags;
02558     push @flags, 'explicit' if exists $need{$f};
02559     push @flags, 'depend'   if exists $depends{$f};
02560     push @flags, 'hint'     if exists $hints{$f};
02561     push @flags, 'warning'  if exists $warnings{$f};
02562     my $flags = @flags ? '  ['.join(', ', @flags).']' : '';
02563     print "$f$flags\n";
02564   }
02565   exit 0;
02566 }
02567 
02568 my @files;
02569 my @srcext = qw( .xs .c .h .cc .cpp -c.inc -xs.inc );
02570 my $srcext = join '|', map { quotemeta $_ } @srcext;
02571 
02572 if (@ARGV) {
02573   my %seen;
02574   for (@ARGV) {
02575     if (-e) {
02576       if (-f) {
02577         push @files, $_ unless $seen{$_}++;
02578       }
02579       else { warn "'$_' is not a file.\n" }
02580     }
02581     else {
02582       my @new = grep { -f } glob $_
02583           or warn "'$_' does not exist.\n";
02584       push @files, grep { !$seen{$_}++ } @new;
02585     }
02586   }
02587 }
02588 else {
02589   eval {
02590     require File::Find;
02591     File::Find::find(sub {
02592       $File::Find::name =~ /($srcext)$/i
02593           and push @files, $File::Find::name;
02594     }, '.');
02595   };
02596   if ($@) {
02597     @files = map { glob "*$_" } @srcext;
02598   }
02599 }
02600 
02601 if (!@ARGV || $opt{filter}) {
02602   my(@in, @out);
02603   my %xsc = map { /(.*)\.xs$/ ? ("$1.c" => 1, "$1.cc" => 1) : () } @files;
02604   for (@files) {
02605     my $out = exists $xsc{$_} || /\b\Q$ppport\E$/i || !/($srcext)$/i;
02606     push @{ $out ? \@out : \@in }, $_;
02607   }
02608   if (@ARGV && @out) {
02609     warning("Skipping the following files (use --nofilter to avoid this):\n| ", join "\n| ", @out);
02610   }
02611   @files = @in;
02612 }
02613 
02614 die "No input files given!\n" unless @files;
02615 
02616 my(%files, %global, %revreplace);
02617 %revreplace = reverse %replace;
02618 my $filename;
02619 my $patch_opened = 0;
02620 
02621 for $filename (@files) {
02622   unless (open IN, "<$filename") {
02623     warn "Unable to read from $filename: $!\n";
02624     next;
02625   }
02626 
02627   info("Scanning $filename ...");
02628 
02629   my $c = do { local $/; <IN> };
02630   close IN;
02631 
02632   my %file = (orig => $c, changes => 0);
02633 
02634   # Temporarily remove C/XS comments and strings from the code
02635   my @ccom;
02636 
02637   $c =~ s{
02638     ( ^$HS*\#$HS*include\b[^\r\n]+\b(?:\Q$ppport\E|XSUB\.h)\b[^\r\n]*
02639     | ^$HS*\#$HS*(?:define|elif|if(?:def)?)\b[^\r\n]* )
02640   | ( ^$HS*\#[^\r\n]*
02641     | "[^"\\]*(?:\\.[^"\\]*)*"
02642     | '[^'\\]*(?:\\.[^'\\]*)*'
02643     | / (?: \*[^*]*\*+(?:[^$ccs][^*]*\*+)* / | /[^\r\n]* ) )
02644   }{ defined $2 and push @ccom, $2;
02645      defined $1 ? $1 : "$ccs$#ccom$cce" }mgsex;
02646 
02647   $file{ccom} = \@ccom;
02648   $file{code} = $c;
02649   $file{has_inc_ppport} = $c =~ /^$HS*#$HS*include[^\r\n]+\b\Q$ppport\E\b/m;
02650 
02651   my $func;
02652 
02653   for $func (keys %API) {
02654     my $match = $func;
02655     $match .= "|$revreplace{$func}" if exists $revreplace{$func};
02656     if ($c =~ /\b(?:Perl_)?($match)\b/) {
02657       $file{uses_replace}{$1}++ if exists $revreplace{$func} && $1 eq $revreplace{$func};
02658       $file{uses_Perl}{$func}++ if $c =~ /\bPerl_$func\b/;
02659       if (exists $API{$func}{provided}) {
02660         $file{uses_provided}{$func}++;
02661         if (!exists $API{$func}{base} || $API{$func}{base} > $opt{'compat-version'}) {
02662           $file{uses}{$func}++;
02663           my @deps = rec_depend($func);
02664           if (@deps) {
02665             $file{uses_deps}{$func} = \@deps;
02666             for (@deps) {
02667               $file{uses}{$_} = 0 unless exists $file{uses}{$_};
02668             }
02669           }
02670           for ($func, @deps) {
02671             $file{needs}{$_} = 'static' if exists $need{$_};
02672           }
02673         }
02674       }
02675       if (exists $API{$func}{todo} && $API{$func}{todo} > $opt{'compat-version'}) {
02676         if ($c =~ /\b$func\b/) {
02677           $file{uses_todo}{$func}++;
02678         }
02679       }
02680     }
02681   }
02682 
02683   while ($c =~ /^$HS*#$HS*define$HS+(NEED_(\w+?)(_GLOBAL)?)\b/mg) {
02684     if (exists $need{$2}) {
02685       $file{defined $3 ? 'needed_global' : 'needed_static'}{$2}++;
02686     }
02687     else { warning("Possibly wrong #define $1 in $filename") }
02688   }
02689 
02690   for (qw(uses needs uses_todo needed_global needed_static)) {
02691     for $func (keys %{$file{$_}}) {
02692       push @{$global{$_}{$func}}, $filename;
02693     }
02694   }
02695 
02696   $files{$filename} = \%file;
02697 }
02698 
02699 # Globally resolve NEED_'s
02700 my $need;
02701 for $need (keys %{$global{needs}}) {
02702   if (@{$global{needs}{$need}} > 1) {
02703     my @targets = @{$global{needs}{$need}};
02704     my @t = grep $files{$_}{needed_global}{$need}, @targets;
02705     @targets = @t if @t;
02706     @t = grep /\.xs$/i, @targets;
02707     @targets = @t if @t;
02708     my $target = shift @targets;
02709     $files{$target}{needs}{$need} = 'global';
02710     for (@{$global{needs}{$need}}) {
02711       $files{$_}{needs}{$need} = 'extern' if $_ ne $target;
02712     }
02713   }
02714 }
02715 
02716 for $filename (@files) {
02717   exists $files{$filename} or next;
02718 
02719   info("=== Analyzing $filename ===");
02720 
02721   my %file = %{$files{$filename}};
02722   my $func;
02723   my $c = $file{code};
02724   my $warnings = 0;
02725 
02726   for $func (sort keys %{$file{uses_Perl}}) {
02727     if ($API{$func}{varargs}) {
02728       unless ($API{$func}{nothxarg}) {
02729         my $changes = ($c =~ s{\b(Perl_$func\s*\(\s*)(?!aTHX_?)(\)|[^\s)]*\))}
02730                               { $1 . ($2 eq ')' ? 'aTHX' : 'aTHX_ ') . $2 }ge);
02731         if ($changes) {
02732           warning("Doesn't pass interpreter argument aTHX to Perl_$func");
02733           $file{changes} += $changes;
02734         }
02735       }
02736     }
02737     else {
02738       warning("Uses Perl_$func instead of $func");
02739       $file{changes} += ($c =~ s{\bPerl_$func(\s*)\((\s*aTHX_?)?\s*}
02740                                 {$func$1(}g);
02741     }
02742   }
02743 
02744   for $func (sort keys %{$file{uses_replace}}) {
02745     warning("Uses $func instead of $replace{$func}");
02746     $file{changes} += ($c =~ s/\b$func\b/$replace{$func}/g);
02747   }
02748 
02749   for $func (sort keys %{$file{uses_provided}}) {
02750     if ($file{uses}{$func}) {
02751       if (exists $file{uses_deps}{$func}) {
02752         diag("Uses $func, which depends on ", join(', ', @{$file{uses_deps}{$func}}));
02753       }
02754       else {
02755         diag("Uses $func");
02756       }
02757     }
02758     $warnings += hint($func);
02759   }
02760 
02761   unless ($opt{quiet}) {
02762     for $func (sort keys %{$file{uses_todo}}) {
02763       print "*** WARNING: Uses $func, which may not be portable below perl ",
02764             format_version($API{$func}{todo}), ", even with '$ppport'\n";
02765       $warnings++;
02766     }
02767   }
02768 
02769   for $func (sort keys %{$file{needed_static}}) {
02770     my $message = '';
02771     if (not exists $file{uses}{$func}) {
02772       $message = "No need to define NEED_$func if $func is never used";
02773     }
02774     elsif (exists $file{needs}{$func} && $file{needs}{$func} ne 'static') {
02775       $message = "No need to define NEED_$func when already needed globally";
02776     }
02777     if ($message) {
02778       diag($message);
02779       $file{changes} += ($c =~ s/^$HS*#$HS*define$HS+NEED_$func\b.*$LF//mg);
02780     }
02781   }
02782 
02783   for $func (sort keys %{$file{needed_global}}) {
02784     my $message = '';
02785     if (not exists $global{uses}{$func}) {
02786       $message = "No need to define NEED_${func}_GLOBAL if $func is never used";
02787     }
02788     elsif (exists $file{needs}{$func}) {
02789       if ($file{needs}{$func} eq 'extern') {
02790         $message = "No need to define NEED_${func}_GLOBAL when already needed globally";
02791       }
02792       elsif ($file{needs}{$func} eq 'static') {
02793         $message = "No need to define NEED_${func}_GLOBAL when only used in this file";
02794       }
02795     }
02796     if ($message) {
02797       diag($message);
02798       $file{changes} += ($c =~ s/^$HS*#$HS*define$HS+NEED_${func}_GLOBAL\b.*$LF//mg);
02799     }
02800   }
02801 
02802   $file{needs_inc_ppport} = keys %{$file{uses}};
02803 
02804   if ($file{needs_inc_ppport}) {
02805     my $pp = '';
02806 
02807     for $func (sort keys %{$file{needs}}) {
02808       my $type = $file{needs}{$func};
02809       next if $type eq 'extern';
02810       my $suffix = $type eq 'global' ? '_GLOBAL' : '';
02811       unless (exists $file{"needed_$type"}{$func}) {
02812         if ($type eq 'global') {
02813           diag("Files [@{$global{needs}{$func}}] need $func, adding global request");
02814         }
02815         else {
02816           diag("File needs $func, adding static request");
02817         }
02818         $pp .= "#define NEED_$func$suffix\n";
02819       }
02820     }
02821 
02822     if ($pp && ($c =~ s/^(?=$HS*#$HS*define$HS+NEED_\w+)/$pp/m)) {
02823       $pp = '';
02824       $file{changes}++;
02825     }
02826 
02827     unless ($file{has_inc_ppport}) {
02828       diag("Needs to include '$ppport'");
02829       $pp .= qq(#include "$ppport"\n)
02830     }
02831 
02832     if ($pp) {
02833       $file{changes} += ($c =~ s/^($HS*#$HS*define$HS+NEED_\w+.*?)^/$1$pp/ms)
02834                      || ($c =~ s/^(?=$HS*#$HS*include.*\Q$ppport\E)/$pp/m)
02835                      || ($c =~ s/^($HS*#$HS*include.*XSUB.*\s*?)^/$1$pp/m)
02836                      || ($c =~ s/^/$pp/);
02837     }
02838   }
02839   else {
02840     if ($file{has_inc_ppport}) {
02841       diag("No need to include '$ppport'");
02842       $file{changes} += ($c =~ s/^$HS*?#$HS*include.*\Q$ppport\E.*?$LF//m);
02843     }
02844   }
02845 
02846   # put back in our C comments
02847   my $ix;
02848   my $cppc = 0;
02849   my @ccom = @{$file{ccom}};
02850   for $ix (0 .. $#ccom) {
02851     if (!$opt{cplusplus} && $ccom[$ix] =~ s!^//!!) {
02852       $cppc++;
02853       $file{changes} += $c =~ s/$rccs$ix$rcce/$ccs$ccom[$ix] $cce/;
02854     }
02855     else {
02856       $c =~ s/$rccs$ix$rcce/$ccom[$ix]/;
02857     }
02858   }
02859 
02860   if ($cppc) {
02861     my $s = $cppc != 1 ? 's' : '';
02862     warning("Uses $cppc C++ style comment$s, which is not portable");
02863   }
02864 
02865   my $s = $warnings != 1 ? 's' : '';
02866   my $warn = $warnings ? " ($warnings warning$s)" : '';
02867   info("Analysis completed$warn");
02868 
02869   if ($file{changes}) {
02870     if (exists $opt{copy}) {
02871       my $newfile = "$filename$opt{copy}";
02872       if (-e $newfile) {
02873         error("'$newfile' already exists, refusing to write copy of '$filename'");
02874       }
02875       else {
02876         local *F;
02877         if (open F, ">$newfile") {
02878           info("Writing copy of '$filename' with changes to '$newfile'");
02879           print F $c;
02880           close F;
02881         }
02882         else {
02883           error("Cannot open '$newfile' for writing: $!");
02884         }
02885       }
02886     }
02887     elsif (exists $opt{patch} || $opt{changes}) {
02888       if (exists $opt{patch}) {
02889         unless ($patch_opened) {
02890           if (open PATCH, ">$opt{patch}") {
02891             $patch_opened = 1;
02892           }
02893           else {
02894             error("Cannot open '$opt{patch}' for writing: $!");
02895             delete $opt{patch};
02896             $opt{changes} = 1;
02897             goto fallback;
02898           }
02899         }
02900         mydiff(\*PATCH, $filename, $c);
02901       }
02902       else {
02903 fallback:
02904         info("Suggested changes:");
02905         mydiff(\*STDOUT, $filename, $c);
02906       }
02907     }
02908     else {
02909       my $s = $file{changes} == 1 ? '' : 's';
02910       info("$file{changes} potentially required change$s detected");
02911     }
02912   }
02913   else {
02914     info("Looks good");
02915   }
02916 }
02917 
02918 close PATCH if $patch_opened;
02919 
02920 exit 0;
02921 
02922 
02923 sub try_use { eval "use @_;"; return $@ eq '' }
02924 
02925 sub mydiff
02926 {
02927   local *F = shift;
02928   my($file, $str) = @_;
02929   my $diff;
02930 
02931   if (exists $opt{diff}) {
02932     $diff = run_diff($opt{diff}, $file, $str);
02933   }
02934 
02935   if (!defined $diff and try_use('Text::Diff')) {
02936     $diff = Text::Diff::diff($file, \$str, { STYLE => 'Unified' });
02937     $diff = <<HEADER . $diff;
02938 --- $file
02939 +++ $file.patched
02940 HEADER
02941   }
02942 
02943   if (!defined $diff) {
02944     $diff = run_diff('diff -u', $file, $str);
02945   }
02946 
02947   if (!defined $diff) {
02948     $diff = run_diff('diff', $file, $str);
02949   }
02950 
02951   if (!defined $diff) {
02952     error("Cannot generate a diff. Please install Text::Diff or use --copy.");
02953     return;
02954   }
02955 
02956   print F $diff;
02957 }
02958 
02959 sub run_diff
02960 {
02961   my($prog, $file, $str) = @_;
02962   my $tmp = 'dppptemp';
02963   my $suf = 'aaa';
02964   my $diff = '';
02965   local *F;
02966 
02967   while (-e "$tmp.$suf") { $suf++ }
02968   $tmp = "$tmp.$suf";
02969 
02970   if (open F, ">$tmp") {
02971     print F $str;
02972     close F;
02973 
02974     if (open F, "$prog $file $tmp |") {
02975       while (<F>) {
02976         s/\Q$tmp\E/$file.patched/;
02977         $diff .= $_;
02978       }
02979       close F;
02980       unlink $tmp;
02981       return $diff;
02982     }
02983 
02984     unlink $tmp;
02985   }
02986   else {
02987     error("Cannot open '$tmp' for writing: $!");
02988   }
02989 
02990   return undef;
02991 }
02992 
02993 sub rec_depend
02994 {
02995   my($func, $seen) = @_;
02996   return () unless exists $depends{$func};
02997   $seen = {%{$seen||{}}};
02998   return () if $seen->{$func}++;
02999   my %s;
03000   grep !$s{$_}++, map { ($_, rec_depend($_, $seen)) } @{$depends{$func}};
03001 }
03002 
03003 sub parse_version
03004 {
03005   my $ver = shift;
03006 
03007   if ($ver =~ /^(\d+)\.(\d+)\.(\d+)$/) {
03008     return ($1, $2, $3);
03009   }
03010   elsif ($ver !~ /^\d+\.[\d_]+$/) {
03011     die "cannot parse version '$ver'\n";
03012   }
03013 
03014   $ver =~ s/_//g;
03015   $ver =~ s/$/000000/;
03016 
03017   my($r,$v,$s) = $ver =~ /(\d+)\.(\d{3})(\d{3})/;
03018 
03019   $v = int $v;
03020   $s = int $s;
03021 
03022   if ($r < 5 || ($r == 5 && $v < 6)) {
03023     if ($s % 10) {
03024       die "cannot parse version '$ver'\n";
03025     }
03026   }
03027 
03028   return ($r, $v, $s);
03029 }
03030 
03031 sub format_version
03032 {
03033   my $ver = shift;
03034 
03035   $ver =~ s/$/000000/;
03036   my($r,$v,$s) = $ver =~ /(\d+)\.(\d{3})(\d{3})/;
03037 
03038   $v = int $v;
03039   $s = int $s;
03040 
03041   if ($r < 5 || ($r == 5 && $v < 6)) {
03042     if ($s % 10) {
03043       die "invalid version '$ver'\n";
03044     }
03045     $s /= 10;
03046 
03047     $ver = sprintf "%d.%03d", $r, $v;
03048     $s > 0 and $ver .= sprintf "_%02d", $s;
03049 
03050     return $ver;
03051   }
03052 
03053   return sprintf "%d.%d.%d", $r, $v, $s;
03054 }
03055 
03056 sub info
03057 {
03058   $opt{quiet} and return;
03059   print @_, "\n";
03060 }
03061 
03062 sub diag
03063 {
03064   $opt{quiet} and return;
03065   $opt{diag} and print @_, "\n";
03066 }
03067 
03068 sub warning
03069 {
03070   $opt{quiet} and return;
03071   print "*** ", @_, "\n";
03072 }
03073 
03074 sub error
03075 {
03076   print "*** ERROR: ", @_, "\n";
03077 }
03078 
03079 my %given_hints;
03080 my %given_warnings;
03081 sub hint
03082 {
03083   $opt{quiet} and return;
03084   my $func = shift;
03085   my $rv = 0;
03086   if (exists $warnings{$func} && !$given_warnings{$func}++) {
03087     my $warn = $warnings{$func};
03088     $warn =~ s!^!*** !mg;
03089     print "*** WARNING: $func\n", $warn;
03090     $rv++;
03091   }
03092   if ($opt{hints} && exists $hints{$func} && !$given_hints{$func}++) {
03093     my $hint = $hints{$func};
03094     $hint =~ s/^/   /mg;
03095     print "   --- hint for $func ---\n", $hint;
03096   }
03097   $rv;
03098 }
03099 
03100 sub usage
03101 {
03102   my($usage) = do { local(@ARGV,$/)=($0); <> } =~ /^=head\d$HS+SYNOPSIS\s*^(.*?)\s*^=/ms;
03103   my %M = ( 'I' => '*' );
03104   $usage =~ s/^\s*perl\s+\S+/$^X $0/;
03105   $usage =~ s/([A-Z])<([^>]+)>/$M{$1}$2$M{$1}/g;
03106 
03107   print <<ENDUSAGE;
03108 
03109 Usage: $usage
03110 
03111 See perldoc $0 for details.
03112 
03113 ENDUSAGE
03114 
03115   exit 2;
03116 }
03117 
03118 sub strip
03119 {
03120   my $self = do { local(@ARGV,$/)=($0); <> };
03121   my($copy) = $self =~ /^=head\d\s+COPYRIGHT\s*^(.*?)^=\w+/ms;
03122   $copy =~ s/^(?=\S+)/    /gms;
03123   $self =~ s/^$HS+Do NOT edit.*?(?=^-)/$copy/ms;
03124   $self =~ s/^SKIP.*(?=^__DATA__)/SKIP
03125 if (\@ARGV && \$ARGV[0] eq '--unstrip') {
03126   eval { require Devel::PPPort };
03127   \$@ and die "Cannot require Devel::PPPort, please install.\\n";
03128   if (eval \$Devel::PPPort::VERSION < $VERSION) {
03129     die "$0 was originally generated with Devel::PPPort $VERSION.\\n"
03130       . "Your Devel::PPPort is only version \$Devel::PPPort::VERSION.\\n"
03131       . "Please install a newer version, or --unstrip will not work.\\n";
03132   }
03133   Devel::PPPort::WriteFile(\$0);
03134   exit 0;
03135 }
03136 print <<END;
03137 
03138 Sorry, but this is a stripped version of \$0.
03139 
03140 To be able to use its original script and doc functionality,
03141 please try to regenerate this file using:
03142 
03143   \$^X \$0 --unstrip
03144 
03145 END
03146 /ms;
03147   my($pl, $c) = $self =~ /(.*^__DATA__)(.*)/ms;
03148   $c =~ s{
03149     / (?: \*[^*]*\*+(?:[^$ccs][^*]*\*+)* / | /[^\r\n]*)
03150   | ( "[^"\\]*(?:\\.[^"\\]*)*"
03151     | '[^'\\]*(?:\\.[^'\\]*)*' )
03152   | ($HS+) }{ defined $2 ? ' ' : ($1 || '') }gsex;
03153   $c =~ s!\s+$!!mg;
03154   $c =~ s!^$LF!!mg;
03155   $c =~ s!^\s*#\s*!#!mg;
03156   $c =~ s!^\s+!!mg;
03157 
03158   open OUT, ">$0" or die "cannot strip $0: $!\n";
03159   print OUT "$pl$c\n";
03160 
03161   exit 0;
03162 }
03163 
03164 __DATA__
03165 */
03166 
03167 #ifndef _P_P_PORTABILITY_H_
03168 #define _P_P_PORTABILITY_H_
03169 
03170 #ifndef DPPP_NAMESPACE
03171 #  define DPPP_NAMESPACE DPPP_
03172 #endif
03173 
03174 #define DPPP_CAT2(x,y) CAT2(x,y)
03175 #define DPPP_(name) DPPP_CAT2(DPPP_NAMESPACE, name)
03176 
03177 #ifndef PERL_REVISION
03178 #  if !defined(__PATCHLEVEL_H_INCLUDED__) && !(defined(PATCHLEVEL) && defined(SUBVERSION))
03179 #    define PERL_PATCHLEVEL_H_IMPLICIT
03180 #    include <patchlevel.h>
03181 #  endif
03182 #  if !(defined(PERL_VERSION) || (defined(SUBVERSION) && defined(PATCHLEVEL)))
03183 #    include <could_not_find_Perl_patchlevel.h>
03184 #  endif
03185 #  ifndef PERL_REVISION
03186 #    define PERL_REVISION       (5)
03187      /* Replace: 1 */
03188 #    define PERL_VERSION        PATCHLEVEL
03189 #    define PERL_SUBVERSION     SUBVERSION
03190      /* Replace PERL_PATCHLEVEL with PERL_VERSION */
03191      /* Replace: 0 */
03192 #  endif
03193 #endif
03194 
03195 #define _dpppDEC2BCD(dec) ((((dec)/100)<<8)|((((dec)%100)/10)<<4)|((dec)%10))
03196 #define PERL_BCDVERSION ((_dpppDEC2BCD(PERL_REVISION)<<24)|(_dpppDEC2BCD(PERL_VERSION)<<12)|_dpppDEC2BCD(PERL_SUBVERSION))
03197 
03198 /* It is very unlikely that anyone will try to use this with Perl 6
03199    (or greater), but who knows.
03200  */
03201 #if PERL_REVISION != 5
03202 #  error ppport.h only works with Perl version 5
03203 #endif /* PERL_REVISION != 5 */
03204 #ifndef dTHR
03205 #  define dTHR                           dNOOP
03206 #endif
03207 #ifndef dTHX
03208 #  define dTHX                           dNOOP
03209 #endif
03210 
03211 #ifndef dTHXa
03212 #  define dTHXa(x)                       dNOOP
03213 #endif
03214 #ifndef pTHX
03215 #  define pTHX                           void
03216 #endif
03217 
03218 #ifndef pTHX_
03219 #  define pTHX_
03220 #endif
03221 
03222 #ifndef aTHX
03223 #  define aTHX
03224 #endif
03225 
03226 #ifndef aTHX_
03227 #  define aTHX_
03228 #endif
03229 
03230 #if (PERL_BCDVERSION < 0x5006000)
03231 #  ifdef USE_THREADS
03232 #    define aTHXR  thr
03233 #    define aTHXR_ thr,
03234 #  else
03235 #    define aTHXR
03236 #    define aTHXR_
03237 #  endif
03238 #  define dTHXR  dTHR
03239 #else
03240 #  define aTHXR  aTHX
03241 #  define aTHXR_ aTHX_
03242 #  define dTHXR  dTHX
03243 #endif
03244 #ifndef dTHXoa
03245 #  define dTHXoa(x)                      dTHXa(x)
03246 #endif
03247 
03248 #ifdef I_LIMITS
03249 #  include <limits.h>
03250 #endif
03251 
03252 #ifndef PERL_UCHAR_MIN
03253 #  define PERL_UCHAR_MIN ((unsigned char)0)
03254 #endif
03255 
03256 #ifndef PERL_UCHAR_MAX
03257 #  ifdef UCHAR_MAX
03258 #    define PERL_UCHAR_MAX ((unsigned char)UCHAR_MAX)
03259 #  else
03260 #    ifdef MAXUCHAR
03261 #      define PERL_UCHAR_MAX ((unsigned char)MAXUCHAR)
03262 #    else
03263 #      define PERL_UCHAR_MAX ((unsigned char)~(unsigned)0)
03264 #    endif
03265 #  endif
03266 #endif
03267 
03268 #ifndef PERL_USHORT_MIN
03269 #  define PERL_USHORT_MIN ((unsigned short)0)
03270 #endif
03271 
03272 #ifndef PERL_USHORT_MAX
03273 #  ifdef USHORT_MAX
03274 #    define PERL_USHORT_MAX ((unsigned short)USHORT_MAX)
03275 #  else
03276 #    ifdef MAXUSHORT
03277 #      define PERL_USHORT_MAX ((unsigned short)MAXUSHORT)
03278 #    else
03279 #      ifdef USHRT_MAX
03280 #        define PERL_USHORT_MAX ((unsigned short)USHRT_MAX)
03281 #      else
03282 #        define PERL_USHORT_MAX ((unsigned short)~(unsigned)0)
03283 #      endif
03284 #    endif
03285 #  endif
03286 #endif
03287 
03288 #ifndef PERL_SHORT_MAX
03289 #  ifdef SHORT_MAX
03290 #    define PERL_SHORT_MAX ((short)SHORT_MAX)
03291 #  else
03292 #    ifdef MAXSHORT    /* Often used in <values.h> */
03293 #      define PERL_SHORT_MAX ((short)MAXSHORT)
03294 #    else
03295 #      ifdef SHRT_MAX
03296 #        define PERL_SHORT_MAX ((short)SHRT_MAX)
03297 #      else
03298 #        define PERL_SHORT_MAX ((short) (PERL_USHORT_MAX >> 1))
03299 #      endif
03300 #    endif
03301 #  endif
03302 #endif
03303 
03304 #ifndef PERL_SHORT_MIN
03305 #  ifdef SHORT_MIN
03306 #    define PERL_SHORT_MIN ((short)SHORT_MIN)
03307 #  else
03308 #    ifdef MINSHORT
03309 #      define PERL_SHORT_MIN ((short)MINSHORT)
03310 #    else
03311 #      ifdef SHRT_MIN
03312 #        define PERL_SHORT_MIN ((short)SHRT_MIN)
03313 #      else
03314 #        define PERL_SHORT_MIN (-PERL_SHORT_MAX - ((3 & -1) == 3))
03315 #      endif
03316 #    endif
03317 #  endif
03318 #endif
03319 
03320 #ifndef PERL_UINT_MAX
03321 #  ifdef UINT_MAX
03322 #    define PERL_UINT_MAX ((unsigned int)UINT_MAX)
03323 #  else
03324 #    ifdef MAXUINT
03325 #      define PERL_UINT_MAX ((unsigned int)MAXUINT)
03326 #    else
03327 #      define PERL_UINT_MAX (~(unsigned int)0)
03328 #    endif
03329 #  endif
03330 #endif
03331 
03332 #ifndef PERL_UINT_MIN
03333 #  define PERL_UINT_MIN ((unsigned int)0)
03334 #endif
03335 
03336 #ifndef PERL_INT_MAX
03337 #  ifdef INT_MAX
03338 #    define PERL_INT_MAX ((int)INT_MAX)
03339 #  else
03340 #    ifdef MAXINT    /* Often used in <values.h> */
03341 #      define PERL_INT_MAX ((int)MAXINT)
03342 #    else
03343 #      define PERL_INT_MAX ((int)(PERL_UINT_MAX >> 1))
03344 #    endif
03345 #  endif
03346 #endif
03347 
03348 #ifndef PERL_INT_MIN
03349 #  ifdef INT_MIN
03350 #    define PERL_INT_MIN ((int)INT_MIN)
03351 #  else
03352 #    ifdef MININT
03353 #      define PERL_INT_MIN ((int)MININT)
03354 #    else
03355 #      define PERL_INT_MIN (-PERL_INT_MAX - ((3 & -1) == 3))
03356 #    endif
03357 #  endif
03358 #endif
03359 
03360 #ifndef PERL_ULONG_MAX
03361 #  ifdef ULONG_MAX
03362 #    define PERL_ULONG_MAX ((unsigned long)ULONG_MAX)
03363 #  else
03364 #    ifdef MAXULONG
03365 #      define PERL_ULONG_MAX ((unsigned long)MAXULONG)
03366 #    else
03367 #      define PERL_ULONG_MAX (~(unsigned long)0)
03368 #    endif
03369 #  endif
03370 #endif
03371 
03372 #ifndef PERL_ULONG_MIN
03373 #  define PERL_ULONG_MIN ((unsigned long)0L)
03374 #endif
03375 
03376 #ifndef PERL_LONG_MAX
03377 #  ifdef LONG_MAX
03378 #    define PERL_LONG_MAX ((long)LONG_MAX)
03379 #  else
03380 #    ifdef MAXLONG
03381 #      define PERL_LONG_MAX ((long)MAXLONG)
03382 #    else
03383 #      define PERL_LONG_MAX ((long) (PERL_ULONG_MAX >> 1))
03384 #    endif
03385 #  endif
03386 #endif
03387 
03388 #ifndef PERL_LONG_MIN
03389 #  ifdef LONG_MIN
03390 #    define PERL_LONG_MIN ((long)LONG_MIN)
03391 #  else
03392 #    ifdef MINLONG
03393 #      define PERL_LONG_MIN ((long)MINLONG)
03394 #    else
03395 #      define PERL_LONG_MIN (-PERL_LONG_MAX - ((3 & -1) == 3))
03396 #    endif
03397 #  endif
03398 #endif
03399 
03400 #if defined(HAS_QUAD) && (defined(convex) || defined(uts))
03401 #  ifndef PERL_UQUAD_MAX
03402 #    ifdef ULONGLONG_MAX
03403 #      define PERL_UQUAD_MAX ((unsigned long long)ULONGLONG_MAX)
03404 #    else
03405 #      ifdef MAXULONGLONG
03406 #        define PERL_UQUAD_MAX ((unsigned long long)MAXULONGLONG)
03407 #      else
03408 #        define PERL_UQUAD_MAX (~(unsigned long long)0)
03409 #      endif
03410 #    endif
03411 #  endif
03412 
03413 #  ifndef PERL_UQUAD_MIN
03414 #    define PERL_UQUAD_MIN ((unsigned long long)0L)
03415 #  endif
03416 
03417 #  ifndef PERL_QUAD_MAX
03418 #    ifdef LONGLONG_MAX
03419 #      define PERL_QUAD_MAX ((long long)LONGLONG_MAX)
03420 #    else
03421 #      ifdef MAXLONGLONG
03422 #        define PERL_QUAD_MAX ((long long)MAXLONGLONG)
03423 #      else
03424 #        define PERL_QUAD_MAX ((long long) (PERL_UQUAD_MAX >> 1))
03425 #      endif
03426 #    endif
03427 #  endif
03428 
03429 #  ifndef PERL_QUAD_MIN
03430 #    ifdef LONGLONG_MIN
03431 #      define PERL_QUAD_MIN ((long long)LONGLONG_MIN)
03432 #    else
03433 #      ifdef MINLONGLONG
03434 #        define PERL_QUAD_MIN ((long long)MINLONGLONG)
03435 #      else
03436 #        define PERL_QUAD_MIN (-PERL_QUAD_MAX - ((3 & -1) == 3))
03437 #      endif
03438 #    endif
03439 #  endif
03440 #endif
03441 
03442 /* This is based on code from 5.003 perl.h */
03443 #ifdef HAS_QUAD
03444 #  ifdef cray
03445 #ifndef IVTYPE
03446 #  define IVTYPE                         int
03447 #endif
03448 
03449 #ifndef IV_MIN
03450 #  define IV_MIN                         PERL_INT_MIN
03451 #endif
03452 
03453 #ifndef IV_MAX
03454 #  define IV_MAX                         PERL_INT_MAX
03455 #endif
03456 
03457 #ifndef UV_MIN
03458 #  define UV_MIN                         PERL_UINT_MIN
03459 #endif
03460 
03461 #ifndef UV_MAX
03462 #  define UV_MAX                         PERL_UINT_MAX
03463 #endif
03464 
03465 #    ifdef INTSIZE
03466 #ifndef IVSIZE
03467 #  define IVSIZE                         INTSIZE
03468 #endif
03469 
03470 #    endif
03471 #  else
03472 #    if defined(convex) || defined(uts)
03473 #ifndef IVTYPE
03474 #  define IVTYPE                         long long
03475 #endif
03476 
03477 #ifndef IV_MIN
03478 #  define IV_MIN                         PERL_QUAD_MIN
03479 #endif
03480 
03481 #ifndef IV_MAX
03482 #  define IV_MAX                         PERL_QUAD_MAX
03483 #endif
03484 
03485 #ifndef UV_MIN
03486 #  define UV_MIN                         PERL_UQUAD_MIN
03487 #endif
03488 
03489 #ifndef UV_MAX
03490 #  define UV_MAX                         PERL_UQUAD_MAX
03491 #endif
03492 
03493 #      ifdef LONGLONGSIZE
03494 #ifndef IVSIZE
03495 #  define IVSIZE                         LONGLONGSIZE
03496 #endif
03497 
03498 #      endif
03499 #    else
03500 #ifndef IVTYPE
03501 #  define IVTYPE                         long
03502 #endif
03503 
03504 #ifndef IV_MIN
03505 #  define IV_MIN                         PERL_LONG_MIN
03506 #endif
03507 
03508 #ifndef IV_MAX
03509 #  define IV_MAX                         PERL_LONG_MAX
03510 #endif
03511 
03512 #ifndef UV_MIN
03513 #  define UV_MIN                         PERL_ULONG_MIN
03514 #endif
03515 
03516 #ifndef UV_MAX
03517 #  define UV_MAX                         PERL_ULONG_MAX
03518 #endif
03519 
03520 #      ifdef LONGSIZE
03521 #ifndef IVSIZE
03522 #  define IVSIZE                         LONGSIZE
03523 #endif
03524 
03525 #      endif
03526 #    endif
03527 #  endif
03528 #ifndef IVSIZE
03529 #  define IVSIZE                         8
03530 #endif
03531 
03532 #ifndef PERL_QUAD_MIN
03533 #  define PERL_QUAD_MIN                  IV_MIN
03534 #endif
03535 
03536 #ifndef PERL_QUAD_MAX
03537 #  define PERL_QUAD_MAX                  IV_MAX
03538 #endif
03539 
03540 #ifndef PERL_UQUAD_MIN
03541 #  define PERL_UQUAD_MIN                 UV_MIN
03542 #endif
03543 
03544 #ifndef PERL_UQUAD_MAX
03545 #  define PERL_UQUAD_MAX                 UV_MAX
03546 #endif
03547 
03548 #else
03549 #ifndef IVTYPE
03550 #  define IVTYPE                         long
03551 #endif
03552 
03553 #ifndef IV_MIN
03554 #  define IV_MIN                         PERL_LONG_MIN
03555 #endif
03556 
03557 #ifndef IV_MAX
03558 #  define IV_MAX                         PERL_LONG_MAX
03559 #endif
03560 
03561 #ifndef UV_MIN
03562 #  define UV_MIN                         PERL_ULONG_MIN
03563 #endif
03564 
03565 #ifndef UV_MAX
03566 #  define UV_MAX                         PERL_ULONG_MAX
03567 #endif
03568 
03569 #endif
03570 
03571 #ifndef IVSIZE
03572 #  ifdef LONGSIZE
03573 #    define IVSIZE LONGSIZE
03574 #  else
03575 #    define IVSIZE 4 /* A bold guess, but the best we can make. */
03576 #  endif
03577 #endif
03578 #ifndef UVTYPE
03579 #  define UVTYPE                         unsigned IVTYPE
03580 #endif
03581 
03582 #ifndef UVSIZE
03583 #  define UVSIZE                         IVSIZE
03584 #endif
03585 #ifndef sv_setuv
03586 #  define sv_setuv(sv, uv)               \
03587                STMT_START {                         \
03588                  UV TeMpUv = uv;                    \
03589                  if (TeMpUv <= IV_MAX)              \
03590                    sv_setiv(sv, TeMpUv);            \
03591                  else                               \
03592                    sv_setnv(sv, (double)TeMpUv);    \
03593                } STMT_END
03594 #endif
03595 #ifndef newSVuv
03596 #  define newSVuv(uv)                    ((uv) <= IV_MAX ? newSViv((IV)uv) : newSVnv((NV)uv))
03597 #endif
03598 #ifndef sv_2uv
03599 #  define sv_2uv(sv)                     ((PL_Sv = (sv)), (UV) (SvNOK(PL_Sv) ? SvNV(PL_Sv) : sv_2nv(PL_Sv)))
03600 #endif
03601 
03602 #ifndef SvUVX
03603 #  define SvUVX(sv)                      ((UV)SvIVX(sv))
03604 #endif
03605 
03606 #ifndef SvUVXx
03607 #  define SvUVXx(sv)                     SvUVX(sv)
03608 #endif
03609 
03610 #ifndef SvUV
03611 #  define SvUV(sv)                       (SvIOK(sv) ? SvUVX(sv) : sv_2uv(sv))
03612 #endif
03613 
03614 #ifndef SvUVx
03615 #  define SvUVx(sv)                      ((PL_Sv = (sv)), SvUV(PL_Sv))
03616 #endif
03617 
03618 /* Hint: sv_uv
03619  * Always use the SvUVx() macro instead of sv_uv().
03620  */
03621 #ifndef sv_uv
03622 #  define sv_uv(sv)                      SvUVx(sv)
03623 #endif
03624 
03625 #if !defined(SvUOK) && defined(SvIOK_UV)
03626 #  define SvUOK(sv) SvIOK_UV(sv)
03627 #endif
03628 #ifndef XST_mUV
03629 #  define XST_mUV(i,v)                   (ST(i) = sv_2mortal(newSVuv(v))  )
03630 #endif
03631 
03632 #ifndef XSRETURN_UV
03633 #  define XSRETURN_UV(v)                 STMT_START { XST_mUV(0,v);  XSRETURN(1); } STMT_END
03634 #endif
03635 #ifndef PUSHu
03636 #  define PUSHu(u)                       STMT_START { sv_setuv(TARG, (UV)(u)); PUSHTARG;  } STMT_END
03637 #endif
03638 
03639 #ifndef XPUSHu
03640 #  define XPUSHu(u)                      STMT_START { sv_setuv(TARG, (UV)(u)); XPUSHTARG; } STMT_END
03641 #endif
03642 
03643 #ifdef HAS_MEMCMP
03644 #ifndef memNE
03645 #  define memNE(s1,s2,l)                 (memcmp(s1,s2,l))
03646 #endif
03647 
03648 #ifndef memEQ
03649 #  define memEQ(s1,s2,l)                 (!memcmp(s1,s2,l))
03650 #endif
03651 
03652 #else
03653 #ifndef memNE
03654 #  define memNE(s1,s2,l)                 (bcmp(s1,s2,l))
03655 #endif
03656 
03657 #ifndef memEQ
03658 #  define memEQ(s1,s2,l)                 (!bcmp(s1,s2,l))
03659 #endif
03660 
03661 #endif
03662 #ifndef MoveD
03663 #  define MoveD(s,d,n,t)                 memmove((char*)(d),(char*)(s), (n) * sizeof(t))
03664 #endif
03665 
03666 #ifndef CopyD
03667 #  define CopyD(s,d,n,t)                 memcpy((char*)(d),(char*)(s), (n) * sizeof(t))
03668 #endif
03669 
03670 #ifdef HAS_MEMSET
03671 #ifndef ZeroD
03672 #  define ZeroD(d,n,t)                   memzero((char*)(d), (n) * sizeof(t))
03673 #endif
03674 
03675 #else
03676 #ifndef ZeroD
03677 #  define ZeroD(d,n,t)                   ((void)memzero((char*)(d), (n) * sizeof(t)), d)
03678 #endif
03679 
03680 #endif
03681 #ifndef PoisonWith
03682 #  define PoisonWith(d,n,t,b)            (void)memset((char*)(d), (U8)(b), (n) * sizeof(t))
03683 #endif
03684 
03685 #ifndef PoisonNew
03686 #  define PoisonNew(d,n,t)               PoisonWith(d,n,t,0xAB)
03687 #endif
03688 
03689 #ifndef PoisonFree
03690 #  define PoisonFree(d,n,t)              PoisonWith(d,n,t,0xEF)
03691 #endif
03692 
03693 #ifndef Poison
03694 #  define Poison(d,n,t)                  PoisonFree(d,n,t)
03695 #endif
03696 #ifndef Newx
03697 #  define Newx(v,n,t)                    New(0,v,n,t)
03698 #endif
03699 
03700 #ifndef Newxc
03701 #  define Newxc(v,n,t,c)                 Newc(0,v,n,t,c)
03702 #endif
03703 
03704 #ifndef Newxz
03705 #  define Newxz(v,n,t)                   Newz(0,v,n,t)
03706 #endif
03707 
03708 #ifndef PERL_UNUSED_DECL
03709 #  ifdef HASATTRIBUTE
03710 #    if (defined(__GNUC__) && defined(__cplusplus)) || defined(__INTEL_COMPILER)
03711 #      define PERL_UNUSED_DECL
03712 #    else
03713 #      define PERL_UNUSED_DECL __attribute__((unused))
03714 #    endif
03715 #  else
03716 #    define PERL_UNUSED_DECL
03717 #  endif
03718 #endif
03719 
03720 #ifndef PERL_UNUSED_ARG
03721 #  if defined(lint) && defined(S_SPLINT_S) /* www.splint.org */
03722 #    include <note.h>
03723 #    define PERL_UNUSED_ARG(x) NOTE(ARGUNUSED(x))
03724 #  else
03725 #    define PERL_UNUSED_ARG(x) ((void)x)
03726 #  endif
03727 #endif
03728 
03729 #ifndef PERL_UNUSED_VAR
03730 #  define PERL_UNUSED_VAR(x) ((void)x)
03731 #endif
03732 
03733 #ifndef PERL_UNUSED_CONTEXT
03734 #  ifdef USE_ITHREADS
03735 #    define PERL_UNUSED_CONTEXT PERL_UNUSED_ARG(my_perl)
03736 #  else
03737 #    define PERL_UNUSED_CONTEXT
03738 #  endif
03739 #endif
03740 #ifndef NOOP
03741 #  define NOOP                           /*EMPTY*/(void)0
03742 #endif
03743 
03744 #ifndef dNOOP
03745 #  define dNOOP                          extern int /*@unused@*/ Perl___notused PERL_UNUSED_DECL
03746 #endif
03747 
03748 #ifndef NVTYPE
03749 #  if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE)
03750 #    define NVTYPE long double
03751 #  else
03752 #    define NVTYPE double
03753 #  endif
03754 typedef NVTYPE NV;
03755 #endif
03756 
03757 #ifndef INT2PTR
03758 #  if (IVSIZE == PTRSIZE) && (UVSIZE == PTRSIZE)
03759 #    define PTRV                  UV
03760 #    define INT2PTR(any,d)        (any)(d)
03761 #  else
03762 #    if PTRSIZE == LONGSIZE
03763 #      define PTRV                unsigned long
03764 #    else
03765 #      define PTRV                unsigned
03766 #    endif
03767 #    define INT2PTR(any,d)        (any)(PTRV)(d)
03768 #  endif
03769 #endif
03770 
03771 #ifndef PTR2ul
03772 #  if PTRSIZE == LONGSIZE
03773 #    define PTR2ul(p)     (unsigned long)(p)
03774 #  else
03775 #    define PTR2ul(p)     INT2PTR(unsigned long,p)
03776 #  endif
03777 #endif
03778 #ifndef PTR2nat
03779 #  define PTR2nat(p)                     (PTRV)(p)
03780 #endif
03781 
03782 #ifndef NUM2PTR
03783 #  define NUM2PTR(any,d)                 (any)PTR2nat(d)
03784 #endif
03785 
03786 #ifndef PTR2IV
03787 #  define PTR2IV(p)                      INT2PTR(IV,p)
03788 #endif
03789 
03790 #ifndef PTR2UV
03791 #  define PTR2UV(p)                      INT2PTR(UV,p)
03792 #endif
03793 
03794 #ifndef PTR2NV
03795 #  define PTR2NV(p)                      NUM2PTR(NV,p)
03796 #endif
03797 
03798 #undef START_EXTERN_C
03799 #undef END_EXTERN_C
03800 #undef EXTERN_C
03801 #ifdef __cplusplus
03802 #  define START_EXTERN_C extern "C" {
03803 #  define END_EXTERN_C }
03804 #  define EXTERN_C extern "C"
03805 #else
03806 #  define START_EXTERN_C
03807 #  define END_EXTERN_C
03808 #  define EXTERN_C extern
03809 #endif
03810 
03811 #if defined(PERL_GCC_PEDANTIC)
03812 #  ifndef PERL_GCC_BRACE_GROUPS_FORBIDDEN
03813 #    define PERL_GCC_BRACE_GROUPS_FORBIDDEN
03814 #  endif
03815 #endif
03816 
03817 #if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN) && !defined(__cplusplus)
03818 #  ifndef PERL_USE_GCC_BRACE_GROUPS
03819 #    define PERL_USE_GCC_BRACE_GROUPS
03820 #  endif
03821 #endif
03822 
03823 #undef STMT_START
03824 #undef STMT_END
03825 #ifdef PERL_USE_GCC_BRACE_GROUPS
03826 #  define STMT_START    (void)( /* gcc supports ``({ STATEMENTS; })'' */
03827 #  define STMT_END  )
03828 #else
03829 #  if defined(VOIDFLAGS) && (VOIDFLAGS) && (defined(sun) || defined(__sun__)) && !defined(__GNUC__)
03830 #    define STMT_START  if (1)
03831 #    define STMT_END    else (void)0
03832 #  else
03833 #    define STMT_START  do
03834 #    define STMT_END    while (0)
03835 #  endif
03836 #endif
03837 #ifndef boolSV
03838 #  define boolSV(b)                      ((b) ? &PL_sv_yes : &PL_sv_no)
03839 #endif
03840 
03841 /* DEFSV appears first in 5.004_56 */
03842 #ifndef DEFSV
03843 #  define DEFSV                          GvSV(PL_defgv)
03844 #endif
03845 
03846 #ifndef SAVE_DEFSV
03847 #  define SAVE_DEFSV                     SAVESPTR(GvSV(PL_defgv))
03848 #endif
03849 
03850 #ifndef DEFSV_set
03851 #  define DEFSV_set(sv)                  (DEFSV = (sv))
03852 #endif
03853 
03854 /* Older perls (<=5.003) lack AvFILLp */
03855 #ifndef AvFILLp
03856 #  define AvFILLp                        AvFILL
03857 #endif
03858 #ifndef ERRSV
03859 #  define ERRSV                          get_sv("@",FALSE)
03860 #endif
03861 
03862 /* Hint: gv_stashpvn
03863  * This function's backport doesn't support the length parameter, but
03864  * rather ignores it. Portability can only be ensured if the length
03865  * parameter is used for speed reasons, but the length can always be
03866  * correctly computed from the string argument.
03867  */
03868 #ifndef gv_stashpvn
03869 #  define gv_stashpvn(str,len,create)    gv_stashpv(str,create)
03870 #endif
03871 
03872 /* Replace: 1 */
03873 #ifndef get_cv
03874 #  define get_cv                         perl_get_cv
03875 #endif
03876 
03877 #ifndef get_sv
03878 #  define get_sv                         perl_get_sv
03879 #endif
03880 
03881 #ifndef get_av
03882 #  define get_av                         perl_get_av
03883 #endif
03884 
03885 #ifndef get_hv
03886 #  define get_hv                         perl_get_hv
03887 #endif
03888 
03889 /* Replace: 0 */
03890 #ifndef dUNDERBAR
03891 #  define dUNDERBAR                      dNOOP
03892 #endif
03893 
03894 #ifndef UNDERBAR
03895 #  define UNDERBAR                       DEFSV
03896 #endif
03897 #ifndef dAX
03898 #  define dAX                            I32 ax = MARK - PL_stack_base + 1
03899 #endif
03900 
03901 #ifndef dITEMS
03902 #  define dITEMS                         I32 items = SP - MARK
03903 #endif
03904 #ifndef dXSTARG
03905 #  define dXSTARG                        SV * targ = sv_newmortal()
03906 #endif
03907 #ifndef dAXMARK
03908 #  define dAXMARK                        I32 ax = POPMARK; \
03909                                register SV ** const mark = PL_stack_base + ax++
03910 #endif
03911 #ifndef XSprePUSH
03912 #  define XSprePUSH                      (sp = PL_stack_base + ax - 1)
03913 #endif
03914 
03915 #if (PERL_BCDVERSION < 0x5005000)
03916 #  undef XSRETURN
03917 #  define XSRETURN(off)                                   \
03918       STMT_START {                                        \
03919           PL_stack_sp = PL_stack_base + ax + ((off) - 1); \
03920           return;                                         \
03921       } STMT_END
03922 #endif
03923 #ifndef XSPROTO
03924 #  define XSPROTO(name)                  void name(pTHX_ CV* cv)
03925 #endif
03926 
03927 #ifndef SVfARG
03928 #  define SVfARG(p)                      ((void*)(p))
03929 #endif
03930 #ifndef PERL_ABS
03931 #  define PERL_ABS(x)                    ((x) < 0 ? -(x) : (x))
03932 #endif
03933 #ifndef dVAR
03934 #  define dVAR                           dNOOP
03935 #endif
03936 #ifndef SVf
03937 #  define SVf                            "_"
03938 #endif
03939 #ifndef UTF8_MAXBYTES
03940 #  define UTF8_MAXBYTES                  UTF8_MAXLEN
03941 #endif
03942 #ifndef CPERLscope
03943 #  define CPERLscope(x)                  x
03944 #endif
03945 #ifndef PERL_HASH
03946 #  define PERL_HASH(hash,str,len)        \
03947      STMT_START { \
03948     const char *s_PeRlHaSh = str; \
03949     I32 i_PeRlHaSh = len; \
03950     U32 hash_PeRlHaSh = 0; \
03951     while (i_PeRlHaSh--) \
03952         hash_PeRlHaSh = hash_PeRlHaSh * 33 + *s_PeRlHaSh++; \
03953     (hash) = hash_PeRlHaSh; \
03954     } STMT_END
03955 #endif
03956 
03957 #ifndef PERLIO_FUNCS_DECL
03958 # ifdef PERLIO_FUNCS_CONST
03959 #  define PERLIO_FUNCS_DECL(funcs) const PerlIO_funcs funcs
03960 #  define PERLIO_FUNCS_CAST(funcs) (PerlIO_funcs*)(funcs)
03961 # else
03962 #  define PERLIO_FUNCS_DECL(funcs) PerlIO_funcs funcs
03963 #  define PERLIO_FUNCS_CAST(funcs) (funcs)
03964 # endif
03965 #endif
03966 
03967 /* provide these typedefs for older perls */
03968 #if (PERL_BCDVERSION < 0x5009003)
03969 
03970 # ifdef ARGSproto
03971 typedef OP* (CPERLscope(*Perl_ppaddr_t))(ARGSproto);
03972 # else
03973 typedef OP* (CPERLscope(*Perl_ppaddr_t))(pTHX);
03974 # endif
03975 
03976 typedef OP* (CPERLscope(*Perl_check_t)) (pTHX_ OP*);
03977 
03978 #endif
03979 #ifndef isPSXSPC
03980 #  define isPSXSPC(c)                    (isSPACE(c) || (c) == '\v')
03981 #endif
03982 
03983 #ifndef isBLANK
03984 #  define isBLANK(c)                     ((c) == ' ' || (c) == '\t')
03985 #endif
03986 
03987 #ifdef EBCDIC
03988 #ifndef isALNUMC
03989 #  define isALNUMC(c)                    isalnum(c)
03990 #endif
03991 
03992 #ifndef isASCII
03993 #  define isASCII(c)                     isascii(c)
03994 #endif
03995 
03996 #ifndef isCNTRL
03997 #  define isCNTRL(c)                     iscntrl(c)
03998 #endif
03999 
04000 #ifndef isGRAPH
04001 #  define isGRAPH(c)                     isgraph(c)
04002 #endif
04003 
04004 #ifndef isPRINT
04005 #  define isPRINT(c)                     isprint(c)
04006 #endif
04007 
04008 #ifndef isPUNCT
04009 #  define isPUNCT(c)                     ispunct(c)
04010 #endif
04011 
04012 #ifndef isXDIGIT
04013 #  define isXDIGIT(c)                    isxdigit(c)
04014 #endif
04015 
04016 #else
04017 # if (PERL_BCDVERSION < 0x5010000)
04018 /* Hint: isPRINT
04019  * The implementation in older perl versions includes all of the
04020  * isSPACE() characters, which is wrong. The version provided by
04021  * Devel::PPPort always overrides a present buggy version.
04022  */
04023 #  undef isPRINT
04024 # endif
04025 #ifndef isALNUMC
04026 #  define isALNUMC(c)                    (isALPHA(c) || isDIGIT(c))
04027 #endif
04028 
04029 #ifndef isASCII
04030 #  define isASCII(c)                     ((c) <= 127)
04031 #endif
04032 
04033 #ifndef isCNTRL
04034 #  define isCNTRL(c)                     ((c) < ' ' || (c) == 127)
04035 #endif
04036 
04037 #ifndef isGRAPH
04038 #  define isGRAPH(c)                     (isALNUM(c) || isPUNCT(c))
04039 #endif
04040 
04041 #ifndef isPRINT
04042 #  define isPRINT(c)                     (((c) >= 32 && (c) < 127))
04043 #endif
04044 
04045 #ifndef isPUNCT
04046 #  define isPUNCT(c)                     (((c) >= 33 && (c) <= 47) || ((c) >= 58 && (c) <= 64)  || ((c) >= 91 && (c) <= 96) || ((c) >= 123 && (c) <= 126))
04047 #endif
04048 
04049 #ifndef isXDIGIT
04050 #  define isXDIGIT(c)                    (isDIGIT(c) || ((c) >= 'a' && (c) <= 'f') || ((c) >= 'A' && (c) <= 'F'))
04051 #endif
04052 
04053 #endif
04054 
04055 #ifndef PERL_SIGNALS_UNSAFE_FLAG
04056 
04057 #define PERL_SIGNALS_UNSAFE_FLAG 0x0001
04058 
04059 #if (PERL_BCDVERSION < 0x5008000)
04060 #  define D_PPP_PERL_SIGNALS_INIT   PERL_SIGNALS_UNSAFE_FLAG
04061 #else
04062 #  define D_PPP_PERL_SIGNALS_INIT   0
04063 #endif
04064 
04065 #if defined(NEED_PL_signals)
04066 static U32 DPPP_(my_PL_signals) = D_PPP_PERL_SIGNALS_INIT;
04067 #elif defined(NEED_PL_signals_GLOBAL)
04068 U32 DPPP_(my_PL_signals) = D_PPP_PERL_SIGNALS_INIT;
04069 #else
04070 extern U32 DPPP_(my_PL_signals);
04071 #endif
04072 #define PL_signals DPPP_(my_PL_signals)
04073 
04074 #endif
04075 
04076 /* Hint: PL_ppaddr
04077  * Calling an op via PL_ppaddr requires passing a context argument
04078  * for threaded builds. Since the context argument is different for
04079  * 5.005 perls, you can use aTHXR (supplied by ppport.h), which will
04080  * automatically be defined as the correct argument.
04081  */
04082 
04083 #if (PERL_BCDVERSION <= 0x5005005)
04084 /* Replace: 1 */
04085 #  define PL_ppaddr                 ppaddr
04086 #  define PL_no_modify              no_modify
04087 /* Replace: 0 */
04088 #endif
04089 
04090 #if (PERL_BCDVERSION <= 0x5004005)
04091 /* Replace: 1 */
04092 #  define PL_DBsignal               DBsignal
04093 #  define PL_DBsingle               DBsingle
04094 #  define PL_DBsub                  DBsub
04095 #  define PL_DBtrace                DBtrace
04096 #  define PL_Sv                     Sv
04097 #  define PL_bufend                 bufend
04098 #  define PL_bufptr                 bufptr
04099 #  define PL_compiling              compiling
04100 #  define PL_copline                copline
04101 #  define PL_curcop                 curcop
04102 #  define PL_curstash               curstash
04103 #  define PL_debstash               debstash
04104 #  define PL_defgv                  defgv
04105 #  define PL_diehook                diehook
04106 #  define PL_dirty                  dirty
04107 #  define PL_dowarn                 dowarn
04108 #  define PL_errgv                  errgv
04109 #  define PL_error_count            error_count
04110 #  define PL_expect                 expect
04111 #  define PL_hexdigit               hexdigit
04112 #  define PL_hints                  hints
04113 #  define PL_in_my                  in_my
04114 #  define PL_laststatval            laststatval
04115 #  define PL_lex_state              lex_state
04116 #  define PL_lex_stuff              lex_stuff
04117 #  define PL_linestr                linestr
04118 #  define PL_na                     na
04119 #  define PL_perl_destruct_level    perl_destruct_level
04120 #  define PL_perldb                 perldb
04121 #  define PL_rsfp_filters           rsfp_filters
04122 #  define PL_rsfp                   rsfp
04123 #  define PL_stack_base             stack_base
04124 #  define PL_stack_sp               stack_sp
04125 #  define PL_statcache              statcache
04126 #  define PL_stdingv                stdingv
04127 #  define PL_sv_arenaroot           sv_arenaroot
04128 #  define PL_sv_no                  sv_no
04129 #  define PL_sv_undef               sv_undef
04130 #  define PL_sv_yes                 sv_yes
04131 #  define PL_tainted                tainted
04132 #  define PL_tainting               tainting
04133 #  define PL_tokenbuf               tokenbuf
04134 /* Replace: 0 */
04135 #endif
04136 
04137 /* Warning: PL_parser
04138  * For perl versions earlier than 5.9.5, this is an always
04139  * non-NULL dummy. Also, it cannot be dereferenced. Don't
04140  * use it if you can avoid is and unless you absolutely know
04141  * what you're doing.
04142  * If you always check that PL_parser is non-NULL, you can
04143  * define DPPP_PL_parser_NO_DUMMY to avoid the creation of
04144  * a dummy parser structure.
04145  */
04146 
04147 #if (PERL_BCDVERSION >= 0x5009005)
04148 # ifdef DPPP_PL_parser_NO_DUMMY
04149 #  define D_PPP_my_PL_parser_var(var) ((PL_parser ? PL_parser : \
04150                 (croak("panic: PL_parser == NULL in %s:%d", \
04151                        __FILE__, __LINE__), (yy_parser *) NULL))->var)
04152 # else
04153 #  ifdef DPPP_PL_parser_NO_DUMMY_WARNING
04154 #   define D_PPP_parser_dummy_warning(var)
04155 #  else
04156 #   define D_PPP_parser_dummy_warning(var) \
04157              warn("warning: dummy PL_" #var " used in %s:%d", __FILE__, __LINE__),
04158 #  endif
04159 #  define D_PPP_my_PL_parser_var(var) ((PL_parser ? PL_parser : \
04160                 (D_PPP_parser_dummy_warning(var) &DPPP_(dummy_PL_parser)))->var)
04161 #if defined(NEED_PL_parser)
04162 static yy_parser DPPP_(dummy_PL_parser);
04163 #elif defined(NEED_PL_parser_GLOBAL)
04164 yy_parser DPPP_(dummy_PL_parser);
04165 #else
04166 extern yy_parser DPPP_(dummy_PL_parser);
04167 #endif
04168 
04169 # endif
04170 
04171 /* 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 */
04172 /* Warning: PL_expect, PL_copline, PL_rsfp, PL_rsfp_filters, PL_linestr, PL_bufptr, PL_bufend, PL_lex_state, PL_lex_stuff, PL_tokenbuf
04173  * Do not use this variable unless you know exactly what you're
04174  * doint. It is internal to the perl parser and may change or even
04175  * be removed in the future. As of perl 5.9.5, you have to check
04176  * for (PL_parser != NULL) for this variable to have any effect.
04177  * An always non-NULL PL_parser dummy is provided for earlier
04178  * perl versions.
04179  * If PL_parser is NULL when you try to access this variable, a
04180  * dummy is being accessed instead and a warning is issued unless
04181  * you define DPPP_PL_parser_NO_DUMMY_WARNING.
04182  * If DPPP_PL_parser_NO_DUMMY is defined, the code trying to access
04183  * this variable will croak with a panic message.
04184  */
04185 
04186 # define PL_expect         D_PPP_my_PL_parser_var(expect)
04187 # define PL_copline        D_PPP_my_PL_parser_var(copline)
04188 # define PL_rsfp           D_PPP_my_PL_parser_var(rsfp)
04189 # define PL_rsfp_filters   D_PPP_my_PL_parser_var(rsfp_filters)
04190 # define PL_linestr        D_PPP_my_PL_parser_var(linestr)
04191 # define PL_bufptr         D_PPP_my_PL_parser_var(bufptr)
04192 # define PL_bufend         D_PPP_my_PL_parser_var(bufend)
04193 # define PL_lex_state      D_PPP_my_PL_parser_var(lex_state)
04194 # define PL_lex_stuff      D_PPP_my_PL_parser_var(lex_stuff)
04195 # define PL_tokenbuf       D_PPP_my_PL_parser_var(tokenbuf)
04196 # define PL_in_my          D_PPP_my_PL_parser_var(in_my)
04197 # define PL_in_my_stash    D_PPP_my_PL_parser_var(in_my_stash)
04198 # define PL_error_count    D_PPP_my_PL_parser_var(error_count)
04199 
04200 
04201 #else
04202 
04203 /* ensure that PL_parser != NULL and cannot be dereferenced */
04204 # define PL_parser         ((void *) 1)
04205 
04206 #endif
04207 #ifndef mPUSHs
04208 #  define mPUSHs(s)                      PUSHs(sv_2mortal(s))
04209 #endif
04210 
04211 #ifndef PUSHmortal
04212 #  define PUSHmortal                     PUSHs(sv_newmortal())
04213 #endif
04214 
04215 #ifndef mPUSHp
04216 #  define mPUSHp(p,l)                    sv_setpvn(PUSHmortal, (p), (l))
04217 #endif
04218 
04219 #ifndef mPUSHn
04220 #  define mPUSHn(n)                      sv_setnv(PUSHmortal, (NV)(n))
04221 #endif
04222 
04223 #ifndef mPUSHi
04224 #  define mPUSHi(i)                      sv_setiv(PUSHmortal, (IV)(i))
04225 #endif
04226 
04227 #ifndef mPUSHu
04228 #  define mPUSHu(u)                      sv_setuv(PUSHmortal, (UV)(u))
04229 #endif
04230 #ifndef mXPUSHs
04231 #  define mXPUSHs(s)                     XPUSHs(sv_2mortal(s))
04232 #endif
04233 
04234 #ifndef XPUSHmortal
04235 #  define XPUSHmortal                    XPUSHs(sv_newmortal())
04236 #endif
04237 
04238 #ifndef mXPUSHp
04239 #  define mXPUSHp(p,l)                   STMT_START { EXTEND(sp,1); sv_setpvn(PUSHmortal, (p), (l)); } STMT_END
04240 #endif
04241 
04242 #ifndef mXPUSHn
04243 #  define mXPUSHn(n)                     STMT_START { EXTEND(sp,1); sv_setnv(PUSHmortal, (NV)(n)); } STMT_END
04244 #endif
04245 
04246 #ifndef mXPUSHi
04247 #  define mXPUSHi(i)                     STMT_START { EXTEND(sp,1); sv_setiv(PUSHmortal, (IV)(i)); } STMT_END
04248 #endif
04249 
04250 #ifndef mXPUSHu
04251 #  define mXPUSHu(u)                     STMT_START { EXTEND(sp,1); sv_setuv(PUSHmortal, (UV)(u)); } STMT_END
04252 #endif
04253 
04254 /* Replace: 1 */
04255 #ifndef call_sv
04256 #  define call_sv                        perl_call_sv
04257 #endif
04258 
04259 #ifndef call_pv
04260 #  define call_pv                        perl_call_pv
04261 #endif
04262 
04263 #ifndef call_argv
04264 #  define call_argv                      perl_call_argv
04265 #endif
04266 
04267 #ifndef call_method
04268 #  define call_method                    perl_call_method
04269 #endif
04270 #ifndef eval_sv
04271 #  define eval_sv                        perl_eval_sv
04272 #endif
04273 
04274 /* Replace: 0 */
04275 #ifndef PERL_LOADMOD_DENY
04276 #  define PERL_LOADMOD_DENY              0x1
04277 #endif
04278 
04279 #ifndef PERL_LOADMOD_NOIMPORT
04280 #  define PERL_LOADMOD_NOIMPORT          0x2
04281 #endif
04282 
04283 #ifndef PERL_LOADMOD_IMPORT_OPS
04284 #  define PERL_LOADMOD_IMPORT_OPS        0x4
04285 #endif
04286 
04287 #ifndef G_METHOD
04288 # define G_METHOD       64
04289 # ifdef call_sv
04290 #  undef call_sv
04291 # endif
04292 # if (PERL_BCDVERSION < 0x5006000)
04293 #  define call_sv(sv, flags)  ((flags) & G_METHOD ? perl_call_method((char *) SvPV_nolen_const(sv), \
04294                 (flags) & ~G_METHOD) : perl_call_sv(sv, flags))
04295 # else
04296 #  define call_sv(sv, flags)  ((flags) & G_METHOD ? Perl_call_method(aTHX_ (char *) SvPV_nolen_const(sv), \
04297                 (flags) & ~G_METHOD) : Perl_call_sv(aTHX_ sv, flags))
04298 # endif
04299 #endif
04300 
04301 /* Replace perl_eval_pv with eval_pv */
04302 
04303 #ifndef eval_pv
04304 #if defined(NEED_eval_pv)
04305 static SV* DPPP_(my_eval_pv)(char *p, I32 croak_on_error);
04306 static
04307 #else
04308 extern SV* DPPP_(my_eval_pv)(char *p, I32 croak_on_error);
04309 #endif
04310 
04311 #ifdef eval_pv
04312 #  undef eval_pv
04313 #endif
04314 #define eval_pv(a,b) DPPP_(my_eval_pv)(aTHX_ a,b)
04315 #define Perl_eval_pv DPPP_(my_eval_pv)
04316 
04317 #if defined(NEED_eval_pv) || defined(NEED_eval_pv_GLOBAL)
04318 
04319 SV*
04320 DPPP_(my_eval_pv)(char *p, I32 croak_on_error)
04321 {
04322     dSP;
04323     SV* sv = newSVpv(p, 0);
04324 
04325     PUSHMARK(sp);
04326     eval_sv(sv, G_SCALAR);
04327     SvREFCNT_dec(sv);
04328 
04329     SPAGAIN;
04330     sv = POPs;
04331     PUTBACK;
04332 
04333     if (croak_on_error && SvTRUE(GvSV(errgv)))
04334     croak(SvPVx(GvSV(errgv), na));
04335 
04336     return sv;
04337 }
04338 
04339 #endif
04340 #endif
04341 
04342 #ifndef vload_module
04343 #if defined(NEED_vload_module)
04344 static void DPPP_(my_vload_module)(U32 flags, SV *name, SV *ver, va_list *args);
04345 static
04346 #else
04347 extern void DPPP_(my_vload_module)(U32 flags, SV *name, SV *ver, va_list *args);
04348 #endif
04349 
04350 #ifdef vload_module
04351 #  undef vload_module
04352 #endif
04353 #define vload_module(a,b,c,d) DPPP_(my_vload_module)(aTHX_ a,b,c,d)
04354 #define Perl_vload_module DPPP_(my_vload_module)
04355 
04356 #if defined(NEED_vload_module) || defined(NEED_vload_module_GLOBAL)
04357 
04358 void
04359 DPPP_(my_vload_module)(U32 flags, SV *name, SV *ver, va_list *args)
04360 {
04361     dTHR;
04362     dVAR;
04363     OP *veop, *imop;
04364 
04365     OP * const modname = newSVOP(OP_CONST, 0, name);
04366     /* 5.005 has a somewhat hacky force_normal that doesn't croak on
04367        SvREADONLY() if PL_compling is true. Current perls take care in
04368        ck_require() to correctly turn off SvREADONLY before calling
04369        force_normal_flags(). This seems a better fix than fudging PL_compling
04370      */
04371     SvREADONLY_off(((SVOP*)modname)->op_sv);
04372     modname->op_private |= OPpCONST_BARE;
04373     if (ver) {
04374     veop = newSVOP(OP_CONST, 0, ver);
04375     }
04376     else
04377     veop = NULL;
04378     if (flags & PERL_LOADMOD_NOIMPORT) {
04379     imop = sawparens(newNULLLIST());
04380     }
04381     else if (flags & PERL_LOADMOD_IMPORT_OPS) {
04382     imop = va_arg(*args, OP*);
04383     }
04384     else {
04385     SV *sv;
04386     imop = NULL;
04387     sv = va_arg(*args, SV*);
04388     while (sv) {
04389         imop = append_elem(OP_LIST, imop, newSVOP(OP_CONST, 0, sv));
04390         sv = va_arg(*args, SV*);
04391     }
04392     }
04393     {
04394     const line_t ocopline = PL_copline;
04395     COP * const ocurcop = PL_curcop;
04396     const int oexpect = PL_expect;
04397 
04398 #if (PERL_BCDVERSION >= 0x5004000)
04399     utilize(!(flags & PERL_LOADMOD_DENY), start_subparse(FALSE, 0),
04400         veop, modname, imop);
04401 #else
04402     utilize(!(flags & PERL_LOADMOD_DENY), start_subparse(),
04403         modname, imop);
04404 #endif
04405     PL_expect = oexpect;
04406     PL_copline = ocopline;
04407     PL_curcop = ocurcop;
04408     }
04409 }
04410 
04411 #endif
04412 #endif
04413 
04414 #ifndef load_module
04415 #if defined(NEED_load_module)
04416 static void DPPP_(my_load_module)(U32 flags, SV *name, SV *ver, ...);
04417 static
04418 #else
04419 extern void DPPP_(my_load_module)(U32 flags, SV *name, SV *ver, ...);
04420 #endif
04421 
04422 #ifdef load_module
04423 #  undef load_module
04424 #endif
04425 #define load_module DPPP_(my_load_module)
04426 #define Perl_load_module DPPP_(my_load_module)
04427 
04428 #if defined(NEED_load_module) || defined(NEED_load_module_GLOBAL)
04429 
04430 void
04431 DPPP_(my_load_module)(U32 flags, SV *name, SV *ver, ...)
04432 {
04433     va_list args;
04434     va_start(args, ver);
04435     vload_module(flags, name, ver, &args);
04436     va_end(args);
04437 }
04438 
04439 #endif
04440 #endif
04441 #ifndef newRV_inc
04442 #  define newRV_inc(sv)                  newRV(sv)   /* Replace */
04443 #endif
04444 
04445 #ifndef newRV_noinc
04446 #if defined(NEED_newRV_noinc)
04447 static SV * DPPP_(my_newRV_noinc)(SV *sv);
04448 static
04449 #else
04450 extern SV * DPPP_(my_newRV_noinc)(SV *sv);
04451 #endif
04452 
04453 #ifdef newRV_noinc
04454 #  undef newRV_noinc
04455 #endif
04456 #define newRV_noinc(a) DPPP_(my_newRV_noinc)(aTHX_ a)
04457 #define Perl_newRV_noinc DPPP_(my_newRV_noinc)
04458 
04459 #if defined(NEED_newRV_noinc) || defined(NEED_newRV_noinc_GLOBAL)
04460 SV *
04461 DPPP_(my_newRV_noinc)(SV *sv)
04462 {
04463   SV *rv = (SV *)newRV(sv);
04464   SvREFCNT_dec(sv);
04465   return rv;
04466 }
04467 #endif
04468 #endif
04469 
04470 /* Hint: newCONSTSUB
04471  * Returns a CV* as of perl-5.7.1. This return value is not supported
04472  * by Devel::PPPort.
04473  */
04474 
04475 /* newCONSTSUB from IO.xs is in the core starting with 5.004_63 */
04476 #if (PERL_BCDVERSION < 0x5004063) && (PERL_BCDVERSION != 0x5004005)
04477 #if defined(NEED_newCONSTSUB)
04478 static void DPPP_(my_newCONSTSUB)(HV *stash, const char *name, SV *sv);
04479 static
04480 #else
04481 extern void DPPP_(my_newCONSTSUB)(HV *stash, const char *name, SV *sv);
04482 #endif
04483 
04484 #ifdef newCONSTSUB
04485 #  undef newCONSTSUB
04486 #endif
04487 #define newCONSTSUB(a,b,c) DPPP_(my_newCONSTSUB)(aTHX_ a,b,c)
04488 #define Perl_newCONSTSUB DPPP_(my_newCONSTSUB)
04489 
04490 #if defined(NEED_newCONSTSUB) || defined(NEED_newCONSTSUB_GLOBAL)
04491 
04492 /* This is just a trick to avoid a dependency of newCONSTSUB on PL_parser */
04493 /* (There's no PL_parser in perl < 5.005, so this is completely safe)     */
04494 #define D_PPP_PL_copline PL_copline
04495 
04496 void
04497 DPPP_(my_newCONSTSUB)(HV *stash, const char *name, SV *sv)
04498 {
04499     U32 oldhints = PL_hints;
04500     HV *old_cop_stash = PL_curcop->cop_stash;
04501     HV *old_curstash = PL_curstash;
04502     line_t oldline = PL_curcop->cop_line;
04503     PL_curcop->cop_line = D_PPP_PL_copline;
04504 
04505     PL_hints &= ~HINT_BLOCK_SCOPE;
04506     if (stash)
04507         PL_curstash = PL_curcop->cop_stash = stash;
04508 
04509     newSUB(
04510 
04511 #if   (PERL_BCDVERSION < 0x5003022)
04512         start_subparse(),
04513 #elif (PERL_BCDVERSION == 0x5003022)
04514             start_subparse(0),
04515 #else  /* 5.003_23  onwards */
04516             start_subparse(FALSE, 0),
04517 #endif
04518 
04519         newSVOP(OP_CONST, 0, newSVpv((char *) name, 0)),
04520         newSVOP(OP_CONST, 0, &PL_sv_no),   /* SvPV(&PL_sv_no) == "" -- GMB */
04521         newSTATEOP(0, Nullch, newSVOP(OP_CONST, 0, sv))
04522     );
04523 
04524     PL_hints = oldhints;
04525     PL_curcop->cop_stash = old_cop_stash;
04526     PL_curstash = old_curstash;
04527     PL_curcop->cop_line = oldline;
04528 }
04529 #endif
04530 #endif
04531 
04532 /*
04533  * Boilerplate macros for initializing and accessing interpreter-local
04534  * data from C.  All statics in extensions should be reworked to use
04535  * this, if you want to make the extension thread-safe.  See ext/re/re.xs
04536  * for an example of the use of these macros.
04537  *
04538  * Code that uses these macros is responsible for the following:
04539  * 1. #define MY_CXT_KEY to a unique string, e.g. "DynaLoader_guts"
04540  * 2. Declare a typedef named my_cxt_t that is a structure that contains
04541  *    all the data that needs to be interpreter-local.
04542  * 3. Use the START_MY_CXT macro after the declaration of my_cxt_t.
04543  * 4. Use the MY_CXT_INIT macro such that it is called exactly once
04544  *    (typically put in the BOOT: section).
04545  * 5. Use the members of the my_cxt_t structure everywhere as
04546  *    MY_CXT.member.
04547  * 6. Use the dMY_CXT macro (a declaration) in all the functions that
04548  *    access MY_CXT.
04549  */
04550 
04551 #if defined(MULTIPLICITY) || defined(PERL_OBJECT) || \
04552     defined(PERL_CAPI)    || defined(PERL_IMPLICIT_CONTEXT)
04553 
04554 #ifndef START_MY_CXT
04555 
04556 /* This must appear in all extensions that define a my_cxt_t structure,
04557  * right after the definition (i.e. at file scope).  The non-threads
04558  * case below uses it to declare the data as static. */
04559 #define START_MY_CXT
04560 
04561 #if (PERL_BCDVERSION < 0x5004068)
04562 /* Fetches the SV that keeps the per-interpreter data. */
04563 #define dMY_CXT_SV \
04564     SV *my_cxt_sv = get_sv(MY_CXT_KEY, FALSE)
04565 #else /* >= perl5.004_68 */
04566 #define dMY_CXT_SV \
04567     SV *my_cxt_sv = *hv_fetch(PL_modglobal, MY_CXT_KEY,     \
04568                   sizeof(MY_CXT_KEY)-1, TRUE)
04569 #endif /* < perl5.004_68 */
04570 
04571 /* This declaration should be used within all functions that use the
04572  * interpreter-local data. */
04573 #define dMY_CXT \
04574     dMY_CXT_SV;                         \
04575     my_cxt_t *my_cxtp = INT2PTR(my_cxt_t*,SvUV(my_cxt_sv))
04576 
04577 /* Creates and zeroes the per-interpreter data.
04578  * (We allocate my_cxtp in a Perl SV so that it will be released when
04579  * the interpreter goes away.) */
04580 #define MY_CXT_INIT \
04581     dMY_CXT_SV;                         \
04582     /* newSV() allocates one more than needed */            \
04583     my_cxt_t *my_cxtp = (my_cxt_t*)SvPVX(newSV(sizeof(my_cxt_t)-1));\
04584     Zero(my_cxtp, 1, my_cxt_t);                 \
04585     sv_setuv(my_cxt_sv, PTR2UV(my_cxtp))
04586 
04587 /* This macro must be used to access members of the my_cxt_t structure.
04588  * e.g. MYCXT.some_data */
04589 #define MY_CXT      (*my_cxtp)
04590 
04591 /* Judicious use of these macros can reduce the number of times dMY_CXT
04592  * is used.  Use is similar to pTHX, aTHX etc. */
04593 #define pMY_CXT     my_cxt_t *my_cxtp
04594 #define pMY_CXT_    pMY_CXT,
04595 #define _pMY_CXT    ,pMY_CXT
04596 #define aMY_CXT     my_cxtp
04597 #define aMY_CXT_    aMY_CXT,
04598 #define _aMY_CXT    ,aMY_CXT
04599 
04600 #endif /* START_MY_CXT */
04601 
04602 #ifndef MY_CXT_CLONE
04603 /* Clones the per-interpreter data. */
04604 #define MY_CXT_CLONE \
04605     dMY_CXT_SV;                         \
04606     my_cxt_t *my_cxtp = (my_cxt_t*)SvPVX(newSV(sizeof(my_cxt_t)-1));\
04607     Copy(INT2PTR(my_cxt_t*, SvUV(my_cxt_sv)), my_cxtp, 1, my_cxt_t);\
04608     sv_setuv(my_cxt_sv, PTR2UV(my_cxtp))
04609 #endif
04610 
04611 #else /* single interpreter */
04612 
04613 #ifndef START_MY_CXT
04614 
04615 #define START_MY_CXT    static my_cxt_t my_cxt;
04616 #define dMY_CXT_SV  dNOOP
04617 #define dMY_CXT     dNOOP
04618 #define MY_CXT_INIT NOOP
04619 #define MY_CXT      my_cxt
04620 
04621 #define pMY_CXT     void
04622 #define pMY_CXT_
04623 #define _pMY_CXT
04624 #define aMY_CXT
04625 #define aMY_CXT_
04626 #define _aMY_CXT
04627 
04628 #endif /* START_MY_CXT */
04629 
04630 #ifndef MY_CXT_CLONE
04631 #define MY_CXT_CLONE    NOOP
04632 #endif
04633 
04634 #endif
04635 
04636 #ifndef IVdf
04637 #  if IVSIZE == LONGSIZE
04638 #    define IVdf      "ld"
04639 #    define UVuf      "lu"
04640 #    define UVof      "lo"
04641 #    define UVxf      "lx"
04642 #    define UVXf      "lX"
04643 #  else
04644 #    if IVSIZE == INTSIZE
04645 #      define   IVdf      "d"
04646 #      define   UVuf      "u"
04647 #      define   UVof      "o"
04648 #      define   UVxf      "x"
04649 #      define   UVXf      "X"
04650 #    endif
04651 #  endif
04652 #endif
04653 
04654 #ifndef NVef
04655 #  if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE) && \
04656       defined(PERL_PRIfldbl) && (PERL_BCDVERSION != 0x5006000)
04657             /* Not very likely, but let's try anyway. */
04658 #    define NVef          PERL_PRIeldbl
04659 #    define NVff          PERL_PRIfldbl
04660 #    define NVgf          PERL_PRIgldbl
04661 #  else
04662 #    define NVef          "e"
04663 #    define NVff          "f"
04664 #    define NVgf          "g"
04665 #  endif
04666 #endif
04667 
04668 #ifndef SvREFCNT_inc
04669 #  ifdef PERL_USE_GCC_BRACE_GROUPS
04670 #    define SvREFCNT_inc(sv)        \
04671       ({                \
04672           SV * const _sv = (SV*)(sv);   \
04673           if (_sv)          \
04674                (SvREFCNT(_sv))++;   \
04675           _sv;              \
04676       })
04677 #  else
04678 #    define SvREFCNT_inc(sv)    \
04679           ((PL_Sv=(SV*)(sv)) ? (++(SvREFCNT(PL_Sv)),PL_Sv) : NULL)
04680 #  endif
04681 #endif
04682 
04683 #ifndef SvREFCNT_inc_simple
04684 #  ifdef PERL_USE_GCC_BRACE_GROUPS
04685 #    define SvREFCNT_inc_simple(sv) \
04686       ({                    \
04687           if (sv)               \
04688                (SvREFCNT(sv))++;        \
04689           (SV *)(sv);               \
04690       })
04691 #  else
04692 #    define SvREFCNT_inc_simple(sv) \
04693           ((sv) ? (SvREFCNT(sv)++,(SV*)(sv)) : NULL)
04694 #  endif
04695 #endif
04696 
04697 #ifndef SvREFCNT_inc_NN
04698 #  ifdef PERL_USE_GCC_BRACE_GROUPS
04699 #    define SvREFCNT_inc_NN(sv)     \
04700       ({                    \
04701           SV * const _sv = (SV*)(sv);   \
04702           SvREFCNT(_sv)++;      \
04703           _sv;              \
04704       })
04705 #  else
04706 #    define SvREFCNT_inc_NN(sv) \
04707           (PL_Sv=(SV*)(sv),++(SvREFCNT(PL_Sv)),PL_Sv)
04708 #  endif
04709 #endif
04710 
04711 #ifndef SvREFCNT_inc_void
04712 #  ifdef PERL_USE_GCC_BRACE_GROUPS
04713 #    define SvREFCNT_inc_void(sv)       \
04714       ({                    \
04715           SV * const _sv = (SV*)(sv);   \
04716           if (_sv)          \
04717               (void)(SvREFCNT(_sv)++);  \
04718       })
04719 #  else
04720 #    define SvREFCNT_inc_void(sv) \
04721           (void)((PL_Sv=(SV*)(sv)) ? ++(SvREFCNT(PL_Sv)) : 0)
04722 #  endif
04723 #endif
04724 #ifndef SvREFCNT_inc_simple_void
04725 #  define SvREFCNT_inc_simple_void(sv)   STMT_START { if (sv) SvREFCNT(sv)++; } STMT_END
04726 #endif
04727 
04728 #ifndef SvREFCNT_inc_simple_NN
04729 #  define SvREFCNT_inc_simple_NN(sv)     (++SvREFCNT(sv), (SV*)(sv))
04730 #endif
04731 
04732 #ifndef SvREFCNT_inc_void_NN
04733 #  define SvREFCNT_inc_void_NN(sv)       (void)(++SvREFCNT((SV*)(sv)))
04734 #endif
04735 
04736 #ifndef SvREFCNT_inc_simple_void_NN
04737 #  define SvREFCNT_inc_simple_void_NN(sv) (void)(++SvREFCNT((SV*)(sv)))
04738 #endif
04739 
04740 #ifndef newSV_type
04741 
04742 #if defined(NEED_newSV_type)
04743 static SV* DPPP_(my_newSV_type)(pTHX_ svtype const t);
04744 static
04745 #else
04746 extern SV* DPPP_(my_newSV_type)(pTHX_ svtype const t);
04747 #endif
04748 
04749 #ifdef newSV_type
04750 #  undef newSV_type
04751 #endif
04752 #define newSV_type(a) DPPP_(my_newSV_type)(aTHX_ a)
04753 #define Perl_newSV_type DPPP_(my_newSV_type)
04754 
04755 #if defined(NEED_newSV_type) || defined(NEED_newSV_type_GLOBAL)
04756 
04757 SV*
04758 DPPP_(my_newSV_type)(pTHX_ svtype const t)
04759 {
04760   SV* const sv = newSV(0);
04761   sv_upgrade(sv, t);
04762   return sv;
04763 }
04764 
04765 #endif
04766 
04767 #endif
04768 
04769 #if (PERL_BCDVERSION < 0x5006000)
04770 # define D_PPP_CONSTPV_ARG(x)  ((char *) (x))
04771 #else
04772 # define D_PPP_CONSTPV_ARG(x)  (x)
04773 #endif
04774 #ifndef newSVpvn
04775 #  define newSVpvn(data,len)             ((data)                                              \
04776                                     ? ((len) ? newSVpv((data), (len)) : newSVpv("", 0)) \
04777                                     : newSV(0))
04778 #endif
04779 #ifndef newSVpvn_utf8
04780 #  define newSVpvn_utf8(s, len, u)       newSVpvn_flags((s), (len), (u) ? SVf_UTF8 : 0)
04781 #endif
04782 #ifndef SVf_UTF8
04783 #  define SVf_UTF8                       0
04784 #endif
04785 
04786 #ifndef newSVpvn_flags
04787 
04788 #if defined(NEED_newSVpvn_flags)
04789 static SV * DPPP_(my_newSVpvn_flags)(pTHX_ const char *s, STRLEN len, U32 flags);
04790 static
04791 #else
04792 extern SV * DPPP_(my_newSVpvn_flags)(pTHX_ const char *s, STRLEN len, U32 flags);
04793 #endif
04794 
04795 #ifdef newSVpvn_flags
04796 #  undef newSVpvn_flags
04797 #endif
04798 #define newSVpvn_flags(a,b,c) DPPP_(my_newSVpvn_flags)(aTHX_ a,b,c)
04799 #define Perl_newSVpvn_flags DPPP_(my_newSVpvn_flags)
04800 
04801 #if defined(NEED_newSVpvn_flags) || defined(NEED_newSVpvn_flags_GLOBAL)
04802 
04803 SV *
04804 DPPP_(my_newSVpvn_flags)(pTHX_ const char *s, STRLEN len, U32 flags)
04805 {
04806   SV *sv = newSVpvn(D_PPP_CONSTPV_ARG(s), len);
04807   SvFLAGS(sv) |= (flags & SVf_UTF8);
04808   return (flags & SVs_TEMP) ? sv_2mortal(sv) : sv;
04809 }
04810 
04811 #endif
04812 
04813 #endif
04814 
04815 /* Backwards compatibility stuff... :-( */
04816 #if !defined(NEED_sv_2pv_flags) && defined(NEED_sv_2pv_nolen)
04817 #  define NEED_sv_2pv_flags
04818 #endif
04819 #if !defined(NEED_sv_2pv_flags_GLOBAL) && defined(NEED_sv_2pv_nolen_GLOBAL)
04820 #  define NEED_sv_2pv_flags_GLOBAL
04821 #endif
04822 
04823 /* Hint: sv_2pv_nolen
04824  * Use the SvPV_nolen() or SvPV_nolen_const() macros instead of sv_2pv_nolen().
04825  */
04826 #ifndef sv_2pv_nolen
04827 #  define sv_2pv_nolen(sv)               SvPV_nolen(sv)
04828 #endif
04829 
04830 #ifdef SvPVbyte
04831 
04832 /* Hint: SvPVbyte
04833  * Does not work in perl-5.6.1, ppport.h implements a version
04834  * borrowed from perl-5.7.3.
04835  */
04836 
04837 #if (PERL_BCDVERSION < 0x5007000)
04838 
04839 #if defined(NEED_sv_2pvbyte)
04840 static char * DPPP_(my_sv_2pvbyte)(pTHX_ SV *sv, STRLEN *lp);
04841 static
04842 #else
04843 extern char * DPPP_(my_sv_2pvbyte)(pTHX_ SV *sv, STRLEN *lp);
04844 #endif
04845 
04846 #ifdef sv_2pvbyte
04847 #  undef sv_2pvbyte
04848 #endif
04849 #define sv_2pvbyte(a,b) DPPP_(my_sv_2pvbyte)(aTHX_ a,b)
04850 #define Perl_sv_2pvbyte DPPP_(my_sv_2pvbyte)
04851 
04852 #if defined(NEED_sv_2pvbyte) || defined(NEED_sv_2pvbyte_GLOBAL)
04853 
04854 char *
04855 DPPP_(my_sv_2pvbyte)(pTHX_ SV *sv, STRLEN *lp)
04856 {
04857   sv_utf8_downgrade(sv,0);
04858   return SvPV(sv,*lp);
04859 }
04860 
04861 #endif
04862 
04863 /* Hint: sv_2pvbyte
04864  * Use the SvPVbyte() macro instead of sv_2pvbyte().
04865  */
04866 
04867 #undef SvPVbyte
04868 
04869 #define SvPVbyte(sv, lp)                                                \
04870         ((SvFLAGS(sv) & (SVf_POK|SVf_UTF8)) == (SVf_POK)                \
04871          ? ((lp = SvCUR(sv)), SvPVX(sv)) : sv_2pvbyte(sv, &lp))
04872 
04873 #endif
04874 
04875 #else
04876 
04877 #  define SvPVbyte          SvPV
04878 #  define sv_2pvbyte        sv_2pv
04879 
04880 #endif
04881 #ifndef sv_2pvbyte_nolen
04882 #  define sv_2pvbyte_nolen(sv)           sv_2pv_nolen(sv)
04883 #endif
04884 
04885 /* Hint: sv_pvn
04886  * Always use the SvPV() macro instead of sv_pvn().
04887  */
04888 
04889 /* Hint: sv_pvn_force
04890  * Always use the SvPV_force() macro instead of sv_pvn_force().
04891  */
04892 
04893 /* If these are undefined, they're not handled by the core anyway */
04894 #ifndef SV_IMMEDIATE_UNREF
04895 #  define SV_IMMEDIATE_UNREF             0
04896 #endif
04897 
04898 #ifndef SV_GMAGIC
04899 #  define SV_GMAGIC                      0
04900 #endif
04901 
04902 #ifndef SV_COW_DROP_PV
04903 #  define SV_COW_DROP_PV                 0
04904 #endif
04905 
04906 #ifndef SV_UTF8_NO_ENCODING
04907 #  define SV_UTF8_NO_ENCODING            0
04908 #endif
04909 
04910 #ifndef SV_NOSTEAL
04911 #  define SV_NOSTEAL                     0
04912 #endif
04913 
04914 #ifndef SV_CONST_RETURN
04915 #  define SV_CONST_RETURN                0
04916 #endif
04917 
04918 #ifndef SV_MUTABLE_RETURN
04919 #  define SV_MUTABLE_RETURN              0
04920 #endif
04921 
04922 #ifndef SV_SMAGIC
04923 #  define SV_SMAGIC                      0
04924 #endif
04925 
04926 #ifndef SV_HAS_TRAILING_NUL
04927 #  define SV_HAS_TRAILING_NUL            0
04928 #endif
04929 
04930 #ifndef SV_COW_SHARED_HASH_KEYS
04931 #  define SV_COW_SHARED_HASH_KEYS        0
04932 #endif
04933 
04934 #if (PERL_BCDVERSION < 0x5007002)
04935 
04936 #if defined(NEED_sv_2pv_flags)
04937 static char * DPPP_(my_sv_2pv_flags)(pTHX_ SV *sv, STRLEN *lp, I32 flags);
04938 static
04939 #else
04940 extern char * DPPP_(my_sv_2pv_flags)(pTHX_ SV *sv, STRLEN *lp, I32 flags);
04941 #endif
04942 
04943 #ifdef sv_2pv_flags
04944 #  undef sv_2pv_flags
04945 #endif
04946 #define sv_2pv_flags(a,b,c) DPPP_(my_sv_2pv_flags)(aTHX_ a,b,c)
04947 #define Perl_sv_2pv_flags DPPP_(my_sv_2pv_flags)
04948 
04949 #if defined(NEED_sv_2pv_flags) || defined(NEED_sv_2pv_flags_GLOBAL)
04950 
04951 char *
04952 DPPP_(my_sv_2pv_flags)(pTHX_ SV *sv, STRLEN *lp, I32 flags)
04953 {
04954   STRLEN n_a = (STRLEN) flags;
04955   return sv_2pv(sv, lp ? lp : &n_a);
04956 }
04957 
04958 #endif
04959 
04960 #if defined(NEED_sv_pvn_force_flags)
04961 static char * DPPP_(my_sv_pvn_force_flags)(pTHX_ SV *sv, STRLEN *lp, I32 flags);
04962 static
04963 #else
04964 extern char * DPPP_(my_sv_pvn_force_flags)(pTHX_ SV *sv, STRLEN *lp, I32 flags);
04965 #endif
04966 
04967 #ifdef sv_pvn_force_flags
04968 #  undef sv_pvn_force_flags
04969 #endif
04970 #define sv_pvn_force_flags(a,b,c) DPPP_(my_sv_pvn_force_flags)(aTHX_ a,b,c)
04971 #define Perl_sv_pvn_force_flags DPPP_(my_sv_pvn_force_flags)
04972 
04973 #if defined(NEED_sv_pvn_force_flags) || defined(NEED_sv_pvn_force_flags_GLOBAL)
04974 
04975 char *
04976 DPPP_(my_sv_pvn_force_flags)(pTHX_ SV *sv, STRLEN *lp, I32 flags)
04977 {
04978   STRLEN n_a = (STRLEN) flags;
04979   return sv_pvn_force(sv, lp ? lp : &n_a);
04980 }
04981 
04982 #endif
04983 
04984 #endif
04985 
04986 #if (PERL_BCDVERSION < 0x5008008) || ( (PERL_BCDVERSION >= 0x5009000) && (PERL_BCDVERSION < 0x5009003) )
04987 # define DPPP_SVPV_NOLEN_LP_ARG &PL_na
04988 #else
04989 # define DPPP_SVPV_NOLEN_LP_ARG 0
04990 #endif
04991 #ifndef SvPV_const
04992 #  define SvPV_const(sv, lp)             SvPV_flags_const(sv, lp, SV_GMAGIC)
04993 #endif
04994 
04995 #ifndef SvPV_mutable
04996 #  define SvPV_mutable(sv, lp)           SvPV_flags_mutable(sv, lp, SV_GMAGIC)
04997 #endif
04998 #ifndef SvPV_flags
04999 #  define SvPV_flags(sv, lp, flags)      \
05000                  ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
05001                   ? ((lp = SvCUR(sv)), SvPVX(sv)) : sv_2pv_flags(sv, &lp, flags))
05002 #endif
05003 #ifndef SvPV_flags_const
05004 #  define SvPV_flags_const(sv, lp, flags) \
05005                  ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
05006                   ? ((lp = SvCUR(sv)), SvPVX_const(sv)) : \
05007                   (const char*) sv_2pv_flags(sv, &lp, flags|SV_CONST_RETURN))
05008 #endif
05009 #ifndef SvPV_flags_const_nolen
05010 #  define SvPV_flags_const_nolen(sv, flags) \
05011                  ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
05012                   ? SvPVX_const(sv) : \
05013                   (const char*) sv_2pv_flags(sv, DPPP_SVPV_NOLEN_LP_ARG, flags|SV_CONST_RETURN))
05014 #endif
05015 #ifndef SvPV_flags_mutable
05016 #  define SvPV_flags_mutable(sv, lp, flags) \
05017                  ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
05018                   ? ((lp = SvCUR(sv)), SvPVX_mutable(sv)) : \
05019                   sv_2pv_flags(sv, &lp, flags|SV_MUTABLE_RETURN))
05020 #endif
05021 #ifndef SvPV_force
05022 #  define SvPV_force(sv, lp)             SvPV_force_flags(sv, lp, SV_GMAGIC)
05023 #endif
05024 
05025 #ifndef SvPV_force_nolen
05026 #  define SvPV_force_nolen(sv)           SvPV_force_flags_nolen(sv, SV_GMAGIC)
05027 #endif
05028 
05029 #ifndef SvPV_force_mutable
05030 #  define SvPV_force_mutable(sv, lp)     SvPV_force_flags_mutable(sv, lp, SV_GMAGIC)
05031 #endif
05032 
05033 #ifndef SvPV_force_nomg
05034 #  define SvPV_force_nomg(sv, lp)        SvPV_force_flags(sv, lp, 0)
05035 #endif
05036 
05037 #ifndef SvPV_force_nomg_nolen
05038 #  define SvPV_force_nomg_nolen(sv)      SvPV_force_flags_nolen(sv, 0)
05039 #endif
05040 #ifndef SvPV_force_flags
05041 #  define SvPV_force_flags(sv, lp, flags) \
05042                  ((SvFLAGS(sv) & (SVf_POK|SVf_THINKFIRST)) == SVf_POK \
05043                  ? ((lp = SvCUR(sv)), SvPVX(sv)) : sv_pvn_force_flags(sv, &lp, flags))
05044 #endif
05045 #ifndef SvPV_force_flags_nolen
05046 #  define SvPV_force_flags_nolen(sv, flags) \
05047                  ((SvFLAGS(sv) & (SVf_POK|SVf_THINKFIRST)) == SVf_POK \
05048                  ? SvPVX(sv) : sv_pvn_force_flags(sv, DPPP_SVPV_NOLEN_LP_ARG, flags))
05049 #endif
05050 #ifndef SvPV_force_flags_mutable
05051 #  define SvPV_force_flags_mutable(sv, lp, flags) \
05052                  ((SvFLAGS(sv) & (SVf_POK|SVf_THINKFIRST)) == SVf_POK \
05053                  ? ((lp = SvCUR(sv)), SvPVX_mutable(sv)) \
05054                   : sv_pvn_force_flags(sv, &lp, flags|SV_MUTABLE_RETURN))
05055 #endif
05056 #ifndef SvPV_nolen
05057 #  define SvPV_nolen(sv)                 \
05058                  ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
05059                   ? SvPVX(sv) : sv_2pv_flags(sv, DPPP_SVPV_NOLEN_LP_ARG, SV_GMAGIC))
05060 #endif
05061 #ifndef SvPV_nolen_const
05062 #  define SvPV_nolen_const(sv)           \
05063                  ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
05064                   ? SvPVX_const(sv) : sv_2pv_flags(sv, DPPP_SVPV_NOLEN_LP_ARG, SV_GMAGIC|SV_CONST_RETURN))
05065 #endif
05066 #ifndef SvPV_nomg
05067 #  define SvPV_nomg(sv, lp)              SvPV_flags(sv, lp, 0)
05068 #endif
05069 
05070 #ifndef SvPV_nomg_const
05071 #  define SvPV_nomg_const(sv, lp)        SvPV_flags_const(sv, lp, 0)
05072 #endif
05073 
05074 #ifndef SvPV_nomg_const_nolen
05075 #  define SvPV_nomg_const_nolen(sv)      SvPV_flags_const_nolen(sv, 0)
05076 #endif
05077 #ifndef SvPV_renew
05078 #  define SvPV_renew(sv,n)               STMT_START { SvLEN_set(sv, n); \
05079                  SvPV_set((sv), (char *) saferealloc(          \
05080                        (Malloc_t)SvPVX(sv), (MEM_SIZE)((n)))); \
05081                } STMT_END
05082 #endif
05083 #ifndef SvMAGIC_set
05084 #  define SvMAGIC_set(sv, val)           \
05085                 STMT_START { assert(SvTYPE(sv) >= SVt_PVMG); \
05086                 (((XPVMG*) SvANY(sv))->xmg_magic = (val)); } STMT_END
05087 #endif
05088 
05089 #if (PERL_BCDVERSION < 0x5009003)
05090 #ifndef SvPVX_const
05091 #  define SvPVX_const(sv)                ((const char*) (0 + SvPVX(sv)))
05092 #endif
05093 
05094 #ifndef SvPVX_mutable
05095 #  define SvPVX_mutable(sv)              (0 + SvPVX(sv))
05096 #endif
05097 #ifndef SvRV_set
05098 #  define SvRV_set(sv, val)              \
05099                 STMT_START { assert(SvTYPE(sv) >=  SVt_RV); \
05100                 (((XRV*) SvANY(sv))->xrv_rv = (val)); } STMT_END
05101 #endif
05102 
05103 #else
05104 #ifndef SvPVX_const
05105 #  define SvPVX_const(sv)                ((const char*)((sv)->sv_u.svu_pv))
05106 #endif
05107 
05108 #ifndef SvPVX_mutable
05109 #  define SvPVX_mutable(sv)              ((sv)->sv_u.svu_pv)
05110 #endif
05111 #ifndef SvRV_set
05112 #  define SvRV_set(sv, val)              \
05113                 STMT_START { assert(SvTYPE(sv) >=  SVt_RV); \
05114                 ((sv)->sv_u.svu_rv = (val)); } STMT_END
05115 #endif
05116 
05117 #endif
05118 #ifndef SvSTASH_set
05119 #  define SvSTASH_set(sv, val)           \
05120                 STMT_START { assert(SvTYPE(sv) >= SVt_PVMG); \
05121                 (((XPVMG*) SvANY(sv))->xmg_stash = (val)); } STMT_END
05122 #endif
05123 
05124 #if (PERL_BCDVERSION < 0x5004000)
05125 #ifndef SvUV_set
05126 #  define SvUV_set(sv, val)              \
05127                 STMT_START { assert(SvTYPE(sv) == SVt_IV || SvTYPE(sv) >= SVt_PVIV); \
05128                 (((XPVIV*) SvANY(sv))->xiv_iv = (IV) (val)); } STMT_END
05129 #endif
05130 
05131 #else
05132 #ifndef SvUV_set
05133 #  define SvUV_set(sv, val)              \
05134                 STMT_START { assert(SvTYPE(sv) == SVt_IV || SvTYPE(sv) >= SVt_PVIV); \
05135                 (((XPVUV*) SvANY(sv))->xuv_uv = (val)); } STMT_END
05136 #endif
05137 
05138 #endif
05139 
05140 #if (PERL_BCDVERSION >= 0x5004000) && !defined(vnewSVpvf)
05141 #if defined(NEED_vnewSVpvf)
05142 static SV * DPPP_(my_vnewSVpvf)(pTHX_ const char *pat, va_list *args);
05143 static
05144 #else
05145 extern SV * DPPP_(my_vnewSVpvf)(pTHX_ const char *pat, va_list *args);
05146 #endif
05147 
05148 #ifdef vnewSVpvf
05149 #  undef vnewSVpvf
05150 #endif
05151 #define vnewSVpvf(a,b) DPPP_(my_vnewSVpvf)(aTHX_ a,b)
05152 #define Perl_vnewSVpvf DPPP_(my_vnewSVpvf)
05153 
05154 #if defined(NEED_vnewSVpvf) || defined(NEED_vnewSVpvf_GLOBAL)
05155 
05156 SV *
05157 DPPP_(my_vnewSVpvf)(pTHX_ const char *pat, va_list *args)
05158 {
05159   register SV *sv = newSV(0);
05160   sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*));
05161   return sv;
05162 }
05163 
05164 #endif
05165 #endif
05166 
05167 #if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_vcatpvf)
05168 #  define sv_vcatpvf(sv, pat, args)  sv_vcatpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*))
05169 #endif
05170 
05171 #if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_vsetpvf)
05172 #  define sv_vsetpvf(sv, pat, args)  sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*))
05173 #endif
05174 
05175 #if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_catpvf_mg)
05176 #if defined(NEED_sv_catpvf_mg)
05177 static void DPPP_(my_sv_catpvf_mg)(pTHX_ SV *sv, const char *pat, ...);
05178 static
05179 #else
05180 extern void DPPP_(my_sv_catpvf_mg)(pTHX_ SV *sv, const char *pat, ...);
05181 #endif
05182 
05183 #define Perl_sv_catpvf_mg DPPP_(my_sv_catpvf_mg)
05184 
05185 #if defined(NEED_sv_catpvf_mg) || defined(NEED_sv_catpvf_mg_GLOBAL)
05186 
05187 void
05188 DPPP_(my_sv_catpvf_mg)(pTHX_ SV *sv, const char *pat, ...)
05189 {
05190   va_list args;
05191   va_start(args, pat);
05192   sv_vcatpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*));
05193   SvSETMAGIC(sv);
05194   va_end(args);
05195 }
05196 
05197 #endif
05198 #endif
05199 
05200 #ifdef PERL_IMPLICIT_CONTEXT
05201 #if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_catpvf_mg_nocontext)
05202 #if defined(NEED_sv_catpvf_mg_nocontext)
05203 static void DPPP_(my_sv_catpvf_mg_nocontext)(SV *sv, const char *pat, ...);
05204 static
05205 #else
05206 extern void DPPP_(my_sv_catpvf_mg_nocontext)(SV *sv, const char *pat, ...);
05207 #endif
05208 
05209 #define sv_catpvf_mg_nocontext DPPP_(my_sv_catpvf_mg_nocontext)
05210 #define Perl_sv_catpvf_mg_nocontext DPPP_(my_sv_catpvf_mg_nocontext)
05211 
05212 #if defined(NEED_sv_catpvf_mg_nocontext) || defined(NEED_sv_catpvf_mg_nocontext_GLOBAL)
05213 
05214 void
05215 DPPP_(my_sv_catpvf_mg_nocontext)(SV *sv, const char *pat, ...)
05216 {
05217   dTHX;
05218   va_list args;
05219   va_start(args, pat);
05220   sv_vcatpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*));
05221   SvSETMAGIC(sv);
05222   va_end(args);
05223 }
05224 
05225 #endif
05226 #endif
05227 #endif
05228 
05229 /* sv_catpvf_mg depends on sv_catpvf_mg_nocontext */
05230 #ifndef sv_catpvf_mg
05231 #  ifdef PERL_IMPLICIT_CONTEXT
05232 #    define sv_catpvf_mg   Perl_sv_catpvf_mg_nocontext
05233 #  else
05234 #    define sv_catpvf_mg   Perl_sv_catpvf_mg
05235 #  endif
05236 #endif
05237 
05238 #if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_vcatpvf_mg)
05239 #  define sv_vcatpvf_mg(sv, pat, args)                                     \
05240    STMT_START {                                                            \
05241      sv_vcatpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*));  \
05242      SvSETMAGIC(sv);                                                       \
05243    } STMT_END
05244 #endif
05245 
05246 #if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_setpvf_mg)
05247 #if defined(NEED_sv_setpvf_mg)
05248 static void DPPP_(my_sv_setpvf_mg)(pTHX_ SV *sv, const char *pat, ...);
05249 static
05250 #else
05251 extern void DPPP_(my_sv_setpvf_mg)(pTHX_ SV *sv, const char *pat, ...);
05252 #endif
05253 
05254 #define Perl_sv_setpvf_mg DPPP_(my_sv_setpvf_mg)
05255 
05256 #if defined(NEED_sv_setpvf_mg) || defined(NEED_sv_setpvf_mg_GLOBAL)
05257 
05258 void
05259 DPPP_(my_sv_setpvf_mg)(pTHX_ SV *sv, const char *pat, ...)
05260 {
05261   va_list args;
05262   va_start(args, pat);
05263   sv_vsetpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*));
05264   SvSETMAGIC(sv);
05265   va_end(args);
05266 }
05267 
05268 #endif
05269 #endif
05270 
05271 #ifdef PERL_IMPLICIT_CONTEXT
05272 #if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_setpvf_mg_nocontext)
05273 #if defined(NEED_sv_setpvf_mg_nocontext)
05274 static void DPPP_(my_sv_setpvf_mg_nocontext)(SV *sv, const char *pat, ...);
05275 static
05276 #else
05277 extern void DPPP_(my_sv_setpvf_mg_nocontext)(SV *sv, const char *pat, ...);
05278 #endif
05279 
05280 #define sv_setpvf_mg_nocontext DPPP_(my_sv_setpvf_mg_nocontext)
05281 #define Perl_sv_setpvf_mg_nocontext DPPP_(my_sv_setpvf_mg_nocontext)
05282 
05283 #if defined(NEED_sv_setpvf_mg_nocontext) || defined(NEED_sv_setpvf_mg_nocontext_GLOBAL)
05284 
05285 void
05286 DPPP_(my_sv_setpvf_mg_nocontext)(SV *sv, const char *pat, ...)
05287 {
05288   dTHX;
05289   va_list args;
05290   va_start(args, pat);
05291   sv_vsetpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*));
05292   SvSETMAGIC(sv);
05293   va_end(args);
05294 }
05295 
05296 #endif
05297 #endif
05298 #endif
05299 
05300 /* sv_setpvf_mg depends on sv_setpvf_mg_nocontext */
05301 #ifndef sv_setpvf_mg
05302 #  ifdef PERL_IMPLICIT_CONTEXT
05303 #    define sv_setpvf_mg   Perl_sv_setpvf_mg_nocontext
05304 #  else
05305 #    define sv_setpvf_mg   Perl_sv_setpvf_mg
05306 #  endif
05307 #endif
05308 
05309 #if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_vsetpvf_mg)
05310 #  define sv_vsetpvf_mg(sv, pat, args)                                     \
05311    STMT_START {                                                            \
05312      sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*));  \
05313      SvSETMAGIC(sv);                                                       \
05314    } STMT_END
05315 #endif
05316 
05317 #ifndef newSVpvn_share
05318 
05319 #if defined(NEED_newSVpvn_share)
05320 static SV * DPPP_(my_newSVpvn_share)(pTHX_ const char *src, I32 len, U32 hash);
05321 static
05322 #else
05323 extern SV * DPPP_(my_newSVpvn_share)(pTHX_ const char *src, I32 len, U32 hash);
05324 #endif
05325 
05326 #ifdef newSVpvn_share
05327 #  undef newSVpvn_share
05328 #endif
05329 #define newSVpvn_share(a,b,c) DPPP_(my_newSVpvn_share)(aTHX_ a,b,c)
05330 #define Perl_newSVpvn_share DPPP_(my_newSVpvn_share)
05331 
05332 #if defined(NEED_newSVpvn_share) || defined(NEED_newSVpvn_share_GLOBAL)
05333 
05334 SV *
05335 DPPP_(my_newSVpvn_share)(pTHX_ const char *src, I32 len, U32 hash)
05336 {
05337   SV *sv;
05338   if (len < 0)
05339     len = -len;
05340   if (!hash)
05341     PERL_HASH(hash, (char*) src, len);
05342   sv = newSVpvn((char *) src, len);
05343   sv_upgrade(sv, SVt_PVIV);
05344   SvIVX(sv) = hash;
05345   SvREADONLY_on(sv);
05346   SvPOK_on(sv);
05347   return sv;
05348 }
05349 
05350 #endif
05351 
05352 #endif
05353 #ifndef SvSHARED_HASH
05354 #  define SvSHARED_HASH(sv)              (0 + SvUVX(sv))
05355 #endif
05356 #ifndef HvNAME_get
05357 #  define HvNAME_get(hv)                 HvNAME(hv)
05358 #endif
05359 #ifndef HvNAMELEN_get
05360 #  define HvNAMELEN_get(hv)              (HvNAME_get(hv) ? (I32)strlen(HvNAME_get(hv)) : 0)
05361 #endif
05362 #ifndef GvSVn
05363 #  define GvSVn(gv)                      GvSV(gv)
05364 #endif
05365 
05366 #ifndef isGV_with_GP
05367 #  define isGV_with_GP(gv)               isGV(gv)
05368 #endif
05369 #ifndef WARN_ALL
05370 #  define WARN_ALL                       0
05371 #endif
05372 
05373 #ifndef WARN_CLOSURE
05374 #  define WARN_CLOSURE                   1
05375 #endif
05376 
05377 #ifndef WARN_DEPRECATED
05378 #  define WARN_DEPRECATED                2
05379 #endif
05380 
05381 #ifndef WARN_EXITING
05382 #  define WARN_EXITING                   3
05383 #endif
05384 
05385 #ifndef WARN_GLOB
05386 #  define WARN_GLOB                      4
05387 #endif
05388 
05389 #ifndef WARN_IO
05390 #  define WARN_IO                        5
05391 #endif
05392 
05393 #ifndef WARN_CLOSED
05394 #  define WARN_CLOSED                    6
05395 #endif
05396 
05397 #ifndef WARN_EXEC
05398 #  define WARN_EXEC                      7
05399 #endif
05400 
05401 #ifndef WARN_LAYER
05402 #  define WARN_LAYER                     8
05403 #endif
05404 
05405 #ifndef WARN_NEWLINE
05406 #  define WARN_NEWLINE                   9
05407 #endif
05408 
05409 #ifndef WARN_PIPE
05410 #  define WARN_PIPE                      10
05411 #endif
05412 
05413 #ifndef WARN_UNOPENED
05414 #  define WARN_UNOPENED                  11
05415 #endif
05416 
05417 #ifndef WARN_MISC
05418 #  define WARN_MISC                      12
05419 #endif
05420 
05421 #ifndef WARN_NUMERIC
05422 #  define WARN_NUMERIC                   13
05423 #endif
05424 
05425 #ifndef WARN_ONCE
05426 #  define WARN_ONCE                      14
05427 #endif
05428 
05429 #ifndef WARN_OVERFLOW
05430 #  define WARN_OVERFLOW                  15
05431 #endif
05432 
05433 #ifndef WARN_PACK
05434 #  define WARN_PACK                      16
05435 #endif
05436 
05437 #ifndef WARN_PORTABLE
05438 #  define WARN_PORTABLE                  17
05439 #endif
05440 
05441 #ifndef WARN_RECURSION
05442 #  define WARN_RECURSION                 18
05443 #endif
05444 
05445 #ifndef WARN_REDEFINE
05446 #  define WARN_REDEFINE                  19
05447 #endif
05448 
05449 #ifndef WARN_REGEXP
05450 #  define WARN_REGEXP                    20
05451 #endif
05452 
05453 #ifndef WARN_SEVERE
05454 #  define WARN_SEVERE                    21
05455 #endif
05456 
05457 #ifndef WARN_DEBUGGING
05458 #  define WARN_DEBUGGING                 22
05459 #endif
05460 
05461 #ifndef WARN_INPLACE
05462 #  define WARN_INPLACE                   23
05463 #endif
05464 
05465 #ifndef WARN_INTERNAL
05466 #  define WARN_INTERNAL                  24
05467 #endif
05468 
05469 #ifndef WARN_MALLOC
05470 #  define WARN_MALLOC                    25
05471 #endif
05472 
05473 #ifndef WARN_SIGNAL
05474 #  define WARN_SIGNAL                    26
05475 #endif
05476 
05477 #ifndef WARN_SUBSTR
05478 #  define WARN_SUBSTR                    27
05479 #endif
05480 
05481 #ifndef WARN_SYNTAX
05482 #  define WARN_SYNTAX                    28
05483 #endif
05484 
05485 #ifndef WARN_AMBIGUOUS
05486 #  define WARN_AMBIGUOUS                 29
05487 #endif
05488 
05489 #ifndef WARN_BAREWORD
05490 #  define WARN_BAREWORD                  30
05491 #endif
05492 
05493 #ifndef WARN_DIGIT
05494 #  define WARN_DIGIT                     31
05495 #endif
05496 
05497 #ifndef WARN_PARENTHESIS
05498 #  define WARN_PARENTHESIS               32
05499 #endif
05500 
05501 #ifndef WARN_PRECEDENCE
05502 #  define WARN_PRECEDENCE                33
05503 #endif
05504 
05505 #ifndef WARN_PRINTF
05506 #  define WARN_PRINTF                    34
05507 #endif
05508 
05509 #ifndef WARN_PROTOTYPE
05510 #  define WARN_PROTOTYPE                 35
05511 #endif
05512 
05513 #ifndef WARN_QW
05514 #  define WARN_QW                        36
05515 #endif
05516 
05517 #ifndef WARN_RESERVED
05518 #  define WARN_RESERVED                  37
05519 #endif
05520 
05521 #ifndef WARN_SEMICOLON
05522 #  define WARN_SEMICOLON                 38
05523 #endif
05524 
05525 #ifndef WARN_TAINT
05526 #  define WARN_TAINT                     39
05527 #endif
05528 
05529 #ifndef WARN_THREADS
05530 #  define WARN_THREADS                   40
05531 #endif
05532 
05533 #ifndef WARN_UNINITIALIZED
05534 #  define WARN_UNINITIALIZED             41
05535 #endif
05536 
05537 #ifndef WARN_UNPACK
05538 #  define WARN_UNPACK                    42
05539 #endif
05540 
05541 #ifndef WARN_UNTIE
05542 #  define WARN_UNTIE                     43
05543 #endif
05544 
05545 #ifndef WARN_UTF8
05546 #  define WARN_UTF8                      44
05547 #endif
05548 
05549 #ifndef WARN_VOID
05550 #  define WARN_VOID                      45
05551 #endif
05552 
05553 #ifndef WARN_ASSERTIONS
05554 #  define WARN_ASSERTIONS                46
05555 #endif
05556 #ifndef packWARN
05557 #  define packWARN(a)                    (a)
05558 #endif
05559 
05560 #ifndef ckWARN
05561 #  ifdef G_WARN_ON
05562 #    define  ckWARN(a)                  (PL_dowarn & G_WARN_ON)
05563 #  else
05564 #    define  ckWARN(a)                  PL_dowarn
05565 #  endif
05566 #endif
05567 
05568 #if (PERL_BCDVERSION >= 0x5004000) && !defined(warner)
05569 #if defined(NEED_warner)
05570 static void DPPP_(my_warner)(U32 err, const char *pat, ...);
05571 static
05572 #else
05573 extern void DPPP_(my_warner)(U32 err, const char *pat, ...);
05574 #endif
05575 
05576 #define Perl_warner DPPP_(my_warner)
05577 
05578 #if defined(NEED_warner) || defined(NEED_warner_GLOBAL)
05579 
05580 void
05581 DPPP_(my_warner)(U32 err, const char *pat, ...)
05582 {
05583   SV *sv;
05584   va_list args;
05585 
05586   PERL_UNUSED_ARG(err);
05587 
05588   va_start(args, pat);
05589   sv = vnewSVpvf(pat, &args);
05590   va_end(args);
05591   sv_2mortal(sv);
05592   warn("%s", SvPV_nolen(sv));
05593 }
05594 
05595 #define warner  Perl_warner
05596 
05597 #define Perl_warner_nocontext  Perl_warner
05598 
05599 #endif
05600 #endif
05601 
05602 /* concatenating with "" ensures that only literal strings are accepted as argument
05603  * note that STR_WITH_LEN() can't be used as argument to macros or functions that
05604  * under some configurations might be macros
05605  */
05606 #ifndef STR_WITH_LEN
05607 #  define STR_WITH_LEN(s)                (s ""), (sizeof(s)-1)
05608 #endif
05609 #ifndef newSVpvs
05610 #  define newSVpvs(str)                  newSVpvn(str "", sizeof(str) - 1)
05611 #endif
05612 
05613 #ifndef newSVpvs_flags
05614 #  define newSVpvs_flags(str, flags)     newSVpvn_flags(str "", sizeof(str) - 1, flags)
05615 #endif
05616 
05617 #ifndef sv_catpvs
05618 #  define sv_catpvs(sv, str)             sv_catpvn(sv, str "", sizeof(str) - 1)
05619 #endif
05620 
05621 #ifndef sv_setpvs
05622 #  define sv_setpvs(sv, str)             sv_setpvn(sv, str "", sizeof(str) - 1)
05623 #endif
05624 
05625 #ifndef hv_fetchs
05626 #  define hv_fetchs(hv, key, lval)       hv_fetch(hv, key "", sizeof(key) - 1, lval)
05627 #endif
05628 
05629 #ifndef hv_stores
05630 #  define hv_stores(hv, key, val)        hv_store(hv, key "", sizeof(key) - 1, val, 0)
05631 #endif
05632 #ifndef gv_fetchpvn_flags
05633 #  define gv_fetchpvn_flags(name, len, flags, svt) gv_fetchpv(name, flags, svt)
05634 #endif
05635 
05636 #ifndef gv_fetchpvs
05637 #  define gv_fetchpvs(name, flags, svt)  gv_fetchpvn_flags(name "", sizeof(name) - 1, flags, svt)
05638 #endif
05639 
05640 #ifndef gv_stashpvs
05641 #  define gv_stashpvs(name, flags)       gv_stashpvn(name "", sizeof(name) - 1, flags)
05642 #endif
05643 #ifndef SvGETMAGIC
05644 #  define SvGETMAGIC(x)                  STMT_START { if (SvGMAGICAL(x)) mg_get(x); } STMT_END
05645 #endif
05646 #ifndef PERL_MAGIC_sv
05647 #  define PERL_MAGIC_sv                  '\0'
05648 #endif
05649 
05650 #ifndef PERL_MAGIC_overload
05651 #  define PERL_MAGIC_overload            'A'
05652 #endif
05653 
05654 #ifndef PERL_MAGIC_overload_elem
05655 #  define PERL_MAGIC_overload_elem       'a'
05656 #endif
05657 
05658 #ifndef PERL_MAGIC_overload_table
05659 #  define PERL_MAGIC_overload_table      'c'
05660 #endif
05661 
05662 #ifndef PERL_MAGIC_bm
05663 #  define PERL_MAGIC_bm                  'B'
05664 #endif
05665 
05666 #ifndef PERL_MAGIC_regdata
05667 #  define PERL_MAGIC_regdata             'D'
05668 #endif
05669 
05670 #ifndef PERL_MAGIC_regdatum
05671 #  define PERL_MAGIC_regdatum            'd'
05672 #endif
05673 
05674 #ifndef PERL_MAGIC_env
05675 #  define PERL_MAGIC_env                 'E'
05676 #endif
05677 
05678 #ifndef PERL_MAGIC_envelem
05679 #  define PERL_MAGIC_envelem             'e'
05680 #endif
05681 
05682 #ifndef PERL_MAGIC_fm
05683 #  define PERL_MAGIC_fm                  'f'
05684 #endif
05685 
05686 #ifndef PERL_MAGIC_regex_global
05687 #  define PERL_MAGIC_regex_global        'g'
05688 #endif
05689 
05690 #ifndef PERL_MAGIC_isa
05691 #  define PERL_MAGIC_isa                 'I'
05692 #endif
05693 
05694 #ifndef PERL_MAGIC_isaelem
05695 #  define PERL_MAGIC_isaelem             'i'
05696 #endif
05697 
05698 #ifndef PERL_MAGIC_nkeys
05699 #  define PERL_MAGIC_nkeys               'k'
05700 #endif
05701 
05702 #ifndef PERL_MAGIC_dbfile
05703 #  define PERL_MAGIC_dbfile              'L'
05704 #endif
05705 
05706 #ifndef PERL_MAGIC_dbline
05707 #  define PERL_MAGIC_dbline              'l'
05708 #endif
05709 
05710 #ifndef PERL_MAGIC_mutex
05711 #  define PERL_MAGIC_mutex               'm'
05712 #endif
05713 
05714 #ifndef PERL_MAGIC_shared
05715 #  define PERL_MAGIC_shared              'N'
05716 #endif
05717 
05718 #ifndef PERL_MAGIC_shared_scalar
05719 #  define PERL_MAGIC_shared_scalar       'n'
05720 #endif
05721 
05722 #ifndef PERL_MAGIC_collxfrm
05723 #  define PERL_MAGIC_collxfrm            'o'
05724 #endif
05725 
05726 #ifndef PERL_MAGIC_tied
05727 #  define PERL_MAGIC_tied                'P'
05728 #endif
05729 
05730 #ifndef PERL_MAGIC_tiedelem
05731 #  define PERL_MAGIC_tiedelem            'p'
05732 #endif
05733 
05734 #ifndef PERL_MAGIC_tiedscalar
05735 #  define PERL_MAGIC_tiedscalar          'q'
05736 #endif
05737 
05738 #ifndef PERL_MAGIC_qr
05739 #  define PERL_MAGIC_qr                  'r'
05740 #endif
05741 
05742 #ifndef PERL_MAGIC_sig
05743 #  define PERL_MAGIC_sig                 'S'
05744 #endif
05745 
05746 #ifndef PERL_MAGIC_sigelem
05747 #  define PERL_MAGIC_sigelem             's'
05748 #endif
05749 
05750 #ifndef PERL_MAGIC_taint
05751 #  define PERL_MAGIC_taint               't'
05752 #endif
05753 
05754 #ifndef PERL_MAGIC_uvar
05755 #  define PERL_MAGIC_uvar                'U'
05756 #endif
05757 
05758 #ifndef PERL_MAGIC_uvar_elem
05759 #  define PERL_MAGIC_uvar_elem           'u'
05760 #endif
05761 
05762 #ifndef PERL_MAGIC_vstring
05763 #  define PERL_MAGIC_vstring             'V'
05764 #endif
05765 
05766 #ifndef PERL_MAGIC_vec
05767 #  define PERL_MAGIC_vec                 'v'
05768 #endif
05769 
05770 #ifndef PERL_MAGIC_utf8
05771 #  define PERL_MAGIC_utf8                'w'
05772 #endif
05773 
05774 #ifndef PERL_MAGIC_substr
05775 #  define PERL_MAGIC_substr              'x'
05776 #endif
05777 
05778 #ifndef PERL_MAGIC_defelem
05779 #  define PERL_MAGIC_defelem             'y'
05780 #endif
05781 
05782 #ifndef PERL_MAGIC_glob
05783 #  define PERL_MAGIC_glob                '*'
05784 #endif
05785 
05786 #ifndef PERL_MAGIC_arylen
05787 #  define PERL_MAGIC_arylen              '#'
05788 #endif
05789 
05790 #ifndef PERL_MAGIC_pos
05791 #  define PERL_MAGIC_pos                 '.'
05792 #endif
05793 
05794 #ifndef PERL_MAGIC_backref
05795 #  define PERL_MAGIC_backref             '<'
05796 #endif
05797 
05798 #ifndef PERL_MAGIC_ext
05799 #  define PERL_MAGIC_ext                 '~'
05800 #endif
05801 
05802 /* That's the best we can do... */
05803 #ifndef sv_catpvn_nomg
05804 #  define sv_catpvn_nomg                 sv_catpvn
05805 #endif
05806 
05807 #ifndef sv_catsv_nomg
05808 #  define sv_catsv_nomg                  sv_catsv
05809 #endif
05810 
05811 #ifndef sv_setsv_nomg
05812 #  define sv_setsv_nomg                  sv_setsv
05813 #endif
05814 
05815 #ifndef sv_pvn_nomg
05816 #  define sv_pvn_nomg                    sv_pvn
05817 #endif
05818 
05819 #ifndef SvIV_nomg
05820 #  define SvIV_nomg                      SvIV
05821 #endif
05822 
05823 #ifndef SvUV_nomg
05824 #  define SvUV_nomg                      SvUV
05825 #endif
05826 
05827 #ifndef sv_catpv_mg
05828 #  define sv_catpv_mg(sv, ptr)          \
05829    STMT_START {                         \
05830      SV *TeMpSv = sv;                   \
05831      sv_catpv(TeMpSv,ptr);              \
05832      SvSETMAGIC(TeMpSv);                \
05833    } STMT_END
05834 #endif
05835 
05836 #ifndef sv_catpvn_mg
05837 #  define sv_catpvn_mg(sv, ptr, len)    \
05838    STMT_START {                         \
05839      SV *TeMpSv = sv;                   \
05840      sv_catpvn(TeMpSv,ptr,len);         \
05841      SvSETMAGIC(TeMpSv);                \
05842    } STMT_END
05843 #endif
05844 
05845 #ifndef sv_catsv_mg
05846 #  define sv_catsv_mg(dsv, ssv)         \
05847    STMT_START {                         \
05848      SV *TeMpSv = dsv;                  \
05849      sv_catsv(TeMpSv,ssv);              \
05850      SvSETMAGIC(TeMpSv);                \
05851    } STMT_END
05852 #endif
05853 
05854 #ifndef sv_setiv_mg
05855 #  define sv_setiv_mg(sv, i)            \
05856    STMT_START {                         \
05857      SV *TeMpSv = sv;                   \
05858      sv_setiv(TeMpSv,i);                \
05859      SvSETMAGIC(TeMpSv);                \
05860    } STMT_END
05861 #endif
05862 
05863 #ifndef sv_setnv_mg
05864 #  define sv_setnv_mg(sv, num)          \
05865    STMT_START {                         \
05866      SV *TeMpSv = sv;                   \
05867      sv_setnv(TeMpSv,num);              \
05868      SvSETMAGIC(TeMpSv);                \
05869    } STMT_END
05870 #endif
05871 
05872 #ifndef sv_setpv_mg
05873 #  define sv_setpv_mg(sv, ptr)          \
05874    STMT_START {                         \
05875      SV *TeMpSv = sv;                   \
05876      sv_setpv(TeMpSv,ptr);              \
05877      SvSETMAGIC(TeMpSv);                \
05878    } STMT_END
05879 #endif
05880 
05881 #ifndef sv_setpvn_mg
05882 #  define sv_setpvn_mg(sv, ptr, len)    \
05883    STMT_START {                         \
05884      SV *TeMpSv = sv;                   \
05885      sv_setpvn(TeMpSv,ptr,len);         \
05886      SvSETMAGIC(TeMpSv);                \
05887    } STMT_END
05888 #endif
05889 
05890 #ifndef sv_setsv_mg
05891 #  define sv_setsv_mg(dsv, ssv)         \
05892    STMT_START {                         \
05893      SV *TeMpSv = dsv;                  \
05894      sv_setsv(TeMpSv,ssv);              \
05895      SvSETMAGIC(TeMpSv);                \
05896    } STMT_END
05897 #endif
05898 
05899 #ifndef sv_setuv_mg
05900 #  define sv_setuv_mg(sv, i)            \
05901    STMT_START {                         \
05902      SV *TeMpSv = sv;                   \
05903      sv_setuv(TeMpSv,i);                \
05904      SvSETMAGIC(TeMpSv);                \
05905    } STMT_END
05906 #endif
05907 
05908 #ifndef sv_usepvn_mg
05909 #  define sv_usepvn_mg(sv, ptr, len)    \
05910    STMT_START {                         \
05911      SV *TeMpSv = sv;                   \
05912      sv_usepvn(TeMpSv,ptr,len);         \
05913      SvSETMAGIC(TeMpSv);                \
05914    } STMT_END
05915 #endif
05916 #ifndef SvVSTRING_mg
05917 #  define SvVSTRING_mg(sv)               (SvMAGICAL(sv) ? mg_find(sv, PERL_MAGIC_vstring) : NULL)
05918 #endif
05919 
05920 /* Hint: sv_magic_portable
05921  * This is a compatibility function that is only available with
05922  * Devel::PPPort. It is NOT in the perl core.
05923  * Its purpose is to mimic the 5.8.0 behaviour of sv_magic() when
05924  * it is being passed a name pointer with namlen == 0. In that
05925  * case, perl 5.8.0 and later store the pointer, not a copy of it.
05926  * The compatibility can be provided back to perl 5.004. With
05927  * earlier versions, the code will not compile.
05928  */
05929 
05930 #if (PERL_BCDVERSION < 0x5004000)
05931 
05932   /* code that uses sv_magic_portable will not compile */
05933 
05934 #elif (PERL_BCDVERSION < 0x5008000)
05935 
05936 #  define sv_magic_portable(sv, obj, how, name, namlen)     \
05937    STMT_START {                                             \
05938      SV *SvMp_sv = (sv);                                    \
05939      char *SvMp_name = (char *) (name);                     \
05940      I32 SvMp_namlen = (namlen);                            \
05941      if (SvMp_name && SvMp_namlen == 0)                     \
05942      {                                                      \
05943        MAGIC *mg;                                           \
05944        sv_magic(SvMp_sv, obj, how, 0, 0);                   \
05945        mg = SvMAGIC(SvMp_sv);                               \
05946        mg->mg_len = -42; /* XXX: this is the tricky part */ \
05947        mg->mg_ptr = SvMp_name;                              \
05948      }                                                      \
05949      else                                                   \
05950      {                                                      \
05951        sv_magic(SvMp_sv, obj, how, SvMp_name, SvMp_namlen); \
05952      }                                                      \
05953    } STMT_END
05954 
05955 #else
05956 
05957 #  define sv_magic_portable(a, b, c, d, e)  sv_magic(a, b, c, d, e)
05958 
05959 #endif
05960 
05961 #ifdef USE_ITHREADS
05962 #ifndef CopFILE
05963 #  define CopFILE(c)                     ((c)->cop_file)
05964 #endif
05965 
05966 #ifndef CopFILEGV
05967 #  define CopFILEGV(c)                   (CopFILE(c) ? gv_fetchfile(CopFILE(c)) : Nullgv)
05968 #endif
05969 
05970 #ifndef CopFILE_set
05971 #  define CopFILE_set(c,pv)              ((c)->cop_file = savepv(pv))
05972 #endif
05973 
05974 #ifndef CopFILESV
05975 #  define CopFILESV(c)                   (CopFILE(c) ? GvSV(gv_fetchfile(CopFILE(c))) : Nullsv)
05976 #endif
05977 
05978 #ifndef CopFILEAV
05979 #  define CopFILEAV(c)                   (CopFILE(c) ? GvAV(gv_fetchfile(CopFILE(c))) : Nullav)
05980 #endif
05981 
05982 #ifndef CopSTASHPV
05983 #  define CopSTASHPV(c)                  ((c)->cop_stashpv)
05984 #endif
05985 
05986 #ifndef CopSTASHPV_set
05987 #  define CopSTASHPV_set(c,pv)           ((c)->cop_stashpv = ((pv) ? savepv(pv) : Nullch))
05988 #endif
05989 
05990 #ifndef CopSTASH
05991 #  define CopSTASH(c)                    (CopSTASHPV(c) ? gv_stashpv(CopSTASHPV(c),GV_ADD) : Nullhv)
05992 #endif
05993 
05994 #ifndef CopSTASH_set
05995 #  define CopSTASH_set(c,hv)             CopSTASHPV_set(c, (hv) ? HvNAME(hv) : Nullch)
05996 #endif
05997 
05998 #ifndef CopSTASH_eq
05999 #  define CopSTASH_eq(c,hv)              ((hv) && (CopSTASHPV(c) == HvNAME(hv) \
06000                     || (CopSTASHPV(c) && HvNAME(hv) \
06001                     && strEQ(CopSTASHPV(c), HvNAME(hv)))))
06002 #endif
06003 
06004 #else
06005 #ifndef CopFILEGV
06006 #  define CopFILEGV(c)                   ((c)->cop_filegv)
06007 #endif
06008 
06009 #ifndef CopFILEGV_set
06010 #  define CopFILEGV_set(c,gv)            ((c)->cop_filegv = (GV*)SvREFCNT_inc(gv))
06011 #endif
06012 
06013 #ifndef CopFILE_set
06014 #  define CopFILE_set(c,pv)              CopFILEGV_set((c), gv_fetchfile(pv))
06015 #endif
06016 
06017 #ifndef CopFILESV
06018 #  define CopFILESV(c)                   (CopFILEGV(c) ? GvSV(CopFILEGV(c)) : Nullsv)
06019 #endif
06020 
06021 #ifndef CopFILEAV
06022 #  define CopFILEAV(c)                   (CopFILEGV(c) ? GvAV(CopFILEGV(c)) : Nullav)
06023 #endif
06024 
06025 #ifndef CopFILE
06026 #  define CopFILE(c)                     (CopFILESV(c) ? SvPVX(CopFILESV(c)) : Nullch)
06027 #endif
06028 
06029 #ifndef CopSTASH
06030 #  define CopSTASH(c)                    ((c)->cop_stash)
06031 #endif
06032 
06033 #ifndef CopSTASH_set
06034 #  define CopSTASH_set(c,hv)             ((c)->cop_stash = (hv))
06035 #endif
06036 
06037 #ifndef CopSTASHPV
06038 #  define CopSTASHPV(c)                  (CopSTASH(c) ? HvNAME(CopSTASH(c)) : Nullch)
06039 #endif
06040 
06041 #ifndef CopSTASHPV_set
06042 #  define CopSTASHPV_set(c,pv)           CopSTASH_set((c), gv_stashpv(pv,GV_ADD))
06043 #endif
06044 
06045 #ifndef CopSTASH_eq
06046 #  define CopSTASH_eq(c,hv)              (CopSTASH(c) == (hv))
06047 #endif
06048 
06049 #endif /* USE_ITHREADS */
06050 #ifndef IN_PERL_COMPILETIME
06051 #  define IN_PERL_COMPILETIME            (PL_curcop == &PL_compiling)
06052 #endif
06053 
06054 #ifndef IN_LOCALE_RUNTIME
06055 #  define IN_LOCALE_RUNTIME              (PL_curcop->op_private & HINT_LOCALE)
06056 #endif
06057 
06058 #ifndef IN_LOCALE_COMPILETIME
06059 #  define IN_LOCALE_COMPILETIME          (PL_hints & HINT_LOCALE)
06060 #endif
06061 
06062 #ifndef IN_LOCALE
06063 #  define IN_LOCALE                      (IN_PERL_COMPILETIME ? IN_LOCALE_COMPILETIME : IN_LOCALE_RUNTIME)
06064 #endif
06065 #ifndef IS_NUMBER_IN_UV
06066 #  define IS_NUMBER_IN_UV                0x01
06067 #endif
06068 
06069 #ifndef IS_NUMBER_GREATER_THAN_UV_MAX
06070 #  define IS_NUMBER_GREATER_THAN_UV_MAX  0x02
06071 #endif
06072 
06073 #ifndef IS_NUMBER_NOT_INT
06074 #  define IS_NUMBER_NOT_INT              0x04
06075 #endif
06076 
06077 #ifndef IS_NUMBER_NEG
06078 #  define IS_NUMBER_NEG                  0x08
06079 #endif
06080 
06081 #ifndef IS_NUMBER_INFINITY
06082 #  define IS_NUMBER_INFINITY             0x10
06083 #endif
06084 
06085 #ifndef IS_NUMBER_NAN
06086 #  define IS_NUMBER_NAN                  0x20
06087 #endif
06088 #ifndef GROK_NUMERIC_RADIX
06089 #  define GROK_NUMERIC_RADIX(sp, send)   grok_numeric_radix(sp, send)
06090 #endif
06091 #ifndef PERL_SCAN_GREATER_THAN_UV_MAX
06092 #  define PERL_SCAN_GREATER_THAN_UV_MAX  0x02
06093 #endif
06094 
06095 #ifndef PERL_SCAN_SILENT_ILLDIGIT
06096 #  define PERL_SCAN_SILENT_ILLDIGIT      0x04
06097 #endif
06098 
06099 #ifndef PERL_SCAN_ALLOW_UNDERSCORES
06100 #  define PERL_SCAN_ALLOW_UNDERSCORES    0x01
06101 #endif
06102 
06103 #ifndef PERL_SCAN_DISALLOW_PREFIX
06104 #  define PERL_SCAN_DISALLOW_PREFIX      0x02
06105 #endif
06106 
06107 #ifndef grok_numeric_radix
06108 #if defined(NEED_grok_numeric_radix)
06109 static bool DPPP_(my_grok_numeric_radix)(pTHX_ const char ** sp, const char * send);
06110 static
06111 #else
06112 extern bool DPPP_(my_grok_numeric_radix)(pTHX_ const char ** sp, const char * send);
06113 #endif
06114 
06115 #ifdef grok_numeric_radix
06116 #  undef grok_numeric_radix
06117 #endif
06118 #define grok_numeric_radix(a,b) DPPP_(my_grok_numeric_radix)(aTHX_ a,b)
06119 #define Perl_grok_numeric_radix DPPP_(my_grok_numeric_radix)
06120 
06121 #if defined(NEED_grok_numeric_radix) || defined(NEED_grok_numeric_radix_GLOBAL)
06122 bool
06123 DPPP_(my_grok_numeric_radix)(pTHX_ const char **sp, const char *send)
06124 {
06125 #ifdef USE_LOCALE_NUMERIC
06126 #ifdef PL_numeric_radix_sv
06127     if (PL_numeric_radix_sv && IN_LOCALE) {
06128         STRLEN len;
06129         char* radix = SvPV(PL_numeric_radix_sv, len);
06130         if (*sp + len <= send && memEQ(*sp, radix, len)) {
06131             *sp += len;
06132             return TRUE;
06133         }
06134     }
06135 #else
06136     /* older perls don't have PL_numeric_radix_sv so the radix
06137      * must manually be requested from locale.h
06138      */
06139 #include <locale.h>
06140     dTHR;  /* needed for older threaded perls */
06141     struct lconv *lc = localeconv();
06142     char *radix = lc->decimal_point;
06143     if (radix && IN_LOCALE) {
06144         STRLEN len = strlen(radix);
06145         if (*sp + len <= send && memEQ(*sp, radix, len)) {
06146             *sp += len;
06147             return TRUE;
06148         }
06149     }
06150 #endif
06151 #endif /* USE_LOCALE_NUMERIC */
06152     /* always try "." if numeric radix didn't match because
06153      * we may have data from different locales mixed */
06154     if (*sp < send && **sp == '.') {
06155         ++*sp;
06156         return TRUE;
06157     }
06158     return FALSE;
06159 }
06160 #endif
06161 #endif
06162 
06163 #ifndef grok_number
06164 #if defined(NEED_grok_number)
06165 static int DPPP_(my_grok_number)(pTHX_ const char * pv, STRLEN len, UV * valuep);
06166 static
06167 #else
06168 extern int DPPP_(my_grok_number)(pTHX_ const char * pv, STRLEN len, UV * valuep);
06169 #endif
06170 
06171 #ifdef grok_number
06172 #  undef grok_number
06173 #endif
06174 #define grok_number(a,b,c) DPPP_(my_grok_number)(aTHX_ a,b,c)
06175 #define Perl_grok_number DPPP_(my_grok_number)
06176 
06177 #if defined(NEED_grok_number) || defined(NEED_grok_number_GLOBAL)
06178 int
06179 DPPP_(my_grok_number)(pTHX_ const char *pv, STRLEN len, UV *valuep)
06180 {
06181   const char *s = pv;
06182   const char *send = pv + len;
06183   const UV max_div_10 = UV_MAX / 10;
06184   const char max_mod_10 = UV_MAX % 10;
06185   int numtype = 0;
06186   int sawinf = 0;
06187   int sawnan = 0;
06188 
06189   while (s < send && isSPACE(*s))
06190     s++;
06191   if (s == send) {
06192     return 0;
06193   } else if (*s == '-') {
06194     s++;
06195     numtype = IS_NUMBER_NEG;
06196   }
06197   else if (*s == '+')
06198   s++;
06199 
06200   if (s == send)
06201     return 0;
06202 
06203   /* next must be digit or the radix separator or beginning of infinity */
06204   if (isDIGIT(*s)) {
06205     /* UVs are at least 32 bits, so the first 9 decimal digits cannot
06206        overflow.  */
06207     UV value = *s - '0';
06208     /* This construction seems to be more optimiser friendly.
06209        (without it gcc does the isDIGIT test and the *s - '0' separately)
06210        With it gcc on arm is managing 6 instructions (6 cycles) per digit.
06211        In theory the optimiser could deduce how far to unroll the loop
06212        before checking for overflow.  */
06213     if (++s < send) {
06214       int digit = *s - '0';
06215       if (digit >= 0 && digit <= 9) {
06216         value = value * 10 + digit;
06217         if (++s < send) {
06218           digit = *s - '0';
06219           if (digit >= 0 && digit <= 9) {
06220             value = value * 10 + digit;
06221             if (++s < send) {
06222               digit = *s - '0';
06223               if (digit >= 0 && digit <= 9) {
06224                 value = value * 10 + digit;
06225         if (++s < send) {
06226                   digit = *s - '0';
06227                   if (digit >= 0 && digit <= 9) {
06228                     value = value * 10 + digit;
06229                     if (++s < send) {
06230                       digit = *s - '0';
06231                       if (digit >= 0 && digit <= 9) {
06232                         value = value * 10 + digit;
06233                         if (++s < send) {
06234                           digit = *s - '0';
06235                           if (digit >= 0 && digit <= 9) {
06236                             value = value * 10 + digit;
06237                             if (++s < send) {
06238                               digit = *s - '0';
06239                               if (digit >= 0 && digit <= 9) {
06240                                 value = value * 10 + digit;
06241                                 if (++s < send) {
06242                                   digit = *s - '0';
06243                                   if (digit >= 0 && digit <= 9) {
06244                                     value = value * 10 + digit;
06245                                     if (++s < send) {
06246                                       /* Now got 9 digits, so need to check
06247                                          each time for overflow.  */
06248                                       digit = *s - '0';
06249                                       while (digit >= 0 && digit <= 9
06250                                              && (value < max_div_10
06251                                                  || (value == max_div_10
06252                                                      && digit <= max_mod_10))) {
06253                                         value = value * 10 + digit;
06254                                         if (++s < send)
06255                                           digit = *s - '0';
06256                                         else
06257                                           break;
06258                                       }
06259                                       if (digit >= 0 && digit <= 9
06260                                           && (s < send)) {
06261                                         /* value overflowed.
06262                                            skip the remaining digits, don't
06263                                            worry about setting *valuep.  */
06264                                         do {
06265                                           s++;
06266                                         } while (s < send && isDIGIT(*s));
06267                                         numtype |=
06268                                           IS_NUMBER_GREATER_THAN_UV_MAX;
06269                                         goto skip_value;
06270                                       }
06271                                     }
06272                                   }
06273                 }
06274                               }
06275                             }
06276                           }
06277                         }
06278                       }
06279                     }
06280                   }
06281                 }
06282               }
06283             }
06284           }
06285     }
06286       }
06287     }
06288     numtype |= IS_NUMBER_IN_UV;
06289     if (valuep)
06290       *valuep = value;
06291 
06292   skip_value:
06293     if (GROK_NUMERIC_RADIX(&s, send)) {
06294       numtype |= IS_NUMBER_NOT_INT;
06295       while (s < send && isDIGIT(*s))  /* optional digits after the radix */
06296         s++;
06297     }
06298   }
06299   else if (GROK_NUMERIC_RADIX(&s, send)) {
06300     numtype |= IS_NUMBER_NOT_INT | IS_NUMBER_IN_UV; /* valuep assigned below */
06301     /* no digits before the radix means we need digits after it */
06302     if (s < send && isDIGIT(*s)) {
06303       do {
06304         s++;
06305       } while (s < send && isDIGIT(*s));
06306       if (valuep) {
06307         /* integer approximation is valid - it's 0.  */
06308         *valuep = 0;
06309       }
06310     }
06311     else
06312       return 0;
06313   } else if (*s == 'I' || *s == 'i') {
06314     s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
06315     s++; if (s == send || (*s != 'F' && *s != 'f')) return 0;
06316     s++; if (s < send && (*s == 'I' || *s == 'i')) {
06317       s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
06318       s++; if (s == send || (*s != 'I' && *s != 'i')) return 0;
06319       s++; if (s == send || (*s != 'T' && *s != 't')) return 0;
06320       s++; if (s == send || (*s != 'Y' && *s != 'y')) return 0;
06321       s++;
06322     }
06323     sawinf = 1;
06324   } else if (*s == 'N' || *s == 'n') {
06325     /* XXX TODO: There are signaling NaNs and quiet NaNs. */
06326     s++; if (s == send || (*s != 'A' && *s != 'a')) return 0;
06327     s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
06328     s++;
06329     sawnan = 1;
06330   } else
06331     return 0;
06332 
06333   if (sawinf) {
06334     numtype &= IS_NUMBER_NEG; /* Keep track of sign  */
06335     numtype |= IS_NUMBER_INFINITY | IS_NUMBER_NOT_INT;
06336   } else if (sawnan) {
06337     numtype &= IS_NUMBER_NEG; /* Keep track of sign  */
06338     numtype |= IS_NUMBER_NAN | IS_NUMBER_NOT_INT;
06339   } else if (s < send) {
06340     /* we can have an optional exponent part */
06341     if (*s == 'e' || *s == 'E') {
06342       /* The only flag we keep is sign.  Blow away any "it's UV"  */
06343       numtype &= IS_NUMBER_NEG;
06344       numtype |= IS_NUMBER_NOT_INT;
06345       s++;
06346       if (s < send && (*s == '-' || *s == '+'))
06347         s++;
06348       if (s < send && isDIGIT(*s)) {
06349         do {
06350           s++;
06351         } while (s < send && isDIGIT(*s));
06352       }
06353       else
06354       return 0;
06355     }
06356   }
06357   while (s < send && isSPACE(*s))
06358     s++;
06359   if (s >= send)
06360     return numtype;
06361   if (len == 10 && memEQ(pv, "0 but true", 10)) {
06362     if (valuep)
06363       *valuep = 0;
06364     return IS_NUMBER_IN_UV;
06365   }
06366   return 0;
06367 }
06368 #endif
06369 #endif
06370 
06371 /*
06372  * The grok_* routines have been modified to use warn() instead of
06373  * Perl_warner(). Also, 'hexdigit' was the former name of PL_hexdigit,
06374  * which is why the stack variable has been renamed to 'xdigit'.
06375  */
06376 
06377 #ifndef grok_bin
06378 #if defined(NEED_grok_bin)
06379 static UV DPPP_(my_grok_bin)(pTHX_ const char * start, STRLEN * len_p, I32 * flags, NV * result);
06380 static
06381 #else
06382 extern UV DPPP_(my_grok_bin)(pTHX_ const char * start, STRLEN * len_p, I32 * flags, NV * result);
06383 #endif
06384 
06385 #ifdef grok_bin
06386 #  undef grok_bin
06387 #endif
06388 #define grok_bin(a,b,c,d) DPPP_(my_grok_bin)(aTHX_ a,b,c,d)
06389 #define Perl_grok_bin DPPP_(my_grok_bin)
06390 
06391 #if defined(NEED_grok_bin) || defined(NEED_grok_bin_GLOBAL)
06392 UV
06393 DPPP_(my_grok_bin)(pTHX_ const char *start, STRLEN *len_p, I32 *flags, NV *result)
06394 {
06395     const char *s = start;
06396     STRLEN len = *len_p;
06397     UV value = 0;
06398     NV value_nv = 0;
06399 
06400     const UV max_div_2 = UV_MAX / 2;
06401     bool allow_underscores = *flags & PERL_SCAN_ALLOW_UNDERSCORES;
06402     bool overflowed = FALSE;
06403 
06404     if (!(*flags & PERL_SCAN_DISALLOW_PREFIX)) {
06405         /* strip off leading b or 0b.
06406            for compatibility silently suffer "b" and "0b" as valid binary
06407            numbers. */
06408         if (len >= 1) {
06409             if (s[0] == 'b') {
06410                 s++;
06411                 len--;
06412             }
06413             else if (len >= 2 && s[0] == '0' && s[1] == 'b') {
06414                 s+=2;
06415                 len-=2;
06416             }
06417         }
06418     }
06419 
06420     for (; len-- && *s; s++) {
06421         char bit = *s;
06422         if (bit == '0' || bit == '1') {
06423             /* Write it in this wonky order with a goto to attempt to get the
06424                compiler to make the common case integer-only loop pretty tight.
06425                With gcc seems to be much straighter code than old scan_bin.  */
06426           redo:
06427             if (!overflowed) {
06428                 if (value <= max_div_2) {
06429                     value = (value << 1) | (bit - '0');
06430                     continue;
06431                 }
06432                 /* Bah. We're just overflowed.  */
06433                 warn("Integer overflow in binary number");
06434                 overflowed = TRUE;
06435                 value_nv = (NV) value;
06436             }
06437             value_nv *= 2.0;
06438         /* If an NV has not enough bits in its mantissa to
06439          * represent a UV this summing of small low-order numbers
06440          * is a waste of time (because the NV cannot preserve
06441          * the low-order bits anyway): we could just remember when
06442          * did we overflow and in the end just multiply value_nv by the
06443          * right amount. */
06444             value_nv += (NV)(bit - '0');
06445             continue;
06446         }
06447         if (bit == '_' && len && allow_underscores && (bit = s[1])
06448             && (bit == '0' || bit == '1'))
06449         {
06450         --len;
06451         ++s;
06452                 goto redo;
06453         }
06454         if (!(*flags & PERL_SCAN_SILENT_ILLDIGIT))
06455             warn("Illegal binary digit '%c' ignored", *s);
06456         break;
06457     }
06458 
06459     if (   ( overflowed && value_nv > 4294967295.0)
06460 #if UVSIZE > 4
06461     || (!overflowed && value > 0xffffffff  )
06462 #endif
06463     ) {
06464     warn("Binary number > 0b11111111111111111111111111111111 non-portable");
06465     }
06466     *len_p = s - start;
06467     if (!overflowed) {
06468         *flags = 0;
06469         return value;
06470     }
06471     *flags = PERL_SCAN_GREATER_THAN_UV_MAX;
06472     if (result)
06473         *result = value_nv;
06474     return UV_MAX;
06475 }
06476 #endif
06477 #endif
06478 
06479 #ifndef grok_hex
06480 #if defined(NEED_grok_hex)
06481 static UV DPPP_(my_grok_hex)(pTHX_ const char * start, STRLEN * len_p, I32 * flags, NV * result);
06482 static
06483 #else
06484 extern UV DPPP_(my_grok_hex)(pTHX_ const char * start, STRLEN * len_p, I32 * flags, NV * result);
06485 #endif
06486 
06487 #ifdef grok_hex
06488 #  undef grok_hex
06489 #endif
06490 #define grok_hex(a,b,c,d) DPPP_(my_grok_hex)(aTHX_ a,b,c,d)
06491 #define Perl_grok_hex DPPP_(my_grok_hex)
06492 
06493 #if defined(NEED_grok_hex) || defined(NEED_grok_hex_GLOBAL)
06494 UV
06495 DPPP_(my_grok_hex)(pTHX_ const char *start, STRLEN *len_p, I32 *flags, NV *result)
06496 {
06497     const char *s = start;
06498     STRLEN len = *len_p;
06499     UV value = 0;
06500     NV value_nv = 0;
06501 
06502     const UV max_div_16 = UV_MAX / 16;
06503     bool allow_underscores = *flags & PERL_SCAN_ALLOW_UNDERSCORES;
06504     bool overflowed = FALSE;
06505     const char *xdigit;
06506 
06507     if (!(*flags & PERL_SCAN_DISALLOW_PREFIX)) {
06508         /* strip off leading x or 0x.
06509            for compatibility silently suffer "x" and "0x" as valid hex numbers.
06510         */
06511         if (len >= 1) {
06512             if (s[0] == 'x') {
06513                 s++;
06514                 len--;
06515             }
06516             else if (len >= 2 && s[0] == '0' && s[1] == 'x') {
06517                 s+=2;
06518                 len-=2;
06519             }
06520         }
06521     }
06522 
06523     for (; len-- && *s; s++) {
06524     xdigit = strchr((char *) PL_hexdigit, *s);
06525         if (xdigit) {
06526             /* Write it in this wonky order with a goto to attempt to get the
06527                compiler to make the common case integer-only loop pretty tight.
06528                With gcc seems to be much straighter code than old scan_hex.  */
06529           redo:
06530             if (!overflowed) {
06531                 if (value <= max_div_16) {
06532                     value = (value << 4) | ((xdigit - PL_hexdigit) & 15);
06533                     continue;
06534                 }
06535                 warn("Integer overflow in hexadecimal number");
06536                 overflowed = TRUE;
06537                 value_nv = (NV) value;
06538             }
06539             value_nv *= 16.0;
06540         /* If an NV has not enough bits in its mantissa to
06541          * represent a UV this summing of small low-order numbers
06542          * is a waste of time (because the NV cannot preserve
06543          * the low-order bits anyway): we could just remember when
06544          * did we overflow and in the end just multiply value_nv by the
06545          * right amount of 16-tuples. */
06546             value_nv += (NV)((xdigit - PL_hexdigit) & 15);
06547             continue;
06548         }
06549         if (*s == '_' && len && allow_underscores && s[1]
06550         && (xdigit = strchr((char *) PL_hexdigit, s[1])))
06551         {
06552         --len;
06553         ++s;
06554                 goto redo;
06555         }
06556         if (!(*flags & PERL_SCAN_SILENT_ILLDIGIT))
06557             warn("Illegal hexadecimal digit '%c' ignored", *s);
06558         break;
06559     }
06560 
06561     if (   ( overflowed && value_nv > 4294967295.0)
06562 #if UVSIZE > 4
06563     || (!overflowed && value > 0xffffffff  )
06564 #endif
06565     ) {
06566     warn("Hexadecimal number > 0xffffffff non-portable");
06567     }
06568     *len_p = s - start;
06569     if (!overflowed) {
06570         *flags = 0;
06571         return value;
06572     }
06573     *flags = PERL_SCAN_GREATER_THAN_UV_MAX;
06574     if (result)
06575         *result = value_nv;
06576     return UV_MAX;
06577 }
06578 #endif
06579 #endif
06580 
06581 #ifndef grok_oct
06582 #if defined(NEED_grok_oct)
06583 static UV DPPP_(my_grok_oct)(pTHX_ const char * start, STRLEN * len_p, I32 * flags, NV * result);
06584 static
06585 #else
06586 extern UV DPPP_(my_grok_oct)(pTHX_ const char * start, STRLEN * len_p, I32 * flags, NV * result);
06587 #endif
06588 
06589 #ifdef grok_oct
06590 #  undef grok_oct
06591 #endif
06592 #define grok_oct(a,b,c,d) DPPP_(my_grok_oct)(aTHX_ a,b,c,d)
06593 #define Perl_grok_oct DPPP_(my_grok_oct)
06594 
06595 #if defined(NEED_grok_oct) || defined(NEED_grok_oct_GLOBAL)
06596 UV
06597 DPPP_(my_grok_oct)(pTHX_ const char *start, STRLEN *len_p, I32 *flags, NV *result)
06598 {
06599     const char *s = start;
06600     STRLEN len = *len_p;
06601     UV value = 0;
06602     NV value_nv = 0;
06603 
06604     const UV max_div_8 = UV_MAX / 8;
06605     bool allow_underscores = *flags & PERL_SCAN_ALLOW_UNDERSCORES;
06606     bool overflowed = FALSE;
06607 
06608     for (; len-- && *s; s++) {
06609          /* gcc 2.95 optimiser not smart enough to figure that this subtraction
06610             out front allows slicker code.  */
06611         int digit = *s - '0';
06612         if (digit >= 0 && digit <= 7) {
06613             /* Write it in this wonky order with a goto to attempt to get the
06614                compiler to make the common case integer-only loop pretty tight.
06615             */
06616           redo:
06617             if (!overflowed) {
06618                 if (value <= max_div_8) {
06619                     value = (value << 3) | digit;
06620                     continue;
06621                 }
06622                 /* Bah. We're just overflowed.  */
06623                 warn("Integer overflow in octal number");
06624                 overflowed = TRUE;
06625                 value_nv = (NV) value;
06626             }
06627             value_nv *= 8.0;
06628         /* If an NV has not enough bits in its mantissa to
06629          * represent a UV this summing of small low-order numbers
06630          * is a waste of time (because the NV cannot preserve
06631          * the low-order bits anyway): we could just remember when
06632          * did we overflow and in the end just multiply value_nv by the
06633          * right amount of 8-tuples. */
06634             value_nv += (NV)digit;
06635             continue;
06636         }
06637         if (digit == ('_' - '0') && len && allow_underscores
06638             && (digit = s[1] - '0') && (digit >= 0 && digit <= 7))
06639         {
06640         --len;
06641         ++s;
06642                 goto redo;
06643         }
06644         /* Allow \octal to work the DWIM way (that is, stop scanning
06645          * as soon as non-octal characters are seen, complain only iff
06646          * someone seems to want to use the digits eight and nine). */
06647         if (digit == 8 || digit == 9) {
06648             if (!(*flags & PERL_SCAN_SILENT_ILLDIGIT))
06649                 warn("Illegal octal digit '%c' ignored", *s);
06650         }
06651         break;
06652     }
06653 
06654     if (   ( overflowed && value_nv > 4294967295.0)
06655 #if UVSIZE > 4
06656     || (!overflowed && value > 0xffffffff  )
06657 #endif
06658     ) {
06659     warn("Octal number > 037777777777 non-portable");
06660     }
06661     *len_p = s - start;
06662     if (!overflowed) {
06663         *flags = 0;
06664         return value;
06665     }
06666     *flags = PERL_SCAN_GREATER_THAN_UV_MAX;
06667     if (result)
06668         *result = value_nv;
06669     return UV_MAX;
06670 }
06671 #endif
06672 #endif
06673 
06674 #if !defined(my_snprintf)
06675 #if defined(NEED_my_snprintf)
06676 static int DPPP_(my_my_snprintf)(char * buffer, const Size_t len, const char * format, ...);
06677 static
06678 #else
06679 extern int DPPP_(my_my_snprintf)(char * buffer, const Size_t len, const char * format, ...);
06680 #endif
06681 
06682 #define my_snprintf DPPP_(my_my_snprintf)
06683 #define Perl_my_snprintf DPPP_(my_my_snprintf)
06684 
06685 #if defined(NEED_my_snprintf) || defined(NEED_my_snprintf_GLOBAL)
06686 
06687 int
06688 DPPP_(my_my_snprintf)(char *buffer, const Size_t len, const char *format, ...)
06689 {
06690     dTHX;
06691     int retval;
06692     va_list ap;
06693     va_start(ap, format);
06694 #ifdef HAS_VSNPRINTF
06695     retval = vsnprintf(buffer, len, format, ap);
06696 #else
06697     retval = vsprintf(buffer, format, ap);
06698 #endif
06699     va_end(ap);
06700     if (retval < 0 || (len > 0 && (Size_t)retval >= len))
06701     Perl_croak(aTHX_ "panic: my_snprintf buffer overflow");
06702     return retval;
06703 }
06704 
06705 #endif
06706 #endif
06707 
06708 #if !defined(my_sprintf)
06709 #if defined(NEED_my_sprintf)
06710 static int DPPP_(my_my_sprintf)(char * buffer, const char * pat, ...);
06711 static
06712 #else
06713 extern int DPPP_(my_my_sprintf)(char * buffer, const char * pat, ...);
06714 #endif
06715 
06716 #define my_sprintf DPPP_(my_my_sprintf)
06717 #define Perl_my_sprintf DPPP_(my_my_sprintf)
06718 
06719 #if defined(NEED_my_sprintf) || defined(NEED_my_sprintf_GLOBAL)
06720 
06721 int
06722 DPPP_(my_my_sprintf)(char *buffer, const char* pat, ...)
06723 {
06724     va_list args;
06725     va_start(args, pat);
06726     vsprintf(buffer, pat, args);
06727     va_end(args);
06728     return strlen(buffer);
06729 }
06730 
06731 #endif
06732 #endif
06733 
06734 #ifdef NO_XSLOCKS
06735 #  ifdef dJMPENV
06736 #    define dXCPT             dJMPENV; int rEtV = 0
06737 #    define XCPT_TRY_START    JMPENV_PUSH(rEtV); if (rEtV == 0)
06738 #    define XCPT_TRY_END      JMPENV_POP;
06739 #    define XCPT_CATCH        if (rEtV != 0)
06740 #    define XCPT_RETHROW      JMPENV_JUMP(rEtV)
06741 #  else
06742 #    define dXCPT             Sigjmp_buf oldTOP; int rEtV = 0
06743 #    define XCPT_TRY_START    Copy(top_env, oldTOP, 1, Sigjmp_buf); rEtV = Sigsetjmp(top_env, 1); if (rEtV == 0)
06744 #    define XCPT_TRY_END      Copy(oldTOP, top_env, 1, Sigjmp_buf);
06745 #    define XCPT_CATCH        if (rEtV != 0)
06746 #    define XCPT_RETHROW      Siglongjmp(top_env, rEtV)
06747 #  endif
06748 #endif
06749 
06750 #if !defined(my_strlcat)
06751 #if defined(NEED_my_strlcat)
06752 static Size_t DPPP_(my_my_strlcat)(char * dst, const char * src, Size_t size);
06753 static
06754 #else
06755 extern Size_t DPPP_(my_my_strlcat)(char * dst, const char * src, Size_t size);
06756 #endif
06757 
06758 #define my_strlcat DPPP_(my_my_strlcat)
06759 #define Perl_my_strlcat DPPP_(my_my_strlcat)
06760 
06761 #if defined(NEED_my_strlcat) || defined(NEED_my_strlcat_GLOBAL)
06762 
06763 Size_t
06764 DPPP_(my_my_strlcat)(char *dst, const char *src, Size_t size)
06765 {
06766     Size_t used, length, copy;
06767 
06768     used = strlen(dst);
06769     length = strlen(src);
06770     if (size > 0 && used < size - 1) {
06771         copy = (length >= size - used) ? size - used - 1 : length;
06772         memcpy(dst + used, src, copy);
06773         dst[used + copy] = '\0';
06774     }
06775     return used + length;
06776 }
06777 #endif
06778 #endif
06779 
06780 #if !defined(my_strlcpy)
06781 #if defined(NEED_my_strlcpy)
06782 static Size_t DPPP_(my_my_strlcpy)(char * dst, const char * src, Size_t size);
06783 static
06784 #else
06785 extern Size_t DPPP_(my_my_strlcpy)(char * dst, const char * src, Size_t size);
06786 #endif
06787 
06788 #define my_strlcpy DPPP_(my_my_strlcpy)
06789 #define Perl_my_strlcpy DPPP_(my_my_strlcpy)
06790 
06791 #if defined(NEED_my_strlcpy) || defined(NEED_my_strlcpy_GLOBAL)
06792 
06793 Size_t
06794 DPPP_(my_my_strlcpy)(char *dst, const char *src, Size_t size)
06795 {
06796     Size_t length, copy;
06797 
06798     length = strlen(src);
06799     if (size > 0) {
06800         copy = (length >= size) ? size - 1 : length;
06801         memcpy(dst, src, copy);
06802         dst[copy] = '\0';
06803     }
06804     return length;
06805 }
06806 
06807 #endif
06808 #endif
06809 #ifndef PERL_PV_ESCAPE_QUOTE
06810 #  define PERL_PV_ESCAPE_QUOTE           0x0001
06811 #endif
06812 
06813 #ifndef PERL_PV_PRETTY_QUOTE
06814 #  define PERL_PV_PRETTY_QUOTE           PERL_PV_ESCAPE_QUOTE
06815 #endif
06816 
06817 #ifndef PERL_PV_PRETTY_ELLIPSES
06818 #  define PERL_PV_PRETTY_ELLIPSES        0x0002
06819 #endif
06820 
06821 #ifndef PERL_PV_PRETTY_LTGT
06822 #  define PERL_PV_PRETTY_LTGT            0x0004
06823 #endif
06824 
06825 #ifndef PERL_PV_ESCAPE_FIRSTCHAR
06826 #  define PERL_PV_ESCAPE_FIRSTCHAR       0x0008
06827 #endif
06828 
06829 #ifndef PERL_PV_ESCAPE_UNI
06830 #  define PERL_PV_ESCAPE_UNI             0x0100
06831 #endif
06832 
06833 #ifndef PERL_PV_ESCAPE_UNI_DETECT
06834 #  define PERL_PV_ESCAPE_UNI_DETECT      0x0200
06835 #endif
06836 
06837 #ifndef PERL_PV_ESCAPE_ALL
06838 #  define PERL_PV_ESCAPE_ALL             0x1000
06839 #endif
06840 
06841 #ifndef PERL_PV_ESCAPE_NOBACKSLASH
06842 #  define PERL_PV_ESCAPE_NOBACKSLASH     0x2000
06843 #endif
06844 
06845 #ifndef PERL_PV_ESCAPE_NOCLEAR
06846 #  define PERL_PV_ESCAPE_NOCLEAR         0x4000
06847 #endif
06848 
06849 #ifndef PERL_PV_ESCAPE_RE
06850 #  define PERL_PV_ESCAPE_RE              0x8000
06851 #endif
06852 
06853 #ifndef PERL_PV_PRETTY_NOCLEAR
06854 #  define PERL_PV_PRETTY_NOCLEAR         PERL_PV_ESCAPE_NOCLEAR
06855 #endif
06856 #ifndef PERL_PV_PRETTY_DUMP
06857 #  define PERL_PV_PRETTY_DUMP            PERL_PV_PRETTY_ELLIPSES|PERL_PV_PRETTY_QUOTE
06858 #endif
06859 
06860 #ifndef PERL_PV_PRETTY_REGPROP
06861 #  define PERL_PV_PRETTY_REGPROP         PERL_PV_PRETTY_ELLIPSES|PERL_PV_PRETTY_LTGT|PERL_PV_ESCAPE_RE
06862 #endif
06863 
06864 /* Hint: pv_escape
06865  * Note that unicode functionality is only backported to
06866  * those perl versions that support it. For older perl
06867  * versions, the implementation will fall back to bytes.
06868  */
06869 
06870 #ifndef pv_escape
06871 #if defined(NEED_pv_escape)
06872 static char * DPPP_(my_pv_escape)(pTHX_ SV * dsv, char const * const str, const STRLEN count, const STRLEN max, STRLEN * const escaped, const U32 flags);
06873 static
06874 #else
06875 extern char * DPPP_(my_pv_escape)(pTHX_ SV * dsv, char const * const str, const STRLEN count, const STRLEN max, STRLEN * const escaped, const U32 flags);
06876 #endif
06877 
06878 #ifdef pv_escape
06879 #  undef pv_escape
06880 #endif
06881 #define pv_escape(a,b,c,d,e,f) DPPP_(my_pv_escape)(aTHX_ a,b,c,d,e,f)
06882 #define Perl_pv_escape DPPP_(my_pv_escape)
06883 
06884 #if defined(NEED_pv_escape) || defined(NEED_pv_escape_GLOBAL)
06885 
06886 char *
06887 DPPP_(my_pv_escape)(pTHX_ SV *dsv, char const * const str,
06888   const STRLEN count, const STRLEN max,
06889   STRLEN * const escaped, const U32 flags)
06890 {
06891     const char esc = flags & PERL_PV_ESCAPE_RE ? '%' : '\\';
06892     const char dq = flags & PERL_PV_ESCAPE_QUOTE ? '"' : esc;
06893     char octbuf[32] = "%123456789ABCDF";
06894     STRLEN wrote = 0;
06895     STRLEN chsize = 0;
06896     STRLEN readsize = 1;
06897 #if defined(is_utf8_string) && defined(utf8_to_uvchr)
06898     bool isuni = flags & PERL_PV_ESCAPE_UNI ? 1 : 0;
06899 #endif
06900     const char *pv  = str;
06901     const char * const end = pv + count;
06902     octbuf[0] = esc;
06903 
06904     if (!(flags & PERL_PV_ESCAPE_NOCLEAR))
06905     sv_setpvs(dsv, "");
06906 
06907 #if defined(is_utf8_string) && defined(utf8_to_uvchr)
06908     if ((flags & PERL_PV_ESCAPE_UNI_DETECT) && is_utf8_string((U8*)pv, count))
06909         isuni = 1;
06910 #endif
06911 
06912     for (; pv < end && (!max || wrote < max) ; pv += readsize) {
06913         const UV u =
06914 #if defined(is_utf8_string) && defined(utf8_to_uvchr)
06915              isuni ? utf8_to_uvchr((U8*)pv, &readsize) :
06916 #endif
06917                  (U8)*pv;
06918         const U8 c = (U8)u & 0xFF;
06919 
06920         if (u > 255 || (flags & PERL_PV_ESCAPE_ALL)) {
06921             if (flags & PERL_PV_ESCAPE_FIRSTCHAR)
06922                 chsize = my_snprintf(octbuf, sizeof octbuf,
06923                                       "%"UVxf, u);
06924             else
06925                 chsize = my_snprintf(octbuf, sizeof octbuf,
06926                                       "%cx{%"UVxf"}", esc, u);
06927         } else if (flags & PERL_PV_ESCAPE_NOBACKSLASH) {
06928             chsize = 1;
06929         } else {
06930             if (c == dq || c == esc || !isPRINT(c)) {
06931             chsize = 2;
06932                 switch (c) {
06933         case '\\' : /* fallthrough */
06934         case '%'  : if (c == esc)
06935                         octbuf[1] = esc;
06936                     else
06937                         chsize = 1;
06938                     break;
06939         case '\v' : octbuf[1] = 'v'; break;
06940         case '\t' : octbuf[1] = 't'; break;
06941         case '\r' : octbuf[1] = 'r'; break;
06942         case '\n' : octbuf[1] = 'n'; break;
06943         case '\f' : octbuf[1] = 'f'; break;
06944                 case '"'  : if (dq == '"')
06945                 octbuf[1] = '"';
06946                 else
06947                 chsize = 1;
06948                 break;
06949         default:    chsize = my_snprintf(octbuf, sizeof octbuf,
06950                 pv < end && isDIGIT((U8)*(pv+readsize))
06951                 ? "%c%03o" : "%c%o", esc, c);
06952                 }
06953             } else {
06954                 chsize = 1;
06955             }
06956     }
06957     if (max && wrote + chsize > max) {
06958         break;
06959         } else if (chsize > 1) {
06960             sv_catpvn(dsv, octbuf, chsize);
06961             wrote += chsize;
06962     } else {
06963         char tmp[2];
06964         my_snprintf(tmp, sizeof tmp, "%c", c);
06965             sv_catpvn(dsv, tmp, 1);
06966         wrote++;
06967     }
06968         if (flags & PERL_PV_ESCAPE_FIRSTCHAR)
06969             break;
06970     }
06971     if (escaped != NULL)
06972         *escaped= pv - str;
06973     return SvPVX(dsv);
06974 }
06975 
06976 #endif
06977 #endif
06978 
06979 #ifndef pv_pretty
06980 #if defined(NEED_pv_pretty)
06981 static 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);
06982 static
06983 #else
06984 extern 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);
06985 #endif
06986 
06987 #ifdef pv_pretty
06988 #  undef pv_pretty
06989 #endif
06990 #define pv_pretty(a,b,c,d,e,f,g) DPPP_(my_pv_pretty)(aTHX_ a,b,c,d,e,f,g)
06991 #define Perl_pv_pretty DPPP_(my_pv_pretty)
06992 
06993 #if defined(NEED_pv_pretty) || defined(NEED_pv_pretty_GLOBAL)
06994 
06995 char *
06996 DPPP_(my_pv_pretty)(pTHX_ SV *dsv, char const * const str, const STRLEN count,
06997   const STRLEN max, char const * const start_color, char const * const end_color,
06998   const U32 flags)
06999 {
07000     const U8 dq = (flags & PERL_PV_PRETTY_QUOTE) ? '"' : '%';
07001     STRLEN escaped;
07002 
07003     if (!(flags & PERL_PV_PRETTY_NOCLEAR))
07004     sv_setpvs(dsv, "");
07005 
07006     if (dq == '"')
07007         sv_catpvs(dsv, "\"");
07008     else if (flags & PERL_PV_PRETTY_LTGT)
07009         sv_catpvs(dsv, "<");
07010 
07011     if (start_color != NULL)
07012         sv_catpv(dsv, D_PPP_CONSTPV_ARG(start_color));
07013 
07014     pv_escape(dsv, str, count, max, &escaped, flags | PERL_PV_ESCAPE_NOCLEAR);
07015 
07016     if (end_color != NULL)
07017         sv_catpv(dsv, D_PPP_CONSTPV_ARG(end_color));
07018 
07019     if (dq == '"')
07020     sv_catpvs(dsv, "\"");
07021     else if (flags & PERL_PV_PRETTY_LTGT)
07022         sv_catpvs(dsv, ">");
07023 
07024     if ((flags & PERL_PV_PRETTY_ELLIPSES) && escaped < count)
07025     sv_catpvs(dsv, "...");
07026 
07027     return SvPVX(dsv);
07028 }
07029 
07030 #endif
07031 #endif
07032 
07033 #ifndef pv_display
07034 #if defined(NEED_pv_display)
07035 static char * DPPP_(my_pv_display)(pTHX_ SV * dsv, const char * pv, STRLEN cur, STRLEN len, STRLEN pvlim);
07036 static
07037 #else
07038 extern char * DPPP_(my_pv_display)(pTHX_ SV * dsv, const char * pv, STRLEN cur, STRLEN len, STRLEN pvlim);
07039 #endif
07040 
07041 #ifdef pv_display
07042 #  undef pv_display
07043 #endif
07044 #define pv_display(a,b,c,d,e) DPPP_(my_pv_display)(aTHX_ a,b,c,d,e)
07045 #define Perl_pv_display DPPP_(my_pv_display)
07046 
07047 #if defined(NEED_pv_display) || defined(NEED_pv_display_GLOBAL)
07048 
07049 char *
07050 DPPP_(my_pv_display)(pTHX_ SV *dsv, const char *pv, STRLEN cur, STRLEN len, STRLEN pvlim)
07051 {
07052     pv_pretty(dsv, pv, cur, pvlim, NULL, NULL, PERL_PV_PRETTY_DUMP);
07053     if (len > cur && pv[cur] == '\0')
07054     sv_catpvs(dsv, "\\0");
07055     return SvPVX(dsv);
07056 }
07057 
07058 #endif
07059 #endif
07060 
07061 #endif /* _P_P_PORTABILITY_H_ */
07062 
07063 /* End of File ppport.h */