Back to index

nagios-plugins  1.4.16
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.08
00008 
00009     Automatically created by Devel::PPPort running under
00010     perl 5.008007 on Thu Jun  8 10:04:25 2006.
00011 
00012     Do NOT edit this file directly! -- Edit PPPort_pm.PL and the
00013     includes in parts/inc/ instead.
00014 
00015     Use 'perldoc ppport.h' to view the documentation below.
00016 
00017 ----------------------------------------------------------------------
00018 
00019 SKIP
00020 
00021 =pod
00022 
00023 =head1 NAME
00024 
00025 ppport.h - Perl/Pollution/Portability version 3.08
00026 
00027 =head1 SYNOPSIS
00028 
00029   perl ppport.h [options] [source files]
00030 
00031   Searches current directory for files if no [source files] are given
00032 
00033   --help                      show short help
00034 
00035   --patch=file                write one patch file with changes
00036   --copy=suffix               write changed copies with suffix
00037   --diff=program              use diff program and options
00038 
00039   --compat-version=version    provide compatibility with Perl version
00040   --cplusplus                 accept C++ comments
00041 
00042   --quiet                     don't output anything except fatal errors
00043   --nodiag                    don't show diagnostics
00044   --nohints                   don't show hints
00045   --nochanges                 don't suggest changes
00046   --nofilter                  don't filter input files
00047 
00048   --strip                     strip all script and doc functionality from
00049                               ppport.h (this, obviously, cannot be undone)
00050 
00051   --list-provided             list provided API
00052   --list-unsupported          list unsupported API
00053   --api-info=name             show Perl API portability information
00054 
00055 =head1 COMPATIBILITY
00056 
00057 This version of F<ppport.h> is designed to support operation with Perl
00058 installations back to 5.003, and has been tested up to 5.9.3.
00059 
00060 =head1 OPTIONS
00061 
00062 =head2 --help
00063 
00064 Display a brief usage summary.
00065 
00066 =head2 --patch=I<file>
00067 
00068 If this option is given, a single patch file will be created if
00069 any changes are suggested. This requires a working diff program
00070 to be installed on your system.
00071 
00072 =head2 --copy=I<suffix>
00073 
00074 If this option is given, a copy of each file will be saved with
00075 the given suffix that contains the suggested changes. This does
00076 not require any external programs.
00077 
00078 If neither C<--patch> or C<--copy> are given, the default is to
00079 simply print the diffs for each file. This requires either
00080 C<Text::Diff> or a C<diff> program to be installed.
00081 
00082 =head2 --diff=I<program>
00083 
00084 Manually set the diff program and options to use. The default
00085 is to use C<Text::Diff>, when installed, and output unified
00086 context diffs.
00087 
00088 =head2 --compat-version=I<version>
00089 
00090 Tell F<ppport.h> to check for compatibility with the given
00091 Perl version. The default is to check for compatibility with Perl
00092 version 5.003. You can use this option to reduce the output
00093 of F<ppport.h> if you intend to be backward compatible only
00094 down to a certain Perl version.
00095 
00096 =head2 --cplusplus
00097 
00098 Usually, F<ppport.h> will detect C++ style comments and
00099 replace them with C style comments for portability reasons.
00100 Using this option instructs F<ppport.h> to leave C++
00101 comments untouched.
00102 
00103 =head2 --quiet
00104 
00105 Be quiet. Don't print anything except fatal errors.
00106 
00107 =head2 --nodiag
00108 
00109 Don't output any diagnostic messages. Only portability
00110 alerts will be printed.
00111 
00112 =head2 --nohints
00113 
00114 Don't output any hints. Hints often contain useful portability
00115 notes.
00116 
00117 =head2 --nochanges
00118 
00119 Don't suggest any changes. Only give diagnostic output and hints
00120 unless these are also deactivated.
00121 
00122 =head2 --nofilter
00123 
00124 Don't filter the list of input files. By default, files not looking
00125 like source code (i.e. not *.xs, *.c, *.cc, *.cpp or *.h) are skipped.
00126 
00127 =head2 --strip
00128 
00129 Strip all script and documentation functionality from F<ppport.h>.
00130 This reduces the size of F<ppport.h> dramatically and may be useful
00131 if you want to include F<ppport.h> in smaller modules without
00132 increasing their distribution size too much.
00133 
00134 =head2 --list-provided
00135 
00136 Lists the API elements for which compatibility is provided by
00137 F<ppport.h>. Also lists if it must be explicitly requested,
00138 if it has dependencies, and if there are hints for it.
00139 
00140 =head2 --list-unsupported
00141 
00142 Lists the API elements that are known not to be supported by
00143 F<ppport.h> and below which version of Perl they probably
00144 won't be available or work.
00145 
00146 =head2 --api-info=I<name>
00147 
00148 Show portability information for API elements matching I<name>.
00149 If I<name> is surrounded by slashes, it is interpreted as a regular
00150 expression.
00151 
00152 =head1 DESCRIPTION
00153 
00154 In order for a Perl extension (XS) module to be as portable as possible
00155 across differing versions of Perl itself, certain steps need to be taken.
00156 
00157 =over 4
00158 
00159 =item *
00160 
00161 Including this header is the first major one. This alone will give you
00162 access to a large part of the Perl API that hasn't been available in
00163 earlier Perl releases. Use
00164 
00165     perl ppport.h --list-provided
00166 
00167 to see which API elements are provided by ppport.h.
00168 
00169 =item *
00170 
00171 You should avoid using deprecated parts of the API. For example, using
00172 global Perl variables without the C<PL_> prefix is deprecated. Also,
00173 some API functions used to have a C<perl_> prefix. Using this form is
00174 also deprecated. You can safely use the supported API, as F<ppport.h>
00175 will provide wrappers for older Perl versions.
00176 
00177 =item *
00178 
00179 If you use one of a few functions or variables that were not present in
00180 earlier versions of Perl, and that can't be provided using a macro, you
00181 have to explicitly request support for these functions by adding one or
00182 more C<#define>s in your source code before the inclusion of F<ppport.h>.
00183 
00184 These functions or variables will be marked C<explicit> in the list shown
00185 by C<--list-provided>.
00186 
00187 Depending on whether you module has a single or multiple files that
00188 use such functions or variables, you want either C<static> or global
00189 variants.
00190 
00191 For a C<static> function or variable (used only in a single source
00192 file), use:
00193 
00194     #define NEED_function
00195     #define NEED_variable
00196 
00197 For a global function or variable (used in multiple source files),
00198 use:
00199 
00200     #define NEED_function_GLOBAL
00201     #define NEED_variable_GLOBAL
00202 
00203 Note that you mustn't have more than one global request for the
00204 same function or variable in your project.
00205 
00206     Function / Variable       Static Request               Global Request
00207     -----------------------------------------------------------------------------------------
00208     PL_signals                NEED_PL_signals              NEED_PL_signals_GLOBAL
00209     eval_pv()                 NEED_eval_pv                 NEED_eval_pv_GLOBAL
00210     grok_bin()                NEED_grok_bin                NEED_grok_bin_GLOBAL
00211     grok_hex()                NEED_grok_hex                NEED_grok_hex_GLOBAL
00212     grok_number()             NEED_grok_number             NEED_grok_number_GLOBAL
00213     grok_numeric_radix()      NEED_grok_numeric_radix      NEED_grok_numeric_radix_GLOBAL
00214     grok_oct()                NEED_grok_oct                NEED_grok_oct_GLOBAL
00215     newCONSTSUB()             NEED_newCONSTSUB             NEED_newCONSTSUB_GLOBAL
00216     newRV_noinc()             NEED_newRV_noinc             NEED_newRV_noinc_GLOBAL
00217     sv_2pv_nolen()            NEED_sv_2pv_nolen            NEED_sv_2pv_nolen_GLOBAL
00218     sv_2pvbyte()              NEED_sv_2pvbyte              NEED_sv_2pvbyte_GLOBAL
00219     sv_catpvf_mg()            NEED_sv_catpvf_mg            NEED_sv_catpvf_mg_GLOBAL
00220     sv_catpvf_mg_nocontext()  NEED_sv_catpvf_mg_nocontext  NEED_sv_catpvf_mg_nocontext_GLOBAL
00221     sv_setpvf_mg()            NEED_sv_setpvf_mg            NEED_sv_setpvf_mg_GLOBAL
00222     sv_setpvf_mg_nocontext()  NEED_sv_setpvf_mg_nocontext  NEED_sv_setpvf_mg_nocontext_GLOBAL
00223     vnewSVpvf()               NEED_vnewSVpvf               NEED_vnewSVpvf_GLOBAL
00224 
00225 To avoid namespace conflicts, you can change the namespace of the
00226 explicitly exported functions / variables using the C<DPPP_NAMESPACE>
00227 macro. Just C<#define> the macro before including C<ppport.h>:
00228 
00229     #define DPPP_NAMESPACE MyOwnNamespace_
00230     #include "ppport.h"
00231 
00232 The default namespace is C<DPPP_>.
00233 
00234 =back
00235 
00236 The good thing is that most of the above can be checked by running
00237 F<ppport.h> on your source code. See the next section for
00238 details.
00239 
00240 =head1 EXAMPLES
00241 
00242 To verify whether F<ppport.h> is needed for your module, whether you
00243 should make any changes to your code, and whether any special defines
00244 should be used, F<ppport.h> can be run as a Perl script to check your
00245 source code. Simply say:
00246 
00247     perl ppport.h
00248 
00249 The result will usually be a list of patches suggesting changes
00250 that should at least be acceptable, if not necessarily the most
00251 efficient solution, or a fix for all possible problems.
00252 
00253 If you know that your XS module uses features only available in
00254 newer Perl releases, if you're aware that it uses C++ comments,
00255 and if you want all suggestions as a single patch file, you could
00256 use something like this:
00257 
00258     perl ppport.h --compat-version=5.6.0 --cplusplus --patch=test.diff
00259 
00260 If you only want your code to be scanned without any suggestions
00261 for changes, use:
00262 
00263     perl ppport.h --nochanges
00264 
00265 You can specify a different C<diff> program or options, using
00266 the C<--diff> option:
00267 
00268     perl ppport.h --diff='diff -C 10'
00269 
00270 This would output context diffs with 10 lines of context.
00271 
00272 To display portability information for the C<newSVpvn> function,
00273 use:
00274 
00275     perl ppport.h --api-info=newSVpvn
00276 
00277 Since the argument to C<--api-info> can be a regular expression,
00278 you can use
00279 
00280     perl ppport.h --api-info=/_nomg$/
00281 
00282 to display portability information for all C<_nomg> functions or
00283 
00284     perl ppport.h --api-info=/./
00285 
00286 to display information for all known API elements.
00287 
00288 =head1 BUGS
00289 
00290 If this version of F<ppport.h> is causing failure during
00291 the compilation of this module, please check if newer versions
00292 of either this module or C<Devel::PPPort> are available on CPAN
00293 before sending a bug report.
00294 
00295 If F<ppport.h> was generated using the latest version of
00296 C<Devel::PPPort> and is causing failure of this module, please
00297 file a bug report using the CPAN Request Tracker at L<http://rt.cpan.org/>.
00298 
00299 Please include the following information:
00300 
00301 =over 4
00302 
00303 =item 1.
00304 
00305 The complete output from running "perl -V"
00306 
00307 =item 2.
00308 
00309 This file.
00310 
00311 =item 3.
00312 
00313 The name and version of the module you were trying to build.
00314 
00315 =item 4.
00316 
00317 A full log of the build that failed.
00318 
00319 =item 5.
00320 
00321 Any other information that you think could be relevant.
00322 
00323 =back
00324 
00325 For the latest version of this code, please get the C<Devel::PPPort>
00326 module from CPAN.
00327 
00328 =head1 COPYRIGHT
00329 
00330 Version 3.x, Copyright (c) 2004-2006, Marcus Holland-Moritz.
00331 
00332 Version 2.x, Copyright (C) 2001, Paul Marquess.
00333 
00334 Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
00335 
00336 This program is free software; you can redistribute it and/or
00337 modify it under the same terms as Perl itself.
00338 
00339 =head1 SEE ALSO
00340 
00341 See L<Devel::PPPort>.
00342 
00343 =cut
00344 
00345 use strict;
00346 
00347 my %opt = (
00348   quiet     => 0,
00349   diag      => 1,
00350   hints     => 1,
00351   changes   => 1,
00352   cplusplus => 0,
00353   filter    => 1,
00354   strip     => 0,
00355 );
00356 
00357 my($ppport) = $0 =~ /([\w.]+)$/;
00358 my $LF = '(?:\r\n|[\r\n])';   # line feed
00359 my $HS = "[ \t]";             # horizontal whitespace
00360 
00361 eval {
00362   require Getopt::Long;
00363   Getopt::Long::GetOptions(\%opt, qw(
00364     help quiet diag! filter! hints! changes! cplusplus strip
00365     patch=s copy=s diff=s compat-version=s
00366     list-provided list-unsupported api-info=s
00367   )) or usage();
00368 };
00369 
00370 if ($@ and grep /^-/, @ARGV) {
00371   usage() if "@ARGV" =~ /^--?h(?:elp)?$/;
00372   die "Getopt::Long not found. Please don't use any options.\n";
00373 }
00374 
00375 usage() if $opt{help};
00376 strip() if $opt{strip};
00377 
00378 if (exists $opt{'compat-version'}) {
00379   my($r,$v,$s) = eval { parse_version($opt{'compat-version'}) };
00380   if ($@) {
00381     die "Invalid version number format: '$opt{'compat-version'}'\n";
00382   }
00383   die "Only Perl 5 is supported\n" if $r != 5;
00384   die "Invalid version number: $opt{'compat-version'}\n" if $v >= 1000 || $s >= 1000;
00385   $opt{'compat-version'} = sprintf "%d.%03d%03d", $r, $v, $s;
00386 }
00387 else {
00388   $opt{'compat-version'} = 5;
00389 }
00390 
00391 # Never use C comments in this file!!!!!
00392 my $ccs  = '/'.'*';
00393 my $cce  = '*'.'/';
00394 my $rccs = quotemeta $ccs;
00395 my $rcce = quotemeta $cce;
00396 
00397 my %API = map { /^(\w+)\|([^|]*)\|([^|]*)\|(\w*)$/
00398                 ? ( $1 => {
00399                       ($2                  ? ( base     => $2 ) : ()),
00400                       ($3                  ? ( todo     => $3 ) : ()),
00401                       (index($4, 'v') >= 0 ? ( varargs  => 1  ) : ()),
00402                       (index($4, 'p') >= 0 ? ( provided => 1  ) : ()),
00403                       (index($4, 'n') >= 0 ? ( nothxarg => 1  ) : ()),
00404                     } )
00405                 : die "invalid spec: $_" } qw(
00406 AvFILLp|5.004050||p
00407 AvFILL|||
00408 CLASS|||n
00409 CX_CURPAD_SAVE|||
00410 CX_CURPAD_SV|||
00411 CopFILEAV|5.006000||p
00412 CopFILEGV_set|5.006000||p
00413 CopFILEGV|5.006000||p
00414 CopFILESV|5.006000||p
00415 CopFILE_set|5.006000||p
00416 CopFILE|5.006000||p
00417 CopSTASHPV_set|5.006000||p
00418 CopSTASHPV|5.006000||p
00419 CopSTASH_eq|5.006000||p
00420 CopSTASH_set|5.006000||p
00421 CopSTASH|5.006000||p
00422 CopyD|5.009002||p
00423 Copy|||
00424 CvPADLIST|||
00425 CvSTASH|||
00426 CvWEAKOUTSIDE|||
00427 DEFSV|5.004050||p
00428 END_EXTERN_C|5.005000||p
00429 ENTER|||
00430 ERRSV|5.004050||p
00431 EXTEND|||
00432 EXTERN_C|5.005000||p
00433 F0convert|||n
00434 FREETMPS|||
00435 GIMME_V||5.004000|n
00436 GIMME|||n
00437 GROK_NUMERIC_RADIX|5.007002||p
00438 G_ARRAY|||
00439 G_DISCARD|||
00440 G_EVAL|||
00441 G_NOARGS|||
00442 G_SCALAR|||
00443 G_VOID||5.004000|
00444 GetVars|||
00445 GvSV|||
00446 Gv_AMupdate|||
00447 HEf_SVKEY||5.004000|
00448 HeHASH||5.004000|
00449 HeKEY||5.004000|
00450 HeKLEN||5.004000|
00451 HePV||5.004000|
00452 HeSVKEY_force||5.004000|
00453 HeSVKEY_set||5.004000|
00454 HeSVKEY||5.004000|
00455 HeVAL||5.004000|
00456 HvNAME|||
00457 INT2PTR|5.006000||p
00458 IN_LOCALE_COMPILETIME|5.007002||p
00459 IN_LOCALE_RUNTIME|5.007002||p
00460 IN_LOCALE|5.007002||p
00461 IN_PERL_COMPILETIME|5.008001||p
00462 IS_NUMBER_GREATER_THAN_UV_MAX|5.007002||p
00463 IS_NUMBER_INFINITY|5.007002||p
00464 IS_NUMBER_IN_UV|5.007002||p
00465 IS_NUMBER_NAN|5.007003||p
00466 IS_NUMBER_NEG|5.007002||p
00467 IS_NUMBER_NOT_INT|5.007002||p
00468 IVSIZE|5.006000||p
00469 IVTYPE|5.006000||p
00470 IVdf|5.006000||p
00471 LEAVE|||
00472 LVRET|||
00473 MARK|||
00474 MULTICALL||5.009003|
00475 MY_CXT_CLONE|5.009002||p
00476 MY_CXT_INIT|5.007003||p
00477 MY_CXT|5.007003||p
00478 MoveD|5.009002||p
00479 Move|||
00480 NEWSV|||
00481 NOOP|5.005000||p
00482 NUM2PTR|5.006000||p
00483 NVTYPE|5.006000||p
00484 NVef|5.006001||p
00485 NVff|5.006001||p
00486 NVgf|5.006001||p
00487 Newxc|5.009003||p
00488 Newxz|5.009003||p
00489 Newx|5.009003||p
00490 Nullav|||
00491 Nullch|||
00492 Nullcv|||
00493 Nullhv|||
00494 Nullsv|||
00495 ORIGMARK|||
00496 PAD_BASE_SV|||
00497 PAD_CLONE_VARS|||
00498 PAD_COMPNAME_FLAGS|||
00499 PAD_COMPNAME_GEN_set|||
00500 PAD_COMPNAME_GEN|||
00501 PAD_COMPNAME_OURSTASH|||
00502 PAD_COMPNAME_PV|||
00503 PAD_COMPNAME_TYPE|||
00504 PAD_RESTORE_LOCAL|||
00505 PAD_SAVE_LOCAL|||
00506 PAD_SAVE_SETNULLPAD|||
00507 PAD_SETSV|||
00508 PAD_SET_CUR_NOSAVE|||
00509 PAD_SET_CUR|||
00510 PAD_SVl|||
00511 PAD_SV|||
00512 PERL_BCDVERSION|5.009003||p
00513 PERL_GCC_BRACE_GROUPS_FORBIDDEN|5.008001||p
00514 PERL_INT_MAX|5.004000||p
00515 PERL_INT_MIN|5.004000||p
00516 PERL_LONG_MAX|5.004000||p
00517 PERL_LONG_MIN|5.004000||p
00518 PERL_MAGIC_arylen|5.007002||p
00519 PERL_MAGIC_backref|5.007002||p
00520 PERL_MAGIC_bm|5.007002||p
00521 PERL_MAGIC_collxfrm|5.007002||p
00522 PERL_MAGIC_dbfile|5.007002||p
00523 PERL_MAGIC_dbline|5.007002||p
00524 PERL_MAGIC_defelem|5.007002||p
00525 PERL_MAGIC_envelem|5.007002||p
00526 PERL_MAGIC_env|5.007002||p
00527 PERL_MAGIC_ext|5.007002||p
00528 PERL_MAGIC_fm|5.007002||p
00529 PERL_MAGIC_glob|5.007002||p
00530 PERL_MAGIC_isaelem|5.007002||p
00531 PERL_MAGIC_isa|5.007002||p
00532 PERL_MAGIC_mutex|5.007002||p
00533 PERL_MAGIC_nkeys|5.007002||p
00534 PERL_MAGIC_overload_elem|5.007002||p
00535 PERL_MAGIC_overload_table|5.007002||p
00536 PERL_MAGIC_overload|5.007002||p
00537 PERL_MAGIC_pos|5.007002||p
00538 PERL_MAGIC_qr|5.007002||p
00539 PERL_MAGIC_regdata|5.007002||p
00540 PERL_MAGIC_regdatum|5.007002||p
00541 PERL_MAGIC_regex_global|5.007002||p
00542 PERL_MAGIC_shared_scalar|5.007003||p
00543 PERL_MAGIC_shared|5.007003||p
00544 PERL_MAGIC_sigelem|5.007002||p
00545 PERL_MAGIC_sig|5.007002||p
00546 PERL_MAGIC_substr|5.007002||p
00547 PERL_MAGIC_sv|5.007002||p
00548 PERL_MAGIC_taint|5.007002||p
00549 PERL_MAGIC_tiedelem|5.007002||p
00550 PERL_MAGIC_tiedscalar|5.007002||p
00551 PERL_MAGIC_tied|5.007002||p
00552 PERL_MAGIC_utf8|5.008001||p
00553 PERL_MAGIC_uvar_elem|5.007003||p
00554 PERL_MAGIC_uvar|5.007002||p
00555 PERL_MAGIC_vec|5.007002||p
00556 PERL_MAGIC_vstring|5.008001||p
00557 PERL_QUAD_MAX|5.004000||p
00558 PERL_QUAD_MIN|5.004000||p
00559 PERL_REVISION|5.006000||p
00560 PERL_SCAN_ALLOW_UNDERSCORES|5.007003||p
00561 PERL_SCAN_DISALLOW_PREFIX|5.007003||p
00562 PERL_SCAN_GREATER_THAN_UV_MAX|5.007003||p
00563 PERL_SCAN_SILENT_ILLDIGIT|5.008001||p
00564 PERL_SHORT_MAX|5.004000||p
00565 PERL_SHORT_MIN|5.004000||p
00566 PERL_SIGNALS_UNSAFE_FLAG|5.008001||p
00567 PERL_SUBVERSION|5.006000||p
00568 PERL_UCHAR_MAX|5.004000||p
00569 PERL_UCHAR_MIN|5.004000||p
00570 PERL_UINT_MAX|5.004000||p
00571 PERL_UINT_MIN|5.004000||p
00572 PERL_ULONG_MAX|5.004000||p
00573 PERL_ULONG_MIN|5.004000||p
00574 PERL_UNUSED_DECL|5.007002||p
00575 PERL_UQUAD_MAX|5.004000||p
00576 PERL_UQUAD_MIN|5.004000||p
00577 PERL_USHORT_MAX|5.004000||p
00578 PERL_USHORT_MIN|5.004000||p
00579 PERL_VERSION|5.006000||p
00580 PL_DBsingle|||pn
00581 PL_DBsub|||pn
00582 PL_DBtrace|||n
00583 PL_Sv|5.005000||p
00584 PL_compiling|5.004050||p
00585 PL_copline|5.005000||p
00586 PL_curcop|5.004050||p
00587 PL_curstash|5.004050||p
00588 PL_debstash|5.004050||p
00589 PL_defgv|5.004050||p
00590 PL_diehook|5.004050||p
00591 PL_dirty|5.004050||p
00592 PL_dowarn|||pn
00593 PL_errgv|5.004050||p
00594 PL_hexdigit|5.005000||p
00595 PL_hints|5.005000||p
00596 PL_last_in_gv|||n
00597 PL_modglobal||5.005000|n
00598 PL_na|5.004050||pn
00599 PL_no_modify|5.006000||p
00600 PL_ofs_sv|||n
00601 PL_perl_destruct_level|5.004050||p
00602 PL_perldb|5.004050||p
00603 PL_ppaddr|5.006000||p
00604 PL_rsfp_filters|5.004050||p
00605 PL_rsfp|5.004050||p
00606 PL_rs|||n
00607 PL_signals|5.008001||p
00608 PL_stack_base|5.004050||p
00609 PL_stack_sp|5.004050||p
00610 PL_stdingv|5.004050||p
00611 PL_sv_arenaroot|5.004050||p
00612 PL_sv_no|5.004050||pn
00613 PL_sv_undef|5.004050||pn
00614 PL_sv_yes|5.004050||pn
00615 PL_tainted|5.004050||p
00616 PL_tainting|5.004050||p
00617 POP_MULTICALL||5.009003|
00618 POPi|||n
00619 POPl|||n
00620 POPn|||n
00621 POPpbytex||5.007001|n
00622 POPpx||5.005030|n
00623 POPp|||n
00624 POPs|||n
00625 PTR2IV|5.006000||p
00626 PTR2NV|5.006000||p
00627 PTR2UV|5.006000||p
00628 PTR2ul|5.007001||p
00629 PTRV|5.006000||p
00630 PUSHMARK|||
00631 PUSH_MULTICALL||5.009003|
00632 PUSHi|||
00633 PUSHmortal|5.009002||p
00634 PUSHn|||
00635 PUSHp|||
00636 PUSHs|||
00637 PUSHu|5.004000||p
00638 PUTBACK|||
00639 PerlIO_clearerr||5.007003|
00640 PerlIO_close||5.007003|
00641 PerlIO_eof||5.007003|
00642 PerlIO_error||5.007003|
00643 PerlIO_fileno||5.007003|
00644 PerlIO_fill||5.007003|
00645 PerlIO_flush||5.007003|
00646 PerlIO_get_base||5.007003|
00647 PerlIO_get_bufsiz||5.007003|
00648 PerlIO_get_cnt||5.007003|
00649 PerlIO_get_ptr||5.007003|
00650 PerlIO_read||5.007003|
00651 PerlIO_seek||5.007003|
00652 PerlIO_set_cnt||5.007003|
00653 PerlIO_set_ptrcnt||5.007003|
00654 PerlIO_setlinebuf||5.007003|
00655 PerlIO_stderr||5.007003|
00656 PerlIO_stdin||5.007003|
00657 PerlIO_stdout||5.007003|
00658 PerlIO_tell||5.007003|
00659 PerlIO_unread||5.007003|
00660 PerlIO_write||5.007003|
00661 Poison|5.008000||p
00662 RETVAL|||n
00663 Renewc|||
00664 Renew|||
00665 SAVECLEARSV|||
00666 SAVECOMPPAD|||
00667 SAVEPADSV|||
00668 SAVETMPS|||
00669 SAVE_DEFSV|5.004050||p
00670 SPAGAIN|||
00671 SP|||
00672 START_EXTERN_C|5.005000||p
00673 START_MY_CXT|5.007003||p
00674 STMT_END|||p
00675 STMT_START|||p
00676 ST|||
00677 SVt_IV|||
00678 SVt_NV|||
00679 SVt_PVAV|||
00680 SVt_PVCV|||
00681 SVt_PVHV|||
00682 SVt_PVMG|||
00683 SVt_PV|||
00684 Safefree|||
00685 Slab_Alloc|||
00686 Slab_Free|||
00687 StructCopy|||
00688 SvCUR_set|||
00689 SvCUR|||
00690 SvEND|||
00691 SvGETMAGIC|5.004050||p
00692 SvGROW|||
00693 SvIOK_UV||5.006000|
00694 SvIOK_notUV||5.006000|
00695 SvIOK_off|||
00696 SvIOK_only_UV||5.006000|
00697 SvIOK_only|||
00698 SvIOK_on|||
00699 SvIOKp|||
00700 SvIOK|||
00701 SvIVX|||
00702 SvIV_nomg|5.009001||p
00703 SvIV_set|||
00704 SvIVx|||
00705 SvIV|||
00706 SvIsCOW_shared_hash||5.008003|
00707 SvIsCOW||5.008003|
00708 SvLEN_set|||
00709 SvLEN|||
00710 SvLOCK||5.007003|
00711 SvMAGIC_set|5.009003||p
00712 SvNIOK_off|||
00713 SvNIOKp|||
00714 SvNIOK|||
00715 SvNOK_off|||
00716 SvNOK_only|||
00717 SvNOK_on|||
00718 SvNOKp|||
00719 SvNOK|||
00720 SvNVX|||
00721 SvNV_set|||
00722 SvNVx|||
00723 SvNV|||
00724 SvOK|||
00725 SvOOK|||
00726 SvPOK_off|||
00727 SvPOK_only_UTF8||5.006000|
00728 SvPOK_only|||
00729 SvPOK_on|||
00730 SvPOKp|||
00731 SvPOK|||
00732 SvPVX_const|5.009003||p
00733 SvPVX_mutable|5.009003||p
00734 SvPVX|||
00735 SvPV_force_nomg|5.007002||p
00736 SvPV_force|||
00737 SvPV_nolen|5.006000||p
00738 SvPV_nomg|5.007002||p
00739 SvPV_set|||
00740 SvPVbyte_force||5.009002|
00741 SvPVbyte_nolen||5.006000|
00742 SvPVbytex_force||5.006000|
00743 SvPVbytex||5.006000|
00744 SvPVbyte|5.006000||p
00745 SvPVutf8_force||5.006000|
00746 SvPVutf8_nolen||5.006000|
00747 SvPVutf8x_force||5.006000|
00748 SvPVutf8x||5.006000|
00749 SvPVutf8||5.006000|
00750 SvPVx|||
00751 SvPV|||
00752 SvREFCNT_dec|||
00753 SvREFCNT_inc|||
00754 SvREFCNT|||
00755 SvROK_off|||
00756 SvROK_on|||
00757 SvROK|||
00758 SvRV_set|5.009003||p
00759 SvRV|||
00760 SvSETMAGIC|||
00761 SvSHARE||5.007003|
00762 SvSTASH_set|5.009003|5.009003|p
00763 SvSTASH|||
00764 SvSetMagicSV_nosteal||5.004000|
00765 SvSetMagicSV||5.004000|
00766 SvSetSV_nosteal||5.004000|
00767 SvSetSV|||
00768 SvTAINTED_off||5.004000|
00769 SvTAINTED_on||5.004000|
00770 SvTAINTED||5.004000|
00771 SvTAINT|||
00772 SvTRUE|||
00773 SvTYPE|||
00774 SvUNLOCK||5.007003|
00775 SvUOK||5.007001|
00776 SvUPGRADE|||
00777 SvUTF8_off||5.006000|
00778 SvUTF8_on||5.006000|
00779 SvUTF8||5.006000|
00780 SvUVXx|5.004000||p
00781 SvUVX|5.004000||p
00782 SvUV_nomg|5.009001||p
00783 SvUV_set|5.009003||p
00784 SvUVx|5.004000||p
00785 SvUV|5.004000||p
00786 SvVOK||5.008001|
00787 THIS|||n
00788 UNDERBAR|5.009002||p
00789 UVSIZE|5.006000||p
00790 UVTYPE|5.006000||p
00791 UVXf|5.007001||p
00792 UVof|5.006000||p
00793 UVuf|5.006000||p
00794 UVxf|5.006000||p
00795 XCPT_CATCH|5.009002||p
00796 XCPT_RETHROW|5.009002||p
00797 XCPT_TRY_END|5.009002||p
00798 XCPT_TRY_START|5.009002||p
00799 XPUSHi|||
00800 XPUSHmortal|5.009002||p
00801 XPUSHn|||
00802 XPUSHp|||
00803 XPUSHs|||
00804 XPUSHu|5.004000||p
00805 XSRETURN_EMPTY|||
00806 XSRETURN_IV|||
00807 XSRETURN_NO|||
00808 XSRETURN_NV|||
00809 XSRETURN_PV|||
00810 XSRETURN_UNDEF|||
00811 XSRETURN_UV|5.008001||p
00812 XSRETURN_YES|||
00813 XSRETURN|||p
00814 XST_mIV|||
00815 XST_mNO|||
00816 XST_mNV|||
00817 XST_mPV|||
00818 XST_mUNDEF|||
00819 XST_mUV|5.008001||p
00820 XST_mYES|||
00821 XS_VERSION_BOOTCHECK|||
00822 XS_VERSION|||
00823 XSprePUSH|5.006000||p
00824 XS|||
00825 ZeroD|5.009002||p
00826 Zero|||
00827 _aMY_CXT|5.007003||p
00828 _pMY_CXT|5.007003||p
00829 aMY_CXT_|5.007003||p
00830 aMY_CXT|5.007003||p
00831 aTHX_|5.006000||p
00832 aTHX|5.006000||p
00833 add_data|||
00834 allocmy|||
00835 amagic_call|||
00836 amagic_cmp_locale|||
00837 amagic_cmp|||
00838 amagic_i_ncmp|||
00839 amagic_ncmp|||
00840 any_dup|||
00841 ao|||
00842 append_elem|||
00843 append_list|||
00844 apply_attrs_my|||
00845 apply_attrs_string||5.006001|
00846 apply_attrs|||
00847 apply|||
00848 atfork_lock||5.007003|n
00849 atfork_unlock||5.007003|n
00850 av_arylen_p||5.009003|
00851 av_clear|||
00852 av_delete||5.006000|
00853 av_exists||5.006000|
00854 av_extend|||
00855 av_fake|||
00856 av_fetch|||
00857 av_fill|||
00858 av_len|||
00859 av_make|||
00860 av_pop|||
00861 av_push|||
00862 av_reify|||
00863 av_shift|||
00864 av_store|||
00865 av_undef|||
00866 av_unshift|||
00867 ax|||n
00868 bad_type|||
00869 bind_match|||
00870 block_end|||
00871 block_gimme||5.004000|
00872 block_start|||
00873 boolSV|5.004000||p
00874 boot_core_PerlIO|||
00875 boot_core_UNIVERSAL|||
00876 boot_core_xsutils|||
00877 bytes_from_utf8||5.007001|
00878 bytes_to_utf8||5.006001|
00879 cache_re|||
00880 call_argv|5.006000||p
00881 call_atexit||5.006000|
00882 call_body|||
00883 call_list_body|||
00884 call_list||5.004000|
00885 call_method|5.006000||p
00886 call_pv|5.006000||p
00887 call_sv|5.006000||p
00888 calloc||5.007002|n
00889 cando|||
00890 cast_i32||5.006000|
00891 cast_iv||5.006000|
00892 cast_ulong||5.006000|
00893 cast_uv||5.006000|
00894 check_type_and_open|||
00895 check_uni|||
00896 checkcomma|||
00897 checkposixcc|||
00898 ck_anoncode|||
00899 ck_bitop|||
00900 ck_concat|||
00901 ck_defined|||
00902 ck_delete|||
00903 ck_die|||
00904 ck_eof|||
00905 ck_eval|||
00906 ck_exec|||
00907 ck_exists|||
00908 ck_exit|||
00909 ck_ftst|||
00910 ck_fun|||
00911 ck_glob|||
00912 ck_grep|||
00913 ck_index|||
00914 ck_join|||
00915 ck_lengthconst|||
00916 ck_lfun|||
00917 ck_listiob|||
00918 ck_match|||
00919 ck_method|||
00920 ck_null|||
00921 ck_open|||
00922 ck_repeat|||
00923 ck_require|||
00924 ck_retarget|||
00925 ck_return|||
00926 ck_rfun|||
00927 ck_rvconst|||
00928 ck_sassign|||
00929 ck_say|||
00930 ck_select|||
00931 ck_shift|||
00932 ck_sort|||
00933 ck_spair|||
00934 ck_split|||
00935 ck_subr|||
00936 ck_substr|||
00937 ck_svconst|||
00938 ck_trunc|||
00939 ck_unpack|||
00940 ckwarn_d||5.009003|
00941 ckwarn||5.009003|
00942 cl_and|||
00943 cl_anything|||
00944 cl_init_zero|||
00945 cl_init|||
00946 cl_is_anything|||
00947 cl_or|||
00948 closest_cop|||
00949 convert|||
00950 cop_free|||
00951 cr_textfilter|||
00952 croak_nocontext|||vn
00953 croak|||v
00954 csighandler||5.009003|n
00955 custom_op_desc||5.007003|
00956 custom_op_name||5.007003|
00957 cv_ckproto|||
00958 cv_clone|||
00959 cv_const_sv||5.004000|
00960 cv_dump|||
00961 cv_undef|||
00962 cx_dump||5.005000|
00963 cx_dup|||
00964 cxinc|||
00965 dAXMARK|5.009003||p
00966 dAX|5.007002||p
00967 dITEMS|5.007002||p
00968 dMARK|||
00969 dMULTICALL||5.009003|
00970 dMY_CXT_SV|5.007003||p
00971 dMY_CXT|5.007003||p
00972 dNOOP|5.006000||p
00973 dORIGMARK|||
00974 dSP|||
00975 dTHR|5.004050||p
00976 dTHXa|5.006000||p
00977 dTHXoa|5.006000||p
00978 dTHX|5.006000||p
00979 dUNDERBAR|5.009002||p
00980 dXCPT|5.009002||p
00981 dXSARGS|||
00982 dXSI32|||
00983 dXSTARG|5.006000||p
00984 deb_curcv|||
00985 deb_nocontext|||vn
00986 deb_stack_all|||
00987 deb_stack_n|||
00988 debop||5.005000|
00989 debprofdump||5.005000|
00990 debprof|||
00991 debstackptrs||5.007003|
00992 debstack||5.007003|
00993 deb||5.007003|v
00994 del_sv|||
00995 delimcpy||5.004000|
00996 deprecate_old|||
00997 deprecate|||
00998 despatch_signals||5.007001|
00999 destroy_matcher|||
01000 die_nocontext|||vn
01001 die_where|||
01002 die|||v
01003 dirp_dup|||
01004 div128|||
01005 djSP|||
01006 do_aexec5|||
01007 do_aexec|||
01008 do_aspawn|||
01009 do_binmode||5.004050|
01010 do_chomp|||
01011 do_chop|||
01012 do_close|||
01013 do_dump_pad|||
01014 do_eof|||
01015 do_exec3|||
01016 do_execfree|||
01017 do_exec|||
01018 do_gv_dump||5.006000|
01019 do_gvgv_dump||5.006000|
01020 do_hv_dump||5.006000|
01021 do_ipcctl|||
01022 do_ipcget|||
01023 do_join|||
01024 do_kv|||
01025 do_magic_dump||5.006000|
01026 do_msgrcv|||
01027 do_msgsnd|||
01028 do_oddball|||
01029 do_op_dump||5.006000|
01030 do_open9||5.006000|
01031 do_openn||5.007001|
01032 do_open||5.004000|
01033 do_pipe|||
01034 do_pmop_dump||5.006000|
01035 do_print|||
01036 do_readline|||
01037 do_seek|||
01038 do_semop|||
01039 do_shmio|||
01040 do_smartmatch|||
01041 do_spawn_nowait|||
01042 do_spawn|||
01043 do_sprintf|||
01044 do_sv_dump||5.006000|
01045 do_sysseek|||
01046 do_tell|||
01047 do_trans_complex_utf8|||
01048 do_trans_complex|||
01049 do_trans_count_utf8|||
01050 do_trans_count|||
01051 do_trans_simple_utf8|||
01052 do_trans_simple|||
01053 do_trans|||
01054 do_vecget|||
01055 do_vecset|||
01056 do_vop|||
01057 docatch_body|||
01058 docatch|||
01059 doeval|||
01060 dofile|||
01061 dofindlabel|||
01062 doform|||
01063 doing_taint||5.008001|n
01064 dooneliner|||
01065 doopen_pm|||
01066 doparseform|||
01067 dopoptoeval|||
01068 dopoptogiven|||
01069 dopoptolabel|||
01070 dopoptoloop|||
01071 dopoptosub_at|||
01072 dopoptosub|||
01073 dopoptowhen|||
01074 doref||5.009003|
01075 dounwind|||
01076 dowantarray|||
01077 dump_all||5.006000|
01078 dump_eval||5.006000|
01079 dump_fds|||
01080 dump_form||5.006000|
01081 dump_indent||5.006000|v
01082 dump_mstats|||
01083 dump_packsubs||5.006000|
01084 dump_sub||5.006000|
01085 dump_sv_child|||
01086 dump_vindent||5.006000|
01087 dumpuntil|||
01088 dup_attrlist|||
01089 emulate_eaccess|||
01090 eval_pv|5.006000||p
01091 eval_sv|5.006000||p
01092 expect_number|||
01093 fbm_compile||5.005000|
01094 fbm_instr||5.005000|
01095 fd_on_nosuid_fs|||
01096 feature_is_enabled|||
01097 filter_add|||
01098 filter_del|||
01099 filter_gets|||
01100 filter_read|||
01101 find_beginning|||
01102 find_byclass|||
01103 find_in_my_stash|||
01104 find_runcv|||
01105 find_rundefsvoffset||5.009002|
01106 find_script|||
01107 find_uninit_var|||
01108 first_symbol|||n
01109 fold_constants|||
01110 forbid_setid|||
01111 force_ident|||
01112 force_list|||
01113 force_next|||
01114 force_version|||
01115 force_word|||
01116 form_nocontext|||vn
01117 form||5.004000|v
01118 fp_dup|||
01119 fprintf_nocontext|||vn
01120 free_global_struct|||
01121 free_tied_hv_pool|||
01122 free_tmps|||
01123 gen_constant_list|||
01124 get_av|5.006000||p
01125 get_context||5.006000|n
01126 get_cv|5.006000||p
01127 get_db_sub|||
01128 get_debug_opts|||
01129 get_hash_seed|||
01130 get_hv|5.006000||p
01131 get_mstats|||
01132 get_no_modify|||
01133 get_num|||
01134 get_op_descs||5.005000|
01135 get_op_names||5.005000|
01136 get_opargs|||
01137 get_ppaddr||5.006000|
01138 get_sv|5.006000||p
01139 get_vtbl||5.005030|
01140 getcwd_sv||5.007002|
01141 getenv_len|||
01142 gp_dup|||
01143 gp_free|||
01144 gp_ref|||
01145 grok_bin|5.007003||p
01146 grok_hex|5.007003||p
01147 grok_number|5.007002||p
01148 grok_numeric_radix|5.007002||p
01149 grok_oct|5.007003||p
01150 group_end|||
01151 gv_AVadd|||
01152 gv_HVadd|||
01153 gv_IOadd|||
01154 gv_SVadd|||
01155 gv_autoload4||5.004000|
01156 gv_check|||
01157 gv_const_sv||5.009003|
01158 gv_dump||5.006000|
01159 gv_efullname3||5.004000|
01160 gv_efullname4||5.006001|
01161 gv_efullname|||
01162 gv_ename|||
01163 gv_fetchfile|||
01164 gv_fetchmeth_autoload||5.007003|
01165 gv_fetchmethod_autoload||5.004000|
01166 gv_fetchmethod|||
01167 gv_fetchmeth|||
01168 gv_fetchpvn_flags||5.009002|
01169 gv_fetchpv|||
01170 gv_fetchsv||5.009002|
01171 gv_fullname3||5.004000|
01172 gv_fullname4||5.006001|
01173 gv_fullname|||
01174 gv_handler||5.007001|
01175 gv_init_sv|||
01176 gv_init|||
01177 gv_stashpvn|5.006000||p
01178 gv_stashpv|||
01179 gv_stashsv|||
01180 he_dup|||
01181 hek_dup|||
01182 hfreeentries|||
01183 hsplit|||
01184 hv_assert||5.009001|
01185 hv_auxinit|||
01186 hv_backreferences_p|||
01187 hv_clear_placeholders||5.009001|
01188 hv_clear|||
01189 hv_delayfree_ent||5.004000|
01190 hv_delete_common|||
01191 hv_delete_ent||5.004000|
01192 hv_delete|||
01193 hv_eiter_p||5.009003|
01194 hv_eiter_set||5.009003|
01195 hv_exists_ent||5.004000|
01196 hv_exists|||
01197 hv_fetch_common|||
01198 hv_fetch_ent||5.004000|
01199 hv_fetch|||
01200 hv_free_ent||5.004000|
01201 hv_iterinit|||
01202 hv_iterkeysv||5.004000|
01203 hv_iterkey|||
01204 hv_iternext_flags||5.008000|
01205 hv_iternextsv|||
01206 hv_iternext|||
01207 hv_iterval|||
01208 hv_kill_backrefs|||
01209 hv_ksplit||5.004000|
01210 hv_magic_check|||
01211 hv_magic|||
01212 hv_name_set||5.009003|
01213 hv_notallowed|||
01214 hv_placeholders_get||5.009003|
01215 hv_placeholders_p||5.009003|
01216 hv_placeholders_set||5.009003|
01217 hv_riter_p||5.009003|
01218 hv_riter_set||5.009003|
01219 hv_scalar||5.009001|
01220 hv_store_ent||5.004000|
01221 hv_store_flags||5.008000|
01222 hv_store|||
01223 hv_undef|||
01224 ibcmp_locale||5.004000|
01225 ibcmp_utf8||5.007003|
01226 ibcmp|||
01227 incl_perldb|||
01228 incline|||
01229 incpush_if_exists|||
01230 incpush|||
01231 ingroup|||
01232 init_argv_symbols|||
01233 init_debugger|||
01234 init_global_struct|||
01235 init_i18nl10n||5.006000|
01236 init_i18nl14n||5.006000|
01237 init_ids|||
01238 init_interp|||
01239 init_lexer|||
01240 init_main_stash|||
01241 init_perllib|||
01242 init_postdump_symbols|||
01243 init_predump_symbols|||
01244 init_stacks||5.005000|
01245 init_tm||5.007002|
01246 instr|||
01247 intro_my|||
01248 intuit_method|||
01249 intuit_more|||
01250 invert|||
01251 io_close|||
01252 isALNUM|||
01253 isALPHA|||
01254 isDIGIT|||
01255 isLOWER|||
01256 isSPACE|||
01257 isUPPER|||
01258 is_an_int|||
01259 is_gv_magical_sv|||
01260 is_gv_magical|||
01261 is_handle_constructor|||
01262 is_list_assignment|||
01263 is_lvalue_sub||5.007001|
01264 is_uni_alnum_lc||5.006000|
01265 is_uni_alnumc_lc||5.006000|
01266 is_uni_alnumc||5.006000|
01267 is_uni_alnum||5.006000|
01268 is_uni_alpha_lc||5.006000|
01269 is_uni_alpha||5.006000|
01270 is_uni_ascii_lc||5.006000|
01271 is_uni_ascii||5.006000|
01272 is_uni_cntrl_lc||5.006000|
01273 is_uni_cntrl||5.006000|
01274 is_uni_digit_lc||5.006000|
01275 is_uni_digit||5.006000|
01276 is_uni_graph_lc||5.006000|
01277 is_uni_graph||5.006000|
01278 is_uni_idfirst_lc||5.006000|
01279 is_uni_idfirst||5.006000|
01280 is_uni_lower_lc||5.006000|
01281 is_uni_lower||5.006000|
01282 is_uni_print_lc||5.006000|
01283 is_uni_print||5.006000|
01284 is_uni_punct_lc||5.006000|
01285 is_uni_punct||5.006000|
01286 is_uni_space_lc||5.006000|
01287 is_uni_space||5.006000|
01288 is_uni_upper_lc||5.006000|
01289 is_uni_upper||5.006000|
01290 is_uni_xdigit_lc||5.006000|
01291 is_uni_xdigit||5.006000|
01292 is_utf8_alnumc||5.006000|
01293 is_utf8_alnum||5.006000|
01294 is_utf8_alpha||5.006000|
01295 is_utf8_ascii||5.006000|
01296 is_utf8_char_slow|||
01297 is_utf8_char||5.006000|
01298 is_utf8_cntrl||5.006000|
01299 is_utf8_common|||
01300 is_utf8_digit||5.006000|
01301 is_utf8_graph||5.006000|
01302 is_utf8_idcont||5.008000|
01303 is_utf8_idfirst||5.006000|
01304 is_utf8_lower||5.006000|
01305 is_utf8_mark||5.006000|
01306 is_utf8_print||5.006000|
01307 is_utf8_punct||5.006000|
01308 is_utf8_space||5.006000|
01309 is_utf8_string_loclen||5.009003|
01310 is_utf8_string_loc||5.008001|
01311 is_utf8_string||5.006001|
01312 is_utf8_upper||5.006000|
01313 is_utf8_xdigit||5.006000|
01314 isa_lookup|||
01315 items|||n
01316 ix|||n
01317 jmaybe|||
01318 keyword|||
01319 leave_scope|||
01320 lex_end|||
01321 lex_start|||
01322 linklist|||
01323 listkids|||
01324 list|||
01325 load_module_nocontext|||vn
01326 load_module||5.006000|v
01327 localize|||
01328 looks_like_bool|||
01329 looks_like_number|||
01330 lop|||
01331 mPUSHi|5.009002||p
01332 mPUSHn|5.009002||p
01333 mPUSHp|5.009002||p
01334 mPUSHu|5.009002||p
01335 mXPUSHi|5.009002||p
01336 mXPUSHn|5.009002||p
01337 mXPUSHp|5.009002||p
01338 mXPUSHu|5.009002||p
01339 magic_clear_all_env|||
01340 magic_clearenv|||
01341 magic_clearpack|||
01342 magic_clearsig|||
01343 magic_dump||5.006000|
01344 magic_existspack|||
01345 magic_freearylen_p|||
01346 magic_freeovrld|||
01347 magic_freeregexp|||
01348 magic_getarylen|||
01349 magic_getdefelem|||
01350 magic_getglob|||
01351 magic_getnkeys|||
01352 magic_getpack|||
01353 magic_getpos|||
01354 magic_getsig|||
01355 magic_getsubstr|||
01356 magic_gettaint|||
01357 magic_getuvar|||
01358 magic_getvec|||
01359 magic_get|||
01360 magic_killbackrefs|||
01361 magic_len|||
01362 magic_methcall|||
01363 magic_methpack|||
01364 magic_nextpack|||
01365 magic_regdata_cnt|||
01366 magic_regdatum_get|||
01367 magic_regdatum_set|||
01368 magic_scalarpack|||
01369 magic_set_all_env|||
01370 magic_setamagic|||
01371 magic_setarylen|||
01372 magic_setbm|||
01373 magic_setcollxfrm|||
01374 magic_setdbline|||
01375 magic_setdefelem|||
01376 magic_setenv|||
01377 magic_setfm|||
01378 magic_setglob|||
01379 magic_setisa|||
01380 magic_setmglob|||
01381 magic_setnkeys|||
01382 magic_setpack|||
01383 magic_setpos|||
01384 magic_setregexp|||
01385 magic_setsig|||
01386 magic_setsubstr|||
01387 magic_settaint|||
01388 magic_setutf8|||
01389 magic_setuvar|||
01390 magic_setvec|||
01391 magic_set|||
01392 magic_sizepack|||
01393 magic_wipepack|||
01394 magicname|||
01395 make_matcher|||
01396 make_trie|||
01397 malloced_size|||n
01398 malloc||5.007002|n
01399 markstack_grow|||
01400 matcher_matches_sv|||
01401 measure_struct|||
01402 memEQ|5.004000||p
01403 memNE|5.004000||p
01404 mem_collxfrm|||
01405 mess_alloc|||
01406 mess_nocontext|||vn
01407 mess||5.006000|v
01408 method_common|||
01409 mfree||5.007002|n
01410 mg_clear|||
01411 mg_copy|||
01412 mg_dup|||
01413 mg_find|||
01414 mg_free|||
01415 mg_get|||
01416 mg_length||5.005000|
01417 mg_localize|||
01418 mg_magical|||
01419 mg_set|||
01420 mg_size||5.005000|
01421 mini_mktime||5.007002|
01422 missingterm|||
01423 mode_from_discipline|||
01424 modkids|||
01425 mod|||
01426 moreswitches|||
01427 mul128|||
01428 mulexp10|||n
01429 my_atof2||5.007002|
01430 my_atof||5.006000|
01431 my_attrs|||
01432 my_bcopy|||n
01433 my_betoh16|||n
01434 my_betoh32|||n
01435 my_betoh64|||n
01436 my_betohi|||n
01437 my_betohl|||n
01438 my_betohs|||n
01439 my_bzero|||n
01440 my_chsize|||
01441 my_clearenv|||
01442 my_cxt_init|||
01443 my_exit_jump|||
01444 my_exit|||
01445 my_failure_exit||5.004000|
01446 my_fflush_all||5.006000|
01447 my_fork||5.007003|n
01448 my_htobe16|||n
01449 my_htobe32|||n
01450 my_htobe64|||n
01451 my_htobei|||n
01452 my_htobel|||n
01453 my_htobes|||n
01454 my_htole16|||n
01455 my_htole32|||n
01456 my_htole64|||n
01457 my_htolei|||n
01458 my_htolel|||n
01459 my_htoles|||n
01460 my_htonl|||
01461 my_kid|||
01462 my_letoh16|||n
01463 my_letoh32|||n
01464 my_letoh64|||n
01465 my_letohi|||n
01466 my_letohl|||n
01467 my_letohs|||n
01468 my_lstat|||
01469 my_memcmp||5.004000|n
01470 my_memset|||n
01471 my_ntohl|||
01472 my_pclose||5.004000|
01473 my_popen_list||5.007001|
01474 my_popen||5.004000|
01475 my_setenv|||
01476 my_socketpair||5.007003|n
01477 my_sprintf||5.009003|vn
01478 my_stat|||
01479 my_strftime||5.007002|
01480 my_swabn|||n
01481 my_swap|||
01482 my_unexec|||
01483 my|||
01484 need_utf8|||n
01485 newANONATTRSUB||5.006000|
01486 newANONHASH|||
01487 newANONLIST|||
01488 newANONSUB|||
01489 newASSIGNOP|||
01490 newATTRSUB||5.006000|
01491 newAVREF|||
01492 newAV|||
01493 newBINOP|||
01494 newCONDOP|||
01495 newCONSTSUB|5.006000||p
01496 newCVREF|||
01497 newDEFSVOP|||
01498 newFORM|||
01499 newFOROP|||
01500 newGIVENOP||5.009003|
01501 newGIVWHENOP|||
01502 newGVOP|||
01503 newGVREF|||
01504 newGVgen|||
01505 newHVREF|||
01506 newHVhv||5.005000|
01507 newHV|||
01508 newIO|||
01509 newLISTOP|||
01510 newLOGOP|||
01511 newLOOPEX|||
01512 newLOOPOP|||
01513 newMYSUB||5.006000|
01514 newNULLLIST|||
01515 newOP|||
01516 newPADOP||5.006000|
01517 newPMOP|||
01518 newPROG|||
01519 newPVOP|||
01520 newRANGE|||
01521 newRV_inc|5.004000||p
01522 newRV_noinc|5.006000||p
01523 newRV|||
01524 newSLICEOP|||
01525 newSTATEOP|||
01526 newSUB|||
01527 newSVOP|||
01528 newSVREF|||
01529 newSVhek||5.009003|
01530 newSViv|||
01531 newSVnv|||
01532 newSVpvf_nocontext|||vn
01533 newSVpvf||5.004000|v
01534 newSVpvn_share||5.007001|
01535 newSVpvn|5.006000||p
01536 newSVpv|||
01537 newSVrv|||
01538 newSVsv|||
01539 newSVuv|5.006000||p
01540 newSV|||
01541 newUNOP|||
01542 newWHENOP||5.009003|
01543 newWHILEOP||5.009003|
01544 newXSproto||5.006000|
01545 newXS||5.006000|
01546 new_collate||5.006000|
01547 new_constant|||
01548 new_ctype||5.006000|
01549 new_he|||
01550 new_logop|||
01551 new_numeric||5.006000|
01552 new_stackinfo||5.005000|
01553 new_version||5.009000|
01554 next_symbol|||
01555 nextargv|||
01556 nextchar|||
01557 ninstr|||
01558 no_bareword_allowed|||
01559 no_fh_allowed|||
01560 no_op|||
01561 not_a_number|||
01562 nothreadhook||5.008000|
01563 nuke_stacks|||
01564 num_overflow|||n
01565 offer_nice_chunk|||
01566 oopsAV|||
01567 oopsCV|||
01568 oopsHV|||
01569 op_clear|||
01570 op_const_sv|||
01571 op_dump||5.006000|
01572 op_free|||
01573 op_null||5.007002|
01574 op_refcnt_lock||5.009002|
01575 op_refcnt_unlock||5.009002|
01576 open_script|||
01577 pMY_CXT_|5.007003||p
01578 pMY_CXT|5.007003||p
01579 pTHX_|5.006000||p
01580 pTHX|5.006000||p
01581 pack_cat||5.007003|
01582 pack_rec|||
01583 package|||
01584 packlist||5.008001|
01585 pad_add_anon|||
01586 pad_add_name|||
01587 pad_alloc|||
01588 pad_block_start|||
01589 pad_check_dup|||
01590 pad_compname_type|||
01591 pad_findlex|||
01592 pad_findmy|||
01593 pad_fixup_inner_anons|||
01594 pad_free|||
01595 pad_leavemy|||
01596 pad_new|||
01597 pad_push|||
01598 pad_reset|||
01599 pad_setsv|||
01600 pad_sv|||
01601 pad_swipe|||
01602 pad_tidy|||
01603 pad_undef|||
01604 parse_body|||
01605 parse_unicode_opts|||
01606 path_is_absolute|||
01607 peep|||
01608 pending_ident|||
01609 perl_alloc_using|||n
01610 perl_alloc|||n
01611 perl_clone_using|||n
01612 perl_clone|||n
01613 perl_construct|||n
01614 perl_destruct||5.007003|n
01615 perl_free|||n
01616 perl_parse||5.006000|n
01617 perl_run|||n
01618 pidgone|||
01619 pmflag|||
01620 pmop_dump||5.006000|
01621 pmruntime|||
01622 pmtrans|||
01623 pop_scope|||
01624 pregcomp|||
01625 pregexec|||
01626 pregfree|||
01627 prepend_elem|||
01628 printf_nocontext|||vn
01629 ptr_table_clear|||
01630 ptr_table_fetch|||
01631 ptr_table_free|||
01632 ptr_table_new|||
01633 ptr_table_split|||
01634 ptr_table_store|||
01635 push_scope|||
01636 put_byte|||
01637 pv_display||5.006000|
01638 pv_uni_display||5.007003|
01639 qerror|||
01640 re_croak2|||
01641 re_dup|||
01642 re_intuit_start||5.006000|
01643 re_intuit_string||5.006000|
01644 realloc||5.007002|n
01645 reentrant_free|||
01646 reentrant_init|||
01647 reentrant_retry|||vn
01648 reentrant_size|||
01649 ref_array_or_hash|||
01650 refkids|||
01651 refto|||
01652 ref||5.009003|
01653 reg_node|||
01654 reganode|||
01655 regatom|||
01656 regbranch|||
01657 regclass_swash||5.007003|
01658 regclass|||
01659 regcppop|||
01660 regcppush|||
01661 regcurly|||
01662 regdump||5.005000|
01663 regexec_flags||5.005000|
01664 reghop3|||
01665 reghopmaybe3|||
01666 reghopmaybe|||
01667 reghop|||
01668 reginclass|||
01669 reginitcolors||5.006000|
01670 reginsert|||
01671 regmatch|||
01672 regnext||5.005000|
01673 regoptail|||
01674 regpiece|||
01675 regpposixcc|||
01676 regprop|||
01677 regrepeat_hard|||
01678 regrepeat|||
01679 regtail|||
01680 regtry|||
01681 reguni|||
01682 regwhite|||
01683 reg|||
01684 repeatcpy|||
01685 report_evil_fh|||
01686 report_uninit|||
01687 require_errno|||
01688 require_pv||5.006000|
01689 restore_magic|||
01690 rninstr|||
01691 rsignal_restore|||
01692 rsignal_save|||
01693 rsignal_state||5.004000|
01694 rsignal||5.004000|
01695 run_body|||
01696 run_user_filter|||
01697 runops_debug||5.005000|
01698 runops_standard||5.005000|
01699 rvpv_dup|||
01700 rxres_free|||
01701 rxres_restore|||
01702 rxres_save|||
01703 safesyscalloc||5.006000|n
01704 safesysfree||5.006000|n
01705 safesysmalloc||5.006000|n
01706 safesysrealloc||5.006000|n
01707 same_dirent|||
01708 save_I16||5.004000|
01709 save_I32|||
01710 save_I8||5.006000|
01711 save_aelem||5.004050|
01712 save_alloc||5.006000|
01713 save_aptr|||
01714 save_ary|||
01715 save_bool||5.008001|
01716 save_clearsv|||
01717 save_delete|||
01718 save_destructor_x||5.006000|
01719 save_destructor||5.006000|
01720 save_freeop|||
01721 save_freepv|||
01722 save_freesv|||
01723 save_generic_pvref||5.006001|
01724 save_generic_svref||5.005030|
01725 save_gp||5.004000|
01726 save_hash|||
01727 save_hek_flags|||
01728 save_helem||5.004050|
01729 save_hints||5.005000|
01730 save_hptr|||
01731 save_int|||
01732 save_item|||
01733 save_iv||5.005000|
01734 save_lines|||
01735 save_list|||
01736 save_long|||
01737 save_magic|||
01738 save_mortalizesv||5.007001|
01739 save_nogv|||
01740 save_op|||
01741 save_padsv||5.007001|
01742 save_pptr|||
01743 save_re_context||5.006000|
01744 save_scalar_at|||
01745 save_scalar|||
01746 save_set_svflags||5.009000|
01747 save_shared_pvref||5.007003|
01748 save_sptr|||
01749 save_svref|||
01750 save_threadsv||5.005000|
01751 save_vptr||5.006000|
01752 savepvn|||
01753 savepv|||
01754 savesharedpv||5.007003|
01755 savestack_grow_cnt||5.008001|
01756 savestack_grow|||
01757 savesvpv||5.009002|
01758 sawparens|||
01759 scalar_mod_type|||
01760 scalarboolean|||
01761 scalarkids|||
01762 scalarseq|||
01763 scalarvoid|||
01764 scalar|||
01765 scan_bin||5.006000|
01766 scan_commit|||
01767 scan_const|||
01768 scan_formline|||
01769 scan_heredoc|||
01770 scan_hex|||
01771 scan_ident|||
01772 scan_inputsymbol|||
01773 scan_num||5.007001|
01774 scan_oct|||
01775 scan_pat|||
01776 scan_str|||
01777 scan_subst|||
01778 scan_trans|||
01779 scan_version||5.009001|
01780 scan_vstring||5.008001|
01781 scan_word|||
01782 scope|||
01783 screaminstr||5.005000|
01784 seed||5.008001|
01785 sequence_num|||
01786 sequence|||
01787 set_context||5.006000|n
01788 set_csh|||
01789 set_numeric_local||5.006000|
01790 set_numeric_radix||5.006000|
01791 set_numeric_standard||5.006000|
01792 setdefout|||
01793 setenv_getix|||
01794 share_hek_flags|||
01795 share_hek||5.004000|
01796 si_dup|||
01797 sighandler|||n
01798 simplify_sort|||
01799 skipspace|||
01800 sortcv_stacked|||
01801 sortcv_xsub|||
01802 sortcv|||
01803 sortsv_flags||5.009003|
01804 sortsv||5.007003|
01805 ss_dup|||
01806 stack_grow|||
01807 start_glob|||
01808 start_subparse||5.004000|
01809 stashpv_hvname_match||5.009003|
01810 stdize_locale|||
01811 strEQ|||
01812 strGE|||
01813 strGT|||
01814 strLE|||
01815 strLT|||
01816 strNE|||
01817 str_to_version||5.006000|
01818 stringify_regexp|||
01819 strip_return|||
01820 strnEQ|||
01821 strnNE|||
01822 study_chunk|||
01823 sub_crush_depth|||
01824 sublex_done|||
01825 sublex_push|||
01826 sublex_start|||
01827 sv_2bool|||
01828 sv_2cv|||
01829 sv_2io|||
01830 sv_2iuv_non_preserve|||
01831 sv_2iv_flags||5.009001|
01832 sv_2iv|||
01833 sv_2mortal|||
01834 sv_2nv|||
01835 sv_2pv_flags||5.007002|
01836 sv_2pv_nolen|5.006000||p
01837 sv_2pvbyte_nolen|||
01838 sv_2pvbyte|5.006000||p
01839 sv_2pvutf8_nolen||5.006000|
01840 sv_2pvutf8||5.006000|
01841 sv_2pv|||
01842 sv_2uv_flags||5.009001|
01843 sv_2uv|5.004000||p
01844 sv_add_arena|||
01845 sv_add_backref|||
01846 sv_backoff|||
01847 sv_bless|||
01848 sv_cat_decode||5.008001|
01849 sv_catpv_mg|5.006000||p
01850 sv_catpvf_mg_nocontext|||pvn
01851 sv_catpvf_mg|5.006000|5.004000|pv
01852 sv_catpvf_nocontext|||vn
01853 sv_catpvf||5.004000|v
01854 sv_catpvn_flags||5.007002|
01855 sv_catpvn_mg|5.004050||p
01856 sv_catpvn_nomg|5.007002||p
01857 sv_catpvn|||
01858 sv_catpv|||
01859 sv_catsv_flags||5.007002|
01860 sv_catsv_mg|5.004050||p
01861 sv_catsv_nomg|5.007002||p
01862 sv_catsv|||
01863 sv_chop|||
01864 sv_clean_all|||
01865 sv_clean_objs|||
01866 sv_clear|||
01867 sv_cmp_locale||5.004000|
01868 sv_cmp|||
01869 sv_collxfrm|||
01870 sv_compile_2op||5.008001|
01871 sv_copypv||5.007003|
01872 sv_dec|||
01873 sv_del_backref|||
01874 sv_derived_from||5.004000|
01875 sv_dump|||
01876 sv_dup|||
01877 sv_eq|||
01878 sv_exp_grow|||
01879 sv_force_normal_flags||5.007001|
01880 sv_force_normal||5.006000|
01881 sv_free2|||
01882 sv_free_arenas|||
01883 sv_free|||
01884 sv_gets||5.004000|
01885 sv_grow|||
01886 sv_i_ncmp|||
01887 sv_inc|||
01888 sv_insert|||
01889 sv_isa|||
01890 sv_isobject|||
01891 sv_iv||5.005000|
01892 sv_kill_backrefs|||
01893 sv_len_utf8||5.006000|
01894 sv_len|||
01895 sv_magicext||5.007003|
01896 sv_magic|||
01897 sv_mortalcopy|||
01898 sv_ncmp|||
01899 sv_newmortal|||
01900 sv_newref|||
01901 sv_nolocking||5.007003|
01902 sv_nosharing||5.007003|
01903 sv_nounlocking||5.007003|
01904 sv_nv||5.005000|
01905 sv_peek||5.005000|
01906 sv_pos_b2u||5.006000|
01907 sv_pos_u2b||5.006000|
01908 sv_pvbyten_force||5.006000|
01909 sv_pvbyten||5.006000|
01910 sv_pvbyte||5.006000|
01911 sv_pvn_force_flags||5.007002|
01912 sv_pvn_force|||p
01913 sv_pvn_nomg|5.007003||p
01914 sv_pvn|5.006000||p
01915 sv_pvutf8n_force||5.006000|
01916 sv_pvutf8n||5.006000|
01917 sv_pvutf8||5.006000|
01918 sv_pv||5.006000|
01919 sv_recode_to_utf8||5.007003|
01920 sv_reftype|||
01921 sv_release_COW|||
01922 sv_release_IVX|||
01923 sv_replace|||
01924 sv_report_used|||
01925 sv_reset|||
01926 sv_rvweaken||5.006000|
01927 sv_setiv_mg|5.006000||p
01928 sv_setiv|||
01929 sv_setnv_mg|5.006000||p
01930 sv_setnv|||
01931 sv_setpv_mg|5.006000||p
01932 sv_setpvf_mg_nocontext|||pvn
01933 sv_setpvf_mg|5.006000|5.004000|pv
01934 sv_setpvf_nocontext|||vn
01935 sv_setpvf||5.004000|v
01936 sv_setpviv_mg||5.008001|
01937 sv_setpviv||5.008001|
01938 sv_setpvn_mg|5.006000||p
01939 sv_setpvn|||
01940 sv_setpv|||
01941 sv_setref_iv|||
01942 sv_setref_nv|||
01943 sv_setref_pvn|||
01944 sv_setref_pv|||
01945 sv_setref_uv||5.007001|
01946 sv_setsv_cow|||
01947 sv_setsv_flags||5.007002|
01948 sv_setsv_mg|5.006000||p
01949 sv_setsv_nomg|5.007002||p
01950 sv_setsv|||
01951 sv_setuv_mg|5.006000||p
01952 sv_setuv|5.006000||p
01953 sv_tainted||5.004000|
01954 sv_taint||5.004000|
01955 sv_true||5.005000|
01956 sv_unglob|||
01957 sv_uni_display||5.007003|
01958 sv_unmagic|||
01959 sv_unref_flags||5.007001|
01960 sv_unref|||
01961 sv_untaint||5.004000|
01962 sv_upgrade|||
01963 sv_usepvn_mg|5.006000||p
01964 sv_usepvn|||
01965 sv_utf8_decode||5.006000|
01966 sv_utf8_downgrade||5.006000|
01967 sv_utf8_encode||5.006000|
01968 sv_utf8_upgrade_flags||5.007002|
01969 sv_utf8_upgrade||5.007001|
01970 sv_uv|5.006000||p
01971 sv_vcatpvf_mg|5.006000|5.004000|p
01972 sv_vcatpvfn||5.004000|
01973 sv_vcatpvf|5.006000|5.004000|p
01974 sv_vsetpvf_mg|5.006000|5.004000|p
01975 sv_vsetpvfn||5.004000|
01976 sv_vsetpvf|5.006000|5.004000|p
01977 svtype|||
01978 swallow_bom|||
01979 swash_fetch||5.007002|
01980 swash_get|||
01981 swash_init||5.006000|
01982 sys_intern_clear|||
01983 sys_intern_dup|||
01984 sys_intern_init|||
01985 taint_env|||
01986 taint_proper|||
01987 tmps_grow||5.006000|
01988 toLOWER|||
01989 toUPPER|||
01990 to_byte_substr|||
01991 to_uni_fold||5.007003|
01992 to_uni_lower_lc||5.006000|
01993 to_uni_lower||5.007003|
01994 to_uni_title_lc||5.006000|
01995 to_uni_title||5.007003|
01996 to_uni_upper_lc||5.006000|
01997 to_uni_upper||5.007003|
01998 to_utf8_case||5.007003|
01999 to_utf8_fold||5.007003|
02000 to_utf8_lower||5.007003|
02001 to_utf8_substr|||
02002 to_utf8_title||5.007003|
02003 to_utf8_upper||5.007003|
02004 tokenize_use|||
02005 tokeq|||
02006 tokereport|||
02007 too_few_arguments|||
02008 too_many_arguments|||
02009 uiv_2buf|||n
02010 unlnk|||
02011 unpack_rec|||
02012 unpack_str||5.007003|
02013 unpackstring||5.008001|
02014 unshare_hek_or_pvn|||
02015 unshare_hek|||
02016 unsharepvn||5.004000|
02017 unwind_handler_stack|||
02018 upg_version||5.009000|
02019 usage|||
02020 utf16_to_utf8_reversed||5.006001|
02021 utf16_to_utf8||5.006001|
02022 utf8_distance||5.006000|
02023 utf8_hop||5.006000|
02024 utf8_length||5.007001|
02025 utf8_mg_pos_init|||
02026 utf8_mg_pos|||
02027 utf8_to_bytes||5.006001|
02028 utf8_to_uvchr||5.007001|
02029 utf8_to_uvuni||5.007001|
02030 utf8n_to_uvchr|||
02031 utf8n_to_uvuni||5.007001|
02032 utilize|||
02033 uvchr_to_utf8_flags||5.007003|
02034 uvchr_to_utf8|||
02035 uvuni_to_utf8_flags||5.007003|
02036 uvuni_to_utf8||5.007001|
02037 validate_suid|||
02038 varname|||
02039 vcmp||5.009000|
02040 vcroak||5.006000|
02041 vdeb||5.007003|
02042 vdie_common|||
02043 vdie_croak_common|||
02044 vdie|||
02045 vform||5.006000|
02046 visit|||
02047 vivify_defelem|||
02048 vivify_ref|||
02049 vload_module||5.006000|
02050 vmess||5.006000|
02051 vnewSVpvf|5.006000|5.004000|p
02052 vnormal||5.009002|
02053 vnumify||5.009000|
02054 vstringify||5.009000|
02055 vverify||5.009003|
02056 vwarner||5.006000|
02057 vwarn||5.006000|
02058 wait4pid|||
02059 warn_nocontext|||vn
02060 warner_nocontext|||vn
02061 warner||5.006000|v
02062 warn|||v
02063 watch|||
02064 whichsig|||
02065 write_no_mem|||
02066 write_to_stderr|||
02067 yyerror|||
02068 yylex|||
02069 yyparse|||
02070 yywarn|||
02071 );
02072 
02073 if (exists $opt{'list-unsupported'}) {
02074   my $f;
02075   for $f (sort { lc $a cmp lc $b } keys %API) {
02076     next unless $API{$f}{todo};
02077     print "$f ", '.'x(40-length($f)), " ", format_version($API{$f}{todo}), "\n";
02078   }
02079   exit 0;
02080 }
02081 
02082 # Scan for possible replacement candidates
02083 
02084 my(%replace, %need, %hints, %depends);
02085 my $replace = 0;
02086 my $hint = '';
02087 
02088 while (<DATA>) {
02089   if ($hint) {
02090     if (m{^\s*\*\s(.*?)\s*$}) {
02091       $hints{$hint} ||= '';  # suppress warning with older perls
02092       $hints{$hint} .= "$1\n";
02093     }
02094     else {
02095       $hint = '';
02096     }
02097   }
02098   $hint = $1 if m{^\s*$rccs\sHint:\s+(\w+)\s*$};
02099 
02100   $replace     = $1 if m{^\s*$rccs\s+Replace:\s+(\d+)\s+$rcce\s*$};
02101   $replace{$2} = $1 if $replace and m{^\s*#\s*define\s+(\w+)(?:\([^)]*\))?\s+(\w+)};
02102   $replace{$2} = $1 if m{^\s*#\s*define\s+(\w+)(?:\([^)]*\))?\s+(\w+).*$rccs\s+Replace\s+$rcce};
02103   $replace{$1} = $2 if m{^\s*$rccs\s+Replace (\w+) with (\w+)\s+$rcce\s*$};
02104 
02105   if (m{^\s*$rccs\s+(\w+)\s+depends\s+on\s+(\w+(\s*,\s*\w+)*)\s+$rcce\s*$}) {
02106     push @{$depends{$1}}, map { s/\s+//g; $_ } split /,/, $2;
02107   }
02108 
02109   $need{$1} = 1 if m{^#if\s+defined\(NEED_(\w+)(?:_GLOBAL)?\)};
02110 }
02111 
02112 if (exists $opt{'api-info'}) {
02113   my $f;
02114   my $count = 0;
02115   my $match = $opt{'api-info'} =~ m!^/(.*)/$! ? $1 : "^\Q$opt{'api-info'}\E\$";
02116   for $f (sort { lc $a cmp lc $b } keys %API) {
02117     next unless $f =~ /$match/;
02118     print "\n=== $f ===\n\n";
02119     my $info = 0;
02120     if ($API{$f}{base} || $API{$f}{todo}) {
02121       my $base = format_version($API{$f}{base} || $API{$f}{todo});
02122       print "Supported at least starting from perl-$base.\n";
02123       $info++;
02124     }
02125     if ($API{$f}{provided}) {
02126       my $todo = $API{$f}{todo} ? format_version($API{$f}{todo}) : "5.003";
02127       print "Support by $ppport provided back to perl-$todo.\n";
02128       print "Support needs to be explicitly requested by NEED_$f.\n" if exists $need{$f};
02129       print "Depends on: ", join(', ', @{$depends{$f}}), ".\n" if exists $depends{$f};
02130       print "$hints{$f}" if exists $hints{$f};
02131       $info++;
02132     }
02133     unless ($info) {
02134       print "No portability information available.\n";
02135     }
02136     $count++;
02137   }
02138   if ($count > 0) {
02139     print "\n";
02140   }
02141   else {
02142     print "Found no API matching '$opt{'api-info'}'.\n";
02143   }
02144   exit 0;
02145 }
02146 
02147 if (exists $opt{'list-provided'}) {
02148   my $f;
02149   for $f (sort { lc $a cmp lc $b } keys %API) {
02150     next unless $API{$f}{provided};
02151     my @flags;
02152     push @flags, 'explicit' if exists $need{$f};
02153     push @flags, 'depend'   if exists $depends{$f};
02154     push @flags, 'hint'     if exists $hints{$f};
02155     my $flags = @flags ? '  ['.join(', ', @flags).']' : '';
02156     print "$f$flags\n";
02157   }
02158   exit 0;
02159 }
02160 
02161 my @files;
02162 my @srcext = qw( xs c h cc cpp );
02163 my $srcext = join '|', @srcext;
02164 
02165 if (@ARGV) {
02166   my %seen;
02167   @files = grep { -f && !exists $seen{$_} } map { glob $_ } @ARGV;
02168 }
02169 else {
02170   eval {
02171     require File::Find;
02172     File::Find::find(sub {
02173       $File::Find::name =~ /\.($srcext)$/i
02174           and push @files, $File::Find::name;
02175     }, '.');
02176   };
02177   if ($@) {
02178     @files = map { glob "*.$_" } @srcext;
02179   }
02180 }
02181 
02182 if (!@ARGV || $opt{filter}) {
02183   my(@in, @out);
02184   my %xsc = map { /(.*)\.xs$/ ? ("$1.c" => 1, "$1.cc" => 1) : () } @files;
02185   for (@files) {
02186     my $out = exists $xsc{$_} || /\b\Q$ppport\E$/i || !/\.($srcext)$/i;
02187     push @{ $out ? \@out : \@in }, $_;
02188   }
02189   if (@ARGV && @out) {
02190     warning("Skipping the following files (use --nofilter to avoid this):\n| ", join "\n| ", @out);
02191   }
02192   @files = @in;
02193 }
02194 
02195 unless (@files) {
02196   die "No input files given!\n";
02197 }
02198 
02199 my(%files, %global, %revreplace);
02200 %revreplace = reverse %replace;
02201 my $filename;
02202 my $patch_opened = 0;
02203 
02204 for $filename (@files) {
02205   unless (open IN, "<$filename") {
02206     warn "Unable to read from $filename: $!\n";
02207     next;
02208   }
02209 
02210   info("Scanning $filename ...");
02211 
02212   my $c = do { local $/; <IN> };
02213   close IN;
02214 
02215   my %file = (orig => $c, changes => 0);
02216 
02217   # temporarily remove C comments from the code
02218   my @ccom;
02219   $c =~ s{
02220     (
02221         [^"'/]+
02222       |
02223         (?:"[^"\\]*(?:\\.[^"\\]*)*" [^"'/]*)+
02224       |
02225         (?:'[^'\\]*(?:\\.[^'\\]*)*' [^"'/]*)+
02226     )
02227   |
02228     (/ (?:
02229         \*[^*]*\*+(?:[^$ccs][^*]*\*+)* /
02230         |
02231         /[^\r\n]*
02232       ))
02233   }{
02234     defined $2 and push @ccom, $2;
02235     defined $1 ? $1 : "$ccs$#ccom$cce";
02236   }egsx;
02237 
02238   $file{ccom} = \@ccom;
02239   $file{code} = $c;
02240   $file{has_inc_ppport} = ($c =~ /#.*include.*\Q$ppport\E/);
02241 
02242   my $func;
02243 
02244   for $func (keys %API) {
02245     my $match = $func;
02246     $match .= "|$revreplace{$func}" if exists $revreplace{$func};
02247     if ($c =~ /\b(?:Perl_)?($match)\b/) {
02248       $file{uses_replace}{$1}++ if exists $revreplace{$func} && $1 eq $revreplace{$func};
02249       $file{uses_Perl}{$func}++ if $c =~ /\bPerl_$func\b/;
02250       if (exists $API{$func}{provided}) {
02251         if (!exists $API{$func}{base} || $API{$func}{base} > $opt{'compat-version'}) {
02252           $file{uses}{$func}++;
02253           my @deps = rec_depend($func);
02254           if (@deps) {
02255             $file{uses_deps}{$func} = \@deps;
02256             for (@deps) {
02257               $file{uses}{$_} = 0 unless exists $file{uses}{$_};
02258             }
02259           }
02260           for ($func, @deps) {
02261             if (exists $need{$_}) {
02262               $file{needs}{$_} = 'static';
02263             }
02264           }
02265         }
02266       }
02267       if (exists $API{$func}{todo} && $API{$func}{todo} > $opt{'compat-version'}) {
02268         if ($c =~ /\b$func\b/) {
02269           $file{uses_todo}{$func}++;
02270         }
02271       }
02272     }
02273   }
02274 
02275   while ($c =~ /^$HS*#$HS*define$HS+(NEED_(\w+?)(_GLOBAL)?)\b/mg) {
02276     if (exists $need{$2}) {
02277       $file{defined $3 ? 'needed_global' : 'needed_static'}{$2}++;
02278     }
02279     else {
02280       warning("Possibly wrong #define $1 in $filename");
02281     }
02282   }
02283 
02284   for (qw(uses needs uses_todo needed_global needed_static)) {
02285     for $func (keys %{$file{$_}}) {
02286       push @{$global{$_}{$func}}, $filename;
02287     }
02288   }
02289 
02290   $files{$filename} = \%file;
02291 }
02292 
02293 # Globally resolve NEED_'s
02294 my $need;
02295 for $need (keys %{$global{needs}}) {
02296   if (@{$global{needs}{$need}} > 1) {
02297     my @targets = @{$global{needs}{$need}};
02298     my @t = grep $files{$_}{needed_global}{$need}, @targets;
02299     @targets = @t if @t;
02300     @t = grep /\.xs$/i, @targets;
02301     @targets = @t if @t;
02302     my $target = shift @targets;
02303     $files{$target}{needs}{$need} = 'global';
02304     for (@{$global{needs}{$need}}) {
02305       $files{$_}{needs}{$need} = 'extern' if $_ ne $target;
02306     }
02307   }
02308 }
02309 
02310 for $filename (@files) {
02311   exists $files{$filename} or next;
02312 
02313   info("=== Analyzing $filename ===");
02314 
02315   my %file = %{$files{$filename}};
02316   my $func;
02317   my $c = $file{code};
02318 
02319   for $func (sort keys %{$file{uses_Perl}}) {
02320     if ($API{$func}{varargs}) {
02321       my $changes = ($c =~ s{\b(Perl_$func\s*\(\s*)(?!aTHX_?)(\)|[^\s)]*\))}
02322                             { $1 . ($2 eq ')' ? 'aTHX' : 'aTHX_ ') . $2 }ge);
02323       if ($changes) {
02324         warning("Doesn't pass interpreter argument aTHX to Perl_$func");
02325         $file{changes} += $changes;
02326       }
02327     }
02328     else {
02329       warning("Uses Perl_$func instead of $func");
02330       $file{changes} += ($c =~ s{\bPerl_$func(\s*)\((\s*aTHX_?)?\s*}
02331                                 {$func$1(}g);
02332     }
02333   }
02334 
02335   for $func (sort keys %{$file{uses_replace}}) {
02336     warning("Uses $func instead of $replace{$func}");
02337     $file{changes} += ($c =~ s/\b$func\b/$replace{$func}/g);
02338   }
02339 
02340   for $func (sort keys %{$file{uses}}) {
02341     next unless $file{uses}{$func};   # if it's only a dependency
02342     if (exists $file{uses_deps}{$func}) {
02343       diag("Uses $func, which depends on ", join(', ', @{$file{uses_deps}{$func}}));
02344     }
02345     elsif (exists $replace{$func}) {
02346       warning("Uses $func instead of $replace{$func}");
02347       $file{changes} += ($c =~ s/\b$func\b/$replace{$func}/g);
02348     }
02349     else {
02350       diag("Uses $func");
02351     }
02352     hint($func);
02353   }
02354 
02355   for $func (sort keys %{$file{uses_todo}}) {
02356     warning("Uses $func, which may not be portable below perl ",
02357             format_version($API{$func}{todo}));
02358   }
02359 
02360   for $func (sort keys %{$file{needed_static}}) {
02361     my $message = '';
02362     if (not exists $file{uses}{$func}) {
02363       $message = "No need to define NEED_$func if $func is never used";
02364     }
02365     elsif (exists $file{needs}{$func} && $file{needs}{$func} ne 'static') {
02366       $message = "No need to define NEED_$func when already needed globally";
02367     }
02368     if ($message) {
02369       diag($message);
02370       $file{changes} += ($c =~ s/^$HS*#$HS*define$HS+NEED_$func\b.*$LF//mg);
02371     }
02372   }
02373 
02374   for $func (sort keys %{$file{needed_global}}) {
02375     my $message = '';
02376     if (not exists $global{uses}{$func}) {
02377       $message = "No need to define NEED_${func}_GLOBAL if $func is never used";
02378     }
02379     elsif (exists $file{needs}{$func}) {
02380       if ($file{needs}{$func} eq 'extern') {
02381         $message = "No need to define NEED_${func}_GLOBAL when already needed globally";
02382       }
02383       elsif ($file{needs}{$func} eq 'static') {
02384         $message = "No need to define NEED_${func}_GLOBAL when only used in this file";
02385       }
02386     }
02387     if ($message) {
02388       diag($message);
02389       $file{changes} += ($c =~ s/^$HS*#$HS*define$HS+NEED_${func}_GLOBAL\b.*$LF//mg);
02390     }
02391   }
02392 
02393   $file{needs_inc_ppport} = keys %{$file{uses}};
02394 
02395   if ($file{needs_inc_ppport}) {
02396     my $pp = '';
02397 
02398     for $func (sort keys %{$file{needs}}) {
02399       my $type = $file{needs}{$func};
02400       next if $type eq 'extern';
02401       my $suffix = $type eq 'global' ? '_GLOBAL' : '';
02402       unless (exists $file{"needed_$type"}{$func}) {
02403         if ($type eq 'global') {
02404           diag("Files [@{$global{needs}{$func}}] need $func, adding global request");
02405         }
02406         else {
02407           diag("File needs $func, adding static request");
02408         }
02409         $pp .= "#define NEED_$func$suffix\n";
02410       }
02411     }
02412 
02413     if ($pp && ($c =~ s/^(?=$HS*#$HS*define$HS+NEED_\w+)/$pp/m)) {
02414       $pp = '';
02415       $file{changes}++;
02416     }
02417 
02418     unless ($file{has_inc_ppport}) {
02419       diag("Needs to include '$ppport'");
02420       $pp .= qq(#include "$ppport"\n)
02421     }
02422 
02423     if ($pp) {
02424       $file{changes} += ($c =~ s/^($HS*#$HS*define$HS+NEED_\w+.*?)^/$1$pp/ms)
02425                      || ($c =~ s/^(?=$HS*#$HS*include.*\Q$ppport\E)/$pp/m)
02426                      || ($c =~ s/^($HS*#$HS*include.*XSUB.*\s*?)^/$1$pp/m)
02427                      || ($c =~ s/^/$pp/);
02428     }
02429   }
02430   else {
02431     if ($file{has_inc_ppport}) {
02432       diag("No need to include '$ppport'");
02433       $file{changes} += ($c =~ s/^$HS*?#$HS*include.*\Q$ppport\E.*?$LF//m);
02434     }
02435   }
02436 
02437   # put back in our C comments
02438   my $ix;
02439   my $cppc = 0;
02440   my @ccom = @{$file{ccom}};
02441   for $ix (0 .. $#ccom) {
02442     if (!$opt{cplusplus} && $ccom[$ix] =~ s!^//!!) {
02443       $cppc++;
02444       $file{changes} += $c =~ s/$rccs$ix$rcce/$ccs$ccom[$ix] $cce/;
02445     }
02446     else {
02447       $c =~ s/$rccs$ix$rcce/$ccom[$ix]/;
02448     }
02449   }
02450 
02451   if ($cppc) {
02452     my $s = $cppc != 1 ? 's' : '';
02453     warning("Uses $cppc C++ style comment$s, which is not portable");
02454   }
02455 
02456   if ($file{changes}) {
02457     if (exists $opt{copy}) {
02458       my $newfile = "$filename$opt{copy}";
02459       if (-e $newfile) {
02460         error("'$newfile' already exists, refusing to write copy of '$filename'");
02461       }
02462       else {
02463         local *F;
02464         if (open F, ">$newfile") {
02465           info("Writing copy of '$filename' with changes to '$newfile'");
02466           print F $c;
02467           close F;
02468         }
02469         else {
02470           error("Cannot open '$newfile' for writing: $!");
02471         }
02472       }
02473     }
02474     elsif (exists $opt{patch} || $opt{changes}) {
02475       if (exists $opt{patch}) {
02476         unless ($patch_opened) {
02477           if (open PATCH, ">$opt{patch}") {
02478             $patch_opened = 1;
02479           }
02480           else {
02481             error("Cannot open '$opt{patch}' for writing: $!");
02482             delete $opt{patch};
02483             $opt{changes} = 1;
02484             goto fallback;
02485           }
02486         }
02487         mydiff(\*PATCH, $filename, $c);
02488       }
02489       else {
02490 fallback:
02491         info("Suggested changes:");
02492         mydiff(\*STDOUT, $filename, $c);
02493       }
02494     }
02495     else {
02496       my $s = $file{changes} == 1 ? '' : 's';
02497       info("$file{changes} potentially required change$s detected");
02498     }
02499   }
02500   else {
02501     info("Looks good");
02502   }
02503 }
02504 
02505 close PATCH if $patch_opened;
02506 
02507 exit 0;
02508 
02509 
02510 sub mydiff
02511 {
02512   local *F = shift;
02513   my($file, $str) = @_;
02514   my $diff;
02515 
02516   if (exists $opt{diff}) {
02517     $diff = run_diff($opt{diff}, $file, $str);
02518   }
02519 
02520   if (!defined $diff and can_use('Text::Diff')) {
02521     $diff = Text::Diff::diff($file, \$str, { STYLE => 'Unified' });
02522     $diff = <<HEADER . $diff;
02523 --- $file
02524 +++ $file.patched
02525 HEADER
02526   }
02527 
02528   if (!defined $diff) {
02529     $diff = run_diff('diff -u', $file, $str);
02530   }
02531 
02532   if (!defined $diff) {
02533     $diff = run_diff('diff', $file, $str);
02534   }
02535 
02536   if (!defined $diff) {
02537     error("Cannot generate a diff. Please install Text::Diff or use --copy.");
02538     return;
02539   }
02540 
02541   print F $diff;
02542 
02543 }
02544 
02545 sub run_diff
02546 {
02547   my($prog, $file, $str) = @_;
02548   my $tmp = 'dppptemp';
02549   my $suf = 'aaa';
02550   my $diff = '';
02551   local *F;
02552 
02553   while (-e "$tmp.$suf") { $suf++ }
02554   $tmp = "$tmp.$suf";
02555 
02556   if (open F, ">$tmp") {
02557     print F $str;
02558     close F;
02559 
02560     if (open F, "$prog $file $tmp |") {
02561       while (<F>) {
02562         s/\Q$tmp\E/$file.patched/;
02563         $diff .= $_;
02564       }
02565       close F;
02566       unlink $tmp;
02567       return $diff;
02568     }
02569 
02570     unlink $tmp;
02571   }
02572   else {
02573     error("Cannot open '$tmp' for writing: $!");
02574   }
02575 
02576   return undef;
02577 }
02578 
02579 sub can_use
02580 {
02581   eval "use @_;";
02582   return $@ eq '';
02583 }
02584 
02585 sub rec_depend
02586 {
02587   my $func = shift;
02588   my %seen;
02589   return () unless exists $depends{$func};
02590   grep !$seen{$_}++, map { ($_, rec_depend($_)) } @{$depends{$func}};
02591 }
02592 
02593 sub parse_version
02594 {
02595   my $ver = shift;
02596 
02597   if ($ver =~ /^(\d+)\.(\d+)\.(\d+)$/) {
02598     return ($1, $2, $3);
02599   }
02600   elsif ($ver !~ /^\d+\.[\d_]+$/) {
02601     die "cannot parse version '$ver'\n";
02602   }
02603 
02604   $ver =~ s/_//g;
02605   $ver =~ s/$/000000/;
02606 
02607   my($r,$v,$s) = $ver =~ /(\d+)\.(\d{3})(\d{3})/;
02608 
02609   $v = int $v;
02610   $s = int $s;
02611 
02612   if ($r < 5 || ($r == 5 && $v < 6)) {
02613     if ($s % 10) {
02614       die "cannot parse version '$ver'\n";
02615     }
02616   }
02617 
02618   return ($r, $v, $s);
02619 }
02620 
02621 sub format_version
02622 {
02623   my $ver = shift;
02624 
02625   $ver =~ s/$/000000/;
02626   my($r,$v,$s) = $ver =~ /(\d+)\.(\d{3})(\d{3})/;
02627 
02628   $v = int $v;
02629   $s = int $s;
02630 
02631   if ($r < 5 || ($r == 5 && $v < 6)) {
02632     if ($s % 10) {
02633       die "invalid version '$ver'\n";
02634     }
02635     $s /= 10;
02636 
02637     $ver = sprintf "%d.%03d", $r, $v;
02638     $s > 0 and $ver .= sprintf "_%02d", $s;
02639 
02640     return $ver;
02641   }
02642 
02643   return sprintf "%d.%d.%d", $r, $v, $s;
02644 }
02645 
02646 sub info
02647 {
02648   $opt{quiet} and return;
02649   print @_, "\n";
02650 }
02651 
02652 sub diag
02653 {
02654   $opt{quiet} and return;
02655   $opt{diag} and print @_, "\n";
02656 }
02657 
02658 sub warning
02659 {
02660   $opt{quiet} and return;
02661   print "*** ", @_, "\n";
02662 }
02663 
02664 sub error
02665 {
02666   print "*** ERROR: ", @_, "\n";
02667 }
02668 
02669 my %given_hints;
02670 sub hint
02671 {
02672   $opt{quiet} and return;
02673   $opt{hints} or return;
02674   my $func = shift;
02675   exists $hints{$func} or return;
02676   $given_hints{$func}++ and return;
02677   my $hint = $hints{$func};
02678   $hint =~ s/^/   /mg;
02679   print "   --- hint for $func ---\n", $hint;
02680 }
02681 
02682 sub usage
02683 {
02684   my($usage) = do { local(@ARGV,$/)=($0); <> } =~ /^=head\d$HS+SYNOPSIS\s*^(.*?)\s*^=/ms;
02685   my %M = ( 'I' => '*' );
02686   $usage =~ s/^\s*perl\s+\S+/$^X $0/;
02687   $usage =~ s/([A-Z])<([^>]+)>/$M{$1}$2$M{$1}/g;
02688 
02689   print <<ENDUSAGE;
02690 
02691 Usage: $usage
02692 
02693 See perldoc $0 for details.
02694 
02695 ENDUSAGE
02696 
02697   exit 2;
02698 }
02699 
02700 sub strip
02701 {
02702   my $self = do { local(@ARGV,$/)=($0); <> };
02703   $self =~ s/^$HS+Do NOT edit.*?(?=^-)//ms;
02704   $self =~ s/^SKIP.*(?=^__DATA__)/SKIP
02705 if (\@ARGV && \$ARGV[0] eq '--unstrip') {
02706   eval { require Devel::PPPort };
02707   \$@ and die "Cannot require Devel::PPPort, please install.\\n";
02708   Devel::PPPort::WriteFile(\$0);
02709   exit 0;
02710 }
02711 print <<END;
02712 
02713 Sorry, but this is a stripped version of \$0.
02714 
02715 To be able to use its original script and doc functionality,
02716 please try to regenerate this file using:
02717 
02718   \$^X \$0 --unstrip
02719 
02720 END
02721 /ms;
02722 
02723   open OUT, ">$0" or die "cannot strip $0: $!\n";
02724   print OUT $self;
02725 
02726   exit 0;
02727 }
02728 
02729 __DATA__
02730 */
02731 
02732 #ifndef _P_P_PORTABILITY_H_
02733 #define _P_P_PORTABILITY_H_
02734 
02735 #ifndef DPPP_NAMESPACE
02736 #  define DPPP_NAMESPACE DPPP_
02737 #endif
02738 
02739 #define DPPP_CAT2(x,y) CAT2(x,y)
02740 #define DPPP_(name) DPPP_CAT2(DPPP_NAMESPACE, name)
02741 
02742 #ifndef PERL_REVISION
02743 #  if !defined(__PATCHLEVEL_H_INCLUDED__) && !(defined(PATCHLEVEL) && defined(SUBVERSION))
02744 #    define PERL_PATCHLEVEL_H_IMPLICIT
02745 #    include <patchlevel.h>
02746 #  endif
02747 #  if !(defined(PERL_VERSION) || (defined(SUBVERSION) && defined(PATCHLEVEL)))
02748 #    include <could_not_find_Perl_patchlevel.h>
02749 #  endif
02750 #  ifndef PERL_REVISION
02751 #    define PERL_REVISION       (5)
02752      /* Replace: 1 */
02753 #    define PERL_VERSION        PATCHLEVEL
02754 #    define PERL_SUBVERSION     SUBVERSION
02755      /* Replace PERL_PATCHLEVEL with PERL_VERSION */
02756      /* Replace: 0 */
02757 #  endif
02758 #endif
02759 
02760 #define PERL_BCDVERSION ((PERL_REVISION * 0x1000000L) + (PERL_VERSION * 0x1000L) + PERL_SUBVERSION)
02761 
02762 /* It is very unlikely that anyone will try to use this with Perl 6
02763    (or greater), but who knows.
02764  */
02765 #if PERL_REVISION != 5
02766 #  error ppport.h only works with Perl version 5
02767 #endif /* PERL_REVISION != 5 */
02768 
02769 #ifdef I_LIMITS
02770 #  include <limits.h>
02771 #endif
02772 
02773 #ifndef PERL_UCHAR_MIN
02774 #  define PERL_UCHAR_MIN ((unsigned char)0)
02775 #endif
02776 
02777 #ifndef PERL_UCHAR_MAX
02778 #  ifdef UCHAR_MAX
02779 #    define PERL_UCHAR_MAX ((unsigned char)UCHAR_MAX)
02780 #  else
02781 #    ifdef MAXUCHAR
02782 #      define PERL_UCHAR_MAX ((unsigned char)MAXUCHAR)
02783 #    else
02784 #      define PERL_UCHAR_MAX ((unsigned char)~(unsigned)0)
02785 #    endif
02786 #  endif
02787 #endif
02788 
02789 #ifndef PERL_USHORT_MIN
02790 #  define PERL_USHORT_MIN ((unsigned short)0)
02791 #endif
02792 
02793 #ifndef PERL_USHORT_MAX
02794 #  ifdef USHORT_MAX
02795 #    define PERL_USHORT_MAX ((unsigned short)USHORT_MAX)
02796 #  else
02797 #    ifdef MAXUSHORT
02798 #      define PERL_USHORT_MAX ((unsigned short)MAXUSHORT)
02799 #    else
02800 #      ifdef USHRT_MAX
02801 #        define PERL_USHORT_MAX ((unsigned short)USHRT_MAX)
02802 #      else
02803 #        define PERL_USHORT_MAX ((unsigned short)~(unsigned)0)
02804 #      endif
02805 #    endif
02806 #  endif
02807 #endif
02808 
02809 #ifndef PERL_SHORT_MAX
02810 #  ifdef SHORT_MAX
02811 #    define PERL_SHORT_MAX ((short)SHORT_MAX)
02812 #  else
02813 #    ifdef MAXSHORT    /* Often used in <values.h> */
02814 #      define PERL_SHORT_MAX ((short)MAXSHORT)
02815 #    else
02816 #      ifdef SHRT_MAX
02817 #        define PERL_SHORT_MAX ((short)SHRT_MAX)
02818 #      else
02819 #        define PERL_SHORT_MAX ((short) (PERL_USHORT_MAX >> 1))
02820 #      endif
02821 #    endif
02822 #  endif
02823 #endif
02824 
02825 #ifndef PERL_SHORT_MIN
02826 #  ifdef SHORT_MIN
02827 #    define PERL_SHORT_MIN ((short)SHORT_MIN)
02828 #  else
02829 #    ifdef MINSHORT
02830 #      define PERL_SHORT_MIN ((short)MINSHORT)
02831 #    else
02832 #      ifdef SHRT_MIN
02833 #        define PERL_SHORT_MIN ((short)SHRT_MIN)
02834 #      else
02835 #        define PERL_SHORT_MIN (-PERL_SHORT_MAX - ((3 & -1) == 3))
02836 #      endif
02837 #    endif
02838 #  endif
02839 #endif
02840 
02841 #ifndef PERL_UINT_MAX
02842 #  ifdef UINT_MAX
02843 #    define PERL_UINT_MAX ((unsigned int)UINT_MAX)
02844 #  else
02845 #    ifdef MAXUINT
02846 #      define PERL_UINT_MAX ((unsigned int)MAXUINT)
02847 #    else
02848 #      define PERL_UINT_MAX (~(unsigned int)0)
02849 #    endif
02850 #  endif
02851 #endif
02852 
02853 #ifndef PERL_UINT_MIN
02854 #  define PERL_UINT_MIN ((unsigned int)0)
02855 #endif
02856 
02857 #ifndef PERL_INT_MAX
02858 #  ifdef INT_MAX
02859 #    define PERL_INT_MAX ((int)INT_MAX)
02860 #  else
02861 #    ifdef MAXINT    /* Often used in <values.h> */
02862 #      define PERL_INT_MAX ((int)MAXINT)
02863 #    else
02864 #      define PERL_INT_MAX ((int)(PERL_UINT_MAX >> 1))
02865 #    endif
02866 #  endif
02867 #endif
02868 
02869 #ifndef PERL_INT_MIN
02870 #  ifdef INT_MIN
02871 #    define PERL_INT_MIN ((int)INT_MIN)
02872 #  else
02873 #    ifdef MININT
02874 #      define PERL_INT_MIN ((int)MININT)
02875 #    else
02876 #      define PERL_INT_MIN (-PERL_INT_MAX - ((3 & -1) == 3))
02877 #    endif
02878 #  endif
02879 #endif
02880 
02881 #ifndef PERL_ULONG_MAX
02882 #  ifdef ULONG_MAX
02883 #    define PERL_ULONG_MAX ((unsigned long)ULONG_MAX)
02884 #  else
02885 #    ifdef MAXULONG
02886 #      define PERL_ULONG_MAX ((unsigned long)MAXULONG)
02887 #    else
02888 #      define PERL_ULONG_MAX (~(unsigned long)0)
02889 #    endif
02890 #  endif
02891 #endif
02892 
02893 #ifndef PERL_ULONG_MIN
02894 #  define PERL_ULONG_MIN ((unsigned long)0L)
02895 #endif
02896 
02897 #ifndef PERL_LONG_MAX
02898 #  ifdef LONG_MAX
02899 #    define PERL_LONG_MAX ((long)LONG_MAX)
02900 #  else
02901 #    ifdef MAXLONG
02902 #      define PERL_LONG_MAX ((long)MAXLONG)
02903 #    else
02904 #      define PERL_LONG_MAX ((long) (PERL_ULONG_MAX >> 1))
02905 #    endif
02906 #  endif
02907 #endif
02908 
02909 #ifndef PERL_LONG_MIN
02910 #  ifdef LONG_MIN
02911 #    define PERL_LONG_MIN ((long)LONG_MIN)
02912 #  else
02913 #    ifdef MINLONG
02914 #      define PERL_LONG_MIN ((long)MINLONG)
02915 #    else
02916 #      define PERL_LONG_MIN (-PERL_LONG_MAX - ((3 & -1) == 3))
02917 #    endif
02918 #  endif
02919 #endif
02920 
02921 #if defined(HAS_QUAD) && (defined(convex) || defined(uts))
02922 #  ifndef PERL_UQUAD_MAX
02923 #    ifdef ULONGLONG_MAX
02924 #      define PERL_UQUAD_MAX ((unsigned long long)ULONGLONG_MAX)
02925 #    else
02926 #      ifdef MAXULONGLONG
02927 #        define PERL_UQUAD_MAX ((unsigned long long)MAXULONGLONG)
02928 #      else
02929 #        define PERL_UQUAD_MAX (~(unsigned long long)0)
02930 #      endif
02931 #    endif
02932 #  endif
02933 
02934 #  ifndef PERL_UQUAD_MIN
02935 #    define PERL_UQUAD_MIN ((unsigned long long)0L)
02936 #  endif
02937 
02938 #  ifndef PERL_QUAD_MAX
02939 #    ifdef LONGLONG_MAX
02940 #      define PERL_QUAD_MAX ((long long)LONGLONG_MAX)
02941 #    else
02942 #      ifdef MAXLONGLONG
02943 #        define PERL_QUAD_MAX ((long long)MAXLONGLONG)
02944 #      else
02945 #        define PERL_QUAD_MAX ((long long) (PERL_UQUAD_MAX >> 1))
02946 #      endif
02947 #    endif
02948 #  endif
02949 
02950 #  ifndef PERL_QUAD_MIN
02951 #    ifdef LONGLONG_MIN
02952 #      define PERL_QUAD_MIN ((long long)LONGLONG_MIN)
02953 #    else
02954 #      ifdef MINLONGLONG
02955 #        define PERL_QUAD_MIN ((long long)MINLONGLONG)
02956 #      else
02957 #        define PERL_QUAD_MIN (-PERL_QUAD_MAX - ((3 & -1) == 3))
02958 #      endif
02959 #    endif
02960 #  endif
02961 #endif
02962 
02963 /* This is based on code from 5.003 perl.h */
02964 #ifdef HAS_QUAD
02965 #  ifdef cray
02966 #ifndef IVTYPE
02967 #  define IVTYPE                         int
02968 #endif
02969 
02970 #ifndef IV_MIN
02971 #  define IV_MIN                         PERL_INT_MIN
02972 #endif
02973 
02974 #ifndef IV_MAX
02975 #  define IV_MAX                         PERL_INT_MAX
02976 #endif
02977 
02978 #ifndef UV_MIN
02979 #  define UV_MIN                         PERL_UINT_MIN
02980 #endif
02981 
02982 #ifndef UV_MAX
02983 #  define UV_MAX                         PERL_UINT_MAX
02984 #endif
02985 
02986 #    ifdef INTSIZE
02987 #ifndef IVSIZE
02988 #  define IVSIZE                         INTSIZE
02989 #endif
02990 
02991 #    endif
02992 #  else
02993 #    if defined(convex) || defined(uts)
02994 #ifndef IVTYPE
02995 #  define IVTYPE                         long long
02996 #endif
02997 
02998 #ifndef IV_MIN
02999 #  define IV_MIN                         PERL_QUAD_MIN
03000 #endif
03001 
03002 #ifndef IV_MAX
03003 #  define IV_MAX                         PERL_QUAD_MAX
03004 #endif
03005 
03006 #ifndef UV_MIN
03007 #  define UV_MIN                         PERL_UQUAD_MIN
03008 #endif
03009 
03010 #ifndef UV_MAX
03011 #  define UV_MAX                         PERL_UQUAD_MAX
03012 #endif
03013 
03014 #      ifdef LONGLONGSIZE
03015 #ifndef IVSIZE
03016 #  define IVSIZE                         LONGLONGSIZE
03017 #endif
03018 
03019 #      endif
03020 #    else
03021 #ifndef IVTYPE
03022 #  define IVTYPE                         long
03023 #endif
03024 
03025 #ifndef IV_MIN
03026 #  define IV_MIN                         PERL_LONG_MIN
03027 #endif
03028 
03029 #ifndef IV_MAX
03030 #  define IV_MAX                         PERL_LONG_MAX
03031 #endif
03032 
03033 #ifndef UV_MIN
03034 #  define UV_MIN                         PERL_ULONG_MIN
03035 #endif
03036 
03037 #ifndef UV_MAX
03038 #  define UV_MAX                         PERL_ULONG_MAX
03039 #endif
03040 
03041 #      ifdef LONGSIZE
03042 #ifndef IVSIZE
03043 #  define IVSIZE                         LONGSIZE
03044 #endif
03045 
03046 #      endif
03047 #    endif
03048 #  endif
03049 #ifndef IVSIZE
03050 #  define IVSIZE                         8
03051 #endif
03052 
03053 #ifndef PERL_QUAD_MIN
03054 #  define PERL_QUAD_MIN                  IV_MIN
03055 #endif
03056 
03057 #ifndef PERL_QUAD_MAX
03058 #  define PERL_QUAD_MAX                  IV_MAX
03059 #endif
03060 
03061 #ifndef PERL_UQUAD_MIN
03062 #  define PERL_UQUAD_MIN                 UV_MIN
03063 #endif
03064 
03065 #ifndef PERL_UQUAD_MAX
03066 #  define PERL_UQUAD_MAX                 UV_MAX
03067 #endif
03068 
03069 #else
03070 #ifndef IVTYPE
03071 #  define IVTYPE                         long
03072 #endif
03073 
03074 #ifndef IV_MIN
03075 #  define IV_MIN                         PERL_LONG_MIN
03076 #endif
03077 
03078 #ifndef IV_MAX
03079 #  define IV_MAX                         PERL_LONG_MAX
03080 #endif
03081 
03082 #ifndef UV_MIN
03083 #  define UV_MIN                         PERL_ULONG_MIN
03084 #endif
03085 
03086 #ifndef UV_MAX
03087 #  define UV_MAX                         PERL_ULONG_MAX
03088 #endif
03089 
03090 #endif
03091 
03092 #ifndef IVSIZE
03093 #  ifdef LONGSIZE
03094 #    define IVSIZE LONGSIZE
03095 #  else
03096 #    define IVSIZE 4 /* A bold guess, but the best we can make. */
03097 #  endif
03098 #endif
03099 #ifndef UVTYPE
03100 #  define UVTYPE                         unsigned IVTYPE
03101 #endif
03102 
03103 #ifndef UVSIZE
03104 #  define UVSIZE                         IVSIZE
03105 #endif
03106 #ifndef sv_setuv
03107 #  define sv_setuv(sv, uv)               \
03108                STMT_START {                         \
03109                  UV TeMpUv = uv;                    \
03110                  if (TeMpUv <= IV_MAX)              \
03111                    sv_setiv(sv, TeMpUv);            \
03112                  else                               \
03113                    sv_setnv(sv, (double)TeMpUv);    \
03114                } STMT_END
03115 #endif
03116 #ifndef newSVuv
03117 #  define newSVuv(uv)                    ((uv) <= IV_MAX ? newSViv((IV)uv) : newSVnv((NV)uv))
03118 #endif
03119 #ifndef sv_2uv
03120 #  define sv_2uv(sv)                     ((PL_Sv = (sv)), (UV) (SvNOK(PL_Sv) ? SvNV(PL_Sv) : sv_2nv(PL_Sv)))
03121 #endif
03122 
03123 #ifndef SvUVX
03124 #  define SvUVX(sv)                      ((UV)SvIVX(sv))
03125 #endif
03126 
03127 #ifndef SvUVXx
03128 #  define SvUVXx(sv)                     SvUVX(sv)
03129 #endif
03130 
03131 #ifndef SvUV
03132 #  define SvUV(sv)                       (SvIOK(sv) ? SvUVX(sv) : sv_2uv(sv))
03133 #endif
03134 
03135 #ifndef SvUVx
03136 #  define SvUVx(sv)                      ((PL_Sv = (sv)), SvUV(PL_Sv))
03137 #endif
03138 
03139 /* Hint: sv_uv
03140  * Always use the SvUVx() macro instead of sv_uv().
03141  */
03142 #ifndef sv_uv
03143 #  define sv_uv(sv)                      SvUVx(sv)
03144 #endif
03145 #ifndef XST_mUV
03146 #  define XST_mUV(i,v)                   (ST(i) = sv_2mortal(newSVuv(v))  )
03147 #endif
03148 
03149 #ifndef XSRETURN_UV
03150 #  define XSRETURN_UV(v)                 STMT_START { XST_mUV(0,v);  XSRETURN(1); } STMT_END
03151 #endif
03152 #ifndef PUSHu
03153 #  define PUSHu(u)                       STMT_START { sv_setuv(TARG, (UV)(u)); PUSHTARG;  } STMT_END
03154 #endif
03155 
03156 #ifndef XPUSHu
03157 #  define XPUSHu(u)                      STMT_START { sv_setuv(TARG, (UV)(u)); XPUSHTARG; } STMT_END
03158 #endif
03159 
03160 #ifdef HAS_MEMCMP
03161 #ifndef memNE
03162 #  define memNE(s1,s2,l)                 (memcmp(s1,s2,l))
03163 #endif
03164 
03165 #ifndef memEQ
03166 #  define memEQ(s1,s2,l)                 (!memcmp(s1,s2,l))
03167 #endif
03168 
03169 #else
03170 #ifndef memNE
03171 #  define memNE(s1,s2,l)                 (bcmp(s1,s2,l))
03172 #endif
03173 
03174 #ifndef memEQ
03175 #  define memEQ(s1,s2,l)                 (!bcmp(s1,s2,l))
03176 #endif
03177 
03178 #endif
03179 #ifndef MoveD
03180 #  define MoveD(s,d,n,t)                 memmove((char*)(d),(char*)(s), (n) * sizeof(t))
03181 #endif
03182 
03183 #ifndef CopyD
03184 #  define CopyD(s,d,n,t)                 memcpy((char*)(d),(char*)(s), (n) * sizeof(t))
03185 #endif
03186 
03187 #ifdef HAS_MEMSET
03188 #ifndef ZeroD
03189 #  define ZeroD(d,n,t)                   memzero((char*)(d), (n) * sizeof(t))
03190 #endif
03191 
03192 #else
03193 #ifndef ZeroD
03194 #  define ZeroD(d,n,t)                   ((void)memzero((char*)(d), (n) * sizeof(t)), d)
03195 #endif
03196 
03197 #endif
03198 #ifndef Poison
03199 #  define Poison(d,n,t)                  (void)memset((char*)(d), 0xAB, (n) * sizeof(t))
03200 #endif
03201 #ifndef Newx
03202 #  define Newx(v,n,t)                    New(0,v,n,t)
03203 #endif
03204 
03205 #ifndef Newxc
03206 #  define Newxc(v,n,t,c)                 Newc(0,v,n,t,c)
03207 #endif
03208 
03209 #ifndef Newxz
03210 #  define Newxz(v,n,t)                   Newz(0,v,n,t)
03211 #endif
03212 
03213 #if ((PERL_VERSION < 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION <= 5)))
03214 /* Replace: 1 */
03215 #  define PL_DBsingle               DBsingle
03216 #  define PL_DBsub                  DBsub
03217 #  define PL_Sv                     Sv
03218 #  define PL_compiling              compiling
03219 #  define PL_copline                copline
03220 #  define PL_curcop                 curcop
03221 #  define PL_curstash               curstash
03222 #  define PL_debstash               debstash
03223 #  define PL_defgv                  defgv
03224 #  define PL_diehook                diehook
03225 #  define PL_dirty                  dirty
03226 #  define PL_dowarn                 dowarn
03227 #  define PL_errgv                  errgv
03228 #  define PL_hexdigit               hexdigit
03229 #  define PL_hints                  hints
03230 #  define PL_na                          na
03231 #  define PL_no_modify              no_modify
03232 #  define PL_perl_destruct_level    perl_destruct_level
03233 #  define PL_perldb                 perldb
03234 #  define PL_ppaddr                 ppaddr
03235 #  define PL_rsfp_filters           rsfp_filters
03236 #  define PL_rsfp                   rsfp
03237 #  define PL_stack_base             stack_base
03238 #  define PL_stack_sp               stack_sp
03239 #  define PL_stdingv                stdingv
03240 #  define PL_sv_arenaroot           sv_arenaroot
03241 #  define PL_sv_no                  sv_no
03242 #  define PL_sv_undef               sv_undef
03243 #  define PL_sv_yes                 sv_yes
03244 #  define PL_tainted                tainted
03245 #  define PL_tainting               tainting
03246 /* Replace: 0 */
03247 #endif
03248 
03249 #ifndef PERL_UNUSED_DECL
03250 #  ifdef HASATTRIBUTE
03251 #    if (defined(__GNUC__) && defined(__cplusplus)) || defined(__INTEL_COMPILER)
03252 #      define PERL_UNUSED_DECL
03253 #    else
03254 #      define PERL_UNUSED_DECL __attribute__((unused))
03255 #    endif
03256 #  else
03257 #    define PERL_UNUSED_DECL
03258 #  endif
03259 #endif
03260 #ifndef NOOP
03261 #  define NOOP                           (void)0
03262 #endif
03263 
03264 #ifndef dNOOP
03265 #  define dNOOP                          extern int Perl___notused PERL_UNUSED_DECL
03266 #endif
03267 
03268 #ifndef NVTYPE
03269 #  if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE)
03270 #    define NVTYPE long double
03271 #  else
03272 #    define NVTYPE double
03273 #  endif
03274 typedef NVTYPE NV;
03275 #endif
03276 
03277 #ifndef INT2PTR
03278 
03279 #  if (IVSIZE == PTRSIZE) && (UVSIZE == PTRSIZE)
03280 #    define PTRV                  UV
03281 #    define INT2PTR(any,d)        (any)(d)
03282 #  else
03283 #    if PTRSIZE == LONGSIZE
03284 #      define PTRV                unsigned long
03285 #    else
03286 #      define PTRV                unsigned
03287 #    endif
03288 #    define INT2PTR(any,d)        (any)(PTRV)(d)
03289 #  endif
03290 
03291 #  define NUM2PTR(any,d)  (any)(PTRV)(d)
03292 #  define PTR2IV(p)       INT2PTR(IV,p)
03293 #  define PTR2UV(p)       INT2PTR(UV,p)
03294 #  define PTR2NV(p)       NUM2PTR(NV,p)
03295 
03296 #  if PTRSIZE == LONGSIZE
03297 #    define PTR2ul(p)     (unsigned long)(p)
03298 #  else
03299 #    define PTR2ul(p)     INT2PTR(unsigned long,p)
03300 #  endif
03301 
03302 #endif /* !INT2PTR */
03303 
03304 #undef START_EXTERN_C
03305 #undef END_EXTERN_C
03306 #undef EXTERN_C
03307 #ifdef __cplusplus
03308 #  define START_EXTERN_C extern "C" {
03309 #  define END_EXTERN_C }
03310 #  define EXTERN_C extern "C"
03311 #else
03312 #  define START_EXTERN_C
03313 #  define END_EXTERN_C
03314 #  define EXTERN_C extern
03315 #endif
03316 
03317 #ifndef PERL_GCC_BRACE_GROUPS_FORBIDDEN
03318 #  if defined(__STRICT_ANSI__) && defined(PERL_GCC_PEDANTIC)
03319 #    define PERL_GCC_BRACE_GROUPS_FORBIDDEN
03320 #  endif
03321 #endif
03322 
03323 #undef STMT_START
03324 #undef STMT_END
03325 #if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN) && !defined(__cplusplus)
03326 #  define STMT_START (void)(       /* gcc supports ``({ STATEMENTS; })'' */
03327 #  define STMT_END   )
03328 #else
03329 #  if defined(VOIDFLAGS) && (VOIDFLAGS) && (defined(sun) || defined(__sun__)) && !defined(__GNUC__)
03330 #    define STMT_START      if (1)
03331 #    define STMT_END else (void)0
03332 #  else
03333 #    define STMT_START      do
03334 #    define STMT_END while (0)
03335 #  endif
03336 #endif
03337 #ifndef boolSV
03338 #  define boolSV(b)                      ((b) ? &PL_sv_yes : &PL_sv_no)
03339 #endif
03340 
03341 /* DEFSV appears first in 5.004_56 */
03342 #ifndef DEFSV
03343 #  define DEFSV                          GvSV(PL_defgv)
03344 #endif
03345 
03346 #ifndef SAVE_DEFSV
03347 #  define SAVE_DEFSV                     SAVESPTR(GvSV(PL_defgv))
03348 #endif
03349 
03350 /* Older perls (<=5.003) lack AvFILLp */
03351 #ifndef AvFILLp
03352 #  define AvFILLp                        AvFILL
03353 #endif
03354 #ifndef ERRSV
03355 #  define ERRSV                          get_sv("@",FALSE)
03356 #endif
03357 #ifndef newSVpvn
03358 #  define newSVpvn(data,len)             ((data)                                              \
03359                                     ? ((len) ? newSVpv((data), (len)) : newSVpv("", 0)) \
03360                                     : newSV(0))
03361 #endif
03362 
03363 /* Hint: gv_stashpvn
03364  * This function's backport doesn't support the length parameter, but
03365  * rather ignores it. Portability can only be ensured if the length
03366  * parameter is used for speed reasons, but the length can always be
03367  * correctly computed from the string argument.
03368  */
03369 #ifndef gv_stashpvn
03370 #  define gv_stashpvn(str,len,create)    gv_stashpv(str,create)
03371 #endif
03372 
03373 /* Replace: 1 */
03374 #ifndef get_cv
03375 #  define get_cv                         perl_get_cv
03376 #endif
03377 
03378 #ifndef get_sv
03379 #  define get_sv                         perl_get_sv
03380 #endif
03381 
03382 #ifndef get_av
03383 #  define get_av                         perl_get_av
03384 #endif
03385 
03386 #ifndef get_hv
03387 #  define get_hv                         perl_get_hv
03388 #endif
03389 
03390 /* Replace: 0 */
03391 #ifndef dUNDERBAR
03392 #  define dUNDERBAR                      dNOOP
03393 #endif
03394 
03395 #ifndef UNDERBAR
03396 #  define UNDERBAR                       DEFSV
03397 #endif
03398 #ifndef dAX
03399 #  define dAX                            I32 ax = MARK - PL_stack_base + 1
03400 #endif
03401 
03402 #ifndef dITEMS
03403 #  define dITEMS                         I32 items = SP - MARK
03404 #endif
03405 #ifndef dXSTARG
03406 #  define dXSTARG                        SV * targ = sv_newmortal()
03407 #endif
03408 #ifndef dAXMARK
03409 #  define dAXMARK                        I32 ax = POPMARK; \
03410                                register SV ** const mark = PL_stack_base + ax++
03411 #endif
03412 #ifndef XSprePUSH
03413 #  define XSprePUSH                      (sp = PL_stack_base + ax - 1)
03414 #endif
03415 
03416 #if ((PERL_VERSION < 5) || ((PERL_VERSION == 5) && (PERL_SUBVERSION < 0)))
03417 #  undef XSRETURN
03418 #  define XSRETURN(off)                                   \
03419       STMT_START {                                        \
03420           PL_stack_sp = PL_stack_base + ax + ((off) - 1); \
03421           return;                                         \
03422       } STMT_END
03423 #endif
03424 
03425 #ifndef PERL_SIGNALS_UNSAFE_FLAG
03426 
03427 #define PERL_SIGNALS_UNSAFE_FLAG 0x0001
03428 
03429 #if defined(NEED_PL_signals)
03430 static U32 DPPP_(my_PL_signals) = PERL_SIGNALS_UNSAFE_FLAG;
03431 #elif defined(NEED_PL_signals_GLOBAL)
03432 U32 DPPP_(my_PL_signals) = PERL_SIGNALS_UNSAFE_FLAG;
03433 #else
03434 extern U32 DPPP_(my_PL_signals);
03435 #endif
03436 #define PL_signals DPPP_(my_PL_signals)
03437 
03438 #endif
03439 #ifndef dTHR
03440 #  define dTHR                           dNOOP
03441 #endif
03442 #ifndef dTHX
03443 #  define dTHX                           dNOOP
03444 #endif
03445 
03446 #ifndef dTHXa
03447 #  define dTHXa(x)                       dNOOP
03448 #endif
03449 #ifndef pTHX
03450 #  define pTHX                           void
03451 #endif
03452 
03453 #ifndef pTHX_
03454 #  define pTHX_
03455 #endif
03456 
03457 #ifndef aTHX
03458 #  define aTHX
03459 #endif
03460 
03461 #ifndef aTHX_
03462 #  define aTHX_
03463 #endif
03464 #ifndef dTHXoa
03465 #  define dTHXoa(x)                      dTHXa(x)
03466 #endif
03467 #ifndef PUSHmortal
03468 #  define PUSHmortal                     PUSHs(sv_newmortal())
03469 #endif
03470 
03471 #ifndef mPUSHp
03472 #  define mPUSHp(p,l)                    sv_setpvn_mg(PUSHmortal, (p), (l))
03473 #endif
03474 
03475 #ifndef mPUSHn
03476 #  define mPUSHn(n)                      sv_setnv_mg(PUSHmortal, (NV)(n))
03477 #endif
03478 
03479 #ifndef mPUSHi
03480 #  define mPUSHi(i)                      sv_setiv_mg(PUSHmortal, (IV)(i))
03481 #endif
03482 
03483 #ifndef mPUSHu
03484 #  define mPUSHu(u)                      sv_setuv_mg(PUSHmortal, (UV)(u))
03485 #endif
03486 #ifndef XPUSHmortal
03487 #  define XPUSHmortal                    XPUSHs(sv_newmortal())
03488 #endif
03489 
03490 #ifndef mXPUSHp
03491 #  define mXPUSHp(p,l)                   STMT_START { EXTEND(sp,1); sv_setpvn_mg(PUSHmortal, (p), (l)); } STMT_END
03492 #endif
03493 
03494 #ifndef mXPUSHn
03495 #  define mXPUSHn(n)                     STMT_START { EXTEND(sp,1); sv_setnv_mg(PUSHmortal, (NV)(n)); } STMT_END
03496 #endif
03497 
03498 #ifndef mXPUSHi
03499 #  define mXPUSHi(i)                     STMT_START { EXTEND(sp,1); sv_setiv_mg(PUSHmortal, (IV)(i)); } STMT_END
03500 #endif
03501 
03502 #ifndef mXPUSHu
03503 #  define mXPUSHu(u)                     STMT_START { EXTEND(sp,1); sv_setuv_mg(PUSHmortal, (UV)(u)); } STMT_END
03504 #endif
03505 
03506 /* Replace: 1 */
03507 #ifndef call_sv
03508 #  define call_sv                        perl_call_sv
03509 #endif
03510 
03511 #ifndef call_pv
03512 #  define call_pv                        perl_call_pv
03513 #endif
03514 
03515 #ifndef call_argv
03516 #  define call_argv                      perl_call_argv
03517 #endif
03518 
03519 #ifndef call_method
03520 #  define call_method                    perl_call_method
03521 #endif
03522 #ifndef eval_sv
03523 #  define eval_sv                        perl_eval_sv
03524 #endif
03525 
03526 /* Replace: 0 */
03527 
03528 /* Replace perl_eval_pv with eval_pv */
03529 /* eval_pv depends on eval_sv */
03530 
03531 #ifndef eval_pv
03532 #if defined(NEED_eval_pv)
03533 static SV* DPPP_(my_eval_pv)(char *p, I32 croak_on_error);
03534 static
03535 #else
03536 extern SV* DPPP_(my_eval_pv)(char *p, I32 croak_on_error);
03537 #endif
03538 
03539 #ifdef eval_pv
03540 #  undef eval_pv
03541 #endif
03542 #define eval_pv(a,b) DPPP_(my_eval_pv)(aTHX_ a,b)
03543 #define Perl_eval_pv DPPP_(my_eval_pv)
03544 
03545 #if defined(NEED_eval_pv) || defined(NEED_eval_pv_GLOBAL)
03546 
03547 SV*
03548 DPPP_(my_eval_pv)(char *p, I32 croak_on_error)
03549 {
03550     dSP;
03551     SV* sv = newSVpv(p, 0);
03552 
03553     PUSHMARK(sp);
03554     eval_sv(sv, G_SCALAR);
03555     SvREFCNT_dec(sv);
03556 
03557     SPAGAIN;
03558     sv = POPs;
03559     PUTBACK;
03560 
03561     if (croak_on_error && SvTRUE(GvSV(errgv)))
03562        croak(SvPVx(GvSV(errgv), na));
03563 
03564     return sv;
03565 }
03566 
03567 #endif
03568 #endif
03569 #ifndef newRV_inc
03570 #  define newRV_inc(sv)                  newRV(sv)   /* Replace */
03571 #endif
03572 
03573 #ifndef newRV_noinc
03574 #if defined(NEED_newRV_noinc)
03575 static SV * DPPP_(my_newRV_noinc)(SV *sv);
03576 static
03577 #else
03578 extern SV * DPPP_(my_newRV_noinc)(SV *sv);
03579 #endif
03580 
03581 #ifdef newRV_noinc
03582 #  undef newRV_noinc
03583 #endif
03584 #define newRV_noinc(a) DPPP_(my_newRV_noinc)(aTHX_ a)
03585 #define Perl_newRV_noinc DPPP_(my_newRV_noinc)
03586 
03587 #if defined(NEED_newRV_noinc) || defined(NEED_newRV_noinc_GLOBAL)
03588 SV *
03589 DPPP_(my_newRV_noinc)(SV *sv)
03590 {
03591   SV *rv = (SV *)newRV(sv);
03592   SvREFCNT_dec(sv);
03593   return rv;
03594 }
03595 #endif
03596 #endif
03597 
03598 /* Hint: newCONSTSUB
03599  * Returns a CV* as of perl-5.7.1. This return value is not supported
03600  * by Devel::PPPort.
03601  */
03602 
03603 /* newCONSTSUB from IO.xs is in the core starting with 5.004_63 */
03604 #if ((PERL_VERSION < 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION < 63))) && ((PERL_VERSION != 4) || (PERL_SUBVERSION != 5))
03605 #if defined(NEED_newCONSTSUB)
03606 static void DPPP_(my_newCONSTSUB)(HV *stash, char *name, SV *sv);
03607 static
03608 #else
03609 extern void DPPP_(my_newCONSTSUB)(HV *stash, char *name, SV *sv);
03610 #endif
03611 
03612 #ifdef newCONSTSUB
03613 #  undef newCONSTSUB
03614 #endif
03615 #define newCONSTSUB(a,b,c) DPPP_(my_newCONSTSUB)(aTHX_ a,b,c)
03616 #define Perl_newCONSTSUB DPPP_(my_newCONSTSUB)
03617 
03618 #if defined(NEED_newCONSTSUB) || defined(NEED_newCONSTSUB_GLOBAL)
03619 
03620 void
03621 DPPP_(my_newCONSTSUB)(HV *stash, char *name, SV *sv)
03622 {
03623        U32 oldhints = PL_hints;
03624        HV *old_cop_stash = PL_curcop->cop_stash;
03625        HV *old_curstash = PL_curstash;
03626        line_t oldline = PL_curcop->cop_line;
03627        PL_curcop->cop_line = PL_copline;
03628 
03629        PL_hints &= ~HINT_BLOCK_SCOPE;
03630        if (stash)
03631               PL_curstash = PL_curcop->cop_stash = stash;
03632 
03633        newSUB(
03634 
03635 #if   ((PERL_VERSION < 3) || ((PERL_VERSION == 3) && (PERL_SUBVERSION < 22)))
03636               start_subparse(),
03637 #elif ((PERL_VERSION == 3) && (PERL_SUBVERSION == 22))
03638               start_subparse(0),
03639 #else  /* 5.003_23  onwards */
03640               start_subparse(FALSE, 0),
03641 #endif
03642 
03643               newSVOP(OP_CONST, 0, newSVpv(name,0)),
03644               newSVOP(OP_CONST, 0, &PL_sv_no),   /* SvPV(&PL_sv_no) == "" -- GMB */
03645               newSTATEOP(0, Nullch, newSVOP(OP_CONST, 0, sv))
03646        );
03647 
03648        PL_hints = oldhints;
03649        PL_curcop->cop_stash = old_cop_stash;
03650        PL_curstash = old_curstash;
03651        PL_curcop->cop_line = oldline;
03652 }
03653 #endif
03654 #endif
03655 
03656 /*
03657  * Boilerplate macros for initializing and accessing interpreter-local
03658  * data from C.  All statics in extensions should be reworked to use
03659  * this, if you want to make the extension thread-safe.  See ext/re/re.xs
03660  * for an example of the use of these macros.
03661  *
03662  * Code that uses these macros is responsible for the following:
03663  * 1. #define MY_CXT_KEY to a unique string, e.g. "DynaLoader_guts"
03664  * 2. Declare a typedef named my_cxt_t that is a structure that contains
03665  *    all the data that needs to be interpreter-local.
03666  * 3. Use the START_MY_CXT macro after the declaration of my_cxt_t.
03667  * 4. Use the MY_CXT_INIT macro such that it is called exactly once
03668  *    (typically put in the BOOT: section).
03669  * 5. Use the members of the my_cxt_t structure everywhere as
03670  *    MY_CXT.member.
03671  * 6. Use the dMY_CXT macro (a declaration) in all the functions that
03672  *    access MY_CXT.
03673  */
03674 
03675 #if defined(MULTIPLICITY) || defined(PERL_OBJECT) || \
03676     defined(PERL_CAPI)    || defined(PERL_IMPLICIT_CONTEXT)
03677 
03678 #ifndef START_MY_CXT
03679 
03680 /* This must appear in all extensions that define a my_cxt_t structure,
03681  * right after the definition (i.e. at file scope).  The non-threads
03682  * case below uses it to declare the data as static. */
03683 #define START_MY_CXT
03684 
03685 #if ((PERL_VERSION < 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION < 68)))
03686 /* Fetches the SV that keeps the per-interpreter data. */
03687 #define dMY_CXT_SV \
03688        SV *my_cxt_sv = get_sv(MY_CXT_KEY, FALSE)
03689 #else /* >= perl5.004_68 */
03690 #define dMY_CXT_SV \
03691        SV *my_cxt_sv = *hv_fetch(PL_modglobal, MY_CXT_KEY,            \
03692                               sizeof(MY_CXT_KEY)-1, TRUE)
03693 #endif /* < perl5.004_68 */
03694 
03695 /* This declaration should be used within all functions that use the
03696  * interpreter-local data. */
03697 #define dMY_CXT      \
03698        dMY_CXT_SV;                                             \
03699        my_cxt_t *my_cxtp = INT2PTR(my_cxt_t*,SvUV(my_cxt_sv))
03700 
03701 /* Creates and zeroes the per-interpreter data.
03702  * (We allocate my_cxtp in a Perl SV so that it will be released when
03703  * the interpreter goes away.) */
03704 #define MY_CXT_INIT \
03705        dMY_CXT_SV;                                             \
03706        /* newSV() allocates one more than needed */                   \
03707        my_cxt_t *my_cxtp = (my_cxt_t*)SvPVX(newSV(sizeof(my_cxt_t)-1));\
03708        Zero(my_cxtp, 1, my_cxt_t);                             \
03709        sv_setuv(my_cxt_sv, PTR2UV(my_cxtp))
03710 
03711 /* This macro must be used to access members of the my_cxt_t structure.
03712  * e.g. MYCXT.some_data */
03713 #define MY_CXT              (*my_cxtp)
03714 
03715 /* Judicious use of these macros can reduce the number of times dMY_CXT
03716  * is used.  Use is similar to pTHX, aTHX etc. */
03717 #define pMY_CXT             my_cxt_t *my_cxtp
03718 #define pMY_CXT_     pMY_CXT,
03719 #define _pMY_CXT     ,pMY_CXT
03720 #define aMY_CXT             my_cxtp
03721 #define aMY_CXT_     aMY_CXT,
03722 #define _aMY_CXT     ,aMY_CXT
03723 
03724 #endif /* START_MY_CXT */
03725 
03726 #ifndef MY_CXT_CLONE
03727 /* Clones the per-interpreter data. */
03728 #define MY_CXT_CLONE \
03729        dMY_CXT_SV;                                             \
03730        my_cxt_t *my_cxtp = (my_cxt_t*)SvPVX(newSV(sizeof(my_cxt_t)-1));\
03731        Copy(INT2PTR(my_cxt_t*, SvUV(my_cxt_sv)), my_cxtp, 1, my_cxt_t);\
03732        sv_setuv(my_cxt_sv, PTR2UV(my_cxtp))
03733 #endif
03734 
03735 #else /* single interpreter */
03736 
03737 #ifndef START_MY_CXT
03738 
03739 #define START_MY_CXT static my_cxt_t my_cxt;
03740 #define dMY_CXT_SV   dNOOP
03741 #define dMY_CXT             dNOOP
03742 #define MY_CXT_INIT  NOOP
03743 #define MY_CXT              my_cxt
03744 
03745 #define pMY_CXT             void
03746 #define pMY_CXT_
03747 #define _pMY_CXT
03748 #define aMY_CXT
03749 #define aMY_CXT_
03750 #define _aMY_CXT
03751 
03752 #endif /* START_MY_CXT */
03753 
03754 #ifndef MY_CXT_CLONE
03755 #define MY_CXT_CLONE NOOP
03756 #endif
03757 
03758 #endif
03759 
03760 #ifndef IVdf
03761 #  if IVSIZE == LONGSIZE
03762 #    define   IVdf      "ld"
03763 #    define   UVuf      "lu"
03764 #    define   UVof      "lo"
03765 #    define   UVxf      "lx"
03766 #    define   UVXf      "lX"
03767 #  else
03768 #    if IVSIZE == INTSIZE
03769 #      define IVdf      "d"
03770 #      define UVuf      "u"
03771 #      define UVof      "o"
03772 #      define UVxf      "x"
03773 #      define UVXf      "X"
03774 #    endif
03775 #  endif
03776 #endif
03777 
03778 #ifndef NVef
03779 #  if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE) && \
03780       defined(PERL_PRIfldbl) /* Not very likely, but let's try anyway. */
03781 #    define NVef          PERL_PRIeldbl
03782 #    define NVff          PERL_PRIfldbl
03783 #    define NVgf          PERL_PRIgldbl
03784 #  else
03785 #    define NVef          "e"
03786 #    define NVff          "f"
03787 #    define NVgf          "g"
03788 #  endif
03789 #endif
03790 
03791 #ifndef SvPV_nolen
03792 
03793 #if defined(NEED_sv_2pv_nolen)
03794 static char * DPPP_(my_sv_2pv_nolen)(pTHX_ register SV *sv);
03795 static
03796 #else
03797 extern char * DPPP_(my_sv_2pv_nolen)(pTHX_ register SV *sv);
03798 #endif
03799 
03800 #ifdef sv_2pv_nolen
03801 #  undef sv_2pv_nolen
03802 #endif
03803 #define sv_2pv_nolen(a) DPPP_(my_sv_2pv_nolen)(aTHX_ a)
03804 #define Perl_sv_2pv_nolen DPPP_(my_sv_2pv_nolen)
03805 
03806 #if defined(NEED_sv_2pv_nolen) || defined(NEED_sv_2pv_nolen_GLOBAL)
03807 
03808 char *
03809 DPPP_(my_sv_2pv_nolen)(pTHX_ register SV *sv)
03810 {
03811   STRLEN n_a;
03812   return sv_2pv(sv, &n_a);
03813 }
03814 
03815 #endif
03816 
03817 /* Hint: sv_2pv_nolen
03818  * Use the SvPV_nolen() macro instead of sv_2pv_nolen().
03819  */
03820 
03821 /* SvPV_nolen depends on sv_2pv_nolen */
03822 #define SvPV_nolen(sv) \
03823           ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
03824            ? SvPVX(sv) : sv_2pv_nolen(sv))
03825 
03826 #endif
03827 
03828 #ifdef SvPVbyte
03829 
03830 /* Hint: SvPVbyte
03831  * Does not work in perl-5.6.1, ppport.h implements a version
03832  * borrowed from perl-5.7.3.
03833  */
03834 
03835 #if ((PERL_VERSION < 7) || ((PERL_VERSION == 7) && (PERL_SUBVERSION < 0)))
03836 
03837 #if defined(NEED_sv_2pvbyte)
03838 static char * DPPP_(my_sv_2pvbyte)(pTHX_ register SV *sv, STRLEN *lp);
03839 static
03840 #else
03841 extern char * DPPP_(my_sv_2pvbyte)(pTHX_ register SV *sv, STRLEN *lp);
03842 #endif
03843 
03844 #ifdef sv_2pvbyte
03845 #  undef sv_2pvbyte
03846 #endif
03847 #define sv_2pvbyte(a,b) DPPP_(my_sv_2pvbyte)(aTHX_ a,b)
03848 #define Perl_sv_2pvbyte DPPP_(my_sv_2pvbyte)
03849 
03850 #if defined(NEED_sv_2pvbyte) || defined(NEED_sv_2pvbyte_GLOBAL)
03851 
03852 char *
03853 DPPP_(my_sv_2pvbyte)(pTHX_ register SV *sv, STRLEN *lp)
03854 {
03855   sv_utf8_downgrade(sv,0);
03856   return SvPV(sv,*lp);
03857 }
03858 
03859 #endif
03860 
03861 /* Hint: sv_2pvbyte
03862  * Use the SvPVbyte() macro instead of sv_2pvbyte().
03863  */
03864 
03865 #undef SvPVbyte
03866 
03867 /* SvPVbyte depends on sv_2pvbyte */
03868 #define SvPVbyte(sv, lp)                                                \
03869         ((SvFLAGS(sv) & (SVf_POK|SVf_UTF8)) == (SVf_POK)                \
03870          ? ((lp = SvCUR(sv)), SvPVX(sv)) : sv_2pvbyte(sv, &lp))
03871 
03872 #endif
03873 
03874 #else
03875 
03876 #  define SvPVbyte          SvPV
03877 #  define sv_2pvbyte        sv_2pv
03878 
03879 #endif
03880 
03881 /* sv_2pvbyte_nolen depends on sv_2pv_nolen */
03882 #ifndef sv_2pvbyte_nolen
03883 #  define sv_2pvbyte_nolen               sv_2pv_nolen
03884 #endif
03885 
03886 /* Hint: sv_pvn
03887  * Always use the SvPV() macro instead of sv_pvn().
03888  */
03889 #ifndef sv_pvn
03890 #  define sv_pvn(sv, len)                SvPV(sv, len)
03891 #endif
03892 
03893 /* Hint: sv_pvn_force
03894  * Always use the SvPV_force() macro instead of sv_pvn_force().
03895  */
03896 #ifndef sv_pvn_force
03897 #  define sv_pvn_force(sv, len)          SvPV_force(sv, len)
03898 #endif
03899 #ifndef SvMAGIC_set
03900 #  define SvMAGIC_set(sv, val)           \
03901                 STMT_START { assert(SvTYPE(sv) >= SVt_PVMG); \
03902                 (((XPVMG*) SvANY(sv))->xmg_magic = (val)); } STMT_END
03903 #endif
03904 
03905 #if ((PERL_VERSION < 9) || ((PERL_VERSION == 9) && (PERL_SUBVERSION < 3)))
03906 #ifndef SvPVX_const
03907 #  define SvPVX_const(sv)                ((const char*) (0 + SvPVX(sv)))
03908 #endif
03909 
03910 #ifndef SvPVX_mutable
03911 #  define SvPVX_mutable(sv)              (0 + SvPVX(sv))
03912 #endif
03913 #ifndef SvRV_set
03914 #  define SvRV_set(sv, val)              \
03915                 STMT_START { assert(SvTYPE(sv) >=  SVt_RV); \
03916                 (((XRV*) SvANY(sv))->xrv_rv = (val)); } STMT_END
03917 #endif
03918 
03919 #else
03920 #ifndef SvPVX_const
03921 #  define SvPVX_const(sv)                ((const char*)((sv)->sv_u.svu_pv))
03922 #endif
03923 
03924 #ifndef SvPVX_mutable
03925 #  define SvPVX_mutable(sv)              ((sv)->sv_u.svu_pv)
03926 #endif
03927 #ifndef SvRV_set
03928 #  define SvRV_set(sv, val)              \
03929                 STMT_START { assert(SvTYPE(sv) >=  SVt_RV); \
03930                 ((sv)->sv_u.svu_rv = (val)); } STMT_END
03931 #endif
03932 
03933 #endif
03934 #ifndef SvSTASH_set
03935 #  define SvSTASH_set(sv, val)           \
03936                 STMT_START { assert(SvTYPE(sv) >= SVt_PVMG); \
03937                 (((XPVMG*) SvANY(sv))->xmg_stash = (val)); } STMT_END
03938 #endif
03939 
03940 #if ((PERL_VERSION < 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION < 0)))
03941 #ifndef SvUV_set
03942 #  define SvUV_set(sv, val)              \
03943                 STMT_START { assert(SvTYPE(sv) == SVt_IV || SvTYPE(sv) >= SVt_PVIV); \
03944                 (((XPVIV*) SvANY(sv))->xiv_iv = (IV) (val)); } STMT_END
03945 #endif
03946 
03947 #else
03948 #ifndef SvUV_set
03949 #  define SvUV_set(sv, val)              \
03950                 STMT_START { assert(SvTYPE(sv) == SVt_IV || SvTYPE(sv) >= SVt_PVIV); \
03951                 (((XPVUV*) SvANY(sv))->xuv_uv = (val)); } STMT_END
03952 #endif
03953 
03954 #endif
03955 
03956 #if ((PERL_VERSION > 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION >= 0))) && !defined(vnewSVpvf)
03957 #if defined(NEED_vnewSVpvf)
03958 static SV * DPPP_(my_vnewSVpvf)(pTHX_ const char * pat, va_list * args);
03959 static
03960 #else
03961 extern SV * DPPP_(my_vnewSVpvf)(pTHX_ const char * pat, va_list * args);
03962 #endif
03963 
03964 #ifdef vnewSVpvf
03965 #  undef vnewSVpvf
03966 #endif
03967 #define vnewSVpvf(a,b) DPPP_(my_vnewSVpvf)(aTHX_ a,b)
03968 #define Perl_vnewSVpvf DPPP_(my_vnewSVpvf)
03969 
03970 #if defined(NEED_vnewSVpvf) || defined(NEED_vnewSVpvf_GLOBAL)
03971 
03972 SV *
03973 DPPP_(my_vnewSVpvf)(pTHX_ const char *pat, va_list *args)
03974 {
03975   register SV *sv = newSV(0);
03976   sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*));
03977   return sv;
03978 }
03979 
03980 #endif
03981 #endif
03982 
03983 /* sv_vcatpvf depends on sv_vcatpvfn */
03984 #if ((PERL_VERSION > 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION >= 0))) && !defined(sv_vcatpvf)
03985 #  define sv_vcatpvf(sv, pat, args)  sv_vcatpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*))
03986 #endif
03987 
03988 /* sv_vsetpvf depends on sv_vsetpvfn */
03989 #if ((PERL_VERSION > 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION >= 0))) && !defined(sv_vsetpvf)
03990 #  define sv_vsetpvf(sv, pat, args)  sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*))
03991 #endif
03992 
03993 /* sv_catpvf_mg depends on sv_vcatpvfn, sv_catpvf_mg_nocontext */
03994 #if ((PERL_VERSION > 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION >= 0))) && !defined(sv_catpvf_mg)
03995 #if defined(NEED_sv_catpvf_mg)
03996 static void DPPP_(my_sv_catpvf_mg)(pTHX_ SV * sv, const char * pat, ...);
03997 static
03998 #else
03999 extern void DPPP_(my_sv_catpvf_mg)(pTHX_ SV * sv, const char * pat, ...);
04000 #endif
04001 
04002 #define Perl_sv_catpvf_mg DPPP_(my_sv_catpvf_mg)
04003 
04004 #if defined(NEED_sv_catpvf_mg) || defined(NEED_sv_catpvf_mg_GLOBAL)
04005 
04006 void
04007 DPPP_(my_sv_catpvf_mg)(pTHX_ SV *sv, const char *pat, ...)
04008 {
04009   va_list args;
04010   va_start(args, pat);
04011   sv_vcatpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*));
04012   SvSETMAGIC(sv);
04013   va_end(args);
04014 }
04015 
04016 #endif
04017 #endif
04018 
04019 /* sv_catpvf_mg_nocontext depends on sv_vcatpvfn */
04020 #ifdef PERL_IMPLICIT_CONTEXT
04021 #if ((PERL_VERSION > 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION >= 0))) && !defined(sv_catpvf_mg_nocontext)
04022 #if defined(NEED_sv_catpvf_mg_nocontext)
04023 static void DPPP_(my_sv_catpvf_mg_nocontext)(SV * sv, const char * pat, ...);
04024 static
04025 #else
04026 extern void DPPP_(my_sv_catpvf_mg_nocontext)(SV * sv, const char * pat, ...);
04027 #endif
04028 
04029 #define sv_catpvf_mg_nocontext DPPP_(my_sv_catpvf_mg_nocontext)
04030 #define Perl_sv_catpvf_mg_nocontext DPPP_(my_sv_catpvf_mg_nocontext)
04031 
04032 #if defined(NEED_sv_catpvf_mg_nocontext) || defined(NEED_sv_catpvf_mg_nocontext_GLOBAL)
04033 
04034 void
04035 DPPP_(my_sv_catpvf_mg_nocontext)(SV *sv, const char *pat, ...)
04036 {
04037   dTHX;
04038   va_list args;
04039   va_start(args, pat);
04040   sv_vcatpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*));
04041   SvSETMAGIC(sv);
04042   va_end(args);
04043 }
04044 
04045 #endif
04046 #endif
04047 #endif
04048 
04049 #ifndef sv_catpvf_mg
04050 #  ifdef PERL_IMPLICIT_CONTEXT
04051 #    define sv_catpvf_mg   Perl_sv_catpvf_mg_nocontext
04052 #  else
04053 #    define sv_catpvf_mg   Perl_sv_catpvf_mg
04054 #  endif
04055 #endif
04056 
04057 /* sv_vcatpvf_mg depends on sv_vcatpvfn */
04058 #if ((PERL_VERSION > 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION >= 0))) && !defined(sv_vcatpvf_mg)
04059 #  define sv_vcatpvf_mg(sv, pat, args)                                     \
04060    STMT_START {                                                            \
04061      sv_vcatpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*));  \
04062      SvSETMAGIC(sv);                                                       \
04063    } STMT_END
04064 #endif
04065 
04066 /* sv_setpvf_mg depends on sv_vsetpvfn, sv_setpvf_mg_nocontext */
04067 #if ((PERL_VERSION > 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION >= 0))) && !defined(sv_setpvf_mg)
04068 #if defined(NEED_sv_setpvf_mg)
04069 static void DPPP_(my_sv_setpvf_mg)(pTHX_ SV * sv, const char * pat, ...);
04070 static
04071 #else
04072 extern void DPPP_(my_sv_setpvf_mg)(pTHX_ SV * sv, const char * pat, ...);
04073 #endif
04074 
04075 #define Perl_sv_setpvf_mg DPPP_(my_sv_setpvf_mg)
04076 
04077 #if defined(NEED_sv_setpvf_mg) || defined(NEED_sv_setpvf_mg_GLOBAL)
04078 
04079 void
04080 DPPP_(my_sv_setpvf_mg)(pTHX_ SV *sv, const char *pat, ...)
04081 {
04082   va_list args;
04083   va_start(args, pat);
04084   sv_vsetpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*));
04085   SvSETMAGIC(sv);
04086   va_end(args);
04087 }
04088 
04089 #endif
04090 #endif
04091 
04092 /* sv_setpvf_mg_nocontext depends on sv_vsetpvfn */
04093 #ifdef PERL_IMPLICIT_CONTEXT
04094 #if ((PERL_VERSION > 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION >= 0))) && !defined(sv_setpvf_mg_nocontext)
04095 #if defined(NEED_sv_setpvf_mg_nocontext)
04096 static void DPPP_(my_sv_setpvf_mg_nocontext)(SV * sv, const char * pat, ...);
04097 static
04098 #else
04099 extern void DPPP_(my_sv_setpvf_mg_nocontext)(SV * sv, const char * pat, ...);
04100 #endif
04101 
04102 #define sv_setpvf_mg_nocontext DPPP_(my_sv_setpvf_mg_nocontext)
04103 #define Perl_sv_setpvf_mg_nocontext DPPP_(my_sv_setpvf_mg_nocontext)
04104 
04105 #if defined(NEED_sv_setpvf_mg_nocontext) || defined(NEED_sv_setpvf_mg_nocontext_GLOBAL)
04106 
04107 void
04108 DPPP_(my_sv_setpvf_mg_nocontext)(SV *sv, const char *pat, ...)
04109 {
04110   dTHX;
04111   va_list args;
04112   va_start(args, pat);
04113   sv_vsetpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*));
04114   SvSETMAGIC(sv);
04115   va_end(args);
04116 }
04117 
04118 #endif
04119 #endif
04120 #endif
04121 
04122 #ifndef sv_setpvf_mg
04123 #  ifdef PERL_IMPLICIT_CONTEXT
04124 #    define sv_setpvf_mg   Perl_sv_setpvf_mg_nocontext
04125 #  else
04126 #    define sv_setpvf_mg   Perl_sv_setpvf_mg
04127 #  endif
04128 #endif
04129 
04130 /* sv_vsetpvf_mg depends on sv_vsetpvfn */
04131 #if ((PERL_VERSION > 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION >= 0))) && !defined(sv_vsetpvf_mg)
04132 #  define sv_vsetpvf_mg(sv, pat, args)                                     \
04133    STMT_START {                                                            \
04134      sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*));  \
04135      SvSETMAGIC(sv);                                                       \
04136    } STMT_END
04137 #endif
04138 #ifndef SvGETMAGIC
04139 #  define SvGETMAGIC(x)                  STMT_START { if (SvGMAGICAL(x)) mg_get(x); } STMT_END
04140 #endif
04141 #ifndef PERL_MAGIC_sv
04142 #  define PERL_MAGIC_sv                  '\0'
04143 #endif
04144 
04145 #ifndef PERL_MAGIC_overload
04146 #  define PERL_MAGIC_overload            'A'
04147 #endif
04148 
04149 #ifndef PERL_MAGIC_overload_elem
04150 #  define PERL_MAGIC_overload_elem       'a'
04151 #endif
04152 
04153 #ifndef PERL_MAGIC_overload_table
04154 #  define PERL_MAGIC_overload_table      'c'
04155 #endif
04156 
04157 #ifndef PERL_MAGIC_bm
04158 #  define PERL_MAGIC_bm                  'B'
04159 #endif
04160 
04161 #ifndef PERL_MAGIC_regdata
04162 #  define PERL_MAGIC_regdata             'D'
04163 #endif
04164 
04165 #ifndef PERL_MAGIC_regdatum
04166 #  define PERL_MAGIC_regdatum            'd'
04167 #endif
04168 
04169 #ifndef PERL_MAGIC_env
04170 #  define PERL_MAGIC_env                 'E'
04171 #endif
04172 
04173 #ifndef PERL_MAGIC_envelem
04174 #  define PERL_MAGIC_envelem             'e'
04175 #endif
04176 
04177 #ifndef PERL_MAGIC_fm
04178 #  define PERL_MAGIC_fm                  'f'
04179 #endif
04180 
04181 #ifndef PERL_MAGIC_regex_global
04182 #  define PERL_MAGIC_regex_global        'g'
04183 #endif
04184 
04185 #ifndef PERL_MAGIC_isa
04186 #  define PERL_MAGIC_isa                 'I'
04187 #endif
04188 
04189 #ifndef PERL_MAGIC_isaelem
04190 #  define PERL_MAGIC_isaelem             'i'
04191 #endif
04192 
04193 #ifndef PERL_MAGIC_nkeys
04194 #  define PERL_MAGIC_nkeys               'k'
04195 #endif
04196 
04197 #ifndef PERL_MAGIC_dbfile
04198 #  define PERL_MAGIC_dbfile              'L'
04199 #endif
04200 
04201 #ifndef PERL_MAGIC_dbline
04202 #  define PERL_MAGIC_dbline              'l'
04203 #endif
04204 
04205 #ifndef PERL_MAGIC_mutex
04206 #  define PERL_MAGIC_mutex               'm'
04207 #endif
04208 
04209 #ifndef PERL_MAGIC_shared
04210 #  define PERL_MAGIC_shared              'N'
04211 #endif
04212 
04213 #ifndef PERL_MAGIC_shared_scalar
04214 #  define PERL_MAGIC_shared_scalar       'n'
04215 #endif
04216 
04217 #ifndef PERL_MAGIC_collxfrm
04218 #  define PERL_MAGIC_collxfrm            'o'
04219 #endif
04220 
04221 #ifndef PERL_MAGIC_tied
04222 #  define PERL_MAGIC_tied                'P'
04223 #endif
04224 
04225 #ifndef PERL_MAGIC_tiedelem
04226 #  define PERL_MAGIC_tiedelem            'p'
04227 #endif
04228 
04229 #ifndef PERL_MAGIC_tiedscalar
04230 #  define PERL_MAGIC_tiedscalar          'q'
04231 #endif
04232 
04233 #ifndef PERL_MAGIC_qr
04234 #  define PERL_MAGIC_qr                  'r'
04235 #endif
04236 
04237 #ifndef PERL_MAGIC_sig
04238 #  define PERL_MAGIC_sig                 'S'
04239 #endif
04240 
04241 #ifndef PERL_MAGIC_sigelem
04242 #  define PERL_MAGIC_sigelem             's'
04243 #endif
04244 
04245 #ifndef PERL_MAGIC_taint
04246 #  define PERL_MAGIC_taint               't'
04247 #endif
04248 
04249 #ifndef PERL_MAGIC_uvar
04250 #  define PERL_MAGIC_uvar                'U'
04251 #endif
04252 
04253 #ifndef PERL_MAGIC_uvar_elem
04254 #  define PERL_MAGIC_uvar_elem           'u'
04255 #endif
04256 
04257 #ifndef PERL_MAGIC_vstring
04258 #  define PERL_MAGIC_vstring             'V'
04259 #endif
04260 
04261 #ifndef PERL_MAGIC_vec
04262 #  define PERL_MAGIC_vec                 'v'
04263 #endif
04264 
04265 #ifndef PERL_MAGIC_utf8
04266 #  define PERL_MAGIC_utf8                'w'
04267 #endif
04268 
04269 #ifndef PERL_MAGIC_substr
04270 #  define PERL_MAGIC_substr              'x'
04271 #endif
04272 
04273 #ifndef PERL_MAGIC_defelem
04274 #  define PERL_MAGIC_defelem             'y'
04275 #endif
04276 
04277 #ifndef PERL_MAGIC_glob
04278 #  define PERL_MAGIC_glob                '*'
04279 #endif
04280 
04281 #ifndef PERL_MAGIC_arylen
04282 #  define PERL_MAGIC_arylen              '#'
04283 #endif
04284 
04285 #ifndef PERL_MAGIC_pos
04286 #  define PERL_MAGIC_pos                 '.'
04287 #endif
04288 
04289 #ifndef PERL_MAGIC_backref
04290 #  define PERL_MAGIC_backref             '<'
04291 #endif
04292 
04293 #ifndef PERL_MAGIC_ext
04294 #  define PERL_MAGIC_ext                 '~'
04295 #endif
04296 
04297 /* That's the best we can do... */
04298 #ifndef SvPV_force_nomg
04299 #  define SvPV_force_nomg                SvPV_force
04300 #endif
04301 
04302 #ifndef SvPV_nomg
04303 #  define SvPV_nomg                      SvPV
04304 #endif
04305 
04306 #ifndef sv_catpvn_nomg
04307 #  define sv_catpvn_nomg                 sv_catpvn
04308 #endif
04309 
04310 #ifndef sv_catsv_nomg
04311 #  define sv_catsv_nomg                  sv_catsv
04312 #endif
04313 
04314 #ifndef sv_setsv_nomg
04315 #  define sv_setsv_nomg                  sv_setsv
04316 #endif
04317 
04318 #ifndef sv_pvn_nomg
04319 #  define sv_pvn_nomg                    sv_pvn
04320 #endif
04321 
04322 #ifndef SvIV_nomg
04323 #  define SvIV_nomg                      SvIV
04324 #endif
04325 
04326 #ifndef SvUV_nomg
04327 #  define SvUV_nomg                      SvUV
04328 #endif
04329 
04330 #ifndef sv_catpv_mg
04331 #  define sv_catpv_mg(sv, ptr)          \
04332    STMT_START {                         \
04333      SV *TeMpSv = sv;                   \
04334      sv_catpv(TeMpSv,ptr);              \
04335      SvSETMAGIC(TeMpSv);                \
04336    } STMT_END
04337 #endif
04338 
04339 #ifndef sv_catpvn_mg
04340 #  define sv_catpvn_mg(sv, ptr, len)    \
04341    STMT_START {                         \
04342      SV *TeMpSv = sv;                   \
04343      sv_catpvn(TeMpSv,ptr,len);         \
04344      SvSETMAGIC(TeMpSv);                \
04345    } STMT_END
04346 #endif
04347 
04348 #ifndef sv_catsv_mg
04349 #  define sv_catsv_mg(dsv, ssv)         \
04350    STMT_START {                         \
04351      SV *TeMpSv = dsv;                  \
04352      sv_catsv(TeMpSv,ssv);              \
04353      SvSETMAGIC(TeMpSv);                \
04354    } STMT_END
04355 #endif
04356 
04357 #ifndef sv_setiv_mg
04358 #  define sv_setiv_mg(sv, i)            \
04359    STMT_START {                         \
04360      SV *TeMpSv = sv;                   \
04361      sv_setiv(TeMpSv,i);                \
04362      SvSETMAGIC(TeMpSv);                \
04363    } STMT_END
04364 #endif
04365 
04366 #ifndef sv_setnv_mg
04367 #  define sv_setnv_mg(sv, num)          \
04368    STMT_START {                         \
04369      SV *TeMpSv = sv;                   \
04370      sv_setnv(TeMpSv,num);              \
04371      SvSETMAGIC(TeMpSv);                \
04372    } STMT_END
04373 #endif
04374 
04375 #ifndef sv_setpv_mg
04376 #  define sv_setpv_mg(sv, ptr)          \
04377    STMT_START {                         \
04378      SV *TeMpSv = sv;                   \
04379      sv_setpv(TeMpSv,ptr);              \
04380      SvSETMAGIC(TeMpSv);                \
04381    } STMT_END
04382 #endif
04383 
04384 #ifndef sv_setpvn_mg
04385 #  define sv_setpvn_mg(sv, ptr, len)    \
04386    STMT_START {                         \
04387      SV *TeMpSv = sv;                   \
04388      sv_setpvn(TeMpSv,ptr,len);         \
04389      SvSETMAGIC(TeMpSv);                \
04390    } STMT_END
04391 #endif
04392 
04393 #ifndef sv_setsv_mg
04394 #  define sv_setsv_mg(dsv, ssv)         \
04395    STMT_START {                         \
04396      SV *TeMpSv = dsv;                  \
04397      sv_setsv(TeMpSv,ssv);              \
04398      SvSETMAGIC(TeMpSv);                \
04399    } STMT_END
04400 #endif
04401 
04402 #ifndef sv_setuv_mg
04403 #  define sv_setuv_mg(sv, i)            \
04404    STMT_START {                         \
04405      SV *TeMpSv = sv;                   \
04406      sv_setuv(TeMpSv,i);                \
04407      SvSETMAGIC(TeMpSv);                \
04408    } STMT_END
04409 #endif
04410 
04411 #ifndef sv_usepvn_mg
04412 #  define sv_usepvn_mg(sv, ptr, len)    \
04413    STMT_START {                         \
04414      SV *TeMpSv = sv;                   \
04415      sv_usepvn(TeMpSv,ptr,len);         \
04416      SvSETMAGIC(TeMpSv);                \
04417    } STMT_END
04418 #endif
04419 
04420 #ifdef USE_ITHREADS
04421 #ifndef CopFILE
04422 #  define CopFILE(c)                     ((c)->cop_file)
04423 #endif
04424 
04425 #ifndef CopFILEGV
04426 #  define CopFILEGV(c)                   (CopFILE(c) ? gv_fetchfile(CopFILE(c)) : Nullgv)
04427 #endif
04428 
04429 #ifndef CopFILE_set
04430 #  define CopFILE_set(c,pv)              ((c)->cop_file = savepv(pv))
04431 #endif
04432 
04433 #ifndef CopFILESV
04434 #  define CopFILESV(c)                   (CopFILE(c) ? GvSV(gv_fetchfile(CopFILE(c))) : Nullsv)
04435 #endif
04436 
04437 #ifndef CopFILEAV
04438 #  define CopFILEAV(c)                   (CopFILE(c) ? GvAV(gv_fetchfile(CopFILE(c))) : Nullav)
04439 #endif
04440 
04441 #ifndef CopSTASHPV
04442 #  define CopSTASHPV(c)                  ((c)->cop_stashpv)
04443 #endif
04444 
04445 #ifndef CopSTASHPV_set
04446 #  define CopSTASHPV_set(c,pv)           ((c)->cop_stashpv = ((pv) ? savepv(pv) : Nullch))
04447 #endif
04448 
04449 #ifndef CopSTASH
04450 #  define CopSTASH(c)                    (CopSTASHPV(c) ? gv_stashpv(CopSTASHPV(c),GV_ADD) : Nullhv)
04451 #endif
04452 
04453 #ifndef CopSTASH_set
04454 #  define CopSTASH_set(c,hv)             CopSTASHPV_set(c, (hv) ? HvNAME(hv) : Nullch)
04455 #endif
04456 
04457 #ifndef CopSTASH_eq
04458 #  define CopSTASH_eq(c,hv)              ((hv) && (CopSTASHPV(c) == HvNAME(hv) \
04459                                    || (CopSTASHPV(c) && HvNAME(hv) \
04460                                    && strEQ(CopSTASHPV(c), HvNAME(hv)))))
04461 #endif
04462 
04463 #else
04464 #ifndef CopFILEGV
04465 #  define CopFILEGV(c)                   ((c)->cop_filegv)
04466 #endif
04467 
04468 #ifndef CopFILEGV_set
04469 #  define CopFILEGV_set(c,gv)            ((c)->cop_filegv = (GV*)SvREFCNT_inc(gv))
04470 #endif
04471 
04472 #ifndef CopFILE_set
04473 #  define CopFILE_set(c,pv)              CopFILEGV_set((c), gv_fetchfile(pv))
04474 #endif
04475 
04476 #ifndef CopFILESV
04477 #  define CopFILESV(c)                   (CopFILEGV(c) ? GvSV(CopFILEGV(c)) : Nullsv)
04478 #endif
04479 
04480 #ifndef CopFILEAV
04481 #  define CopFILEAV(c)                   (CopFILEGV(c) ? GvAV(CopFILEGV(c)) : Nullav)
04482 #endif
04483 
04484 #ifndef CopFILE
04485 #  define CopFILE(c)                     (CopFILESV(c) ? SvPVX(CopFILESV(c)) : Nullch)
04486 #endif
04487 
04488 #ifndef CopSTASH
04489 #  define CopSTASH(c)                    ((c)->cop_stash)
04490 #endif
04491 
04492 #ifndef CopSTASH_set
04493 #  define CopSTASH_set(c,hv)             ((c)->cop_stash = (hv))
04494 #endif
04495 
04496 #ifndef CopSTASHPV
04497 #  define CopSTASHPV(c)                  (CopSTASH(c) ? HvNAME(CopSTASH(c)) : Nullch)
04498 #endif
04499 
04500 #ifndef CopSTASHPV_set
04501 #  define CopSTASHPV_set(c,pv)           CopSTASH_set((c), gv_stashpv(pv,GV_ADD))
04502 #endif
04503 
04504 #ifndef CopSTASH_eq
04505 #  define CopSTASH_eq(c,hv)              (CopSTASH(c) == (hv))
04506 #endif
04507 
04508 #endif /* USE_ITHREADS */
04509 #ifndef IN_PERL_COMPILETIME
04510 #  define IN_PERL_COMPILETIME            (PL_curcop == &PL_compiling)
04511 #endif
04512 
04513 #ifndef IN_LOCALE_RUNTIME
04514 #  define IN_LOCALE_RUNTIME              (PL_curcop->op_private & HINT_LOCALE)
04515 #endif
04516 
04517 #ifndef IN_LOCALE_COMPILETIME
04518 #  define IN_LOCALE_COMPILETIME          (PL_hints & HINT_LOCALE)
04519 #endif
04520 
04521 #ifndef IN_LOCALE
04522 #  define IN_LOCALE                      (IN_PERL_COMPILETIME ? IN_LOCALE_COMPILETIME : IN_LOCALE_RUNTIME)
04523 #endif
04524 #ifndef IS_NUMBER_IN_UV
04525 #  define IS_NUMBER_IN_UV                0x01
04526 #endif
04527 
04528 #ifndef IS_NUMBER_GREATER_THAN_UV_MAX
04529 #  define IS_NUMBER_GREATER_THAN_UV_MAX  0x02
04530 #endif
04531 
04532 #ifndef IS_NUMBER_NOT_INT
04533 #  define IS_NUMBER_NOT_INT              0x04
04534 #endif
04535 
04536 #ifndef IS_NUMBER_NEG
04537 #  define IS_NUMBER_NEG                  0x08
04538 #endif
04539 
04540 #ifndef IS_NUMBER_INFINITY
04541 #  define IS_NUMBER_INFINITY             0x10
04542 #endif
04543 
04544 #ifndef IS_NUMBER_NAN
04545 #  define IS_NUMBER_NAN                  0x20
04546 #endif
04547 
04548 /* GROK_NUMERIC_RADIX depends on grok_numeric_radix */
04549 #ifndef GROK_NUMERIC_RADIX
04550 #  define GROK_NUMERIC_RADIX(sp, send)   grok_numeric_radix(sp, send)
04551 #endif
04552 #ifndef PERL_SCAN_GREATER_THAN_UV_MAX
04553 #  define PERL_SCAN_GREATER_THAN_UV_MAX  0x02
04554 #endif
04555 
04556 #ifndef PERL_SCAN_SILENT_ILLDIGIT
04557 #  define PERL_SCAN_SILENT_ILLDIGIT      0x04
04558 #endif
04559 
04560 #ifndef PERL_SCAN_ALLOW_UNDERSCORES
04561 #  define PERL_SCAN_ALLOW_UNDERSCORES    0x01
04562 #endif
04563 
04564 #ifndef PERL_SCAN_DISALLOW_PREFIX
04565 #  define PERL_SCAN_DISALLOW_PREFIX      0x02
04566 #endif
04567 
04568 #ifndef grok_numeric_radix
04569 #if defined(NEED_grok_numeric_radix)
04570 static bool DPPP_(my_grok_numeric_radix)(pTHX_ const char ** sp, const char * send);
04571 static
04572 #else
04573 extern bool DPPP_(my_grok_numeric_radix)(pTHX_ const char ** sp, const char * send);
04574 #endif
04575 
04576 #ifdef grok_numeric_radix
04577 #  undef grok_numeric_radix
04578 #endif
04579 #define grok_numeric_radix(a,b) DPPP_(my_grok_numeric_radix)(aTHX_ a,b)
04580 #define Perl_grok_numeric_radix DPPP_(my_grok_numeric_radix)
04581 
04582 #if defined(NEED_grok_numeric_radix) || defined(NEED_grok_numeric_radix_GLOBAL)
04583 bool
04584 DPPP_(my_grok_numeric_radix)(pTHX_ const char **sp, const char *send)
04585 {
04586 #ifdef USE_LOCALE_NUMERIC
04587 #ifdef PL_numeric_radix_sv
04588     if (PL_numeric_radix_sv && IN_LOCALE) {
04589         STRLEN len;
04590         char* radix = SvPV(PL_numeric_radix_sv, len);
04591         if (*sp + len <= send && memEQ(*sp, radix, len)) {
04592             *sp += len;
04593             return TRUE;
04594         }
04595     }
04596 #else
04597     /* older perls don't have PL_numeric_radix_sv so the radix
04598      * must manually be requested from locale.h
04599      */
04600 #include <locale.h>
04601     dTHR;  /* needed for older threaded perls */
04602     struct lconv *lc = localeconv();
04603     char *radix = lc->decimal_point;
04604     if (radix && IN_LOCALE) {
04605         STRLEN len = strlen(radix);
04606         if (*sp + len <= send && memEQ(*sp, radix, len)) {
04607             *sp += len;
04608             return TRUE;
04609         }
04610     }
04611 #endif
04612 #endif /* USE_LOCALE_NUMERIC */
04613     /* always try "." if numeric radix didn't match because
04614      * we may have data from different locales mixed */
04615     if (*sp < send && **sp == '.') {
04616         ++*sp;
04617         return TRUE;
04618     }
04619     return FALSE;
04620 }
04621 #endif
04622 #endif
04623 
04624 /* grok_number depends on grok_numeric_radix */
04625 
04626 #ifndef grok_number
04627 #if defined(NEED_grok_number)
04628 static int DPPP_(my_grok_number)(pTHX_ const char * pv, STRLEN len, UV * valuep);
04629 static
04630 #else
04631 extern int DPPP_(my_grok_number)(pTHX_ const char * pv, STRLEN len, UV * valuep);
04632 #endif
04633 
04634 #ifdef grok_number
04635 #  undef grok_number
04636 #endif
04637 #define grok_number(a,b,c) DPPP_(my_grok_number)(aTHX_ a,b,c)
04638 #define Perl_grok_number DPPP_(my_grok_number)
04639 
04640 #if defined(NEED_grok_number) || defined(NEED_grok_number_GLOBAL)
04641 int
04642 DPPP_(my_grok_number)(pTHX_ const char *pv, STRLEN len, UV *valuep)
04643 {
04644   const char *s = pv;
04645   const char *send = pv + len;
04646   const UV max_div_10 = UV_MAX / 10;
04647   const char max_mod_10 = UV_MAX % 10;
04648   int numtype = 0;
04649   int sawinf = 0;
04650   int sawnan = 0;
04651 
04652   while (s < send && isSPACE(*s))
04653     s++;
04654   if (s == send) {
04655     return 0;
04656   } else if (*s == '-') {
04657     s++;
04658     numtype = IS_NUMBER_NEG;
04659   }
04660   else if (*s == '+')
04661   s++;
04662 
04663   if (s == send)
04664     return 0;
04665 
04666   /* next must be digit or the radix separator or beginning of infinity */
04667   if (isDIGIT(*s)) {
04668     /* UVs are at least 32 bits, so the first 9 decimal digits cannot
04669        overflow.  */
04670     UV value = *s - '0';
04671     /* This construction seems to be more optimiser friendly.
04672        (without it gcc does the isDIGIT test and the *s - '0' separately)
04673        With it gcc on arm is managing 6 instructions (6 cycles) per digit.
04674        In theory the optimiser could deduce how far to unroll the loop
04675        before checking for overflow.  */
04676     if (++s < send) {
04677       int digit = *s - '0';
04678       if (digit >= 0 && digit <= 9) {
04679         value = value * 10 + digit;
04680         if (++s < send) {
04681           digit = *s - '0';
04682           if (digit >= 0 && digit <= 9) {
04683             value = value * 10 + digit;
04684             if (++s < send) {
04685               digit = *s - '0';
04686               if (digit >= 0 && digit <= 9) {
04687                 value = value * 10 + digit;
04688               if (++s < send) {
04689                   digit = *s - '0';
04690                   if (digit >= 0 && digit <= 9) {
04691                     value = value * 10 + digit;
04692                     if (++s < send) {
04693                       digit = *s - '0';
04694                       if (digit >= 0 && digit <= 9) {
04695                         value = value * 10 + digit;
04696                         if (++s < send) {
04697                           digit = *s - '0';
04698                           if (digit >= 0 && digit <= 9) {
04699                             value = value * 10 + digit;
04700                             if (++s < send) {
04701                               digit = *s - '0';
04702                               if (digit >= 0 && digit <= 9) {
04703                                 value = value * 10 + digit;
04704                                 if (++s < send) {
04705                                   digit = *s - '0';
04706                                   if (digit >= 0 && digit <= 9) {
04707                                     value = value * 10 + digit;
04708                                     if (++s < send) {
04709                                       /* Now got 9 digits, so need to check
04710                                          each time for overflow.  */
04711                                       digit = *s - '0';
04712                                       while (digit >= 0 && digit <= 9
04713                                              && (value < max_div_10
04714                                                  || (value == max_div_10
04715                                                      && digit <= max_mod_10))) {
04716                                         value = value * 10 + digit;
04717                                         if (++s < send)
04718                                           digit = *s - '0';
04719                                         else
04720                                           break;
04721                                       }
04722                                       if (digit >= 0 && digit <= 9
04723                                           && (s < send)) {
04724                                         /* value overflowed.
04725                                            skip the remaining digits, don't
04726                                            worry about setting *valuep.  */
04727                                         do {
04728                                           s++;
04729                                         } while (s < send && isDIGIT(*s));
04730                                         numtype |=
04731                                           IS_NUMBER_GREATER_THAN_UV_MAX;
04732                                         goto skip_value;
04733                                       }
04734                                     }
04735                                   }
04736                             }
04737                               }
04738                             }
04739                           }
04740                         }
04741                       }
04742                     }
04743                   }
04744                 }
04745               }
04746             }
04747           }
04748        }
04749       }
04750     }
04751     numtype |= IS_NUMBER_IN_UV;
04752     if (valuep)
04753       *valuep = value;
04754 
04755   skip_value:
04756     if (GROK_NUMERIC_RADIX(&s, send)) {
04757       numtype |= IS_NUMBER_NOT_INT;
04758       while (s < send && isDIGIT(*s))  /* optional digits after the radix */
04759         s++;
04760     }
04761   }
04762   else if (GROK_NUMERIC_RADIX(&s, send)) {
04763     numtype |= IS_NUMBER_NOT_INT | IS_NUMBER_IN_UV; /* valuep assigned below */
04764     /* no digits before the radix means we need digits after it */
04765     if (s < send && isDIGIT(*s)) {
04766       do {
04767         s++;
04768       } while (s < send && isDIGIT(*s));
04769       if (valuep) {
04770         /* integer approximation is valid - it's 0.  */
04771         *valuep = 0;
04772       }
04773     }
04774     else
04775       return 0;
04776   } else if (*s == 'I' || *s == 'i') {
04777     s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
04778     s++; if (s == send || (*s != 'F' && *s != 'f')) return 0;
04779     s++; if (s < send && (*s == 'I' || *s == 'i')) {
04780       s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
04781       s++; if (s == send || (*s != 'I' && *s != 'i')) return 0;
04782       s++; if (s == send || (*s != 'T' && *s != 't')) return 0;
04783       s++; if (s == send || (*s != 'Y' && *s != 'y')) return 0;
04784       s++;
04785     }
04786     sawinf = 1;
04787   } else if (*s == 'N' || *s == 'n') {
04788     /* XXX TODO: There are signaling NaNs and quiet NaNs. */
04789     s++; if (s == send || (*s != 'A' && *s != 'a')) return 0;
04790     s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
04791     s++;
04792     sawnan = 1;
04793   } else
04794     return 0;
04795 
04796   if (sawinf) {
04797     numtype &= IS_NUMBER_NEG; /* Keep track of sign  */
04798     numtype |= IS_NUMBER_INFINITY | IS_NUMBER_NOT_INT;
04799   } else if (sawnan) {
04800     numtype &= IS_NUMBER_NEG; /* Keep track of sign  */
04801     numtype |= IS_NUMBER_NAN | IS_NUMBER_NOT_INT;
04802   } else if (s < send) {
04803     /* we can have an optional exponent part */
04804     if (*s == 'e' || *s == 'E') {
04805       /* The only flag we keep is sign.  Blow away any "it's UV"  */
04806       numtype &= IS_NUMBER_NEG;
04807       numtype |= IS_NUMBER_NOT_INT;
04808       s++;
04809       if (s < send && (*s == '-' || *s == '+'))
04810         s++;
04811       if (s < send && isDIGIT(*s)) {
04812         do {
04813           s++;
04814         } while (s < send && isDIGIT(*s));
04815       }
04816       else
04817       return 0;
04818     }
04819   }
04820   while (s < send && isSPACE(*s))
04821     s++;
04822   if (s >= send)
04823     return numtype;
04824   if (len == 10 && memEQ(pv, "0 but true", 10)) {
04825     if (valuep)
04826       *valuep = 0;
04827     return IS_NUMBER_IN_UV;
04828   }
04829   return 0;
04830 }
04831 #endif
04832 #endif
04833 
04834 /*
04835  * The grok_* routines have been modified to use warn() instead of
04836  * Perl_warner(). Also, 'hexdigit' was the former name of PL_hexdigit,
04837  * which is why the stack variable has been renamed to 'xdigit'.
04838  */
04839 
04840 #ifndef grok_bin
04841 #if defined(NEED_grok_bin)
04842 static UV DPPP_(my_grok_bin)(pTHX_ char *start, STRLEN *len_p, I32 *flags, NV *result);
04843 static
04844 #else
04845 extern UV DPPP_(my_grok_bin)(pTHX_ char *start, STRLEN *len_p, I32 *flags, NV *result);
04846 #endif
04847 
04848 #ifdef grok_bin
04849 #  undef grok_bin
04850 #endif
04851 #define grok_bin(a,b,c,d) DPPP_(my_grok_bin)(aTHX_ a,b,c,d)
04852 #define Perl_grok_bin DPPP_(my_grok_bin)
04853 
04854 #if defined(NEED_grok_bin) || defined(NEED_grok_bin_GLOBAL)
04855 UV
04856 DPPP_(my_grok_bin)(pTHX_ char *start, STRLEN *len_p, I32 *flags, NV *result)
04857 {
04858     const char *s = start;
04859     STRLEN len = *len_p;
04860     UV value = 0;
04861     NV value_nv = 0;
04862 
04863     const UV max_div_2 = UV_MAX / 2;
04864     bool allow_underscores = *flags & PERL_SCAN_ALLOW_UNDERSCORES;
04865     bool overflowed = FALSE;
04866 
04867     if (!(*flags & PERL_SCAN_DISALLOW_PREFIX)) {
04868         /* strip off leading b or 0b.
04869            for compatibility silently suffer "b" and "0b" as valid binary
04870            numbers. */
04871         if (len >= 1) {
04872             if (s[0] == 'b') {
04873                 s++;
04874                 len--;
04875             }
04876             else if (len >= 2 && s[0] == '0' && s[1] == 'b') {
04877                 s+=2;
04878                 len-=2;
04879             }
04880         }
04881     }
04882 
04883     for (; len-- && *s; s++) {
04884         char bit = *s;
04885         if (bit == '0' || bit == '1') {
04886             /* Write it in this wonky order with a goto to attempt to get the
04887                compiler to make the common case integer-only loop pretty tight.
04888                With gcc seems to be much straighter code than old scan_bin.  */
04889           redo:
04890             if (!overflowed) {
04891                 if (value <= max_div_2) {
04892                     value = (value << 1) | (bit - '0');
04893                     continue;
04894                 }
04895                 /* Bah. We're just overflowed.  */
04896                 warn("Integer overflow in binary number");
04897                 overflowed = TRUE;
04898                 value_nv = (NV) value;
04899             }
04900             value_nv *= 2.0;
04901            /* If an NV has not enough bits in its mantissa to
04902             * represent a UV this summing of small low-order numbers
04903             * is a waste of time (because the NV cannot preserve
04904             * the low-order bits anyway): we could just remember when
04905             * did we overflow and in the end just multiply value_nv by the
04906             * right amount. */
04907             value_nv += (NV)(bit - '0');
04908             continue;
04909         }
04910         if (bit == '_' && len && allow_underscores && (bit = s[1])
04911             && (bit == '0' || bit == '1'))
04912            {
04913               --len;
04914               ++s;
04915                 goto redo;
04916            }
04917         if (!(*flags & PERL_SCAN_SILENT_ILLDIGIT))
04918             warn("Illegal binary digit '%c' ignored", *s);
04919         break;
04920     }
04921 
04922     if (   ( overflowed && value_nv > 4294967295.0)
04923 #if UVSIZE > 4
04924        || (!overflowed && value > 0xffffffff  )
04925 #endif
04926        ) {
04927        warn("Binary number > 0b11111111111111111111111111111111 non-portable");
04928     }
04929     *len_p = s - start;
04930     if (!overflowed) {
04931         *flags = 0;
04932         return value;
04933     }
04934     *flags = PERL_SCAN_GREATER_THAN_UV_MAX;
04935     if (result)
04936         *result = value_nv;
04937     return UV_MAX;
04938 }
04939 #endif
04940 #endif
04941 
04942 #ifndef grok_hex
04943 #if defined(NEED_grok_hex)
04944 static UV DPPP_(my_grok_hex)(pTHX_ char *start, STRLEN *len_p, I32 *flags, NV *result);
04945 static
04946 #else
04947 extern UV DPPP_(my_grok_hex)(pTHX_ char *start, STRLEN *len_p, I32 *flags, NV *result);
04948 #endif
04949 
04950 #ifdef grok_hex
04951 #  undef grok_hex
04952 #endif
04953 #define grok_hex(a,b,c,d) DPPP_(my_grok_hex)(aTHX_ a,b,c,d)
04954 #define Perl_grok_hex DPPP_(my_grok_hex)
04955 
04956 #if defined(NEED_grok_hex) || defined(NEED_grok_hex_GLOBAL)
04957 UV
04958 DPPP_(my_grok_hex)(pTHX_ char *start, STRLEN *len_p, I32 *flags, NV *result)
04959 {
04960     const char *s = start;
04961     STRLEN len = *len_p;
04962     UV value = 0;
04963     NV value_nv = 0;
04964 
04965     const UV max_div_16 = UV_MAX / 16;
04966     bool allow_underscores = *flags & PERL_SCAN_ALLOW_UNDERSCORES;
04967     bool overflowed = FALSE;
04968     const char *xdigit;
04969 
04970     if (!(*flags & PERL_SCAN_DISALLOW_PREFIX)) {
04971         /* strip off leading x or 0x.
04972            for compatibility silently suffer "x" and "0x" as valid hex numbers.
04973         */
04974         if (len >= 1) {
04975             if (s[0] == 'x') {
04976                 s++;
04977                 len--;
04978             }
04979             else if (len >= 2 && s[0] == '0' && s[1] == 'x') {
04980                 s+=2;
04981                 len-=2;
04982             }
04983         }
04984     }
04985 
04986     for (; len-- && *s; s++) {
04987        xdigit = strchr((char *) PL_hexdigit, *s);
04988         if (xdigit) {
04989             /* Write it in this wonky order with a goto to attempt to get the
04990                compiler to make the common case integer-only loop pretty tight.
04991                With gcc seems to be much straighter code than old scan_hex.  */
04992           redo:
04993             if (!overflowed) {
04994                 if (value <= max_div_16) {
04995                     value = (value << 4) | ((xdigit - PL_hexdigit) & 15);
04996                     continue;
04997                 }
04998                 warn("Integer overflow in hexadecimal number");
04999                 overflowed = TRUE;
05000                 value_nv = (NV) value;
05001             }
05002             value_nv *= 16.0;
05003            /* If an NV has not enough bits in its mantissa to
05004             * represent a UV this summing of small low-order numbers
05005             * is a waste of time (because the NV cannot preserve
05006             * the low-order bits anyway): we could just remember when
05007             * did we overflow and in the end just multiply value_nv by the
05008             * right amount of 16-tuples. */
05009             value_nv += (NV)((xdigit - PL_hexdigit) & 15);
05010             continue;
05011         }
05012         if (*s == '_' && len && allow_underscores && s[1]
05013               && (xdigit = strchr((char *) PL_hexdigit, s[1])))
05014            {
05015               --len;
05016               ++s;
05017                 goto redo;
05018            }
05019         if (!(*flags & PERL_SCAN_SILENT_ILLDIGIT))
05020             warn("Illegal hexadecimal digit '%c' ignored", *s);
05021         break;
05022     }
05023 
05024     if (   ( overflowed && value_nv > 4294967295.0)
05025 #if UVSIZE > 4
05026        || (!overflowed && value > 0xffffffff  )
05027 #endif
05028        ) {
05029        warn("Hexadecimal number > 0xffffffff non-portable");
05030     }
05031     *len_p = s - start;
05032     if (!overflowed) {
05033         *flags = 0;
05034         return value;
05035     }
05036     *flags = PERL_SCAN_GREATER_THAN_UV_MAX;
05037     if (result)
05038         *result = value_nv;
05039     return UV_MAX;
05040 }
05041 #endif
05042 #endif
05043 
05044 #ifndef grok_oct
05045 #if defined(NEED_grok_oct)
05046 static UV DPPP_(my_grok_oct)(pTHX_ char *start, STRLEN *len_p, I32 *flags, NV *result);
05047 static
05048 #else
05049 extern UV DPPP_(my_grok_oct)(pTHX_ char *start, STRLEN *len_p, I32 *flags, NV *result);
05050 #endif
05051 
05052 #ifdef grok_oct
05053 #  undef grok_oct
05054 #endif
05055 #define grok_oct(a,b,c,d) DPPP_(my_grok_oct)(aTHX_ a,b,c,d)
05056 #define Perl_grok_oct DPPP_(my_grok_oct)
05057 
05058 #if defined(NEED_grok_oct) || defined(NEED_grok_oct_GLOBAL)
05059 UV
05060 DPPP_(my_grok_oct)(pTHX_ char *start, STRLEN *len_p, I32 *flags, NV *result)
05061 {
05062     const char *s = start;
05063     STRLEN len = *len_p;
05064     UV value = 0;
05065     NV value_nv = 0;
05066 
05067     const UV max_div_8 = UV_MAX / 8;
05068     bool allow_underscores = *flags & PERL_SCAN_ALLOW_UNDERSCORES;
05069     bool overflowed = FALSE;
05070 
05071     for (; len-- && *s; s++) {
05072          /* gcc 2.95 optimiser not smart enough to figure that this subtraction
05073             out front allows slicker code.  */
05074         int digit = *s - '0';
05075         if (digit >= 0 && digit <= 7) {
05076             /* Write it in this wonky order with a goto to attempt to get the
05077                compiler to make the common case integer-only loop pretty tight.
05078             */
05079           redo:
05080             if (!overflowed) {
05081                 if (value <= max_div_8) {
05082                     value = (value << 3) | digit;
05083                     continue;
05084                 }
05085                 /* Bah. We're just overflowed.  */
05086                 warn("Integer overflow in octal number");
05087                 overflowed = TRUE;
05088                 value_nv = (NV) value;
05089             }
05090             value_nv *= 8.0;
05091            /* If an NV has not enough bits in its mantissa to
05092             * represent a UV this summing of small low-order numbers
05093             * is a waste of time (because the NV cannot preserve
05094             * the low-order bits anyway): we could just remember when
05095             * did we overflow and in the end just multiply value_nv by the
05096             * right amount of 8-tuples. */
05097             value_nv += (NV)digit;
05098             continue;
05099         }
05100         if (digit == ('_' - '0') && len && allow_underscores
05101             && (digit = s[1] - '0') && (digit >= 0 && digit <= 7))
05102            {
05103               --len;
05104               ++s;
05105                 goto redo;
05106            }
05107         /* Allow \octal to work the DWIM way (that is, stop scanning
05108          * as soon as non-octal characters are seen, complain only iff
05109          * someone seems to want to use the digits eight and nine). */
05110         if (digit == 8 || digit == 9) {
05111             if (!(*flags & PERL_SCAN_SILENT_ILLDIGIT))
05112                 warn("Illegal octal digit '%c' ignored", *s);
05113         }
05114         break;
05115     }
05116 
05117     if (   ( overflowed && value_nv > 4294967295.0)
05118 #if UVSIZE > 4
05119        || (!overflowed && value > 0xffffffff  )
05120 #endif
05121        ) {
05122        warn("Octal number > 037777777777 non-portable");
05123     }
05124     *len_p = s - start;
05125     if (!overflowed) {
05126         *flags = 0;
05127         return value;
05128     }
05129     *flags = PERL_SCAN_GREATER_THAN_UV_MAX;
05130     if (result)
05131         *result = value_nv;
05132     return UV_MAX;
05133 }
05134 #endif
05135 #endif
05136 
05137 #ifdef NO_XSLOCKS
05138 #  ifdef dJMPENV
05139 #    define dXCPT             dJMPENV; int rEtV = 0
05140 #    define XCPT_TRY_START    JMPENV_PUSH(rEtV); if (rEtV == 0)
05141 #    define XCPT_TRY_END      JMPENV_POP;
05142 #    define XCPT_CATCH        if (rEtV != 0)
05143 #    define XCPT_RETHROW      JMPENV_JUMP(rEtV)
05144 #  else
05145 #    define dXCPT             Sigjmp_buf oldTOP; int rEtV = 0
05146 #    define XCPT_TRY_START    Copy(top_env, oldTOP, 1, Sigjmp_buf); rEtV = Sigsetjmp(top_env, 1); if (rEtV == 0)
05147 #    define XCPT_TRY_END      Copy(oldTOP, top_env, 1, Sigjmp_buf);
05148 #    define XCPT_CATCH        if (rEtV != 0)
05149 #    define XCPT_RETHROW      Siglongjmp(top_env, rEtV)
05150 #  endif
05151 #endif
05152 
05153 #endif /* _P_P_PORTABILITY_H_ */
05154 
05155 /* End of File ppport.h */