avoid indirect object syntax
[p5sagit/Devel-Declare.git] / ppport.h
1 #if 0
2 <<'SKIP';
3 #endif
4 /*
5 ----------------------------------------------------------------------
6
7     ppport.h -- Perl/Pollution/Portability Version 3.58
8
9     Automatically created by Devel::PPPort running under perl 5.031010.
10
11     Do NOT edit this file directly! -- Edit PPPort_pm.PL and the
12     includes in parts/inc/ instead.
13
14     Use 'perldoc ppport.h' to view the documentation below.
15
16 ----------------------------------------------------------------------
17
18 SKIP
19
20 =pod
21
22 =head1 NAME
23
24 ppport.h - Perl/Pollution/Portability version 3.58
25
26 =head1 SYNOPSIS
27
28   perl ppport.h [options] [source files]
29
30   Searches current directory for files if no [source files] are given
31
32   --help                      show short help
33
34   --version                   show version
35
36   --patch=file                write one patch file with changes
37   --copy=suffix               write changed copies with suffix
38   --diff=program              use diff program and options
39
40   --compat-version=version    provide compatibility with Perl version
41   --cplusplus                 accept C++ comments
42
43   --quiet                     don't output anything except fatal errors
44   --nodiag                    don't show diagnostics
45   --nohints                   don't show hints
46   --nochanges                 don't suggest changes
47   --nofilter                  don't filter input files
48
49   --strip                     strip all script and doc functionality
50                               from ppport.h
51
52   --list-provided             list provided API
53   --list-unsupported          list unsupported API
54   --api-info=name             show Perl API portability information
55
56 =head1 COMPATIBILITY
57
58 This version of F<ppport.h> is designed to support operation with Perl
59 installations back to 5.003_07, and has been tested up to 5.31.10.
60
61 =head1 OPTIONS
62
63 =head2 --help
64
65 Display a brief usage summary.
66
67 =head2 --version
68
69 Display the version of F<ppport.h>.
70
71 =head2 --patch=I<file>
72
73 If this option is given, a single patch file will be created if
74 any changes are suggested. This requires a working diff program
75 to be installed on your system.
76
77 =head2 --copy=I<suffix>
78
79 If this option is given, a copy of each file will be saved with
80 the given suffix that contains the suggested changes. This does
81 not require any external programs. Note that this does not
82 automagically add a dot between the original filename and the
83 suffix. If you want the dot, you have to include it in the option
84 argument.
85
86 If neither C<--patch> or C<--copy> are given, the default is to
87 simply print the diffs for each file. This requires either
88 C<Text::Diff> or a C<diff> program to be installed.
89
90 =head2 --diff=I<program>
91
92 Manually set the diff program and options to use. The default
93 is to use C<Text::Diff>, when installed, and output unified
94 context diffs.
95
96 =head2 --compat-version=I<version>
97
98 Tell F<ppport.h> to check for compatibility with the given
99 Perl version. The default is to check for compatibility with Perl
100 version 5.003_07. You can use this option to reduce the output
101 of F<ppport.h> if you intend to be backward compatible only
102 down to a certain Perl version.
103
104 =head2 --cplusplus
105
106 Usually, F<ppport.h> will detect C++ style comments and
107 replace them with C style comments for portability reasons.
108 Using this option instructs F<ppport.h> to leave C++
109 comments untouched.
110
111 =head2 --quiet
112
113 Be quiet. Don't print anything except fatal errors.
114
115 =head2 --nodiag
116
117 Don't output any diagnostic messages. Only portability
118 alerts will be printed.
119
120 =head2 --nohints
121
122 Don't output any hints. Hints often contain useful portability
123 notes. Warnings will still be displayed.
124
125 =head2 --nochanges
126
127 Don't suggest any changes. Only give diagnostic output and hints
128 unless these are also deactivated.
129
130 =head2 --nofilter
131
132 Don't filter the list of input files. By default, files not looking
133 like source code (i.e. not *.xs, *.c, *.cc, *.cpp or *.h) are skipped.
134
135 =head2 --strip
136
137 Strip all script and documentation functionality from F<ppport.h>.
138 This reduces the size of F<ppport.h> dramatically and may be useful
139 if you want to include F<ppport.h> in smaller modules without
140 increasing their distribution size too much.
141
142 The stripped F<ppport.h> will have a C<--unstrip> option that allows
143 you to undo the stripping, but only if an appropriate C<Devel::PPPort>
144 module is installed.
145
146 =head2 --list-provided
147
148 Lists the API elements for which compatibility is provided by
149 F<ppport.h>. Also lists if it must be explicitly requested,
150 if it has dependencies, and if there are hints or warnings for it.
151
152 =head2 --list-unsupported
153
154 Lists the API elements that are known not to be supported by
155 F<ppport.h> and below which version of Perl they probably
156 won't be available or work.
157
158 =head2 --api-info=I<name>
159
160 Show portability information for API elements matching I<name>.
161 If I<name> is surrounded by slashes, it is interpreted as a regular
162 expression.
163
164 =head1 DESCRIPTION
165
166 In order for a Perl extension (XS) module to be as portable as possible
167 across differing versions of Perl itself, certain steps need to be taken.
168
169 =over 4
170
171 =item *
172
173 Including this header is the first major one. This alone will give you
174 access to a large part of the Perl API that hasn't been available in
175 earlier Perl releases. Use
176
177     perl ppport.h --list-provided
178
179 to see which API elements are provided by ppport.h.
180
181 =item *
182
183 You should avoid using deprecated parts of the API. For example, using
184 global Perl variables without the C<PL_> prefix is deprecated. Also,
185 some API functions used to have a C<perl_> prefix. Using this form is
186 also deprecated. You can safely use the supported API, as F<ppport.h>
187 will provide wrappers for older Perl versions.
188
189 =item *
190
191 If you use one of a few functions or variables that were not present in
192 earlier versions of Perl, and that can't be provided using a macro, you
193 have to explicitly request support for these functions by adding one or
194 more C<#define>s in your source code before the inclusion of F<ppport.h>.
195
196 These functions or variables will be marked C<explicit> in the list shown
197 by C<--list-provided>.
198
199 Depending on whether you module has a single or multiple files that
200 use such functions or variables, you want either C<static> or global
201 variants.
202
203 For a C<static> function or variable (used only in a single source
204 file), use:
205
206     #define NEED_function
207     #define NEED_variable
208
209 For a global function or variable (used in multiple source files),
210 use:
211
212     #define NEED_function_GLOBAL
213     #define NEED_variable_GLOBAL
214
215 Note that you mustn't have more than one global request for the
216 same function or variable in your project.
217
218     Function / Variable       Static Request               Global Request
219     -----------------------------------------------------------------------------------------
220     caller_cx()               NEED_caller_cx               NEED_caller_cx_GLOBAL
221     croak_xs_usage()          NEED_croak_xs_usage          NEED_croak_xs_usage_GLOBAL
222     die_sv()                  NEED_die_sv                  NEED_die_sv_GLOBAL
223     eval_pv()                 NEED_eval_pv                 NEED_eval_pv_GLOBAL
224     grok_bin()                NEED_grok_bin                NEED_grok_bin_GLOBAL
225     grok_hex()                NEED_grok_hex                NEED_grok_hex_GLOBAL
226     grok_number()             NEED_grok_number             NEED_grok_number_GLOBAL
227     grok_numeric_radix()      NEED_grok_numeric_radix      NEED_grok_numeric_radix_GLOBAL
228     grok_oct()                NEED_grok_oct                NEED_grok_oct_GLOBAL
229     load_module()             NEED_load_module             NEED_load_module_GLOBAL
230     mess()                    NEED_mess                    NEED_mess_GLOBAL
231     mess_nocontext()          NEED_mess_nocontext          NEED_mess_nocontext_GLOBAL
232     mess_sv()                 NEED_mess_sv                 NEED_mess_sv_GLOBAL
233     mg_findext()              NEED_mg_findext              NEED_mg_findext_GLOBAL
234     my_snprintf()             NEED_my_snprintf             NEED_my_snprintf_GLOBAL
235     my_sprintf()              NEED_my_sprintf              NEED_my_sprintf_GLOBAL
236     my_strlcat()              NEED_my_strlcat              NEED_my_strlcat_GLOBAL
237     my_strlcpy()              NEED_my_strlcpy              NEED_my_strlcpy_GLOBAL
238     my_strnlen()              NEED_my_strnlen              NEED_my_strnlen_GLOBAL
239     newCONSTSUB()             NEED_newCONSTSUB             NEED_newCONSTSUB_GLOBAL
240     newSVpvn_share()          NEED_newSVpvn_share          NEED_newSVpvn_share_GLOBAL
241     PL_parser                 NEED_PL_parser               NEED_PL_parser_GLOBAL
242     PL_signals                NEED_PL_signals              NEED_PL_signals_GLOBAL
243     pv_display()              NEED_pv_display              NEED_pv_display_GLOBAL
244     pv_escape()               NEED_pv_escape               NEED_pv_escape_GLOBAL
245     pv_pretty()               NEED_pv_pretty               NEED_pv_pretty_GLOBAL
246     sv_catpvf_mg()            NEED_sv_catpvf_mg            NEED_sv_catpvf_mg_GLOBAL
247     sv_catpvf_mg_nocontext()  NEED_sv_catpvf_mg_nocontext  NEED_sv_catpvf_mg_nocontext_GLOBAL
248     sv_setpvf_mg()            NEED_sv_setpvf_mg            NEED_sv_setpvf_mg_GLOBAL
249     sv_setpvf_mg_nocontext()  NEED_sv_setpvf_mg_nocontext  NEED_sv_setpvf_mg_nocontext_GLOBAL
250     sv_unmagicext()           NEED_sv_unmagicext           NEED_sv_unmagicext_GLOBAL
251     utf8_to_uvchr_buf()       NEED_utf8_to_uvchr_buf       NEED_utf8_to_uvchr_buf_GLOBAL
252     vload_module()            NEED_vload_module            NEED_vload_module_GLOBAL
253     vmess()                   NEED_vmess                   NEED_vmess_GLOBAL
254     warner()                  NEED_warner                  NEED_warner_GLOBAL
255
256 To avoid namespace conflicts, you can change the namespace of the
257 explicitly exported functions / variables using the C<DPPP_NAMESPACE>
258 macro. Just C<#define> the macro before including C<ppport.h>:
259
260     #define DPPP_NAMESPACE MyOwnNamespace_
261     #include "ppport.h"
262
263 The default namespace is C<DPPP_>.
264
265 =back
266
267 The good thing is that most of the above can be checked by running
268 F<ppport.h> on your source code. See the next section for
269 details.
270
271 =head1 EXAMPLES
272
273 To verify whether F<ppport.h> is needed for your module, whether you
274 should make any changes to your code, and whether any special defines
275 should be used, F<ppport.h> can be run as a Perl script to check your
276 source code. Simply say:
277
278     perl ppport.h
279
280 The result will usually be a list of patches suggesting changes
281 that should at least be acceptable, if not necessarily the most
282 efficient solution, or a fix for all possible problems.
283
284 If you know that your XS module uses features only available in
285 newer Perl releases, if you're aware that it uses C++ comments,
286 and if you want all suggestions as a single patch file, you could
287 use something like this:
288
289     perl ppport.h --compat-version=5.6.0 --cplusplus --patch=test.diff
290
291 If you only want your code to be scanned without any suggestions
292 for changes, use:
293
294     perl ppport.h --nochanges
295
296 You can specify a different C<diff> program or options, using
297 the C<--diff> option:
298
299     perl ppport.h --diff='diff -C 10'
300
301 This would output context diffs with 10 lines of context.
302
303 If you want to create patched copies of your files instead, use:
304
305     perl ppport.h --copy=.new
306
307 To display portability information for the C<newSVpvn> function,
308 use:
309
310     perl ppport.h --api-info=newSVpvn
311
312 Since the argument to C<--api-info> can be a regular expression,
313 you can use
314
315     perl ppport.h --api-info=/_nomg$/
316
317 to display portability information for all C<_nomg> functions or
318
319     perl ppport.h --api-info=/./
320
321 to display information for all known API elements.
322
323 =head1 BUGS
324
325 Some of the suggested edits and/or generated patches may not compile as-is
326 without tweaking manually.  This is generally due to the need for an extra
327 parameter to be added to the call to prevent buffer overflow.
328
329 If this version of F<ppport.h> is causing failure during
330 the compilation of this module, please check if newer versions
331 of either this module or C<Devel::PPPort> are available on CPAN
332 before sending a bug report.
333
334 If F<ppport.h> was generated using the latest version of
335 C<Devel::PPPort> and is causing failure of this module, please
336 send a bug report to L<perlbug@perl.org|mailto:perlbug@perl.org>.
337
338 Please include the following information:
339
340 =over 4
341
342 =item 1.
343
344 The complete output from running "perl -V"
345
346 =item 2.
347
348 This file.
349
350 =item 3.
351
352 The name and version of the module you were trying to build.
353
354 =item 4.
355
356 A full log of the build that failed.
357
358 =item 5.
359
360 Any other information that you think could be relevant.
361
362 =back
363
364 For the latest version of this code, please get the C<Devel::PPPort>
365 module from CPAN.
366
367 =head1 COPYRIGHT
368
369 Version 3.x, Copyright (c) 2004-2013, Marcus Holland-Moritz.
370
371 Version 2.x, Copyright (C) 2001, Paul Marquess.
372
373 Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
374
375 This program is free software; you can redistribute it and/or
376 modify it under the same terms as Perl itself.
377
378 =head1 SEE ALSO
379
380 See L<Devel::PPPort>.
381
382 =cut
383
384 # These are tools that must be included in ppport.h.  It doesn't work if given
385 # a .pl suffix
386
387 sub format_version
388 {
389   # Given an input version that is acceptable to parse_version(), return a
390   # string of the standard representation of it.
391
392   my($r,$v,$s) = parse_version(shift);
393
394   if ($r < 5 || ($r == 5 && $v < 6)) {
395     my $ver = sprintf "%d.%03d", $r, $v;
396     $s > 0 and $ver .= sprintf "_%02d", $s;
397
398     return $ver;
399   }
400
401   return sprintf "%d.%d.%d", $r, $v, $s;
402 }
403
404 sub parse_version
405 {
406   # Returns a triplet, (5, major, minor) from the input, treated as a string,
407   # which can be in any of several typical formats.
408
409   my $ver = shift;
410   $ver = "" unless defined $ver;
411
412   my($r,$v,$s);
413
414   if (   ($r, $v, $s) = $ver =~ /^(5)(\d{3})(\d{3})$/ # 5029010, from the file
415                                                       # names in our
416                                                       # parts/base/ and
417                                                       # parts/todo directories
418       or ($r, $v, $s) = $ver =~ /^(\d+)\.(\d+)\.(\d+)$/   # 5.25.7
419       or ($r, $v, $s) = $ver =~ /^(\d+)\.(\d{3})(\d{3})$/ # 5.025008, from the
420                                                           # output of $]
421       or ($r, $v, $s) = $ver =~ /^(\d+)\.(\d{1,3})()$/    # 5.24, 5.004
422       or ($r, $v, $s) = $ver =~ /^(\d+)\.(00[1-5])_?(\d{2})$/  # 5.003_07
423   ) {
424
425     $s = 0 unless $s;
426
427     die "Only Perl 5 is supported '$ver'\n" if $r != 5;
428     die "Invalid version number: $ver\n" if $v >= 1000 || $s >= 1000;
429     return (5, 0 + $v, 0 + $s);
430   }
431
432   # For some safety, don't assume something is a version number if it has a
433   # literal dot as one of the three characters.  This will have to be fixed
434   # when we reach 5.46
435   if ($ver !~ /\./ && (($r, $v, $s) = $ver =~ /^(.)(.)(.)$/))  # vstring 5.25.7
436   {
437     $r = ord $r;
438     $v = ord $v;
439     $s = ord $s;
440
441     die "Only Perl 5 is supported '$ver'\n" if $r != 5;
442     return (5, $v, $s);
443   }
444
445   my $mesg = "";
446   $mesg = ".  (In 5.00x_yz, x must be 1-5.)" if $ver =~ /_/;
447   die "Invalid version number format: '$ver'$mesg\n";
448 }
449
450 sub int_parse_version
451 {
452     # Returns integer 7 digit human-readable version, suitable for use in file
453     # names in parts/todo parts/base.
454
455     return 0 + join "", map { sprintf("%03d", $_) } parse_version(shift);
456 }
457
458 sub ivers    # Shorter name for int_parse_version
459 {
460     return int_parse_version(shift);
461 }
462
463 sub format_version_line
464 {
465     # Returns a floating point representation of the input version
466
467     my $version = int_parse_version(shift);
468     $version =~ s/^5\B/5./;
469     return $version;
470 }
471
472 sub dictionary_order($$)    # Sort caselessly, ignoring punct
473 {
474     my ($lc_a, $lc_b);
475     my ($squeezed_a, $squeezed_b);
476     my ($valid_a, $valid_b);    # Meaning valid for all releases
477
478     # On early perls, the implicit pass by reference doesn't work, so we have
479     # to use the globals to initialize.
480     if ("$]" < "5.006" ) {
481         $valid_a = $a; $valid_b = $b;
482     }
483     else {
484         ($valid_a, $valid_b) = @_;
485     }
486
487     $lc_a = lc $valid_a;
488     $lc_b = lc $valid_b;
489
490     $squeezed_a = $lc_a;
491     $squeezed_a =~ s/[\W_]//g;   # No punct, including no underscore
492     $squeezed_b = $lc_b;
493     $squeezed_b =~ s/[\W_]//g;
494
495     return( $squeezed_a cmp $squeezed_b
496          or       $lc_a cmp $lc_b
497          or    $valid_a cmp $valid_b);
498 }
499
500 sub sort_api_lines  # Sort lines of the form flags|return|name|args...
501                     # by 'name'
502 {
503     $a =~ / ^ [^|]* \| [^|]* \| (\w+) /x; # 3rd field '|' is sep
504     my $a_name = $1;
505     $b =~ / ^ [^|]* \| [^|]* \| (\w+) /x;
506     my $b_name = $1;
507     return dictionary_order($a_name, $b_name);
508 }
509
510 1;
511
512 use strict;
513
514 BEGIN { require warnings if "$]" > '5.006' }
515
516 # Disable broken TRIE-optimization
517 BEGIN { eval '${^RE_TRIE_MAXBUF} = -1' if "$]" >= 5.009004 && "$]" <= 5.009005 }
518
519 my $VERSION = 3.58;
520
521 my %opt = (
522   quiet     => 0,
523   diag      => 1,
524   hints     => 1,
525   changes   => 1,
526   cplusplus => 0,
527   filter    => 1,
528   strip     => 0,
529   version   => 0,
530 );
531
532 my($ppport) = $0 =~ /([\w.]+)$/;
533 my $LF = '(?:\r\n|[\r\n])';   # line feed
534 my $HS = "[ \t]";             # horizontal whitespace
535
536 # Never use C comments in this file!
537 my $ccs  = '/'.'*';
538 my $cce  = '*'.'/';
539 my $rccs = quotemeta $ccs;
540 my $rcce = quotemeta $cce;
541
542 eval {
543   require Getopt::Long;
544   Getopt::Long::GetOptions(\%opt, qw(
545     help quiet diag! filter! hints! changes! cplusplus strip version
546     patch=s copy=s diff=s compat-version=s
547     list-provided list-unsupported api-info=s
548   )) or usage();
549 };
550
551 if ($@ and grep /^-/, @ARGV) {
552   usage() if "@ARGV" =~ /^--?h(?:elp)?$/;
553   die "Getopt::Long not found. Please don't use any options.\n";
554 }
555
556 if ($opt{version}) {
557   print "This is $0 $VERSION.\n";
558   exit 0;
559 }
560
561 usage() if $opt{help};
562 strip() if $opt{strip};
563
564 $opt{'compat-version'} = 5.003_07 unless exists $opt{'compat-version'};
565 $opt{'compat-version'} = int_parse_version($opt{'compat-version'});
566
567 my $int_min_perl = int_parse_version(5.003_07);
568
569 # Each element of this hash looks something like:
570 # 'Poison' => {
571 #                         'base' => '5.008000',
572 #                         'provided' => 1,
573 #                         'todo' => '5.003007'
574 #             },
575 my %API = map { /^(\w+)\|([^|]*)\|([^|]*)\|(\w*)$/
576                 ? ( $1 => {
577                       ($2                  ? ( base     => $2 ) : ()),
578                       ($3                  ? ( todo     => $3 ) : ()),
579                       (index($4, 'v') >= 0 ? ( varargs  => 1  ) : ()),
580                       (index($4, 'p') >= 0 ? ( provided => 1  ) : ()),
581                       (index($4, 'n') >= 0 ? ( noTHXarg => 1  ) : ()),
582                       (index($4, 'c') >= 0 ? ( core_only    => 1  ) : ()),
583                       (index($4, 'd') >= 0 ? ( deprecated   => 1  ) : ()),
584                       (index($4, 'i') >= 0 ? ( inaccessible => 1  ) : ()),
585                       (index($4, 'x') >= 0 ? ( experimental => 1  ) : ()),
586                       (index($4, 'u') >= 0 ? ( undocumented => 1  ) : ()),
587                       (index($4, 'o') >= 0 ? ( ppport_fnc => 1  ) : ()),
588                       (index($4, 'V') >= 0 ? ( unverified => 1  ) : ()),
589                     } )
590                 : die "invalid spec: $_" } qw(
591 abort_execution|5.025010||Viu
592 add_above_Latin1_folds|5.021001||Viu
593 add_cp_to_invlist|5.013011||Viu
594 add_data|5.005000||nViu
595 add_multi_match|5.021004||Viu
596 _add_range_to_invlist|5.016000||cViu
597 add_utf16_textfilter|5.011001||Viu
598 adjust_size_and_find_bucket|5.019003||nViu
599 advance_one_LB|5.023007||Viu
600 advance_one_SB|5.021009||Viu
601 advance_one_WB|5.021009||Viu
602 alloccopstash|5.017001|5.017001|x
603 alloc_LOGOP|5.025004||xViu
604 allocmy|5.008001||Viu
605 amagic_call|5.003007|5.003007|u
606 amagic_cmp|5.009003||Viu
607 amagic_cmp_locale|5.009003||Viu
608 amagic_deref_call|5.013007|5.013007|u
609 amagic_i_ncmp|5.009003||Viu
610 amagic_is_enabled|5.015008||Viu
611 amagic_ncmp|5.009003||Viu
612 _aMY_CXT|5.009000|5.009000|p
613 aMY_CXT_|5.009000|5.009000|p
614 aMY_CXT|5.009000|5.009000|p
615 anonymise_cv_maybe|5.013003||Viu
616 any_dup|5.006000||Vu
617 ao|5.005000||Viu
618 _append_range_to_invlist|5.013010||Viu
619 append_utf8_from_native_byte|5.019004||ncViu
620 apply|5.003007||Viu
621 apply_attrs|5.006000||Viu
622 apply_attrs_my|5.007003||Viu
623 apply_attrs_string|5.006001|5.006001|xu
624 ARCHNAME|5.004000|5.004000|
625 argvout_final|5.029006||Viu
626 ASCII_TO_NEED|5.019004||ndcVu
627 __ASSERT_|5.019007|5.008008|p
628 assert_uft8_cache_coherent|5.013003||Viu
629 assignment_type|5.021005||Viu
630 atfork_lock|5.007002|5.007002|nu
631 atfork_unlock|5.007002|5.007002|nu
632 aTHX_|5.006000|5.003007|p
633 aTHX|5.006000|5.003007|p
634 aTHXR_||5.003007|pou
635 aTHXR||5.003007|pou
636 av_arylen_p|5.009003|5.009003|u
637 av_clear|5.003007|5.003007|
638 av_create_and_push|5.009005|5.009005|x
639 av_create_and_unshift_one|5.009005|5.009005|x
640 av_delete|5.006000|5.006000|
641 av_exists|5.006000|5.006000|
642 av_extend|5.003007|5.003007|
643 av_extend_guts|5.017004||Viu
644 av_fetch|5.003007|5.003007|
645 av_fill|5.003007|5.003007|
646 AvFILL|5.003007|5.003007|
647 AvFILLp|5.004005|5.003007|poV
648 av_iter_p|5.011000|5.011000|u
649 av_len|5.003007|5.003007|
650 av_make|5.003007|5.003007|
651 av_nonelem|5.027009||Viu
652 av_pop|5.003007|5.003007|
653 av_push|5.003007|5.003007|
654 av_reify|5.004004||cViu
655 av_shift|5.003007|5.003007|
656 av_store|5.003007|5.003007|
657 av_tindex|5.017009|5.003007|p
658 av_top_index|5.017009|5.003007|p
659 av_undef|5.003007|5.003007|
660 av_unshift|5.003007|5.003007|
661 ax|5.003007|5.003007|
662 backup_one_GCB|5.025003||Viu
663 backup_one_LB|5.023007||Viu
664 backup_one_SB|5.021009||Viu
665 backup_one_WB|5.021009||Viu
666 bad_type_gv|5.019002||Viu
667 bad_type_pv|5.016000||Viu
668 BhkDISABLE|||x
669 BhkENABLE|||x
670 BhkENTRY_set|||x
671 BhkENTRY|||xi
672 BhkFLAGS|||xi
673 BIN|5.003007|5.003007|
674 bind_match|5.003007||Viu
675 block_end|5.004000|5.004000|
676 block_gimme|5.004000|5.004000|u
677 blockhook_register|5.013003|5.013003|x
678 block_start|5.004000|5.004000|
679 BOM_UTF8|5.025005|5.003007|p
680 boolSV|5.004000|5.003007|p
681 boot_core_mro|5.009005||Viu
682 boot_core_PerlIO|5.007002||Viu
683 boot_core_UNIVERSAL|5.003007||Viu
684 _byte_dump_string|5.025006||cViu
685 BYTEORDER|5.003007|5.003007|
686 bytes_cmp_utf8|5.013007|5.013007|
687 bytes_from_utf8|5.007001|5.007001|x
688 bytes_from_utf8_loc|5.027001|5.027001|nxu
689 bytes_to_utf8|5.006001|5.006001|x
690 call_argv|5.006000|5.003007|p
691 call_atexit|5.006000|5.006000|u
692 CALL_BLOCK_HOOKS|||xi
693 CALL_CHECKER_REQUIRE_GV|5.021004|5.021004|
694 caller_cx|5.013005|5.006000|p
695 call_list|5.004000|5.004000|u
696 call_method|5.006000|5.003007|p
697 calloc|5.007002|5.007002|n
698 call_pv|5.006000|5.003007|p
699 call_sv|5.006000|5.003007|p
700 cando|5.003007||Viu
701 C_ARRAY_END|5.013002|5.003007|p
702 C_ARRAY_LENGTH|5.008001|5.003007|p
703 CASTFLAGS|5.003007|5.003007|
704 cast_i32|5.006000|5.006000|nu
705 cast_iv|5.006000|5.006000|nu
706 cast_ulong|5.006000|5.006000|nu
707 cast_uv|5.006000|5.006000|nu
708 category_name|5.027008||nViu
709 cBOOL|5.013000|5.003007|p
710 change_engine_size|5.029004||Viu
711 CHARBITS|5.011002|5.011002|
712 checkcomma|5.003007||Viu
713 check_locale_boundary_crossing|5.015006||Viu
714 check_type_and_open|5.009003||Viu
715 check_uni|5.003007||Viu
716 check_utf8_print|5.013009||Viu
717 ck_entersub_args_core|||iu
718 ck_entersub_args_list|5.013006|5.013006|
719 ck_entersub_args_proto|5.013006|5.013006|
720 ck_entersub_args_proto_or_list|5.013006|5.013006|
721 ckWARN2|5.006000|5.006000|
722 ckWARN2_d|5.006000|5.006000|
723 ckWARN3|5.007003|5.007003|
724 ckWARN3_d|5.007003|5.007003|
725 ckWARN4|5.007003|5.007003|
726 ckWARN4_d|5.007003|5.007003|
727 ckWARN|5.006000|5.003007|p
728 ckwarn|5.009003|5.009003|u
729 ckwarn_common|5.011001||Viu
730 ckWARN_d|5.006000|5.006000|
731 ckwarn_d|5.009003|5.009003|u
732 ck_warner|5.011001|5.011001|vu
733 ck_warner_d|5.011001|5.011001|vu
734 CLASS||5.003007|
735 clear_defarray|5.023008|5.023008|u
736 CLEAR_ERRSV|5.025007|5.025007|
737 clear_placeholders|5.009004||xViu
738 clear_special_blocks|5.021003||Viu
739 clone_params_del|5.013002|5.013002|nu
740 clone_params_new|5.013002|5.013002|nu
741 closest_cop|5.007002||Viu
742 cntrl_to_mnemonic|5.021004||ncViu
743 compile_wildcard|5.031010||Viu
744 compute_EXACTish|5.017003||nViu
745 construct_ahocorasick_from_trie|5.021001||Viu
746 cop_fetch_label|5.015001|5.015001|x
747 CopFILE|5.006000||pVu
748 CopFILEAV|5.006000||pVu
749 CopFILEGV|5.006000||pVu
750 CopFILEGV_set|5.006000||pVu
751 CopFILE_set|5.006000||pVu
752 CopFILESV|5.006000||pVu
753 cop_free|5.006000||Viu
754 cophh_2hv|5.013007|5.013007|x
755 cophh_copy|5.013007|5.013007|x
756 cophh_delete_pv|5.013007|5.013007|x
757 cophh_delete_pvn|5.013007|5.013007|x
758 cophh_delete_pvs|5.013007|5.013007|x
759 cophh_delete_sv|5.013007|5.013007|x
760 cophh_fetch_pv|5.013007|5.013007|x
761 cophh_fetch_pvn|5.013007|5.013007|x
762 cophh_fetch_pvs|5.013007|5.013007|x
763 cophh_fetch_sv|5.013007|5.013007|x
764 cophh_free|5.013007|5.013007|x
765 COPHH_KEY_UTF8|5.013007|5.013007|
766 cophh_new_empty|5.013007|5.013007|x
767 cophh_store_pv|5.013007|5.013007|x
768 cophh_store_pvn|5.013007|5.013007|x
769 cophh_store_pvs|5.013007|5.013007|x
770 cophh_store_sv|5.013007|5.013007|x
771 cop_hints_2hv|5.013007|5.013007|
772 cop_hints_fetch_pv|5.013007|5.013007|
773 cop_hints_fetch_pvn|5.013007|5.013007|
774 cop_hints_fetch_pvs|5.013007|5.013007|
775 cop_hints_fetch_sv|5.013007|5.013007|
776 CopLABEL|5.009005|5.009005|
777 CopLABEL_len|5.016000|5.016000|
778 CopLABEL_len_flags|5.016000|5.016000|
779 CopSTASH|5.006000||pVu
780 CopSTASH_eq|5.006000||pVu
781 CopSTASHPV|5.006000||pVu
782 CopSTASHPV_set|5.006000||pVu
783 CopSTASH_set|5.006000||pVu
784 cop_store_label|5.015001|5.015001|x
785 Copy|5.003007|5.003007|
786 CopyD|5.009002|5.003007|p
787 core_prototype|5.015002||Vi
788 coresub_op|5.015003||Viu
789 CPERLscope|5.005000||pVu
790 CPPLAST|5.006000|5.006000|
791 CPPMINUS|5.003007|5.003007|
792 CPPRUN|5.006000|5.006000|
793 CPPSTDIN|5.003007|5.003007|
794 create_eval_scope|5.009004||xViu
795 croak|5.006000|5.003007|v
796 croak_caller|5.025004||vnViu
797 croak_memory_wrap|5.017006|5.003007|pnu
798 croak_nocontext|5.006000||pvnVu
799 croak_no_mem|5.017006||nViu
800 croak_no_modify|5.013003|5.003007|pn
801 croak_popstack|5.017008||ncViu
802 croak_sv|5.013001|5.003007|p
803 croak_xs_usage|5.010001|5.003007|pn
804 cr_textfilter|5.006000||Viu
805 csighandler1|5.031007|5.031007|nu
806 csighandler3|5.031007|5.031007|nu
807 csighandler|5.031007|5.031007|nu
808 current_re_engine|5.017001||cViu
809 curse|5.013009||Viu
810 custom_op_desc|5.007003|5.007003|d
811 custom_op_get_field|5.019006||cViu
812 custom_op_name|5.007003|5.007003|d
813 custom_op_register|5.013007|5.013007|
814 cv_ckproto_len_flags|5.015004||xcViu
815 cv_clone|5.003007|5.003007|
816 cv_clone_into|5.017004||Viu
817 cv_const_sv|5.003007|5.003007|n
818 cv_const_sv_or_av|5.019003||nViu
819 CvDEPTH|5.003007|5.003007|nu
820 cv_dump|5.006000||Vi
821 cv_forget_slab|5.017002||Vi
822 cv_get_call_checker|5.013006|5.013006|
823 cv_get_call_checker_flags|5.027003|5.027003|
824 CvGV|5.003007|5.003007|u
825 cvgv_from_hek|||ciu
826 cvgv_set|5.013003||cViu
827 cv_name|5.021005|5.021005|
828 CV_NAME_NOTQUAL|5.021005|5.021005|
829 CvPADLIST|5.008001|5.008001|x
830 cv_set_call_checker|5.013006|5.013006|
831 cv_set_call_checker_flags|5.021004|5.021004|
832 CvSTASH|5.003007|5.003007|
833 cvstash_set|5.013007||cViu
834 cv_undef|5.003007|5.003007|
835 cv_undef_flags|5.021004||Viu
836 CvWEAKOUTSIDE|||i
837 CX_CURPAD_SAVE|||i
838 CX_CURPAD_SV|||i
839 cx_dump|5.005000|5.005000|u
840 cx_dup|5.007003|5.007003|u
841 cxinc|5.003007|5.003007|u
842 cx_popblock|5.023008|5.023008|xu
843 cx_popeval|5.023008|5.023008|xu
844 cx_popformat|5.023008|5.023008|xu
845 cx_popgiven|5.027008|5.027008|xu
846 cx_poploop|5.023008|5.023008|xu
847 cx_popsub|5.023008|5.023008|xu
848 cx_popsub_args|5.023008|5.023008|xu
849 cx_popsub_common|5.023008|5.023008|xu
850 cx_popwhen|5.027008|5.027008|xu
851 cx_pushblock|5.023008|5.023008|xu
852 cx_pusheval|5.023008|5.023008|xu
853 cx_pushformat|5.023008|5.023008|xu
854 cx_pushgiven|5.027008|5.027008|xu
855 cx_pushloop_for|5.023008|5.023008|xu
856 cx_pushloop_plain|5.023008|5.023008|xu
857 cx_pushsub|5.023008|5.023008|xu
858 cx_pushwhen|5.027008|5.027008|xu
859 cx_topblock|5.023008|5.023008|xu
860 dAX|5.007002|5.003007|p
861 dAXMARK|5.009003|5.003007|p
862 deb|5.007003|5.007003|vu
863 deb_curcv|5.007002||Viu
864 deb_nocontext|5.007003|5.007003|vnu
865 debop|5.005000|5.005000|u
866 debprof|5.005000||Viu
867 debprofdump|5.005000|5.005000|u
868 debstack|5.007003|5.007003|u
869 deb_stack_all|5.008001||Viu
870 deb_stack_n|5.008001||Viu
871 debstackptrs|5.007003|5.007003|u
872 debug_start_match|5.009004||Viu
873 DECLARATION_FOR_LC_NUMERIC_MANIPULATION|5.021010|5.021010|
874 defelem_target|5.019002||Viu
875 DEFSV|5.004005|5.003007|poVu
876 DEFSV_set|5.010001||pVu
877 delete_eval_scope|5.009004||xViu
878 delimcpy|5.004000|5.004000|nu
879 delimcpy_no_escape|5.025005||nViu
880 del_sv|5.005000||Viu
881 despatch_signals|5.007001|5.007001|u
882 destroy_matcher|5.027008||Viu
883 die|5.006000|5.003007|v
884 die_nocontext|5.006000||vnVu
885 die_sv|5.013001|5.003007|p
886 die_unwind|5.013001||Viu
887 dirp_dup|5.013007|5.013007|u
888 dITEMS|5.007002|5.003007|p
889 div128|5.005000||Viu
890 djSP|||i
891 dMARK|5.003007|5.003007|
892 dMULTICALL|5.009003|5.009003|
893 dMY_CXT|5.009000|5.009000|p
894 dMY_CXT_SV|5.007003||poVu
895 dNOOP|5.006000|5.003007|poVu
896 do_aexec5|5.006000||Viu
897 do_aexec|||iu
898 do_aspawn|5.008000||Vu
899 do_binmode|5.004005|5.004005|du
900 docatch|5.005000||Vi
901 do_chomp|5.003007||Viu
902 do_close|5.003007|5.003007|u
903 do_delete_local|5.011000||Viu
904 do_dump_pad|5.008001||Vi
905 do_eof|5.003007||Viu
906 does_utf8_overflow|5.025006||nViu
907 doeval_compile|5.023008||Viu
908 do_exec3|5.006000||Viu
909 do_exec|5.003007||Viu
910 dofile|5.005003||Viu
911 dofindlabel|5.003007||Viu
912 doform|5.005000||Viu
913 do_gv_dump|5.006000|5.006000|u
914 do_gvgv_dump|5.006000|5.006000|u
915 do_hv_dump|5.006000|5.006000|u
916 doing_taint|5.008001|5.008001|nu
917 do_ipcctl|5.003007||Viu
918 do_ipcget|5.003007||Viu
919 do_join|5.003007|5.003007|u
920 do_magic_dump|5.006000|5.006000|u
921 do_msgrcv|5.003007||Viu
922 do_msgsnd|5.003007||Viu
923 do_ncmp|5.015001||Viu
924 do_oddball|5.006000||Viu
925 dooneliner|5.006000||Viu
926 do_op_dump|5.006000|5.006000|u
927 do_open|5.003007|5.003007|u
928 do_open6|5.019010||xViu
929 do_open9|5.006000|5.006000|du
930 do_openn|5.007001|5.007001|u
931 doopen_pm|5.008001||Viu
932 do_open_raw|5.019010||xViu
933 doparseform|5.005000||Viu
934 do_pmop_dump|5.006000|5.006000|u
935 dopoptoeval|5.003007||Viu
936 dopoptogivenfor|5.027008||Viu
937 dopoptolabel|5.005000||Viu
938 dopoptoloop|5.005000||Viu
939 dopoptosub_at|5.005000||Viu
940 dopoptowhen|5.027008||Viu
941 do_print|5.003007||Viu
942 do_readline|5.003007||Viu
943 doref|5.009003|5.009003|u
944 dORIGMARK|5.003007|5.003007|
945 do_seek|5.003007||Viu
946 do_semop|5.003007||Viu
947 do_shmio|5.003007||Viu
948 do_smartmatch|5.027008||Viu
949 do_spawn|5.008000||Vu
950 do_spawn_nowait|5.008000||Vu
951 do_sprintf|5.003007|5.003007|u
952 do_sv_dump|5.006000|5.006000|u
953 do_sysseek|5.004000||Viu
954 do_tell|5.003007||Viu
955 do_trans|5.003007||Viu
956 do_trans_complex|5.006001||Viu
957 do_trans_count|5.006001||Viu
958 do_trans_count_invmap|5.031006||Viu
959 do_trans_invmap|5.031006||Viu
960 do_trans_simple|5.006001||Viu
961 DOUBLEINFBYTES|5.023000|5.023000|
962 DOUBLEKIND|5.021006|5.021006|
963 DOUBLEMANTBITS|5.023000|5.023000|
964 DOUBLENANBYTES|5.023000|5.023000|
965 DOUBLESIZE|5.005000|5.005000|
966 dounwind|5.003007|5.003007|u
967 DO_UTF8|5.006000|5.006000|
968 do_vecget|5.006000||Viu
969 do_vecset|5.003007||Viu
970 do_vop|5.003007||Viu
971 dowantarray|5.003007|5.003007|u
972 drand48_init_r|||nciu
973 drand48_r|||nciu
974 dSAVEDERRNO|||i
975 dSAVE_ERRNO|||i
976 dSP|5.003007|5.003007|
977 dTHR|5.004005|5.003007|p
978 dTHX|5.003007|5.003007|p
979 dTHXa|5.006000||pVu
980 dTHXoa|5.006000||pVu
981 dTHXR||5.003007|pou
982 dtrace_probe_call|||ciu
983 dtrace_probe_load|||ciu
984 dtrace_probe_op|||ciu
985 dtrace_probe_phase|||ciu
986 dump_all|5.006000|5.006000|
987 dump_all_perl|5.011000||Viu
988 dump_c_backtrace|5.021001||V
989 dump_eval|5.006000|5.006000|u
990 dump_exec_pos|5.009004||Viu
991 dump_form|5.006000|5.006000|u
992 dump_indent|5.006000|5.006000|vu
993 dump_mstats|5.003007||Vu
994 dump_packsubs|5.006000|5.006000|
995 dump_packsubs_perl|5.011000||Viu
996 dump_regex_sets_structures|5.025006||Viu
997 dump_sub|5.006000|5.006000|u
998 dump_sub_perl|5.011000||Viu
999 dump_sv_child|5.009003||Viu
1000 dump_trie|5.009004||Viu
1001 dump_trie_interim_list|5.009004||Viu
1002 dump_trie_interim_table|5.009004||Viu
1003 dumpuntil|5.005000||Viu
1004 dump_vindent|5.006000|5.006000|u
1005 dUNDERBAR|5.009002|5.003007|p
1006 dup_attrlist|5.006000||Viu
1007 dup_warnings|||ciu
1008 dVAR|5.009003|5.003007|p
1009 dXCPT|5.009002|5.003007|p
1010 dXSARGS|5.003007|5.003007|
1011 dXSI32|5.003007|5.003007|V
1012 dXSTARG|5.006000|5.003007|poVu
1013 edit_distance|5.023008||nViu
1014 emulate_cop_io|||xciu
1015 emulate_setlocale|5.027009||nViu
1016 END_EXTERN_C|5.005000|5.003007|poVu
1017 ENTER|5.003007|5.003007|
1018 ENTER_with_name|5.011002|5.011002|
1019 ERRSV|5.004005|5.003007|p
1020 eval_pv|5.006000|5.003007|p
1021 eval_sv|5.006000|5.003007|p
1022 exec_failed|5.009004||Viu
1023 execute_wildcard|5.031010||Viu
1024 expect_number|5.007001||Viu
1025 EXTEND|5.003007|5.003007|
1026 EXTERN_C|5.005000|5.003007|poVu
1027 F0convert|5.009003||nViu
1028 fbm_compile|5.005000|5.005000|
1029 fbm_instr|5.005000|5.005000|
1030 filter_add|5.003007|5.003007|
1031 filter_del|5.003007|5.003007|u
1032 filter_gets|5.005000||Viu
1033 filter_read|5.003007|5.003007|
1034 finalize_op|5.015002||Viu
1035 finalize_optree|5.015002||Vi
1036 find_and_forget_pmops|5.009005||Viu
1037 find_array_subscript|5.009004||Viu
1038 find_beginning|5.005000||Viu
1039 find_byclass|5.006000||Viu
1040 find_default_stash|5.019004||Viu
1041 find_first_differing_byte_pos|5.031007||nViu
1042 find_hash_subscript|5.009004||Viu
1043 find_in_my_stash|5.006001||Viu
1044 find_lexical_cv|5.019001||Viu
1045 find_next_masked|5.027009||nViu
1046 find_runcv|5.008001|5.008001|
1047 find_runcv_where|5.017002||Viu
1048 find_rundefsv|5.013002|5.013002|
1049 find_rundefsvoffset|5.009002|5.009002|d
1050 find_script|5.004005||Viu
1051 find_span_end|5.027009||nViu
1052 find_span_end_mask|5.027009||nViu
1053 find_uninit_var|5.009002||xVi
1054 first_symbol|5.009003||nViu
1055 fixup_errno_string|5.019007||Viu
1056 fold_constants|5.003007||Viu
1057 foldEQ|5.013002|5.013002|n
1058 foldEQ_latin1|5.013008|5.013008|nu
1059 foldEQ_latin1_s2_folded|5.029007||nViu
1060 foldEQ_locale|5.013002|5.013002|n
1061 foldEQ_utf8|5.013002|5.007003|p
1062 foldEQ_utf8_flags|5.013010||cVu
1063 forbid_setid|5.005000||Viu
1064 force_ident|5.003007||Viu
1065 force_ident_maybe_lex|5.017004||Viu
1066 force_list|5.003007||Viu
1067 force_next|5.003007||Viu
1068 _force_out_malformed_utf8_message|5.025009||cVu
1069 force_strict_version|5.011004||Viu
1070 force_version|5.005000||Viu
1071 force_word|5.003007||Viu
1072 forget_pmop|5.017007||Viu
1073 form|5.006000|5.004000|v
1074 form_alien_digit_msg|5.031009||cViu
1075 form_cp_too_large_msg|5.031009||cViu
1076 form_nocontext|5.006000||vnVu
1077 fp_dup|5.007003|5.007003|u
1078 fprintf_nocontext|5.006000||vndVu
1079 free_c_backtrace|5.021001||Vi
1080 free_global_struct|5.009003||Vu
1081 free_tied_hv_pool|5.008001||Viu
1082 FREETMPS|5.003007|5.003007|
1083 free_tmps|5.003007|5.003007|u
1084 G_ARRAY|5.003007|5.003007|
1085 G_DISCARD|5.003007|5.003007|
1086 gen_constant_list|5.003007||Viu
1087 get_and_check_backslash_N_name|5.017006||cViu
1088 get_and_check_backslash_N_name_wrapper|5.029009||Viu
1089 get_ANYOF_cp_list_for_ssc|5.019005||Viu
1090 get_ANYOFM_contents|5.027009||Viu
1091 get_aux_mg|5.011000||Viu
1092 get_av|5.006000|5.003007|p
1093 get_c_backtrace|5.021001||Vi
1094 get_c_backtrace_dump|5.021001||V
1095 get_context|5.006000|5.006000|nu
1096 get_cv|5.006000|5.003007|p
1097 get_cvn_flags|5.009005|5.003007|p
1098 get_cvs|5.011000||pVu
1099 getcwd_sv|5.007002|5.007002|
1100 get_db_sub|||iu
1101 get_debug_opts|5.008001||Viu
1102 getenv_len|5.006000||Viu
1103 get_hash_seed|5.008001||Viu
1104 get_hv|5.006000|5.003007|p
1105 get_invlist_iter_addr|5.015001||nViu
1106 get_invlist_offset_addr|5.019002||nViu
1107 get_invlist_previous_index_addr|5.017004||nViu
1108 get_mstats|5.006000||Vu
1109 get_no_modify|5.005000||Viu
1110 get_num|5.008001||Viu
1111 get_opargs|5.005000||Viu
1112 get_op_descs|5.005000|5.005000|u
1113 get_op_names|5.005000|5.005000|u
1114 get_ppaddr|5.006000|5.006000|u
1115 get_re_arg|||xciu
1116 _get_regclass_nonbitmap_data|5.019009||cViu
1117 get_regex_charset_name|5.031004||nViu
1118 get_sv|5.006000|5.003007|p
1119 GetVars|5.006000||Vu
1120 get_vtbl|5.005003|5.005003|u
1121 G_EVAL|5.003007|5.003007|
1122 GIMME|5.003007|5.003007|
1123 GIMME_V|5.004000|5.004000|
1124 gimme_V|5.031005|5.031005|xu
1125 glob_2number|5.009004||Viu
1126 glob_assign_glob|5.009004||Viu
1127 G_METHOD|5.006001|5.003007|p
1128 G_METHOD_NAMED|5.019002|5.019002|
1129 G_NOARGS|5.003007|5.003007|
1130 gp_dup|5.007003|5.007003|u
1131 gp_free|5.003007|5.003007|u
1132 gp_ref|5.003007|5.003007|u
1133 G_RETHROW|5.031002|5.003007|p
1134 grok_atoUV|5.021010||ncVi
1135 grok_bin|5.007003|5.003007|p
1136 grok_bin_oct_hex|5.031008||cVu
1137 grok_bslash_c|5.013001||cViu
1138 grok_bslash_N|5.017003||Viu
1139 grok_bslash_o|5.013003||cViu
1140 grok_bslash_x|5.017002||cViu
1141 grok_hex|5.007003|5.003007|p
1142 grok_infnan|5.021004|5.021004|
1143 grok_number|5.007002|5.003007|p
1144 grok_number_flags|5.021002|5.021002|
1145 GROK_NUMERIC_RADIX|5.007002|5.003007|p
1146 grok_numeric_radix|5.007002|5.003007|p
1147 grok_oct|5.007003|5.003007|p
1148 group_end|5.007003||Viu
1149 G_SCALAR|5.003007|5.003007|
1150 GV_ADD|5.003007|5.003007|
1151 gv_add_by_type|5.011000|5.011000|u
1152 GV_ADDMG|5.015003|5.015003|
1153 GV_ADDMULTI|5.003007|5.003007|
1154 Gv_AMupdate|5.011000|5.011000|u
1155 gv_autoload4|5.004000|5.004000|u
1156 gv_autoload_pv|5.015004|5.015004|u
1157 gv_autoload_pvn|5.015004|5.015004|u
1158 gv_autoload_sv|5.015004|5.015004|u
1159 GvAV|5.003007|5.003007|
1160 gv_AVadd|5.003007|5.003007|u
1161 gv_check|5.003007|5.003007|u
1162 gv_const_sv|5.009003|5.009003|
1163 GvCV|5.003007|5.003007|
1164 gv_dump|5.006000|5.006000|u
1165 gv_efullname3|5.003007|5.003007|u
1166 gv_efullname4|5.006001|5.006001|u
1167 gv_efullname|5.003007|5.003007|du
1168 gv_fetchfile|5.003007|5.003007|u
1169 gv_fetchfile_flags|5.009005|5.009005|u
1170 gv_fetchmeth|5.003007|5.003007|
1171 gv_fetchmeth_autoload|5.007003|5.007003|
1172 gv_fetchmeth_internal|5.021007||Viu
1173 gv_fetchmethod|5.003007|5.003007|
1174 gv_fetchmethod_autoload|5.004000|5.004000|
1175 gv_fetchmethod_pv_flags|5.015004|5.015004|xu
1176 gv_fetchmethod_pvn_flags|5.015004|5.015004|xu
1177 gv_fetchmethod_sv_flags|5.015004|5.015004|xu
1178 gv_fetchmeth_pv|5.015004|5.015004|
1179 gv_fetchmeth_pv_autoload|5.015004|5.015004|
1180 gv_fetchmeth_pvn|5.015004|5.015004|
1181 gv_fetchmeth_pvn_autoload|5.015004|5.015004|
1182 gv_fetchmeth_sv|5.015004|5.015004|
1183 gv_fetchmeth_sv_autoload|5.015004|5.015004|
1184 gv_fetchpv|5.003007|5.003007|u
1185 gv_fetchpvn_flags|5.009002|5.003007|pu
1186 gv_fetchpvs|5.009004||pVu
1187 gv_fetchsv|5.009002|5.003007|pu
1188 gv_fullname3|5.003007|5.003007|u
1189 gv_fullname4|5.006001|5.006001|u
1190 gv_fullname|5.003007|5.003007|du
1191 gv_handler|5.007001|5.007001|u
1192 GvHV|5.003007|5.003007|
1193 gv_HVadd|5.003007|5.003007|u
1194 gv_init|5.003007|5.003007|
1195 gv_init_pv|5.015004|5.015004|
1196 gv_init_pvn|5.015004|5.003007|p
1197 gv_init_sv|5.015004|5.015004|
1198 gv_init_svtype|5.015004||Viu
1199 gv_IOadd|5.003007|5.003007|u
1200 gv_is_in_main|5.019004||Viu
1201 gv_magicalize|5.019004||Viu
1202 gv_magicalize_isa|5.013005||Viu
1203 gv_name_set|5.009004|5.009004|u
1204 GV_NOADD_MASK|5.009005|5.003007|poVu
1205 GV_NOADD_NOINIT|5.009003|5.009003|
1206 GV_NOEXPAND|5.009003|5.009003|
1207 GV_NOINIT|5.004005|5.004005|
1208 G_VOID|5.004000|5.004000|
1209 gv_override|5.019006||Viu
1210 gv_setref|5.021005||Viu
1211 gv_stashpv|5.003007|5.003007|
1212 gv_stashpvn|5.003007|5.003007|p
1213 gv_stashpvn_internal|5.021004||Viu
1214 gv_stashpvs|5.009003|5.003007|p
1215 gv_stashsv|5.003007|5.003007|
1216 gv_stashsvpvn_cached|5.021004||Viu
1217 GV_SUPER|5.017004|5.017004|
1218 GvSV|5.003007|5.003007|
1219 gv_SVadd|||u
1220 GvSVn|5.009003||pVu
1221 gv_try_downgrade|5.011002||xcVi
1222 handle_named_backref|5.023008||Viu
1223 handle_possible_posix|5.023008||Viu
1224 handle_regex_sets|5.017009||Viu
1225 handle_user_defined_property|5.029008||cViu
1226 he_dup|5.007003|5.007003|u
1227 HEf_SVKEY|5.003007|5.003007|p
1228 HeHASH|5.003007|5.003007|
1229 hek_dup|5.009000|5.009000|u
1230 HeKEY|5.003007|5.003007|
1231 HeKLEN|5.003007|5.003007|
1232 HePV|5.004000|5.004000|
1233 HeSVKEY|5.003007|5.003007|
1234 HeSVKEY_force|5.003007|5.003007|
1235 HeSVKEY_set|5.004000|5.004000|
1236 HeUTF8|5.010001|5.008000|p
1237 HeVAL|5.003007|5.003007|
1238 hfree_next_entry|||iu
1239 hsplit|5.005000||Viu
1240 hv_assert|5.008009|5.008009|
1241 hv_auxinit|5.009003||Viu
1242 hv_auxinit_internal|5.019010||nViu
1243 hv_backreferences_p|||xiu
1244 hv_bucket_ratio|5.025003|5.025003|x
1245 hv_clear|5.003007|5.003007|
1246 hv_clear_placeholders|5.009001|5.009001|
1247 hv_common|5.010000|5.010000|u
1248 hv_common_key_len|5.010000|5.010000|u
1249 hv_copy_hints_hv|5.009004|5.009004|
1250 hv_delayfree_ent|5.004000|5.004000|u
1251 hv_delete|5.003007|5.003007|
1252 hv_delete_common|5.009001||xViu
1253 hv_delete_ent|5.003007|5.003007|
1254 hv_eiter_p|5.009003|5.009003|u
1255 hv_eiter_set|5.009003|5.009003|u
1256 HvENAME|5.013007|5.013007|
1257 hv_ename_add|5.013007||Vi
1258 hv_ename_delete|5.013007||Vi
1259 HvENAMELEN|5.015004|5.015004|
1260 HvENAMEUTF8|5.015004|5.015004|
1261 hv_exists|5.003007|5.003007|
1262 hv_exists_ent|5.003007|5.003007|
1263 hv_fetch|5.003007|5.003007|
1264 hv_fetch_ent|5.003007|5.003007|
1265 hv_fetchs|5.009003|5.003007|p
1266 HvFILL|5.003007|5.003007|
1267 hv_fill|5.013002|5.013002|
1268 hv_free_ent|5.004000|5.004000|u
1269 hv_free_ent_ret|5.015000||Viu
1270 hv_free_entries|5.027002||Viu
1271 hv_iterinit|5.003007|5.003007|
1272 hv_iterkey|5.003007|5.003007|
1273 hv_iterkeysv|5.003007|5.003007|
1274 hv_iternext|5.003007|5.003007|
1275 hv_iternext_flags|5.008000|5.008000|x
1276 hv_iternextsv|5.003007|5.003007|
1277 HV_ITERNEXT_WANTPLACEHOLDERS|5.008000|5.008000|
1278 hv_iterval|5.003007|5.003007|
1279 hv_kill_backrefs|||xiu
1280 hv_ksplit|5.003007|5.003007|u
1281 hv_magic|5.003007|5.003007|
1282 hv_magic_check|5.006000||nViu
1283 HvNAME|5.003007|5.003007|
1284 HvNAME_get|5.009003||pVu
1285 HvNAMELEN|5.015004|5.015004|
1286 HvNAMELEN_get|5.009003||pVu
1287 hv_name_set|5.009003|5.009003|u
1288 HvNAMEUTF8|5.015004|5.015004|
1289 hv_notallowed|5.008000||Viu
1290 hv_placeholders_get|5.009003|5.009003|u
1291 hv_placeholders_p|||ciu
1292 hv_placeholders_set|5.009003|5.009003|u
1293 hv_pushkv|5.027003||Viu
1294 hv_rand_set|5.018000|5.018000|u
1295 hv_riter_p|5.009003|5.009003|u
1296 hv_riter_set|5.009003|5.009003|u
1297 hv_scalar|5.009001|5.009001|
1298 hv_store|5.003007|5.003007|
1299 hv_store_ent|5.003007|5.003007|
1300 hv_store_flags|5.008000|5.008000|xu
1301 hv_stores|5.009004|5.003007|p
1302 hv_undef|5.003007|5.003007|
1303 hv_undef_flags|||ciu
1304 I16SIZE|5.006000|5.006000|
1305 I16TYPE|5.006000|5.006000|
1306 I32SIZE|5.006000|5.006000|
1307 I32TYPE|5.006000|5.006000|
1308 I8SIZE|5.006000|5.006000|
1309 I8TYPE|5.006000|5.006000|
1310 ibcmp|5.003007|5.003007|
1311 ibcmp_locale|5.004000|5.004000|
1312 ibcmp_utf8|5.007003|5.007003|u
1313 incline|5.005000||Viu
1314 incpush|5.005000||Viu
1315 incpush_if_exists|5.009003||Viu
1316 incpush_use_sep|5.011000||Viu
1317 ingroup|5.003007||Viu
1318 init_argv_symbols|5.007003||Viu
1319 init_constants|5.017003||Viu
1320 init_dbargs|||iu
1321 init_debugger|5.005000||Viu
1322 init_global_struct|5.009003||Vu
1323 init_i18nl10n|5.006000||cVu
1324 init_i18nl14n|5.006000||dcVu
1325 initialize_invlist_guts|5.029002||Viu
1326 init_ids|5.005000||Viu
1327 init_interp|5.005000||Viu
1328 init_main_stash|5.005000||Viu
1329 init_named_cv|5.027010||cViu
1330 init_perllib|5.005000||Viu
1331 init_postdump_symbols|5.005000||Viu
1332 init_predump_symbols|5.005000||Viu
1333 init_stacks|5.005000|5.005000|u
1334 init_tm|5.007002|5.007002|u
1335 init_uniprops|5.027011||Viu
1336 IN_LOCALE|5.007002|5.004000|p
1337 IN_LOCALE_COMPILETIME|5.007002|5.004000|p
1338 IN_LOCALE_RUNTIME|5.007002|5.004000|p
1339 IN_PERL_COMPILETIME|5.008001|5.003007|poVu
1340 inplace_aassign|5.015003||Viu
1341 instr|5.003007|5.003007|n
1342 INT2PTR|5.006000|5.003007|p
1343 intro_my|5.004000|5.004000|
1344 INTSIZE|5.003007|5.003007|
1345 intuit_method|5.005000||Viu
1346 intuit_more|5.003007||Viu
1347 _inverse_folds|5.027011||cViu
1348 invert|5.003007||Viu
1349 invlist_array|5.013010||nViu
1350 _invlist_array_init|5.015001||nViu
1351 invlist_clear|5.023009||Viu
1352 invlist_clone|5.015001||cViu
1353 _invlist_contains_cp|5.017003||nViu
1354 invlist_contents|5.023008||Viu
1355 _invlist_dump|5.019003||cViu
1356 _invlistEQ|5.023006||cViu
1357 invlist_extend|5.013010||Viu
1358 invlist_highest|5.017002||nViu
1359 _invlist_intersection|5.015001||Viu
1360 _invlist_intersection_maybe_complement_2nd|5.015008||cViu
1361 _invlist_invert|5.015001||cViu
1362 invlist_is_iterating|5.017008||nViu
1363 invlist_iterfinish|5.017008||nViu
1364 invlist_iterinit|5.015001||nViu
1365 invlist_iternext|5.015001||nViu
1366 _invlist_len|5.017004||nViu
1367 invlist_lowest|5.031007||nxViu
1368 invlist_max|5.013010||nViu
1369 invlist_previous_index|5.017004||nViu
1370 invlist_replace_list_destroys_src|5.023009||Viu
1371 _invlist_search|5.017003||ncViu
1372 invlist_set_len|5.013010||Viu
1373 invlist_set_previous_index|5.017004||nViu
1374 _invlist_subtract|5.015001||Viu
1375 invlist_trim|5.013010||nViu
1376 _invlist_union|5.015001||cVu
1377 _invlist_union_maybe_complement_2nd|5.015008||cViu
1378 invmap_dump|5.031006||Viu
1379 invoke_exception_hook|5.013001||Viu
1380 io_close|5.003007||Viu
1381 isALNUM|5.003007|5.003007|p
1382 isALNUM_A|5.031003|5.003007|p
1383 isALNUMC|5.006000|5.003007|p
1384 isALNUMC_A|5.013006|5.003007|p
1385 isALNUMC_L1|5.013006|5.003007|p
1386 isALNUMC_LC|5.006000|5.006000|
1387 isALNUMC_LC_uvchr|5.017007|5.017007|
1388 isALNUM_LC|5.004000|5.004000|
1389 isALNUM_LC_uvchr|5.007001|5.007001|
1390 isa_lookup|5.005000||Viu
1391 isALPHA|5.003007|5.003007|p
1392 isALPHA_A|5.013006|5.003007|p
1393 isALPHA_L1|5.013006|5.003007|p
1394 isALPHA_LC|5.004000|5.004000|
1395 isALPHA_LC_utf8_safe|5.025009|5.006000|p
1396 isALPHA_LC_uvchr|5.007001|5.007001|
1397 isALPHANUMERIC|5.017008|5.003007|p
1398 isALPHANUMERIC_A|5.017008|5.003007|p
1399 isALPHANUMERIC_L1|5.017008|5.003007|p
1400 isALPHANUMERIC_LC|5.017008|5.004000|p
1401 isALPHANUMERIC_LC_utf8_safe|5.025009|5.006000|p
1402 isALPHANUMERIC_LC_uvchr|5.017008|5.017008|
1403 isALPHANUMERIC_utf8|5.031005|5.031005|
1404 isALPHANUMERIC_utf8_safe|5.025009|5.006000|p
1405 isALPHANUMERIC_uvchr|5.023009|5.006000|p
1406 isALPHA_utf8|5.031005|5.031005|
1407 isALPHA_utf8_safe|5.025009|5.006000|p
1408 isALPHA_uvchr|5.023009|5.006000|p
1409 is_an_int|5.005000||Viu
1410 isASCII|5.006000|5.003007|p
1411 isASCII_A|5.013006|5.003007|p
1412 isASCII_L1|5.015004|5.003007|p
1413 isASCII_LC|5.015008|5.003007|p
1414 isASCII_LC_utf8_safe|5.025009|5.025009|
1415 isASCII_LC_uvchr|5.017007|5.017007|
1416 is_ascii_string|5.011000|5.011000|n
1417 isASCII_utf8|5.031005|5.031005|
1418 isASCII_utf8_safe|5.025009|5.003007|p
1419 isASCII_uvchr|5.023009|5.003007|p
1420 isBLANK|5.006001|5.003007|p
1421 isBLANK_A|5.013006|5.003007|p
1422 isBLANK_L1|5.013006|5.003007|p
1423 isBLANK_LC|5.006001|5.003007|p
1424 isBLANK_LC_utf8_safe|5.025009|5.006000|p
1425 isBLANK_LC_uvchr|5.017007|5.017007|
1426 isBLANK_utf8|5.031005|5.031005|
1427 isBLANK_utf8_safe|5.025009|5.006000|p
1428 isBLANK_uvchr|5.023009|5.006000|p
1429 isC9_STRICT_UTF8_CHAR|5.025005|5.025005|n
1430 is_c9strict_utf8_string|5.025006|5.025006|n
1431 is_c9strict_utf8_string_loc|5.025006|5.025006|n
1432 is_c9strict_utf8_string_loclen|5.025006|5.025006|n
1433 isCNTRL|5.006000|5.003007|p
1434 isCNTRL_A|5.013006|5.003007|p
1435 isCNTRL_L1|5.013006|5.003007|p
1436 isCNTRL_LC|5.006000|5.006000|
1437 isCNTRL_LC_utf8_safe|5.025009|5.006000|p
1438 isCNTRL_LC_uvchr|5.007001|5.007001|
1439 isCNTRL_utf8|5.031005|5.031005|
1440 isCNTRL_utf8_safe|5.025009|5.006000|p
1441 isCNTRL_uvchr|5.023009|5.006000|p
1442 _is_cur_LC_category_utf8|5.021001||cVu
1443 isDIGIT|5.003007|5.003007|p
1444 isDIGIT_A|5.013006|5.003007|p
1445 isDIGIT_L1|5.013006|5.003007|p
1446 isDIGIT_LC|5.004000|5.004000|
1447 isDIGIT_LC_utf8_safe|5.025009|5.006000|p
1448 isDIGIT_LC_uvchr|5.007001|5.007001|
1449 isDIGIT_utf8|5.031005|5.031005|
1450 isDIGIT_utf8_safe|5.025009|5.006000|p
1451 isDIGIT_uvchr|5.023009|5.006000|p
1452 isFF_OVERLONG|5.025007||nViu
1453 isFOO_lc|5.017007||cViu
1454 isFOO_utf8_lc|5.017008||Viu
1455 isGCB|5.021009||Viu
1456 isGRAPH|5.006000|5.003007|p
1457 isGRAPH_A|5.013006|5.003007|p
1458 is_grapheme|5.031007||Viu
1459 isGRAPH_L1|5.013006|5.003007|p
1460 isGRAPH_LC|5.006000|5.006000|
1461 isGRAPH_LC_utf8_safe|5.025009|5.006000|p
1462 isGRAPH_LC_uvchr|5.007001|5.007001|
1463 isGRAPH_utf8|5.031005|5.031005|
1464 isGRAPH_utf8_safe|5.025009|5.006000|p
1465 isGRAPH_uvchr|5.023009|5.006000|p
1466 isGV_with_GP|5.009004||pVu
1467 is_handle_constructor|5.006000||nViu
1468 isIDCONT|5.017008|5.003007|p
1469 isIDCONT_A|5.017008|5.003007|p
1470 isIDCONT_L1|5.017008|5.003007|p
1471 isIDCONT_LC|5.017008|5.004000|p
1472 isIDCONT_LC_utf8_safe|5.025009|5.006000|p
1473 isIDCONT_LC_uvchr|5.017008|5.017008|
1474 isIDCONT_utf8|5.031005|5.031005|
1475 isIDCONT_utf8_safe|5.025009|5.006000|p
1476 isIDCONT_uvchr|5.023009|5.006000|p
1477 isIDFIRST|5.003007|5.003007|p
1478 isIDFIRST_A|5.013006|5.003007|p
1479 isIDFIRST_L1|5.013006|5.003007|p
1480 isIDFIRST_LC|5.004000|5.004000|p
1481 isIDFIRST_LC_utf8_safe|5.025009|5.006000|p
1482 isIDFIRST_LC_uvchr|5.007001|5.007001|
1483 isIDFIRST_utf8|5.031005|5.031005|
1484 isIDFIRST_utf8_safe|5.025009|5.006000|p
1485 isIDFIRST_uvchr|5.023009|5.006000|p
1486 isinfnan|5.021004|5.021004|n
1487 isinfnansv|5.021005||Vi
1488 _is_in_locale_category|5.021001||cViu
1489 is_invariant_string|5.021007|5.011000|pn
1490 is_invlist|5.029002||nViu
1491 isLB|5.023007||Viu
1492 isLOWER|5.003007|5.003007|p
1493 isLOWER_A|5.013006|5.003007|p
1494 isLOWER_L1|5.013006|5.003007|p
1495 isLOWER_LC|5.004000|5.004000|
1496 isLOWER_LC_utf8_safe|5.025009|5.006000|p
1497 isLOWER_LC_uvchr|5.007001|5.007001|
1498 isLOWER_utf8|5.031005|5.031005|
1499 isLOWER_utf8_safe|5.025009|5.006000|p
1500 isLOWER_uvchr|5.023009|5.006000|p
1501 is_lvalue_sub|5.007001|5.007001|u
1502 IS_NUMBER_GREATER_THAN_UV_MAX|5.007002|5.003007|p
1503 IS_NUMBER_INFINITY|5.007002|5.003007|p
1504 IS_NUMBER_IN_UV|5.007002|5.003007|p
1505 IS_NUMBER_NAN|5.007003|5.003007|p
1506 IS_NUMBER_NEG|5.007002|5.003007|p
1507 IS_NUMBER_NOT_INT|5.007002|5.003007|p
1508 isOCTAL|5.013005|5.003007|p
1509 isOCTAL_A|5.013006|5.003007|p
1510 isOCTAL_L1|5.013006|5.003007|p
1511 isPRINT|5.004000|5.003007|p
1512 isPRINT_A|5.013006|5.003007|p
1513 isPRINT_L1|5.013006|5.003007|p
1514 isPRINT_LC|5.004000|5.004000|
1515 isPRINT_LC_utf8_safe|5.025009|5.006000|p
1516 isPRINT_LC_uvchr|5.007001|5.007001|
1517 isPRINT_utf8|5.031005|5.031005|
1518 isPRINT_utf8_safe|5.025009|5.006000|p
1519 isPRINT_uvchr|5.023009|5.006000|p
1520 isPSXSPC|5.006001|5.003007|p
1521 isPSXSPC_A|5.013006|5.003007|p
1522 isPSXSPC_L1|5.013006|5.003007|p
1523 isPSXSPC_LC|5.006001|5.006001|
1524 isPSXSPC_LC_utf8_safe|5.025009|5.006000|p
1525 isPSXSPC_LC_uvchr|5.017007|5.017007|
1526 isPSXSPC_utf8|5.031005|5.031005|
1527 isPSXSPC_utf8_safe|5.025009|5.006000|p
1528 isPSXSPC_uvchr|5.023009|5.006000|p
1529 isPUNCT|5.006000|5.003007|p
1530 isPUNCT_A|5.013006|5.003007|p
1531 isPUNCT_L1|5.013006|5.003007|p
1532 isPUNCT_LC|5.006000|5.006000|
1533 isPUNCT_LC_utf8_safe|5.025009|5.006000|p
1534 isPUNCT_LC_uvchr|5.007001|5.007001|
1535 isPUNCT_utf8|5.031005|5.031005|
1536 isPUNCT_utf8_safe|5.025009|5.006000|p
1537 isPUNCT_uvchr|5.023009|5.006000|p
1538 IS_SAFE_SYSCALL|5.019004|5.019004|
1539 is_safe_syscall|5.019004|5.019004|
1540 isSB|5.021009||Viu
1541 isSCRIPT_RUN|5.027008||cVi
1542 isSPACE|5.003007|5.003007|p
1543 isSPACE_A|5.013006|5.003007|p
1544 isSPACE_L1|5.013006|5.003007|p
1545 isSPACE_LC|5.004000|5.004000|
1546 isSPACE_LC_utf8_safe|5.025009|5.006000|p
1547 isSPACE_LC_uvchr|5.007001|5.007001|
1548 isSPACE_utf8|5.031005|5.031005|
1549 isSPACE_utf8_safe|5.025009|5.006000|p
1550 isSPACE_uvchr|5.023009|5.006000|p
1551 is_ssc_worth_it|5.021005||nViu
1552 isSTRICT_UTF8_CHAR|5.025005|5.025005|n
1553 is_strict_utf8_string|5.025006|5.025006|n
1554 is_strict_utf8_string_loc|5.025006|5.025006|n
1555 is_strict_utf8_string_loclen|5.025006|5.025006|n
1556 _is_uni_FOO|5.017008||cVu
1557 _is_uni_perl_idcont|5.017008||cVu
1558 _is_uni_perl_idstart|5.017007||cVu
1559 isUPPER|5.003007|5.003007|p
1560 isUPPER_A|5.013006|5.003007|p
1561 isUPPER_L1|5.013006|5.003007|p
1562 isUPPER_LC|5.004000|5.004000|
1563 isUPPER_LC_utf8_safe|5.025009|5.006000|p
1564 isUPPER_LC_uvchr|5.007001|5.007001|
1565 isUPPER_utf8|5.031005|5.031005|
1566 isUPPER_utf8_safe|5.025009|5.006000|p
1567 isUPPER_uvchr|5.023009|5.006000|p
1568 is_utf8_char|5.006000|5.006000|nd
1569 isUTF8_CHAR|5.021001|5.006001|pn
1570 is_utf8_char_buf|5.015008|5.015008|n
1571 isUTF8_CHAR_flags|5.025005|5.025005|
1572 is_utf8_char_helper|5.031004||ncVu
1573 is_utf8_common|5.009003||Viu
1574 is_utf8_cp_above_31_bits|5.025005||nViu
1575 is_utf8_fixed_width_buf_flags|5.025006|5.025006|n
1576 is_utf8_fixed_width_buf_loc_flags|5.025006|5.025006|n
1577 is_utf8_fixed_width_buf_loclen_flags|5.025006|5.025006|n
1578 _is_utf8_FOO|5.031006||cVu
1579 is_utf8_invariant_string|5.025005|5.011000|pn
1580 is_utf8_invariant_string_loc|5.027001|5.027001|n
1581 is_utf8_non_invariant_string|5.027007||ncVi
1582 is_utf8_overlong_given_start_byte_ok|5.025006||nViu
1583 _is_utf8_perl_idcont|5.031006||cVu
1584 _is_utf8_perl_idstart|5.031006||cVu
1585 is_utf8_string|5.006001|5.006001|n
1586 is_utf8_string_flags|5.025006|5.025006|n
1587 is_utf8_string_loc|5.008001|5.008001|n
1588 is_utf8_string_loc_flags|5.025006|5.025006|n
1589 is_utf8_string_loclen|5.009003|5.009003|n
1590 is_utf8_string_loclen_flags|5.025006|5.025006|n
1591 is_utf8_valid_partial_char|5.025005|5.025005|n
1592 is_utf8_valid_partial_char_flags|5.025005|5.025005|n
1593 isWB|5.021009||Viu
1594 isWORDCHAR|5.013006|5.003007|p
1595 isWORDCHAR_A|5.013006|5.003007|p
1596 isWORDCHAR_L1|5.013006|5.003007|p
1597 isWORDCHAR_LC|5.017007|5.004000|p
1598 isWORDCHAR_LC_utf8_safe|5.025009|5.006000|p
1599 isWORDCHAR_LC_uvchr|5.017007|5.017007|
1600 isWORDCHAR_utf8|5.031005|5.031005|
1601 isWORDCHAR_utf8_safe|5.025009|5.006000|p
1602 isWORDCHAR_uvchr|5.023009|5.006000|p
1603 isXDIGIT|5.006000|5.003007|p
1604 isXDIGIT_A|5.013006|5.003007|p
1605 isXDIGIT_L1|5.013006|5.003007|p
1606 isXDIGIT_LC|5.017007|5.003007|p
1607 isXDIGIT_LC_utf8_safe|5.025009|5.006000|p
1608 isXDIGIT_LC_uvchr|5.017007|5.017007|
1609 isXDIGIT_utf8|5.031005|5.031005|
1610 isXDIGIT_utf8_safe|5.025009|5.006000|p
1611 isXDIGIT_uvchr|5.023009|5.006000|p
1612 items|5.003007|5.003007|V
1613 IVdf|5.006000|5.003007|p
1614 IVSIZE|5.006000|5.003007|p
1615 IVTYPE|5.006000|5.003007|p
1616 ix|5.003007|5.003007|V
1617 jmaybe|5.003007||Viu
1618 join_exact|5.009004||Viu
1619 keyword|5.003007||Viu
1620 keyword_plugin_standard|||iu
1621 LATIN1_TO_NATIVE|5.019004|5.003007|p
1622 LEAVE|5.003007|5.003007|
1623 leave_adjust_stacks|5.023008|5.023008|xu
1624 leave_scope|5.003007|5.003007|u
1625 LEAVE_with_name|5.011002|5.011002|
1626 lex_bufutf8|5.011002|5.011002|x
1627 lex_discard_to|5.011002|5.011002|x
1628 lex_grow_linestr|5.011002|5.011002|x
1629 LEX_KEEP_PREVIOUS|5.011002|5.011002|
1630 lex_next_chunk|5.011002|5.011002|x
1631 lex_peek_unichar|5.011002|5.011002|x
1632 lex_read_space|5.011002|5.011002|x
1633 lex_read_to|5.011002|5.011002|x
1634 lex_read_unichar|5.011002|5.011002|x
1635 lex_start|5.009005|5.009005|x
1636 lex_stuff_pv|5.013006|5.013006|x
1637 lex_stuff_pvn|5.011002|5.011002|x
1638 lex_stuff_pvs|5.013005|5.013005|x
1639 lex_stuff_sv|5.011002|5.011002|x
1640 LEX_STUFF_UTF8|5.011002|5.011002|
1641 lex_unstuff|5.011002|5.011002|x
1642 LIKELY|5.009004|5.003007|p
1643 LINKLIST|5.013006|5.013006|
1644 list|5.003007||Viu
1645 listkids|5.003007||Viu
1646 load_charnames|5.031010||cViu
1647 load_module|5.006000|5.003007|pv
1648 load_module_nocontext|5.006000||vnVu
1649 localize|5.003007||Viu
1650 LONGDBLINFBYTES|5.023000|5.023000|
1651 LONGDBLMANTBITS|5.023000|5.023000|
1652 LONGDBLNANBYTES|5.023000|5.023000|
1653 LONGSIZE|5.004000|5.003007|
1654 looks_like_bool|5.027008||Viu
1655 looks_like_number|5.003007|5.003007|
1656 lop|5.005000||Viu
1657 lossless_NV_to_IV|5.031001||nViu
1658 LSEEKSIZE|5.006000|5.006000|
1659 LVRET|||i
1660 magic_clear_all_env|5.004001||Viu
1661 magic_cleararylen_p|5.017002||Viu
1662 magic_clearenv|5.003007||Viu
1663 magic_clearhint|5.009004||Vi
1664 magic_clearhints|5.011000||Vi
1665 magic_clearisa|5.010001||Viu
1666 magic_clearpack|5.003007||Viu
1667 magic_clearsig|5.003007||Viu
1668 magic_copycallchecker|5.017000||Viu
1669 magic_dump|5.006000|5.006000|u
1670 magic_existspack|5.003007||Viu
1671 magic_freearylen_p|5.009003||Viu
1672 magic_freeovrld|5.007001||Viu
1673 magic_get|5.003007||Viu
1674 magic_getarylen|5.003007||Viu
1675 magic_getdebugvar|5.021005||Viu
1676 magic_getdefelem|5.004000||Viu
1677 magic_getnkeys|5.004005||Viu
1678 magic_getpack|5.003007||Viu
1679 magic_getpos|5.003007||Viu
1680 magic_getsig|5.003007||Viu
1681 magic_getsubstr|5.004005||Viu
1682 magic_gettaint|5.003007||Viu
1683 magic_getuvar|5.003007||Viu
1684 magic_getvec|5.004005||Viu
1685 magic_killbackrefs|5.006000||Viu
1686 magic_methcall1|5.013001||Viu
1687 magic_methcall|||vi
1688 magic_methpack|5.005000||Viu
1689 magic_nextpack|5.003007||Viu
1690 magic_regdata_cnt|5.006000||Viu
1691 magic_regdatum_get|5.006000||Viu
1692 magic_regdatum_set|5.006001||Viu
1693 magic_scalarpack|5.009001||Viu
1694 magic_set|5.003007||Viu
1695 magic_set_all_env|5.004004||Viu
1696 magic_setarylen|5.003007||Viu
1697 magic_setcollxfrm|5.004000||Viu
1698 magic_setdbline|5.003007||Viu
1699 magic_setdebugvar|5.021005||Viu
1700 magic_setdefelem|5.004000||Viu
1701 magic_setenv|5.003007||Viu
1702 magic_sethint|5.009004||Vi
1703 magic_setisa|5.003007||Viu
1704 magic_setlvref|5.021005||Viu
1705 magic_setmglob|5.003007||Viu
1706 magic_setnkeys|5.003007||Viu
1707 magic_setnonelem|5.027009||Viu
1708 magic_setpack|5.003007||Viu
1709 magic_setpos|5.003007||Viu
1710 magic_setregexp|5.008001||Viu
1711 magic_setsig|5.003007||Viu
1712 magic_setsubstr|5.003007||Viu
1713 magic_settaint|5.003007||Viu
1714 magic_setutf8|5.008001||Viu
1715 magic_setuvar|5.003007||Viu
1716 magic_setvec|5.003007||Viu
1717 magic_sizepack|5.005000||Viu
1718 magic_wipepack|5.003007||Viu
1719 make_exactf_invlist|5.031006||Viu
1720 make_matcher|5.027008||Viu
1721 make_trie|5.009002||Viu
1722 malloc|5.007002|5.007002|n
1723 malloced_size|5.005000||nViu
1724 malloc_good_size|5.010001||nViu
1725 MARK|5.003007|5.003007|
1726 markstack_grow|5.021001|5.021001|u
1727 matcher_matches_sv|5.027008||Viu
1728 maybe_multimagic_gv|5.019004||Viu
1729 mayberelocate|5.015006||Viu
1730 measure_struct|5.007003||Viu
1731 memCHRs|5.031008|5.003007|p
1732 mem_collxfrm|5.003007||dViu
1733 _mem_collxfrm|5.025002||Viu
1734 memEQ|5.004000|5.003007|p
1735 memEQs|5.009005|5.003007|p
1736 mem_log_alloc|5.024000||nViu
1737 mem_log_common|5.010001||nViu
1738 mem_log_free|5.024000||nViu
1739 mem_log_realloc|5.024000||nViu
1740 memNE|5.004000|5.003007|p
1741 memNEs|5.009005|5.003007|p
1742 mess|5.006000|5.004000|pv
1743 mess_alloc|5.005000||Viu
1744 mess_nocontext|5.006000||pvnVu
1745 mess_sv|5.013001|5.004000|p
1746 mfree|5.007002|5.007002|nu
1747 mg_clear|5.003007|5.003007|
1748 mg_copy|5.003007|5.003007|
1749 mg_dup|5.007003|5.007003|u
1750 mg_find|5.003007|5.003007|n
1751 mg_findext|5.013008|5.003007|pn
1752 mg_find_mglob|5.019002||cViu
1753 mg_free|5.003007|5.003007|
1754 mg_freeext|5.027004|5.027004|
1755 mg_free_type|5.013006|5.013006|
1756 mg_get|5.003007|5.003007|
1757 mg_length|5.005000|5.005000|d
1758 mg_localize|5.009003||Vi
1759 mg_magical|5.003007|5.003007|n
1760 mg_set|5.003007|5.003007|
1761 mg_size|5.005000|5.005000|u
1762 mini_mktime|5.007002|5.007002|nu
1763 minus_v|5.015006||Viu
1764 missingterm|5.005000||Viu
1765 mode_from_discipline|5.006000||Viu
1766 modkids|5.003007||Viu
1767 more_bodies|||iu
1768 more_sv|5.009004||Viu
1769 moreswitches|5.003007|5.003007|u
1770 Move|5.003007|5.003007|
1771 MoveD|5.009002|5.003007|p
1772 move_proto_attr|5.019005||Viu
1773 mPUSHi|5.009002|5.003007|p
1774 mPUSHn|5.009002|5.003007|p
1775 mPUSHp|5.009002|5.003007|p
1776 mPUSHs|5.010001|5.003007|p
1777 mPUSHu|5.009002|5.003007|p
1778 mro_clean_isarev|5.013007||Viu
1779 mro_gather_and_rename|5.013007||Viu
1780 mro_get_from_name|5.010001|5.010001|u
1781 mro_get_linear_isa|5.009005|5.009005|
1782 mro_get_linear_isa_dfs|5.009005||Vi
1783 mro_get_private_data|5.010001|5.010001|
1784 mro_isa_changed_in|5.009005||Vi
1785 mro_meta_dup|5.009005||Viu
1786 mro_meta_init|||ciu
1787 mro_method_changed_in|5.009005|5.009005|
1788 mro_package_moved|5.013006||Vi
1789 mro_register|5.010001|5.010001|
1790 mro_set_mro|5.010001|5.010001|u
1791 mro_set_private_data|5.010001|5.010001|
1792 mul128|5.005000||Viu
1793 MULTICALL|5.009003|5.009003|
1794 multiconcat_stringify|5.027006||cViu
1795 multideref_stringify|5.021009||cViu
1796 MUTABLE_PTR|5.010001||pVu
1797 MUTABLE_SV|5.010001||pVu
1798 mXPUSHi|5.009002|5.003007|p
1799 mXPUSHn|5.009002|5.003007|p
1800 mXPUSHp|5.009002|5.003007|p
1801 mXPUSHs|5.010001|5.003007|p
1802 mXPUSHu|5.009002|5.003007|p
1803 my_atof2|||cu
1804 my_atof3|5.029000||cVu
1805 my_atof|5.006000|5.006000|u
1806 my_attrs|5.006000||Viu
1807 my_bytes_to_utf8|5.021009||nViu
1808 my_chsize|5.003007||Vu
1809 my_clearenv|5.009003||Viu
1810 MY_CXT|5.009000|5.009000|p
1811 MY_CXT_CLONE|5.009002|5.009000|p
1812 my_cxt_index|||u
1813 MY_CXT_INIT|5.009000|5.009000|p
1814 my_cxt_init|5.009000|5.009000|u
1815 my_dirfd|5.009005|5.009005|nu
1816 my_exit|5.003007|5.003007|
1817 my_exit_jump|5.005000||Viu
1818 my_failure_exit|5.004000|5.004000|u
1819 my_fflush_all|5.006000|5.006000|u
1820 my_fork|5.007003|5.007003|nu
1821 my_kid|5.006000||Viu
1822 my_lstat_flags|5.013003||cViu
1823 my_lstat|||u
1824 my_memrchr|5.027006||nViu
1825 my_mkostemp_cloexec|||niu
1826 my_mkostemp|||niu
1827 my_mkstemp_cloexec|||niu
1828 my_mkstemp|||niu
1829 my_nl_langinfo|5.027006||nViu
1830 my_pclose|5.003007|5.003007|u
1831 my_popen|5.003007|5.003007|u
1832 my_popen_list|5.007001|5.007001|u
1833 my_setenv|5.003007|5.003007|
1834 my_snprintf|5.009004|5.003007|pvn
1835 my_socketpair|5.007003|5.007003|nu
1836 my_sprintf|5.009003|5.003007|pnd
1837 my_stat_flags|5.013003||cViu
1838 my_stat|||u
1839 my_strerror|5.021001||Viu
1840 my_strftime|5.007002|5.007002|u
1841 my_strlcat|5.009004|5.003007|pn
1842 my_strlcpy|5.009004|5.003007|pn
1843 my_strnlen|5.027006|5.003007|pn
1844 my_strtod|5.029010|5.029010|n
1845 my_unexec|5.003007||Viu
1846 my_vsnprintf|5.009004|5.009004|n
1847 NATIVE_TO_LATIN1|5.019004|5.003007|p
1848 NATIVE_TO_NEED|5.019004||ndcVu
1849 NATIVE_TO_UNI|5.007001|5.003007|p
1850 need_utf8|5.009003||nViu
1851 newANONATTRSUB|5.006000|5.006000|u
1852 newANONHASH|5.003007|5.003007|u
1853 newANONLIST|5.003007|5.003007|u
1854 newANONSUB|5.003007|5.003007|u
1855 newASSIGNOP|5.003007|5.003007|
1856 newATTRSUB|5.006000|5.006000|u
1857 newATTRSUB_x|5.019008||cVi
1858 newAV|5.003007|5.003007|
1859 newAVREF|5.003007|5.003007|u
1860 newBINOP|5.003007|5.003007|
1861 new_collate|5.006000||Viu
1862 newCONDOP|5.003007|5.003007|
1863 new_constant|||iu
1864 newCONSTSUB|5.004005|5.003007|p
1865 newCONSTSUB_flags|5.015006|5.015006|
1866 new_ctype|5.006000||Viu
1867 newCVREF|5.003007|5.003007|u
1868 newDEFSVOP|5.021006|5.021006|
1869 newFORM|5.003007|5.003007|u
1870 newFOROP|5.013007|5.013007|
1871 newGIVENOP|5.009003|5.009003|
1872 newGIVWHENOP|5.027008||Viu
1873 newGP|||xiu
1874 newGVgen|5.003007|5.003007|u
1875 newGVgen_flags|5.015004|5.015004|u
1876 newGVOP|5.003007|5.003007|
1877 newGVREF|5.003007|5.003007|u
1878 new_he|5.005000||Viu
1879 newHV|5.003007|5.003007|
1880 newHVhv|5.005000|5.005000|u
1881 newHVREF|5.003007|5.003007|u
1882 _new_invlist|5.013010||cViu
1883 _new_invlist_C_array|5.015008||cViu
1884 newIO|5.003007|5.003007|u
1885 newLISTOP|5.003007|5.003007|
1886 newLOGOP|5.003007|5.003007|
1887 new_logop|5.005000||Viu
1888 newLOOPEX|5.003007|5.003007|
1889 newLOOPOP|5.003007|5.003007|
1890 newMETHOP|5.021005|5.021005|
1891 newMETHOP_internal|5.021005||Viu
1892 newMETHOP_named|5.021005|5.021005|
1893 new_msg_hv|5.027009||Viu
1894 newMYSUB|5.017004|5.017004|u
1895 newNULLLIST|5.003007|5.003007|
1896 new_numeric|5.006000||Viu
1897 newOP|5.003007|5.003007|
1898 newPADNAMELIST|5.021007|5.021007|nx
1899 newPADNAMEouter|5.021007|5.021007|nx
1900 newPADNAMEpvn|5.021007|5.021007|nx
1901 newPADOP|5.006000||V
1902 newPMOP|5.003007|5.003007|
1903 newPROG|5.003007|5.003007|u
1904 newPVOP|5.003007|5.003007|
1905 newRANGE|5.003007|5.003007|
1906 new_regcurly|5.027001||nViu
1907 newRV|5.003007|5.003007|u
1908 newRV_inc|5.004000|5.003007|p
1909 newRV_noinc|5.004000|5.003007|p
1910 newSLICEOP|5.003007|5.003007|
1911 new_stackinfo|5.005000|5.005000|u
1912 newSTATEOP|5.003007|5.003007|
1913 newSTUB|5.017001||Viu
1914 newSUB|5.003007|5.003007|u
1915 newSV|5.003007|5.003007|
1916 newSVavdefelem|5.019004||Viu
1917 newSVhek|5.009003|5.009003|
1918 newSViv|5.003007|5.003007|
1919 newSVnv|5.006000|5.003007|
1920 newSVOP|5.003007|5.003007|
1921 newSVpadname|5.017004|5.017004|x
1922 newSVpv|5.003007|5.003007|
1923 newSVpvf|5.006000|5.004000|v
1924 newSVpvf_nocontext|5.006000||vnVu
1925 newSVpvn|5.004005|5.003007|p
1926 newSVpvn_flags|5.010001|5.003007|p
1927 newSVpvn_share|5.007001|5.003007|p
1928 newSVpvn_utf8|5.010001|5.003007|p
1929 newSVpvs|5.009003|5.003007|p
1930 newSVpvs_flags|5.010001|5.003007|p
1931 newSVpv_share|5.013006|5.013006|
1932 newSVpvs_share|5.009003|5.003007|p
1933 newSVREF|5.003007|5.003007|u
1934 newSVrv|5.003007|5.003007|
1935 newSVsv|5.003007|5.003007|
1936 newSVsv_flags|5.029009|5.003007|pu
1937 newSVsv_nomg|5.029009|5.003007|p
1938 newSV_type|5.009005|5.003007|p
1939 newSVuv|5.006000|5.003007|p
1940 newUNOP|5.003007|5.003007|
1941 newUNOP_AUX|5.021007|5.021007|
1942 new_version|5.009000|5.009000|
1943 new_warnings_bitfield|||xciu
1944 newWHENOP|5.027008|5.027008|
1945 newWHILEOP|5.013007|5.013007|
1946 Newx|5.009003|5.003007|p
1947 Newxc|5.009003|5.003007|p
1948 newXS|5.006000|5.006000|
1949 newXS_deffile|5.021006||cViu
1950 newXS_flags|5.009004|5.009004|xu
1951 newXS_len_flags|5.015006||Vi
1952 newXSproto|5.006000|5.006000|
1953 Newxz|5.009003|5.003007|p
1954 nextargv|5.003007||Viu
1955 nextchar|5.005000||Viu
1956 next_symbol|5.007003||Viu
1957 ninstr|5.003007|5.003007|n
1958 no_bareword_allowed|5.005004||Viu
1959 no_fh_allowed|5.003007||Viu
1960 no_op|5.003007||Viu
1961 NOOP|5.005000|5.003007|poVu
1962 noperl_die|5.021006||vnViu
1963 not_a_number|5.005000||Viu
1964 nothreadhook|5.008000|5.008000|
1965 notify_parser_that_changed_to_utf8|5.025010||Viu
1966 not_incrementable|5.021002||Viu
1967 nuke_stacks|5.005000||Viu
1968 Nullav|5.003007|5.003007|d
1969 Nullch|5.003007|5.003007|
1970 Nullcv|5.003007|5.003007|d
1971 Nullhv|5.003007|5.003007|d
1972 Nullsv|5.003007|5.003007|
1973 NUM2PTR|5.006000||pVu
1974 num_overflow|5.009001||nViu
1975 NVef|5.006001|5.003007|p
1976 NVff|5.006001|5.003007|p
1977 NVgf|5.006001|5.003007|p
1978 NVMANTBITS|5.023000|5.023000|
1979 NVSIZE|5.006001|5.006001|
1980 NVTYPE|5.006000|5.003007|p
1981 oopsAV|5.003007||Viu
1982 oopsHV|5.003007||Viu
1983 op_append_elem|5.013006|5.013006|
1984 op_append_list|5.013006|5.013006|
1985 OP_CLASS|5.013007|5.013007|
1986 op_class|5.025010|5.025010|
1987 op_clear|5.006000||cViu
1988 op_contextualize|5.013006|5.013006|
1989 op_convert_list|5.021006|5.021006|
1990 OP_DESC|5.007003|5.007003|
1991 op_dump|5.006000|5.006000|
1992 openn_cleanup|5.019010||Viu
1993 openn_setup|5.019010||Viu
1994 open_script|5.005000||Viu
1995 OPf_KIDS|5.003007|5.003007|
1996 op_free|5.003007|5.003007|
1997 OpHAS_SIBLING|5.021007|5.003007|p
1998 op_integerize|5.015003||Viu
1999 OpLASTSIB_set|5.021011|5.003007|p
2000 op_linklist|5.013006|5.013006|
2001 op_lvalue|5.013007|5.013007|x
2002 op_lvalue_flags|||ciu
2003 OpMAYBESIB_set|5.021011|5.003007|p
2004 opmethod_stash|5.021007||Viu
2005 OpMORESIB_set|5.021011|5.003007|p
2006 OP_NAME|5.007003|5.007003|
2007 op_null|5.007002|5.007002|
2008 op_parent|5.025001|5.025001|n
2009 OPpEARLY_CV|5.006000|5.006000|
2010 OPpENTERSUB_AMPER|5.003007|5.003007|
2011 op_prepend_elem|5.013006|5.013006|
2012 op_refcnt_dec|||xiu
2013 op_refcnt_inc|||xiu
2014 op_refcnt_lock|5.009002|5.009002|u
2015 op_refcnt_unlock|5.009002|5.009002|u
2016 op_relocate_sv|5.021005||Viu
2017 op_scope|5.013007|5.013007|x
2018 OpSIBLING|5.021007|5.003007|p
2019 op_sibling_splice|5.021002|5.021002|n
2020 opslab_force_free|5.017002||Viu
2021 opslab_free|5.017002||Viu
2022 opslab_free_nopad|5.017002||Viu
2023 op_std_init|5.015003||Viu
2024 optimize_op|5.027006||Viu
2025 optimize_optree|5.027006||Vi
2026 OP_TYPE_IS|5.019007|5.019007|
2027 OP_TYPE_IS_OR_WAS|5.019010|5.019010|
2028 op_unscope|5.017003||xViu
2029 ORIGMARK|5.003007|5.003007|
2030 OSNAME|5.003007|5.003007|
2031 OSVERS|5.007002|5.007002|
2032 output_non_portable|5.031008||Viu
2033 output_posix_warnings|5.029005||Viu
2034 package|5.003007||Viu
2035 package_version|5.011001||Viu
2036 pack_cat|||
2037 packlist|5.008001|5.008001|
2038 pack_rec|5.008001||Viu
2039 packWARN|5.007003||pVu
2040 pad_add_anon|5.008001|5.008001|
2041 pad_add_name_pv|5.015001|5.015001|
2042 pad_add_name_pvn|5.015001|5.015001|
2043 pad_add_name_pvs|5.015001|5.015001|
2044 pad_add_name_sv|5.015001|5.015001|
2045 pad_add_weakref|5.021007||Viu
2046 pad_alloc|5.003007|5.003007|x
2047 pad_alloc_name|5.015001||Vi
2048 PadARRAY|5.017004|5.017004|x
2049 PAD_BASE_SV|||i
2050 pad_block_start|5.008001||Vi
2051 pad_check_dup|5.008001||Vi
2052 PAD_CLONE_VARS|||i
2053 PAD_COMPNAME_FLAGS|||i
2054 PAD_COMPNAME_GEN|||i
2055 PAD_COMPNAME_GEN_set|||i
2056 PAD_COMPNAME_OURSTASH|||i
2057 PAD_COMPNAME_PV|||i
2058 pad_compname_type|||
2059 PAD_COMPNAME_TYPE|||i
2060 pad_findlex|5.005000||Vi
2061 pad_findmy_pv|5.015001|5.015001|
2062 pad_findmy_pvn|5.015001|5.015001|
2063 pad_findmy_pvs|5.015001|5.015001|
2064 pad_findmy_sv|5.015001|5.015001|
2065 pad_fixup_inner_anons|5.008001||Vi
2066 pad_free|5.003007||Vi
2067 pad_leavemy|5.003007||Vi
2068 PadlistARRAY|5.017004|5.017004|x
2069 padlist_dup|5.013002||Vi
2070 PadlistMAX|5.017004|5.017004|x
2071 PadlistNAMES|5.017004|5.017004|x
2072 PadlistNAMESARRAY|5.017004|5.017004|x
2073 PadlistNAMESMAX|5.017004|5.017004|x
2074 PadlistREFCNT|5.017004|5.017004|x
2075 padlist_store|5.017004||Viu
2076 PadMAX|5.017004|5.017004|x
2077 padname_dup|5.021007||Vi
2078 padname_free|||ciu
2079 PadnameIN_SCOPE|5.031004||nViu
2080 PadnameIsOUR|||i
2081 PadnameIsSTATE|||i
2082 PadnameLEN|5.017004|5.017004|x
2083 PadnamelistARRAY|5.017004|5.017004|x
2084 padnamelist_dup|5.021007||Vi
2085 padnamelist_fetch|5.021007|5.021007|nx
2086 padnamelist_free|||ciu
2087 PadnamelistMAX|5.017004|5.017004|x
2088 PadnamelistREFCNT|5.021007|5.021007|x
2089 PadnamelistREFCNT_dec|5.021007|5.021007|x
2090 padnamelist_store|5.021007|5.021007|x
2091 PadnameOURSTASH|||i
2092 PadnameOUTER|||i
2093 PadnamePV|5.017004|5.017004|x
2094 PadnameREFCNT|5.021007|5.021007|x
2095 PadnameREFCNT_dec|5.021007|5.021007|x
2096 PadnameSV|5.017004|5.017004|x
2097 PADNAMEt_OUTER|5.021007|5.021007|
2098 PadnameTYPE|||i
2099 PadnameUTF8|5.017004|5.017004|x
2100 pad_new|5.008001|5.008001|
2101 pad_push|5.008001||cVi
2102 pad_reset|5.003007||Vi
2103 PAD_RESTORE_LOCAL|||i
2104 PAD_SAVE_LOCAL|||i
2105 PAD_SAVE_SETNULLPAD|||i
2106 PAD_SET_CUR|||i
2107 PAD_SET_CUR_NOSAVE|||i
2108 pad_setsv|5.008001|5.008001|
2109 PAD_SETSV|||i
2110 pad_sv|5.003007||V
2111 PAD_SV|||i
2112 PAD_SVl|||i
2113 pad_swipe|5.003007||Vi
2114 pad_tidy|5.008001|5.008001|x
2115 parse_arithexpr|5.013008|5.013008|x
2116 parse_barestmt|5.013007|5.013007|x
2117 parse_block|5.013007|5.013007|x
2118 parse_body|5.006000||Viu
2119 parse_fullexpr|5.013008|5.013008|x
2120 parse_fullstmt|5.013005|5.013005|x
2121 parse_gv_stash_name|5.019004||Viu
2122 parse_ident|5.017010||Viu
2123 parse_label|5.013007|5.013007|x
2124 parse_listexpr|5.013008|5.013008|x
2125 parse_lparen_question_flags|5.017009||Viu
2126 PARSE_OPTIONAL|5.013007|5.013007|
2127 parser_dup|5.009000|5.009000|u
2128 parser_free|5.009005||Viu
2129 parser_free_nexttoke_ops|5.017006||Viu
2130 parse_stmtseq|5.013006|5.013006|x
2131 parse_subsignature|5.031003|5.031003|x
2132 parse_termexpr|5.013008|5.013008|x
2133 parse_unicode_opts|5.008001||Viu
2134 parse_uniprop_string|5.027011||cViu
2135 path_is_searchable|5.019001||nViu
2136 peep|5.003007||Viu
2137 pending_ident|5.017004||Viu
2138 PERL_ABS|5.008001|5.003007|p
2139 perl_alloc|5.003007|5.003007|n
2140 perl_alloc_using|5.006000||nVu
2141 PERL_BCDVERSION||5.003007|pou
2142 perl_clone|5.006000||nV
2143 perl_clone_using|5.006000||nVu
2144 perl_construct|5.003007|5.003007|n
2145 Perl_custom_op_xop|5.013007||V
2146 perl_destruct|5.007003|5.007003|n
2147 Perl_eval_pv||5.003007|ou
2148 Perl_eval_sv||5.003007|ou
2149 PERL_EXIT_ABORT|5.019003|5.019003|
2150 PERL_EXIT_DESTRUCT_END|5.007003|5.007003|
2151 PERL_EXIT_EXPECTED|5.006000|5.006000|
2152 PERL_EXIT_WARN|5.019003|5.019003|
2153 perl_free|5.003007|5.003007|n
2154 PERL_HASH|5.003007|5.003007|p
2155 PERL_INT_MAX|5.003007|5.003007|p
2156 PERL_INT_MIN|5.003007|5.003007|p
2157 PerlIO_apply_layers|5.007001|5.007001|
2158 PerlIO_binmode|5.007001|5.007001|
2159 PerlIO_canset_cnt|5.003007|5.003007|n
2160 PerlIO_clearerr|5.007003|5.007003|
2161 PerlIO_close|5.007003|5.007003|
2162 PerlIO_context_layers|5.009004|5.009004|u
2163 PerlIO_debug|5.007001|5.007001|
2164 PerlIO_eof|5.007003|5.007003|
2165 PerlIO_error|5.007003|5.007003|
2166 PerlIO_exportFILE|5.003007|5.003007|n
2167 PerlIO_fast_gets|5.003007|5.003007|n
2168 PerlIO_fdopen|5.003007|5.003007|n
2169 PerlIO_fileno|5.007003|5.007003|
2170 PerlIO_fill|5.007003|5.007003|u
2171 PerlIO_findFILE|5.003007|5.003007|n
2172 PerlIO_flush|5.007003|5.007003|
2173 PERLIO_FUNCS_CAST|5.009003||pVu
2174 PERLIO_FUNCS_DECL|5.009003||pVu
2175 PerlIO_get_base|5.007003|5.007003|
2176 PerlIO_get_bufsiz|5.007003|5.007003|
2177 PerlIO_getc|5.003007|5.003007|n
2178 PerlIO_get_cnt|5.007003|5.007003|
2179 PerlIO_getpos|5.003007|5.003007|n
2180 PerlIO_get_ptr|5.007003|5.007003|
2181 PerlIO_has_base|5.003007|5.003007|n
2182 PerlIO_has_cntptr|5.003007|5.003007|n
2183 PerlIO_importFILE|5.003007|5.003007|n
2184 PerlIO_open|5.003007|5.003007|n
2185 PerlIO_printf|5.006000|5.003007|
2186 PerlIO_putc|5.003007|5.003007|n
2187 PerlIO_puts|5.003007|5.003007|n
2188 PerlIO_read|5.007003|5.007003|
2189 PerlIO_releaseFILE|5.003007|5.003007|n
2190 PerlIO_reopen|5.003007|5.003007|
2191 PerlIO_restore_errno|5.021006||cViu
2192 PerlIO_rewind|5.003007|5.003007|n
2193 PerlIO_save_errno|5.021006||cViu
2194 PerlIO_seek|5.007003|5.007003|
2195 PerlIO_set_cnt|5.007003|5.007003|
2196 PerlIO_setlinebuf|5.007003|5.007003|
2197 PerlIO_setpos|5.003007|5.003007|n
2198 PerlIO_set_ptrcnt|5.007003|5.007003|
2199 PerlIO_stderr|5.007003|5.007003|
2200 PerlIO_stdin|5.007003|5.007003|
2201 PerlIO_stdout|5.007003|5.007003|
2202 PerlIO_stdoutf|5.006000|5.003007|
2203 PerlIO_tell|5.007003|5.007003|
2204 PerlIO_ungetc|5.003007|5.003007|n
2205 PerlIO_unread|5.007003|5.007003|u
2206 PerlIO_vprintf|5.003007|5.003007|n
2207 PerlIO_write|5.007003|5.007003|
2208 Perl_langinfo|5.027004|5.027004|n
2209 PerlLIO_dup2_cloexec|5.027008||Viu
2210 PerlLIO_dup_cloexec|5.027008||Viu
2211 PerlLIO_open3_cloexec|5.027008||Viu
2212 PerlLIO_open_cloexec|5.027008||Viu
2213 PERL_LOADMOD_DENY|5.006000|5.003007|
2214 PERL_LOADMOD_IMPORT_OPS|5.006000|5.003007|
2215 PERL_LOADMOD_NOIMPORT|5.006000|5.003007|
2216 PERL_LONG_MAX|5.003007|5.003007|p
2217 PERL_LONG_MIN|5.003007|5.003007|p
2218 PERL_MAGIC_arylen|5.007002|5.003007|p
2219 PERL_MAGIC_arylen_p|5.009003|5.009003|
2220 PERL_MAGIC_backref|5.007002|5.003007|p
2221 PERL_MAGIC_bm|5.007002|5.003007|p
2222 PERL_MAGIC_checkcall|5.013006|5.013006|
2223 PERL_MAGIC_collxfrm|5.007002|5.003007|p
2224 PERL_MAGIC_dbfile|5.007002|5.003007|p
2225 PERL_MAGIC_dbline|5.007002|5.003007|p
2226 PERL_MAGIC_debugvar|5.021005|5.021005|
2227 PERL_MAGIC_defelem|5.007002|5.003007|p
2228 PERL_MAGIC_env|5.007002|5.003007|p
2229 PERL_MAGIC_envelem|5.007002|5.003007|p
2230 PERL_MAGIC_ext|5.007002|5.003007|p
2231 PERL_MAGIC_fm|5.007002|5.003007|p
2232 PERL_MAGIC_glob||5.003007|pou
2233 PERL_MAGIC_hints|5.009004|5.009004|
2234 PERL_MAGIC_hintselem|5.009004|5.009004|
2235 PERL_MAGIC_isa|5.007002|5.003007|p
2236 PERL_MAGIC_isaelem|5.007002|5.003007|p
2237 PERL_MAGIC_lvref|5.021005|5.021005|
2238 PERL_MAGIC_mutex||5.003007|pou
2239 PERL_MAGIC_nkeys|5.007002|5.003007|p
2240 PERL_MAGIC_nonelem|5.027009|5.027009|
2241 PERL_MAGIC_overload||5.003007|pou
2242 PERL_MAGIC_overload_elem||5.003007|pou
2243 PERL_MAGIC_overload_table|5.007002|5.003007|p
2244 PERL_MAGIC_pos|5.007002|5.003007|p
2245 PERL_MAGIC_qr|5.007002|5.003007|p
2246 PERL_MAGIC_regdata|5.007002|5.003007|p
2247 PERL_MAGIC_regdatum|5.007002|5.003007|p
2248 PERL_MAGIC_regex_global|5.007002|5.003007|p
2249 PERL_MAGIC_rhash|5.009003|5.009003|
2250 PERL_MAGIC_shared|5.007003|5.003007|p
2251 PERL_MAGIC_shared_scalar|5.007003|5.003007|p
2252 PERL_MAGIC_sig|5.007002|5.003007|p
2253 PERL_MAGIC_sigelem|5.007002|5.003007|p
2254 PERL_MAGIC_substr|5.007002|5.003007|p
2255 PERL_MAGIC_sv|5.007002|5.003007|p
2256 PERL_MAGIC_symtab|5.009003|5.009003|
2257 PERL_MAGIC_taint|5.007002|5.003007|p
2258 PERL_MAGIC_tied|5.007002|5.003007|p
2259 PERL_MAGIC_tiedelem|5.007002|5.003007|p
2260 PERL_MAGIC_tiedscalar|5.007002|5.003007|p
2261 PERL_MAGIC_utf8|5.008001|5.003007|p
2262 PERL_MAGIC_uvar|5.007002|5.003007|p
2263 PERL_MAGIC_uvar_elem|5.007003|5.003007|p
2264 PERL_MAGIC_vec|5.007002|5.003007|p
2265 PERL_MAGIC_vstring|5.008001|5.003007|p
2266 perl_parse|5.006000|5.006000|n
2267 PerlProc_pipe_cloexec|5.027008||Viu
2268 PERL_PV_ESCAPE_ALL|5.009004|5.003007|p
2269 PERL_PV_ESCAPE_FIRSTCHAR|5.009004|5.003007|p
2270 PERL_PV_ESCAPE_NOBACKSLASH|5.009004|5.003007|p
2271 PERL_PV_ESCAPE_NOCLEAR|5.009004|5.003007|p
2272 PERL_PV_ESCAPE_NONASCII|5.013009|5.013009|
2273 PERL_PV_ESCAPE_QUOTE|5.009004|5.003007|p
2274 PERL_PV_ESCAPE_RE|5.009005|5.003007|p
2275 PERL_PV_ESCAPE_UNI|5.009004|5.003007|p
2276 PERL_PV_ESCAPE_UNI_DETECT|5.009004|5.003007|p
2277 PERL_PV_PRETTY_DUMP|5.009004|5.003007|poVu
2278 PERL_PV_PRETTY_ELLIPSES|5.010000|5.003007|p
2279 PERL_PV_PRETTY_LTGT|5.009004|5.003007|p
2280 PERL_PV_PRETTY_NOCLEAR|5.010000|5.003007|poVu
2281 PERL_PV_PRETTY_QUOTE|5.009004|5.003007|p
2282 PERL_PV_PRETTY_REGPROP|5.009004|5.003007|poVu
2283 PERL_QUAD_MAX|5.003007|5.003007|p
2284 PERL_QUAD_MIN|5.003007|5.003007|p
2285 PERL_REVISION|5.006000|5.003007|p
2286 perl_run|5.003007|5.003007|n
2287 PERL_SCAN_ALLOW_UNDERSCORES|5.007003|5.003007|p
2288 PERL_SCAN_DISALLOW_PREFIX|5.007003|5.003007|p
2289 PERL_SCAN_GREATER_THAN_UV_MAX|5.007003|5.003007|p
2290 PERL_SCAN_SILENT_ILLDIGIT|5.008001|5.003007|p
2291 PERL_SCAN_TRAILING|5.021002|5.021002|
2292 Perl_setlocale|5.027002|5.027002|n
2293 PERL_SHORT_MAX|5.003007|5.003007|p
2294 PERL_SHORT_MIN|5.003007|5.003007|p
2295 PERL_SIGNALS_UNSAFE_FLAG|5.008001|5.003007|poVu
2296 Perl_signbit|5.009005|5.009005|nx
2297 PerlSock_accept_cloexec|5.027008||Viu
2298 PerlSock_socket_cloexec|5.027008||Viu
2299 PerlSock_socketpair_cloexec|5.027008||Viu
2300 PERL_SUBVERSION|5.006000|5.003007|p
2301 PERL_SYS_INIT3|5.006000|5.006000|
2302 PERL_SYS_INIT|5.003007|5.003007|
2303 PERL_SYS_TERM|5.003007|5.003007|
2304 PERL_UCHAR_MAX|5.003007|5.003007|p
2305 PERL_UCHAR_MIN|5.003007|5.003007|p
2306 PERL_UINT_MAX|5.003007|5.003007|p
2307 PERL_UINT_MIN|5.003007|5.003007|poVu
2308 PERL_ULONG_MAX|5.003007|5.003007|p
2309 PERL_ULONG_MIN|5.003007|5.003007|p
2310 PERL_UNUSED_ARG|5.009003||pVu
2311 PERL_UNUSED_CONTEXT|5.009004|5.003007|poVu
2312 PERL_UNUSED_DECL|5.007002|5.003007|poVu
2313 PERL_UNUSED_RESULT|5.021001||pVu
2314 PERL_UNUSED_VAR|5.007002||pVu
2315 PERL_UQUAD_MAX|5.003007|5.003007|p
2316 PERL_UQUAD_MIN|5.003007|5.003007|p
2317 PERL_USE_GCC_BRACE_GROUPS|5.009004|5.004000|poVu
2318 PERL_USHORT_MAX|5.003007|5.003007|p
2319 PERL_USHORT_MIN|5.003007|5.003007|p
2320 PERL_VERSION|5.006000|5.003007|p
2321 perly_sighandler|5.031007|5.031007|nu
2322 pidgone|5.003007||Viu
2323 PL_bufend||5.003007|pou
2324 PL_bufptr||5.003007|pou
2325 PL_check|5.009003|5.006000|
2326 PL_compiling|5.004005|5.003007|poVu
2327 PL_comppad|5.008001|5.008001|x
2328 PL_comppad_name|5.017004|5.017004|x
2329 PL_copline||5.003007|pou
2330 PL_curcop|5.004005|5.003007|p
2331 PL_curpad|5.005000|5.005000|x
2332 PL_curstash|5.004005|5.003007|p
2333 PL_DBsignal|5.005000|5.003007|poVu
2334 PL_DBsingle|5.004005|5.003007|poV
2335 PL_DBsub|5.004005|5.003007|poV
2336 PL_DBtrace|5.005000|5.003007|poV
2337 PL_debstash|5.004005|5.003007|poVu
2338 PL_defgv|5.004005|5.003007|p
2339 PL_diehook|5.004005|5.003007|poVu
2340 PL_dirty|5.004005|5.003007|poVu
2341 PL_dowarn|5.004005|5.003007|poV
2342 PL_errgv|5.004005|5.003007|p
2343 PL_error_count||5.003007|pou
2344 PL_exit_flags|5.006000|5.006000|
2345 PL_expect||5.003007|pou
2346 PL_hexdigit|5.005000|5.003007|poVu
2347 PL_hints|5.005000|5.003007|poVu
2348 PL_in_my||5.003007|pou
2349 PL_in_my_stash||5.005000|pou
2350 PL_keyword_plugin|5.011002|5.011002|x
2351 PL_last_in_gv|||i
2352 PL_laststatval|5.005000|5.003007|poVu
2353 PL_lex_state||5.003007|pou
2354 PL_lex_stuff||5.003007|pou
2355 PL_linestr||5.003007|pou
2356 PL_mess_sv|5.005000|5.004000|poVu
2357 PL_modglobal|5.005000|5.005000|
2358 PL_na|5.004005|5.003007|p
2359 PL_no_modify|5.006000|5.003007|poVu
2360 PL_ofsgv|||i
2361 PL_opfreehook|5.011000|5.011000|
2362 PL_parser|5.009005|5.003007|p
2363 PL_peepp|5.007003|5.007003|
2364 PL_perldb|5.004005|5.003007|poVu
2365 PL_perl_destruct_level|5.004005|5.003007|p
2366 PL_phase|5.013007|5.013007|
2367 PL_ppaddr|5.006000|5.003007|poVu
2368 PL_rpeepp|5.013005|5.013005|
2369 PL_rsfp||5.003007|pou
2370 PL_rsfp_filters||5.003007|pou
2371 PL_rs|||i
2372 PL_runops|5.006000|5.006000|
2373 PL_signals|5.008001||pVu
2374 PL_stack_base|5.004005|5.003007|poVu
2375 PL_stack_sp|5.004005|5.003007|poVu
2376 PL_statcache|5.005000|5.003007|poVu
2377 PL_stdingv|5.004005|5.003007|poVu
2378 PL_Sv|5.005000|5.003007|poVu
2379 PL_sv_arenaroot|5.004005|5.003007|poVu
2380 PL_sv_no|5.004005|5.003007|p
2381 PL_sv_undef|5.004005|5.003007|p
2382 PL_sv_yes|5.004005|5.003007|p
2383 PL_sv_zero|5.027003|5.027003|
2384 PL_tainted|5.004005|5.003007|poVu
2385 PL_tainting|5.004005|5.003007|poVu
2386 PL_tokenbuf||5.003007|pou
2387 PL_Xpv|5.005000|5.003007|poVu
2388 pm_description|5.009004||Viu
2389 pmop_dump|5.006000|5.006000|u
2390 pmruntime|5.003007||Viu
2391 pmtrans|5.003007||Viu
2392 _pMY_CXT|5.007003|5.009000|pV
2393 pMY_CXT_|5.007003|5.009000|pV
2394 pMY_CXT|5.009000|5.009000|p
2395 Poison|5.008000|5.003007|p
2396 PoisonFree|5.009004|5.003007|p
2397 PoisonNew|5.009004|5.003007|p
2398 PoisonWith|5.009004|5.003007|p
2399 POPi|5.003007|5.003007|
2400 POPl|5.003007|5.003007|
2401 POPMARK|||ciu
2402 POP_MULTICALL|5.009003|5.009003|
2403 POPn|5.006000|5.003007|
2404 POPp|5.003007|5.003007|
2405 POPpbytex|5.007001|5.007001|
2406 POPpx|5.005003|5.005003|
2407 POPs|5.003007|5.003007|
2408 pop_scope|5.003007|5.003007|u
2409 POPu|5.004000|5.004000|
2410 POPul|5.006000|5.006000|
2411 populate_ANYOF_from_invlist|5.019005||Viu
2412 populate_isa|||viu
2413 pregcomp|5.009005|5.009005|u
2414 pregexec|5.003007|5.003007|u
2415 pregfree2|5.011000|5.011000|u
2416 pregfree|5.003007|5.003007|u
2417 prescan_version|5.011004|5.011004|
2418 printbuf|5.009004||Viu
2419 print_bytes_for_locale|5.027002||Viu
2420 print_collxfrm_input_and_return|5.025004||Viu
2421 printf_nocontext|5.007001|5.007001|vndu
2422 PRIVLIB|5.003007|5.003007|
2423 process_special_blocks|5.009005||Viu
2424 pTHX|5.006000|5.003007|p
2425 pTHX_|5.006000|5.003007|pV
2426 PTR2IV|5.006000|5.003007|p
2427 PTR2nat|5.009003||pVu
2428 PTR2NV|5.006000|5.003007|p
2429 PTR2ul|5.007001||pVu
2430 PTR2UV|5.006000|5.003007|p
2431 ptr_hash|5.017010||nViu
2432 PTRSIZE|5.005000|5.005000|
2433 ptr_table_clear|5.009005|5.009005|du
2434 ptr_table_fetch|5.009005|5.009005|u
2435 ptr_table_find|5.009004||nViu
2436 ptr_table_free|5.009005|5.009005|u
2437 ptr_table_new|5.009005|5.009005|u
2438 ptr_table_split|5.009005|5.009005|u
2439 ptr_table_store|5.009005|5.009005|u
2440 PTRV|5.006000|5.003007|poVu
2441 PUSHi|5.003007|5.003007|
2442 PUSHMARK|5.003007|5.003007|
2443 PUSHmortal|5.009002|5.003007|p
2444 PUSH_MULTICALL|5.011000|5.011000|
2445 PUSHn|5.006000|5.003007|
2446 PUSHp|5.003007|5.003007|
2447 PUSHs|5.003007|5.003007|
2448 push_scope|5.003007|5.003007|u
2449 PUSHu|5.004000|5.003007|p
2450 PUTBACK|5.003007|5.003007|
2451 put_charclass_bitmap_innards|5.021004||Viu
2452 put_charclass_bitmap_innards_common|5.023008||Viu
2453 put_charclass_bitmap_innards_invlist|5.023008||Viu
2454 put_code_point|5.021004||Viu
2455 put_range|5.019009||Viu
2456 pv_display|5.006000|5.003007|p
2457 pv_escape|5.009004|5.003007|p
2458 pv_pretty|5.009004|5.003007|p
2459 pv_uni_display|5.007003|5.007003|
2460 qerror|5.006000||cViu
2461 quadmath_format_needed|5.021004||nVi
2462 quadmath_format_valid|5.031007||nVi
2463 RANDBITS|5.003007|5.003007|
2464 READ_XDIGIT|5.017006|5.017006|
2465 realloc|5.007002|5.007002|n
2466 ReANY|||ncu
2467 re_compile|5.009005|5.009005|u
2468 re_croak|||iu
2469 re_dup_guts|5.011000|5.011000|u
2470 reentrant_free|5.010000|5.010000|u
2471 reentrant_init|5.010000|5.010000|u
2472 reentrant_retry|5.010000|5.010000|vnu
2473 reentrant_size|5.010000|5.010000|u
2474 re_exec_indentf|5.023009||vViu
2475 ref|5.003007||Vu
2476 ref_array_or_hash|5.027008||Viu
2477 refcounted_he_chain_2hv|5.013007||cVi
2478 refcounted_he_fetch_pv|5.013007||cVi
2479 refcounted_he_fetch_pvn|5.013007||cVi
2480 refcounted_he_fetch_pvs|||i
2481 refcounted_he_fetch_sv|5.013007||cVi
2482 refcounted_he_free|5.013007||cVi
2483 refcounted_he_inc|5.013007||cVi
2484 refcounted_he_new_pv|5.013007||cVi
2485 refcounted_he_new_pvn|5.013007||cVi
2486 refcounted_he_new_pvs|||i
2487 refcounted_he_new_sv|5.013007||cVi
2488 refcounted_he_value|5.009004||Viu
2489 refkids|5.003007||Viu
2490 refto|5.005000||Viu
2491 reg2Lanode|5.021005||Viu
2492 reg|5.005000||Viu
2493 reganode|5.005000||Viu
2494 regatom|5.005000||Viu
2495 regbranch|5.005000||Viu
2496 reg_check_named_buff_matched|5.009005||nViu
2497 regclass|5.005000||Viu
2498 regcppop|5.005000||Viu
2499 regcppush|5.005000||Viu
2500 regcp_restore|5.025006||Viu
2501 regcurly|5.013010||nViu
2502 regdump|5.005000|5.005000|u
2503 regdump_extflags|5.009005||Viu
2504 regdump_intflags|5.019002||Viu
2505 regdupe_internal|5.009000|5.009000|u
2506 regexec_flags|5.005000|5.005000|u
2507 regex_set_precedence|5.021010||nViu
2508 regfree_internal|5.009005|5.009005|u
2509 reghop3|5.007001||nViu
2510 reghop4|5.009005||nViu
2511 reghopmaybe3|5.007001||nViu
2512 reginclass|5.005000||Viu
2513 reginitcolors|5.006000|5.006000|u
2514 reginsert|5.005000||Viu
2515 regmatch|5.005000||Viu
2516 reg_named_buff|5.009005||cViu
2517 reg_named_buff_all|5.009005|5.009005|u
2518 reg_named_buff_exists|5.009005|5.009005|u
2519 reg_named_buff_fetch|5.009005|5.009005|u
2520 reg_named_buff_firstkey|5.009005|5.009005|u
2521 reg_named_buff_iter|5.009005||cViu
2522 reg_named_buff_nextkey|5.009005|5.009005|u
2523 reg_named_buff_scalar|5.009005|5.009005|u
2524 regnext|5.005000|5.005000|u
2525 reg_node|5.005000||Viu
2526 regnode_guts|5.021005||Viu
2527 reg_numbered_buff_fetch|5.009005||cViu
2528 reg_numbered_buff_length|5.009005||cViu
2529 reg_numbered_buff_store|5.009005||cViu
2530 regpiece|5.005000||Viu
2531 regpnode|5.031010||Viu
2532 regprop|5.003007||Viu
2533 reg_qr_package|5.009005||cViu
2534 regrepeat|5.005000||Viu
2535 reg_scan_name|5.009005||Viu
2536 reg_skipcomment|5.009005||nViu
2537 regtail|5.005000||Viu
2538 regtail_study|5.009004||Viu
2539 reg_temp_copy|5.009005||cViu
2540 regtry|5.005000||Viu
2541 re_indentf|5.023009||vViu
2542 re_intuit_start|5.006000||cVu
2543 re_intuit_string|5.006000||cVu
2544 Renew|5.003007|5.003007|
2545 Renewc|5.003007|5.003007|
2546 re_op_compile|5.017001||Viu
2547 re_op_compile_wrapper|5.031010||Viu
2548 repeatcpy|5.003007|5.003007|nu
2549 REPLACEMENT_CHARACTER_UTF8|5.025005|5.003007|p
2550 report_evil_fh|5.006001||Viu
2551 report_redefined_cv|5.015006||Viu
2552 report_uninit|5.006000||cVi
2553 report_wrongway_fh|5.013009||Viu
2554 re_printf|5.023009||vViu
2555 require_pv|5.006000|5.006000|
2556 require_tie_mod|5.009005||Viu
2557 RESTORE_ERRNO|||i
2558 RESTORE_LC_NUMERIC|5.021010|5.021010|
2559 restore_magic|5.009003||Viu
2560 restore_switched_locale|5.027009||Viu
2561 RETVAL|5.003007|5.003007|V
2562 rninstr|5.003007|5.003007|n
2563 rpeep|5.013005||Viu
2564 rsignal|5.004000|5.004000|
2565 rsignal_restore|5.004000||Viu
2566 rsignal_save|5.004000||Viu
2567 rsignal_state|5.004000|5.004000|u
2568 run_body|5.006000||Viu
2569 runops_debug|5.005000|5.005000|u
2570 runops_standard|5.005000|5.005000|u
2571 run_user_filter|5.009003||Viu
2572 rv2cv_op_cv|5.013006|5.013006|
2573 RV2CVOPCV_MARK_EARLY|5.013006|5.013006|
2574 RV2CVOPCV_RETURN_NAME_GV|5.013006|5.013006|
2575 rvpv_dup|5.007003|5.007003|u
2576 rxres_free|5.004000||Viu
2577 rxres_restore|5.004000||Viu
2578 rxres_save|5.004000||Viu
2579 Safefree|5.003007|5.003007|
2580 safesyscalloc|5.006000|5.006000|nu
2581 safesysfree|5.006000|5.006000|nu
2582 safesysmalloc|5.006000|5.006000|nu
2583 safesysrealloc|5.006000|5.006000|nu
2584 same_dirent|5.003007||Viu
2585 SANE_ERRSV|5.031003|5.031003|
2586 save_adelete|5.011000|5.011000|u
2587 save_aelem|5.004005|5.004005|u
2588 save_aelem_flags|5.011000|5.011000|u
2589 save_alloc|5.006000|5.006000|u
2590 save_aptr|5.003007|5.003007|
2591 save_ary|5.003007|5.003007|
2592 save_bool|5.008001|5.008001|u
2593 save_clearsv|5.003007|5.003007|u
2594 SAVECLEARSV|||i
2595 SAVECOMPPAD|||i
2596 SAVE_DEFSV|5.004005|5.003007|poVu
2597 save_delete|5.003007|5.003007|u
2598 save_destructor|5.006000|5.006000|u
2599 save_destructor_x|5.006000|5.006000|u
2600 SAVE_ERRNO|||i
2601 save_freeop|5.010001|5.010001|u
2602 save_freepv|5.003007|5.003007|u
2603 save_freesv|5.003007|5.003007|u
2604 save_generic_pvref|5.006001|5.006001|u
2605 save_generic_svref|5.005003|5.005003|u
2606 save_gp|5.004000|5.004000|
2607 save_hash|5.003007|5.003007|
2608 save_hdelete|5.011000|5.011000|u
2609 save_hek_flags|5.008000||nViu
2610 save_helem|5.004005|5.004005|u
2611 save_helem_flags|5.011000|5.011000|u
2612 save_hints|5.010001|5.010001|u
2613 save_hptr|5.003007|5.003007|
2614 save_I16|5.004000|5.004000|u
2615 save_I32|5.003007|5.003007|u
2616 save_I8|5.006000|5.006000|u
2617 save_int|5.003007|5.003007|u
2618 save_item|5.003007|5.003007|
2619 save_iv|5.005000|5.005000|u
2620 save_lines|5.005000||Viu
2621 save_list|5.003007|5.003007|d
2622 save_long|5.003007|5.003007|du
2623 save_magic_flags|5.019002||Viu
2624 save_mortalizesv|5.007001|5.007001|u
2625 save_nogv|5.003007|5.003007|du
2626 save_op|5.010001|5.010001|u
2627 save_padsv_and_mortalize|5.010001|5.010001|u
2628 SAVEPADSV|||i
2629 save_pptr|5.003007|5.003007|u
2630 save_pushi32ptr|5.010001|5.010001|u
2631 save_pushptr|5.010001|5.010001|u
2632 save_pushptri32ptr|5.010001||Viu
2633 save_pushptrptr|5.010001|5.010001|u
2634 savepv|5.003007|5.003007|
2635 savepvn|5.003007|5.003007|
2636 savepvs|5.009003|5.009003|
2637 save_re_context|5.006000|5.006000|u
2638 save_scalar|5.003007|5.003007|
2639 save_scalar_at|5.005000||Viu
2640 save_set_svflags|5.009000|5.009000|u
2641 savesharedpv|5.007003|5.007003|
2642 savesharedpvn|5.009005|5.009005|
2643 save_shared_pvref|5.007003|5.007003|u
2644 savesharedpvs|5.013006|5.013006|
2645 savesharedsvpv|5.013006|5.013006|
2646 save_sptr|5.003007|5.003007|u
2647 savestack_grow|5.003007|5.003007|u
2648 savestack_grow_cnt|5.008001|5.008001|u
2649 save_strlen|5.019004||cViu
2650 savesvpv|5.009002|5.009002|
2651 save_svref|5.003007|5.003007|
2652 SAVETMPS|5.003007|5.003007|
2653 savetmps|5.023008|5.023008|xu
2654 save_to_buffer|5.027004||nViu
2655 save_vptr|5.006000|5.006000|u
2656 sawparens|5.003007||Viu
2657 scalar|5.003007||Viu
2658 scalarboolean|5.005000||Viu
2659 scalarkids|5.003007||Viu
2660 scalar_mod_type|5.006000||nViu
2661 scalarseq|5.003007||Viu
2662 scalarvoid|5.003007||Viu
2663 scan_bin|5.006000|5.006000|
2664 scan_commit|5.005000||Viu
2665 scan_const|5.003007||Viu
2666 scan_formline|5.003007||Viu
2667 scan_heredoc|5.003007||Viu
2668 scan_hex|5.006000|5.003007|
2669 scan_ident|5.003007||Viu
2670 scan_inputsymbol|5.003007||Viu
2671 scan_num|5.007001|5.007001|u
2672 scan_oct|5.006000|5.003007|
2673 scan_pat|5.003007||Viu
2674 scan_str|5.003007||xcViu
2675 scan_subst|5.003007||Viu
2676 scan_trans|5.003007||Viu
2677 scan_version|5.009001|5.009001|
2678 scan_vstring|5.009005|5.009005|u
2679 scan_word|5.003007||xcViu
2680 search_const|5.010001||Viu
2681 seed|5.008001|5.008001|u
2682 sequence_num|5.009003||Viu
2683 set_ANYOF_arg|5.019005||Viu
2684 set_caret_X|5.019006||Viu
2685 set_context|5.006000|5.006000|nu
2686 setdefout|5.003007|5.003007|
2687 SETERRNO|||i
2688 setfd_cloexec|5.027008||nViu
2689 setfd_cloexec_for_nonsysfd|5.027008||Viu
2690 setfd_cloexec_or_inhexec_by_sysfdness|5.027008||Viu
2691 setfd_inhexec|5.027008||nViu
2692 setfd_inhexec_for_sysfd|5.027008||Viu
2693 setlocale_debug_string|5.027002||nViu
2694 set_numeric_radix|5.006000||Viu
2695 set_numeric_standard|5.006000||cViu
2696 set_numeric_underlying|5.027006||cViu
2697 set_padlist|5.021006||ncViu
2698 set_regex_pv|5.029004||Viu
2699 _setup_canned_invlist|5.019008||cViu
2700 share_hek|5.004000|5.004000|u
2701 share_hek_flags|5.008000||Viu
2702 SHORTSIZE|5.004000|5.004000|
2703 should_warn_nl|5.021001||nViu
2704 si_dup|5.007003|5.007003|u
2705 sighandler1|5.031007||nViu
2706 sighandler3|5.031007||nViu
2707 sighandler|5.003007||nViu
2708 simplify_sort|5.006000||Viu
2709 SITELIB|5.003007|5.003007|
2710 skipspace_flags|5.019002||xcViu
2711 skip_to_be_ignored_text|5.023004||Viu
2712 Slab_Alloc|5.006000||cViu
2713 Slab_Free|5.007003||cViu
2714 Slab_to_ro|5.017002||Viu
2715 Slab_to_rw|5.009005||Viu
2716 softref2xv|||iu
2717 sortcv|5.009003||Viu
2718 sortcv_stacked|5.009003||Viu
2719 sortcv_xsub|5.009003||Viu
2720 sortsv|5.007003|5.007003|
2721 sortsv_flags|5.009003|5.009003|
2722 SP|5.003007|5.003007|
2723 space_join_names_mortal|5.009004||Viu
2724 SPAGAIN|5.003007|5.003007|
2725 ssc_add_range|5.019005||Viu
2726 ssc_and|5.019005||Viu
2727 ssc_anything|5.019005||Viu
2728 ssc_clear_locale|5.019005||nViu
2729 ssc_cp_and|5.019005||Viu
2730 ssc_finalize|5.019005||Viu
2731 ssc_init|5.019005||Viu
2732 ssc_intersection|5.019005||Viu
2733 ssc_is_anything|5.019005||nViu
2734 ssc_is_cp_posixl_init|5.019005||nViu
2735 ssc_or|5.019005||Viu
2736 ssc_union|5.019005||Viu
2737 ss_dup|5.007003|5.007003|u
2738 ST|5.003007|5.003007|
2739 stack_grow|5.003007|5.003007|u
2740 START_EXTERN_C|5.005000|5.003007|poVu
2741 start_glob|||xi
2742 START_MY_CXT|5.010000|5.010000|p
2743 STARTPERL|5.003007|5.003007|
2744 start_subparse|5.004000|5.003007|pu
2745 STDCHAR|5.003007|5.003007|
2746 stdize_locale|5.007001||Viu
2747 STMT_END|5.003007|5.003007|pV
2748 STMT_START|5.003007|5.003007|pV
2749 STORE_LC_NUMERIC_FORCE_TO_UNDERLYING|5.021010|5.021010|
2750 STORE_LC_NUMERIC_SET_TO_NEEDED|5.021010|5.021010|
2751 STORE_LC_NUMERIC_SET_TO_NEEDED_IN|5.031003|5.031003|
2752 strEQ|5.003007|5.003007|
2753 strGE|5.003007|5.003007|
2754 strGT|5.003007|5.003007|
2755 strip_return|5.009003||Viu
2756 strLE|5.003007|5.003007|
2757 strLT|5.003007|5.003007|
2758 strNE|5.003007|5.003007|
2759 strnEQ|5.003007|5.003007|
2760 strnNE|5.003007|5.003007|
2761 Strtod|5.029010|5.029010|n
2762 Strtol|5.006000|5.006000|n
2763 Strtoul|5.006000|5.006000|n
2764 str_to_version|5.006000|5.006000|u
2765 StructCopy|5.003007|5.003007|V
2766 STR_WITH_LEN|5.009003|5.003007|pV
2767 study_chunk|5.005000||Viu
2768 sub_crush_depth|5.004000||Viu
2769 sublex_done|5.005000||Viu
2770 sublex_push|5.005000||Viu
2771 sublex_start|5.005000||Viu
2772 sv_2bool|5.003007|5.003007|
2773 sv_2bool_flags|5.013006|5.013006|
2774 sv_2cv|5.003007|5.003007|
2775 sv_2io|5.003007|5.003007|
2776 sv_2iuv_common|5.009004||Viu
2777 sv_2iuv_non_preserve|5.007001||Viu
2778 sv_2iv|5.003007|5.003007|u
2779 sv_2iv_flags|5.009001|5.009001|
2780 sv_2mortal|5.003007|5.003007|
2781 sv_2num|5.010000||xVi
2782 sv_2nv_flags|5.013001|5.013001|
2783 sv_2pv|5.003007|5.003007|u
2784 sv_2pvbyte|5.006000|5.003007|p
2785 sv_2pvbyte_flags|5.031004|5.031004|u
2786 sv_2pvbyte_nolen|5.006000|5.003007|p
2787 sv_2pv_flags|5.007002|5.003007|p
2788 sv_2pv_nolen|5.006000|5.003007|p
2789 sv_2pvutf8|5.006000|5.006000|
2790 sv_2pvutf8_flags|5.031004|5.031004|u
2791 sv_2pvutf8_nolen|5.006000|5.006000|
2792 sv_2uv|5.004000|5.003007|pu
2793 sv_2uv_flags|5.009001|5.009001|
2794 sv_add_arena|5.003007||Vi
2795 sv_add_backref|||iu
2796 SvAMAGIC_off|5.031004|5.031004|nu
2797 SvAMAGIC_on|5.031004|5.031004|nu
2798 sv_backoff|5.003007|5.003007|n
2799 sv_bless|5.003007|5.003007|
2800 sv_buf_to_ro|5.019008||Viu
2801 sv_buf_to_rw|5.019008||Viu
2802 SV_CATBYTES|5.021005|5.021005|
2803 sv_cat_decode|5.008001|5.008001|
2804 sv_catpv|5.003007|5.003007|
2805 sv_catpvf|5.006000|5.004000|v
2806 sv_catpv_flags|5.013006|5.013006|
2807 sv_catpvf_mg|5.006000|5.004000|pv
2808 sv_catpvf_mg_nocontext|5.006000||pvnVu
2809 sv_catpvf_nocontext|5.006000||vnVu
2810 sv_catpv_mg|5.004005|5.003007|p
2811 sv_catpvn|5.003007|5.003007|
2812 sv_catpvn_flags|5.007002|5.007002|
2813 sv_catpvn_mg|5.004005|5.003007|p
2814 sv_catpvn_nomg|5.007002|5.003007|p
2815 sv_catpv_nomg|5.013006|5.013006|
2816 sv_catpvs|5.009003|5.003007|p
2817 sv_catpvs_flags|5.013006|5.013006|
2818 sv_catpvs_mg|5.013006|5.013006|
2819 sv_catpvs_nomg|5.013006|5.013006|
2820 sv_catsv|5.003007|5.003007|
2821 sv_catsv_flags|5.007002|5.007002|
2822 sv_catsv_mg|5.004005|5.003007|p
2823 sv_catsv_nomg|5.007002|5.003007|p
2824 SV_CATUTF8|5.021005|5.021005|
2825 sv_chop|5.003007|5.003007|
2826 sv_clean_all|5.003007||Vi
2827 sv_clean_objs|5.003007||Vi
2828 sv_clear|5.003007|5.003007|
2829 sv_cmp|5.003007|5.003007|
2830 sv_cmp_flags|5.013006|5.013006|
2831 sv_cmp_locale|5.004000|5.004000|
2832 sv_cmp_locale_flags|5.013006|5.013006|
2833 sv_collxfrm|||
2834 sv_collxfrm_flags|5.013006|5.013006|
2835 SV_CONST_RETURN|5.009003|5.003007|poVu
2836 sv_copypv|5.007003|5.007003|
2837 sv_copypv_flags|5.017002|5.017002|
2838 sv_copypv_nomg|5.017002|5.017002|
2839 SV_COW_DROP_PV|5.008001|5.003007|p
2840 SV_COW_SHARED_HASH_KEYS|5.009005|5.003007|poVu
2841 SvCUR|5.003007|5.003007|
2842 SvCUR_set|5.003007|5.003007|
2843 sv_dec|5.003007|5.003007|
2844 sv_dec_nomg|5.013002|5.013002|
2845 sv_del_backref|5.006000||cViu
2846 sv_derived_from|5.004000|5.004000|
2847 sv_derived_from_pv|5.015004|5.015004|
2848 sv_derived_from_pvn|5.015004|5.015004|
2849 sv_derived_from_sv|5.015004|5.015004|
2850 sv_derived_from_svpvn|5.031006||Viu
2851 sv_destroyable|5.010000|5.010000|
2852 sv_display|5.021002||Viu
2853 sv_does|5.009004|5.009004|
2854 sv_does_pv|5.015004|5.015004|
2855 sv_does_pvn|5.015004|5.015004|
2856 sv_does_sv|5.015004|5.015004|
2857 sv_dump|5.003007|5.003007|
2858 sv_dup|5.007003|5.007003|u
2859 sv_dup_common|5.013002||Viu
2860 sv_dup_inc|5.013002|5.013002|u
2861 sv_dup_inc_multiple|5.011000||Viu
2862 SvEND|5.003007|5.003007|
2863 sv_eq|5.003007|5.003007|
2864 sv_eq_flags|5.013006|5.013006|
2865 sv_exp_grow|5.009003||Viu
2866 SVf|5.006000|5.003007|p
2867 SVfARG|5.009005|5.003007|p
2868 sv_force_normal|5.006000|5.006000|
2869 sv_force_normal_flags|5.007001|5.007001|
2870 sv_free2|||xciu
2871 sv_free|5.003007|5.003007|
2872 sv_free_arenas|5.003007||Vi
2873 SVf_UTF8|5.006000|5.003007|p
2874 SvGAMAGIC|5.006001|5.006001|
2875 sv_get_backrefs|5.021008|5.021008|nx
2876 SvGETMAGIC|5.004005|5.003007|p
2877 sv_gets|5.003007|5.003007|
2878 SV_GMAGIC|5.007002|5.003007|p
2879 sv_grow|5.003007|5.003007|
2880 SvGROW|5.003007|5.003007|
2881 SV_HAS_TRAILING_NUL|5.009004|5.003007|p
2882 SV_IMMEDIATE_UNREF|5.007001|5.003007|p
2883 sv_inc|5.003007|5.003007|
2884 sv_i_ncmp|5.009003||Viu
2885 sv_inc_nomg|5.013002|5.013002|
2886 sv_insert|5.003007|5.003007|
2887 sv_insert_flags|5.010001|5.010001|
2888 SvIOK|5.003007|5.003007|
2889 SvIOK_notUV|5.006000|5.006000|
2890 SvIOK_off|5.003007|5.003007|
2891 SvIOK_on|5.003007|5.003007|
2892 SvIOK_only|5.003007|5.003007|
2893 SvIOK_only_UV|5.006000|5.006000|
2894 SvIOKp|5.003007|5.003007|
2895 SvIOK_UV|5.006000|5.006000|
2896 sv_isa|5.003007|5.003007|
2897 sv_isa_sv|5.031007|5.031007|x
2898 SvIsCOW|5.008003|5.008003|
2899 SvIsCOW_shared_hash|5.008003|5.008003|
2900 sv_isobject|5.003007|5.003007|
2901 SvIV|5.003007|5.003007|
2902 sv_iv|5.005000|5.005000|d
2903 SvIV_nomg|5.009001|5.003007|p
2904 SvIV_set|5.003007|5.003007|
2905 SvIVX|5.003007|5.003007|
2906 SvIVx|5.003007|5.003007|
2907 sv_kill_backrefs|||xiu
2908 sv_len|5.003007|5.003007|
2909 SvLEN|5.003007|5.003007|
2910 SvLEN_set|5.003007|5.003007|
2911 sv_len_utf8|5.006000|5.006000|p
2912 sv_len_utf8_nomg|5.017004||pVu
2913 SvLOCK|5.007003|5.007003|
2914 sv_magic|5.003007|5.003007|
2915 sv_magicext|5.007003|5.007003|
2916 sv_magicext_mglob|5.019002||cViu
2917 sv_magic_portable||5.004000|pou
2918 SvMAGIC_set|5.009003|5.003007|p
2919 sv_mortalcopy|5.003007|5.003007|
2920 sv_mortalcopy_flags|5.017005|5.003007|p
2921 SV_MUTABLE_RETURN|5.009003|5.003007|poVu
2922 sv_ncmp|5.009003||Viu
2923 sv_newmortal|5.003007|5.003007|
2924 sv_newref|5.003007|5.003007|
2925 SvNIOK|5.003007|5.003007|
2926 SvNIOK_off|5.003007|5.003007|
2927 SvNIOKp|5.003007|5.003007|
2928 SvNOK|5.003007|5.003007|
2929 SvNOK_off|5.003007|5.003007|
2930 SvNOK_on|5.003007|5.003007|
2931 SvNOK_only|5.003007|5.003007|
2932 SvNOKp|5.003007|5.003007|
2933 sv_nolocking|5.007003|5.007003|d
2934 sv_nosharing|5.007003|5.007003|
2935 SV_NOSTEAL|5.009002|5.003007|p
2936 sv_nounlocking|5.007003|5.007003|d
2937 SvNV|5.006000|5.003007|
2938 sv_nv|5.006000|5.005000|d
2939 SvNV_nomg|5.013002|5.003007|p
2940 SvNV_set|5.006000|5.003007|
2941 SvNVX|5.006000|5.003007|
2942 SvNVx|5.006000|5.003007|
2943 SvOK|5.003007|5.003007|
2944 sv_only_taint_gmagic|5.021010||nViu
2945 SvOOK|5.003007|5.003007|
2946 SvOOK_offset|5.011000|5.011000|
2947 sv_or_pv_pos_u2b|5.019004||Viu
2948 sv_peek|5.005000|5.005000|u
2949 SvPOK|5.003007|5.003007|
2950 SvPOK_off|5.003007|5.003007|
2951 SvPOK_on|5.003007|5.003007|
2952 SvPOK_only|5.003007|5.003007|
2953 SvPOK_only_UTF8|5.006000|5.006000|
2954 SvPOKp|5.003007|5.003007|
2955 sv_pos_b2u|5.006000|5.006000|
2956 sv_pos_b2u_flags|5.019003|5.019003|
2957 sv_pos_b2u_midway|5.009004||Viu
2958 sv_pos_u2b|5.006000|5.006000|
2959 sv_pos_u2b_cached|5.009004||Viu
2960 sv_pos_u2b_flags|5.011005|5.011005|
2961 sv_pos_u2b_forwards|5.009004||nViu
2962 sv_pos_u2b_midway|5.009004||nViu
2963 SvPV|5.003007|5.003007|
2964 sv_pv|5.006000|5.006000|
2965 SvPVbyte|5.006000|5.003007|p
2966 sv_pvbyte|5.006000|5.006000|
2967 SvPVbyte_force|5.009002|5.009002|
2968 sv_pvbyten|5.006000|5.006000|d
2969 sv_pvbyten_force|5.006000|5.006000|
2970 SvPVbyte_nolen|5.006000|5.006000|
2971 SvPVbyte_nomg|5.031004|5.031004|
2972 SvPVbyte_or_null|5.031004|5.031004|
2973 SvPVbyte_or_null_nomg|5.031004|5.031004|
2974 SvPVbytex|5.006000|5.006000|
2975 SvPVbytex_force|5.006000|5.006000|
2976 SvPVCLEAR|5.025006|5.025006|
2977 SvPV_const|5.009003||pVu
2978 SvPV_flags|5.007002||pVu
2979 SvPV_flags_const|5.009003||pVu
2980 SvPV_flags_const_nolen|5.009003||pVu
2981 SvPV_flags_mutable|5.009003||pVu
2982 SvPV_force|5.003007|5.003007|p
2983 SvPV_force_flags|5.007002||pVu
2984 SvPV_force_flags_mutable|5.009003||pVu
2985 SvPV_force_flags_nolen|5.009003||pVu
2986 SvPV_force_mutable|5.009003||pVu
2987 SvPV_force_nolen|5.009003||pVu
2988 SvPV_force_nomg|5.007002|5.003007|p
2989 SvPV_force_nomg_nolen|5.009003||pVu
2990 SvPV_mutable|5.009003||pVu
2991 sv_pvn|5.005000|5.005000|d
2992 sv_pvn_force|5.003007|5.003007|
2993 sv_pvn_force_flags|5.007002|5.003007|p
2994 sv_pvn_nomg|5.007003|5.005000|pdu
2995 SvPV_nolen|5.006000|5.003007|p
2996 SvPV_nolen_const|5.009003||pVu
2997 SvPV_nomg|5.007002|5.003007|p
2998 SvPV_nomg_const|5.009003||pVu
2999 SvPV_nomg_const_nolen|5.009003||pVu
3000 SvPV_nomg_nolen|5.013007|5.003007|p
3001 SvPV_renew|5.009003||pVu
3002 SvPV_set|5.003007|5.003007|
3003 sv_pvutf8|5.006000|5.006000|
3004 SvPVutf8|5.006000|5.006000|
3005 SvPVutf8_force|5.006000|5.006000|
3006 sv_pvutf8n|5.006000|5.006000|d
3007 sv_pvutf8n_force|5.006000|5.006000|
3008 SvPVutf8_nolen|5.006000|5.006000|
3009 SvPVutf8_nomg|5.031004|5.031004|
3010 SvPVutf8_or_null|5.031004|5.031004|
3011 SvPVutf8_or_null_nomg|5.031004|5.031004|
3012 SvPVutf8x|5.006000|5.006000|
3013 SvPVutf8x_force|5.006000|5.006000|
3014 SvPVX|5.003007|5.003007|
3015 SvPVx|5.003007|5.003007|
3016 SvPVX_const|5.009003||pVu
3017 SvPVX_mutable|5.009003||pVu
3018 SvREADONLY|5.003007|5.003007|
3019 SvREADONLY_off|5.003007|5.003007|
3020 SvREADONLY_on|5.003007|5.003007|
3021 sv_recode_to_utf8|5.007003|5.007003|
3022 sv_ref|5.015004|5.015004|
3023 SvREFCNT|5.003007|5.003007|
3024 SvREFCNT_dec|5.003007|5.003007|
3025 SvREFCNT_dec_NN|5.017007|5.017007|
3026 SvREFCNT_inc|5.003007|5.003007|pn
3027 SvREFCNT_inc_NN|5.009004|5.003007|pn
3028 SvREFCNT_inc_simple|5.009004|5.003007|p
3029 SvREFCNT_inc_simple_NN|5.009004|5.003007|p
3030 SvREFCNT_inc_simple_void|5.009004|5.003007|p
3031 SvREFCNT_inc_simple_void_NN|5.009004|5.003007|p
3032 SvREFCNT_inc_void|5.009004|5.003007|pn
3033 SvREFCNT_inc_void_NN|5.009004|5.003007|p
3034 sv_reftype|5.003007|5.003007|
3035 sv_replace|5.003007|5.003007|
3036 sv_report_used|5.003007|5.003007|
3037 sv_reset|5.003007|5.003007|
3038 sv_resetpvn|5.017005||Viu
3039 SvROK|5.003007|5.003007|
3040 SvROK_off|5.003007|5.003007|
3041 SvROK_on|5.003007|5.003007|
3042 SvRV|5.003007|5.003007|
3043 SvRV_set|5.009003|5.003007|p
3044 sv_rvunweaken|5.027004|5.027004|
3045 sv_rvweaken|5.006000|5.006000|
3046 SvRX|5.009005|5.003007|p
3047 SvRXOK|5.009005|5.003007|p
3048 sv_sethek|5.015004||cViu
3049 sv_setiv|5.003007|5.003007|
3050 sv_setiv_mg|5.004005|5.003007|p
3051 SvSETMAGIC|5.003007|5.003007|
3052 SvSetMagicSV|5.004000|5.004000|
3053 SvSetMagicSV_nosteal|5.004000|5.004000|
3054 sv_setnv|5.006000|5.003007|
3055 sv_setnv_mg|5.006000|5.003007|p
3056 sv_setpv|5.003007|5.003007|
3057 sv_setpv_bufsize|5.025006|5.025006|
3058 sv_setpvf|5.006000|5.004000|v
3059 sv_setpvf_mg|5.006000|5.004000|pv
3060 sv_setpvf_mg_nocontext|5.006000||pvnVu
3061 sv_setpvf_nocontext|5.006000||vnVu
3062 sv_setpviv|5.008001|5.008001|d
3063 sv_setpviv_mg|5.008001|5.008001|d
3064 sv_setpv_mg|5.004005|5.003007|p
3065 sv_setpvn|5.003007|5.003007|
3066 sv_setpvn_mg|5.004005|5.003007|p
3067 sv_setpvs|5.009004|5.003007|p
3068 sv_setpvs_mg|5.013006|5.013006|
3069 sv_setref_iv|5.003007|5.003007|
3070 sv_setref_nv|5.006000|5.003007|
3071 sv_setref_pv|5.003007|5.003007|
3072 sv_setref_pvn|5.003007|5.003007|
3073 sv_setref_pvs|5.013006|5.013006|
3074 sv_setref_uv|5.007001|5.007001|
3075 sv_setsv|5.003007|5.003007|
3076 SvSetSV|5.003007|5.003007|
3077 sv_setsv_cow|5.009000||xcViu
3078 sv_setsv_flags|5.007002|5.003007|p
3079 sv_setsv_mg|5.004005|5.003007|p
3080 sv_setsv_nomg|5.007002|5.003007|p
3081 SvSetSV_nosteal|5.004000|5.004000|
3082 sv_set_undef|5.025008|5.025008|
3083 sv_setuv|5.004000|5.003007|p
3084 sv_setuv_mg|5.004005|5.003007|p
3085 SvSHARE|5.007003|5.007003|
3086 SvSHARED_HASH|5.009003||pVu
3087 SV_SMAGIC|5.009003|5.003007|p
3088 SVs_PADSTALE|5.009000|5.009000|
3089 SvSTASH|5.003007|5.003007|
3090 SvSTASH_set|5.009003|5.003007|p
3091 SVs_TEMP|5.003007|5.003007|
3092 sv_string_from_errnum|5.027003|5.027003|
3093 SvTAINT|5.003007|5.003007|
3094 sv_taint|5.004000|5.004000|
3095 sv_tainted|5.004000|5.004000|
3096 SvTAINTED|5.004000|5.004000|
3097 SvTAINTED_off|5.004000|5.004000|
3098 SvTAINTED_on|5.004000|5.004000|
3099 SvTHINKFIRST|||i
3100 SVt_INVLIST|||c
3101 SVt_IV|5.003007|5.003007|
3102 SVt_NULL|5.003007|5.003007|
3103 SVt_NV|5.003007|5.003007|
3104 SVt_PV|5.003007|5.003007|
3105 SVt_PVAV|5.003007|5.003007|
3106 SVt_PVCV|5.003007|5.003007|
3107 SVt_PVFM|5.003007|5.003007|
3108 SVt_PVGV|5.003007|5.003007|
3109 SVt_PVHV|5.003007|5.003007|
3110 SVt_PVIO|5.003007|5.003007|
3111 SVt_PVIV|5.003007|5.003007|
3112 SVt_PVLV|5.003007|5.003007|
3113 SVt_PVMG|5.003007|5.003007|
3114 SVt_PVNV|5.003007|5.003007|
3115 SVt_REGEXP|5.011000|5.011000|
3116 SvTRUE|5.003007|5.003007|
3117 sv_true|5.005000|5.005000|
3118 SvTRUE_nomg|5.013006|5.003007|p
3119 SvTRUEx|5.003007|5.003007|
3120 SvTYPE|5.003007|5.003007|
3121 svtype|5.003007|5.003007|V
3122 sv_unglob|5.005000||Viu
3123 sv_uni_display|5.007003|5.007003|
3124 SvUNLOCK|5.007003|5.007003|
3125 sv_unmagic|5.003007|5.003007|
3126 sv_unmagicext|5.013008|5.003007|p
3127 sv_unref|5.003007|5.003007|
3128 sv_unref_flags|5.007001|5.007001|
3129 sv_untaint|5.004000|5.004000|
3130 SvUOK|5.007001|5.006000|p
3131 sv_upgrade|5.003007|5.003007|
3132 SvUPGRADE|5.003007|5.003007|
3133 sv_usepvn|5.003007|5.003007|
3134 sv_usepvn_flags|5.009004|5.009004|
3135 sv_usepvn_mg|5.004005|5.003007|p
3136 SvUTF8|5.006000|5.003007|p
3137 sv_utf8_decode|5.006000|5.006000|
3138 sv_utf8_downgrade|5.006000|5.006000|
3139 sv_utf8_downgrade_flags|5.031004|5.031004|
3140 sv_utf8_downgrade_nomg|5.031004|5.031004|
3141 sv_utf8_encode|5.006000|5.006000|
3142 SV_UTF8_NO_ENCODING|5.008001|5.003007|poVu
3143 SvUTF8_off|5.006000|5.006000|
3144 SvUTF8_on|5.006000|5.006000|
3145 sv_utf8_upgrade|5.007001|5.007001|
3146 sv_utf8_upgrade_flags|5.007002|5.007002|
3147 sv_utf8_upgrade_flags_grow|5.011000|5.011000|
3148 sv_utf8_upgrade_nomg|5.007002|5.007002|
3149 SvUV|5.004000|5.003007|p
3150 sv_uv|5.005000|5.003007|pd
3151 SvUV_nomg|5.009001|5.003007|p
3152 SvUV_set|5.009003|5.003007|p
3153 SvUVX|5.004000|5.003007|p
3154 SvUVx|5.004000|5.003007|p
3155 SvUVXx|5.004000|5.003007|pd
3156 sv_vcatpvf|5.006000|5.004000|p
3157 sv_vcatpvf_mg|5.006000|5.004000|p
3158 sv_vcatpvfn|5.004000|5.004000|
3159 sv_vcatpvfn_flags|5.017002|5.017002|
3160 SvVOK|5.008001|5.008001|
3161 sv_vsetpvf|5.006000|5.004000|p
3162 sv_vsetpvf_mg|5.006000|5.004000|p
3163 sv_vsetpvfn|5.004000|5.004000|
3164 SvVSTRING_mg|5.009004||pVu
3165 swallow_bom|5.006001||Viu
3166 switch_category_locale_to_template|5.027009||Viu
3167 switch_to_global_locale|5.027009|5.003007|pn
3168 sync_locale|5.027009|5.003007|pn
3169 sys_init3|5.010000|5.010000|nu
3170 sys_init|5.010000|5.010000|nu
3171 sys_intern_clear|5.006001||Vu
3172 sys_intern_dup|5.006000||Vu
3173 sys_intern_init|5.006001||Vu
3174 sys_term|5.010000|5.010000|nu
3175 taint_env|5.003007|5.003007|u
3176 taint_proper|5.003007|5.003007|u
3177 THIS|5.003007|5.003007|V
3178 thread_locale_init|5.027009|5.027009|nxu
3179 thread_locale_term|5.027009|5.027009|nxu
3180 tied_method|5.013009||vViu
3181 tmps_grow_p|5.021005||cViu
3182 to_byte_substr|5.008000||Viu
3183 toFOLD|5.019001|5.019001|
3184 _to_fold_latin1|5.015005||ncViu
3185 toFOLD_utf8|5.031005|5.031005|
3186 toFOLD_utf8_safe|5.025009|5.006000|p
3187 toFOLD_uvchr|5.023009|5.006000|p
3188 tokenize_use|5.009003||Viu
3189 tokeq|5.005000||Viu
3190 tokereport|5.007001||Viu
3191 toLOWER|5.003007|5.003007|
3192 toLOWER_L1|5.019001|5.019001|
3193 to_lower_latin1|5.015005||nViu
3194 toLOWER_LC|5.004000|5.004000|
3195 toLOWER_utf8|5.031005|5.031005|
3196 toLOWER_utf8_safe|5.025009|5.006000|p
3197 toLOWER_uvchr|5.023009|5.006000|p
3198 too_few_arguments_pv|5.016000||Viu
3199 too_many_arguments_pv|5.016000||Viu
3200 TOPMARK|||ciu
3201 toTITLE|5.019001|5.019001|
3202 toTITLE_utf8|5.031005|5.031005|
3203 toTITLE_utf8_safe|5.025009|5.006000|p
3204 toTITLE_uvchr|5.023009|5.006000|p
3205 to_uni_fold|5.031004||cVu
3206 _to_uni_fold_flags|5.014000||cVu
3207 to_uni_lower|5.006000||cVu
3208 to_uni_title|5.006000||cVu
3209 to_uni_upper|5.006000||cVu
3210 toUPPER|5.003007|5.003007|
3211 _to_upper_title_latin1|5.015005||Viu
3212 toUPPER_utf8|5.031005|5.031005|
3213 toUPPER_utf8_safe|5.025009|5.006000|p
3214 toUPPER_uvchr|5.023009|5.006000|p
3215 _to_utf8_case|5.023006||Viu
3216 _to_utf8_fold_flags|5.014000||cVu
3217 _to_utf8_lower_flags|5.015006||cVu
3218 to_utf8_substr|5.008000||Viu
3219 _to_utf8_title_flags|5.015006||cVu
3220 _to_utf8_upper_flags|5.015006||cVu
3221 translate_substr_offsets|5.015006||nViu
3222 traverse_op_tree|5.029008||Vi
3223 try_amagic_bin|||ciu
3224 try_amagic_un|||ciu
3225 turkic_fc|5.029008||Viu
3226 turkic_lc|5.029008||Viu
3227 turkic_uc|5.029008||Viu
3228 U16SIZE|5.006000|5.006000|
3229 U16TYPE|5.006000|5.006000|
3230 U32SIZE|5.006000|5.006000|
3231 U32TYPE|5.006000|5.006000|
3232 U8SIZE|5.006000|5.006000|
3233 U8TYPE|5.006000|5.006000|
3234 uiv_2buf|5.009003||nViu
3235 UNDERBAR|5.009002|5.003007|p
3236 unexpected_non_continuation_text|5.025006||Viu
3237 UNICODE_REPLACEMENT|5.007001|5.003007|p
3238 UNI_TO_NATIVE|5.007001|5.003007|p
3239 UNLIKELY|5.009004|5.003007|p
3240 unlnk|5.003007||Vu
3241 unpack_rec|5.008001||Viu
3242 unpack_str|5.007003|5.007003|d
3243 unpackstring|5.008001|5.008001|
3244 unreferenced_to_tmp_stack|5.013002||Viu
3245 unshare_hek|5.004000||Viu
3246 unshare_hek_or_pvn|5.008000||Viu
3247 unsharepvn|5.003007|5.003007|u
3248 unwind_handler_stack|5.009003||Viu
3249 update_debugger_info|5.009005||Viu
3250 upg_version|5.009005|5.009005|
3251 usage|5.005000||Viu
3252 utf16_textfilter|5.011001||Viu
3253 utf16_to_utf8|5.006000||cViu
3254 utf16_to_utf8_reversed|5.006000||cViu
3255 UTF8_CHECK_ONLY|5.007001|5.007001|
3256 UTF8_CHK_SKIP|5.031006|5.006000|p
3257 UTF8_DISALLOW_ILLEGAL_C9_INTERCHANGE|5.025005|5.025005|
3258 UTF8_DISALLOW_ILLEGAL_INTERCHANGE|5.013009|5.013009|
3259 UTF8_DISALLOW_NONCHAR|5.013009|5.013009|
3260 UTF8_DISALLOW_PERL_EXTENDED|5.027002|5.027002|
3261 UTF8_DISALLOW_SUPER|5.013009|5.013009|
3262 UTF8_DISALLOW_SURROGATE|5.013009|5.013009|
3263 utf8_distance|5.006000|5.006000|
3264 UTF8f|5.019001|5.003007|p
3265 UTF8fARG|5.019002|5.003007|p
3266 utf8_hop|5.006000|5.006000|n
3267 utf8_hop_back|5.025007|5.025007|n
3268 utf8_hop_forward|5.025007|5.025007|n
3269 utf8_hop_safe|5.025007|5.025007|n
3270 UTF8_IS_INVARIANT|5.007001|5.003007|p
3271 UTF8_IS_NONCHAR|5.023002|5.023002|
3272 UTF8_IS_SUPER|5.023002|5.023002|
3273 UTF8_IS_SURROGATE|5.023002|5.023002|
3274 utf8_length|5.007001|5.007001|
3275 UTF8_MAXBYTES|5.009002|5.006000|p
3276 UTF8_MAXBYTES_CASE|5.009002|5.003007|p
3277 utf8_mg_len_cache_update|5.013003||Viu
3278 utf8_mg_pos_cache_update|5.009004||Viu
3279 utf8n_to_uvchr|5.007001|5.007001|n
3280 utf8n_to_uvchr_error|5.025006|5.025006|n
3281 utf8n_to_uvchr_msgs|5.027009|5.027009|nx
3282 _utf8n_to_uvchr_msgs_helper|5.029001||ncVu
3283 utf8n_to_uvuni|5.007001||dcV
3284 UTF8_SAFE_SKIP|5.029009|5.006000|p
3285 UTF8SKIP|5.006000|5.006000|
3286 UTF8_SKIP|5.023002|5.006000|p
3287 utf8_to_bytes|5.006001|5.006001|x
3288 utf8_to_uvchr|5.007001|5.006001|pd
3289 utf8_to_uvchr_buf|5.015009|5.006001|p
3290 utf8_to_uvchr_buf_helper|5.031004||cVu
3291 utf8_to_uvuni|5.007001||dcV
3292 utf8_to_uvuni_buf|5.015009||dcV
3293 UTF8_WARN_ILLEGAL_C9_INTERCHANGE|5.025005|5.025005|
3294 UTF8_WARN_ILLEGAL_INTERCHANGE|5.013009|5.013009|
3295 UTF8_WARN_NONCHAR|5.013009|5.013009|
3296 UTF8_WARN_PERL_EXTENDED|5.027002|5.027002|
3297 UTF8_WARN_SUPER|5.013009|5.013009|
3298 UTF8_WARN_SURROGATE|5.013009|5.013009|
3299 utilize|5.003007||Viu
3300 UVCHR_IS_INVARIANT|5.019004|5.003007|p
3301 UVCHR_SKIP|5.022000|5.003007|p
3302 uvchr_to_utf8|5.007001|5.007001|
3303 uvchr_to_utf8_flags|5.007003|5.007003|
3304 uvchr_to_utf8_flags_msgs|5.027009|5.027009|x
3305 UVof|5.006000|5.003007|p
3306 uvoffuni_to_utf8_flags|||c
3307 uvoffuni_to_utf8_flags_msgs|5.027009||cVu
3308 UVSIZE|5.006000|5.003007|p
3309 UVTYPE|5.006000|5.003007|p
3310 UVuf|5.006000|5.003007|p
3311 uvuni_to_utf8|5.019004||cVu
3312 uvuni_to_utf8_flags|5.007003||dcV
3313 UVxf|5.006000|5.003007|p
3314 UVXf|5.007001|5.007001|p
3315 validate_proto|5.019002||xcVi
3316 validate_suid|||iu
3317 valid_utf8_to_uvchr|5.015009||ncV
3318 valid_utf8_to_uvuni|5.015009||dcVu
3319 variant_byte_number|5.031004||ncVu
3320 variant_under_utf8_count|5.027007||nVi
3321 varname|5.009003||Viu
3322 vcmp|5.009000|5.009000|
3323 vcroak|5.006000|5.006000|
3324 vdeb|5.007003|5.007003|u
3325 vform|5.006000|5.006000|u
3326 visit|5.005000||Viu
3327 vivify_defelem|5.004000||cViu
3328 vivify_ref|5.004000||Viu
3329 vload_module|5.006000|5.003007|pu
3330 vmess|5.006000|5.004000|p
3331 vnewSVpvf|5.006000|5.004000|pu
3332 vnormal|5.009002|5.009002|
3333 vnumify|5.009000|5.009000|
3334 vstringify|5.009000|5.009000|
3335 vverify|5.009003|5.009003|
3336 vwarn|5.006000|5.006000|
3337 vwarner|5.006000|5.006000|u
3338 wait4pid|5.003007||Viu
3339 warn|5.006000|5.003007|v
3340 WARN_ALL|5.006000|5.003007|p
3341 WARN_AMBIGUOUS|5.006000|5.003007|p
3342 WARN_ASSERTIONS||5.003007|pou
3343 WARN_BAREWORD|5.006000|5.003007|p
3344 WARN_CLOSED|5.006000|5.003007|p
3345 WARN_CLOSURE|5.006000|5.003007|p
3346 WARN_DEBUGGING|5.006000|5.003007|p
3347 WARN_DEPRECATED|5.006000|5.003007|p
3348 WARN_DIGIT|5.006000|5.003007|p
3349 warner|5.006000|5.004000|pvu
3350 warner_nocontext|5.006000||vnVu
3351 WARN_EXEC|5.006000|5.003007|p
3352 WARN_EXITING|5.006000|5.003007|p
3353 WARN_EXPERIMENTAL|5.017004|5.017004|
3354 WARN_EXPERIMENTAL__ALPHA_ASSERTIONS|5.027009|5.027009|
3355 WARN_EXPERIMENTAL__BITWISE|5.021009|5.021009|
3356 WARN_EXPERIMENTAL__CONST_ATTR|5.021008|5.021008|
3357 WARN_EXPERIMENTAL__DECLARED_REFS|5.025003|5.025003|
3358 WARN_EXPERIMENTAL__ISA|5.031007|5.031007|
3359 WARN_EXPERIMENTAL__LEXICAL_SUBS|5.017005|5.017005|
3360 WARN_EXPERIMENTAL__POSTDEREF|5.019005|5.019005|
3361 WARN_EXPERIMENTAL__PRIVATE_USE|5.029009|5.029009|
3362 WARN_EXPERIMENTAL__REFALIASING|5.021005|5.021005|
3363 WARN_EXPERIMENTAL__REGEX_SETS|5.017008|5.017008|
3364 WARN_EXPERIMENTAL__RE_STRICT|5.021008|5.021008|
3365 WARN_EXPERIMENTAL__SCRIPT_RUN|5.027008|5.027008|
3366 WARN_EXPERIMENTAL__SIGNATURES|5.019009|5.019009|
3367 WARN_EXPERIMENTAL__SMARTMATCH|5.017011|5.017011|
3368 WARN_EXPERIMENTAL__UNIPROP_WILDCARDS|5.029009|5.029009|
3369 WARN_EXPERIMENTAL__VLB|5.029009|5.029009|
3370 WARN_EXPERIMENTAL__WIN32_PERLIO|5.021001|5.021001|
3371 WARN_GLOB|5.006000|5.003007|p
3372 WARN_ILLEGALPROTO|5.011004|5.011004|
3373 WARN_IMPRECISION|5.011000|5.011000|
3374 WARN_INPLACE|5.006000|5.003007|p
3375 WARN_INTERNAL|5.006000|5.003007|p
3376 WARN_IO|5.006000|5.003007|p
3377 WARN_LAYER|5.008000|5.003007|p
3378 WARN_LOCALE|5.021006|5.021006|
3379 WARN_MALLOC|5.006000|5.003007|p
3380 WARN_MISC|5.006000|5.003007|p
3381 WARN_MISSING|5.021002|5.021002|
3382 WARN_NEWLINE|5.006000|5.003007|p
3383 warn_nocontext|5.006000||pvnVu
3384 WARN_NONCHAR|5.013010|5.013010|
3385 WARN_NON_UNICODE|5.013010|5.013010|
3386 WARN_NUMERIC|5.006000|5.003007|p
3387 WARN_ONCE|5.006000|5.003007|p
3388 warn_on_first_deprecated_use|5.025009||Viu
3389 WARN_OVERFLOW|5.006000|5.003007|p
3390 WARN_PACK|5.006000|5.003007|p
3391 WARN_PARENTHESIS|5.006000|5.003007|p
3392 WARN_PIPE|5.006000|5.003007|p
3393 WARN_PORTABLE|5.006000|5.003007|p
3394 WARN_PRECEDENCE|5.006000|5.003007|p
3395 WARN_PRINTF|5.006000|5.003007|p
3396 _warn_problematic_locale|5.021008||ncViu
3397 WARN_PROTOTYPE|5.006000|5.003007|p
3398 WARN_QW|5.006000|5.003007|p
3399 WARN_RECURSION|5.006000|5.003007|p
3400 WARN_REDEFINE|5.006000|5.003007|p
3401 WARN_REDUNDANT|5.021002|5.021002|
3402 WARN_REGEXP|5.006000|5.003007|p
3403 WARN_RESERVED|5.006000|5.003007|p
3404 WARN_SEMICOLON|5.006000|5.003007|p
3405 WARN_SEVERE|5.006000|5.003007|p
3406 WARN_SHADOW|5.027007|5.027007|
3407 WARN_SIGNAL|5.006000|5.003007|p
3408 WARN_SUBSTR|5.006000|5.003007|p
3409 WARN_SURROGATE|5.013010|5.013010|
3410 warn_sv|5.013001|5.003007|p
3411 WARN_SYNTAX|5.006000|5.003007|p
3412 WARN_SYSCALLS|5.019004|5.019004|
3413 WARN_TAINT|5.006000|5.003007|p
3414 WARN_THREADS|5.008000|5.003007|p
3415 WARN_UNINITIALIZED|5.006000|5.003007|p
3416 WARN_UNOPENED|5.006000|5.003007|p
3417 WARN_UNPACK|5.006000|5.003007|p
3418 WARN_UNTIE|5.006000|5.003007|p
3419 WARN_UTF8|5.006000|5.003007|p
3420 WARN_VOID|5.006000|5.003007|p
3421 was_lvalue_sub|||ciu
3422 watch|5.003007||Viu
3423 whichsig|5.003007|5.003007|u
3424 whichsig_pv|5.015004|5.015004|u
3425 whichsig_pvn|5.015004|5.015004|u
3426 whichsig_sv|5.015004|5.015004|u
3427 WIDEST_UTYPE|5.015004|5.003007|p
3428 win32_croak_not_implemented|5.017006||nViu
3429 win32_setlocale|5.027006||Viu
3430 WITH_LC_NUMERIC_SET_TO_NEEDED|5.031003|5.031003|
3431 WITH_LC_NUMERIC_SET_TO_NEEDED_IN|5.031003|5.031003|
3432 with_queued_errors|5.013001||Viu
3433 wrap_keyword_plugin|5.027006|5.027006|x
3434 wrap_op_checker|5.015008|5.015008|
3435 write_to_stderr|5.008001||Viu
3436 XCPT_CATCH|5.009002|5.003007|p
3437 XCPT_RETHROW|5.009002|5.003007|p
3438 XCPT_TRY_END|5.009002|5.003007|p
3439 XCPT_TRY_START|5.009002|5.003007|p
3440 XopDISABLE|5.013007|5.013007|V
3441 XopENABLE|5.013007|5.013007|V
3442 XopENTRY|5.013007|5.013007|V
3443 XopENTRYCUSTOM|5.019006|5.013007|V
3444 XopENTRY_set|5.013007|5.013007|V
3445 XopFLAGS|5.013007|5.013007|
3446 XPUSHi|5.003007|5.003007|
3447 XPUSHmortal|5.009002|5.003007|p
3448 XPUSHn|5.006000|5.003007|
3449 XPUSHp|5.003007|5.003007|
3450 XPUSHs|5.003007|5.003007|
3451 XPUSHu|5.004000|5.003007|p
3452 XS|5.003007|5.003007|V
3453 XS_APIVERSION_BOOTCHECK|5.013004|5.013004|
3454 xs_boot_epilog|5.021006||cViu
3455 XS_EXTERNAL|5.015002|5.015002|V
3456 xs_handshake|||vnciu
3457 XS_INTERNAL|5.015002|5.015002|V
3458 XSprePUSH|5.006000|5.003007|poVu
3459 XSPROTO|5.010000||pVu
3460 XSRETURN|5.003007|5.003007|p
3461 XSRETURN_EMPTY|5.003007|5.003007|
3462 XSRETURN_IV|5.003007|5.003007|
3463 XSRETURN_NO|5.003007|5.003007|
3464 XSRETURN_NV|5.006000|5.003007|
3465 XSRETURN_PV|5.003007|5.003007|
3466 XSRETURN_UNDEF|5.003007|5.003007|
3467 XSRETURN_UV|5.008001|5.003007|p
3468 XSRETURN_YES|5.003007|5.003007|
3469 XST_mIV|5.003007|5.003007|
3470 XST_mNO|5.003007|5.003007|
3471 XST_mNV|5.006000|5.003007|
3472 XST_mPV|5.003007|5.003007|
3473 XST_mUNDEF|5.003007|5.003007|
3474 XST_mUV|5.008001|5.003007|p
3475 XST_mYES|5.003007|5.003007|
3476 XS_VERSION|5.003007|5.003007|
3477 XS_VERSION_BOOTCHECK|5.003007|5.003007|
3478 xs_version_bootcheck|||iu
3479 yyerror|5.003007||Viu
3480 yyerror_pv|5.016000||Viu
3481 yyerror_pvn|5.016000||Viu
3482 yylex|5.003007||cViu
3483 yyparse|5.003007||Viu
3484 yyquit|5.025010||Viu
3485 yyunlex|5.013005||Viu
3486 yywarn|5.003007||Viu
3487 Zero|5.003007|5.003007|
3488 ZeroD|5.009002|5.003007|p
3489 );
3490
3491 if (exists $opt{'list-unsupported'}) {
3492   my $f;
3493   for $f (sort dictionary_order keys %API) {
3494     next if $API{$f}{core_only};
3495     next if $API{$f}{beyond_depr};
3496     next if $API{$f}{inaccessible};
3497     next if $API{$f}{experimental};
3498     next unless $API{$f}{todo};
3499     next if int_parse_version($API{$f}{todo}) <= $int_min_perl;
3500     print "$f ", '.'x(40-length($f)), " ", format_version($API{$f}{todo}), "\n";
3501   }
3502   exit 0;
3503 }
3504
3505 # Scan for hints, possible replacement candidates, etc.
3506
3507 my(%replace, %need, %hints, %warnings, %depends);
3508 my $replace = 0;
3509 my($hint, $define, $function);
3510
3511 sub find_api
3512 {
3513   BEGIN { 'warnings'->unimport('uninitialized') if "$]" > '5.006' }
3514   my $code = shift;
3515   $code =~ s{
3516     / (?: \*[^*]*\*+(?:[^$ccs][^*]*\*+)* / | /[^\r\n]*)
3517   | "[^"\\]*(?:\\.[^"\\]*)*"
3518   | '[^'\\]*(?:\\.[^'\\]*)*' }{}egsx;
3519   grep { exists $API{$_} } $code =~ /(\w+)/mg;
3520 }
3521
3522 while (<DATA>) {
3523   if ($hint) {
3524
3525     # Here, we are in the middle of accumulating a hint or warning.
3526     my $end_of_hint = 0;
3527
3528     # A line containing a comment end marker closes the hint.  Remove that
3529     # marker for processing below.
3530     if (s/\s*$rcce(.*?)\s*$//) {
3531         die "Nothing can follow the end of comment in '$_'\n" if length $1 > 0;
3532         $end_of_hint = 1;
3533     }
3534
3535     # Set $h to the hash of which type.
3536     my $h = $hint->[0] eq 'Hint' ? \%hints : \%warnings;
3537
3538     # Ignore any leading and trailing white space, and an optional star comment
3539     # continuation marker, then place the meat of the line into $1
3540     m/^\s*(?:\*\s*)?(.*?)\s*$/;
3541
3542     # Add the meat of this line to the hash value of each API element it
3543     # applies to
3544     for (@{$hint->[1]}) {
3545       $h->{$_} ||= '';  # avoid the warning older perls generate
3546       $h->{$_} .= "$1\n";
3547     }
3548
3549     # If the line had a comment close, we are through with this hint
3550     undef $hint if $end_of_hint;
3551
3552     next;
3553   }
3554
3555   # Set up $hint if this is the beginning of a Hint: or Warning:
3556   # These are from a multi-line C comment in the file, with the first line
3557   # looking like (a space has been inserted because this file can't have C
3558   # comment markers in it):
3559   #   / * Warning: PL_expect, PL_copline, PL_rsfp
3560   #
3561   # $hint becomes
3562   #     [
3563   #      'Warning',
3564   #                [
3565   #                  'PL_expect',
3566   #                  'PL_copline',
3567   #                  'PL_rsfp',
3568   #                ],
3569   #     ]
3570   if (m{^\s*$rccs\s+(Hint|Warning):\s+(\w+(?:,?\s+\w+)*)\s*$}) {
3571       $hint = [$1, [split /,?\s+/, $2]];
3572       next;
3573   }
3574
3575   if ($define) { # If in the middle of a definition...
3576
3577     # append a continuation line ending with backslash.
3578     if ($define->[1] =~ /\\$/) {
3579       $define->[1] .= $_;
3580     }
3581     else {  # Otherwise this line ends the definition, make foo depend on bar
3582             # (and what bar depends on) if its not one of ppp's own constructs
3583       if (exists $API{$define->[0]} && $define->[1] !~ /^DPPP_\(/) {
3584         my @n = find_api($define->[1]);
3585         push @{$depends{$define->[0]}}, @n if @n
3586       }
3587       undef $define;
3588     }
3589   }
3590
3591   # For '#define foo bar' or '#define foo(a,b,c) bar', $define becomes a
3592   # reference to [ foo, bar ]
3593   $define = [$1, $2] if m{^\s*#\s*define\s+(\w+)(?:\([^)]*\))?\s+(.*)};
3594
3595   if ($function) {
3596     if (/^}/) {
3597       if (exists $API{$function->[0]}) {
3598         my @n = find_api($function->[1]);
3599         push @{$depends{$function->[0]}}, @n if @n
3600       }
3601       undef $function;
3602     }
3603     else {
3604       $function->[1] .= $_;
3605     }
3606   }
3607
3608   $function = [$1, ''] if m{^DPPP_\(my_(\w+)\)};
3609
3610   # Set $replace to the number given for lines that look like
3611   # / * Replace: \d+ * /
3612   # (blanks added to keep real C comments from appearing in this file)
3613   # Thus setting it to 1 starts a region where replacements are automatically
3614   # done, and setting it to 0 ends that region.
3615   $replace     = $1 if m{^\s*$rccs\s+Replace:\s+(\d+)\s+$rcce\s*$};
3616
3617   # Add bar => foo to %replace  for lines like '#define foo bar in a region
3618   # where $replace is non-zero
3619   $replace{$2} = $1 if $replace and m{^\s*#\s*define\s+(\w+)(?:\([^)]*\))?\s+(\w+)};
3620
3621   # Add bar => foo to %replace for lines like '#define foo bar  / * Replace * /
3622   # (blanks added to keep real C comments from appearing in this file)
3623   $replace{$2} = $1 if m{^\s*#\s*define\s+(\w+)(?:\([^)]*\))?\s+(\w+).*$rccs\s+Replace\s+$rcce};
3624
3625   # Add foo => bar to %replace for lines like / * Replace foo with bar * /
3626   # (blanks added to keep real C comments from appearing in this file)
3627   $replace{$1} = $2 if m{^\s*$rccs\s+Replace (\w+) with (\w+)\s+$rcce\s*$};
3628
3629   # For lines like / * foo, bar depends on baz, bat * /
3630   # create a list of the elements on the rhs, and make that list apply to each
3631   # element in the lhs, which becomes a key in \%depends.
3632   # (blanks added to keep real C comments from appearing in this file)
3633   if (m{^\s*$rccs\s+(\w+(\s*,\s*\w+)*)\s+depends\s+on\s+(\w+(\s*,\s*\w+)*)\s+$rcce\s*$}) {
3634     my @deps = map { s/\s+//g; $_ } split /,/, $3;
3635     my $d;
3636     for $d (map { s/\s+//g; $_ } split /,/, $1) {
3637       push @{$depends{$d}}, @deps;
3638     }
3639   }
3640
3641   $need{$1} = 1 if m{^#if\s+defined\(NEED_(\w+)(?:_GLOBAL)?\)};
3642 }
3643
3644 for (values %depends) {
3645   my %seen;
3646   $_ = [sort dictionary_order grep !$seen{$_}++, @$_];
3647 }
3648
3649 if (exists $opt{'api-info'}) {
3650   my $f;
3651   my $count = 0;
3652   my $match = $opt{'api-info'} =~ m!^/(.*)/$! ? $1 : "^\Q$opt{'api-info'}\E\$";
3653   for $f (sort dictionary_order keys %API) {
3654     next unless $f =~ /$match/;
3655     print "\n=== $f ===\n";
3656     my $info = 0;
3657     my $base;
3658     $base = int_parse_version($API{$f}{base}) if $API{$f}{base};
3659     my $todo;
3660     $todo = int_parse_version($API{$f}{todo}) if $API{$f}{todo};
3661
3662     # Output information if it is generally publicly usable
3663     if ($base && ! $API{$f}{inaccessible} && ! $API{$f}{core_only}) {
3664         my $with_or= "";
3665         if (    $base <= $int_min_perl
3666             || (   (! $API{$f}{provided} && ! $todo)
3667                 || ($todo && $todo >= $base)))
3668         {
3669             $with_or= " with or";
3670         }
3671         print "\nSupported at least since perl-",
3672               format_version($base), ",$with_or without $ppport.";
3673         if ($API{$f}{unverified}) {
3674             print "\nThis information is based on inspection of the source code",
3675                   " and has not been\n",
3676                   "verified by successful compilation.";
3677         }
3678         print "\n";
3679         $info++;
3680      }
3681      if ($API{$f}{provided} || $todo) {
3682         print "\nThis is only supported by $ppport, and NOT by perl versions going forward.\n" unless $base;
3683         if ($todo) {
3684             if (! $base || $todo < $base) {
3685                 my $additionally = "";
3686                 $additionally .= " additionally" if $base;
3687                 print "$ppport$additionally provides support at least back to perl-",
3688                     format_version($todo),
3689                     ".\n";
3690             }
3691         }
3692         elsif (! $base || $base > $int_min_perl) {
3693             if (exists $depends{$f}) {
3694                 my $max = 0;
3695                 for (@{$depends{$f}}) {
3696                     $max = int_parse_version($API{$_}{todo}) if $API{$_}{todo} && $API{$_}{todo} > $max;
3697                     # XXX What to assume unspecified values are?  This effectively makes them MIN_PERL
3698                 }
3699                 $todo = $max if $max;
3700             }
3701             print "\n$ppport provides support for this, but ironically, does not",
3702                   " currently know,\n",
3703                   "for this report, the minimum version it supports for this";
3704             if ($API{$f}{undocumented}) {
3705                 print " and many things\n",
3706                       "it provides that are implemented as macros and aren't",
3707                       " documented.  You can\n",
3708                       "help by submitting a documentation patch";
3709             }
3710             print ".\n";
3711             if ($todo) {
3712                 if ($todo <= $int_min_perl) {
3713                     print "It may very well be supported all the way back to ",
3714                           format_version(5.003_07), ".\n";
3715                 }
3716                 else {
3717                     print "But given the things $f depends on, it's a good",
3718                           " guess that it isn't\n",
3719                           "supported prior to ", format_version($todo), ".\n";
3720                 }
3721             }
3722         }
3723     }
3724     if ($API{$f}{provided}) {
3725       print "Support needs to be explicitly requested by #define NEED_$f\n",
3726             "(or #define NEED_${f}_GLOBAL).\n"              if exists $need{$f};
3727       $info++;
3728     }
3729
3730     if ($base || ! $API{$f}{ppport_fnc}) {
3731       my $email = "Send email to perl5-porters\@perl.org if you need to have this functionality.\n";
3732       if ($API{$f}{inaccessible}) {
3733         print "\nThis is not part of the public API, and may not even be accessible to XS code.\n";
3734         $info++;
3735       }
3736       elsif ($API{$f}{core_only}) {
3737         print "\nThis is not part of the public API, and should not be used by XS code.\n";
3738         $info++;
3739       }
3740       elsif ($API{$f}{deprecated}) {
3741         print "\nThis is deprecated and should not be used.  Convert existing uses.\n";
3742         $info++;
3743       }
3744       elsif ($API{$f}{experimental}) {
3745         print "\nThe API for this is unstable and should not be used by XS code.\n", $email;
3746         $info++;
3747       }
3748       elsif ($API{$f}{undocumented}) {
3749         print "\nSince this is undocumented, the API should be considered unstable.\n";
3750         if ($API{$f}{provided}) {
3751             print "Consider bringing this up on the list: perl5-porters\@perl.org.\n";
3752         }
3753         else {
3754             print "It may be that this is not intended for XS use, or it may just be\n",
3755                   "that no one has gotten around to documenting it.\n", $email;
3756         }
3757         $info++;
3758       }
3759       unless ($info) {
3760         print "No portability information available.  Check your spelling; or",
3761               " this could be\na bug in Devel::PPPort.  To report an issue:\n",
3762               "https://github.com/Dual-Life/Devel-PPPort/issues/new\n";
3763       }
3764     }
3765
3766     print "\nDepends on: ", join(', ', @{$depends{$f}}), ".\n"
3767                                                          if exists $depends{$f};
3768     if (exists $hints{$f} || exists $warnings{$f}) {
3769       print "\n$hints{$f}" if exists $hints{$f};
3770       print "\nWARNING:\n$warnings{$f}" if exists $warnings{$f};
3771       $info++;
3772     }
3773     $count++;
3774   }
3775
3776   $count or print "\nFound no API matching '$opt{'api-info'}'.";
3777   print "\n";
3778   exit 0;
3779 }
3780
3781 if (exists $opt{'list-provided'}) {
3782   my $f;
3783   for $f (sort dictionary_order keys %API) {
3784     next unless $API{$f}{provided};
3785     my @flags;
3786     push @flags, 'explicit' if exists $need{$f};
3787     push @flags, 'depend'   if exists $depends{$f};
3788     push @flags, 'hint'     if exists $hints{$f};
3789     push @flags, 'warning'  if exists $warnings{$f};
3790     my $flags = @flags ? '  ['.join(', ', @flags).']' : '';
3791     print "$f$flags\n";
3792   }
3793   exit 0;
3794 }
3795
3796 my @files;
3797 my @srcext = qw( .xs .c .h .cc .cpp -c.inc -xs.inc );
3798 my $srcext = join '|', map { quotemeta $_ } @srcext;
3799
3800 if (@ARGV) {
3801   my %seen;
3802   for (@ARGV) {
3803     if (-e) {
3804       if (-f) {
3805         push @files, $_ unless $seen{$_}++;
3806       }
3807       else { warn "'$_' is not a file.\n" }
3808     }
3809     else {
3810       my @new = grep { -f } glob $_
3811           or warn "'$_' does not exist.\n";
3812       push @files, grep { !$seen{$_}++ } @new;
3813     }
3814   }
3815 }
3816 else {
3817   eval {
3818     require File::Find;
3819     File::Find::find(sub {
3820       $File::Find::name =~ /($srcext)$/i
3821           and push @files, $File::Find::name;
3822     }, '.');
3823   };
3824   if ($@) {
3825     @files = map { glob "*$_" } @srcext;
3826   }
3827 }
3828
3829 if (!@ARGV || $opt{filter}) {
3830   my(@in, @out);
3831   my %xsc = map { /(.*)\.xs$/ ? ("$1.c" => 1, "$1.cc" => 1) : () } @files;
3832   for (@files) {
3833     my $out = exists $xsc{$_} || /\b\Q$ppport\E$/i || !/($srcext)$/i;
3834     push @{ $out ? \@out : \@in }, $_;
3835   }
3836   if (@ARGV && @out) {
3837     warning("Skipping the following files (use --nofilter to avoid this):\n| ", join "\n| ", @out);
3838   }
3839   @files = @in;
3840 }
3841
3842 die "No input files given!\n" unless @files;
3843
3844 my(%files, %global, %revreplace);
3845 %revreplace = reverse %replace;
3846 my $filename;
3847 my $patch_opened = 0;
3848
3849 for $filename (@files) {
3850   unless (open IN, "<$filename") {
3851     warn "Unable to read from $filename: $!\n";
3852     next;
3853   }
3854
3855   info("Scanning $filename ...");
3856
3857   my $c = do { local $/; <IN> };
3858   close IN;
3859
3860   my %file = (orig => $c, changes => 0);
3861
3862   # Temporarily remove C/XS comments and strings from the code
3863   my @ccom;
3864
3865   $c =~ s{
3866     ( ^$HS*\#$HS*include\b[^\r\n]+\b(?:\Q$ppport\E|XSUB\.h)\b[^\r\n]*
3867     | ^$HS*\#$HS*(?:define|elif|if(?:def)?)\b[^\r\n]* )
3868   | ( ^$HS*\#[^\r\n]*
3869     | "[^"\\]*(?:\\.[^"\\]*)*"
3870     | '[^'\\]*(?:\\.[^'\\]*)*'
3871     | / (?: \*[^*]*\*+(?:[^$ccs][^*]*\*+)* / | /[^\r\n]* ) )
3872   }{ defined $2 and push @ccom, $2;
3873      defined $1 ? $1 : "$ccs$#ccom$cce" }mgsex;
3874
3875   $file{ccom} = \@ccom;
3876   $file{code} = $c;
3877   $file{has_inc_ppport} = $c =~ /^$HS*#$HS*include[^\r\n]+\b\Q$ppport\E\b/m;
3878
3879   my $func;
3880
3881   for $func (keys %API) {
3882     my $match = $func;
3883     $match .= "|$revreplace{$func}" if exists $revreplace{$func};
3884     if ($c =~ /\b(?:Perl_)?($match)\b/) {
3885       $file{uses_replace}{$1}++ if exists $revreplace{$func} && $1 eq $revreplace{$func};
3886       $file{uses_Perl}{$func}++ if $c =~ /\bPerl_$func\b/;
3887       if (exists $API{$func}{provided}) {
3888         $file{uses_provided}{$func}++;
3889         if ( ! exists $API{$func}{base}
3890             || int_parse_version($API{$func}{base}) > $opt{'compat-version'})
3891         {
3892           $file{uses}{$func}++;
3893           my @deps = rec_depend($func);
3894           if (@deps) {
3895             $file{uses_deps}{$func} = \@deps;
3896             for (@deps) {
3897               $file{uses}{$_} = 0 unless exists $file{uses}{$_};
3898             }
3899           }
3900           for ($func, @deps) {
3901             $file{needs}{$_} = 'static' if exists $need{$_};
3902           }
3903         }
3904       }
3905       if (   exists $API{$func}{todo}
3906           && int_parse_version($API{$func}{todo}) > $opt{'compat-version'})
3907       {
3908         if ($c =~ /\b$func\b/) {
3909           $file{uses_todo}{$func}++;
3910         }
3911       }
3912     }
3913   }
3914
3915   while ($c =~ /^$HS*#$HS*define$HS+(NEED_(\w+?)(_GLOBAL)?)\b/mg) {
3916     if (exists $need{$2}) {
3917       $file{defined $3 ? 'needed_global' : 'needed_static'}{$2}++;
3918     }
3919     else { warning("Possibly wrong #define $1 in $filename") }
3920   }
3921
3922   for (qw(uses needs uses_todo needed_global needed_static)) {
3923     for $func (keys %{$file{$_}}) {
3924       push @{$global{$_}{$func}}, $filename;
3925     }
3926   }
3927
3928   $files{$filename} = \%file;
3929 }
3930
3931 # Globally resolve NEED_'s
3932 my $need;
3933 for $need (keys %{$global{needs}}) {
3934   if (@{$global{needs}{$need}} > 1) {
3935     my @targets = @{$global{needs}{$need}};
3936     my @t = grep $files{$_}{needed_global}{$need}, @targets;
3937     @targets = @t if @t;
3938     @t = grep /\.xs$/i, @targets;
3939     @targets = @t if @t;
3940     my $target = shift @targets;
3941     $files{$target}{needs}{$need} = 'global';
3942     for (@{$global{needs}{$need}}) {
3943       $files{$_}{needs}{$need} = 'extern' if $_ ne $target;
3944     }
3945   }
3946 }
3947
3948 for $filename (@files) {
3949   exists $files{$filename} or next;
3950
3951   info("=== Analyzing $filename ===");
3952
3953   my %file = %{$files{$filename}};
3954   my $func;
3955   my $c = $file{code};
3956   my $warnings = 0;
3957
3958   for $func (sort dictionary_order keys %{$file{uses_Perl}}) {
3959     if ($API{$func}{varargs}) {
3960       unless ($API{$func}{noTHXarg}) {
3961         my $changes = ($c =~ s{\b(Perl_$func\s*\(\s*)(?!aTHX_?)(\)|[^\s)]*\))}
3962                               { $1 . ($2 eq ')' ? 'aTHX' : 'aTHX_ ') . $2 }ge);
3963         if ($changes) {
3964           warning("Doesn't pass interpreter argument aTHX to Perl_$func");
3965           $file{changes} += $changes;
3966         }
3967       }
3968     }
3969     else {
3970       warning("Uses Perl_$func instead of $func");
3971       $file{changes} += ($c =~ s{\bPerl_$func(\s*)\((\s*aTHX_?)?\s*}
3972                                 {$func$1(}g);
3973     }
3974   }
3975
3976   for $func (sort dictionary_order keys %{$file{uses_replace}}) {
3977     warning("Uses $func instead of $replace{$func}");
3978     $file{changes} += ($c =~ s/\b$func\b/$replace{$func}/g);
3979   }
3980
3981   for $func (sort dictionary_order keys %{$file{uses_provided}}) {
3982     if ($file{uses}{$func}) {
3983       if (exists $file{uses_deps}{$func}) {
3984         diag("Uses $func, which depends on ", join(', ', @{$file{uses_deps}{$func}}));
3985       }
3986       else {
3987         diag("Uses $func");
3988       }
3989     }
3990     $warnings += hint($func);
3991   }
3992
3993   unless ($opt{quiet}) {
3994     for $func (sort dictionary_order keys %{$file{uses_todo}}) {
3995       next if int_parse_version($API{$func}{todo}) <= $int_min_perl;
3996       print "*** WARNING: Uses $func, which may not be portable below perl ",
3997             format_version($API{$func}{todo}), ", even with '$ppport'\n";
3998       $warnings++;
3999     }
4000   }
4001
4002   for $func (sort dictionary_order keys %{$file{needed_static}}) {
4003     my $message = '';
4004     if (not exists $file{uses}{$func}) {
4005       $message = "No need to define NEED_$func if $func is never used";
4006     }
4007     elsif (exists $file{needs}{$func} && $file{needs}{$func} ne 'static') {
4008       $message = "No need to define NEED_$func when already needed globally";
4009     }
4010     if ($message) {
4011       diag($message);
4012       $file{changes} += ($c =~ s/^$HS*#$HS*define$HS+NEED_$func\b.*$LF//mg);
4013     }
4014   }
4015
4016   for $func (sort dictionary_order keys %{$file{needed_global}}) {
4017     my $message = '';
4018     if (not exists $global{uses}{$func}) {
4019       $message = "No need to define NEED_${func}_GLOBAL if $func is never used";
4020     }
4021     elsif (exists $file{needs}{$func}) {
4022       if ($file{needs}{$func} eq 'extern') {
4023         $message = "No need to define NEED_${func}_GLOBAL when already needed globally";
4024       }
4025       elsif ($file{needs}{$func} eq 'static') {
4026         $message = "No need to define NEED_${func}_GLOBAL when only used in this file";
4027       }
4028     }
4029     if ($message) {
4030       diag($message);
4031       $file{changes} += ($c =~ s/^$HS*#$HS*define$HS+NEED_${func}_GLOBAL\b.*$LF//mg);
4032     }
4033   }
4034
4035   $file{needs_inc_ppport} = keys %{$file{uses}};
4036
4037   if ($file{needs_inc_ppport}) {
4038     my $pp = '';
4039
4040     for $func (sort dictionary_order keys %{$file{needs}}) {
4041       my $type = $file{needs}{$func};
4042       next if $type eq 'extern';
4043       my $suffix = $type eq 'global' ? '_GLOBAL' : '';
4044       unless (exists $file{"needed_$type"}{$func}) {
4045         if ($type eq 'global') {
4046           diag("Files [@{$global{needs}{$func}}] need $func, adding global request");
4047         }
4048         else {
4049           diag("File needs $func, adding static request");
4050         }
4051         $pp .= "#define NEED_$func$suffix\n";
4052       }
4053     }
4054
4055     if ($pp && ($c =~ s/^(?=$HS*#$HS*define$HS+NEED_\w+)/$pp/m)) {
4056       $pp = '';
4057       $file{changes}++;
4058     }
4059
4060     unless ($file{has_inc_ppport}) {
4061       diag("Needs to include '$ppport'");
4062       $pp .= qq(#include "$ppport"\n)
4063     }
4064
4065     if ($pp) {
4066       $file{changes} += ($c =~ s/^($HS*#$HS*define$HS+NEED_\w+.*?)^/$1$pp/ms)
4067                      || ($c =~ s/^(?=$HS*#$HS*include.*\Q$ppport\E)/$pp/m)
4068                      || ($c =~ s/^($HS*#$HS*include.*XSUB.*\s*?)^/$1$pp/m)
4069                      || ($c =~ s/^/$pp/);
4070     }
4071   }
4072   else {
4073     if ($file{has_inc_ppport}) {
4074       diag("No need to include '$ppport'");
4075       $file{changes} += ($c =~ s/^$HS*?#$HS*include.*\Q$ppport\E.*?$LF//m);
4076     }
4077   }
4078
4079   # put back in our C comments
4080   my $ix;
4081   my $cppc = 0;
4082   my @ccom = @{$file{ccom}};
4083   for $ix (0 .. $#ccom) {
4084     if (!$opt{cplusplus} && $ccom[$ix] =~ s!^//!!) {
4085       $cppc++;
4086       $file{changes} += $c =~ s/$rccs$ix$rcce/$ccs$ccom[$ix] $cce/;
4087     }
4088     else {
4089       $c =~ s/$rccs$ix$rcce/$ccom[$ix]/;
4090     }
4091   }
4092
4093   if ($cppc) {
4094     my $s = $cppc != 1 ? 's' : '';
4095     warning("Uses $cppc C++ style comment$s, which is not portable");
4096   }
4097
4098   my $s = $warnings != 1 ? 's' : '';
4099   my $warn = $warnings ? " ($warnings warning$s)" : '';
4100   info("Analysis completed$warn");
4101
4102   if ($file{changes}) {
4103     if (exists $opt{copy}) {
4104       my $newfile = "$filename$opt{copy}";
4105       if (-e $newfile) {
4106         error("'$newfile' already exists, refusing to write copy of '$filename'");
4107       }
4108       else {
4109         local *F;
4110         if (open F, ">$newfile") {
4111           info("Writing copy of '$filename' with changes to '$newfile'");
4112           print F $c;
4113           close F;
4114         }
4115         else {
4116           error("Cannot open '$newfile' for writing: $!");
4117         }
4118       }
4119     }
4120     elsif (exists $opt{patch} || $opt{changes}) {
4121       if (exists $opt{patch}) {
4122         unless ($patch_opened) {
4123           if (open PATCH, ">$opt{patch}") {
4124             $patch_opened = 1;
4125           }
4126           else {
4127             error("Cannot open '$opt{patch}' for writing: $!");
4128             delete $opt{patch};
4129             $opt{changes} = 1;
4130             goto fallback;
4131           }
4132         }
4133         mydiff(\*PATCH, $filename, $c);
4134       }
4135       else {
4136 fallback:
4137         info("Suggested changes:");
4138         mydiff(\*STDOUT, $filename, $c);
4139       }
4140     }
4141     else {
4142       my $s = $file{changes} == 1 ? '' : 's';
4143       info("$file{changes} potentially required change$s detected");
4144     }
4145   }
4146   else {
4147     info("Looks good");
4148   }
4149 }
4150
4151 close PATCH if $patch_opened;
4152
4153 exit 0;
4154
4155
4156 sub try_use { eval "use @_;"; return $@ eq '' }
4157
4158 sub mydiff
4159 {
4160   local *F = shift;
4161   my($file, $str) = @_;
4162   my $diff;
4163
4164   if (exists $opt{diff}) {
4165     $diff = run_diff($opt{diff}, $file, $str);
4166   }
4167
4168   if (!defined $diff and try_use('Text::Diff')) {
4169     $diff = Text::Diff::diff($file, \$str, { STYLE => 'Unified' });
4170     $diff = <<HEADER . $diff;
4171 --- $file
4172 +++ $file.patched
4173 HEADER
4174   }
4175
4176   if (!defined $diff) {
4177     $diff = run_diff('diff -u', $file, $str);
4178   }
4179
4180   if (!defined $diff) {
4181     $diff = run_diff('diff', $file, $str);
4182   }
4183
4184   if (!defined $diff) {
4185     error("Cannot generate a diff. Please install Text::Diff or use --copy.");
4186     return;
4187   }
4188
4189   print F $diff;
4190 }
4191
4192 sub run_diff
4193 {
4194   my($prog, $file, $str) = @_;
4195   my $tmp = 'dppptemp';
4196   my $suf = 'aaa';
4197   my $diff = '';
4198   local *F;
4199
4200   while (-e "$tmp.$suf") { $suf++ }
4201   $tmp = "$tmp.$suf";
4202
4203   if (open F, ">$tmp") {
4204     print F $str;
4205     close F;
4206
4207     if (open F, "$prog $file $tmp |") {
4208       while (<F>) {
4209         s/\Q$tmp\E/$file.patched/;
4210         $diff .= $_;
4211       }
4212       close F;
4213       unlink $tmp;
4214       return $diff;
4215     }
4216
4217     unlink $tmp;
4218   }
4219   else {
4220     error("Cannot open '$tmp' for writing: $!");
4221   }
4222
4223   return undef;
4224 }
4225
4226 sub rec_depend
4227 {
4228   my($func, $seen) = @_;
4229   return () unless exists $depends{$func};
4230   $seen = {%{$seen||{}}};
4231   return () if $seen->{$func}++;
4232   my %s;
4233   grep !$s{$_}++, map { ($_, rec_depend($_, $seen)) } @{$depends{$func}};
4234 }
4235
4236 sub info
4237 {
4238   $opt{quiet} and return;
4239   print @_, "\n";
4240 }
4241
4242 sub diag
4243 {
4244   $opt{quiet} and return;
4245   $opt{diag} and print @_, "\n";
4246 }
4247
4248 sub warning
4249 {
4250   $opt{quiet} and return;
4251   print "*** ", @_, "\n";
4252 }
4253
4254 sub error
4255 {
4256   print "*** ERROR: ", @_, "\n";
4257 }
4258
4259 my %given_hints;
4260 my %given_warnings;
4261 sub hint
4262 {
4263   $opt{quiet} and return;
4264   my $func = shift;
4265   my $rv = 0;
4266   if (exists $warnings{$func} && !$given_warnings{$func}++) {
4267     my $warn = $warnings{$func};
4268     $warn =~ s!^!*** !mg;
4269     print "*** WARNING: $func\n", $warn;
4270     $rv++;
4271   }
4272   if ($opt{hints} && exists $hints{$func} && !$given_hints{$func}++) {
4273     my $hint = $hints{$func};
4274     $hint =~ s/^/   /mg;
4275     print "   --- hint for $func ---\n", $hint;
4276   }
4277   $rv;
4278 }
4279
4280 sub usage
4281 {
4282   my($usage) = do { local(@ARGV,$/)=($0); <> } =~ /^=head\d$HS+SYNOPSIS\s*^(.*?)\s*^=/ms;
4283   my %M = ( 'I' => '*' );
4284   $usage =~ s/^\s*perl\s+\S+/$^X $0/;
4285   $usage =~ s/([A-Z])<([^>]+)>/$M{$1}$2$M{$1}/g;
4286
4287   print <<ENDUSAGE;
4288
4289 Usage: $usage
4290
4291 See perldoc $0 for details.
4292
4293 ENDUSAGE
4294
4295   exit 2;
4296 }
4297
4298 sub strip
4299 {
4300   my $self = do { local(@ARGV,$/)=($0); <> };
4301   my($copy) = $self =~ /^=head\d\s+COPYRIGHT\s*^(.*?)^=\w+/ms;
4302   $copy =~ s/^(?=\S+)/    /gms;
4303   $self =~ s/^$HS+Do NOT edit.*?(?=^-)/$copy/ms;
4304   $self =~ s/^SKIP.*(?=^__DATA__)/SKIP
4305 if (\@ARGV && \$ARGV[0] eq '--unstrip') {
4306   eval { require Devel::PPPort };
4307   \$@ and die "Cannot require Devel::PPPort, please install.\\n";
4308   if (eval \$Devel::PPPort::VERSION < $VERSION) {
4309     die "$0 was originally generated with Devel::PPPort $VERSION.\\n"
4310       . "Your Devel::PPPort is only version \$Devel::PPPort::VERSION.\\n"
4311       . "Please install a newer version, or --unstrip will not work.\\n";
4312   }
4313   Devel::PPPort::WriteFile(\$0);
4314   exit 0;
4315 }
4316 print <<END;
4317
4318 Sorry, but this is a stripped version of \$0.
4319
4320 To be able to use its original script and doc functionality,
4321 please try to regenerate this file using:
4322
4323   \$^X \$0 --unstrip
4324
4325 END
4326 /ms;
4327   my($pl, $c) = $self =~ /(.*^__DATA__)(.*)/ms;
4328   $c =~ s{
4329     / (?: \*[^*]*\*+(?:[^$ccs][^*]*\*+)* / | /[^\r\n]*)
4330   | ( "[^"\\]*(?:\\.[^"\\]*)*"
4331     | '[^'\\]*(?:\\.[^'\\]*)*' )
4332   | ($HS+) }{ defined $2 ? ' ' : ($1 || '') }gsex;
4333   $c =~ s!\s+$!!mg;
4334   $c =~ s!^$LF!!mg;
4335   $c =~ s!^\s*#\s*!#!mg;
4336   $c =~ s!^\s+!!mg;
4337
4338   open OUT, ">$0" or die "cannot strip $0: $!\n";
4339   print OUT "$pl$c\n";
4340
4341   exit 0;
4342 }
4343
4344 __DATA__
4345 */
4346
4347 #ifndef _P_P_PORTABILITY_H_
4348 #define _P_P_PORTABILITY_H_
4349
4350 #ifndef DPPP_NAMESPACE
4351 #  define DPPP_NAMESPACE DPPP_
4352 #endif
4353
4354 #define DPPP_CAT2(x,y) CAT2(x,y)
4355 #define DPPP_(name) DPPP_CAT2(DPPP_NAMESPACE, name)
4356
4357 #ifndef PERL_REVISION
4358 #  if !defined(__PATCHLEVEL_H_INCLUDED__) && !(defined(PATCHLEVEL) && defined(SUBVERSION))
4359 #    define PERL_PATCHLEVEL_H_IMPLICIT
4360 #    include <patchlevel.h>
4361 #  endif
4362 #  if !(defined(PERL_VERSION) || (defined(SUBVERSION) && defined(PATCHLEVEL)))
4363 #    include <could_not_find_Perl_patchlevel.h>
4364 #  endif
4365 #  ifndef PERL_REVISION
4366 #    define PERL_REVISION       (5)
4367      /* Replace: 1 */
4368 #    define PERL_VERSION        PATCHLEVEL
4369 #    define PERL_SUBVERSION     SUBVERSION
4370      /* Replace PERL_PATCHLEVEL with PERL_VERSION */
4371      /* Replace: 0 */
4372 #  endif
4373 #endif
4374
4375 #define D_PPP_DEC2BCD(dec) ((((dec)/100)<<8)|((((dec)%100)/10)<<4)|((dec)%10))
4376 #define PERL_BCDVERSION ((D_PPP_DEC2BCD(PERL_REVISION)<<24)|(D_PPP_DEC2BCD(PERL_VERSION)<<12)|D_PPP_DEC2BCD(PERL_SUBVERSION))
4377
4378 /* It is very unlikely that anyone will try to use this with Perl 6
4379    (or greater), but who knows.
4380  */
4381 #if PERL_REVISION != 5
4382 #  error ppport.h only works with Perl version 5
4383 #endif /* PERL_REVISION != 5 */
4384 #ifndef dTHR
4385 #  define dTHR                           dNOOP
4386 #endif
4387 #ifndef dTHX
4388 #  define dTHX                           dNOOP
4389 #endif
4390
4391 /* Hint: dTHX
4392
4393   For pre-5.6.0 thread compatibility, instead use dTHXR, available only through
4394   ppport.h */
4395 #ifndef dTHXa
4396 #  define dTHXa(x)                       dNOOP
4397 #endif
4398 #ifndef pTHX
4399 #  define pTHX                           void
4400 #endif
4401
4402 #ifndef pTHX_
4403 #  define pTHX_
4404 #endif
4405
4406 #ifndef aTHX
4407 #  define aTHX
4408 #endif
4409
4410 /* Hint: aTHX
4411
4412   For pre-5.6.0 thread compatibility, instead use aTHXR, available only through
4413   ppport.h */
4414 #ifndef aTHX_
4415 #  define aTHX_
4416 #endif
4417
4418 /* Hint: aTHX_
4419
4420   For pre-5.6.0 thread compatibility, instead use aTHXR_, available only
4421   through ppport.h */
4422
4423 #if (PERL_BCDVERSION < 0x5006000)
4424 #  ifdef USE_THREADS
4425 #    define aTHXR  thr
4426 #    define aTHXR_ thr,
4427 #  else
4428 #    define aTHXR
4429 #    define aTHXR_
4430 #  endif
4431 #  define dTHXR  dTHR
4432 #else
4433 #  define aTHXR  aTHX
4434 #  define aTHXR_ aTHX_
4435 #  define dTHXR  dTHX
4436 #endif
4437 #ifndef dTHXoa
4438 #  define dTHXoa(x)                      dTHXa(x)
4439 #endif
4440
4441 #ifdef I_LIMITS
4442 #  include <limits.h>
4443 #endif
4444
4445 #ifndef PERL_UCHAR_MIN
4446 #  define PERL_UCHAR_MIN ((unsigned char)0)
4447 #endif
4448
4449 #ifndef PERL_UCHAR_MAX
4450 #  ifdef UCHAR_MAX
4451 #    define PERL_UCHAR_MAX ((unsigned char)UCHAR_MAX)
4452 #  else
4453 #    ifdef MAXUCHAR
4454 #      define PERL_UCHAR_MAX ((unsigned char)MAXUCHAR)
4455 #    else
4456 #      define PERL_UCHAR_MAX ((unsigned char)~(unsigned)0)
4457 #    endif
4458 #  endif
4459 #endif
4460
4461 #ifndef PERL_USHORT_MIN
4462 #  define PERL_USHORT_MIN ((unsigned short)0)
4463 #endif
4464
4465 #ifndef PERL_USHORT_MAX
4466 #  ifdef USHORT_MAX
4467 #    define PERL_USHORT_MAX ((unsigned short)USHORT_MAX)
4468 #  else
4469 #    ifdef MAXUSHORT
4470 #      define PERL_USHORT_MAX ((unsigned short)MAXUSHORT)
4471 #    else
4472 #      ifdef USHRT_MAX
4473 #        define PERL_USHORT_MAX ((unsigned short)USHRT_MAX)
4474 #      else
4475 #        define PERL_USHORT_MAX ((unsigned short)~(unsigned)0)
4476 #      endif
4477 #    endif
4478 #  endif
4479 #endif
4480
4481 #ifndef PERL_SHORT_MAX
4482 #  ifdef SHORT_MAX
4483 #    define PERL_SHORT_MAX ((short)SHORT_MAX)
4484 #  else
4485 #    ifdef MAXSHORT    /* Often used in <values.h> */
4486 #      define PERL_SHORT_MAX ((short)MAXSHORT)
4487 #    else
4488 #      ifdef SHRT_MAX
4489 #        define PERL_SHORT_MAX ((short)SHRT_MAX)
4490 #      else
4491 #        define PERL_SHORT_MAX ((short) (PERL_USHORT_MAX >> 1))
4492 #      endif
4493 #    endif
4494 #  endif
4495 #endif
4496
4497 #ifndef PERL_SHORT_MIN
4498 #  ifdef SHORT_MIN
4499 #    define PERL_SHORT_MIN ((short)SHORT_MIN)
4500 #  else
4501 #    ifdef MINSHORT
4502 #      define PERL_SHORT_MIN ((short)MINSHORT)
4503 #    else
4504 #      ifdef SHRT_MIN
4505 #        define PERL_SHORT_MIN ((short)SHRT_MIN)
4506 #      else
4507 #        define PERL_SHORT_MIN (-PERL_SHORT_MAX - ((3 & -1) == 3))
4508 #      endif
4509 #    endif
4510 #  endif
4511 #endif
4512
4513 #ifndef PERL_UINT_MAX
4514 #  ifdef UINT_MAX
4515 #    define PERL_UINT_MAX ((unsigned int)UINT_MAX)
4516 #  else
4517 #    ifdef MAXUINT
4518 #      define PERL_UINT_MAX ((unsigned int)MAXUINT)
4519 #    else
4520 #      define PERL_UINT_MAX (~(unsigned int)0)
4521 #    endif
4522 #  endif
4523 #endif
4524
4525 #ifndef PERL_UINT_MIN
4526 #  define PERL_UINT_MIN ((unsigned int)0)
4527 #endif
4528
4529 #ifndef PERL_INT_MAX
4530 #  ifdef INT_MAX
4531 #    define PERL_INT_MAX ((int)INT_MAX)
4532 #  else
4533 #    ifdef MAXINT    /* Often used in <values.h> */
4534 #      define PERL_INT_MAX ((int)MAXINT)
4535 #    else
4536 #      define PERL_INT_MAX ((int)(PERL_UINT_MAX >> 1))
4537 #    endif
4538 #  endif
4539 #endif
4540
4541 #ifndef PERL_INT_MIN
4542 #  ifdef INT_MIN
4543 #    define PERL_INT_MIN ((int)INT_MIN)
4544 #  else
4545 #    ifdef MININT
4546 #      define PERL_INT_MIN ((int)MININT)
4547 #    else
4548 #      define PERL_INT_MIN (-PERL_INT_MAX - ((3 & -1) == 3))
4549 #    endif
4550 #  endif
4551 #endif
4552
4553 #ifndef PERL_ULONG_MAX
4554 #  ifdef ULONG_MAX
4555 #    define PERL_ULONG_MAX ((unsigned long)ULONG_MAX)
4556 #  else
4557 #    ifdef MAXULONG
4558 #      define PERL_ULONG_MAX ((unsigned long)MAXULONG)
4559 #    else
4560 #      define PERL_ULONG_MAX (~(unsigned long)0)
4561 #    endif
4562 #  endif
4563 #endif
4564
4565 #ifndef PERL_ULONG_MIN
4566 #  define PERL_ULONG_MIN ((unsigned long)0L)
4567 #endif
4568
4569 #ifndef PERL_LONG_MAX
4570 #  ifdef LONG_MAX
4571 #    define PERL_LONG_MAX ((long)LONG_MAX)
4572 #  else
4573 #    ifdef MAXLONG
4574 #      define PERL_LONG_MAX ((long)MAXLONG)
4575 #    else
4576 #      define PERL_LONG_MAX ((long) (PERL_ULONG_MAX >> 1))
4577 #    endif
4578 #  endif
4579 #endif
4580
4581 #ifndef PERL_LONG_MIN
4582 #  ifdef LONG_MIN
4583 #    define PERL_LONG_MIN ((long)LONG_MIN)
4584 #  else
4585 #    ifdef MINLONG
4586 #      define PERL_LONG_MIN ((long)MINLONG)
4587 #    else
4588 #      define PERL_LONG_MIN (-PERL_LONG_MAX - ((3 & -1) == 3))
4589 #    endif
4590 #  endif
4591 #endif
4592
4593 #if defined(HAS_QUAD) && (defined(convex) || defined(uts))
4594 #  ifndef PERL_UQUAD_MAX
4595 #    ifdef ULONGLONG_MAX
4596 #      define PERL_UQUAD_MAX ((unsigned long long)ULONGLONG_MAX)
4597 #    else
4598 #      ifdef MAXULONGLONG
4599 #        define PERL_UQUAD_MAX ((unsigned long long)MAXULONGLONG)
4600 #      else
4601 #        define PERL_UQUAD_MAX (~(unsigned long long)0)
4602 #      endif
4603 #    endif
4604 #  endif
4605
4606 #  ifndef PERL_UQUAD_MIN
4607 #    define PERL_UQUAD_MIN ((unsigned long long)0L)
4608 #  endif
4609
4610 #  ifndef PERL_QUAD_MAX
4611 #    ifdef LONGLONG_MAX
4612 #      define PERL_QUAD_MAX ((long long)LONGLONG_MAX)
4613 #    else
4614 #      ifdef MAXLONGLONG
4615 #        define PERL_QUAD_MAX ((long long)MAXLONGLONG)
4616 #      else
4617 #        define PERL_QUAD_MAX ((long long) (PERL_UQUAD_MAX >> 1))
4618 #      endif
4619 #    endif
4620 #  endif
4621
4622 #  ifndef PERL_QUAD_MIN
4623 #    ifdef LONGLONG_MIN
4624 #      define PERL_QUAD_MIN ((long long)LONGLONG_MIN)
4625 #    else
4626 #      ifdef MINLONGLONG
4627 #        define PERL_QUAD_MIN ((long long)MINLONGLONG)
4628 #      else
4629 #        define PERL_QUAD_MIN (-PERL_QUAD_MAX - ((3 & -1) == 3))
4630 #      endif
4631 #    endif
4632 #  endif
4633 #endif
4634
4635 /* This is based on code from 5.003 perl.h */
4636 #ifdef HAS_QUAD
4637 #  ifdef cray
4638 #ifndef IVTYPE
4639 #  define IVTYPE                         int
4640 #endif
4641
4642 #ifndef IV_MIN
4643 #  define IV_MIN                         PERL_INT_MIN
4644 #endif
4645
4646 #ifndef IV_MAX
4647 #  define IV_MAX                         PERL_INT_MAX
4648 #endif
4649
4650 #ifndef UV_MIN
4651 #  define UV_MIN                         PERL_UINT_MIN
4652 #endif
4653
4654 #ifndef UV_MAX
4655 #  define UV_MAX                         PERL_UINT_MAX
4656 #endif
4657
4658 #    ifdef INTSIZE
4659 #ifndef IVSIZE
4660 #  define IVSIZE                         INTSIZE
4661 #endif
4662
4663 #    endif
4664 #  else
4665 #    if defined(convex) || defined(uts)
4666 #ifndef IVTYPE
4667 #  define IVTYPE                         long long
4668 #endif
4669
4670 #ifndef IV_MIN
4671 #  define IV_MIN                         PERL_QUAD_MIN
4672 #endif
4673
4674 #ifndef IV_MAX
4675 #  define IV_MAX                         PERL_QUAD_MAX
4676 #endif
4677
4678 #ifndef UV_MIN
4679 #  define UV_MIN                         PERL_UQUAD_MIN
4680 #endif
4681
4682 #ifndef UV_MAX
4683 #  define UV_MAX                         PERL_UQUAD_MAX
4684 #endif
4685
4686 #      ifdef LONGLONGSIZE
4687 #ifndef IVSIZE
4688 #  define IVSIZE                         LONGLONGSIZE
4689 #endif
4690
4691 #      endif
4692 #    else
4693 #ifndef IVTYPE
4694 #  define IVTYPE                         long
4695 #endif
4696
4697 #ifndef IV_MIN
4698 #  define IV_MIN                         PERL_LONG_MIN
4699 #endif
4700
4701 #ifndef IV_MAX
4702 #  define IV_MAX                         PERL_LONG_MAX
4703 #endif
4704
4705 #ifndef UV_MIN
4706 #  define UV_MIN                         PERL_ULONG_MIN
4707 #endif
4708
4709 #ifndef UV_MAX
4710 #  define UV_MAX                         PERL_ULONG_MAX
4711 #endif
4712
4713 #      ifdef LONGSIZE
4714 #ifndef IVSIZE
4715 #  define IVSIZE                         LONGSIZE
4716 #endif
4717
4718 #      endif
4719 #    endif
4720 #  endif
4721 #ifndef IVSIZE
4722 #  define IVSIZE                         8
4723 #endif
4724
4725 #ifndef LONGSIZE
4726 #  define LONGSIZE                       8
4727 #endif
4728
4729 #ifndef PERL_QUAD_MIN
4730 #  define PERL_QUAD_MIN                  IV_MIN
4731 #endif
4732
4733 #ifndef PERL_QUAD_MAX
4734 #  define PERL_QUAD_MAX                  IV_MAX
4735 #endif
4736
4737 #ifndef PERL_UQUAD_MIN
4738 #  define PERL_UQUAD_MIN                 UV_MIN
4739 #endif
4740
4741 #ifndef PERL_UQUAD_MAX
4742 #  define PERL_UQUAD_MAX                 UV_MAX
4743 #endif
4744
4745 #else
4746 #ifndef IVTYPE
4747 #  define IVTYPE                         long
4748 #endif
4749
4750 #ifndef LONGSIZE
4751 #  define LONGSIZE                       4
4752 #endif
4753
4754 #ifndef IV_MIN
4755 #  define IV_MIN                         PERL_LONG_MIN
4756 #endif
4757
4758 #ifndef IV_MAX
4759 #  define IV_MAX                         PERL_LONG_MAX
4760 #endif
4761
4762 #ifndef UV_MIN
4763 #  define UV_MIN                         PERL_ULONG_MIN
4764 #endif
4765
4766 #ifndef UV_MAX
4767 #  define UV_MAX                         PERL_ULONG_MAX
4768 #endif
4769
4770 #endif
4771
4772 #ifndef IVSIZE
4773 #  ifdef LONGSIZE
4774 #    define IVSIZE LONGSIZE
4775 #  else
4776 #    define IVSIZE 4 /* A bold guess, but the best we can make. */
4777 #  endif
4778 #endif
4779 #ifndef UVTYPE
4780 #  define UVTYPE                         unsigned IVTYPE
4781 #endif
4782
4783 #ifndef UVSIZE
4784 #  define UVSIZE                         IVSIZE
4785 #endif
4786
4787 #ifndef PERL_SIGNALS_UNSAFE_FLAG
4788
4789 #define PERL_SIGNALS_UNSAFE_FLAG 0x0001
4790
4791 #if (PERL_BCDVERSION < 0x5008000)
4792 #  define D_PPP_PERL_SIGNALS_INIT   PERL_SIGNALS_UNSAFE_FLAG
4793 #else
4794 #  define D_PPP_PERL_SIGNALS_INIT   0
4795 #endif
4796
4797 #if defined(NEED_PL_signals)
4798 static U32 DPPP_(my_PL_signals) = D_PPP_PERL_SIGNALS_INIT;
4799 #elif defined(NEED_PL_signals_GLOBAL)
4800 U32 DPPP_(my_PL_signals) = D_PPP_PERL_SIGNALS_INIT;
4801 #else
4802 extern U32 DPPP_(my_PL_signals);
4803 #endif
4804 #define PL_signals DPPP_(my_PL_signals)
4805
4806 #endif
4807
4808 /* Hint: PL_ppaddr
4809  * Calling an op via PL_ppaddr requires passing a context argument
4810  * for threaded builds. Since the context argument is different for
4811  * 5.005 perls, you can use aTHXR (supplied by ppport.h), which will
4812  * automatically be defined as the correct argument.
4813  */
4814
4815 #if (PERL_BCDVERSION <= 0x5005005)
4816 /* Replace: 1 */
4817 #  define PL_ppaddr                 ppaddr
4818 #  define PL_no_modify              no_modify
4819 /* Replace: 0 */
4820 #endif
4821
4822 #if (PERL_BCDVERSION <= 0x5004005)
4823 /* Replace: 1 */
4824 #  define PL_DBsignal               DBsignal
4825 #  define PL_DBsingle               DBsingle
4826 #  define PL_DBsub                  DBsub
4827 #  define PL_DBtrace                DBtrace
4828 #  define PL_Sv                     Sv
4829 #  define PL_Xpv                    Xpv
4830 #  define PL_bufend                 bufend
4831 #  define PL_bufptr                 bufptr
4832 #  define PL_compiling              compiling
4833 #  define PL_copline                copline
4834 #  define PL_curcop                 curcop
4835 #  define PL_curstash               curstash
4836 #  define PL_debstash               debstash
4837 #  define PL_defgv                  defgv
4838 #  define PL_diehook                diehook
4839 #  define PL_dirty                  dirty
4840 #  define PL_dowarn                 dowarn
4841 #  define PL_errgv                  errgv
4842 #  define PL_error_count            error_count
4843 #  define PL_expect                 expect
4844 #  define PL_hexdigit               hexdigit
4845 #  define PL_hints                  hints
4846 #  define PL_in_my                  in_my
4847 #  define PL_laststatval            laststatval
4848 #  define PL_lex_state              lex_state
4849 #  define PL_lex_stuff              lex_stuff
4850 #  define PL_linestr                linestr
4851 #  define PL_na                     na
4852 #  define PL_perl_destruct_level    perl_destruct_level
4853 #  define PL_perldb                 perldb
4854 #  define PL_rsfp_filters           rsfp_filters
4855 #  define PL_rsfp                   rsfp
4856 #  define PL_stack_base             stack_base
4857 #  define PL_stack_sp               stack_sp
4858 #  define PL_statcache              statcache
4859 #  define PL_stdingv                stdingv
4860 #  define PL_sv_arenaroot           sv_arenaroot
4861 #  define PL_sv_no                  sv_no
4862 #  define PL_sv_undef               sv_undef
4863 #  define PL_sv_yes                 sv_yes
4864 #  define PL_tainted                tainted
4865 #  define PL_tainting               tainting
4866 #  define PL_tokenbuf               tokenbuf
4867 #  define PL_mess_sv                mess_sv
4868 /* Replace: 0 */
4869 #endif
4870
4871 /* Warning: PL_parser
4872  * For perl versions earlier than 5.9.5, this is an always
4873  * non-NULL dummy. Also, it cannot be dereferenced. Don't
4874  * use it if you can avoid it, and unless you absolutely know
4875  * what you're doing.
4876  * If you always check that PL_parser is non-NULL, you can
4877  * define DPPP_PL_parser_NO_DUMMY to avoid the creation of
4878  * a dummy parser structure.
4879  */
4880
4881 #if (PERL_BCDVERSION >= 0x5009005)
4882 # ifdef DPPP_PL_parser_NO_DUMMY
4883 #  define D_PPP_my_PL_parser_var(var) ((PL_parser ? PL_parser : \
4884                 (croak("panic: PL_parser == NULL in %s:%d", \
4885                        __FILE__, __LINE__), (yy_parser *) NULL))->var)
4886 # else
4887 #  ifdef DPPP_PL_parser_NO_DUMMY_WARNING
4888 #   define D_PPP_parser_dummy_warning(var)
4889 #  else
4890 #   define D_PPP_parser_dummy_warning(var) \
4891              warn("warning: dummy PL_" #var " used in %s:%d", __FILE__, __LINE__),
4892 #  endif
4893 #  define D_PPP_my_PL_parser_var(var) ((PL_parser ? PL_parser : \
4894                 (D_PPP_parser_dummy_warning(var) &DPPP_(dummy_PL_parser)))->var)
4895 #if defined(NEED_PL_parser)
4896 static yy_parser DPPP_(dummy_PL_parser);
4897 #elif defined(NEED_PL_parser_GLOBAL)
4898 yy_parser DPPP_(dummy_PL_parser);
4899 #else
4900 extern yy_parser DPPP_(dummy_PL_parser);
4901 #endif
4902
4903 # endif
4904
4905 /* PL_expect, PL_copline, PL_rsfp, PL_rsfp_filters, PL_linestr, PL_bufptr, PL_bufend, PL_lex_state, PL_lex_stuff, PL_tokenbuf depends on PL_parser */
4906 /* Warning: PL_expect, PL_copline, PL_rsfp, PL_rsfp_filters, PL_linestr, PL_bufptr, PL_bufend, PL_lex_state, PL_lex_stuff, PL_tokenbuf
4907  * Do not use this variable unless you know exactly what you're
4908  * doing. It is internal to the perl parser and may change or even
4909  * be removed in the future. As of perl 5.9.5, you have to check
4910  * for (PL_parser != NULL) for this variable to have any effect.
4911  * An always non-NULL PL_parser dummy is provided for earlier
4912  * perl versions.
4913  * If PL_parser is NULL when you try to access this variable, a
4914  * dummy is being accessed instead and a warning is issued unless
4915  * you define DPPP_PL_parser_NO_DUMMY_WARNING.
4916  * If DPPP_PL_parser_NO_DUMMY is defined, the code trying to access
4917  * this variable will croak with a panic message.
4918  */
4919
4920 # define PL_expect         D_PPP_my_PL_parser_var(expect)
4921 # define PL_copline        D_PPP_my_PL_parser_var(copline)
4922 # define PL_rsfp           D_PPP_my_PL_parser_var(rsfp)
4923 # define PL_rsfp_filters   D_PPP_my_PL_parser_var(rsfp_filters)
4924 # define PL_linestr        D_PPP_my_PL_parser_var(linestr)
4925 # define PL_bufptr         D_PPP_my_PL_parser_var(bufptr)
4926 # define PL_bufend         D_PPP_my_PL_parser_var(bufend)
4927 # define PL_lex_state      D_PPP_my_PL_parser_var(lex_state)
4928 # define PL_lex_stuff      D_PPP_my_PL_parser_var(lex_stuff)
4929 # define PL_tokenbuf       D_PPP_my_PL_parser_var(tokenbuf)
4930 # define PL_in_my          D_PPP_my_PL_parser_var(in_my)
4931 # define PL_in_my_stash    D_PPP_my_PL_parser_var(in_my_stash)
4932 # define PL_error_count    D_PPP_my_PL_parser_var(error_count)
4933
4934
4935 #else
4936
4937 /* ensure that PL_parser != NULL and cannot be dereferenced */
4938 # define PL_parser         ((void *) 1)
4939
4940 #endif
4941
4942 #if   (PERL_BCDVERSION <= 0x5003022)
4943 #  undef start_subparse
4944 #  if (PERL_BCDVERSION < 0x5003022)
4945 #ifndef start_subparse
4946 #  define start_subparse(a, b)           Perl_start_subparse()
4947 #endif
4948
4949 #  else
4950 #ifndef start_subparse
4951 #  define start_subparse(a, b)           Perl_start_subparse(b)
4952 #endif
4953
4954 #  endif
4955
4956 #if (PERL_BCDVERSION < 0x5003007)
4957 foo
4958 #endif
4959 #endif
4960
4961 /* Hint: newCONSTSUB
4962  * Returns a CV* as of perl-5.7.1. This return value is not supported
4963  * by Devel::PPPort.
4964  */
4965
4966 /* newCONSTSUB from IO.xs is in the core starting with 5.004_63 */
4967 #if (PERL_BCDVERSION < 0x5004063) && (PERL_BCDVERSION != 0x5004005)
4968
4969 /* And before that, we need to make sure this gets compiled for the functions
4970  * that rely on it */
4971 #define NEED_newCONSTSUB
4972
4973 #if defined(NEED_newCONSTSUB)
4974 static void DPPP_(my_newCONSTSUB)(HV * stash, const char * name, SV * sv);
4975 static
4976 #else
4977 extern void DPPP_(my_newCONSTSUB)(HV * stash, const char * name, SV * sv);
4978 #endif
4979
4980 #if defined(NEED_newCONSTSUB) || defined(NEED_newCONSTSUB_GLOBAL)
4981
4982 #ifdef newCONSTSUB
4983 #  undef newCONSTSUB
4984 #endif
4985 #define newCONSTSUB(a,b,c) DPPP_(my_newCONSTSUB)(aTHX_ a,b,c)
4986 #define Perl_newCONSTSUB DPPP_(my_newCONSTSUB)
4987
4988
4989 /* This is just a trick to avoid a dependency of newCONSTSUB on PL_parser */
4990 /* (There's no PL_parser in perl < 5.005, so this is completely safe)     */
4991 #define D_PPP_PL_copline PL_copline
4992
4993 void
4994 DPPP_(my_newCONSTSUB)(HV *stash, const char *name, SV *sv)
4995 {
4996         U32 oldhints = PL_hints;
4997         HV *old_cop_stash = PL_curcop->cop_stash;
4998         HV *old_curstash = PL_curstash;
4999         line_t oldline = PL_curcop->cop_line;
5000         PL_curcop->cop_line = D_PPP_PL_copline;
5001
5002         PL_hints &= ~HINT_BLOCK_SCOPE;
5003         if (stash)
5004                 PL_curstash = PL_curcop->cop_stash = stash;
5005
5006         newSUB(
5007
5008                 start_subparse(FALSE, 0),
5009
5010                 newSVOP(OP_CONST, 0, newSVpv((char *) name, 0)),
5011                 newSVOP(OP_CONST, 0, &PL_sv_no),   /* SvPV(&PL_sv_no) == "" -- GMB */
5012                 newSTATEOP(0, Nullch, newSVOP(OP_CONST, 0, sv))
5013         );
5014
5015         PL_hints = oldhints;
5016         PL_curcop->cop_stash = old_cop_stash;
5017         PL_curstash = old_curstash;
5018         PL_curcop->cop_line = oldline;
5019 }
5020 #endif
5021 #endif
5022 #ifndef PERL_MAGIC_sv
5023 #  define PERL_MAGIC_sv                  '\0'
5024 #endif
5025
5026 #ifndef PERL_MAGIC_overload
5027 #  define PERL_MAGIC_overload            'A'
5028 #endif
5029
5030 #ifndef PERL_MAGIC_overload_elem
5031 #  define PERL_MAGIC_overload_elem       'a'
5032 #endif
5033
5034 #ifndef PERL_MAGIC_overload_table
5035 #  define PERL_MAGIC_overload_table      'c'
5036 #endif
5037
5038 #ifndef PERL_MAGIC_bm
5039 #  define PERL_MAGIC_bm                  'B'
5040 #endif
5041
5042 #ifndef PERL_MAGIC_regdata
5043 #  define PERL_MAGIC_regdata             'D'
5044 #endif
5045
5046 #ifndef PERL_MAGIC_regdatum
5047 #  define PERL_MAGIC_regdatum            'd'
5048 #endif
5049
5050 #ifndef PERL_MAGIC_env
5051 #  define PERL_MAGIC_env                 'E'
5052 #endif
5053
5054 #ifndef PERL_MAGIC_envelem
5055 #  define PERL_MAGIC_envelem             'e'
5056 #endif
5057
5058 #ifndef PERL_MAGIC_fm
5059 #  define PERL_MAGIC_fm                  'f'
5060 #endif
5061
5062 #ifndef PERL_MAGIC_regex_global
5063 #  define PERL_MAGIC_regex_global        'g'
5064 #endif
5065
5066 #ifndef PERL_MAGIC_isa
5067 #  define PERL_MAGIC_isa                 'I'
5068 #endif
5069
5070 #ifndef PERL_MAGIC_isaelem
5071 #  define PERL_MAGIC_isaelem             'i'
5072 #endif
5073
5074 #ifndef PERL_MAGIC_nkeys
5075 #  define PERL_MAGIC_nkeys               'k'
5076 #endif
5077
5078 #ifndef PERL_MAGIC_dbfile
5079 #  define PERL_MAGIC_dbfile              'L'
5080 #endif
5081
5082 #ifndef PERL_MAGIC_dbline
5083 #  define PERL_MAGIC_dbline              'l'
5084 #endif
5085
5086 #ifndef PERL_MAGIC_mutex
5087 #  define PERL_MAGIC_mutex               'm'
5088 #endif
5089
5090 #ifndef PERL_MAGIC_shared
5091 #  define PERL_MAGIC_shared              'N'
5092 #endif
5093
5094 #ifndef PERL_MAGIC_shared_scalar
5095 #  define PERL_MAGIC_shared_scalar       'n'
5096 #endif
5097
5098 #ifndef PERL_MAGIC_collxfrm
5099 #  define PERL_MAGIC_collxfrm            'o'
5100 #endif
5101
5102 #ifndef PERL_MAGIC_tied
5103 #  define PERL_MAGIC_tied                'P'
5104 #endif
5105
5106 #ifndef PERL_MAGIC_tiedelem
5107 #  define PERL_MAGIC_tiedelem            'p'
5108 #endif
5109
5110 #ifndef PERL_MAGIC_tiedscalar
5111 #  define PERL_MAGIC_tiedscalar          'q'
5112 #endif
5113
5114 #ifndef PERL_MAGIC_qr
5115 #  define PERL_MAGIC_qr                  'r'
5116 #endif
5117
5118 #ifndef PERL_MAGIC_sig
5119 #  define PERL_MAGIC_sig                 'S'
5120 #endif
5121
5122 #ifndef PERL_MAGIC_sigelem
5123 #  define PERL_MAGIC_sigelem             's'
5124 #endif
5125
5126 #ifndef PERL_MAGIC_taint
5127 #  define PERL_MAGIC_taint               't'
5128 #endif
5129
5130 #ifndef PERL_MAGIC_uvar
5131 #  define PERL_MAGIC_uvar                'U'
5132 #endif
5133
5134 #ifndef PERL_MAGIC_uvar_elem
5135 #  define PERL_MAGIC_uvar_elem           'u'
5136 #endif
5137
5138 #ifndef PERL_MAGIC_vstring
5139 #  define PERL_MAGIC_vstring             'V'
5140 #endif
5141
5142 #ifndef PERL_MAGIC_vec
5143 #  define PERL_MAGIC_vec                 'v'
5144 #endif
5145
5146 #ifndef PERL_MAGIC_utf8
5147 #  define PERL_MAGIC_utf8                'w'
5148 #endif
5149
5150 #ifndef PERL_MAGIC_substr
5151 #  define PERL_MAGIC_substr              'x'
5152 #endif
5153
5154 #ifndef PERL_MAGIC_defelem
5155 #  define PERL_MAGIC_defelem             'y'
5156 #endif
5157
5158 #ifndef PERL_MAGIC_glob
5159 #  define PERL_MAGIC_glob                '*'
5160 #endif
5161
5162 #ifndef PERL_MAGIC_arylen
5163 #  define PERL_MAGIC_arylen              '#'
5164 #endif
5165
5166 #ifndef PERL_MAGIC_pos
5167 #  define PERL_MAGIC_pos                 '.'
5168 #endif
5169
5170 #ifndef PERL_MAGIC_backref
5171 #  define PERL_MAGIC_backref             '<'
5172 #endif
5173
5174 #ifndef PERL_MAGIC_ext
5175 #  define PERL_MAGIC_ext                 '~'
5176 #endif
5177 #ifndef cBOOL
5178 #  define cBOOL(cbool)                   ((cbool) ? (bool)1 : (bool)0)
5179 #endif
5180
5181 #ifndef OpHAS_SIBLING
5182 #  define OpHAS_SIBLING(o)               (cBOOL((o)->op_sibling))
5183 #endif
5184
5185 #ifndef OpSIBLING
5186 #  define OpSIBLING(o)                   (0 + (o)->op_sibling)
5187 #endif
5188
5189 #ifndef OpMORESIB_set
5190 #  define OpMORESIB_set(o, sib)          ((o)->op_sibling = (sib))
5191 #endif
5192
5193 #ifndef OpLASTSIB_set
5194 #  define OpLASTSIB_set(o, parent)       ((o)->op_sibling = NULL)
5195 #endif
5196
5197 #ifndef OpMAYBESIB_set
5198 #  define OpMAYBESIB_set(o, sib, parent) ((o)->op_sibling = (sib))
5199 #endif
5200
5201 #ifndef HEf_SVKEY
5202 #  define HEf_SVKEY                      -2
5203 #endif
5204
5205 #if defined(DEBUGGING) && !defined(__COVERITY__)
5206 #ifndef __ASSERT_
5207 #  define __ASSERT_(statement)           assert(statement),
5208 #endif
5209
5210 #else
5211 #ifndef __ASSERT_
5212 #  define __ASSERT_(statement)
5213 #endif
5214
5215 #endif
5216
5217 #ifndef WIDEST_UTYPE
5218 # ifdef QUADKIND
5219 #  ifdef U64TYPE
5220 #   define WIDEST_UTYPE U64TYPE
5221 #  else
5222 #   define WIDEST_UTYPE unsigned Quad_t
5223 #  endif
5224 # else
5225 #  define WIDEST_UTYPE U32
5226 # endif
5227 #endif
5228
5229 /* These could become provided if/when they become part of the public API */
5230 #ifndef withinCOUNT
5231 #  define withinCOUNT(c, l, n)           \
5232    (((WIDEST_UTYPE) (((c)) - ((l) | 0))) <= (((WIDEST_UTYPE) ((n) | 0))))
5233 #endif
5234
5235 #ifndef inRANGE
5236 #  define inRANGE(c, l, u)               \
5237    (  (sizeof(c) == sizeof(U8))  ? withinCOUNT(((U8)  (c)), (l), ((u) - (l)))  \
5238     : (sizeof(c) == sizeof(U16)) ? withinCOUNT(((U16) (c)), (l), ((u) - (l)))  \
5239     : (sizeof(c) == sizeof(U32)) ? withinCOUNT(((U32) (c)), (l), ((u) - (l)))  \
5240     : (withinCOUNT(((WIDEST_UTYPE) (c)), (l), ((u) - (l)))))
5241 #endif
5242
5243 /* The '| 0' part ensures a compiler error if c is not integer (like e.g., a
5244  * pointer) */
5245 #undef FITS_IN_8_BITS   /* handy.h version uses a core-only constant */
5246 #ifndef FITS_IN_8_BITS
5247 #  define FITS_IN_8_BITS(c)              (   (sizeof(c) == 1)               \
5248                                     || !(((WIDEST_UTYPE)((c) | 0)) & ~0xFF))
5249 #endif
5250
5251 /* Create the macro for "is'macro'_utf8_safe(s, e)".  For code points below
5252  * 256, it calls the equivalent _L1 macro by converting the UTF-8 to code
5253  * point.  That is so that it can automatically get the bug fixes done in this
5254  * file. */
5255 #define D_PPP_IS_GENERIC_UTF8_SAFE(s, e, macro)                             \
5256    (((e) - (s)) <= 0                                                        \
5257      ? 0                                                                    \
5258      : UTF8_IS_INVARIANT((s)[0])                                            \
5259        ? is ## macro ## _L1((s)[0])                                         \
5260        : (((e) - (s)) < UTF8SKIP(s))                                        \
5261           ? 0                                                               \
5262           : UTF8_IS_DOWNGRADEABLE_START((s)[0])                             \
5263               /* The cast in the line below is only to silence warnings */  \
5264             ? is ## macro ## _L1((WIDEST_UTYPE) LATIN1_TO_NATIVE(           \
5265                                   UTF8_ACCUMULATE(NATIVE_UTF8_TO_I8((s)[0]) \
5266                                                      & UTF_START_MASK(2),   \
5267                                                   (s)[1])))                 \
5268             : is ## macro ## _utf8(s))
5269
5270 /* Create the macro for "is'macro'_LC_utf8_safe(s, e)".  For code points below
5271  * 256, it calls the equivalent _L1 macro by converting the UTF-8 to code
5272  * point.  That is so that it can automatically get the bug fixes done in this
5273  * file. */
5274 #define D_PPP_IS_GENERIC_LC_UTF8_SAFE(s, e, macro)                          \
5275    (((e) - (s)) <= 0                                                        \
5276      ? 0                                                                    \
5277      : UTF8_IS_INVARIANT((s)[0])                                            \
5278        ? is ## macro ## _LC((s)[0])                                         \
5279        : (((e) - (s)) < UTF8SKIP(s))                                        \
5280           ? 0                                                               \
5281           : UTF8_IS_DOWNGRADEABLE_START((s)[0])                             \
5282               /* The cast in the line below is only to silence warnings */  \
5283             ? is ## macro ## _LC((WIDEST_UTYPE) LATIN1_TO_NATIVE(           \
5284                                   UTF8_ACCUMULATE(NATIVE_UTF8_TO_I8((s)[0]) \
5285                                                      & UTF_START_MASK(2),   \
5286                                                   (s)[1])))                 \
5287             : is ## macro ## _utf8(s))
5288
5289 /* A few of the early functions are broken.  For these and the non-LC case,
5290  * machine generated code is substituted.  But that code doesn't work for
5291  * locales.  This is just like the above macro, but at the end, we call the
5292  * macro we've generated for the above 255 case, which is correct since locale
5293  * isn't involved.  This will generate extra code to handle the 0-255 inputs,
5294  * but hopefully it will be optimized out by the C compiler.  But just in case
5295  * it isn't, this macro is only used on the few versions that are broken */
5296
5297 #define D_PPP_IS_GENERIC_LC_UTF8_SAFE_BROKEN(s, e, macro)                   \
5298    (((e) - (s)) <= 0                                                        \
5299      ? 0                                                                    \
5300      : UTF8_IS_INVARIANT((s)[0])                                            \
5301        ? is ## macro ## _LC((s)[0])                                         \
5302        : (((e) - (s)) < UTF8SKIP(s))                                        \
5303           ? 0                                                               \
5304           : UTF8_IS_DOWNGRADEABLE_START((s)[0])                             \
5305               /* The cast in the line below is only to silence warnings */  \
5306             ? is ## macro ## _LC((WIDEST_UTYPE) LATIN1_TO_NATIVE(           \
5307                                   UTF8_ACCUMULATE(NATIVE_UTF8_TO_I8((s)[0]) \
5308                                                      & UTF_START_MASK(2),   \
5309                                                   (s)[1])))                 \
5310             : is ## macro ## _utf8_safe(s, e))
5311 #ifndef SvRX
5312 #  define SvRX(rv)                       (SvROK((rv)) ? (SvMAGICAL(SvRV((rv))) ? (mg_find(SvRV((rv)), PERL_MAGIC_qr) ? mg_find(SvRV((rv)), PERL_MAGIC_qr)->mg_obj : NULL) : NULL) : NULL)
5313 #endif
5314
5315 #ifndef SvRXOK
5316 #  define SvRXOK(sv)                     (!!SvRX(sv))
5317 #endif
5318
5319 #ifndef PERL_UNUSED_DECL
5320 #  ifdef HASATTRIBUTE
5321 #    if (defined(__GNUC__) && defined(__cplusplus)) || defined(__INTEL_COMPILER)
5322 #      define PERL_UNUSED_DECL
5323 #    else
5324 #      define PERL_UNUSED_DECL __attribute__((unused))
5325 #    endif
5326 #  else
5327 #    define PERL_UNUSED_DECL
5328 #  endif
5329 #endif
5330
5331 #ifndef PERL_UNUSED_ARG
5332 #  if defined(lint) && defined(S_SPLINT_S) /* www.splint.org */
5333 #    include <note.h>
5334 #    define PERL_UNUSED_ARG(x) NOTE(ARGUNUSED(x))
5335 #  else
5336 #    define PERL_UNUSED_ARG(x) ((void)x)
5337 #  endif
5338 #endif
5339
5340 #ifndef PERL_UNUSED_VAR
5341 #  define PERL_UNUSED_VAR(x) ((void)x)
5342 #endif
5343
5344 #ifndef PERL_UNUSED_CONTEXT
5345 #  ifdef USE_ITHREADS
5346 #    define PERL_UNUSED_CONTEXT PERL_UNUSED_ARG(my_perl)
5347 #  else
5348 #    define PERL_UNUSED_CONTEXT
5349 #  endif
5350 #endif
5351
5352 #ifndef PERL_UNUSED_RESULT
5353 #  if defined(__GNUC__) && defined(HASATTRIBUTE_WARN_UNUSED_RESULT)
5354 #    define PERL_UNUSED_RESULT(v) STMT_START { __typeof__(v) z = (v); (void)sizeof(z); } STMT_END
5355 #  else
5356 #    define PERL_UNUSED_RESULT(v) ((void)(v))
5357 #  endif
5358 #endif
5359 #ifndef NOOP
5360 #  define NOOP                           /*EMPTY*/(void)0
5361 #endif
5362
5363 #ifndef dNOOP
5364 #  define dNOOP                          extern int /*@unused@*/ Perl___notused PERL_UNUSED_DECL
5365 #endif
5366
5367 #ifndef NVTYPE
5368 #  if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE)
5369 #    define NVTYPE long double
5370 #  else
5371 #    define NVTYPE double
5372 #  endif
5373 typedef NVTYPE NV;
5374 #endif
5375
5376 #ifndef INT2PTR
5377 #  if (IVSIZE == PTRSIZE) && (UVSIZE == PTRSIZE)
5378 #    define PTRV                  UV
5379 #    define INT2PTR(any,d)        (any)(d)
5380 #  else
5381 #    if PTRSIZE == LONGSIZE
5382 #      define PTRV                unsigned long
5383 #    else
5384 #      define PTRV                unsigned
5385 #    endif
5386 #    define INT2PTR(any,d)        (any)(PTRV)(d)
5387 #  endif
5388 #endif
5389
5390 #ifndef PTR2ul
5391 #  if PTRSIZE == LONGSIZE
5392 #    define PTR2ul(p)     (unsigned long)(p)
5393 #  else
5394 #    define PTR2ul(p)     INT2PTR(unsigned long,p)
5395 #  endif
5396 #endif
5397 #ifndef PTR2nat
5398 #  define PTR2nat(p)                     (PTRV)(p)
5399 #endif
5400
5401 #ifndef NUM2PTR
5402 #  define NUM2PTR(any,d)                 (any)PTR2nat(d)
5403 #endif
5404
5405 #ifndef PTR2IV
5406 #  define PTR2IV(p)                      INT2PTR(IV,p)
5407 #endif
5408
5409 #ifndef PTR2UV
5410 #  define PTR2UV(p)                      INT2PTR(UV,p)
5411 #endif
5412
5413 #ifndef PTR2NV
5414 #  define PTR2NV(p)                      NUM2PTR(NV,p)
5415 #endif
5416
5417 #undef START_EXTERN_C
5418 #undef END_EXTERN_C
5419 #undef EXTERN_C
5420 #ifdef __cplusplus
5421 #  define START_EXTERN_C extern "C" {
5422 #  define END_EXTERN_C }
5423 #  define EXTERN_C extern "C"
5424 #else
5425 #  define START_EXTERN_C
5426 #  define END_EXTERN_C
5427 #  define EXTERN_C extern
5428 #endif
5429
5430 #if (PERL_BCDVERSION < 0x5004000) || defined(PERL_GCC_PEDANTIC)
5431 #  ifndef PERL_GCC_BRACE_GROUPS_FORBIDDEN
5432 #ifndef PERL_GCC_BRACE_GROUPS_FORBIDDEN
5433 #  define PERL_GCC_BRACE_GROUPS_FORBIDDEN
5434 #endif
5435
5436 #  endif
5437 #endif
5438
5439 #if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN) && !defined(__cplusplus)
5440 #  ifndef PERL_USE_GCC_BRACE_GROUPS
5441 #    define PERL_USE_GCC_BRACE_GROUPS
5442 #  endif
5443 #endif
5444
5445 #undef STMT_START
5446 #undef STMT_END
5447 #ifdef PERL_USE_GCC_BRACE_GROUPS
5448 #  define STMT_START    (void)( /* gcc supports ``({ STATEMENTS; })'' */
5449 #  define STMT_END      )
5450 #else
5451 #  if defined(VOIDFLAGS) && (VOIDFLAGS) && (defined(sun) || defined(__sun__)) && !defined(__GNUC__)
5452 #    define STMT_START  if (1)
5453 #    define STMT_END    else (void)0
5454 #  else
5455 #    define STMT_START  do
5456 #    define STMT_END    while (0)
5457 #  endif
5458 #endif
5459 #ifndef boolSV
5460 #  define boolSV(b)                      ((b) ? &PL_sv_yes : &PL_sv_no)
5461 #endif
5462
5463 /* DEFSV appears first in 5.004_56 */
5464 #ifndef DEFSV
5465 #  define DEFSV                          GvSV(PL_defgv)
5466 #endif
5467
5468 #ifndef SAVE_DEFSV
5469 #  define SAVE_DEFSV                     SAVESPTR(GvSV(PL_defgv))
5470 #endif
5471
5472 #ifndef DEFSV_set
5473 #  define DEFSV_set(sv)                  (DEFSV = (sv))
5474 #endif
5475
5476 /* Older perls (<=5.003) lack AvFILLp */
5477 #ifndef AvFILLp
5478 #  define AvFILLp                        AvFILL
5479 #endif
5480 #ifndef av_tindex
5481 #  define av_tindex                      AvFILL
5482 #endif
5483
5484 #ifndef av_top_index
5485 #  define av_top_index                   AvFILL
5486 #endif
5487 #ifndef ERRSV
5488 #  define ERRSV                          get_sv("@",FALSE)
5489 #endif
5490
5491 /* Hint: gv_stashpvn
5492  * This function's backport doesn't support the length parameter, but
5493  * rather ignores it. Portability can only be ensured if the length
5494  * parameter is used for speed reasons, but the length can always be
5495  * correctly computed from the string argument.
5496  */
5497 #ifndef gv_stashpvn
5498 #  define gv_stashpvn(str,len,create)    gv_stashpv(str,create)
5499 #endif
5500
5501 /* Replace: 1 */
5502 #ifndef get_cv
5503 #  define get_cv                         perl_get_cv
5504 #endif
5505
5506 #ifndef get_sv
5507 #  define get_sv                         perl_get_sv
5508 #endif
5509
5510 #ifndef get_av
5511 #  define get_av                         perl_get_av
5512 #endif
5513
5514 #ifndef get_hv
5515 #  define get_hv                         perl_get_hv
5516 #endif
5517
5518 /* Replace: 0 */
5519 #ifndef dUNDERBAR
5520 #  define dUNDERBAR                      dNOOP
5521 #endif
5522
5523 #ifndef UNDERBAR
5524 #  define UNDERBAR                       DEFSV
5525 #endif
5526 #ifndef dAX
5527 #  define dAX                            I32 ax = MARK - PL_stack_base + 1
5528 #endif
5529
5530 #ifndef dITEMS
5531 #  define dITEMS                         I32 items = SP - MARK
5532 #endif
5533 #ifndef dXSTARG
5534 #  define dXSTARG                        SV * targ = sv_newmortal()
5535 #endif
5536 #ifndef dAXMARK
5537 #  define dAXMARK                        I32 ax = POPMARK; \
5538                                register SV ** const mark = PL_stack_base + ax++
5539 #endif
5540 #ifndef XSprePUSH
5541 #  define XSprePUSH                      (sp = PL_stack_base + ax - 1)
5542 #endif
5543
5544 #if (PERL_BCDVERSION < 0x5005000)
5545 #  undef XSRETURN
5546 #  define XSRETURN(off)                                   \
5547       STMT_START {                                        \
5548           PL_stack_sp = PL_stack_base + ax + ((off) - 1); \
5549           return;                                         \
5550       } STMT_END
5551 #endif
5552 #ifndef XSPROTO
5553 #  define XSPROTO(name)                  void name(pTHX_ CV* cv)
5554 #endif
5555
5556 #ifndef SVfARG
5557 #  define SVfARG(p)                      ((void*)(p))
5558 #endif
5559 #ifndef PERL_ABS
5560 #  define PERL_ABS(x)                    ((x) < 0 ? -(x) : (x))
5561 #endif
5562 #ifndef dVAR
5563 #  define dVAR                           dNOOP
5564 #endif
5565 #ifndef SVf
5566 #  define SVf                            "_"
5567 #endif
5568 #ifndef CPERLscope
5569 #  define CPERLscope(x)                  x
5570 #endif
5571 #ifndef PERL_HASH
5572 #  define PERL_HASH(hash,str,len)        \
5573      STMT_START { \
5574         const char *s_PeRlHaSh = str; \
5575         I32 i_PeRlHaSh = len; \
5576         U32 hash_PeRlHaSh = 0; \
5577         while (i_PeRlHaSh--) \
5578             hash_PeRlHaSh = hash_PeRlHaSh * 33 + *s_PeRlHaSh++; \
5579         (hash) = hash_PeRlHaSh; \
5580     } STMT_END
5581 #endif
5582
5583 #ifndef PERLIO_FUNCS_DECL
5584 # ifdef PERLIO_FUNCS_CONST
5585 #  define PERLIO_FUNCS_DECL(funcs) const PerlIO_funcs funcs
5586 #  define PERLIO_FUNCS_CAST(funcs) (PerlIO_funcs*)(funcs)
5587 # else
5588 #  define PERLIO_FUNCS_DECL(funcs) PerlIO_funcs funcs
5589 #  define PERLIO_FUNCS_CAST(funcs) (funcs)
5590 # endif
5591 #endif
5592
5593 /* provide these typedefs for older perls */
5594 #if (PERL_BCDVERSION < 0x5009003)
5595
5596 # ifdef ARGSproto
5597 typedef OP* (CPERLscope(*Perl_ppaddr_t))(ARGSproto);
5598 # else
5599 typedef OP* (CPERLscope(*Perl_ppaddr_t))(pTHX);
5600 # endif
5601
5602 typedef OP* (CPERLscope(*Perl_check_t)) (pTHX_ OP*);
5603
5604 #endif
5605
5606 /* On versions without NATIVE_TO_ASCII, only ASCII is supported */
5607 #if defined(EBCDIC) && defined(NATIVE_TO_ASCI)
5608 #ifndef NATIVE_TO_LATIN1
5609 #  define NATIVE_TO_LATIN1(c)            NATIVE_TO_ASCII(c)
5610 #endif
5611
5612 #ifndef LATIN1_TO_NATIVE
5613 #  define LATIN1_TO_NATIVE(c)            ASCII_TO_NATIVE(c)
5614 #endif
5615
5616 #ifndef NATIVE_TO_UNI
5617 #  define NATIVE_TO_UNI(c)               ((c) > 255 ? (c) : NATIVE_TO_LATIN1(c))
5618 #endif
5619
5620 #ifndef UNI_TO_NATIVE
5621 #  define UNI_TO_NATIVE(c)               ((c) > 255 ? (c) : LATIN1_TO_NATIVE(c))
5622 #endif
5623
5624 #else
5625 #ifndef NATIVE_TO_LATIN1
5626 #  define NATIVE_TO_LATIN1(c)            (c)
5627 #endif
5628
5629 #ifndef LATIN1_TO_NATIVE
5630 #  define LATIN1_TO_NATIVE(c)            (c)
5631 #endif
5632
5633 #ifndef NATIVE_TO_UNI
5634 #  define NATIVE_TO_UNI(c)               (c)
5635 #endif
5636
5637 #ifndef UNI_TO_NATIVE
5638 #  define UNI_TO_NATIVE(c)               (c)
5639 #endif
5640
5641 #endif
5642
5643 /* Warning: LATIN1_TO_NATIVE, NATIVE_TO_LATIN1 NATIVE_TO_UNI UNI_TO_NATIVE
5644    EBCDIC is not supported on versions earlier than 5.7.1
5645  */
5646
5647 /* The meaning of this changed; use the modern version */
5648 #undef isPSXSPC
5649 #undef isPSXSPC_A
5650 #undef isPSXSPC_L1
5651
5652 /* Hint: isPSXSPC, isPSXSPC_A, isPSXSPC_L1, isPSXSPC_utf8_safe
5653     This is equivalent to the corresponding isSPACE-type macro.  On perls
5654     before 5.18, this matched a vertical tab and SPACE didn't.  But the
5655     ppport.h SPACE version does match VT in all perl releases.  Since VT's are
5656     extremely rarely found in real-life files, this difference effectively
5657     doesn't matter */
5658
5659 /* Hint: isSPACE, isSPACE_A, isSPACE_L1, isSPACE_utf8_safe
5660     Until Perl 5.18, this did not match the vertical tab (VT).  The ppport.h
5661     version does match it in all perl releases. Since VT's are extremely rarely
5662     found in real-life files, this difference effectively doesn't matter */
5663
5664 #ifdef EBCDIC
5665
5666 /* This is the first version where these macros are fully correct on EBCDIC
5667  * platforms.  Relying on * the C library functions, as earlier releases did,
5668  * causes problems with * locales */
5669 # if (PERL_BCDVERSION < 0x5022000)
5670 #  undef isALNUM
5671 #  undef isALNUM_A
5672 #  undef isALNUM_L1
5673 #  undef isALNUMC
5674 #  undef isALNUMC_A
5675 #  undef isALNUMC_L1
5676 #  undef isALPHA
5677 #  undef isALPHA_A
5678 #  undef isALPHA_L1
5679 #  undef isALPHANUMERIC
5680 #  undef isALPHANUMERIC_A
5681 #  undef isALPHANUMERIC_L1
5682 #  undef isASCII
5683 #  undef isASCII_A
5684 #  undef isASCII_L1
5685 #  undef isBLANK
5686 #  undef isBLANK_A
5687 #  undef isBLANK_L1
5688 #  undef isCNTRL
5689 #  undef isCNTRL_A
5690 #  undef isCNTRL_L1
5691 #  undef isDIGIT
5692 #  undef isDIGIT_A
5693 #  undef isDIGIT_L1
5694 #  undef isGRAPH
5695 #  undef isGRAPH_A
5696 #  undef isGRAPH_L1
5697 #  undef isIDCONT
5698 #  undef isIDCONT_A
5699 #  undef isIDCONT_L1
5700 #  undef isIDFIRST
5701 #  undef isIDFIRST_A
5702 #  undef isIDFIRST_L1
5703 #  undef isLOWER
5704 #  undef isLOWER_A
5705 #  undef isLOWER_L1
5706 #  undef isOCTAL
5707 #  undef isOCTAL_A
5708 #  undef isOCTAL_L1
5709 #  undef isPRINT
5710 #  undef isPRINT_A
5711 #  undef isPRINT_L1
5712 #  undef isPUNCT
5713 #  undef isPUNCT_A
5714 #  undef isPUNCT_L1
5715 #  undef isSPACE
5716 #  undef isSPACE_A
5717 #  undef isSPACE_L1
5718 #  undef isUPPER
5719 #  undef isUPPER_A
5720 #  undef isUPPER_L1
5721 #  undef isWORDCHAR
5722 #  undef isWORDCHAR_A
5723 #  undef isWORDCHAR_L1
5724 #  undef isXDIGIT
5725 #  undef isXDIGIT_A
5726 #  undef isXDIGIT_L1
5727 # endif
5728 #ifndef isASCII
5729 #  define isASCII(c)                     (isCNTRL(c) || isPRINT(c))
5730 #endif
5731
5732         /* The below is accurate for all EBCDIC code pages supported by
5733          * all the versions of Perl overridden by this */
5734 #ifndef isCNTRL
5735 #  define isCNTRL(c)                     (    (c) == '\0' || (c) == '\a' || (c) == '\b'      \
5736                              ||  (c) == '\f' || (c) == '\n' || (c) == '\r'      \
5737                              ||  (c) == '\t' || (c) == '\v'                     \
5738                              || ((c) <= 3 && (c) >= 1) /* SOH, STX, ETX */      \
5739                              ||  (c) == 7    /* U+7F DEL */                     \
5740                              || ((c) <= 0x13 && (c) >= 0x0E) /* SO, SI */       \
5741                                                       /* DLE, DC[1-3] */        \
5742                              ||  (c) == 0x18 /* U+18 CAN */                     \
5743                              ||  (c) == 0x19 /* U+19 EOM */                     \
5744                              || ((c) <= 0x1F && (c) >= 0x1C) /* [FGRU]S */      \
5745                              ||  (c) == 0x26 /* U+17 ETB */                     \
5746                              ||  (c) == 0x27 /* U+1B ESC */                     \
5747                              ||  (c) == 0x2D /* U+05 ENQ */                     \
5748                              ||  (c) == 0x2E /* U+06 ACK */                     \
5749                              ||  (c) == 0x32 /* U+16 SYN */                     \
5750                              ||  (c) == 0x37 /* U+04 EOT */                     \
5751                              ||  (c) == 0x3C /* U+14 DC4 */                     \
5752                              ||  (c) == 0x3D /* U+15 NAK */                     \
5753                              ||  (c) == 0x3F /* U+1A SUB */                     \
5754                             )
5755 #endif
5756
5757 #if '^' == 106    /* EBCDIC POSIX-BC */
5758 #  define D_PPP_OUTLIER_CONTROL 0x5F
5759 #else   /* EBCDIC 1047 037 */
5760 #  define D_PPP_OUTLIER_CONTROL 0xFF
5761 #endif
5762
5763 /* The controls are everything below blank, plus one outlier */
5764 #ifndef isCNTRL_L1
5765 #  define isCNTRL_L1(c)                  ((WIDEST_UTYPE) (c) < ' '                           \
5766                           || (WIDEST_UTYPE) (c) == D_PPP_OUTLIER_CONTROL)
5767 #endif
5768
5769 /* The ordering of the tests in this and isUPPER are to exclude most characters
5770  * early */
5771 #ifndef isLOWER
5772 #  define isLOWER(c)                     (        (c) >= 'a' && (c) <= 'z'                   \
5773                              &&  (   (c) <= 'i'                                 \
5774                                  || ((c) >= 'j' && (c) <= 'r')                  \
5775                                  ||  (c) >= 's'))
5776 #endif
5777
5778 #ifndef isUPPER
5779 #  define isUPPER(c)                     (        (c) >= 'A' && (c) <= 'Z'                   \
5780                              && (    (c) <= 'I'                                 \
5781                                  || ((c) >= 'J' && (c) <= 'R')                  \
5782                                  ||  (c) >= 'S'))
5783 #endif
5784
5785 #else   /* Above is EBCDIC; below is ASCII */
5786
5787 # if (PERL_BCDVERSION < 0x5004000)
5788 /* The implementation of these in older perl versions can give wrong results if
5789  * the C program locale is set to other than the C locale */
5790 #  undef isALNUM
5791 #  undef isALNUM_A
5792 #  undef isALPHA
5793 #  undef isALPHA_A
5794 #  undef isDIGIT
5795 #  undef isDIGIT_A
5796 #  undef isIDFIRST
5797 #  undef isIDFIRST_A
5798 #  undef isLOWER
5799 #  undef isLOWER_A
5800 #  undef isUPPER
5801 #  undef isUPPER_A
5802 # endif
5803
5804 #  if (PERL_BCDVERSION == 0x5007000) /* this perl made space GRAPH */
5805 #    undef isGRAPH
5806 #  endif
5807
5808 # if (PERL_BCDVERSION < 0x5008000) /* earlier perls omitted DEL */
5809 #  undef isCNTRL
5810 # endif
5811
5812 # if (PERL_BCDVERSION < 0x5010000)
5813 /* earlier perls included all of the isSPACE() characters, which is wrong. The
5814  * version provided by Devel::PPPort always overrides an existing buggy
5815  * version. */
5816 #  undef isPRINT
5817 #  undef isPRINT_A
5818 # endif
5819
5820 # if (PERL_BCDVERSION < 0x5014000)
5821 /* earlier perls always returned true if the parameter was a signed char */
5822 #  undef isASCII
5823 #  undef isASCII_A
5824 # endif
5825
5826 # if (PERL_BCDVERSION < 0x5017008) /* earlier perls didn't include PILCROW, SECTION SIGN */
5827 #  undef isPUNCT_L1
5828 # endif
5829
5830 # if (PERL_BCDVERSION < 0x5013007) /* khw didn't investigate why this failed */
5831 #  undef isALNUMC_L1
5832 #endif
5833
5834 # if (PERL_BCDVERSION < 0x5020000) /* earlier perls didn't include \v */
5835 #  undef isSPACE
5836 #  undef isSPACE_A
5837 #  undef isSPACE_L1
5838
5839 # endif
5840 #ifndef isASCII
5841 #  define isASCII(c)                     ((WIDEST_UTYPE) (c) <= 127)
5842 #endif
5843
5844 #ifndef isCNTRL
5845 #  define isCNTRL(c)                     ((WIDEST_UTYPE) (c) < ' ' || (c) == 127)
5846 #endif
5847
5848 #ifndef isCNTRL_L1
5849 #  define isCNTRL_L1(c)                  (isCNTRL(c) || (   (WIDEST_UTYPE) (c) <= 0x9F  \
5850                                                 && (WIDEST_UTYPE) (c) >= 0x80))
5851 #endif
5852
5853 #ifndef isLOWER
5854 #  define isLOWER(c)                     ((c) >= 'a' && (c) <= 'z')
5855 #endif
5856
5857 #ifndef isUPPER
5858 #  define isUPPER(c)                     ((c) <= 'Z' && (c) >= 'A')
5859 #endif
5860
5861 #endif /* Below are definitions common to EBCDIC and ASCII */
5862 #ifndef isASCII_L1
5863 #  define isASCII_L1(c)                  isASCII(c)
5864 #endif
5865
5866 #ifndef isASCII_LC
5867 #  define isASCII_LC(c)                  isASCII(c)
5868 #endif
5869
5870 #ifndef isALNUM
5871 #  define isALNUM(c)                     isWORDCHAR(c)
5872 #endif
5873
5874 #ifndef isALNUMC
5875 #  define isALNUMC(c)                    isALPHANUMERIC(c)
5876 #endif
5877
5878 #ifndef isALNUMC_L1
5879 #  define isALNUMC_L1(c)                 isALPHANUMERIC_L1(c)
5880 #endif
5881
5882 #ifndef isALPHA
5883 #  define isALPHA(c)                     (isUPPER(c) || isLOWER(c))
5884 #endif
5885
5886 #ifndef isALPHA_L1
5887 #  define isALPHA_L1(c)                  (isUPPER_L1(c) || isLOWER_L1(c))
5888 #endif
5889
5890 #ifndef isALPHANUMERIC
5891 #  define isALPHANUMERIC(c)              (isALPHA(c) || isDIGIT(c))
5892 #endif
5893
5894 #ifndef isALPHANUMERIC_L1
5895 #  define isALPHANUMERIC_L1(c)           (isALPHA_L1(c) || isDIGIT(c))
5896 #endif
5897
5898 #ifndef isALPHANUMERIC_LC
5899 #  define isALPHANUMERIC_LC(c)           (isALPHA_LC(c) || isDIGIT_LC(c))
5900 #endif
5901
5902 #ifndef isBLANK
5903 #  define isBLANK(c)                     ((c) == ' ' || (c) == '\t')
5904 #endif
5905
5906 #ifndef isBLANK_L1
5907 #  define isBLANK_L1(c)                  (    isBLANK(c)                                    \
5908                              || (   FITS_IN_8_BITS(c)                          \
5909                                  && NATIVE_TO_LATIN1((U8) c) == 0xA0))
5910 #endif
5911
5912 #ifndef isBLANK_LC
5913 #  define isBLANK_LC(c)                  isBLANK(c)
5914 #endif
5915
5916 #ifndef isDIGIT
5917 #  define isDIGIT(c)                     inRANGE(c, '0', '9')
5918 #endif
5919
5920 #ifndef isDIGIT_L1
5921 #  define isDIGIT_L1(c)                  isDIGIT(c)
5922 #endif
5923
5924 #ifndef isGRAPH
5925 #  define isGRAPH(c)                     (isWORDCHAR(c) || isPUNCT(c))
5926 #endif
5927
5928 #ifndef isGRAPH_L1
5929 #  define isGRAPH_L1(c)                  (   isPRINT_L1(c)                              \
5930                                  && (c) != ' '                                 \
5931                                  && NATIVE_TO_LATIN1((U8) c) != 0xA0)
5932 #endif
5933
5934 #ifndef isIDCONT
5935 #  define isIDCONT(c)                    isWORDCHAR(c)
5936 #endif
5937
5938 #ifndef isIDCONT_L1
5939 #  define isIDCONT_L1(c)                 isWORDCHAR_L1(c)
5940 #endif
5941
5942 #ifndef isIDCONT_LC
5943 #  define isIDCONT_LC(c)                 isWORDCHAR_LC(c)
5944 #endif
5945
5946 #ifndef isIDFIRST
5947 #  define isIDFIRST(c)                   (isALPHA(c) || (c) == '_')
5948 #endif
5949
5950 #ifndef isIDFIRST_L1
5951 #  define isIDFIRST_L1(c)                (isALPHA_L1(c) || (U8) (c) == '_')
5952 #endif
5953
5954 #ifndef isIDFIRST_LC
5955 #  define isIDFIRST_LC(c)                (isALPHA_LC(c) || (U8) (c) == '_')
5956 #endif
5957
5958 #ifndef isLOWER_L1
5959 #  define isLOWER_L1(c)                  (    isLOWER(c)                                    \
5960                              || (   FITS_IN_8_BITS(c)                          \
5961                                  && (  (   NATIVE_TO_LATIN1((U8) c) >= 0xDF    \
5962                                         && NATIVE_TO_LATIN1((U8) c) != 0xF7)   \
5963                                      || NATIVE_TO_LATIN1((U8) c) == 0xAA       \
5964                                      || NATIVE_TO_LATIN1((U8) c) == 0xBA       \
5965                                      || NATIVE_TO_LATIN1((U8) c) == 0xB5)))
5966 #endif
5967
5968 #ifndef isOCTAL
5969 #  define isOCTAL(c)                     (((WIDEST_UTYPE)((c)) & ~7) == '0')
5970 #endif
5971
5972 #ifndef isOCTAL_L1
5973 #  define isOCTAL_L1(c)                  isOCTAL(c)
5974 #endif
5975
5976 #ifndef isPRINT
5977 #  define isPRINT(c)                     (isGRAPH(c) || (c) == ' ')
5978 #endif
5979
5980 #ifndef isPRINT_L1
5981 #  define isPRINT_L1(c)                  (FITS_IN_8_BITS(c) && ! isCNTRL_L1(c))
5982 #endif
5983
5984 #ifndef isPSXSPC
5985 #  define isPSXSPC(c)                    isSPACE(c)
5986 #endif
5987
5988 #ifndef isPSXSPC_L1
5989 #  define isPSXSPC_L1(c)                 isSPACE_L1(c)
5990 #endif
5991
5992 #ifndef isPUNCT
5993 #  define isPUNCT(c)                     (   (c) == '-' || (c) == '!' || (c) == '"'         \
5994                              || (c) == '#' || (c) == '$' || (c) == '%'         \
5995                              || (c) == '&' || (c) == '\'' || (c) == '('        \
5996                              || (c) == ')' || (c) == '*' || (c) == '+'         \
5997                              || (c) == ',' || (c) == '.' || (c) == '/'         \
5998                              || (c) == ':' || (c) == ';' || (c) == '<'         \
5999                              || (c) == '=' || (c) == '>' || (c) == '?'         \
6000                              || (c) == '@' || (c) == '[' || (c) == '\\'        \
6001                              || (c) == ']' || (c) == '^' || (c) == '_'         \
6002                              || (c) == '`' || (c) == '{' || (c) == '|'         \
6003                              || (c) == '}' || (c) == '~')
6004 #endif
6005
6006 #ifndef isPUNCT_L1
6007 #  define isPUNCT_L1(c)                  (    isPUNCT(c)                                   \
6008                               || (  FITS_IN_8_BITS(c)                          \
6009                                   && (   NATIVE_TO_LATIN1((U8) c) == 0xA1      \
6010                                       || NATIVE_TO_LATIN1((U8) c) == 0xA7      \
6011                                       || NATIVE_TO_LATIN1((U8) c) == 0xAB      \
6012                                       || NATIVE_TO_LATIN1((U8) c) == 0xB6      \
6013                                       || NATIVE_TO_LATIN1((U8) c) == 0xB7      \
6014                                       || NATIVE_TO_LATIN1((U8) c) == 0xBB      \
6015                                       || NATIVE_TO_LATIN1((U8) c) == 0xBF)))
6016 #endif
6017
6018 #ifndef isSPACE
6019 #  define isSPACE(c)                     (   isBLANK(c) || (c) == '\n' || (c) == '\r'   \
6020                                  || (c) == '\v' || (c) == '\f')
6021 #endif
6022
6023 #ifndef isSPACE_L1
6024 #  define isSPACE_L1(c)                  (    isSPACE(c)                                    \
6025                              || (FITS_IN_8_BITS(c)                             \
6026                                  && (   NATIVE_TO_LATIN1((U8) c) == 0x85       \
6027                                      || NATIVE_TO_LATIN1((U8) c) == 0xA0)))
6028 #endif
6029
6030 #ifndef isUPPER_L1
6031 #  define isUPPER_L1(c)                  (   isUPPER(c)                                     \
6032                              || (FITS_IN_8_BITS(c)                             \
6033                                  && (   NATIVE_TO_LATIN1((U8) c) >= 0xC0       \
6034                                      && NATIVE_TO_LATIN1((U8) c) <= 0xDE       \
6035                                      && NATIVE_TO_LATIN1((U8) c) != 0xD7)))
6036 #endif
6037
6038 #ifndef isWORDCHAR
6039 #  define isWORDCHAR(c)                  (isALPHANUMERIC(c) || (c) == '_')
6040 #endif
6041
6042 #ifndef isWORDCHAR_L1
6043 #  define isWORDCHAR_L1(c)               (isIDFIRST_L1(c) || isDIGIT(c))
6044 #endif
6045
6046 #ifndef isWORDCHAR_LC
6047 #  define isWORDCHAR_LC(c)               (isIDFIRST_LC(c) || isDIGIT_LC(c))
6048 #endif
6049
6050 #ifndef isXDIGIT
6051 #  define isXDIGIT(c)                    (   isDIGIT(c)                                 \
6052                                  || ((c) >= 'a' && (c) <= 'f')                 \
6053                                  || ((c) >= 'A' && (c) <= 'F'))
6054 #endif
6055
6056 #ifndef isXDIGIT_L1
6057 #  define isXDIGIT_L1(c)                 isXDIGIT(c)
6058 #endif
6059
6060 #ifndef isXDIGIT_LC
6061 #  define isXDIGIT_LC(c)                 isxdigit(c)
6062 #endif
6063 #ifndef isALNUM_A
6064 #  define isALNUM_A(c)                   isALNUM(c)
6065 #endif
6066
6067 #ifndef isALNUMC_A
6068 #  define isALNUMC_A(c)                  isALNUMC(c)
6069 #endif
6070
6071 #ifndef isALPHA_A
6072 #  define isALPHA_A(c)                   isALPHA(c)
6073 #endif
6074
6075 #ifndef isALPHANUMERIC_A
6076 #  define isALPHANUMERIC_A(c)            isALPHANUMERIC(c)
6077 #endif
6078
6079 #ifndef isASCII_A
6080 #  define isASCII_A(c)                   isASCII(c)
6081 #endif
6082
6083 #ifndef isBLANK_A
6084 #  define isBLANK_A(c)                   isBLANK(c)
6085 #endif
6086
6087 #ifndef isCNTRL_A
6088 #  define isCNTRL_A(c)                   isCNTRL(c)
6089 #endif
6090
6091 #ifndef isDIGIT_A
6092 #  define isDIGIT_A(c)                   isDIGIT(c)
6093 #endif
6094
6095 #ifndef isGRAPH_A
6096 #  define isGRAPH_A(c)                   isGRAPH(c)
6097 #endif
6098
6099 #ifndef isIDCONT_A
6100 #  define isIDCONT_A(c)                  isIDCONT(c)
6101 #endif
6102
6103 #ifndef isIDFIRST_A
6104 #  define isIDFIRST_A(c)                 isIDFIRST(c)
6105 #endif
6106
6107 #ifndef isLOWER_A
6108 #  define isLOWER_A(c)                   isLOWER(c)
6109 #endif
6110
6111 #ifndef isOCTAL_A
6112 #  define isOCTAL_A(c)                   isOCTAL(c)
6113 #endif
6114
6115 #ifndef isPRINT_A
6116 #  define isPRINT_A(c)                   isPRINT(c)
6117 #endif
6118
6119 #ifndef isPSXSPC_A
6120 #  define isPSXSPC_A(c)                  isPSXSPC(c)
6121 #endif
6122
6123 #ifndef isPUNCT_A
6124 #  define isPUNCT_A(c)                   isPUNCT(c)
6125 #endif
6126
6127 #ifndef isSPACE_A
6128 #  define isSPACE_A(c)                   isSPACE(c)
6129 #endif
6130
6131 #ifndef isUPPER_A
6132 #  define isUPPER_A(c)                   isUPPER(c)
6133 #endif
6134
6135 #ifndef isWORDCHAR_A
6136 #  define isWORDCHAR_A(c)                isWORDCHAR(c)
6137 #endif
6138
6139 #ifndef isXDIGIT_A
6140 #  define isXDIGIT_A(c)                  isXDIGIT(c)
6141 #endif
6142 #ifndef isASCII_utf8_safe
6143 #  define isASCII_utf8_safe(s,e)         (((e) - (s)) <= 0 ? 0 : isASCII(*(s)))
6144 #endif
6145
6146 #ifndef isASCII_uvchr
6147 #  define isASCII_uvchr(c)               (FITS_IN_8_BITS(c) ? isASCII_L1(c) : 0)
6148 #endif
6149
6150 #if (PERL_BCDVERSION >= 0x5006000)
6151 #  ifdef isALPHA_uni    /* If one defined, all are; this is just an exemplar */
6152 #    define D_PPP_is_ctype(upper, lower, c)                                 \
6153         (FITS_IN_8_BITS(c)                                                  \
6154         ? is ## upper ## _L1(c)                                             \
6155         : is ## upper ## _uni((UV) (c)))    /* _uni is old synonym */
6156 #  else
6157 #    define D_PPP_is_ctype(upper, lower, c)                                 \
6158         (FITS_IN_8_BITS(c)                                                  \
6159         ? is ## upper ## _L1(c)                                             \
6160         : is_uni_ ## lower((UV) (c)))     /* is_uni_ is even older */
6161 #  endif
6162 #ifndef isALPHA_uvchr
6163 #  define isALPHA_uvchr(c)               D_PPP_is_ctype(ALPHA, alpha, c)
6164 #endif
6165
6166 #ifndef isALPHANUMERIC_uvchr
6167 #  define isALPHANUMERIC_uvchr(c)        (isALPHA_uvchr(c) || isDIGIT_uvchr(c))
6168 #endif
6169
6170 #  ifdef is_uni_blank
6171 #ifndef isBLANK_uvchr
6172 #  define isBLANK_uvchr(c)               D_PPP_is_ctype(BLANK, blank, c)
6173 #endif
6174
6175 #  else
6176 #ifndef isBLANK_uvchr
6177 #  define isBLANK_uvchr(c)               (FITS_IN_8_BITS(c)                          \
6178                                  ? isBLANK_L1(c)                            \
6179                                  : (   (UV) (c) == 0x1680 /* Unicode 3.0 */ \
6180                                     || inRANGE((UV) (c), 0x2000, 0x200A)    \
6181                                     || (UV) (c) == 0x202F  /* Unicode 3.0 */\
6182                                     || (UV) (c) == 0x205F  /* Unicode 3.2 */\
6183                                     || (UV) (c) == 0x3000))
6184 #endif
6185
6186 #  endif
6187 #ifndef isCNTRL_uvchr
6188 #  define isCNTRL_uvchr(c)               D_PPP_is_ctype(CNTRL, cntrl, c)
6189 #endif
6190
6191 #ifndef isDIGIT_uvchr
6192 #  define isDIGIT_uvchr(c)               D_PPP_is_ctype(DIGIT, digit, c)
6193 #endif
6194
6195 #ifndef isGRAPH_uvchr
6196 #  define isGRAPH_uvchr(c)               D_PPP_is_ctype(GRAPH, graph, c)
6197 #endif
6198
6199 #ifndef isIDCONT_uvchr
6200 #  define isIDCONT_uvchr(c)              isWORDCHAR_uvchr(c)
6201 #endif
6202
6203 #ifndef isIDFIRST_uvchr
6204 #  define isIDFIRST_uvchr(c)             D_PPP_is_ctype(IDFIRST, idfirst, c)
6205 #endif
6206
6207 #ifndef isLOWER_uvchr
6208 #  define isLOWER_uvchr(c)               D_PPP_is_ctype(LOWER, lower, c)
6209 #endif
6210
6211 #ifndef isPRINT_uvchr
6212 #  define isPRINT_uvchr(c)               D_PPP_is_ctype(PRINT, print, c)
6213 #endif
6214
6215 #ifndef isPSXSPC_uvchr
6216 #  define isPSXSPC_uvchr(c)              isSPACE_uvchr(c)
6217 #endif
6218
6219 #ifndef isPUNCT_uvchr
6220 #  define isPUNCT_uvchr(c)               D_PPP_is_ctype(PUNCT, punct, c)
6221 #endif
6222
6223 #ifndef isSPACE_uvchr
6224 #  define isSPACE_uvchr(c)               D_PPP_is_ctype(SPACE, space, c)
6225 #endif
6226
6227 #ifndef isUPPER_uvchr
6228 #  define isUPPER_uvchr(c)               D_PPP_is_ctype(UPPER, upper, c)
6229 #endif
6230
6231 #ifndef isXDIGIT_uvchr
6232 #  define isXDIGIT_uvchr(c)              D_PPP_is_ctype(XDIGIT, xdigit, c)
6233 #endif
6234
6235 #ifndef isWORDCHAR_uvchr
6236 #  define isWORDCHAR_uvchr(c)            (FITS_IN_8_BITS(c)                        \
6237                                ? isWORDCHAR_L1(c) : isALPHANUMERIC_uvchr(c))
6238 #endif
6239 #ifndef isALPHA_utf8_safe
6240 #  define isALPHA_utf8_safe(s,e)         D_PPP_IS_GENERIC_UTF8_SAFE(s, e, ALPHA)
6241 #endif
6242
6243 #  ifdef isALPHANUMERIC_utf8
6244 #ifndef isALPHANUMERIC_utf8_safe
6245 #  define isALPHANUMERIC_utf8_safe(s,e)  \
6246                                 D_PPP_IS_GENERIC_UTF8_SAFE(s, e, ALPHANUMERIC)
6247 #endif
6248
6249 #  else
6250 #ifndef isALPHANUMERIC_utf8_safe
6251 #  define isALPHANUMERIC_utf8_safe(s,e)  \
6252                         (isALPHA_utf8_safe(s,e) || isDIGIT_utf8_safe(s,e))
6253 #endif
6254
6255 #  endif
6256
6257 /* This was broken before 5.18, and just use this instead of worrying about
6258  * which releases the official works on */
6259 #  if 'A' == 65
6260 #ifndef isBLANK_utf8_safe
6261 #  define isBLANK_utf8_safe(s,e)         \
6262 ( ( LIKELY((e) > (s)) ) ?   /* Machine generated */                         \
6263     ( ( 0x09 == ((const U8*)s)[0] || 0x20 == ((const U8*)s)[0] ) ? 1        \
6264     : ( LIKELY(((e) - (s)) >= UTF8SKIP(s)) ) ?                              \
6265             ( ( 0xC2 == ((const U8*)s)[0] ) ?                               \
6266                 ( ( 0xA0 == ((const U8*)s)[1] ) ? 2 : 0 )                   \
6267             : ( 0xE1 == ((const U8*)s)[0] ) ?                               \
6268                 ( ( ( 0x9A == ((const U8*)s)[1] ) && ( 0x80 == ((const U8*)s)[2] ) ) ? 3 : 0 )\
6269             : ( 0xE2 == ((const U8*)s)[0] ) ?                               \
6270                 ( ( 0x80 == ((const U8*)s)[1] ) ?                           \
6271                     ( ( inRANGE(((const U8*)s)[2], 0x80, 0x8A ) || 0xAF == ((const U8*)s)[2] ) ? 3 : 0 )\
6272                 : ( ( 0x81 == ((const U8*)s)[1] ) && ( 0x9F == ((const U8*)s)[2] ) ) ? 3 : 0 )\
6273             : ( ( ( 0xE3 == ((const U8*)s)[0] ) && ( 0x80 == ((const U8*)s)[1] ) ) && ( 0x80 == ((const U8*)s)[2] ) ) ? 3 : 0 )\
6274         : 0 )                                                               \
6275  : 0 )
6276 #endif
6277
6278 #  elif 'A' == 193  && '^' == 95 /* EBCDIC 1047 */
6279 #ifndef isBLANK_utf8_safe
6280 #  define isBLANK_utf8_safe(s,e)         \
6281 ( ( LIKELY((e) > (s)) ) ?                                                   \
6282     ( ( 0x05 == ((const U8*)s)[0] || 0x40 == ((const U8*)s)[0] ) ? 1        \
6283     : ( LIKELY(((e) - (s)) >= UTF8SKIP(s)) ) ?                              \
6284             ( ( 0x80 == ((const U8*)s)[0] ) ?                               \
6285                 ( ( 0x41 == ((const U8*)s)[1] ) ? 2 : 0 )                   \
6286             : ( 0xBC == ((const U8*)s)[0] ) ?                               \
6287                 ( ( ( 0x63 == ((const U8*)s)[1] ) && ( 0x41 == ((const U8*)s)[2] ) ) ? 3 : 0 )\
6288             : ( 0xCA == ((const U8*)s)[0] ) ?                               \
6289                 ( ( 0x41 == ((const U8*)s)[1] ) ?                           \
6290                     ( ( inRANGE(((const U8*)s)[2], 0x41, 0x4A ) || 0x51 == ((const U8*)s)[2] ) ? 3 : 0 )\
6291                 : ( 0x42 == ((const U8*)s)[1] ) ?                           \
6292                     ( ( 0x56 == ((const U8*)s)[2] ) ? 3 : 0 )               \
6293                 : ( ( 0x43 == ((const U8*)s)[1] ) && ( 0x73 == ((const U8*)s)[2] ) ) ? 3 : 0 )\
6294             : ( ( ( 0xCE == ((const U8*)s)[0] ) && ( 0x41 == ((const U8*)s)[1] ) ) && ( 0x41 == ((const U8*)s)[2] ) ) ? 3 : 0 )\
6295         : 0 )                                                               \
6296 : 0 )
6297 #endif
6298
6299 #  elif 'A' == 193  && '^' == 176 /* EBCDIC 037 */
6300 #ifndef isBLANK_utf8_safe
6301 #  define isBLANK_utf8_safe(s,e)         \
6302 ( ( LIKELY((e) > (s)) ) ?                                                   \
6303     ( ( 0x05 == ((const U8*)s)[0] || 0x40 == ((const U8*)s)[0] ) ? 1        \
6304     : ( LIKELY(((e) - (s)) >= UTF8SKIP(s)) ) ?                              \
6305             ( ( 0x78 == ((const U8*)s)[0] ) ?                               \
6306                 ( ( 0x41 == ((const U8*)s)[1] ) ? 2 : 0 )                   \
6307             : ( 0xBD == ((const U8*)s)[0] ) ?                               \
6308                 ( ( ( 0x62 == ((const U8*)s)[1] ) && ( 0x41 == ((const U8*)s)[2] ) ) ? 3 : 0 )\
6309             : ( 0xCA == ((const U8*)s)[0] ) ?                               \
6310                 ( ( 0x41 == ((const U8*)s)[1] ) ?                           \
6311                     ( ( inRANGE(((const U8*)s)[2], 0x41, 0x4A ) || 0x51 == ((const U8*)s)[2] ) ? 3 : 0 )\
6312                 : ( 0x42 == ((const U8*)s)[1] ) ?                           \
6313                     ( ( 0x56 == ((const U8*)s)[2] ) ? 3 : 0 )               \
6314                 : ( ( 0x43 == ((const U8*)s)[1] ) && ( 0x72 == ((const U8*)s)[2] ) ) ? 3 : 0 )\
6315             : ( ( ( 0xCE == ((const U8*)s)[0] ) && ( 0x41 == ((const U8*)s)[1] ) ) && ( 0x41 == ((const U8*)s)[2] ) ) ? 3 : 0 )\
6316         : 0 )                                                               \
6317 : 0 )
6318 #endif
6319
6320 #  else
6321 #    error Unknown character set
6322 #  endif
6323 #ifndef isCNTRL_utf8_safe
6324 #  define isCNTRL_utf8_safe(s,e)         D_PPP_IS_GENERIC_UTF8_SAFE(s, e, CNTRL)
6325 #endif
6326
6327 #ifndef isDIGIT_utf8_safe
6328 #  define isDIGIT_utf8_safe(s,e)         D_PPP_IS_GENERIC_UTF8_SAFE(s, e, DIGIT)
6329 #endif
6330
6331 #ifndef isGRAPH_utf8_safe
6332 #  define isGRAPH_utf8_safe(s,e)         D_PPP_IS_GENERIC_UTF8_SAFE(s, e, GRAPH)
6333 #endif
6334
6335 #  ifdef isIDCONT_utf8
6336 #ifndef isIDCONT_utf8_safe
6337 #  define isIDCONT_utf8_safe(s,e)        D_PPP_IS_GENERIC_UTF8_SAFE(s, e, IDCONT)
6338 #endif
6339
6340 #  else
6341 #ifndef isIDCONT_utf8_safe
6342 #  define isIDCONT_utf8_safe(s,e)        isWORDCHAR_utf8_safe(s,e)
6343 #endif
6344
6345 #  endif
6346 #ifndef isIDFIRST_utf8_safe
6347 #  define isIDFIRST_utf8_safe(s,e)       D_PPP_IS_GENERIC_UTF8_SAFE(s, e, IDFIRST)
6348 #endif
6349
6350 #ifndef isLOWER_utf8_safe
6351 #  define isLOWER_utf8_safe(s,e)         D_PPP_IS_GENERIC_UTF8_SAFE(s, e, LOWER)
6352 #endif
6353
6354 #ifndef isPRINT_utf8_safe
6355 #  define isPRINT_utf8_safe(s,e)         D_PPP_IS_GENERIC_UTF8_SAFE(s, e, PRINT)
6356 #endif
6357
6358 #  undef isPSXSPC_utf8_safe   /* Use the modern definition */
6359 #ifndef isPSXSPC_utf8_safe
6360 #  define isPSXSPC_utf8_safe(s,e)        isSPACE_utf8_safe(s,e)
6361 #endif
6362 #ifndef isPUNCT_utf8_safe
6363 #  define isPUNCT_utf8_safe(s,e)         D_PPP_IS_GENERIC_UTF8_SAFE(s, e, PUNCT)
6364 #endif
6365
6366 #ifndef isSPACE_utf8_safe
6367 #  define isSPACE_utf8_safe(s,e)         D_PPP_IS_GENERIC_UTF8_SAFE(s, e, SPACE)
6368 #endif
6369
6370 #ifndef isUPPER_utf8_safe
6371 #  define isUPPER_utf8_safe(s,e)         D_PPP_IS_GENERIC_UTF8_SAFE(s, e, UPPER)
6372 #endif
6373
6374 #  ifdef isWORDCHAR_utf8
6375 #ifndef isWORDCHAR_utf8_safe
6376 #  define isWORDCHAR_utf8_safe(s,e)      D_PPP_IS_GENERIC_UTF8_SAFE(s, e, WORDCHAR)
6377 #endif
6378
6379 #  else
6380 #ifndef isWORDCHAR_utf8_safe
6381 #  define isWORDCHAR_utf8_safe(s,e)      \
6382                                (isALPHANUMERIC_utf8_safe(s,e) || (*(s)) == '_')
6383 #endif
6384
6385 #  endif
6386
6387 /* This was broken before 5.12, and just use this instead of worrying about
6388  * which releases the official works on */
6389 #  if 'A' == 65
6390 #ifndef isXDIGIT_utf8_safe
6391 #  define isXDIGIT_utf8_safe(s,e)        \
6392 ( ( LIKELY((e) > (s)) ) ?                                                   \
6393     ( ( inRANGE(((const U8*)s)[0], 0x30, 0x39 ) || inRANGE(((const U8*)s)[0], 0x41, 0x46 ) || inRANGE(((const U8*)s)[0], 0x61, 0x66 ) ) ? 1\
6394     : ( ( LIKELY(((e) - (s)) >= UTF8SKIP(s)) ) && ( 0xEF == ((const U8*)s)[0] ) ) ? ( ( 0xBC == ((const U8*)s)[1] ) ?\
6395                     ( ( inRANGE(((const U8*)s)[2], 0x90, 0x99 ) || inRANGE(((const U8*)s)[2], 0xA1, 0xA6 ) ) ? 3 : 0 )\
6396                 : ( ( 0xBD == ((const U8*)s)[1] ) && ( inRANGE(((const U8*)s)[2], 0x81, 0x86 ) ) ) ? 3 : 0 ) : 0 )\
6397 : 0 )
6398 #endif
6399
6400 #  elif 'A' == 193  && '^' == 95 /* EBCDIC 1047 */
6401 #ifndef isXDIGIT_utf8_safe
6402 #  define isXDIGIT_utf8_safe(s,e)        \
6403 ( ( LIKELY((e) > (s)) ) ?                                                   \
6404     ( ( inRANGE(((const U8*)s)[0], 0x81, 0x86 ) || inRANGE(((const U8*)s)[0], 0xC1, 0xC6 ) || inRANGE(((const U8*)s)[0], 0xF0, 0xF9 ) ) ? 1\
6405     : ( ( ( LIKELY(((e) - (s)) >= UTF8SKIP(s)) ) && ( 0xDD == ((const U8*)s)[0] ) ) && ( 0x73 == ((const U8*)s)[1] ) ) ? ( ( 0x67 == ((const U8*)s)[2] ) ?\
6406                         ( ( inRANGE(((const U8*)s)[3], 0x57, 0x59 ) || inRANGE(((const U8*)s)[3], 0x62, 0x68 ) ) ? 4 : 0 )\
6407                     : ( ( inRANGE(((const U8*)s)[2], 0x68, 0x69 ) ) && ( inRANGE(((const U8*)s)[3], 0x42, 0x47 ) ) ) ? 4 : 0 ) : 0 )\
6408 : 0 )
6409 #endif
6410
6411 #  elif 'A' == 193  && '^' == 176 /* EBCDIC 037 */
6412 #ifndef isXDIGIT_utf8_safe
6413 #  define isXDIGIT_utf8_safe(s,e)        \
6414 ( ( LIKELY((e) > (s)) ) ?                                                   \
6415     ( ( inRANGE(((const U8*)s)[0], 0x81, 0x86 ) || inRANGE(((const U8*)s)[0], 0xC1, 0xC6 ) || inRANGE(((const U8*)s)[0], 0xF0, 0xF9 ) ) ? 1\
6416     : ( ( ( LIKELY(((e) - (s)) >= UTF8SKIP(s)) ) && ( 0xDD == ((const U8*)s)[0] ) ) && ( 0x72 == ((const U8*)s)[1] ) ) ? ( ( 0x66 == ((const U8*)s)[2] ) ?\
6417                         ( ( inRANGE(((const U8*)s)[3], 0x57, 0x59 ) || 0x5F == ((const U8*)s)[3] || inRANGE(((const U8*)s)[3], 0x62, 0x67 ) ) ? 4 : 0 )\
6418                     : ( ( inRANGE(((const U8*)s)[2], 0x67, 0x68 ) ) && ( inRANGE(((const U8*)s)[3], 0x42, 0x47 ) ) ) ? 4 : 0 ) : 0 )\
6419 : 0 )
6420 #endif
6421
6422 #  else
6423 #    error Unknown character set
6424 #  endif
6425 #ifndef isALPHA_LC_utf8_safe
6426 #  define isALPHA_LC_utf8_safe(s,e)      D_PPP_IS_GENERIC_LC_UTF8_SAFE(s, e, ALPHA)
6427 #endif
6428
6429 #  ifdef isALPHANUMERIC_utf8
6430 #ifndef isALPHANUMERIC_LC_utf8_safe
6431 #  define isALPHANUMERIC_LC_utf8_safe(s,e) \
6432                                 D_PPP_IS_GENERIC_LC_UTF8_SAFE(s, e, ALPHANUMERIC)
6433 #endif
6434
6435 #  else
6436 #ifndef isALPHANUMERIC_LC_utf8_safe
6437 #  define isALPHANUMERIC_LC_utf8_safe(s,e) \
6438                         (isALPHA_LC_utf8_safe(s,e) || isDIGIT_LC_utf8_safe(s,e))
6439 #endif
6440
6441 #  endif
6442 #ifndef isBLANK_LC_utf8_safe
6443 #  define isBLANK_LC_utf8_safe(s,e)      \
6444                             D_PPP_IS_GENERIC_LC_UTF8_SAFE_BROKEN(s, e, BLANK)
6445 #endif
6446
6447 #ifndef isCNTRL_LC_utf8_safe
6448 #  define isCNTRL_LC_utf8_safe(s,e)      D_PPP_IS_GENERIC_LC_UTF8_SAFE(s, e, CNTRL)
6449 #endif
6450
6451 #ifndef isDIGIT_LC_utf8_safe
6452 #  define isDIGIT_LC_utf8_safe(s,e)      D_PPP_IS_GENERIC_LC_UTF8_SAFE(s, e, DIGIT)
6453 #endif
6454
6455 #ifndef isGRAPH_LC_utf8_safe
6456 #  define isGRAPH_LC_utf8_safe(s,e)      D_PPP_IS_GENERIC_LC_UTF8_SAFE(s, e, GRAPH)
6457 #endif
6458
6459 #  ifdef isIDCONT_utf8
6460 #ifndef isIDCONT_LC_utf8_safe
6461 #  define isIDCONT_LC_utf8_safe(s,e)     D_PPP_IS_GENERIC_LC_UTF8_SAFE(s, e, IDCONT)
6462 #endif
6463
6464 #  else
6465 #ifndef isIDCONT_LC_utf8_safe
6466 #  define isIDCONT_LC_utf8_safe(s,e)     isWORDCHAR_LC_utf8_safe(s,e)
6467 #endif
6468
6469 #  endif
6470 #ifndef isIDFIRST_LC_utf8_safe
6471 #  define isIDFIRST_LC_utf8_safe(s,e)    D_PPP_IS_GENERIC_LC_UTF8_SAFE(s, e, IDFIRST)
6472 #endif
6473
6474 #ifndef isLOWER_LC_utf8_safe
6475 #  define isLOWER_LC_utf8_safe(s,e)      D_PPP_IS_GENERIC_LC_UTF8_SAFE(s, e, LOWER)
6476 #endif
6477
6478 #ifndef isPRINT_LC_utf8_safe
6479 #  define isPRINT_LC_utf8_safe(s,e)      D_PPP_IS_GENERIC_LC_UTF8_SAFE(s, e, PRINT)
6480 #endif
6481
6482 #  undef isPSXSPC_LC_utf8_safe   /* Use the modern definition */
6483 #ifndef isPSXSPC_LC_utf8_safe
6484 #  define isPSXSPC_LC_utf8_safe(s,e)     isSPACE_LC_utf8_safe(s,e)
6485 #endif
6486 #ifndef isPUNCT_LC_utf8_safe
6487 #  define isPUNCT_LC_utf8_safe(s,e)      D_PPP_IS_GENERIC_LC_UTF8_SAFE(s, e, PUNCT)
6488 #endif
6489
6490 #ifndef isSPACE_LC_utf8_safe
6491 #  define isSPACE_LC_utf8_safe(s,e)      D_PPP_IS_GENERIC_LC_UTF8_SAFE(s, e, SPACE)
6492 #endif
6493
6494 #ifndef isUPPER_LC_utf8_safe
6495 #  define isUPPER_LC_utf8_safe(s,e)      D_PPP_IS_GENERIC_LC_UTF8_SAFE(s, e, UPPER)
6496 #endif
6497
6498 #  ifdef isWORDCHAR_utf8
6499 #ifndef isWORDCHAR_LC_utf8_safe
6500 #  define isWORDCHAR_LC_utf8_safe(s,e)   D_PPP_IS_GENERIC_LC_UTF8_SAFE(s, e, WORDCHAR)
6501 #endif
6502
6503 #  else
6504 #ifndef isWORDCHAR_LC_utf8_safe
6505 #  define isWORDCHAR_LC_utf8_safe(s,e)   \
6506                                (isALPHANUMERIC_LC_utf8_safe(s,e) || (*(s)) == '_')
6507 #endif
6508
6509 #  endif
6510 #ifndef isXDIGIT_LC_utf8_safe
6511 #  define isXDIGIT_LC_utf8_safe(s,e)     \
6512                             D_PPP_IS_GENERIC_LC_UTF8_SAFE_BROKEN(s, e, XDIGIT)
6513 #endif
6514
6515 /* Warning: isALPHANUMERIC_utf8_safe, isALPHA_utf8_safe, isASCII_utf8_safe,
6516  * isBLANK_utf8_safe, isCNTRL_utf8_safe, isDIGIT_utf8_safe, isGRAPH_utf8_safe,
6517  * isIDCONT_utf8_safe, isIDFIRST_utf8_safe, isLOWER_utf8_safe,
6518  * isPRINT_utf8_safe, isPSXSPC_utf8_safe, isPUNCT_utf8_safe, isSPACE_utf8_safe,
6519  * isUPPER_utf8_safe, isWORDCHAR_utf8_safe, isWORDCHAR_utf8_safe,
6520  * isXDIGIT_utf8_safe,
6521  * isALPHANUMERIC_LC_utf8_safe, isALPHA_LC_utf8_safe, isASCII_LC_utf8_safe,
6522  * isBLANK_LC_utf8_safe, isCNTRL_LC_utf8_safe, isDIGIT_LC_utf8_safe,
6523  * isGRAPH_LC_utf8_safe, isIDCONT_LC_utf8_safe, isIDFIRST_LC_utf8_safe,
6524  * isLOWER_LC_utf8_safe, isPRINT_LC_utf8_safe, isPSXSPC_LC_utf8_safe,
6525  * isPUNCT_LC_utf8_safe, isSPACE_LC_utf8_safe, isUPPER_LC_utf8_safe,
6526  * isWORDCHAR_LC_utf8_safe, isWORDCHAR_LC_utf8_safe, isXDIGIT_LC_utf8_safe,
6527  * isALPHANUMERIC_uvchr, isALPHA_uvchr, isASCII_uvchr, isBLANK_uvchr,
6528  * isCNTRL_uvchr, isDIGIT_uvchr, isGRAPH_uvchr, isIDCONT_uvchr,
6529  * isIDFIRST_uvchr, isLOWER_uvchr, isPRINT_uvchr, isPSXSPC_uvchr,
6530  * isPUNCT_uvchr, isSPACE_uvchr, isUPPER_uvchr, isWORDCHAR_uvchr,
6531  * isWORDCHAR_uvchr, isXDIGIT_uvchr
6532  *
6533  * The UTF-8 handling is buggy in early Perls, and this can give inaccurate
6534  * results for code points above 0xFF, until the implementation started
6535  * settling down in 5.12 and 5.14 */
6536
6537 #endif
6538
6539 #define D_PPP_TOO_SHORT_MSG  "Malformed UTF-8 character starting with:"      \
6540                              " \\x%02x (too short; %d bytes available, need" \
6541                              " %d)\n"
6542 /* Perls starting here had a new API which handled multi-character results */
6543 #if (PERL_BCDVERSION >= 0x5007003)
6544 #ifndef toLOWER_uvchr
6545 #  define toLOWER_uvchr(c, s, l)         UNI_TO_NATIVE(to_uni_lower(NATIVE_TO_UNI(c), s, l))
6546 #endif
6547
6548 #ifndef toUPPER_uvchr
6549 #  define toUPPER_uvchr(c, s, l)         UNI_TO_NATIVE(to_uni_upper(NATIVE_TO_UNI(c), s, l))
6550 #endif
6551
6552 #ifndef toTITLE_uvchr
6553 #  define toTITLE_uvchr(c, s, l)         UNI_TO_NATIVE(to_uni_title(NATIVE_TO_UNI(c), s, l))
6554 #endif
6555
6556 #ifndef toFOLD_uvchr
6557 #  define toFOLD_uvchr(c, s, l)          UNI_TO_NATIVE(to_uni_fold( NATIVE_TO_UNI(c), s, l))
6558 #endif
6559
6560 #  if (PERL_BCDVERSION != 0x5015006)     /* Just this version is broken */
6561
6562       /* Prefer the macro to the function */
6563 #    if defined toLOWER_utf8
6564 #      define D_PPP_TO_LOWER_CALLEE(s,r,l)    toLOWER_utf8(s,r,l)
6565 #    else
6566 #      define D_PPP_TO_LOWER_CALLEE(s,r,l)    to_utf8_lower(s,r,l)
6567 #    endif
6568 #    if defined toTITLE_utf8
6569 #      define D_PPP_TO_TITLE_CALLEE(s,r,l)    toTITLE_utf8(s,r,l)
6570 #    else
6571 #      define D_PPP_TO_TITLE_CALLEE(s,r,l)    to_utf8_title(s,r,l)
6572 #    endif
6573 #    if defined toUPPER_utf8
6574 #      define D_PPP_TO_UPPER_CALLEE(s,r,l)    toUPPER_utf8(s,r,l)
6575 #    else
6576 #      define D_PPP_TO_UPPER_CALLEE(s,r,l)    to_utf8_upper(s,r,l)
6577 #    endif
6578 #    if defined toFOLD_utf8
6579 #      define D_PPP_TO_FOLD_CALLEE(s,r,l)     toFOLD_utf8(s,r,l)
6580 #    else
6581 #      define D_PPP_TO_FOLD_CALLEE(s,r,l)     to_utf8_fold(s,r,l)
6582 #    endif
6583 #  else     /* Below is 5.15.6, which failed to make the macros available
6584 #              outside of core, so we have to use the 'Perl_' form.  khw
6585 #              decided it was easier to just handle this case than have to
6586 #              document the exception, and make an exception in the tests below
6587 #              */
6588 #    define D_PPP_TO_LOWER_CALLEE(s,r,l)                                    \
6589                         Perl__to_utf8_lower_flags(aTHX_ s, r, l, 0, NULL)
6590 #    define D_PPP_TO_TITLE_CALLEE(s,r,l)                                    \
6591                         Perl__to_utf8_title_flags(aTHX_ s, r, l, 0, NULL)
6592 #    define D_PPP_TO_UPPER_CALLEE(s,r,l)                                    \
6593                         Perl__to_utf8_upper_flags(aTHX_ s, r, l, 0, NULL)
6594 #    define D_PPP_TO_FOLD_CALLEE(s,r,l)                                     \
6595             Perl__to_utf8_fold_flags(aTHX_ s, r, l, FOLD_FLAGS_FULL, NULL)
6596 #  endif
6597
6598 /* The actual implementation of the backported macros.  If too short, croak,
6599  * otherwise call the original that doesn't have an upper limit parameter */
6600 #  define D_PPP_GENERIC_MULTI_ARG_TO(name, s, e,r,l)                        \
6601     (((((e) - (s)) <= 0)                                                    \
6602          /* We could just do nothing, but modern perls croak */             \
6603       ? (croak("Attempting case change on zero length string"),             \
6604          0) /* So looks like it returns something, and will compile */      \
6605       : ((e) - (s)) < UTF8SKIP(s))                                          \
6606         ? (croak(D_PPP_TOO_SHORT_MSG,                                       \
6607                                s[0], (int) ((e) - (s)), (int) UTF8SKIP(s)), \
6608            0)                                                               \
6609         : D_PPP_TO_ ## name ## _CALLEE(s,r,l))
6610 #ifndef toUPPER_utf8_safe
6611 #  define toUPPER_utf8_safe(s,e,r,l)     \
6612                         D_PPP_GENERIC_MULTI_ARG_TO(UPPER,s,e,r,l)
6613 #endif
6614
6615 #ifndef toLOWER_utf8_safe
6616 #  define toLOWER_utf8_safe(s,e,r,l)     \
6617                         D_PPP_GENERIC_MULTI_ARG_TO(LOWER,s,e,r,l)
6618 #endif
6619
6620 #ifndef toTITLE_utf8_safe
6621 #  define toTITLE_utf8_safe(s,e,r,l)     \
6622                         D_PPP_GENERIC_MULTI_ARG_TO(TITLE,s,e,r,l)
6623 #endif
6624
6625 #ifndef toFOLD_utf8_safe
6626 #  define toFOLD_utf8_safe(s,e,r,l)      \
6627                         D_PPP_GENERIC_MULTI_ARG_TO(FOLD,s,e,r,l)
6628 #endif
6629
6630 #elif (PERL_BCDVERSION >= 0x5006000)
6631
6632 /* Here we have UTF-8 support, but using the original API where the case
6633  * changing functions merely returned the changed code point; hence they
6634  * couldn't handle multi-character results. */
6635
6636 #  ifdef uvchr_to_utf8
6637 #    define D_PPP_UV_TO_UTF8 uvchr_to_utf8
6638 #  else
6639 #    define D_PPP_UV_TO_UTF8 uv_to_utf8
6640 #  endif
6641
6642    /* Get the utf8 of the case changed value, and store its length; then have
6643     * to re-calculate the changed case value in order to return it */
6644 #  define D_PPP_GENERIC_SINGLE_ARG_TO_UVCHR(name, c, s, l)                  \
6645         (*(l) = (D_PPP_UV_TO_UTF8(s,                                        \
6646                  UNI_TO_NATIVE(to_uni_ ## name(NATIVE_TO_UNI(c)))) - (s)),  \
6647         UNI_TO_NATIVE(to_uni_ ## name(NATIVE_TO_UNI(c))))
6648 #ifndef toLOWER_uvchr
6649 #  define toLOWER_uvchr(c, s, l)         \
6650                         D_PPP_GENERIC_SINGLE_ARG_TO_UVCHR(lower, c, s, l)
6651 #endif
6652
6653 #ifndef toUPPER_uvchr
6654 #  define toUPPER_uvchr(c, s, l)         \
6655                         D_PPP_GENERIC_SINGLE_ARG_TO_UVCHR(upper, c, s, l)
6656 #endif
6657
6658 #ifndef toTITLE_uvchr
6659 #  define toTITLE_uvchr(c, s, l)         \
6660                         D_PPP_GENERIC_SINGLE_ARG_TO_UVCHR(title, c, s, l)
6661 #endif
6662
6663 #ifndef toFOLD_uvchr
6664 #  define toFOLD_uvchr(c, s, l)          toLOWER_uvchr(c, s, l)
6665 #endif
6666
6667 #  define D_PPP_GENERIC_SINGLE_ARG_TO_UTF8(name, s, e, r, l)                \
6668     (((((e) - (s)) <= 0)                                                    \
6669       ? (croak("Attempting case change on zero length string"),             \
6670          0) /* So looks like it returns something, and will compile */      \
6671       : ((e) - (s)) < UTF8SKIP(s))                                          \
6672         ? (croak(D_PPP_TOO_SHORT_MSG,                                       \
6673                                s[0], (int) ((e) - (s)), (int) UTF8SKIP(s)), \
6674            0)                                                               \
6675           /* Get the changed code point and store its UTF-8 */              \
6676         : D_PPP_UV_TO_UTF8(r, to_utf8_ ## name(s)),                         \
6677             /* Then store its length, and re-get code point for return */   \
6678             *(l) = UTF8SKIP(r), to_utf8_ ## name(r))
6679
6680 /* Warning: toUPPER_utf8_safe, toLOWER_utf8_safe, toTITLE_utf8_safe,
6681  * toUPPER_uvchr, toLOWER_uvchr, toTITLE_uvchr
6682     The UTF-8 case changing operations had bugs before around 5.12 or 5.14;
6683     this backport does not correct them.
6684
6685     In perls before 7.3, multi-character case changing is not implemented; this
6686     backport uses the simple case changes available in those perls. */
6687 #ifndef toUPPER_utf8_safe
6688 #  define toUPPER_utf8_safe(s,e,r,l)     \
6689                         D_PPP_GENERIC_SINGLE_ARG_TO_UTF8(upper, s, e, r, l)
6690 #endif
6691
6692 #ifndef toLOWER_utf8_safe
6693 #  define toLOWER_utf8_safe(s,e,r,l)     \
6694                         D_PPP_GENERIC_SINGLE_ARG_TO_UTF8(lower, s, e, r, l)
6695 #endif
6696
6697 #ifndef toTITLE_utf8_safe
6698 #  define toTITLE_utf8_safe(s,e,r,l)     \
6699                         D_PPP_GENERIC_SINGLE_ARG_TO_UTF8(title, s, e, r, l)
6700 #endif
6701
6702  /* Warning: toFOLD_utf8_safe, toFOLD_uvchr
6703     The UTF-8 case changing operations had bugs before around 5.12 or 5.14;
6704     this backport does not correct them.
6705
6706     In perls before 7.3, case folding is not implemented; instead, this
6707     backport substitutes simple (not multi-character, which isn't available)
6708     lowercasing.  This gives the correct result in most, but not all, instances
6709     */
6710 #ifndef toFOLD_utf8_safe
6711 #  define toFOLD_utf8_safe(s,e,r,l)      toLOWER_utf8_safe(s,e,r,l)
6712 #endif
6713
6714 #endif
6715
6716 /* Until we figure out how to support this in older perls... */
6717 #if (PERL_BCDVERSION >= 0x5008000)
6718 #ifndef HeUTF8
6719 #  define HeUTF8(he)                     ((HeKLEN(he) == HEf_SVKEY) ?            \
6720                                  SvUTF8(HeKEY_sv(he)) :                 \
6721                                  (U32)HeKUTF8(he))
6722 #endif
6723
6724 #endif
6725 #ifndef C_ARRAY_LENGTH
6726 #  define C_ARRAY_LENGTH(a)              (sizeof(a)/sizeof((a)[0]))
6727 #endif
6728
6729 #ifndef C_ARRAY_END
6730 #  define C_ARRAY_END(a)                 ((a) + C_ARRAY_LENGTH(a))
6731 #endif
6732 #ifndef LIKELY
6733 #  define LIKELY(x)                      (x)
6734 #endif
6735
6736 #ifndef UNLIKELY
6737 #  define UNLIKELY(x)                    (x)
6738 #endif
6739
6740 #ifndef MUTABLE_PTR
6741 #if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN)
6742 #  define MUTABLE_PTR(p) ({ void *_p = (p); _p; })
6743 #else
6744 #  define MUTABLE_PTR(p) ((void *) (p))
6745 #endif
6746 #endif
6747 #ifndef MUTABLE_SV
6748 #  define MUTABLE_SV(p)                  ((SV *)MUTABLE_PTR(p))
6749 #endif
6750
6751 #if (PERL_BCDVERSION >= 0x5004000) && !defined(vnewSVpvf)
6752 #if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN)
6753 #  define vnewSVpvf(pat, args) ({ SV *_sv = newSV(0); sv_vsetpvfn(_sv, (pat), strlen((pat)), (args), Null(SV**), 0, Null(bool*)); _sv; })
6754 #else
6755 #  define vnewSVpvf(pat, args) ((PL_Sv = newSV(0)), sv_vsetpvfn(PL_Sv, (pat), strlen((pat)), (args), Null(SV**), 0, Null(bool*)), PL_Sv)
6756 #endif
6757 #endif
6758
6759 #if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_vcatpvf)
6760 #  define sv_vcatpvf(sv, pat, args)  sv_vcatpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*))
6761 #endif
6762
6763 #if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_vsetpvf)
6764 #  define sv_vsetpvf(sv, pat, args)  sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*))
6765 #endif
6766
6767 #if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_catpvf_mg)
6768 #if defined(NEED_sv_catpvf_mg)
6769 static void DPPP_(my_sv_catpvf_mg)(pTHX_ SV * const sv, const char * const pat, ...);
6770 static
6771 #else
6772 extern void DPPP_(my_sv_catpvf_mg)(pTHX_ SV * const sv, const char * const pat, ...);
6773 #endif
6774
6775 #if defined(NEED_sv_catpvf_mg) || defined(NEED_sv_catpvf_mg_GLOBAL)
6776
6777 #define Perl_sv_catpvf_mg DPPP_(my_sv_catpvf_mg)
6778
6779
6780 void
6781 DPPP_(my_sv_catpvf_mg)(pTHX_ SV * const sv, const char * const pat, ...)
6782 {
6783   va_list args;
6784   va_start(args, pat);
6785   sv_vcatpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*));
6786   SvSETMAGIC(sv);
6787   va_end(args);
6788 }
6789
6790 #endif
6791 #endif
6792
6793 #ifdef PERL_IMPLICIT_CONTEXT
6794 #if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_catpvf_mg_nocontext)
6795 #if defined(NEED_sv_catpvf_mg_nocontext)
6796 static void DPPP_(my_sv_catpvf_mg_nocontext)(SV * const sv, const char * const pat, ...);
6797 static
6798 #else
6799 extern void DPPP_(my_sv_catpvf_mg_nocontext)(SV * const sv, const char * const pat, ...);
6800 #endif
6801
6802 #if defined(NEED_sv_catpvf_mg_nocontext) || defined(NEED_sv_catpvf_mg_nocontext_GLOBAL)
6803
6804 #define sv_catpvf_mg_nocontext DPPP_(my_sv_catpvf_mg_nocontext)
6805 #define Perl_sv_catpvf_mg_nocontext DPPP_(my_sv_catpvf_mg_nocontext)
6806
6807
6808 void
6809 DPPP_(my_sv_catpvf_mg_nocontext)(SV * const sv, const char * const pat, ...)
6810 {
6811   dTHX;
6812   va_list args;
6813   va_start(args, pat);
6814   sv_vcatpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*));
6815   SvSETMAGIC(sv);
6816   va_end(args);
6817 }
6818
6819 #endif
6820 #endif
6821 #endif
6822
6823 /* sv_catpvf_mg depends on sv_catpvf_mg_nocontext */
6824 #ifndef sv_catpvf_mg
6825 #  ifdef PERL_IMPLICIT_CONTEXT
6826 #    define sv_catpvf_mg   Perl_sv_catpvf_mg_nocontext
6827 #  else
6828 #    define sv_catpvf_mg   Perl_sv_catpvf_mg
6829 #  endif
6830 #endif
6831
6832 #if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_vcatpvf_mg)
6833 #  define sv_vcatpvf_mg(sv, pat, args)                                     \
6834    STMT_START {                                                            \
6835      sv_vcatpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*));  \
6836      SvSETMAGIC(sv);                                                       \
6837    } STMT_END
6838 #endif
6839
6840 #if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_setpvf_mg)
6841 #if defined(NEED_sv_setpvf_mg)
6842 static void DPPP_(my_sv_setpvf_mg)(pTHX_ SV * const sv, const char * const pat, ...);
6843 static
6844 #else
6845 extern void DPPP_(my_sv_setpvf_mg)(pTHX_ SV * const sv, const char * const pat, ...);
6846 #endif
6847
6848 #if defined(NEED_sv_setpvf_mg) || defined(NEED_sv_setpvf_mg_GLOBAL)
6849
6850 #define Perl_sv_setpvf_mg DPPP_(my_sv_setpvf_mg)
6851
6852
6853 void
6854 DPPP_(my_sv_setpvf_mg)(pTHX_ SV * const sv, const char * const pat, ...)
6855 {
6856   va_list args;
6857   va_start(args, pat);
6858   sv_vsetpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*));
6859   SvSETMAGIC(sv);
6860   va_end(args);
6861 }
6862
6863 #endif
6864 #endif
6865
6866 #ifdef PERL_IMPLICIT_CONTEXT
6867 #if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_setpvf_mg_nocontext)
6868 #if defined(NEED_sv_setpvf_mg_nocontext)
6869 static void DPPP_(my_sv_setpvf_mg_nocontext)(SV * const sv, const char * const pat, ...);
6870 static
6871 #else
6872 extern void DPPP_(my_sv_setpvf_mg_nocontext)(SV * const sv, const char * const pat, ...);
6873 #endif
6874
6875 #if defined(NEED_sv_setpvf_mg_nocontext) || defined(NEED_sv_setpvf_mg_nocontext_GLOBAL)
6876
6877 #define sv_setpvf_mg_nocontext DPPP_(my_sv_setpvf_mg_nocontext)
6878 #define Perl_sv_setpvf_mg_nocontext DPPP_(my_sv_setpvf_mg_nocontext)
6879
6880
6881 void
6882 DPPP_(my_sv_setpvf_mg_nocontext)(SV * const sv, const char * const pat, ...)
6883 {
6884   dTHX;
6885   va_list args;
6886   va_start(args, pat);
6887   sv_vsetpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*));
6888   SvSETMAGIC(sv);
6889   va_end(args);
6890 }
6891
6892 #endif
6893 #endif
6894 #endif
6895
6896 /* sv_setpvf_mg depends on sv_setpvf_mg_nocontext */
6897 #ifndef sv_setpvf_mg
6898 #  ifdef PERL_IMPLICIT_CONTEXT
6899 #    define sv_setpvf_mg   Perl_sv_setpvf_mg_nocontext
6900 #  else
6901 #    define sv_setpvf_mg   Perl_sv_setpvf_mg
6902 #  endif
6903 #endif
6904
6905 #if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_vsetpvf_mg)
6906 #  define sv_vsetpvf_mg(sv, pat, args)                                     \
6907    STMT_START {                                                            \
6908      sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*));  \
6909      SvSETMAGIC(sv);                                                       \
6910    } STMT_END
6911 #endif
6912
6913 /* Hint: sv_2pv_nolen
6914  * Use the SvPV_nolen() or SvPV_nolen_const() macros instead of sv_2pv_nolen().
6915  */
6916 #ifndef sv_2pv_nolen
6917 #  define sv_2pv_nolen(sv)               SvPV_nolen(sv)
6918 #endif
6919
6920 #ifdef SvPVbyte
6921
6922 /* Hint: SvPVbyte
6923  * Does not work in perl-5.6.1, ppport.h implements a version
6924  * borrowed from perl-5.7.3.
6925  */
6926
6927 #if (PERL_BCDVERSION < 0x5007000)
6928 #ifndef sv_2pvbyte
6929 #  define sv_2pvbyte(sv, lp)             (sv_utf8_downgrade((sv), 0), SvPV((sv), *(lp)))
6930 #endif
6931
6932 /* Hint: sv_2pvbyte
6933  * Use the SvPVbyte() macro instead of sv_2pvbyte().
6934  */
6935
6936 /* Replace sv_2pvbyte with SvPVbyte */
6937
6938 #undef SvPVbyte
6939
6940 #define SvPVbyte(sv, lp)                                                \
6941         ((SvFLAGS(sv) & (SVf_POK|SVf_UTF8)) == (SVf_POK)                \
6942          ? ((lp = SvCUR(sv)), SvPVX(sv)) : sv_2pvbyte(sv, &lp))
6943
6944 #endif
6945
6946 #else
6947
6948 #  define SvPVbyte          SvPV
6949 #  define sv_2pvbyte        sv_2pv
6950
6951 #endif
6952 #ifndef sv_2pvbyte_nolen
6953 #  define sv_2pvbyte_nolen(sv)           sv_2pv_nolen(sv)
6954 #endif
6955
6956 /* Hint: sv_pvn
6957  * Always use the SvPV() macro instead of sv_pvn().
6958  */
6959
6960 /* Replace sv_pvn with SvPV */
6961
6962 /* Hint: sv_pvn_force
6963  * Always use the SvPV_force() macro instead of sv_pvn_force().
6964  */
6965
6966 /* Replace sv_pvn_force with SvPV_force */
6967
6968 /* If these are undefined, they're not handled by the core anyway */
6969 #ifndef SV_IMMEDIATE_UNREF
6970 #  define SV_IMMEDIATE_UNREF             0
6971 #endif
6972
6973 #ifndef SV_GMAGIC
6974 #  define SV_GMAGIC                      0
6975 #endif
6976
6977 #ifndef SV_COW_DROP_PV
6978 #  define SV_COW_DROP_PV                 0
6979 #endif
6980
6981 #ifndef SV_UTF8_NO_ENCODING
6982 #  define SV_UTF8_NO_ENCODING            0
6983 #endif
6984
6985 #ifndef SV_CONST_RETURN
6986 #  define SV_CONST_RETURN                0
6987 #endif
6988
6989 #ifndef SV_MUTABLE_RETURN
6990 #  define SV_MUTABLE_RETURN              0
6991 #endif
6992
6993 #ifndef SV_SMAGIC
6994 #  define SV_SMAGIC                      0
6995 #endif
6996
6997 #ifndef SV_HAS_TRAILING_NUL
6998 #  define SV_HAS_TRAILING_NUL            0
6999 #endif
7000
7001 #ifndef SV_COW_SHARED_HASH_KEYS
7002 #  define SV_COW_SHARED_HASH_KEYS        0
7003 #endif
7004
7005 #if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN)
7006 #ifndef sv_2pv_flags
7007 #  define sv_2pv_flags(sv, lp, flags)    ({ SV *_sv = (sv); const I32 _flags = (flags); STRLEN *_lp = lp; _lp = _lp ? : &PL_na; (!(_flags & SV_GMAGIC) && SvGMAGICAL(_sv)) ? ({ char *_pv; SvGMAGICAL_off(_sv); _pv = sv_2pv(_sv, _lp); SvGMAGICAL_on(_sv); _pv; }) : sv_2pv(_sv, _lp); })
7008 #endif
7009
7010 #ifndef sv_pvn_force_flags
7011 #  define sv_pvn_force_flags(sv, lp, flags) ({ SV *_sv = (sv); const I32 _flags = (flags); STRLEN *_lp = lp; _lp = _lp ? : &PL_na; (!(_flags & SV_GMAGIC) && SvGMAGICAL(_sv)) ? ({ char *_pv; SvGMAGICAL_off(_sv); _pv = sv_pvn_force(_sv, _lp); SvGMAGICAL_on(_sv); _pv; }) : sv_pvn_force(_sv, _lp); })
7012 #endif
7013
7014 #else
7015 #ifndef sv_2pv_flags
7016 #  define sv_2pv_flags(sv, lp, flags)    ((PL_Sv = (sv)), (!((flags) & SV_GMAGIC) && SvGMAGICAL(PL_Sv)) ? (SvGMAGICAL_off(PL_Sv), (PL_Xpv = (XPV *)sv_2pv(PL_Sv, (lp) ? (lp) : &PL_na)), SvGMAGICAL_on(PL_Sv), (char *)PL_Xpv) : sv_2pv(PL_Sv, (lp) ? (lp) : &PL_na))
7017 #endif
7018
7019 #ifndef sv_pvn_force_flags
7020 #  define sv_pvn_force_flags(sv, lp, flags) ((PL_Sv = (sv)), (!((flags) & SV_GMAGIC) && SvGMAGICAL(PL_Sv)) ? (SvGMAGICAL_off(PL_Sv), (PL_Xpv = (XPV *)sv_pvn_force(PL_Sv, (lp) ? (lp) : &PL_na)), SvGMAGICAL_on(PL_Sv), (char *)PL_Xpv) : sv_pvn_force(PL_Sv, (lp) ? (lp) : &PL_na))
7021 #endif
7022
7023 #endif
7024
7025 #if (PERL_BCDVERSION < 0x5008008) || ( (PERL_BCDVERSION >= 0x5009000) && (PERL_BCDVERSION < 0x5009003) )
7026 # define D_PPP_SVPV_NOLEN_LP_ARG &PL_na
7027 #else
7028 # define D_PPP_SVPV_NOLEN_LP_ARG 0
7029 #endif
7030 #ifndef SvPV_const
7031 #  define SvPV_const(sv, lp)             SvPV_flags_const(sv, lp, SV_GMAGIC)
7032 #endif
7033
7034 #ifndef SvPV_mutable
7035 #  define SvPV_mutable(sv, lp)           SvPV_flags_mutable(sv, lp, SV_GMAGIC)
7036 #endif
7037 #ifndef SvPV_flags
7038 #  define SvPV_flags(sv, lp, flags)      \
7039                  ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
7040                   ? ((lp = SvCUR(sv)), SvPVX(sv)) : sv_2pv_flags(sv, &lp, flags))
7041 #endif
7042 #ifndef SvPV_flags_const
7043 #  define SvPV_flags_const(sv, lp, flags) \
7044                  ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
7045                   ? ((lp = SvCUR(sv)), SvPVX_const(sv)) : \
7046                   (const char*) sv_2pv_flags(sv, &lp, flags|SV_CONST_RETURN))
7047 #endif
7048 #ifndef SvPV_flags_const_nolen
7049 #  define SvPV_flags_const_nolen(sv, flags) \
7050                  ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
7051                   ? SvPVX_const(sv) : \
7052                   (const char*) sv_2pv_flags(sv, D_PPP_SVPV_NOLEN_LP_ARG, flags|SV_CONST_RETURN))
7053 #endif
7054 #ifndef SvPV_flags_mutable
7055 #  define SvPV_flags_mutable(sv, lp, flags) \
7056                  ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
7057                   ? ((lp = SvCUR(sv)), SvPVX_mutable(sv)) : \
7058                   sv_2pv_flags(sv, &lp, flags|SV_MUTABLE_RETURN))
7059 #endif
7060 #ifndef SvPV_force
7061 #  define SvPV_force(sv, lp)             SvPV_force_flags(sv, lp, SV_GMAGIC)
7062 #endif
7063
7064 #ifndef SvPV_force_nolen
7065 #  define SvPV_force_nolen(sv)           SvPV_force_flags_nolen(sv, SV_GMAGIC)
7066 #endif
7067
7068 #ifndef SvPV_force_mutable
7069 #  define SvPV_force_mutable(sv, lp)     SvPV_force_flags_mutable(sv, lp, SV_GMAGIC)
7070 #endif
7071
7072 #ifndef SvPV_force_nomg
7073 #  define SvPV_force_nomg(sv, lp)        SvPV_force_flags(sv, lp, 0)
7074 #endif
7075
7076 #ifndef SvPV_force_nomg_nolen
7077 #  define SvPV_force_nomg_nolen(sv)      SvPV_force_flags_nolen(sv, 0)
7078 #endif
7079 #ifndef SvPV_force_flags
7080 #  define SvPV_force_flags(sv, lp, flags) \
7081                  ((SvFLAGS(sv) & (SVf_POK|SVf_THINKFIRST)) == SVf_POK \
7082                  ? ((lp = SvCUR(sv)), SvPVX(sv)) : sv_pvn_force_flags(sv, &lp, flags))
7083 #endif
7084 #ifndef SvPV_force_flags_nolen
7085 #  define SvPV_force_flags_nolen(sv, flags) \
7086                  ((SvFLAGS(sv) & (SVf_POK|SVf_THINKFIRST)) == SVf_POK \
7087                  ? SvPVX(sv) : sv_pvn_force_flags(sv, D_PPP_SVPV_NOLEN_LP_ARG, flags))
7088 #endif
7089 #ifndef SvPV_force_flags_mutable
7090 #  define SvPV_force_flags_mutable(sv, lp, flags) \
7091                  ((SvFLAGS(sv) & (SVf_POK|SVf_THINKFIRST)) == SVf_POK \
7092                  ? ((lp = SvCUR(sv)), SvPVX_mutable(sv)) \
7093                   : sv_pvn_force_flags(sv, &lp, flags|SV_MUTABLE_RETURN))
7094 #endif
7095 #ifndef SvPV_nolen
7096 #  define SvPV_nolen(sv)                 \
7097                  ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
7098                   ? SvPVX(sv) : sv_2pv_flags(sv, D_PPP_SVPV_NOLEN_LP_ARG, SV_GMAGIC))
7099 #endif
7100 #ifndef SvPV_nolen_const
7101 #  define SvPV_nolen_const(sv)           \
7102                  ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
7103                   ? SvPVX_const(sv) : sv_2pv_flags(sv, D_PPP_SVPV_NOLEN_LP_ARG, SV_GMAGIC|SV_CONST_RETURN))
7104 #endif
7105 #ifndef SvPV_nomg
7106 #  define SvPV_nomg(sv, lp)              SvPV_flags(sv, lp, 0)
7107 #endif
7108
7109 #ifndef SvPV_nomg_const
7110 #  define SvPV_nomg_const(sv, lp)        SvPV_flags_const(sv, lp, 0)
7111 #endif
7112
7113 #ifndef SvPV_nomg_const_nolen
7114 #  define SvPV_nomg_const_nolen(sv)      SvPV_flags_const_nolen(sv, 0)
7115 #endif
7116
7117 #ifndef SvPV_nomg_nolen
7118 #  define SvPV_nomg_nolen(sv)            ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
7119                                     ? SvPVX(sv) : sv_2pv_flags(sv, D_PPP_SVPV_NOLEN_LP_ARG, 0))
7120 #endif
7121 #ifndef SvPV_renew
7122 #  define SvPV_renew(sv,n)               STMT_START { SvLEN_set(sv, n); \
7123                  SvPV_set((sv), (char *) saferealloc(          \
7124                        (Malloc_t)SvPVX(sv), (MEM_SIZE)((n)))); \
7125                } STMT_END
7126 #endif
7127 #ifndef WARN_ALL
7128 #  define WARN_ALL                       0
7129 #endif
7130
7131 #ifndef WARN_CLOSURE
7132 #  define WARN_CLOSURE                   1
7133 #endif
7134
7135 #ifndef WARN_DEPRECATED
7136 #  define WARN_DEPRECATED                2
7137 #endif
7138
7139 #ifndef WARN_EXITING
7140 #  define WARN_EXITING                   3
7141 #endif
7142
7143 #ifndef WARN_GLOB
7144 #  define WARN_GLOB                      4
7145 #endif
7146
7147 #ifndef WARN_IO
7148 #  define WARN_IO                        5
7149 #endif
7150
7151 #ifndef WARN_CLOSED
7152 #  define WARN_CLOSED                    6
7153 #endif
7154
7155 #ifndef WARN_EXEC
7156 #  define WARN_EXEC                      7
7157 #endif
7158
7159 #ifndef WARN_LAYER
7160 #  define WARN_LAYER                     8
7161 #endif
7162
7163 #ifndef WARN_NEWLINE
7164 #  define WARN_NEWLINE                   9
7165 #endif
7166
7167 #ifndef WARN_PIPE
7168 #  define WARN_PIPE                      10
7169 #endif
7170
7171 #ifndef WARN_UNOPENED
7172 #  define WARN_UNOPENED                  11
7173 #endif
7174
7175 #ifndef WARN_MISC
7176 #  define WARN_MISC                      12
7177 #endif
7178
7179 #ifndef WARN_NUMERIC
7180 #  define WARN_NUMERIC                   13
7181 #endif
7182
7183 #ifndef WARN_ONCE
7184 #  define WARN_ONCE                      14
7185 #endif
7186
7187 #ifndef WARN_OVERFLOW
7188 #  define WARN_OVERFLOW                  15
7189 #endif
7190
7191 #ifndef WARN_PACK
7192 #  define WARN_PACK                      16
7193 #endif
7194
7195 #ifndef WARN_PORTABLE
7196 #  define WARN_PORTABLE                  17
7197 #endif
7198
7199 #ifndef WARN_RECURSION
7200 #  define WARN_RECURSION                 18
7201 #endif
7202
7203 #ifndef WARN_REDEFINE
7204 #  define WARN_REDEFINE                  19
7205 #endif
7206
7207 #ifndef WARN_REGEXP
7208 #  define WARN_REGEXP                    20
7209 #endif
7210
7211 #ifndef WARN_SEVERE
7212 #  define WARN_SEVERE                    21
7213 #endif
7214
7215 #ifndef WARN_DEBUGGING
7216 #  define WARN_DEBUGGING                 22
7217 #endif
7218
7219 #ifndef WARN_INPLACE
7220 #  define WARN_INPLACE                   23
7221 #endif
7222
7223 #ifndef WARN_INTERNAL
7224 #  define WARN_INTERNAL                  24
7225 #endif
7226
7227 #ifndef WARN_MALLOC
7228 #  define WARN_MALLOC                    25
7229 #endif
7230
7231 #ifndef WARN_SIGNAL
7232 #  define WARN_SIGNAL                    26
7233 #endif
7234
7235 #ifndef WARN_SUBSTR
7236 #  define WARN_SUBSTR                    27
7237 #endif
7238
7239 #ifndef WARN_SYNTAX
7240 #  define WARN_SYNTAX                    28
7241 #endif
7242
7243 #ifndef WARN_AMBIGUOUS
7244 #  define WARN_AMBIGUOUS                 29
7245 #endif
7246
7247 #ifndef WARN_BAREWORD
7248 #  define WARN_BAREWORD                  30
7249 #endif
7250
7251 #ifndef WARN_DIGIT
7252 #  define WARN_DIGIT                     31
7253 #endif
7254
7255 #ifndef WARN_PARENTHESIS
7256 #  define WARN_PARENTHESIS               32
7257 #endif
7258
7259 #ifndef WARN_PRECEDENCE
7260 #  define WARN_PRECEDENCE                33
7261 #endif
7262
7263 #ifndef WARN_PRINTF
7264 #  define WARN_PRINTF                    34
7265 #endif
7266
7267 #ifndef WARN_PROTOTYPE
7268 #  define WARN_PROTOTYPE                 35
7269 #endif
7270
7271 #ifndef WARN_QW
7272 #  define WARN_QW                        36
7273 #endif
7274
7275 #ifndef WARN_RESERVED
7276 #  define WARN_RESERVED                  37
7277 #endif
7278
7279 #ifndef WARN_SEMICOLON
7280 #  define WARN_SEMICOLON                 38
7281 #endif
7282
7283 #ifndef WARN_TAINT
7284 #  define WARN_TAINT                     39
7285 #endif
7286
7287 #ifndef WARN_THREADS
7288 #  define WARN_THREADS                   40
7289 #endif
7290
7291 #ifndef WARN_UNINITIALIZED
7292 #  define WARN_UNINITIALIZED             41
7293 #endif
7294
7295 #ifndef WARN_UNPACK
7296 #  define WARN_UNPACK                    42
7297 #endif
7298
7299 #ifndef WARN_UNTIE
7300 #  define WARN_UNTIE                     43
7301 #endif
7302
7303 #ifndef WARN_UTF8
7304 #  define WARN_UTF8                      44
7305 #endif
7306
7307 #ifndef WARN_VOID
7308 #  define WARN_VOID                      45
7309 #endif
7310
7311 #ifndef WARN_ASSERTIONS
7312 #  define WARN_ASSERTIONS                46
7313 #endif
7314 #ifndef packWARN
7315 #  define packWARN(a)                    (a)
7316 #endif
7317
7318 #ifndef ckWARN
7319 #  ifdef G_WARN_ON
7320 #    define  ckWARN(a)                  (PL_dowarn & G_WARN_ON)
7321 #  else
7322 #    define  ckWARN(a)                  PL_dowarn
7323 #  endif
7324 #endif
7325
7326 #if (PERL_BCDVERSION >= 0x5004000) && !defined(warner)
7327 #if defined(NEED_warner)
7328 static void DPPP_(my_warner)(U32 err, const char * pat, ...);
7329 static
7330 #else
7331 extern void DPPP_(my_warner)(U32 err, const char * pat, ...);
7332 #endif
7333
7334 #if defined(NEED_warner) || defined(NEED_warner_GLOBAL)
7335
7336 #define Perl_warner DPPP_(my_warner)
7337
7338
7339 void
7340 DPPP_(my_warner)(U32 err, const char *pat, ...)
7341 {
7342   SV *sv;
7343   va_list args;
7344
7345   PERL_UNUSED_ARG(err);
7346
7347   va_start(args, pat);
7348   sv = vnewSVpvf(pat, &args);
7349   va_end(args);
7350   sv_2mortal(sv);
7351   warn("%s", SvPV_nolen(sv));
7352 }
7353
7354 #define warner  Perl_warner
7355
7356 #define Perl_warner_nocontext  Perl_warner
7357
7358 #endif
7359 #endif
7360
7361 #ifndef IVdf
7362 #  if IVSIZE == LONGSIZE
7363 #    define     IVdf      "ld"
7364 #    define     UVuf      "lu"
7365 #    define     UVof      "lo"
7366 #    define     UVxf      "lx"
7367 #    define     UVXf      "lX"
7368 #  elif IVSIZE == INTSIZE
7369 #    define   IVdf      "d"
7370 #    define   UVuf      "u"
7371 #    define   UVof      "o"
7372 #    define   UVxf      "x"
7373 #    define   UVXf      "X"
7374 #  else
7375 #    error "cannot define IV/UV formats"
7376 #  endif
7377 #endif
7378
7379 #ifndef NVef
7380 #  if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE) && \
7381       defined(PERL_PRIfldbl) && (PERL_BCDVERSION != 0x5006000)
7382             /* Not very likely, but let's try anyway. */
7383 #    define NVef          PERL_PRIeldbl
7384 #    define NVff          PERL_PRIfldbl
7385 #    define NVgf          PERL_PRIgldbl
7386 #  else
7387 #    define NVef          "e"
7388 #    define NVff          "f"
7389 #    define NVgf          "g"
7390 #  endif
7391 #endif
7392 #ifndef sv_setuv
7393 #  define sv_setuv(sv, uv)               \
7394                STMT_START {                         \
7395                  UV TeMpUv = uv;                    \
7396                  if (TeMpUv <= IV_MAX)              \
7397                    sv_setiv(sv, TeMpUv);            \
7398                  else                               \
7399                    sv_setnv(sv, (double)TeMpUv);    \
7400                } STMT_END
7401 #endif
7402 #ifndef newSVuv
7403 #  define newSVuv(uv)                    ((uv) <= IV_MAX ? newSViv((IV)uv) : newSVnv((NV)uv))
7404 #endif
7405
7406 #if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN)
7407 #ifndef sv_2uv
7408 #  define sv_2uv(sv)                     ({ SV *_sv = (sv); (UV) (SvNOK(_sv) ? SvNV(_sv) : sv_2nv(_sv)); })
7409 #endif
7410
7411 #else
7412 #ifndef sv_2uv
7413 #  define sv_2uv(sv)                     ((PL_Sv = (sv)), (UV) (SvNOK(PL_Sv) ? SvNV(PL_Sv) : sv_2nv(PL_Sv)))
7414 #endif
7415
7416 #endif
7417 #ifndef SvUVX
7418 #  define SvUVX(sv)                      ((UV)SvIVX(sv))
7419 #endif
7420
7421 #ifndef SvUVXx
7422 #  define SvUVXx(sv)                     SvUVX(sv)
7423 #endif
7424
7425 #ifndef SvUV
7426 #  define SvUV(sv)                       (SvIOK(sv) ? SvUVX(sv) : sv_2uv(sv))
7427 #endif
7428
7429 #if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN)
7430 #ifndef SvUVx
7431 #  define SvUVx(sv)                      ({ SV *_sv = (sv)); SvUV(_sv); })
7432 #endif
7433
7434 #else
7435 #ifndef SvUVx
7436 #  define SvUVx(sv)                      ((PL_Sv = (sv)), SvUV(PL_Sv))
7437 #endif
7438
7439 #endif
7440
7441 /* Hint: sv_uv
7442  * Always use the SvUVx() macro instead of sv_uv().
7443  */
7444 /* Replace sv_uv with SvUVx */
7445 #ifndef sv_uv
7446 #  define sv_uv(sv)                      SvUVx(sv)
7447 #endif
7448
7449 #if !defined(SvUOK) && defined(SvIOK_UV)
7450 #  define SvUOK(sv) SvIOK_UV(sv)
7451 #endif
7452 #ifndef XST_mUV
7453 #  define XST_mUV(i,v)                   (ST(i) = sv_2mortal(newSVuv(v))  )
7454 #endif
7455
7456 #ifndef XSRETURN_UV
7457 #  define XSRETURN_UV(v)                 STMT_START { XST_mUV(0,v);  XSRETURN(1); } STMT_END
7458 #endif
7459 #ifndef PUSHu
7460 #  define PUSHu(u)                       STMT_START { sv_setuv(TARG, (UV)(u)); PUSHTARG;  } STMT_END
7461 #endif
7462
7463 #ifndef XPUSHu
7464 #  define XPUSHu(u)                      STMT_START { sv_setuv(TARG, (UV)(u)); XPUSHTARG; } STMT_END
7465 #endif
7466
7467 #if !defined(my_strnlen)
7468 #if defined(NEED_my_strnlen)
7469 static Size_t DPPP_(my_my_strnlen)(const char * str, Size_t maxlen);
7470 static
7471 #else
7472 extern Size_t DPPP_(my_my_strnlen)(const char * str, Size_t maxlen);
7473 #endif
7474
7475 #if defined(NEED_my_strnlen) || defined(NEED_my_strnlen_GLOBAL)
7476
7477 #define my_strnlen DPPP_(my_my_strnlen)
7478 #define Perl_my_strnlen DPPP_(my_my_strnlen)
7479
7480
7481 Size_t
7482 DPPP_(my_my_strnlen)(const char *str, Size_t maxlen)
7483 {
7484     const char *p = str;
7485
7486     while(maxlen-- && *p)
7487         p++;
7488
7489     return p - str;
7490 }
7491
7492 #endif
7493 #endif
7494
7495 #ifdef HAS_MEMCMP
7496 #ifndef memNE
7497 #  define memNE(s1,s2,l)                 (memcmp(s1,s2,l))
7498 #endif
7499
7500 #ifndef memEQ
7501 #  define memEQ(s1,s2,l)                 (!memcmp(s1,s2,l))
7502 #endif
7503
7504 #else
7505 #ifndef memNE
7506 #  define memNE(s1,s2,l)                 (bcmp(s1,s2,l))
7507 #endif
7508
7509 #ifndef memEQ
7510 #  define memEQ(s1,s2,l)                 (!bcmp(s1,s2,l))
7511 #endif
7512
7513 #endif
7514 #ifndef memEQs
7515 #  define memEQs(s1, l, s2)              \
7516                    (sizeof(s2)-1 == l && memEQ(s1, (s2 ""), (sizeof(s2)-1)))
7517 #endif
7518
7519 #ifndef memNEs
7520 #  define memNEs(s1, l, s2)              !memEQs(s1, l, s2)
7521 #endif
7522 #ifndef memCHRs
7523 #  define memCHRs(s, c)                  ((const char *) memchr("" s "" , c, sizeof(s)-1))
7524 #endif
7525 #ifndef MoveD
7526 #  define MoveD(s,d,n,t)                 memmove((char*)(d),(char*)(s), (n) * sizeof(t))
7527 #endif
7528
7529 #ifndef CopyD
7530 #  define CopyD(s,d,n,t)                 memcpy((char*)(d),(char*)(s), (n) * sizeof(t))
7531 #endif
7532
7533 #ifdef HAS_MEMSET
7534 #ifndef ZeroD
7535 #  define ZeroD(d,n,t)                   memzero((char*)(d), (n) * sizeof(t))
7536 #endif
7537
7538 #else
7539 #ifndef ZeroD
7540 #  define ZeroD(d,n,t)                   ((void)memzero((char*)(d), (n) * sizeof(t)), d)
7541 #endif
7542
7543 #endif
7544 #ifndef PoisonWith
7545 #  define PoisonWith(d,n,t,b)            (void)memset((char*)(d), (U8)(b), (n) * sizeof(t))
7546 #endif
7547
7548 #ifndef PoisonNew
7549 #  define PoisonNew(d,n,t)               PoisonWith(d,n,t,0xAB)
7550 #endif
7551
7552 #ifndef PoisonFree
7553 #  define PoisonFree(d,n,t)              PoisonWith(d,n,t,0xEF)
7554 #endif
7555
7556 #ifndef Poison
7557 #  define Poison(d,n,t)                  PoisonFree(d,n,t)
7558 #endif
7559 #ifndef Newx
7560 #  define Newx(v,n,t)                    New(0,v,n,t)
7561 #endif
7562
7563 #ifndef Newxc
7564 #  define Newxc(v,n,t,c)                 Newc(0,v,n,t,c)
7565 #endif
7566
7567 #ifndef Newxz
7568 #  define Newxz(v,n,t)                   Newz(0,v,n,t)
7569 #endif
7570
7571 #ifdef NEED_mess_sv
7572 #define NEED_mess
7573 #endif
7574
7575 #ifdef NEED_mess
7576 #define NEED_mess_nocontext
7577 #define NEED_vmess
7578 #endif
7579
7580 #ifndef croak_sv
7581 #if (PERL_BCDVERSION >= 0x5007003) || ( (PERL_BCDVERSION >= 0x5006001) && (PERL_BCDVERSION < 0x5007000) )
7582 #  if ( (PERL_BCDVERSION >= 0x5008000) && (PERL_BCDVERSION < 0x5008009) ) || ( (PERL_BCDVERSION >= 0x5009000) && (PERL_BCDVERSION < 0x5010001) )
7583 #    define D_PPP_FIX_UTF8_ERRSV_FOR_SV(sv)                    \
7584         STMT_START {                                           \
7585             SV *_errsv = ERRSV;                                \
7586             SvFLAGS(_errsv) = (SvFLAGS(_errsv) & ~SVf_UTF8) |  \
7587                               (SvFLAGS(sv) & SVf_UTF8);        \
7588         } STMT_END
7589 #  else
7590 #    define D_PPP_FIX_UTF8_ERRSV_FOR_SV(sv) STMT_START {} STMT_END
7591 #  endif
7592 #  define croak_sv(sv)                         \
7593     STMT_START {                               \
7594         SV *_sv = (sv);                        \
7595         if (SvROK(_sv)) {                      \
7596             sv_setsv(ERRSV, _sv);              \
7597             croak(NULL);                       \
7598         } else {                               \
7599             D_PPP_FIX_UTF8_ERRSV_FOR_SV(_sv);  \
7600             croak("%" SVf, SVfARG(_sv));       \
7601         }                                      \
7602     } STMT_END
7603 #elif (PERL_BCDVERSION >= 0x5004000)
7604 #  define croak_sv(sv) croak("%" SVf, SVfARG(sv))
7605 #else
7606 #  define croak_sv(sv) croak("%s", SvPV_nolen(sv))
7607 #endif
7608 #endif
7609
7610 #ifndef die_sv
7611 #if defined(NEED_die_sv)
7612 static OP * DPPP_(my_die_sv)(pTHX_ SV * baseex);
7613 static
7614 #else
7615 extern OP * DPPP_(my_die_sv)(pTHX_ SV * baseex);
7616 #endif
7617
7618 #if defined(NEED_die_sv) || defined(NEED_die_sv_GLOBAL)
7619
7620 #ifdef die_sv
7621 #  undef die_sv
7622 #endif
7623 #define die_sv(a) DPPP_(my_die_sv)(aTHX_ a)
7624 #define Perl_die_sv DPPP_(my_die_sv)
7625
7626 OP *
7627 DPPP_(my_die_sv)(pTHX_ SV *baseex)
7628 {
7629     croak_sv(baseex);
7630     return (OP *)NULL;
7631 }
7632 #endif
7633 #endif
7634
7635 #ifndef warn_sv
7636 #if (PERL_BCDVERSION >= 0x5004000)
7637 #  define warn_sv(sv) warn("%" SVf, SVfARG(sv))
7638 #else
7639 #  define warn_sv(sv) warn("%s", SvPV_nolen(sv))
7640 #endif
7641 #endif
7642
7643 #if ! defined vmess && (PERL_BCDVERSION >= 0x5004000)
7644 #  if defined(NEED_vmess)
7645 static SV * DPPP_(my_vmess)(pTHX_ const char * pat, va_list * args);
7646 static
7647 #else
7648 extern SV * DPPP_(my_vmess)(pTHX_ const char * pat, va_list * args);
7649 #endif
7650
7651 #if defined(NEED_vmess) || defined(NEED_vmess_GLOBAL)
7652
7653 #ifdef vmess
7654 #  undef vmess
7655 #endif
7656 #define vmess(a,b) DPPP_(my_vmess)(aTHX_ a,b)
7657 #define Perl_vmess DPPP_(my_vmess)
7658
7659
7660 SV*
7661 DPPP_(my_vmess)(pTHX_ const char* pat, va_list* args)
7662 {
7663     mess(pat, args);
7664     return PL_mess_sv;
7665 }
7666 #  endif
7667 #endif
7668
7669 #if (PERL_BCDVERSION < 0x5006000) && (PERL_BCDVERSION >= 0x5004000)
7670 #undef mess
7671 #endif
7672
7673 #if !defined(mess_nocontext) && !defined(Perl_mess_nocontext) && (PERL_BCDVERSION >= 0x5004000)
7674 #if defined(NEED_mess_nocontext)
7675 static SV * DPPP_(my_mess_nocontext)(const char * pat, ...);
7676 static
7677 #else
7678 extern SV * DPPP_(my_mess_nocontext)(const char * pat, ...);
7679 #endif
7680
7681 #if defined(NEED_mess_nocontext) || defined(NEED_mess_nocontext_GLOBAL)
7682
7683 #define mess_nocontext DPPP_(my_mess_nocontext)
7684 #define Perl_mess_nocontext DPPP_(my_mess_nocontext)
7685
7686 SV*
7687 DPPP_(my_mess_nocontext)(const char* pat, ...)
7688 {
7689     dTHX;
7690     SV *sv;
7691     va_list args;
7692     va_start(args, pat);
7693     sv = vmess(pat, &args);
7694     va_end(args);
7695     return sv;
7696 }
7697 #endif
7698 #endif
7699
7700 #ifndef mess
7701 #if defined(NEED_mess)
7702 static SV * DPPP_(my_mess)(pTHX_ const char * pat, ...);
7703 static
7704 #else
7705 extern SV * DPPP_(my_mess)(pTHX_ const char * pat, ...);
7706 #endif
7707
7708 #if defined(NEED_mess) || defined(NEED_mess_GLOBAL)
7709
7710 #define Perl_mess DPPP_(my_mess)
7711
7712 SV*
7713 DPPP_(my_mess)(pTHX_ const char* pat, ...)
7714 {
7715     SV *sv;
7716     va_list args;
7717     va_start(args, pat);
7718     sv = vmess(pat, &args);
7719     va_end(args);
7720     return sv;
7721 }
7722 #ifdef mess_nocontext
7723 #define mess mess_nocontext
7724 #else
7725 #define mess Perl_mess_nocontext
7726 #endif
7727 #endif
7728 #endif
7729
7730 #if ! defined mess_sv && (PERL_BCDVERSION >= 0x5004000)
7731 #if defined(NEED_mess_sv)
7732 static SV * DPPP_(my_mess_sv)(pTHX_ SV * basemsg, bool consume);
7733 static
7734 #else
7735 extern SV * DPPP_(my_mess_sv)(pTHX_ SV * basemsg, bool consume);
7736 #endif
7737
7738 #if defined(NEED_mess_sv) || defined(NEED_mess_sv_GLOBAL)
7739
7740 #ifdef mess_sv
7741 #  undef mess_sv
7742 #endif
7743 #define mess_sv(a,b) DPPP_(my_mess_sv)(aTHX_ a,b)
7744 #define Perl_mess_sv DPPP_(my_mess_sv)
7745
7746 SV *
7747 DPPP_(my_mess_sv)(pTHX_ SV *basemsg, bool consume)
7748 {
7749     SV *tmp;
7750     SV *ret;
7751
7752     if (SvPOK(basemsg) && SvCUR(basemsg) && *(SvEND(basemsg)-1) == '\n') {
7753         if (consume)
7754             return basemsg;
7755         ret = mess("");
7756         SvSetSV_nosteal(ret, basemsg);
7757         return ret;
7758     }
7759
7760     if (consume) {
7761         sv_catsv(basemsg, mess(""));
7762         return basemsg;
7763     }
7764
7765     ret = mess("");
7766     tmp = newSVsv(ret);
7767     SvSetSV_nosteal(ret, basemsg);
7768     sv_catsv(ret, tmp);
7769     sv_dec(tmp);
7770     return ret;
7771 }
7772 #endif
7773 #endif
7774
7775 #ifndef warn_nocontext
7776 #define warn_nocontext warn
7777 #endif
7778
7779 #ifndef croak_nocontext
7780 #define croak_nocontext croak
7781 #endif
7782
7783 #ifndef croak_no_modify
7784 #define croak_no_modify() croak_nocontext("%s", PL_no_modify)
7785 #define Perl_croak_no_modify() croak_no_modify()
7786 #endif
7787
7788 #ifndef croak_memory_wrap
7789 #if (PERL_BCDVERSION >= 0x5009002) || ( (PERL_BCDVERSION >= 0x5008006) && (PERL_BCDVERSION < 0x5009000) )
7790 #  define croak_memory_wrap() croak_nocontext("%s", PL_memory_wrap)
7791 #else
7792 #  define croak_memory_wrap() croak_nocontext("panic: memory wrap")
7793 #endif
7794 #endif
7795
7796 #ifndef croak_xs_usage
7797 #if defined(NEED_croak_xs_usage)
7798 static void DPPP_(my_croak_xs_usage)(const CV * const cv, const char * const params);
7799 static
7800 #else
7801 extern void DPPP_(my_croak_xs_usage)(const CV * const cv, const char * const params);
7802 #endif
7803
7804 #if defined(NEED_croak_xs_usage) || defined(NEED_croak_xs_usage_GLOBAL)
7805
7806 #define croak_xs_usage DPPP_(my_croak_xs_usage)
7807 #define Perl_croak_xs_usage DPPP_(my_croak_xs_usage)
7808
7809
7810
7811 void
7812 DPPP_(my_croak_xs_usage)(const CV *const cv, const char *const params)
7813 {
7814     dTHX;
7815     const GV *const gv = CvGV(cv);
7816
7817 #ifdef PERL_ARGS_ASSERT_CROAK_XS_USAGE
7818     PERL_ARGS_ASSERT_CROAK_XS_USAGE;
7819 #else
7820      assert(cv); assert(params);
7821 #endif
7822
7823     if (gv) {
7824         const char *const gvname = GvNAME(gv);
7825         const HV *const stash = GvSTASH(gv);
7826         const char *const hvname = stash ? HvNAME(stash) : NULL;
7827
7828         if (hvname)
7829             croak("Usage: %s::%s(%s)", hvname, gvname, params);
7830         else
7831             croak("Usage: %s(%s)", gvname, params);
7832     } else {
7833         /* Pants. I don't think that it should be possible to get here. */
7834         croak("Usage: CODE(0x%" UVxf ")(%s)", PTR2UV(cv), params);
7835     }
7836 }
7837 #endif
7838 #endif
7839 #ifndef mPUSHs
7840 #  define mPUSHs(s)                      PUSHs(sv_2mortal(s))
7841 #endif
7842
7843 #ifndef PUSHmortal
7844 #  define PUSHmortal                     PUSHs(sv_newmortal())
7845 #endif
7846
7847 #ifndef mPUSHp
7848 #  define mPUSHp(p,l)                    sv_setpvn(PUSHmortal, (p), (l))
7849 #endif
7850
7851 #ifndef mPUSHn
7852 #  define mPUSHn(n)                      sv_setnv(PUSHmortal, (NV)(n))
7853 #endif
7854
7855 #ifndef mPUSHi
7856 #  define mPUSHi(i)                      sv_setiv(PUSHmortal, (IV)(i))
7857 #endif
7858
7859 #ifndef mPUSHu
7860 #  define mPUSHu(u)                      sv_setuv(PUSHmortal, (UV)(u))
7861 #endif
7862 #ifndef mXPUSHs
7863 #  define mXPUSHs(s)                     XPUSHs(sv_2mortal(s))
7864 #endif
7865
7866 #ifndef XPUSHmortal
7867 #  define XPUSHmortal                    XPUSHs(sv_newmortal())
7868 #endif
7869
7870 #ifndef mXPUSHp
7871 #  define mXPUSHp(p,l)                   STMT_START { EXTEND(sp,1); sv_setpvn(PUSHmortal, (p), (l)); } STMT_END
7872 #endif
7873
7874 #ifndef mXPUSHn
7875 #  define mXPUSHn(n)                     STMT_START { EXTEND(sp,1); sv_setnv(PUSHmortal, (NV)(n)); } STMT_END
7876 #endif
7877
7878 #ifndef mXPUSHi
7879 #  define mXPUSHi(i)                     STMT_START { EXTEND(sp,1); sv_setiv(PUSHmortal, (IV)(i)); } STMT_END
7880 #endif
7881
7882 #ifndef mXPUSHu
7883 #  define mXPUSHu(u)                     STMT_START { EXTEND(sp,1); sv_setuv(PUSHmortal, (UV)(u)); } STMT_END
7884 #endif
7885
7886 /* Replace: 1 */
7887 #ifndef call_sv
7888 #  define call_sv                        perl_call_sv
7889 #endif
7890
7891 #ifndef call_pv
7892 #  define call_pv                        perl_call_pv
7893 #endif
7894
7895 #ifndef call_argv
7896 #  define call_argv                      perl_call_argv
7897 #endif
7898
7899 #ifndef call_method
7900 #  define call_method                    perl_call_method
7901 #endif
7902
7903 #ifndef eval_sv
7904 #  define eval_sv                        perl_eval_sv
7905 #endif
7906
7907 #if (PERL_BCDVERSION >= 0x5003098) && (PERL_BCDVERSION < 0x5006000)
7908 #ifndef eval_pv
7909 #  define eval_pv                        perl_eval_pv
7910 #endif
7911
7912 #endif
7913 /* Replace: 0 */
7914
7915 #if (PERL_BCDVERSION < 0x5006000)
7916 #ifndef Perl_eval_sv
7917 #  define Perl_eval_sv                   perl_eval_sv
7918 #endif
7919
7920 #if (PERL_BCDVERSION >= 0x5003098)
7921 #ifndef Perl_eval_pv
7922 #  define Perl_eval_pv                   perl_eval_pv
7923 #endif
7924
7925 #endif
7926 #endif
7927 #ifndef PERL_LOADMOD_DENY
7928 #  define PERL_LOADMOD_DENY              0x1
7929 #endif
7930
7931 #ifndef PERL_LOADMOD_NOIMPORT
7932 #  define PERL_LOADMOD_NOIMPORT          0x2
7933 #endif
7934
7935 #ifndef PERL_LOADMOD_IMPORT_OPS
7936 #  define PERL_LOADMOD_IMPORT_OPS        0x4
7937 #endif
7938
7939 #if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN)
7940 # define D_PPP_CROAK_IF_ERROR(cond) ({ SV *_errsv; ((cond) && (_errsv = ERRSV) && (SvROK(_errsv) || SvTRUE(_errsv)) && (croak_sv(_errsv), 1)); })
7941 #else
7942 # define D_PPP_CROAK_IF_ERROR(cond) ((cond) && (SvROK(ERRSV) || SvTRUE(ERRSV)) && (croak_sv(ERRSV), 1))
7943 #endif
7944
7945 #ifndef G_METHOD
7946 # define G_METHOD               64
7947 # ifdef call_sv
7948 #  undef call_sv
7949 # endif
7950 # if (PERL_BCDVERSION < 0x5006000)
7951 #  define call_sv(sv, flags)  ((flags) & G_METHOD ? perl_call_method((char *) SvPV_nolen_const(sv), \
7952                                 (flags) & ~G_METHOD) : perl_call_sv(sv, flags))
7953 # else
7954 #  define call_sv(sv, flags)  ((flags) & G_METHOD ? Perl_call_method(aTHX_ (char *) SvPV_nolen_const(sv), \
7955                                 (flags) & ~G_METHOD) : Perl_call_sv(aTHX_ sv, flags))
7956 # endif
7957 #endif
7958
7959 #ifndef G_RETHROW
7960 # define G_RETHROW 8192
7961 # ifdef eval_sv
7962 #  undef eval_sv
7963 # endif
7964 # if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN)
7965 #  define eval_sv(sv, flags) ({ I32 _flags = (flags); I32 _ret = Perl_eval_sv(aTHX_ sv, (_flags & ~G_RETHROW)); D_PPP_CROAK_IF_ERROR(_flags & G_RETHROW); _ret; })
7966 # else
7967 #  define eval_sv(sv, flags) ((PL_na = Perl_eval_sv(aTHX_ sv, ((flags) & ~G_RETHROW))), D_PPP_CROAK_IF_ERROR((flags) & G_RETHROW), (I32)PL_na)
7968 # endif
7969 #endif
7970
7971 /* Older Perl versions have broken croak_on_error=1 */
7972 #if (PERL_BCDVERSION < 0x5031002)
7973 # ifdef eval_pv
7974 #  undef eval_pv
7975 #  if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN)
7976 #   define eval_pv(p, croak_on_error) ({ SV *_sv = Perl_eval_pv(aTHX_ p, 0); D_PPP_CROAK_IF_ERROR(croak_on_error); _sv; })
7977 #  else
7978 #   define eval_pv(p, croak_on_error) ((PL_Sv = Perl_eval_pv(aTHX_ p, 0)), D_PPP_CROAK_IF_ERROR(croak_on_error), PL_Sv)
7979 #  endif
7980 # endif
7981 #endif
7982
7983 /* This is backport for Perl 5.3.97d and older which do not provide perl_eval_pv */
7984 #ifndef eval_pv
7985 #if defined(NEED_eval_pv)
7986 static SV * DPPP_(my_eval_pv)(const char * p, I32 croak_on_error);
7987 static
7988 #else
7989 extern SV * DPPP_(my_eval_pv)(const char * p, I32 croak_on_error);
7990 #endif
7991
7992 #if defined(NEED_eval_pv) || defined(NEED_eval_pv_GLOBAL)
7993
7994 #ifdef eval_pv
7995 #  undef eval_pv
7996 #endif
7997 #define eval_pv(a,b) DPPP_(my_eval_pv)(aTHX_ a,b)
7998 #define Perl_eval_pv DPPP_(my_eval_pv)
7999
8000
8001 SV*
8002 DPPP_(my_eval_pv)(const char *p, I32 croak_on_error)
8003 {
8004     dSP;
8005     SV* sv = newSVpv(p, 0);
8006
8007     PUSHMARK(sp);
8008     eval_sv(sv, G_SCALAR);
8009     SvREFCNT_dec(sv);
8010
8011     SPAGAIN;
8012     sv = POPs;
8013     PUTBACK;
8014
8015     D_PPP_CROAK_IF_ERROR(croak_on_error);
8016
8017     return sv;
8018 }
8019
8020 #endif
8021 #endif
8022
8023 #if ! defined(vload_module) && defined(start_subparse)
8024 #if defined(NEED_vload_module)
8025 static void DPPP_(my_vload_module)(U32 flags, SV * name, SV * ver, va_list * args);
8026 static
8027 #else
8028 extern void DPPP_(my_vload_module)(U32 flags, SV * name, SV * ver, va_list * args);
8029 #endif
8030
8031 #if defined(NEED_vload_module) || defined(NEED_vload_module_GLOBAL)
8032
8033 #ifdef vload_module
8034 #  undef vload_module
8035 #endif
8036 #define vload_module(a,b,c,d) DPPP_(my_vload_module)(aTHX_ a,b,c,d)
8037 #define Perl_vload_module DPPP_(my_vload_module)
8038
8039
8040 void
8041 DPPP_(my_vload_module)(U32 flags, SV *name, SV *ver, va_list *args)
8042 {
8043     dTHR;
8044     dVAR;
8045     OP *veop, *imop;
8046
8047     OP * const modname = newSVOP(OP_CONST, 0, name);
8048     /* 5.005 has a somewhat hacky force_normal that doesn't croak on
8049        SvREADONLY() if PL_compling is true. Current perls take care in
8050        ck_require() to correctly turn off SvREADONLY before calling
8051        force_normal_flags(). This seems a better fix than fudging PL_compling
8052      */
8053     SvREADONLY_off(((SVOP*)modname)->op_sv);
8054     modname->op_private |= OPpCONST_BARE;
8055     if (ver) {
8056         veop = newSVOP(OP_CONST, 0, ver);
8057     }
8058     else
8059         veop = NULL;
8060     if (flags & PERL_LOADMOD_NOIMPORT) {
8061         imop = sawparens(newNULLLIST());
8062     }
8063     else if (flags & PERL_LOADMOD_IMPORT_OPS) {
8064         imop = va_arg(*args, OP*);
8065     }
8066     else {
8067         SV *sv;
8068         imop = NULL;
8069         sv = va_arg(*args, SV*);
8070         while (sv) {
8071             imop = append_elem(OP_LIST, imop, newSVOP(OP_CONST, 0, sv));
8072             sv = va_arg(*args, SV*);
8073         }
8074     }
8075     {
8076         const line_t ocopline = PL_copline;
8077         COP * const ocurcop = PL_curcop;
8078         const int oexpect = PL_expect;
8079
8080         utilize(!(flags & PERL_LOADMOD_DENY), start_subparse(FALSE, 0),
8081 #if (PERL_BCDVERSION > 0x5003000)
8082                 veop,
8083 #endif
8084                 modname, imop);
8085         PL_expect = oexpect;
8086         PL_copline = ocopline;
8087         PL_curcop = ocurcop;
8088     }
8089 }
8090
8091 #endif
8092 #endif
8093
8094 #ifndef load_module
8095 #if defined(NEED_load_module)
8096 static void DPPP_(my_load_module)(U32 flags, SV * name, SV * ver, ...);
8097 static
8098 #else
8099 extern void DPPP_(my_load_module)(U32 flags, SV * name, SV * ver, ...);
8100 #endif
8101
8102 #if defined(NEED_load_module) || defined(NEED_load_module_GLOBAL)
8103
8104 #ifdef load_module
8105 #  undef load_module
8106 #endif
8107 #define load_module DPPP_(my_load_module)
8108 #define Perl_load_module DPPP_(my_load_module)
8109
8110
8111 void
8112 DPPP_(my_load_module)(U32 flags, SV *name, SV *ver, ...)
8113 {
8114     va_list args;
8115     va_start(args, ver);
8116     vload_module(flags, name, ver, &args);
8117     va_end(args);
8118 }
8119
8120 #endif
8121 #endif
8122 #ifndef newRV_inc
8123 #  define newRV_inc(sv)                  newRV(sv)   /* Replace */
8124 #endif
8125
8126 #ifndef newRV_noinc
8127 #if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN)
8128 #  define newRV_noinc(sv) ({ SV *_sv = (SV *)newRV((sv)); SvREFCNT_dec((sv)); _sv; })
8129 #else
8130 #  define newRV_noinc(sv) ((PL_Sv = (SV *)newRV((sv))), SvREFCNT_dec((sv)), PL_Sv)
8131 #endif
8132 #endif
8133
8134 /*
8135  * Boilerplate macros for initializing and accessing interpreter-local
8136  * data from C.  All statics in extensions should be reworked to use
8137  * this, if you want to make the extension thread-safe.  See ext/re/re.xs
8138  * for an example of the use of these macros.
8139  *
8140  * Code that uses these macros is responsible for the following:
8141  * 1. #define MY_CXT_KEY to a unique string, e.g. "DynaLoader_guts"
8142  * 2. Declare a typedef named my_cxt_t that is a structure that contains
8143  *    all the data that needs to be interpreter-local.
8144  * 3. Use the START_MY_CXT macro after the declaration of my_cxt_t.
8145  * 4. Use the MY_CXT_INIT macro such that it is called exactly once
8146  *    (typically put in the BOOT: section).
8147  * 5. Use the members of the my_cxt_t structure everywhere as
8148  *    MY_CXT.member.
8149  * 6. Use the dMY_CXT macro (a declaration) in all the functions that
8150  *    access MY_CXT.
8151  */
8152
8153 #if defined(MULTIPLICITY) || defined(PERL_OBJECT) || \
8154     defined(PERL_CAPI)    || defined(PERL_IMPLICIT_CONTEXT)
8155
8156 #ifndef START_MY_CXT
8157
8158 /* This must appear in all extensions that define a my_cxt_t structure,
8159  * right after the definition (i.e. at file scope).  The non-threads
8160  * case below uses it to declare the data as static. */
8161 #define START_MY_CXT
8162
8163 #if (PERL_BCDVERSION < 0x5004068)
8164 /* Fetches the SV that keeps the per-interpreter data. */
8165 #define dMY_CXT_SV \
8166         SV *my_cxt_sv = get_sv(MY_CXT_KEY, FALSE)
8167 #else /* >= perl5.004_68 */
8168 #define dMY_CXT_SV \
8169         SV *my_cxt_sv = *hv_fetch(PL_modglobal, MY_CXT_KEY,             \
8170                                   sizeof(MY_CXT_KEY)-1, TRUE)
8171 #endif /* < perl5.004_68 */
8172
8173 /* This declaration should be used within all functions that use the
8174  * interpreter-local data. */
8175 #define dMY_CXT \
8176         dMY_CXT_SV;                                                     \
8177         my_cxt_t *my_cxtp = INT2PTR(my_cxt_t*,SvUV(my_cxt_sv))
8178
8179 /* Creates and zeroes the per-interpreter data.
8180  * (We allocate my_cxtp in a Perl SV so that it will be released when
8181  * the interpreter goes away.) */
8182 #define MY_CXT_INIT \
8183         dMY_CXT_SV;                                                     \
8184         /* newSV() allocates one more than needed */                    \
8185         my_cxt_t *my_cxtp = (my_cxt_t*)SvPVX(newSV(sizeof(my_cxt_t)-1));\
8186         Zero(my_cxtp, 1, my_cxt_t);                                     \
8187         sv_setuv(my_cxt_sv, PTR2UV(my_cxtp))
8188
8189 /* This macro must be used to access members of the my_cxt_t structure.
8190  * e.g. MYCXT.some_data */
8191 #define MY_CXT          (*my_cxtp)
8192
8193 /* Judicious use of these macros can reduce the number of times dMY_CXT
8194  * is used.  Use is similar to pTHX, aTHX etc. */
8195 #define pMY_CXT         my_cxt_t *my_cxtp
8196 #define pMY_CXT_        pMY_CXT,
8197 #define _pMY_CXT        ,pMY_CXT
8198 #define aMY_CXT         my_cxtp
8199 #define aMY_CXT_        aMY_CXT,
8200 #define _aMY_CXT        ,aMY_CXT
8201
8202 #endif /* START_MY_CXT */
8203
8204 #ifndef MY_CXT_CLONE
8205 /* Clones the per-interpreter data. */
8206 #define MY_CXT_CLONE \
8207         dMY_CXT_SV;                                                     \
8208         my_cxt_t *my_cxtp = (my_cxt_t*)SvPVX(newSV(sizeof(my_cxt_t)-1));\
8209         Copy(INT2PTR(my_cxt_t*, SvUV(my_cxt_sv)), my_cxtp, 1, my_cxt_t);\
8210         sv_setuv(my_cxt_sv, PTR2UV(my_cxtp))
8211 #endif
8212
8213 #else /* single interpreter */
8214
8215 #ifndef START_MY_CXT
8216
8217 #define START_MY_CXT    static my_cxt_t my_cxt;
8218 #define dMY_CXT_SV      dNOOP
8219 #define dMY_CXT         dNOOP
8220 #define MY_CXT_INIT     NOOP
8221 #define MY_CXT          my_cxt
8222
8223 #define pMY_CXT         void
8224 #define pMY_CXT_
8225 #define _pMY_CXT
8226 #define aMY_CXT
8227 #define aMY_CXT_
8228 #define _aMY_CXT
8229
8230 #endif /* START_MY_CXT */
8231
8232 #ifndef MY_CXT_CLONE
8233 #define MY_CXT_CLONE    NOOP
8234 #endif
8235
8236 #endif
8237
8238 #ifndef SvREFCNT_inc
8239 #  ifdef PERL_USE_GCC_BRACE_GROUPS
8240 #    define SvREFCNT_inc(sv)            \
8241       ({                                \
8242           SV * const _sv = (SV*)(sv);   \
8243           if (_sv)                      \
8244                (SvREFCNT(_sv))++;       \
8245           _sv;                          \
8246       })
8247 #  else
8248 #    define SvREFCNT_inc(sv)    \
8249           ((PL_Sv=(SV*)(sv)) ? (++(SvREFCNT(PL_Sv)),PL_Sv) : NULL)
8250 #  endif
8251 #endif
8252
8253 #ifndef SvREFCNT_inc_simple
8254 #  ifdef PERL_USE_GCC_BRACE_GROUPS
8255 #    define SvREFCNT_inc_simple(sv)     \
8256       ({                                        \
8257           if (sv)                               \
8258                (SvREFCNT(sv))++;                \
8259           (SV *)(sv);                           \
8260       })
8261 #  else
8262 #    define SvREFCNT_inc_simple(sv) \
8263           ((sv) ? (SvREFCNT(sv)++,(SV*)(sv)) : NULL)
8264 #  endif
8265 #endif
8266
8267 #ifndef SvREFCNT_inc_NN
8268 #  ifdef PERL_USE_GCC_BRACE_GROUPS
8269 #    define SvREFCNT_inc_NN(sv)         \
8270       ({                                        \
8271           SV * const _sv = (SV*)(sv);   \
8272           SvREFCNT(_sv)++;              \
8273           _sv;                          \
8274       })
8275 #  else
8276 #    define SvREFCNT_inc_NN(sv) \
8277           (PL_Sv=(SV*)(sv),++(SvREFCNT(PL_Sv)),PL_Sv)
8278 #  endif
8279 #endif
8280
8281 #ifndef SvREFCNT_inc_void
8282 #  ifdef PERL_USE_GCC_BRACE_GROUPS
8283 #    define SvREFCNT_inc_void(sv)               \
8284       ({                                        \
8285           SV * const _sv = (SV*)(sv);   \
8286           if (_sv)                      \
8287               (void)(SvREFCNT(_sv)++);  \
8288       })
8289 #  else
8290 #    define SvREFCNT_inc_void(sv) \
8291           (void)((PL_Sv=(SV*)(sv)) ? ++(SvREFCNT(PL_Sv)) : 0)
8292 #  endif
8293 #endif
8294 #ifndef SvREFCNT_inc_simple_void
8295 #  define SvREFCNT_inc_simple_void(sv)   STMT_START { if (sv) SvREFCNT(sv)++; } STMT_END
8296 #endif
8297
8298 #ifndef SvREFCNT_inc_simple_NN
8299 #  define SvREFCNT_inc_simple_NN(sv)     (++SvREFCNT(sv), (SV*)(sv))
8300 #endif
8301
8302 #ifndef SvREFCNT_inc_void_NN
8303 #  define SvREFCNT_inc_void_NN(sv)       (void)(++SvREFCNT((SV*)(sv)))
8304 #endif
8305
8306 #ifndef SvREFCNT_inc_simple_void_NN
8307 #  define SvREFCNT_inc_simple_void_NN(sv) (void)(++SvREFCNT((SV*)(sv)))
8308 #endif
8309
8310 #ifndef newSV_type
8311 #if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN)
8312 #  define newSV_type(t) ({ SV *_sv = newSV(0); sv_upgrade(_sv, (t)); _sv; })
8313 #else
8314 #  define newSV_type(t) ((PL_Sv = newSV(0)), sv_upgrade(PL_Sv, (t)), PL_Sv)
8315 #endif
8316 #endif
8317
8318 #if (PERL_BCDVERSION < 0x5006000)
8319 # define D_PPP_CONSTPV_ARG(x)  ((char *) (x))
8320 #else
8321 # define D_PPP_CONSTPV_ARG(x)  (x)
8322 #endif
8323 #ifndef newSVpvn
8324 #  define newSVpvn(data,len)             ((data)                                              \
8325                                     ? ((len) ? newSVpv((data), (len)) : newSVpv("", 0)) \
8326                                     : newSV(0))
8327 #endif
8328 #ifndef newSVpvn_utf8
8329 #  define newSVpvn_utf8(s, len, u)       newSVpvn_flags((s), (len), (u) ? SVf_UTF8 : 0)
8330 #endif
8331 #ifndef SVf_UTF8
8332 #  define SVf_UTF8                       0
8333 #endif
8334
8335 #ifndef newSVpvn_flags
8336 #if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN)
8337 # define newSVpvn_flags(s, len, flags) ({ SV *_sv = newSVpvn(D_PPP_CONSTPV_ARG((s)), (len)); SvFLAGS(_sv) |= ((flags) & SVf_UTF8); ((flags) & SVs_TEMP) ? sv_2mortal(_sv) : _sv; })
8338 #else
8339 # define newSVpvn_flags(s, len, flags) ((PL_Sv = newSVpvn(D_PPP_CONSTPV_ARG((s)), (len))), SvFLAGS(PL_Sv) |= ((flags) & SVf_UTF8), (((flags) & SVs_TEMP) ? sv_2mortal(PL_Sv) : PL_Sv))
8340 #endif
8341 #endif
8342 #ifndef SV_NOSTEAL
8343 #  define SV_NOSTEAL                     16
8344 #endif
8345
8346 #if ( (PERL_BCDVERSION >= 0x5007003) && (PERL_BCDVERSION < 0x5008007) ) || ( (PERL_BCDVERSION >= 0x5009000) && (PERL_BCDVERSION < 0x5009002) )
8347 #undef sv_setsv_flags
8348 #if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN)
8349 #define sv_setsv_flags(dstr, sstr, flags)                                          \
8350   STMT_START {                                                                     \
8351     if (((flags) & SV_NOSTEAL) && (sstr) && (SvFLAGS((SV *)(sstr)) & SVs_TEMP)) {  \
8352       SvTEMP_off((SV *)(sstr));                                                    \
8353       Perl_sv_setsv_flags(aTHX_ (dstr), (sstr), (flags) & ~SV_NOSTEAL);            \
8354       SvTEMP_on((SV *)(sstr));                                                     \
8355     } else {                                                                       \
8356       Perl_sv_setsv_flags(aTHX_ (dstr), (sstr), (flags) & ~SV_NOSTEAL);            \
8357     }                                                                              \
8358   } STMT_END
8359 #else
8360   (                                                                                \
8361     (((flags) & SV_NOSTEAL) && (sstr) && (SvFLAGS((SV *)(sstr)) & SVs_TEMP)) ? (   \
8362       SvTEMP_off((SV *)(sstr)),                                                    \
8363       Perl_sv_setsv_flags(aTHX_ (dstr), (sstr), (flags) & ~SV_NOSTEAL),            \
8364       SvTEMP_on((SV *)(sstr)),                                                     \
8365       1                                                                            \
8366     ) : (                                                                          \
8367       Perl_sv_setsv_flags(aTHX_ (dstr), (sstr), (flags) & ~SV_NOSTEAL),            \
8368       1                                                                            \
8369     )                                                                              \
8370   )
8371 #endif
8372 #endif
8373
8374 #if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN)
8375 #ifndef sv_setsv_flags
8376 #  define sv_setsv_flags(dstr, sstr, flags) \
8377   STMT_START {                                                                     \
8378     if (((flags) & SV_NOSTEAL) && (sstr) && (SvFLAGS((SV *)(sstr)) & SVs_TEMP)) {  \
8379       SvTEMP_off((SV *)(sstr));                                                    \
8380       if (!((flags) & SV_GMAGIC) && (sstr) && SvGMAGICAL((SV *)(sstr))) {          \
8381         SvGMAGICAL_off((SV *)(sstr));                                              \
8382         sv_setsv((dstr), (sstr));                                                  \
8383         SvGMAGICAL_on((SV *)(sstr));                                               \
8384       } else {                                                                     \
8385         sv_setsv((dstr), (sstr));                                                  \
8386       }                                                                            \
8387       SvTEMP_on((SV *)(sstr));                                                     \
8388     } else {                                                                       \
8389       if (!((flags) & SV_GMAGIC) && (sstr) && SvGMAGICAL((SV *)(sstr))) {          \
8390         SvGMAGICAL_off((SV *)(sstr));                                              \
8391         sv_setsv((dstr), (sstr));                                                  \
8392         SvGMAGICAL_on((SV *)(sstr));                                               \
8393       } else {                                                                     \
8394         sv_setsv((dstr), (sstr));                                                  \
8395       }                                                                            \
8396     }                                                                              \
8397   } STMT_END
8398 #endif
8399
8400 #else
8401 #ifndef sv_setsv_flags
8402 #  define sv_setsv_flags(dstr, sstr, flags) \
8403   (                                                                                \
8404     (((flags) & SV_NOSTEAL) && (sstr) && (SvFLAGS((SV *)(sstr)) & SVs_TEMP)) ? (   \
8405       SvTEMP_off((SV *)(sstr)),                                                    \
8406       (!((flags) & SV_GMAGIC) && (sstr) && SvGMAGICAL((SV *)(sstr))) ? (           \
8407         SvGMAGICAL_off((SV *)(sstr)),                                              \
8408         sv_setsv((dstr), (sstr)),                                                  \
8409         SvGMAGICAL_on((SV *)(sstr)),                                               \
8410         1                                                                          \
8411       ) : (                                                                        \
8412         sv_setsv((dstr), (sstr)),                                                  \
8413         1                                                                          \
8414       ),                                                                           \
8415       SvTEMP_on((SV *)(sstr)),                                                     \
8416       1                                                                            \
8417     ) : (                                                                          \
8418       (!((flags) & SV_GMAGIC) && (sstr) && SvGMAGICAL((SV *)(sstr))) ? (           \
8419         SvGMAGICAL_off((SV *)(sstr)),                                              \
8420         sv_setsv((dstr), (sstr)),                                                  \
8421         SvGMAGICAL_on((SV *)(sstr)),                                               \
8422         1                                                                          \
8423       ) : (                                                                        \
8424         sv_setsv((dstr), (sstr)),                                                  \
8425         1                                                                          \
8426       )                                                                            \
8427     )                                                                              \
8428   )
8429 #endif
8430
8431 #endif
8432
8433 #if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN)
8434 #ifndef newSVsv_flags
8435 #  define newSVsv_flags(sv, flags)       ({ SV *_sv = newSV(0); sv_setsv_flags(_sv, (sv), (flags)); _sv; })
8436 #endif
8437
8438 #else
8439 #ifndef newSVsv_flags
8440 #  define newSVsv_flags(sv, flags)       ((PL_Sv = newSV(0)), sv_setsv_flags(PL_Sv, (sv), (flags)), PL_Sv)
8441 #endif
8442
8443 #endif
8444 #ifndef newSVsv_nomg
8445 #  define newSVsv_nomg(sv)               newSVsv_flags((sv), SV_NOSTEAL)
8446 #endif
8447
8448 #if (PERL_BCDVERSION >= 0x5017005)
8449 #ifndef sv_mortalcopy_flags
8450 #  define sv_mortalcopy_flags(sv, flags) Perl_sv_mortalcopy_flags(aTHX_ (sv), (flags))
8451 #endif
8452
8453 #else
8454 #ifndef sv_mortalcopy_flags
8455 #  define sv_mortalcopy_flags(sv, flags) sv_2mortal(newSVsv_flags((sv), (flags)))
8456 #endif
8457
8458 #endif
8459 #ifndef SvMAGIC_set
8460 #  define SvMAGIC_set(sv, val)           \
8461                 STMT_START { assert(SvTYPE(sv) >= SVt_PVMG); \
8462                 (((XPVMG*) SvANY(sv))->xmg_magic = (val)); } STMT_END
8463 #endif
8464
8465 #if (PERL_BCDVERSION < 0x5009003)
8466 #ifndef SvPVX_const
8467 #  define SvPVX_const(sv)                ((const char*) (0 + SvPVX(sv)))
8468 #endif
8469
8470 #ifndef SvPVX_mutable
8471 #  define SvPVX_mutable(sv)              (0 + SvPVX(sv))
8472 #endif
8473 #ifndef SvRV_set
8474 #  define SvRV_set(sv, val)              \
8475                 STMT_START { assert(SvTYPE(sv) >=  SVt_RV); \
8476                 (((XRV*) SvANY(sv))->xrv_rv = (val)); } STMT_END
8477 #endif
8478
8479 #else
8480 #ifndef SvPVX_const
8481 #  define SvPVX_const(sv)                ((const char*)((sv)->sv_u.svu_pv))
8482 #endif
8483
8484 #ifndef SvPVX_mutable
8485 #  define SvPVX_mutable(sv)              ((sv)->sv_u.svu_pv)
8486 #endif
8487 #ifndef SvRV_set
8488 #  define SvRV_set(sv, val)              \
8489                 STMT_START { assert(SvTYPE(sv) >=  SVt_RV); \
8490                 ((sv)->sv_u.svu_rv = (val)); } STMT_END
8491 #endif
8492
8493 #endif
8494 #ifndef SvSTASH_set
8495 #  define SvSTASH_set(sv, val)           \
8496                 STMT_START { assert(SvTYPE(sv) >= SVt_PVMG); \
8497                 (((XPVMG*) SvANY(sv))->xmg_stash = (val)); } STMT_END
8498 #endif
8499
8500 #if (PERL_BCDVERSION < 0x5004000)
8501 #ifndef SvUV_set
8502 #  define SvUV_set(sv, val)              \
8503                 STMT_START { assert(SvTYPE(sv) == SVt_IV || SvTYPE(sv) >= SVt_PVIV); \
8504                 (((XPVIV*) SvANY(sv))->xiv_iv = (IV) (val)); } STMT_END
8505 #endif
8506
8507 #else
8508 #ifndef SvUV_set
8509 #  define SvUV_set(sv, val)              \
8510                 STMT_START { assert(SvTYPE(sv) == SVt_IV || SvTYPE(sv) >= SVt_PVIV); \
8511                 (((XPVUV*) SvANY(sv))->xuv_uv = (val)); } STMT_END
8512 #endif
8513
8514 #endif
8515
8516 /* Hint: newSVpvn_share
8517  * The SVs created by this function only mimic the behaviour of
8518  * shared PVs without really being shared. Only use if you know
8519  * what you're doing.
8520  */
8521
8522 #ifndef newSVpvn_share
8523
8524 #if defined(NEED_newSVpvn_share)
8525 static SV * DPPP_(my_newSVpvn_share)(pTHX_ const char * s, I32 len, U32 hash);
8526 static
8527 #else
8528 extern SV * DPPP_(my_newSVpvn_share)(pTHX_ const char * s, I32 len, U32 hash);
8529 #endif
8530
8531 #if defined(NEED_newSVpvn_share) || defined(NEED_newSVpvn_share_GLOBAL)
8532
8533 #ifdef newSVpvn_share
8534 #  undef newSVpvn_share
8535 #endif
8536 #define newSVpvn_share(a,b,c) DPPP_(my_newSVpvn_share)(aTHX_ a,b,c)
8537 #define Perl_newSVpvn_share DPPP_(my_newSVpvn_share)
8538
8539
8540 SV *
8541 DPPP_(my_newSVpvn_share)(pTHX_ const char *s, I32 len, U32 hash)
8542 {
8543   SV *sv;
8544   if (len < 0)
8545     len = -len;
8546   if (!hash)
8547     PERL_HASH(hash, (char*) s, len);
8548   sv = newSVpvn((char *) s, len);
8549   sv_upgrade(sv, SVt_PVIV);
8550   SvIVX(sv) = hash;
8551   SvREADONLY_on(sv);
8552   SvPOK_on(sv);
8553   return sv;
8554 }
8555
8556 #endif
8557
8558 #endif
8559 #ifndef SvSHARED_HASH
8560 #  define SvSHARED_HASH(sv)              (0 + SvUVX(sv))
8561 #endif
8562 #ifndef HvNAME_get
8563 #  define HvNAME_get(hv)                 HvNAME(hv)
8564 #endif
8565 #ifndef HvNAMELEN_get
8566 #  define HvNAMELEN_get(hv)              (HvNAME_get(hv) ? (I32)strlen(HvNAME_get(hv)) : 0)
8567 #endif
8568
8569 #if (PERL_BCDVERSION >= 0x5009002) && (PERL_BCDVERSION <= 0x5009003) /* 5.9.2 and 5.9.3 ignore the length param */
8570 #undef gv_fetchpvn_flags
8571 #endif
8572 #ifndef GV_NOADD_MASK
8573 #  define GV_NOADD_MASK                  0xE0
8574 #endif
8575
8576 #ifndef gv_fetchpvn_flags
8577 #  define gv_fetchpvn_flags(name, len, flags, sv_type) gv_fetchpv(SvPVX(sv_2mortal(newSVpvn((name), (len)))), ((flags) & GV_NOADD_MASK) ? FALSE : TRUE, (I32)(sv_type))
8578 #endif
8579 #ifndef GvSVn
8580 #  define GvSVn(gv)                      GvSV(gv)
8581 #endif
8582
8583 #ifndef isGV_with_GP
8584 #  define isGV_with_GP(gv)               isGV(gv)
8585 #endif
8586
8587 #ifndef gv_fetchsv
8588 #  define gv_fetchsv(name, flags, svt)   gv_fetchpv(SvPV_nolen_const(name), flags, svt)
8589 #endif
8590 #ifndef get_cvn_flags
8591 #  define get_cvn_flags(name, namelen, flags) get_cv(name, flags)
8592 #endif
8593
8594 #ifndef gv_init_pvn
8595 #  define gv_init_pvn(gv, stash, ptr, len, flags) gv_init(gv, stash, ptr, len, flags & GV_ADDMULTI ? TRUE : FALSE)
8596 #endif
8597
8598 /* concatenating with "" ensures that only literal strings are accepted as argument
8599  * note that STR_WITH_LEN() can't be used as argument to macros or functions that
8600  * under some configurations might be macros
8601  */
8602 #ifndef STR_WITH_LEN
8603 #  define STR_WITH_LEN(s)                (s ""), (sizeof(s)-1)
8604 #endif
8605 #ifndef newSVpvs
8606 #  define newSVpvs(str)                  newSVpvn(str "", sizeof(str) - 1)
8607 #endif
8608
8609 #ifndef newSVpvs_flags
8610 #  define newSVpvs_flags(str, flags)     newSVpvn_flags(str "", sizeof(str) - 1, flags)
8611 #endif
8612
8613 #ifndef newSVpvs_share
8614 #  define newSVpvs_share(str)            newSVpvn_share(str "", sizeof(str) - 1, 0)
8615 #endif
8616
8617 #ifndef sv_catpvs
8618 #  define sv_catpvs(sv, str)             sv_catpvn(sv, str "", sizeof(str) - 1)
8619 #endif
8620
8621 #ifndef sv_setpvs
8622 #  define sv_setpvs(sv, str)             sv_setpvn(sv, str "", sizeof(str) - 1)
8623 #endif
8624
8625 #ifndef hv_fetchs
8626 #  define hv_fetchs(hv, key, lval)       hv_fetch(hv, key "", sizeof(key) - 1, lval)
8627 #endif
8628
8629 #ifndef hv_stores
8630 #  define hv_stores(hv, key, val)        hv_store(hv, key "", sizeof(key) - 1, val, 0)
8631 #endif
8632 #ifndef gv_fetchpvs
8633 #  define gv_fetchpvs(name, flags, svt)  gv_fetchpvn_flags(name "", sizeof(name) - 1, flags, svt)
8634 #endif
8635
8636 #ifndef gv_stashpvs
8637 #  define gv_stashpvs(name, flags)       gv_stashpvn(name "", sizeof(name) - 1, flags)
8638 #endif
8639 #ifndef get_cvs
8640 #  define get_cvs(name, flags)           get_cvn_flags(name "", sizeof(name)-1, flags)
8641 #endif
8642 #ifndef SvGETMAGIC
8643 #  define SvGETMAGIC(x)                  STMT_START { if (SvGMAGICAL(x)) mg_get(x); } STMT_END
8644 #endif
8645
8646 /* That's the best we can do... */
8647 #ifndef sv_catpvn_nomg
8648 #  define sv_catpvn_nomg                 sv_catpvn
8649 #endif
8650
8651 #ifndef sv_catsv_nomg
8652 #  define sv_catsv_nomg                  sv_catsv
8653 #endif
8654
8655 #ifndef sv_setsv_nomg
8656 #  define sv_setsv_nomg                  sv_setsv
8657 #endif
8658
8659 #ifndef sv_pvn_nomg
8660 #  define sv_pvn_nomg                    sv_pvn
8661 #endif
8662
8663 #ifdef SVf_IVisUV
8664 #if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN)
8665 #ifndef SvIV_nomg
8666 #  define SvIV_nomg(sv)                  (!SvGMAGICAL((sv)) ? SvIV((sv)) : ({ SV *_sviv = sv_mortalcopy_flags((sv), SV_NOSTEAL); IV _iv = SvIV(_sviv); SvFLAGS((sv)) = (SvFLAGS((sv)) & ~SVf_IVisUV) | (SvFLAGS(_sviv) & SVf_IVisUV); _iv; }))
8667 #endif
8668
8669 #ifndef SvUV_nomg
8670 #  define SvUV_nomg(sv)                  (!SvGMAGICAL((sv)) ? SvUV((sv)) : ({ SV *_svuv = sv_mortalcopy_flags((sv), SV_NOSTEAL); UV _uv = SvUV(_svuv); SvFLAGS((sv)) = (SvFLAGS((sv)) & ~SVf_IVisUV) | (SvFLAGS(_svuv) & SVf_IVisUV); _uv; }))
8671 #endif
8672
8673 #else
8674 #ifndef SvIV_nomg
8675 #  define SvIV_nomg(sv)                  (!SvGMAGICAL((sv)) ? SvIV((sv)) : ((PL_Sv = sv_mortalcopy_flags((sv), SV_NOSTEAL)), sv_upgrade(PL_Sv, SVt_PVIV), (SvIVX(PL_Sv) = SvIV(PL_Sv)), (SvFLAGS((sv)) = (SvFLAGS((sv)) & ~SVf_IVisUV) | (SvFLAGS(PL_Sv) & SVf_IVisUV)), SvIVX(PL_Sv)))
8676 #endif
8677
8678 #ifndef SvUV_nomg
8679 #  define SvUV_nomg(sv)                  (!SvGMAGICAL((sv)) ? SvIV((sv)) : ((PL_Sv = sv_mortalcopy_flags((sv), SV_NOSTEAL)), sv_upgrade(PL_Sv, SVt_PVIV), (SvUVX(PL_Sv) = SvUV(PL_Sv)), (SvFLAGS((sv)) = (SvFLAGS((sv)) & ~SVf_IVisUV) | (SvFLAGS(PL_Sv) & SVf_IVisUV)), SvUVX(PL_Sv)))
8680 #endif
8681
8682 #endif
8683 #else
8684 #ifndef SvIV_nomg
8685 #  define SvIV_nomg(sv)                  (!SvGMAGICAL((sv)) ? SvIV((sv)) : SvIVx(sv_mortalcopy_flags((sv), SV_NOSTEAL)))
8686 #endif
8687
8688 #ifndef SvUV_nomg
8689 #  define SvUV_nomg(sv)                  (!SvGMAGICAL((sv)) ? SvUV((sv)) : SvUVx(sv_mortalcopy_flags((sv), SV_NOSTEAL)))
8690 #endif
8691
8692 #endif
8693 #ifndef SvNV_nomg
8694 #  define SvNV_nomg(sv)                  (!SvGMAGICAL((sv)) ? SvNV((sv)) : SvNVx(sv_mortalcopy_flags((sv), SV_NOSTEAL)))
8695 #endif
8696
8697 #ifndef SvTRUE_nomg
8698 #  define SvTRUE_nomg(sv)                (!SvGMAGICAL((sv)) ? SvTRUE((sv)) : SvTRUEx(sv_mortalcopy_flags((sv), SV_NOSTEAL)))
8699 #endif
8700
8701 #ifndef sv_catpv_mg
8702 #  define sv_catpv_mg(sv, ptr)          \
8703    STMT_START {                         \
8704      SV *TeMpSv = sv;                   \
8705      sv_catpv(TeMpSv,ptr);              \
8706      SvSETMAGIC(TeMpSv);                \
8707    } STMT_END
8708 #endif
8709
8710 #ifndef sv_catpvn_mg
8711 #  define sv_catpvn_mg(sv, ptr, len)    \
8712    STMT_START {                         \
8713      SV *TeMpSv = sv;                   \
8714      sv_catpvn(TeMpSv,ptr,len);         \
8715      SvSETMAGIC(TeMpSv);                \
8716    } STMT_END
8717 #endif
8718
8719 #ifndef sv_catsv_mg
8720 #  define sv_catsv_mg(dsv, ssv)         \
8721    STMT_START {                         \
8722      SV *TeMpSv = dsv;                  \
8723      sv_catsv(TeMpSv,ssv);              \
8724      SvSETMAGIC(TeMpSv);                \
8725    } STMT_END
8726 #endif
8727
8728 #ifndef sv_setiv_mg
8729 #  define sv_setiv_mg(sv, i)            \
8730    STMT_START {                         \
8731      SV *TeMpSv = sv;                   \
8732      sv_setiv(TeMpSv,i);                \
8733      SvSETMAGIC(TeMpSv);                \
8734    } STMT_END
8735 #endif
8736
8737 #ifndef sv_setnv_mg
8738 #  define sv_setnv_mg(sv, num)          \
8739    STMT_START {                         \
8740      SV *TeMpSv = sv;                   \
8741      sv_setnv(TeMpSv,num);              \
8742      SvSETMAGIC(TeMpSv);                \
8743    } STMT_END
8744 #endif
8745
8746 #ifndef sv_setpv_mg
8747 #  define sv_setpv_mg(sv, ptr)          \
8748    STMT_START {                         \
8749      SV *TeMpSv = sv;                   \
8750      sv_setpv(TeMpSv,ptr);              \
8751      SvSETMAGIC(TeMpSv);                \
8752    } STMT_END
8753 #endif
8754
8755 #ifndef sv_setpvn_mg
8756 #  define sv_setpvn_mg(sv, ptr, len)    \
8757    STMT_START {                         \
8758      SV *TeMpSv = sv;                   \
8759      sv_setpvn(TeMpSv,ptr,len);         \
8760      SvSETMAGIC(TeMpSv);                \
8761    } STMT_END
8762 #endif
8763
8764 #ifndef sv_setsv_mg
8765 #  define sv_setsv_mg(dsv, ssv)         \
8766    STMT_START {                         \
8767      SV *TeMpSv = dsv;                  \
8768      sv_setsv(TeMpSv,ssv);              \
8769      SvSETMAGIC(TeMpSv);                \
8770    } STMT_END
8771 #endif
8772
8773 #ifndef sv_setuv_mg
8774 #  define sv_setuv_mg(sv, i)            \
8775    STMT_START {                         \
8776      SV *TeMpSv = sv;                   \
8777      sv_setuv(TeMpSv,i);                \
8778      SvSETMAGIC(TeMpSv);                \
8779    } STMT_END
8780 #endif
8781
8782 #ifndef sv_usepvn_mg
8783 #  define sv_usepvn_mg(sv, ptr, len)    \
8784    STMT_START {                         \
8785      SV *TeMpSv = sv;                   \
8786      sv_usepvn(TeMpSv,ptr,len);         \
8787      SvSETMAGIC(TeMpSv);                \
8788    } STMT_END
8789 #endif
8790 #ifndef SvVSTRING_mg
8791 #  define SvVSTRING_mg(sv)               (SvMAGICAL(sv) ? mg_find(sv, PERL_MAGIC_vstring) : NULL)
8792 #endif
8793
8794 /* Hint: sv_magic_portable
8795  * This is a compatibility function that is only available with
8796  * Devel::PPPort. It is NOT in the perl core.
8797  * Its purpose is to mimic the 5.8.0 behaviour of sv_magic() when
8798  * it is being passed a name pointer with namlen == 0. In that
8799  * case, perl 5.8.0 and later store the pointer, not a copy of it.
8800  * The compatibility can be provided back to perl 5.004. With
8801  * earlier versions, the code will not compile.
8802  */
8803
8804 #if (PERL_BCDVERSION < 0x5004000)
8805
8806   /* code that uses sv_magic_portable will not compile */
8807
8808 #elif (PERL_BCDVERSION < 0x5008000)
8809
8810 #  define sv_magic_portable(sv, obj, how, name, namlen)     \
8811    STMT_START {                                             \
8812      SV *SvMp_sv = (sv);                                    \
8813      char *SvMp_name = (char *) (name);                     \
8814      I32 SvMp_namlen = (namlen);                            \
8815      if (SvMp_name && SvMp_namlen == 0)                     \
8816      {                                                      \
8817        MAGIC *mg;                                           \
8818        sv_magic(SvMp_sv, obj, how, 0, 0);                   \
8819        mg = SvMAGIC(SvMp_sv);                               \
8820        mg->mg_len = -42; /* XXX: this is the tricky part */ \
8821        mg->mg_ptr = SvMp_name;                              \
8822      }                                                      \
8823      else                                                   \
8824      {                                                      \
8825        sv_magic(SvMp_sv, obj, how, SvMp_name, SvMp_namlen); \
8826      }                                                      \
8827    } STMT_END
8828
8829 #else
8830
8831 #  define sv_magic_portable(a, b, c, d, e)  sv_magic(a, b, c, d, e)
8832
8833 #endif
8834
8835 #if !defined(mg_findext)
8836 #if defined(NEED_mg_findext)
8837 static MAGIC * DPPP_(my_mg_findext)(const SV * sv, int type, const MGVTBL * vtbl);
8838 static
8839 #else
8840 extern MAGIC * DPPP_(my_mg_findext)(const SV * sv, int type, const MGVTBL * vtbl);
8841 #endif
8842
8843 #if defined(NEED_mg_findext) || defined(NEED_mg_findext_GLOBAL)
8844
8845 #define mg_findext DPPP_(my_mg_findext)
8846 #define Perl_mg_findext DPPP_(my_mg_findext)
8847
8848
8849 MAGIC *
8850 DPPP_(my_mg_findext)(const SV * sv, int type, const MGVTBL *vtbl) {
8851     if (sv) {
8852         MAGIC *mg;
8853
8854 #ifdef AvPAD_NAMELIST
8855         assert(!(SvTYPE(sv) == SVt_PVAV && AvPAD_NAMELIST(sv)));
8856 #endif
8857
8858         for (mg = SvMAGIC (sv); mg; mg = mg->mg_moremagic) {
8859             if (mg->mg_type == type && mg->mg_virtual == vtbl)
8860                 return mg;
8861         }
8862     }
8863
8864     return NULL;
8865 }
8866
8867 #endif
8868 #endif
8869
8870 #if !defined(sv_unmagicext)
8871 #if defined(NEED_sv_unmagicext)
8872 static int DPPP_(my_sv_unmagicext)(pTHX_ SV * const sv, const int type, MGVTBL * vtbl);
8873 static
8874 #else
8875 extern int DPPP_(my_sv_unmagicext)(pTHX_ SV * const sv, const int type, MGVTBL * vtbl);
8876 #endif
8877
8878 #if defined(NEED_sv_unmagicext) || defined(NEED_sv_unmagicext_GLOBAL)
8879
8880 #ifdef sv_unmagicext
8881 #  undef sv_unmagicext
8882 #endif
8883 #define sv_unmagicext(a,b,c) DPPP_(my_sv_unmagicext)(aTHX_ a,b,c)
8884 #define Perl_sv_unmagicext DPPP_(my_sv_unmagicext)
8885
8886
8887 int
8888 DPPP_(my_sv_unmagicext)(pTHX_ SV *const sv, const int type, MGVTBL *vtbl)
8889 {
8890     MAGIC* mg;
8891     MAGIC** mgp;
8892
8893     if (SvTYPE(sv) < SVt_PVMG || !SvMAGIC(sv))
8894         return 0;
8895     mgp = &(SvMAGIC(sv));
8896     for (mg = *mgp; mg; mg = *mgp) {
8897         const MGVTBL* const virt = mg->mg_virtual;
8898         if (mg->mg_type == type && virt == vtbl) {
8899             *mgp = mg->mg_moremagic;
8900             if (virt && virt->svt_free)
8901                 virt->svt_free(aTHX_ sv, mg);
8902             if (mg->mg_ptr && mg->mg_type != PERL_MAGIC_regex_global) {
8903                 if (mg->mg_len > 0)
8904                     Safefree(mg->mg_ptr);
8905                 else if (mg->mg_len == HEf_SVKEY) /* Questionable on older perls... */
8906                     SvREFCNT_dec(MUTABLE_SV(mg->mg_ptr));
8907                 else if (mg->mg_type == PERL_MAGIC_utf8)
8908                     Safefree(mg->mg_ptr);
8909             }
8910             if (mg->mg_flags & MGf_REFCOUNTED)
8911                 SvREFCNT_dec(mg->mg_obj);
8912             Safefree(mg);
8913         }
8914         else
8915             mgp = &mg->mg_moremagic;
8916     }
8917     if (SvMAGIC(sv)) {
8918         if (SvMAGICAL(sv))      /* if we're under save_magic, wait for restore_magic; */
8919             mg_magical(sv);     /*    else fix the flags now */
8920     }
8921     else {
8922         SvMAGICAL_off(sv);
8923         SvFLAGS(sv) |= (SvFLAGS(sv) & (SVp_IOK|SVp_NOK|SVp_POK)) >> PRIVSHIFT;
8924     }
8925     return 0;
8926 }
8927
8928 #endif
8929 #endif
8930
8931 #ifdef USE_ITHREADS
8932 #ifndef CopFILE
8933 #  define CopFILE(c)                     ((c)->cop_file)
8934 #endif
8935
8936 #ifndef CopFILEGV
8937 #  define CopFILEGV(c)                   (CopFILE(c) ? gv_fetchfile(CopFILE(c)) : Nullgv)
8938 #endif
8939
8940 #ifndef CopFILE_set
8941 #  define CopFILE_set(c,pv)              ((c)->cop_file = savepv(pv))
8942 #endif
8943
8944 #ifndef CopFILESV
8945 #  define CopFILESV(c)                   (CopFILE(c) ? GvSV(gv_fetchfile(CopFILE(c))) : Nullsv)
8946 #endif
8947
8948 #ifndef CopFILEAV
8949 #  define CopFILEAV(c)                   (CopFILE(c) ? GvAV(gv_fetchfile(CopFILE(c))) : Nullav)
8950 #endif
8951
8952 #ifndef CopSTASHPV
8953 #  define CopSTASHPV(c)                  ((c)->cop_stashpv)
8954 #endif
8955
8956 #ifndef CopSTASHPV_set
8957 #  define CopSTASHPV_set(c,pv)           ((c)->cop_stashpv = ((pv) ? savepv(pv) : Nullch))
8958 #endif
8959
8960 #ifndef CopSTASH
8961 #  define CopSTASH(c)                    (CopSTASHPV(c) ? gv_stashpv(CopSTASHPV(c),GV_ADD) : Nullhv)
8962 #endif
8963
8964 #ifndef CopSTASH_set
8965 #  define CopSTASH_set(c,hv)             CopSTASHPV_set(c, (hv) ? HvNAME(hv) : Nullch)
8966 #endif
8967
8968 #ifndef CopSTASH_eq
8969 #  define CopSTASH_eq(c,hv)              ((hv) && (CopSTASHPV(c) == HvNAME(hv) \
8970                                         || (CopSTASHPV(c) && HvNAME(hv) \
8971                                         && strEQ(CopSTASHPV(c), HvNAME(hv)))))
8972 #endif
8973
8974 #else
8975 #ifndef CopFILEGV
8976 #  define CopFILEGV(c)                   ((c)->cop_filegv)
8977 #endif
8978
8979 #ifndef CopFILEGV_set
8980 #  define CopFILEGV_set(c,gv)            ((c)->cop_filegv = (GV*)SvREFCNT_inc(gv))
8981 #endif
8982
8983 #ifndef CopFILE_set
8984 #  define CopFILE_set(c,pv)              CopFILEGV_set((c), gv_fetchfile(pv))
8985 #endif
8986
8987 #ifndef CopFILESV
8988 #  define CopFILESV(c)                   (CopFILEGV(c) ? GvSV(CopFILEGV(c)) : Nullsv)
8989 #endif
8990
8991 #ifndef CopFILEAV
8992 #  define CopFILEAV(c)                   (CopFILEGV(c) ? GvAV(CopFILEGV(c)) : Nullav)
8993 #endif
8994
8995 #ifndef CopFILE
8996 #  define CopFILE(c)                     (CopFILESV(c) ? SvPVX(CopFILESV(c)) : Nullch)
8997 #endif
8998
8999 #ifndef CopSTASH
9000 #  define CopSTASH(c)                    ((c)->cop_stash)
9001 #endif
9002
9003 #ifndef CopSTASH_set
9004 #  define CopSTASH_set(c,hv)             ((c)->cop_stash = (hv))
9005 #endif
9006
9007 #ifndef CopSTASHPV
9008 #  define CopSTASHPV(c)                  (CopSTASH(c) ? HvNAME(CopSTASH(c)) : Nullch)
9009 #endif
9010
9011 #ifndef CopSTASHPV_set
9012 #  define CopSTASHPV_set(c,pv)           CopSTASH_set((c), gv_stashpv(pv,GV_ADD))
9013 #endif
9014
9015 #ifndef CopSTASH_eq
9016 #  define CopSTASH_eq(c,hv)              (CopSTASH(c) == (hv))
9017 #endif
9018
9019 #endif /* USE_ITHREADS */
9020
9021 #if (PERL_BCDVERSION >= 0x5006000)
9022 #ifndef caller_cx
9023
9024 # if defined(NEED_caller_cx) || defined(NEED_caller_cx_GLOBAL)
9025 static I32
9026 DPPP_dopoptosub_at(const PERL_CONTEXT *cxstk, I32 startingblock)
9027 {
9028     I32 i;
9029
9030     for (i = startingblock; i >= 0; i--) {
9031         register const PERL_CONTEXT * const cx = &cxstk[i];
9032         switch (CxTYPE(cx)) {
9033         default:
9034             continue;
9035         case CXt_EVAL:
9036         case CXt_SUB:
9037         case CXt_FORMAT:
9038             return i;
9039         }
9040     }
9041     return i;
9042 }
9043 # endif
9044
9045 # if defined(NEED_caller_cx)
9046 static const PERL_CONTEXT * DPPP_(my_caller_cx)(pTHX_ I32 level, const PERL_CONTEXT *  * dbcxp);
9047 static
9048 #else
9049 extern const PERL_CONTEXT * DPPP_(my_caller_cx)(pTHX_ I32 level, const PERL_CONTEXT *  * dbcxp);
9050 #endif
9051
9052 #if defined(NEED_caller_cx) || defined(NEED_caller_cx_GLOBAL)
9053
9054 #ifdef caller_cx
9055 #  undef caller_cx
9056 #endif
9057 #define caller_cx(a,b) DPPP_(my_caller_cx)(aTHX_ a,b)
9058 #define Perl_caller_cx DPPP_(my_caller_cx)
9059
9060
9061 const PERL_CONTEXT *
9062 DPPP_(my_caller_cx)(pTHX_ I32 level, const PERL_CONTEXT **dbcxp)
9063 {
9064     register I32 cxix = DPPP_dopoptosub_at(cxstack, cxstack_ix);
9065     register const PERL_CONTEXT *cx;
9066     register const PERL_CONTEXT *ccstack = cxstack;
9067     const PERL_SI *top_si = PL_curstackinfo;
9068
9069     for (;;) {
9070         /* we may be in a higher stacklevel, so dig down deeper */
9071         while (cxix < 0 && top_si->si_type != PERLSI_MAIN) {
9072             top_si = top_si->si_prev;
9073             ccstack = top_si->si_cxstack;
9074             cxix = DPPP_dopoptosub_at(ccstack, top_si->si_cxix);
9075         }
9076         if (cxix < 0)
9077             return NULL;
9078         /* caller() should not report the automatic calls to &DB::sub */
9079         if (PL_DBsub && GvCV(PL_DBsub) && cxix >= 0 &&
9080                 ccstack[cxix].blk_sub.cv == GvCV(PL_DBsub))
9081             level++;
9082         if (!level--)
9083             break;
9084         cxix = DPPP_dopoptosub_at(ccstack, cxix - 1);
9085     }
9086
9087     cx = &ccstack[cxix];
9088     if (dbcxp) *dbcxp = cx;
9089
9090     if (CxTYPE(cx) == CXt_SUB || CxTYPE(cx) == CXt_FORMAT) {
9091         const I32 dbcxix = DPPP_dopoptosub_at(ccstack, cxix - 1);
9092         /* We expect that ccstack[dbcxix] is CXt_SUB, anyway, the
9093            field below is defined for any cx. */
9094         /* caller() should not report the automatic calls to &DB::sub */
9095         if (PL_DBsub && GvCV(PL_DBsub) && dbcxix >= 0 && ccstack[dbcxix].blk_sub.cv == GvCV(PL_DBsub))
9096             cx = &ccstack[dbcxix];
9097     }
9098
9099     return cx;
9100 }
9101
9102 # endif
9103 #endif /* caller_cx */
9104 #endif /* 5.6.0 */
9105 #ifndef IN_PERL_COMPILETIME
9106 #  define IN_PERL_COMPILETIME            (PL_curcop == &PL_compiling)
9107 #endif
9108
9109 #ifndef IN_LOCALE_RUNTIME
9110 #  define IN_LOCALE_RUNTIME              (PL_curcop->op_private & HINT_LOCALE)
9111 #endif
9112
9113 #ifndef IN_LOCALE_COMPILETIME
9114 #  define IN_LOCALE_COMPILETIME          (PL_hints & HINT_LOCALE)
9115 #endif
9116
9117 #ifndef IN_LOCALE
9118 #  define IN_LOCALE                      (IN_PERL_COMPILETIME ? IN_LOCALE_COMPILETIME : IN_LOCALE_RUNTIME)
9119 #endif
9120 #ifndef IS_NUMBER_IN_UV
9121 #  define IS_NUMBER_IN_UV                0x01
9122 #endif
9123
9124 #ifndef IS_NUMBER_GREATER_THAN_UV_MAX
9125 #  define IS_NUMBER_GREATER_THAN_UV_MAX  0x02
9126 #endif
9127
9128 #ifndef IS_NUMBER_NOT_INT
9129 #  define IS_NUMBER_NOT_INT              0x04
9130 #endif
9131
9132 #ifndef IS_NUMBER_NEG
9133 #  define IS_NUMBER_NEG                  0x08
9134 #endif
9135
9136 #ifndef IS_NUMBER_INFINITY
9137 #  define IS_NUMBER_INFINITY             0x10
9138 #endif
9139
9140 #ifndef IS_NUMBER_NAN
9141 #  define IS_NUMBER_NAN                  0x20
9142 #endif
9143 #ifndef GROK_NUMERIC_RADIX
9144 #  define GROK_NUMERIC_RADIX(sp, send)   grok_numeric_radix(sp, send)
9145 #endif
9146 #ifndef PERL_SCAN_GREATER_THAN_UV_MAX
9147 #  define PERL_SCAN_GREATER_THAN_UV_MAX  0x02
9148 #endif
9149
9150 #ifndef PERL_SCAN_SILENT_ILLDIGIT
9151 #  define PERL_SCAN_SILENT_ILLDIGIT      0x04
9152 #endif
9153
9154 #ifndef PERL_SCAN_ALLOW_UNDERSCORES
9155 #  define PERL_SCAN_ALLOW_UNDERSCORES    0x01
9156 #endif
9157
9158 #ifndef PERL_SCAN_DISALLOW_PREFIX
9159 #  define PERL_SCAN_DISALLOW_PREFIX      0x02
9160 #endif
9161
9162 #ifndef grok_numeric_radix
9163 #if defined(NEED_grok_numeric_radix)
9164 static bool DPPP_(my_grok_numeric_radix)(pTHX_ const char *  * sp, const char * send);
9165 static
9166 #else
9167 extern bool DPPP_(my_grok_numeric_radix)(pTHX_ const char *  * sp, const char * send);
9168 #endif
9169
9170 #if defined(NEED_grok_numeric_radix) || defined(NEED_grok_numeric_radix_GLOBAL)
9171
9172 #ifdef grok_numeric_radix
9173 #  undef grok_numeric_radix
9174 #endif
9175 #define grok_numeric_radix(a,b) DPPP_(my_grok_numeric_radix)(aTHX_ a,b)
9176 #define Perl_grok_numeric_radix DPPP_(my_grok_numeric_radix)
9177
9178 bool
9179 DPPP_(my_grok_numeric_radix)(pTHX_ const char **sp, const char *send)
9180 {
9181 #ifdef USE_LOCALE_NUMERIC
9182 #ifdef PL_numeric_radix_sv
9183     if (PL_numeric_radix_sv && IN_LOCALE) {
9184         STRLEN len;
9185         char* radix = SvPV(PL_numeric_radix_sv, len);
9186         if (*sp + len <= send && memEQ(*sp, radix, len)) {
9187             *sp += len;
9188             return TRUE;
9189         }
9190     }
9191 #else
9192     /* older perls don't have PL_numeric_radix_sv so the radix
9193      * must manually be requested from locale.h
9194      */
9195 #include <locale.h>
9196     dTHR;  /* needed for older threaded perls */
9197     struct lconv *lc = localeconv();
9198     char *radix = lc->decimal_point;
9199     if (radix && IN_LOCALE) {
9200         STRLEN len = strlen(radix);
9201         if (*sp + len <= send && memEQ(*sp, radix, len)) {
9202             *sp += len;
9203             return TRUE;
9204         }
9205     }
9206 #endif
9207 #endif /* USE_LOCALE_NUMERIC */
9208     /* always try "." if numeric radix didn't match because
9209      * we may have data from different locales mixed */
9210     if (*sp < send && **sp == '.') {
9211         ++*sp;
9212         return TRUE;
9213     }
9214     return FALSE;
9215 }
9216 #endif
9217 #endif
9218
9219 #ifndef grok_number
9220 #if defined(NEED_grok_number)
9221 static int DPPP_(my_grok_number)(pTHX_ const char * pv, STRLEN len, UV * valuep);
9222 static
9223 #else
9224 extern int DPPP_(my_grok_number)(pTHX_ const char * pv, STRLEN len, UV * valuep);
9225 #endif
9226
9227 #if defined(NEED_grok_number) || defined(NEED_grok_number_GLOBAL)
9228
9229 #ifdef grok_number
9230 #  undef grok_number
9231 #endif
9232 #define grok_number(a,b,c) DPPP_(my_grok_number)(aTHX_ a,b,c)
9233 #define Perl_grok_number DPPP_(my_grok_number)
9234
9235 int
9236 DPPP_(my_grok_number)(pTHX_ const char *pv, STRLEN len, UV *valuep)
9237 {
9238   const char *s = pv;
9239   const char *send = pv + len;
9240   const UV max_div_10 = UV_MAX / 10;
9241   const char max_mod_10 = UV_MAX % 10;
9242   int numtype = 0;
9243   int sawinf = 0;
9244   int sawnan = 0;
9245
9246   while (s < send && isSPACE(*s))
9247     s++;
9248   if (s == send) {
9249     return 0;
9250   } else if (*s == '-') {
9251     s++;
9252     numtype = IS_NUMBER_NEG;
9253   }
9254   else if (*s == '+')
9255   s++;
9256
9257   if (s == send)
9258     return 0;
9259
9260   /* next must be digit or the radix separator or beginning of infinity */
9261   if (isDIGIT(*s)) {
9262     /* UVs are at least 32 bits, so the first 9 decimal digits cannot
9263        overflow.  */
9264     UV value = *s - '0';
9265     /* This construction seems to be more optimiser friendly.
9266        (without it gcc does the isDIGIT test and the *s - '0' separately)
9267        With it gcc on arm is managing 6 instructions (6 cycles) per digit.
9268        In theory the optimiser could deduce how far to unroll the loop
9269        before checking for overflow.  */
9270     if (++s < send) {
9271       int digit = *s - '0';
9272       if (digit >= 0 && digit <= 9) {
9273         value = value * 10 + digit;
9274         if (++s < send) {
9275           digit = *s - '0';
9276           if (digit >= 0 && digit <= 9) {
9277             value = value * 10 + digit;
9278             if (++s < send) {
9279               digit = *s - '0';
9280               if (digit >= 0 && digit <= 9) {
9281                 value = value * 10 + digit;
9282                 if (++s < send) {
9283                   digit = *s - '0';
9284                   if (digit >= 0 && digit <= 9) {
9285                     value = value * 10 + digit;
9286                     if (++s < send) {
9287                       digit = *s - '0';
9288                       if (digit >= 0 && digit <= 9) {
9289                         value = value * 10 + digit;
9290                         if (++s < send) {
9291                           digit = *s - '0';
9292                           if (digit >= 0 && digit <= 9) {
9293                             value = value * 10 + digit;
9294                             if (++s < send) {
9295                               digit = *s - '0';
9296                               if (digit >= 0 && digit <= 9) {
9297                                 value = value * 10 + digit;
9298                                 if (++s < send) {
9299                                   digit = *s - '0';
9300                                   if (digit >= 0 && digit <= 9) {
9301                                     value = value * 10 + digit;
9302                                     if (++s < send) {
9303                                       /* Now got 9 digits, so need to check
9304                                          each time for overflow.  */
9305                                       digit = *s - '0';
9306                                       while (digit >= 0 && digit <= 9
9307                                              && (value < max_div_10
9308                                                  || (value == max_div_10
9309                                                      && digit <= max_mod_10))) {
9310                                         value = value * 10 + digit;
9311                                         if (++s < send)
9312                                           digit = *s - '0';
9313                                         else
9314                                           break;
9315                                       }
9316                                       if (digit >= 0 && digit <= 9
9317                                           && (s < send)) {
9318                                         /* value overflowed.
9319                                            skip the remaining digits, don't
9320                                            worry about setting *valuep.  */
9321                                         do {
9322                                           s++;
9323                                         } while (s < send && isDIGIT(*s));
9324                                         numtype |=
9325                                           IS_NUMBER_GREATER_THAN_UV_MAX;
9326                                         goto skip_value;
9327                                       }
9328                                     }
9329                                   }
9330                                 }
9331                               }
9332                             }
9333                           }
9334                         }
9335                       }
9336                     }
9337                   }
9338                 }
9339               }
9340             }
9341           }
9342         }
9343       }
9344     }
9345     numtype |= IS_NUMBER_IN_UV;
9346     if (valuep)
9347       *valuep = value;
9348
9349   skip_value:
9350     if (GROK_NUMERIC_RADIX(&s, send)) {
9351       numtype |= IS_NUMBER_NOT_INT;
9352       while (s < send && isDIGIT(*s))  /* optional digits after the radix */
9353         s++;
9354     }
9355   }
9356   else if (GROK_NUMERIC_RADIX(&s, send)) {
9357     numtype |= IS_NUMBER_NOT_INT | IS_NUMBER_IN_UV; /* valuep assigned below */
9358     /* no digits before the radix means we need digits after it */
9359     if (s < send && isDIGIT(*s)) {
9360       do {
9361         s++;
9362       } while (s < send && isDIGIT(*s));
9363       if (valuep) {
9364         /* integer approximation is valid - it's 0.  */
9365         *valuep = 0;
9366       }
9367     }
9368     else
9369       return 0;
9370   } else if (*s == 'I' || *s == 'i') {
9371     s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
9372     s++; if (s == send || (*s != 'F' && *s != 'f')) return 0;
9373     s++; if (s < send && (*s == 'I' || *s == 'i')) {
9374       s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
9375       s++; if (s == send || (*s != 'I' && *s != 'i')) return 0;
9376       s++; if (s == send || (*s != 'T' && *s != 't')) return 0;
9377       s++; if (s == send || (*s != 'Y' && *s != 'y')) return 0;
9378       s++;
9379     }
9380     sawinf = 1;
9381   } else if (*s == 'N' || *s == 'n') {
9382     /* XXX TODO: There are signaling NaNs and quiet NaNs. */
9383     s++; if (s == send || (*s != 'A' && *s != 'a')) return 0;
9384     s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
9385     s++;
9386     sawnan = 1;
9387   } else
9388     return 0;
9389
9390   if (sawinf) {
9391     numtype &= IS_NUMBER_NEG; /* Keep track of sign  */
9392     numtype |= IS_NUMBER_INFINITY | IS_NUMBER_NOT_INT;
9393   } else if (sawnan) {
9394     numtype &= IS_NUMBER_NEG; /* Keep track of sign  */
9395     numtype |= IS_NUMBER_NAN | IS_NUMBER_NOT_INT;
9396   } else if (s < send) {
9397     /* we can have an optional exponent part */
9398     if (*s == 'e' || *s == 'E') {
9399       /* The only flag we keep is sign.  Blow away any "it's UV"  */
9400       numtype &= IS_NUMBER_NEG;
9401       numtype |= IS_NUMBER_NOT_INT;
9402       s++;
9403       if (s < send && (*s == '-' || *s == '+'))
9404         s++;
9405       if (s < send && isDIGIT(*s)) {
9406         do {
9407           s++;
9408         } while (s < send && isDIGIT(*s));
9409       }
9410       else
9411       return 0;
9412     }
9413   }
9414   while (s < send && isSPACE(*s))
9415     s++;
9416   if (s >= send)
9417     return numtype;
9418   if (len == 10 && memEQ(pv, "0 but true", 10)) {
9419     if (valuep)
9420       *valuep = 0;
9421     return IS_NUMBER_IN_UV;
9422   }
9423   return 0;
9424 }
9425 #endif
9426 #endif
9427
9428 /*
9429  * The grok_* routines have been modified to use warn() instead of
9430  * Perl_warner(). Also, 'hexdigit' was the former name of PL_hexdigit,
9431  * which is why the stack variable has been renamed to 'xdigit'.
9432  */
9433
9434 #ifndef grok_bin
9435 #if defined(NEED_grok_bin)
9436 static UV DPPP_(my_grok_bin)(pTHX_ const char * start, STRLEN * len_p, I32 * flags, NV * result);
9437 static
9438 #else
9439 extern UV DPPP_(my_grok_bin)(pTHX_ const char * start, STRLEN * len_p, I32 * flags, NV * result);
9440 #endif
9441
9442 #if defined(NEED_grok_bin) || defined(NEED_grok_bin_GLOBAL)
9443
9444 #ifdef grok_bin
9445 #  undef grok_bin
9446 #endif
9447 #define grok_bin(a,b,c,d) DPPP_(my_grok_bin)(aTHX_ a,b,c,d)
9448 #define Perl_grok_bin DPPP_(my_grok_bin)
9449
9450 UV
9451 DPPP_(my_grok_bin)(pTHX_ const char *start, STRLEN *len_p, I32 *flags, NV *result)
9452 {
9453     const char *s = start;
9454     STRLEN len = *len_p;
9455     UV value = 0;
9456     NV value_nv = 0;
9457
9458     const UV max_div_2 = UV_MAX / 2;
9459     bool allow_underscores = *flags & PERL_SCAN_ALLOW_UNDERSCORES;
9460     bool overflowed = FALSE;
9461
9462     if (!(*flags & PERL_SCAN_DISALLOW_PREFIX)) {
9463         /* strip off leading b or 0b.
9464            for compatibility silently suffer "b" and "0b" as valid binary
9465            numbers. */
9466         if (len >= 1) {
9467             if (s[0] == 'b') {
9468                 s++;
9469                 len--;
9470             }
9471             else if (len >= 2 && s[0] == '0' && s[1] == 'b') {
9472                 s+=2;
9473                 len-=2;
9474             }
9475         }
9476     }
9477
9478     for (; len-- && *s; s++) {
9479         char bit = *s;
9480         if (bit == '0' || bit == '1') {
9481             /* Write it in this wonky order with a goto to attempt to get the
9482                compiler to make the common case integer-only loop pretty tight.
9483                With gcc seems to be much straighter code than old scan_bin.  */
9484           redo:
9485             if (!overflowed) {
9486                 if (value <= max_div_2) {
9487                     value = (value << 1) | (bit - '0');
9488                     continue;
9489                 }
9490                 /* Bah. We're just overflowed.  */
9491                 warn("Integer overflow in binary number");
9492                 overflowed = TRUE;
9493                 value_nv = (NV) value;
9494             }
9495             value_nv *= 2.0;
9496             /* If an NV has not enough bits in its mantissa to
9497              * represent a UV this summing of small low-order numbers
9498              * is a waste of time (because the NV cannot preserve
9499              * the low-order bits anyway): we could just remember when
9500              * did we overflow and in the end just multiply value_nv by the
9501              * right amount. */
9502             value_nv += (NV)(bit - '0');
9503             continue;
9504         }
9505         if (bit == '_' && len && allow_underscores && (bit = s[1])
9506             && (bit == '0' || bit == '1'))
9507             {
9508                 --len;
9509                 ++s;
9510                 goto redo;
9511             }
9512         if (!(*flags & PERL_SCAN_SILENT_ILLDIGIT))
9513             warn("Illegal binary digit '%c' ignored", *s);
9514         break;
9515     }
9516
9517     if (   ( overflowed && value_nv > 4294967295.0)
9518 #if UVSIZE > 4
9519         || (!overflowed && value > 0xffffffff  )
9520 #endif
9521         ) {
9522         warn("Binary number > 0b11111111111111111111111111111111 non-portable");
9523     }
9524     *len_p = s - start;
9525     if (!overflowed) {
9526         *flags = 0;
9527         return value;
9528     }
9529     *flags = PERL_SCAN_GREATER_THAN_UV_MAX;
9530     if (result)
9531         *result = value_nv;
9532     return UV_MAX;
9533 }
9534 #endif
9535 #endif
9536
9537 #ifndef grok_hex
9538 #if defined(NEED_grok_hex)
9539 static UV DPPP_(my_grok_hex)(pTHX_ const char * start, STRLEN * len_p, I32 * flags, NV * result);
9540 static
9541 #else
9542 extern UV DPPP_(my_grok_hex)(pTHX_ const char * start, STRLEN * len_p, I32 * flags, NV * result);
9543 #endif
9544
9545 #if defined(NEED_grok_hex) || defined(NEED_grok_hex_GLOBAL)
9546
9547 #ifdef grok_hex
9548 #  undef grok_hex
9549 #endif
9550 #define grok_hex(a,b,c,d) DPPP_(my_grok_hex)(aTHX_ a,b,c,d)
9551 #define Perl_grok_hex DPPP_(my_grok_hex)
9552
9553 UV
9554 DPPP_(my_grok_hex)(pTHX_ const char *start, STRLEN *len_p, I32 *flags, NV *result)
9555 {
9556     const char *s = start;
9557     STRLEN len = *len_p;
9558     UV value = 0;
9559     NV value_nv = 0;
9560
9561     const UV max_div_16 = UV_MAX / 16;
9562     bool allow_underscores = *flags & PERL_SCAN_ALLOW_UNDERSCORES;
9563     bool overflowed = FALSE;
9564     const char *xdigit;
9565
9566     if (!(*flags & PERL_SCAN_DISALLOW_PREFIX)) {
9567         /* strip off leading x or 0x.
9568            for compatibility silently suffer "x" and "0x" as valid hex numbers.
9569         */
9570         if (len >= 1) {
9571             if (s[0] == 'x') {
9572                 s++;
9573                 len--;
9574             }
9575             else if (len >= 2 && s[0] == '0' && s[1] == 'x') {
9576                 s+=2;
9577                 len-=2;
9578             }
9579         }
9580     }
9581
9582     for (; len-- && *s; s++) {
9583         xdigit = strchr((char *) PL_hexdigit, *s);
9584         if (xdigit) {
9585             /* Write it in this wonky order with a goto to attempt to get the
9586                compiler to make the common case integer-only loop pretty tight.
9587                With gcc seems to be much straighter code than old scan_hex.  */
9588           redo:
9589             if (!overflowed) {
9590                 if (value <= max_div_16) {
9591                     value = (value << 4) | ((xdigit - PL_hexdigit) & 15);
9592                     continue;
9593                 }
9594                 warn("Integer overflow in hexadecimal number");
9595                 overflowed = TRUE;
9596                 value_nv = (NV) value;
9597             }
9598             value_nv *= 16.0;
9599             /* If an NV has not enough bits in its mantissa to
9600              * represent a UV this summing of small low-order numbers
9601              * is a waste of time (because the NV cannot preserve
9602              * the low-order bits anyway): we could just remember when
9603              * did we overflow and in the end just multiply value_nv by the
9604              * right amount of 16-tuples. */
9605             value_nv += (NV)((xdigit - PL_hexdigit) & 15);
9606             continue;
9607         }
9608         if (*s == '_' && len && allow_underscores && s[1]
9609                 && (xdigit = strchr((char *) PL_hexdigit, s[1])))
9610             {
9611                 --len;
9612                 ++s;
9613                 goto redo;
9614             }
9615         if (!(*flags & PERL_SCAN_SILENT_ILLDIGIT))
9616             warn("Illegal hexadecimal digit '%c' ignored", *s);
9617         break;
9618     }
9619
9620     if (   ( overflowed && value_nv > 4294967295.0)
9621 #if UVSIZE > 4
9622         || (!overflowed && value > 0xffffffff  )
9623 #endif
9624         ) {
9625         warn("Hexadecimal number > 0xffffffff non-portable");
9626     }
9627     *len_p = s - start;
9628     if (!overflowed) {
9629         *flags = 0;
9630         return value;
9631     }
9632     *flags = PERL_SCAN_GREATER_THAN_UV_MAX;
9633     if (result)
9634         *result = value_nv;
9635     return UV_MAX;
9636 }
9637 #endif
9638 #endif
9639
9640 #ifndef grok_oct
9641 #if defined(NEED_grok_oct)
9642 static UV DPPP_(my_grok_oct)(pTHX_ const char * start, STRLEN * len_p, I32 * flags, NV * result);
9643 static
9644 #else
9645 extern UV DPPP_(my_grok_oct)(pTHX_ const char * start, STRLEN * len_p, I32 * flags, NV * result);
9646 #endif
9647
9648 #if defined(NEED_grok_oct) || defined(NEED_grok_oct_GLOBAL)
9649
9650 #ifdef grok_oct
9651 #  undef grok_oct
9652 #endif
9653 #define grok_oct(a,b,c,d) DPPP_(my_grok_oct)(aTHX_ a,b,c,d)
9654 #define Perl_grok_oct DPPP_(my_grok_oct)
9655
9656 UV
9657 DPPP_(my_grok_oct)(pTHX_ const char *start, STRLEN *len_p, I32 *flags, NV *result)
9658 {
9659     const char *s = start;
9660     STRLEN len = *len_p;
9661     UV value = 0;
9662     NV value_nv = 0;
9663
9664     const UV max_div_8 = UV_MAX / 8;
9665     bool allow_underscores = *flags & PERL_SCAN_ALLOW_UNDERSCORES;
9666     bool overflowed = FALSE;
9667
9668     for (; len-- && *s; s++) {
9669          /* gcc 2.95 optimiser not smart enough to figure that this subtraction
9670             out front allows slicker code.  */
9671         int digit = *s - '0';
9672         if (digit >= 0 && digit <= 7) {
9673             /* Write it in this wonky order with a goto to attempt to get the
9674                compiler to make the common case integer-only loop pretty tight.
9675             */
9676           redo:
9677             if (!overflowed) {
9678                 if (value <= max_div_8) {
9679                     value = (value << 3) | digit;
9680                     continue;
9681                 }
9682                 /* Bah. We're just overflowed.  */
9683                 warn("Integer overflow in octal number");
9684                 overflowed = TRUE;
9685                 value_nv = (NV) value;
9686             }
9687             value_nv *= 8.0;
9688             /* If an NV has not enough bits in its mantissa to
9689              * represent a UV this summing of small low-order numbers
9690              * is a waste of time (because the NV cannot preserve
9691              * the low-order bits anyway): we could just remember when
9692              * did we overflow and in the end just multiply value_nv by the
9693              * right amount of 8-tuples. */
9694             value_nv += (NV)digit;
9695             continue;
9696         }
9697         if (digit == ('_' - '0') && len && allow_underscores
9698             && (digit = s[1] - '0') && (digit >= 0 && digit <= 7))
9699             {
9700                 --len;
9701                 ++s;
9702                 goto redo;
9703             }
9704         /* Allow \octal to work the DWIM way (that is, stop scanning
9705          * as soon as non-octal characters are seen, complain only iff
9706          * someone seems to want to use the digits eight and nine). */
9707         if (digit == 8 || digit == 9) {
9708             if (!(*flags & PERL_SCAN_SILENT_ILLDIGIT))
9709                 warn("Illegal octal digit '%c' ignored", *s);
9710         }
9711         break;
9712     }
9713
9714     if (   ( overflowed && value_nv > 4294967295.0)
9715 #if UVSIZE > 4
9716         || (!overflowed && value > 0xffffffff  )
9717 #endif
9718         ) {
9719         warn("Octal number > 037777777777 non-portable");
9720     }
9721     *len_p = s - start;
9722     if (!overflowed) {
9723         *flags = 0;
9724         return value;
9725     }
9726     *flags = PERL_SCAN_GREATER_THAN_UV_MAX;
9727     if (result)
9728         *result = value_nv;
9729     return UV_MAX;
9730 }
9731 #endif
9732 #endif
9733
9734 #if !defined(my_snprintf)
9735 #if defined(NEED_my_snprintf)
9736 static int DPPP_(my_my_snprintf)(char * buffer, const Size_t len, const char * format, ...);
9737 static
9738 #else
9739 extern int DPPP_(my_my_snprintf)(char * buffer, const Size_t len, const char * format, ...);
9740 #endif
9741
9742 #if defined(NEED_my_snprintf) || defined(NEED_my_snprintf_GLOBAL)
9743
9744 #define my_snprintf DPPP_(my_my_snprintf)
9745 #define Perl_my_snprintf DPPP_(my_my_snprintf)
9746
9747
9748 int
9749 DPPP_(my_my_snprintf)(char *buffer, const Size_t len, const char *format, ...)
9750 {
9751     dTHX;
9752     int retval;
9753     va_list ap;
9754     va_start(ap, format);
9755 #ifdef HAS_VSNPRINTF
9756     retval = vsnprintf(buffer, len, format, ap);
9757 #else
9758     retval = vsprintf(buffer, format, ap);
9759 #endif
9760     va_end(ap);
9761     if (retval < 0 || (len > 0 && (Size_t)retval >= len))
9762         Perl_croak(aTHX_ "panic: my_snprintf buffer overflow");
9763     return retval;
9764 }
9765
9766 #endif
9767 #endif
9768
9769 #if !defined(my_sprintf)
9770 #if defined(NEED_my_sprintf)
9771 static int DPPP_(my_my_sprintf)(char * buffer, const char * pat, ...);
9772 static
9773 #else
9774 extern int DPPP_(my_my_sprintf)(char * buffer, const char * pat, ...);
9775 #endif
9776
9777 #if defined(NEED_my_sprintf) || defined(NEED_my_sprintf_GLOBAL)
9778
9779 #define my_sprintf DPPP_(my_my_sprintf)
9780
9781
9782 /* Warning: my_sprintf
9783    It's safer to use my_snprintf instead
9784 */
9785
9786 /* Replace my_sprintf with my_snprintf */
9787
9788 int
9789 DPPP_(my_my_sprintf)(char *buffer, const char* pat, ...)
9790 {
9791     va_list args;
9792     va_start(args, pat);
9793     vsprintf(buffer, pat, args);
9794     va_end(args);
9795     return strlen(buffer);
9796 }
9797
9798 #endif
9799 #endif
9800
9801 #ifdef NO_XSLOCKS
9802 #  ifdef dJMPENV
9803 #    define dXCPT             dJMPENV; int rEtV = 0
9804 #    define XCPT_TRY_START    JMPENV_PUSH(rEtV); if (rEtV == 0)
9805 #    define XCPT_TRY_END      JMPENV_POP;
9806 #    define XCPT_CATCH        if (rEtV != 0)
9807 #    define XCPT_RETHROW      JMPENV_JUMP(rEtV)
9808 #  else
9809 #    define dXCPT             Sigjmp_buf oldTOP; int rEtV = 0
9810 #    define XCPT_TRY_START    Copy(top_env, oldTOP, 1, Sigjmp_buf); rEtV = Sigsetjmp(top_env, 1); if (rEtV == 0)
9811 #    define XCPT_TRY_END      Copy(oldTOP, top_env, 1, Sigjmp_buf);
9812 #    define XCPT_CATCH        if (rEtV != 0)
9813 #    define XCPT_RETHROW      Siglongjmp(top_env, rEtV)
9814 #  endif
9815 #endif
9816
9817 #if !defined(my_strlcat)
9818 #if defined(NEED_my_strlcat)
9819 static Size_t DPPP_(my_my_strlcat)(char * dst, const char * src, Size_t size);
9820 static
9821 #else
9822 extern Size_t DPPP_(my_my_strlcat)(char * dst, const char * src, Size_t size);
9823 #endif
9824
9825 #if defined(NEED_my_strlcat) || defined(NEED_my_strlcat_GLOBAL)
9826
9827 #define my_strlcat DPPP_(my_my_strlcat)
9828 #define Perl_my_strlcat DPPP_(my_my_strlcat)
9829
9830
9831 Size_t
9832 DPPP_(my_my_strlcat)(char *dst, const char *src, Size_t size)
9833 {
9834     Size_t used, length, copy;
9835
9836     used = strlen(dst);
9837     length = strlen(src);
9838     if (size > 0 && used < size - 1) {
9839         copy = (length >= size - used) ? size - used - 1 : length;
9840         memcpy(dst + used, src, copy);
9841         dst[used + copy] = '\0';
9842     }
9843     return used + length;
9844 }
9845 #endif
9846 #endif
9847
9848 #if !defined(my_strlcpy)
9849 #if defined(NEED_my_strlcpy)
9850 static Size_t DPPP_(my_my_strlcpy)(char * dst, const char * src, Size_t size);
9851 static
9852 #else
9853 extern Size_t DPPP_(my_my_strlcpy)(char * dst, const char * src, Size_t size);
9854 #endif
9855
9856 #if defined(NEED_my_strlcpy) || defined(NEED_my_strlcpy_GLOBAL)
9857
9858 #define my_strlcpy DPPP_(my_my_strlcpy)
9859 #define Perl_my_strlcpy DPPP_(my_my_strlcpy)
9860
9861
9862 Size_t
9863 DPPP_(my_my_strlcpy)(char *dst, const char *src, Size_t size)
9864 {
9865     Size_t length, copy;
9866
9867     length = strlen(src);
9868     if (size > 0) {
9869         copy = (length >= size) ? size - 1 : length;
9870         memcpy(dst, src, copy);
9871         dst[copy] = '\0';
9872     }
9873     return length;
9874 }
9875
9876 #endif
9877 #endif
9878
9879 #ifdef SVf_UTF8
9880 #ifndef SvUTF8
9881 #  define SvUTF8(sv)                     (SvFLAGS(sv) & SVf_UTF8)
9882 #endif
9883
9884 #endif
9885
9886 #if (PERL_BCDVERSION == 0x5019001) /* 5.19.1 does not have UTF8fARG, only broken UTF8f */
9887 #undef UTF8f
9888 #endif
9889
9890 #ifdef SVf_UTF8
9891 #ifndef UTF8f
9892 #  define UTF8f                          SVf
9893 #endif
9894
9895 #ifndef UTF8fARG
9896 #  define UTF8fARG(u,l,p)                newSVpvn_flags((p), (l), ((u) ? SVf_UTF8 : 0) | SVs_TEMP)
9897 #endif
9898
9899 #endif
9900
9901 #define D_PPP_MIN(a,b) (((a) <= (b)) ? (a) : (b))
9902 #ifndef UNICODE_REPLACEMENT
9903 #  define UNICODE_REPLACEMENT            0xFFFD
9904 #endif
9905
9906 #ifdef UTF8_MAXLEN
9907 #ifndef UTF8_MAXBYTES
9908 #  define UTF8_MAXBYTES                  UTF8_MAXLEN
9909 #endif
9910
9911 #endif
9912 #ifndef UTF_START_MARK
9913 #  define UTF_START_MARK(len)            \
9914                     (((len) >  7) ? 0xFF : (0xFF & (0xFE << (7-(len)))))
9915 #endif
9916
9917 #if (PERL_BCDVERSION < 0x5018000)     /* On non-EBCDIC was valid before this, */
9918                             /* but easier to just do one check */
9919 #  undef UTF8_MAXBYTES_CASE
9920 #endif
9921
9922 #if 'A' == 65
9923 #  define D_PPP_BYTE_INFO_BITS 6  /* 6 bits meaningful in continuation bytes */
9924 #ifndef UTF8_MAXBYTES_CASE
9925 #  define UTF8_MAXBYTES_CASE             13
9926 #endif
9927
9928 #else
9929 #  define D_PPP_BYTE_INFO_BITS 5  /* 5 bits meaningful in continuation bytes */
9930 #ifndef UTF8_MAXBYTES_CASE
9931 #  define UTF8_MAXBYTES_CASE             15
9932 #endif
9933
9934 #endif
9935 #ifndef UTF_ACCUMULATION_SHIFT
9936 #  define UTF_ACCUMULATION_SHIFT         D_PPP_BYTE_INFO_BITS
9937 #endif
9938
9939 #ifdef NATIVE_TO_UTF
9940 #ifndef NATIVE_UTF8_TO_I8
9941 #  define NATIVE_UTF8_TO_I8(c)           NATIVE_TO_UTF(c)
9942 #endif
9943
9944 #else   /* System doesn't support EBCDIC */
9945 #ifndef NATIVE_UTF8_TO_I8
9946 #  define NATIVE_UTF8_TO_I8(c)           (c)
9947 #endif
9948
9949 #endif
9950
9951 #ifdef UTF_TO_NATIVE
9952 #ifndef I8_TO_NATIVE_UTF8
9953 #  define I8_TO_NATIVE_UTF8(c)           UTF_TO_NATIVE(c)
9954 #endif
9955
9956 #else   /* System doesn't support EBCDIC */
9957 #ifndef I8_TO_NATIVE_UTF8
9958 #  define I8_TO_NATIVE_UTF8(c)           (c)
9959 #endif
9960
9961 #endif
9962 #ifndef UTF_START_MASK
9963 #  define UTF_START_MASK(len)            \
9964                                 (((len) >= 7) ? 0x00 : (0x1F >> ((len)-2)))
9965 #endif
9966
9967 #ifndef UTF_IS_CONTINUATION_MASK
9968 #  define UTF_IS_CONTINUATION_MASK       \
9969                                     ((U8) (0xFF << UTF_ACCUMULATION_SHIFT))
9970 #endif
9971
9972 #ifndef UTF_CONTINUATION_MARK
9973 #  define UTF_CONTINUATION_MARK          \
9974                                           (UTF_IS_CONTINUATION_MASK & 0xB0)
9975 #endif
9976
9977 #ifndef UTF_MIN_START_BYTE
9978 #  define UTF_MIN_START_BYTE             \
9979     ((UTF_CONTINUATION_MARK >> UTF_ACCUMULATION_SHIFT) | UTF_START_MARK(2))
9980 #endif
9981 #ifndef UTF_MIN_ABOVE_LATIN1_BYTE
9982 #  define UTF_MIN_ABOVE_LATIN1_BYTE      \
9983                     ((0x100 >> UTF_ACCUMULATION_SHIFT) | UTF_START_MARK(2))
9984 #endif
9985
9986 #if (PERL_BCDVERSION < 0x5007000)     /* Was the complement of what should have been */
9987 #  undef UTF8_IS_DOWNGRADEABLE_START
9988 #endif
9989 #ifndef UTF8_IS_DOWNGRADEABLE_START
9990 #  define UTF8_IS_DOWNGRADEABLE_START(c) \
9991                 inRANGE(NATIVE_UTF8_TO_I8(c),                               \
9992                         UTF_MIN_START_BYTE, UTF_MIN_ABOVE_LATIN1_BYTE - 1)
9993 #endif
9994
9995 #ifndef UTF_CONTINUATION_MASK
9996 #  define UTF_CONTINUATION_MASK          \
9997                                 ((U8) ((1U << UTF_ACCUMULATION_SHIFT) - 1))
9998 #endif
9999 #ifndef UTF8_ACCUMULATE
10000 #  define UTF8_ACCUMULATE(base, added)   \
10001                                   (((base) << UTF_ACCUMULATION_SHIFT)       \
10002                                    | ((NATIVE_UTF8_TO_I8(added))            \
10003                                        & UTF_CONTINUATION_MASK))
10004 #endif
10005 #ifndef UTF8_ALLOW_ANYUV
10006 #  define UTF8_ALLOW_ANYUV               0
10007 #endif
10008
10009 #ifndef UTF8_ALLOW_EMPTY
10010 #  define UTF8_ALLOW_EMPTY               0x0001
10011 #endif
10012
10013 #ifndef UTF8_ALLOW_CONTINUATION
10014 #  define UTF8_ALLOW_CONTINUATION        0x0002
10015 #endif
10016
10017 #ifndef UTF8_ALLOW_NON_CONTINUATION
10018 #  define UTF8_ALLOW_NON_CONTINUATION    0x0004
10019 #endif
10020
10021 #ifndef UTF8_ALLOW_SHORT
10022 #  define UTF8_ALLOW_SHORT               0x0008
10023 #endif
10024
10025 #ifndef UTF8_ALLOW_LONG
10026 #  define UTF8_ALLOW_LONG                0x0010
10027 #endif
10028
10029 #ifndef UTF8_ALLOW_OVERFLOW
10030 #  define UTF8_ALLOW_OVERFLOW            0x0080
10031 #endif
10032
10033 #ifndef UTF8_ALLOW_ANY
10034 #  define UTF8_ALLOW_ANY                 ( UTF8_ALLOW_CONTINUATION      \
10035                                         |UTF8_ALLOW_NON_CONTINUATION  \
10036                                         |UTF8_ALLOW_SHORT             \
10037                                         |UTF8_ALLOW_LONG              \
10038                                         |UTF8_ALLOW_OVERFLOW)
10039 #endif
10040
10041 #if defined UTF8SKIP
10042
10043 /* Don't use official versions because they use MIN, which may not be available */
10044 #undef UTF8_SAFE_SKIP
10045 #undef UTF8_CHK_SKIP
10046 #ifndef UTF8_SAFE_SKIP
10047 #  define UTF8_SAFE_SKIP(s, e)           (                                          \
10048                                       ((((e) - (s)) <= 0)                       \
10049                                       ? 0                                       \
10050                                       : D_PPP_MIN(((e) - (s)), UTF8SKIP(s))))
10051 #endif
10052 #ifndef UTF8_CHK_SKIP
10053 #  define UTF8_CHK_SKIP(s)               \
10054     (s[0] == '\0' ? 1 : ((U8) D_PPP_MIN(my_strnlen((char *) (s), UTF8SKIP(s)),  \
10055                                       UTF8SKIP(s))))
10056 #endif
10057
10058 /* UTF8_CHK_SKIP depends on my_strnlen */
10059 #ifndef UTF8_SKIP
10060 #  define UTF8_SKIP(s)                   UTF8SKIP(s)
10061 #endif
10062
10063 #endif
10064
10065 #if 'A' == 65
10066 #ifndef UTF8_IS_INVARIANT
10067 #  define UTF8_IS_INVARIANT(c)           isASCII(c)
10068 #endif
10069
10070 #else
10071 #ifndef UTF8_IS_INVARIANT
10072 #  define UTF8_IS_INVARIANT(c)           (isASCII(c) || isCNTRL_L1(c))
10073 #endif
10074
10075 #endif
10076 #ifndef UVCHR_IS_INVARIANT
10077 #  define UVCHR_IS_INVARIANT(c)          UTF8_IS_INVARIANT(c)
10078 #endif
10079
10080 #ifdef UVCHR_IS_INVARIANT
10081 #  if 'A' != 65 || UVSIZE < 8
10082      /* 32 bit platform, which includes UTF-EBCDIC on the releases this is
10083       * backported to */
10084 #    define D_PPP_UVCHR_SKIP_UPPER(c) 7
10085 #  else
10086 #    define D_PPP_UVCHR_SKIP_UPPER(c)                                       \
10087         (((WIDEST_UTYPE) (c)) <                                             \
10088          (((WIDEST_UTYPE) 1) << (6 * D_PPP_BYTE_INFO_BITS)) ? 7 : 13)
10089 #  endif
10090 #ifndef UVCHR_SKIP
10091 #  define UVCHR_SKIP(c)                  \
10092           UVCHR_IS_INVARIANT(c)                                          ? 1 :  \
10093           (WIDEST_UTYPE) (c) < (32 * (1U << (    D_PPP_BYTE_INFO_BITS))) ? 2 :  \
10094           (WIDEST_UTYPE) (c) < (16 * (1U << (2 * D_PPP_BYTE_INFO_BITS))) ? 3 :  \
10095           (WIDEST_UTYPE) (c) < ( 8 * (1U << (3 * D_PPP_BYTE_INFO_BITS))) ? 4 :  \
10096           (WIDEST_UTYPE) (c) < ( 4 * (1U << (4 * D_PPP_BYTE_INFO_BITS))) ? 5 :  \
10097           (WIDEST_UTYPE) (c) < ( 2 * (1U << (5 * D_PPP_BYTE_INFO_BITS))) ? 6 :  \
10098           D_PPP_UVCHR_SKIP_UPPER(c)
10099 #endif
10100
10101 #endif
10102
10103 #ifdef is_ascii_string
10104 #ifndef is_invariant_string
10105 #  define is_invariant_string(s,l)       is_ascii_string(s,l)
10106 #endif
10107
10108 #ifndef is_utf8_invariant_string
10109 #  define is_utf8_invariant_string(s,l)  is_ascii_string(s,l)
10110 #endif
10111
10112 /* Hint: is_ascii_string, is_invariant_string
10113    is_utf8_invariant_string() does the same thing and is preferred because its
10114    name is more accurate as to what it does */
10115 #endif
10116
10117 #ifdef ibcmp_utf8
10118 #ifndef foldEQ_utf8
10119 #  define foldEQ_utf8(s1,pe1,l1,u1,s2,pe2,l2,u2) \
10120                                 cBOOL(! ibcmp_utf8(s1,pe1,l1,u1,s2,pe2,l2,u2))
10121 #endif
10122
10123 #endif
10124
10125 #if defined(is_utf8_string) && defined(UTF8SKIP)
10126 #ifndef isUTF8_CHAR
10127 #  define isUTF8_CHAR(s, e)              (                                            \
10128     (e) <= (s) || ! is_utf8_string(s, UTF8_SAFE_SKIP(s, e))                     \
10129     ? 0                                                                         \
10130     : UTF8SKIP(s))
10131 #endif
10132
10133 #endif
10134
10135 #if 'A' == 65
10136 #ifndef BOM_UTF8
10137 #  define BOM_UTF8                       "\xEF\xBB\xBF"
10138 #endif
10139
10140 #ifndef REPLACEMENT_CHARACTER_UTF8
10141 #  define REPLACEMENT_CHARACTER_UTF8     "\xEF\xBF\xBD"
10142 #endif
10143
10144 #elif '^' == 95
10145 #ifndef BOM_UTF8
10146 #  define BOM_UTF8                       "\xDD\x73\x66\x73"
10147 #endif
10148
10149 #ifndef REPLACEMENT_CHARACTER_UTF8
10150 #  define REPLACEMENT_CHARACTER_UTF8     "\xDD\x73\x73\x71"
10151 #endif
10152
10153 #elif '^' == 176
10154 #ifndef BOM_UTF8
10155 #  define BOM_UTF8                       "\xDD\x72\x65\x72"
10156 #endif
10157
10158 #ifndef REPLACEMENT_CHARACTER_UTF8
10159 #  define REPLACEMENT_CHARACTER_UTF8     "\xDD\x72\x72\x70"
10160 #endif
10161
10162 #else
10163 #  error Unknown character set
10164 #endif
10165
10166 #if (PERL_BCDVERSION < 0x5031004)
10167         /* Versions prior to this accepted things that are now considered
10168          * malformations, and didn't return -1 on error with warnings enabled
10169          * */
10170 #  undef utf8_to_uvchr_buf
10171 #endif
10172
10173 /* This implementation brings modern, generally more restricted standards to
10174  * utf8_to_uvchr_buf.  Some of these are security related, and clearly must
10175  * be done.  But its arguable that the others need not, and hence should not.
10176  * The reason they're here is that a module that intends to play with the
10177  * latest perls should be able to work the same in all releases.  An example is
10178  * that perl no longer accepts any UV for a code point, but limits them to
10179  * IV_MAX or below.  This is for future internal use of the larger code points.
10180  * If it turns out that some of these changes are breaking code that isn't
10181  * intended to work with modern perls, the tighter restrictions could be
10182  * relaxed.  khw thinks this is unlikely, but has been wrong in the past. */
10183
10184 /* 5.6.0 is the first release with UTF-8, and we don't implement this function
10185  * there due to its likely lack of still being in use, and the underlying
10186  * implementation is very different from later ones, without the later
10187  * safeguards, so would require extra work to deal with */
10188 #if (PERL_BCDVERSION >= 0x5006001) && ! defined(utf8_to_uvchr_buf)
10189    /* Choose which underlying implementation to use.  At least one must be
10190     * present or the perl is too early to handle this function */
10191 #  if defined(utf8n_to_uvchr) || defined(utf8_to_uvchr) || defined(utf8_to_uv)
10192 #    if defined(utf8n_to_uvchr)   /* This is the preferred implementation */
10193 #      define D_PPP_utf8_to_uvchr_buf_callee utf8n_to_uvchr
10194 #    elif /* Must be at least 5.6.1 from #if above;                             \
10195              If have both regular and _simple, regular has all args */          \
10196           defined(utf8_to_uv) && defined(utf8_to_uv_simple)
10197 #      define D_PPP_utf8_to_uvchr_buf_callee utf8_to_uv
10198 #    elif defined(utf8_to_uvchr)  /* The below won't work well on error input */
10199 #      define D_PPP_utf8_to_uvchr_buf_callee(s, curlen, retlen, flags)          \
10200                                             utf8_to_uvchr((U8 *)(s), (retlen))
10201 #    else
10202 #      define D_PPP_utf8_to_uvchr_buf_callee(s, curlen, retlen, flags)          \
10203                                             utf8_to_uv((U8 *)(s), (retlen))
10204 #    endif
10205 #  endif
10206
10207 #  if defined(NEED_utf8_to_uvchr_buf)
10208 static UV DPPP_(my_utf8_to_uvchr_buf)(pTHX_ const U8 * s, const U8 * send, STRLEN * retlen);
10209 static
10210 #else
10211 extern UV DPPP_(my_utf8_to_uvchr_buf)(pTHX_ const U8 * s, const U8 * send, STRLEN * retlen);
10212 #endif
10213
10214 #if defined(NEED_utf8_to_uvchr_buf) || defined(NEED_utf8_to_uvchr_buf_GLOBAL)
10215
10216 #ifdef utf8_to_uvchr_buf
10217 #  undef utf8_to_uvchr_buf
10218 #endif
10219 #define utf8_to_uvchr_buf(a,b,c) DPPP_(my_utf8_to_uvchr_buf)(aTHX_ a,b,c)
10220 #define Perl_utf8_to_uvchr_buf DPPP_(my_utf8_to_uvchr_buf)
10221
10222
10223 UV
10224 DPPP_(my_utf8_to_uvchr_buf)(pTHX_ const U8 *s, const U8 *send, STRLEN *retlen)
10225 {
10226     UV ret;
10227     STRLEN curlen;
10228     bool overflows = 0;
10229     const U8 *cur_s = s;
10230     const bool do_warnings = ckWARN_d(WARN_UTF8);
10231 #    if (PERL_BCDVERSION < 0x5026000) && ! defined(EBCDIC)
10232     STRLEN overflow_length = 0;
10233 #    endif
10234
10235     if (send > s) {
10236         curlen = send - s;
10237     }
10238     else {
10239         assert(0);  /* Modern perls die under this circumstance */
10240         curlen = 0;
10241         if (! do_warnings) {    /* Handle empty here if no warnings needed */
10242             if (retlen) *retlen = 0;
10243             return UNICODE_REPLACEMENT;
10244         }
10245     }
10246
10247 #    if (PERL_BCDVERSION < 0x5026000) && ! defined(EBCDIC)
10248
10249     /* Perl did not properly detect overflow for much of its history on
10250      * non-EBCDIC platforms, often returning an overlong value which may or may
10251      * not have been tolerated in the call.  Also, earlier versions, when they
10252      * did detect overflow, may have disallowed it completely.  Modern ones can
10253      * replace it with the REPLACEMENT CHARACTER, depending on calling
10254      * parameters.  Therefore detect it ourselves in  releases it was
10255      * problematic in. */
10256
10257     if (curlen > 0 && UNLIKELY(*s >= 0xFE)) {
10258
10259         /* First, on a 32-bit machine the first byte being at least \xFE
10260          * automatically is overflow, as it indicates something requiring more
10261          * than 31 bits */
10262         if (sizeof(ret) < 8) {
10263             overflows = 1;
10264             overflow_length = (*s == 0xFE) ? 7 : 13;
10265         }
10266         else {
10267             const U8 highest[] =    /* 2*63-1 */
10268                         "\xFF\x80\x87\xBF\xBF\xBF\xBF\xBF\xBF\xBF\xBF\xBF\xBF";
10269             const U8 *cur_h = highest;
10270
10271             for (cur_s = s; cur_s < send; cur_s++, cur_h++) {
10272                 if (UNLIKELY(*cur_s == *cur_h)) {
10273                     continue;
10274                 }
10275
10276                 /* If this byte is larger than the corresponding highest UTF-8
10277                  * byte, the sequence overflows; otherwise the byte is less
10278                  * than (as we handled the equality case above), and so the
10279                  * sequence doesn't overflow */
10280                 overflows = *cur_s > *cur_h;
10281                 break;
10282
10283             }
10284
10285             /* Here, either we set the bool and broke out of the loop, or got
10286              * to the end and all bytes are the same which indicates it doesn't
10287              * overflow.  If it did overflow, it would be this number of bytes
10288              * */
10289             overflow_length = 13;
10290         }
10291     }
10292
10293     if (UNLIKELY(overflows)) {
10294         ret = 0;
10295
10296         if (! do_warnings && retlen) {
10297             *retlen = overflow_length;
10298         }
10299     }
10300     else
10301
10302 #    endif  /* < 5.26 */
10303
10304         /* Here, we are either in a release that properly detects overflow, or
10305          * we have checked for overflow and the next statement is executing as
10306          * part of the above conditional where we know we don't have overflow.
10307          *
10308          * The modern versions allow anything that evaluates to a legal UV, but
10309          * not overlongs nor an empty input */
10310         ret = D_PPP_utf8_to_uvchr_buf_callee(
10311               (U8 *) /* Early perls: no const */
10312                     s, curlen, retlen,   (UTF8_ALLOW_ANYUV
10313                                       & ~(UTF8_ALLOW_LONG|UTF8_ALLOW_EMPTY)));
10314
10315 #    if (PERL_BCDVERSION >= 0x5026000) && (PERL_BCDVERSION < 0x5028000)
10316
10317     /* But actually, more modern versions restrict the UV to being no more than
10318      * what an IV can hold, so it could still have gotten it wrong about
10319      * overflowing. */
10320     if (UNLIKELY(ret > IV_MAX)) {
10321         overflows = 1;
10322     }
10323
10324 #    endif
10325
10326     if (UNLIKELY(overflows)) {
10327         if (! do_warnings) {
10328             if (retlen) {
10329                 *retlen = D_PPP_MIN(*retlen, UTF8SKIP(s));
10330                 *retlen = D_PPP_MIN(*retlen, curlen);
10331             }
10332             return UNICODE_REPLACEMENT;
10333         }
10334         else {
10335
10336             /* We use the error message in use from 5.8-5.26 */
10337             Perl_warner(aTHX_ packWARN(WARN_UTF8),
10338                 "Malformed UTF-8 character (overflow at 0x%" UVxf
10339                 ", byte 0x%02x, after start byte 0x%02x)",
10340                 ret, *cur_s, *s);
10341             if (retlen) {
10342                 *retlen = (STRLEN) -1;
10343             }
10344             return 0;
10345         }
10346     }
10347
10348     /* Here, did not overflow, but if it failed for some other reason, and
10349      * warnings are off, to emulate the behavior of the real utf8_to_uvchr(),
10350      * try again, allowing anything.  (Note a return of 0 is ok if the input
10351      * was '\0') */
10352     if (UNLIKELY(ret == 0 && (curlen == 0 || *s != '\0'))) {
10353
10354         /* If curlen is 0, we already handled the case where warnings are
10355          * disabled, so this 'if' will be true, and so later on, we know that
10356          * 's' is dereferencible */
10357         if (do_warnings) {
10358             *retlen = (STRLEN) -1;
10359         }
10360         else {
10361             ret = D_PPP_utf8_to_uvchr_buf_callee(
10362                                      (U8 *) /* Early perls: no const */
10363                                             s, curlen, retlen, UTF8_ALLOW_ANY);
10364             /* Override with the REPLACEMENT character, as that is what the
10365              * modern version of this function returns */
10366             ret = UNICODE_REPLACEMENT;
10367
10368 #    if (PERL_BCDVERSION < 0x5016000)
10369
10370             /* Versions earlier than this don't necessarily return the proper
10371              * length.  It should not extend past the end of string, nor past
10372              * what the first byte indicates the length is, nor past the
10373              * continuation characters */
10374             if (retlen && (IV) *retlen >= 0) {
10375                 unsigned int i = 1;
10376
10377                 *retlen = D_PPP_MIN(*retlen, curlen);
10378                 *retlen = D_PPP_MIN(*retlen, UTF8SKIP(s));
10379                 do {
10380 #      ifdef UTF8_IS_CONTINUATION
10381                     if (! UTF8_IS_CONTINUATION(s[i]))
10382 #      else       /* Versions without the above don't support EBCDIC anyway */
10383                     if (s[i] < 0x80 || s[i] > 0xBF)
10384 #      endif
10385                     {
10386                         *retlen = i;
10387                         break;
10388                     }
10389                 } while (++i < *retlen);
10390             }
10391
10392 #    endif
10393
10394         }
10395     }
10396
10397     return ret;
10398 }
10399
10400 #  endif
10401 #endif
10402
10403 #if defined(UTF8SKIP) && defined(utf8_to_uvchr_buf)
10404 #undef utf8_to_uvchr /* Always redefine this unsafe function so that it refuses
10405                         to read past a NUL, making it much less likely to read
10406                         off the end of the buffer.  A NUL indicates the start
10407                         of the next character anyway.  If the input isn't
10408                         NUL-terminated, the function remains unsafe, as it
10409                         always has been. */
10410 #ifndef utf8_to_uvchr
10411 #  define utf8_to_uvchr(s, lp)           \
10412     ((*(s) == '\0')                                                             \
10413     ? utf8_to_uvchr_buf(s,((s)+1), lp) /* Handle single NUL specially */        \
10414     : utf8_to_uvchr_buf(s, (s) + UTF8_CHK_SKIP(s), (lp)))
10415 #endif
10416
10417 #endif
10418
10419 /* Hint: utf8_to_uvchr
10420     Use utf8_to_uvchr_buf() instead.  But ONLY if you KNOW the upper bound
10421     of the input string (not resorting to using UTF8SKIP, etc., to infer it).
10422     The backported utf8_to_uvchr() will do a better job to prevent most cases
10423     of trying to read beyond the end of the buffer */
10424
10425 /* Replace utf8_to_uvchr with utf8_to_uvchr_buf */
10426
10427 #ifdef sv_len_utf8
10428    /* Older Perl versions have broken sv_len_utf8() when passed sv does not have SVf_UTF8 flag set */
10429    /* Also note that SvGETMAGIC() may change presence of SVf_UTF8 flag */
10430 #  if (PERL_BCDVERSION < 0x5017005)
10431 #    undef sv_len_utf8
10432 #    if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN)
10433 #      define sv_len_utf8_nomg(sv) ({ SV *_sv2 = (sv); (SvUTF8(_sv2) ? Perl_sv_len_utf8(aTHX_ (!SvGMAGICAL(_sv2) ? _sv2 : sv_mortalcopy_flags(_sv2, SV_NOSTEAL))) : ({ STRLEN _len; SvPV_nomg(_sv2, _len); _len; })); })
10434 #      define sv_len_utf8(sv) ({ SV *_sv1 = (sv); SvGETMAGIC(_sv1); sv_len_utf8_nomg(_sv1); })
10435 #    else
10436 #      define sv_len_utf8_nomg(sv) (PL_Sv = (sv), (SvUTF8(PL_Sv) ? Perl_sv_len_utf8(aTHX_ (!SvGMAGICAL(PL_Sv) ? PL_Sv : sv_mortalcopy_flags(PL_Sv, SV_NOSTEAL))) : (SvPV_nomg(PL_Sv, PL_na), PL_na)))
10437 #      define sv_len_utf8(sv) (PL_Sv = (sv), SvGETMAGIC(PL_Sv), sv_len_utf8_nomg(PL_Sv))
10438 #    endif
10439 #  endif
10440 #  if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN)
10441 #ifndef sv_len_utf8_nomg
10442 #  define sv_len_utf8_nomg(sv)           ({ SV *_sv = (sv); sv_len_utf8(!SvGMAGICAL(_sv) ? _sv : sv_mortalcopy_flags(_sv, SV_NOSTEAL)); })
10443 #endif
10444
10445 #  else
10446 #ifndef sv_len_utf8_nomg
10447 #  define sv_len_utf8_nomg(sv)           ((PL_Sv = (sv)), sv_len_utf8(!SvGMAGICAL(PL_Sv) ? PL_Sv : sv_mortalcopy_flags(PL_Sv, SV_NOSTEAL)))
10448 #endif
10449
10450 #  endif
10451 #endif
10452 #ifndef PERL_PV_ESCAPE_QUOTE
10453 #  define PERL_PV_ESCAPE_QUOTE           0x0001
10454 #endif
10455
10456 #ifndef PERL_PV_PRETTY_QUOTE
10457 #  define PERL_PV_PRETTY_QUOTE           PERL_PV_ESCAPE_QUOTE
10458 #endif
10459
10460 #ifndef PERL_PV_PRETTY_ELLIPSES
10461 #  define PERL_PV_PRETTY_ELLIPSES        0x0002
10462 #endif
10463
10464 #ifndef PERL_PV_PRETTY_LTGT
10465 #  define PERL_PV_PRETTY_LTGT            0x0004
10466 #endif
10467
10468 #ifndef PERL_PV_ESCAPE_FIRSTCHAR
10469 #  define PERL_PV_ESCAPE_FIRSTCHAR       0x0008
10470 #endif
10471
10472 #ifndef PERL_PV_ESCAPE_UNI
10473 #  define PERL_PV_ESCAPE_UNI             0x0100
10474 #endif
10475
10476 #ifndef PERL_PV_ESCAPE_UNI_DETECT
10477 #  define PERL_PV_ESCAPE_UNI_DETECT      0x0200
10478 #endif
10479
10480 #ifndef PERL_PV_ESCAPE_ALL
10481 #  define PERL_PV_ESCAPE_ALL             0x1000
10482 #endif
10483
10484 #ifndef PERL_PV_ESCAPE_NOBACKSLASH
10485 #  define PERL_PV_ESCAPE_NOBACKSLASH     0x2000
10486 #endif
10487
10488 #ifndef PERL_PV_ESCAPE_NOCLEAR
10489 #  define PERL_PV_ESCAPE_NOCLEAR         0x4000
10490 #endif
10491
10492 #ifndef PERL_PV_ESCAPE_RE
10493 #  define PERL_PV_ESCAPE_RE              0x8000
10494 #endif
10495
10496 #ifndef PERL_PV_PRETTY_NOCLEAR
10497 #  define PERL_PV_PRETTY_NOCLEAR         PERL_PV_ESCAPE_NOCLEAR
10498 #endif
10499 #ifndef PERL_PV_PRETTY_DUMP
10500 #  define PERL_PV_PRETTY_DUMP            PERL_PV_PRETTY_ELLIPSES|PERL_PV_PRETTY_QUOTE
10501 #endif
10502
10503 #ifndef PERL_PV_PRETTY_REGPROP
10504 #  define PERL_PV_PRETTY_REGPROP         PERL_PV_PRETTY_ELLIPSES|PERL_PV_PRETTY_LTGT|PERL_PV_ESCAPE_RE
10505 #endif
10506
10507 /* Hint: pv_escape
10508  * Note that unicode functionality is only backported to
10509  * those perl versions that support it. For older perl
10510  * versions, the implementation will fall back to bytes.
10511  */
10512
10513 #ifndef pv_escape
10514 #if defined(NEED_pv_escape)
10515 static char * DPPP_(my_pv_escape)(pTHX_ SV * dsv, char const * const str, const STRLEN count, const STRLEN max, STRLEN * const escaped, const U32 flags);
10516 static
10517 #else
10518 extern char * DPPP_(my_pv_escape)(pTHX_ SV * dsv, char const * const str, const STRLEN count, const STRLEN max, STRLEN * const escaped, const U32 flags);
10519 #endif
10520
10521 #if defined(NEED_pv_escape) || defined(NEED_pv_escape_GLOBAL)
10522
10523 #ifdef pv_escape
10524 #  undef pv_escape
10525 #endif
10526 #define pv_escape(a,b,c,d,e,f) DPPP_(my_pv_escape)(aTHX_ a,b,c,d,e,f)
10527 #define Perl_pv_escape DPPP_(my_pv_escape)
10528
10529
10530 char *
10531 DPPP_(my_pv_escape)(pTHX_ SV *dsv, char const * const str,
10532   const STRLEN count, const STRLEN max,
10533   STRLEN * const escaped, const U32 flags)
10534 {
10535     const char esc = flags & PERL_PV_ESCAPE_RE ? '%' : '\\';
10536     const char dq = flags & PERL_PV_ESCAPE_QUOTE ? '"' : esc;
10537     char octbuf[32] = "%123456789ABCDF";
10538     STRLEN wrote = 0;
10539     STRLEN chsize = 0;
10540     STRLEN readsize = 1;
10541 #if defined(is_utf8_string) && defined(utf8_to_uvchr_buf)
10542     bool isuni = flags & PERL_PV_ESCAPE_UNI ? 1 : 0;
10543 #endif
10544     const char *pv  = str;
10545     const char * const end = pv + count;
10546     octbuf[0] = esc;
10547
10548     if (!(flags & PERL_PV_ESCAPE_NOCLEAR))
10549         sv_setpvs(dsv, "");
10550
10551 #if defined(is_utf8_string) && defined(utf8_to_uvchr_buf)
10552     if ((flags & PERL_PV_ESCAPE_UNI_DETECT) && is_utf8_string((U8*)pv, count))
10553         isuni = 1;
10554 #endif
10555
10556     for (; pv < end && (!max || wrote < max) ; pv += readsize) {
10557         const UV u =
10558 #if defined(is_utf8_string) && defined(utf8_to_uvchr_buf)
10559                      isuni ? utf8_to_uvchr_buf((U8*)pv, end, &readsize) :
10560 #endif
10561                              (U8)*pv;
10562         const U8 c = (U8)u & 0xFF;
10563
10564         if (u > 255 || (flags & PERL_PV_ESCAPE_ALL)) {
10565             if (flags & PERL_PV_ESCAPE_FIRSTCHAR)
10566                 chsize = my_snprintf(octbuf, sizeof octbuf,
10567                                       "%" UVxf, u);
10568             else
10569                 chsize = my_snprintf(octbuf, sizeof octbuf,
10570                                       "%cx{%" UVxf "}", esc, u);
10571         } else if (flags & PERL_PV_ESCAPE_NOBACKSLASH) {
10572             chsize = 1;
10573         } else {
10574             if (c == dq || c == esc || !isPRINT(c)) {
10575                 chsize = 2;
10576                 switch (c) {
10577                 case '\\' : /* fallthrough */
10578                 case '%'  : if (c == esc)
10579                                 octbuf[1] = esc;
10580                             else
10581                                 chsize = 1;
10582                             break;
10583                 case '\v' : octbuf[1] = 'v'; break;
10584                 case '\t' : octbuf[1] = 't'; break;
10585                 case '\r' : octbuf[1] = 'r'; break;
10586                 case '\n' : octbuf[1] = 'n'; break;
10587                 case '\f' : octbuf[1] = 'f'; break;
10588                 case '"'  : if (dq == '"')
10589                                 octbuf[1] = '"';
10590                             else
10591                                 chsize = 1;
10592                             break;
10593                 default:    chsize = my_snprintf(octbuf, sizeof octbuf,
10594                                 pv < end && isDIGIT((U8)*(pv+readsize))
10595                                 ? "%c%03o" : "%c%o", esc, c);
10596                 }
10597             } else {
10598                 chsize = 1;
10599             }
10600         }
10601         if (max && wrote + chsize > max) {
10602             break;
10603         } else if (chsize > 1) {
10604             sv_catpvn(dsv, octbuf, chsize);
10605             wrote += chsize;
10606         } else {
10607             char tmp[2];
10608             my_snprintf(tmp, sizeof tmp, "%c", c);
10609             sv_catpvn(dsv, tmp, 1);
10610             wrote++;
10611         }
10612         if (flags & PERL_PV_ESCAPE_FIRSTCHAR)
10613             break;
10614     }
10615     if (escaped != NULL)
10616         *escaped= pv - str;
10617     return SvPVX(dsv);
10618 }
10619
10620 #endif
10621 #endif
10622
10623 #ifndef pv_pretty
10624 #if defined(NEED_pv_pretty)
10625 static char * DPPP_(my_pv_pretty)(pTHX_ SV * dsv, char const * const str, const STRLEN count, const STRLEN max, char const * const start_color, char const * const end_color, const U32 flags);
10626 static
10627 #else
10628 extern char * DPPP_(my_pv_pretty)(pTHX_ SV * dsv, char const * const str, const STRLEN count, const STRLEN max, char const * const start_color, char const * const end_color, const U32 flags);
10629 #endif
10630
10631 #if defined(NEED_pv_pretty) || defined(NEED_pv_pretty_GLOBAL)
10632
10633 #ifdef pv_pretty
10634 #  undef pv_pretty
10635 #endif
10636 #define pv_pretty(a,b,c,d,e,f,g) DPPP_(my_pv_pretty)(aTHX_ a,b,c,d,e,f,g)
10637 #define Perl_pv_pretty DPPP_(my_pv_pretty)
10638
10639
10640 char *
10641 DPPP_(my_pv_pretty)(pTHX_ SV *dsv, char const * const str, const STRLEN count,
10642   const STRLEN max, char const * const start_color, char const * const end_color,
10643   const U32 flags)
10644 {
10645     const U8 dq = (flags & PERL_PV_PRETTY_QUOTE) ? '"' : '%';
10646     STRLEN escaped;
10647
10648     if (!(flags & PERL_PV_PRETTY_NOCLEAR))
10649         sv_setpvs(dsv, "");
10650
10651     if (dq == '"')
10652         sv_catpvs(dsv, "\"");
10653     else if (flags & PERL_PV_PRETTY_LTGT)
10654         sv_catpvs(dsv, "<");
10655
10656     if (start_color != NULL)
10657         sv_catpv(dsv, D_PPP_CONSTPV_ARG(start_color));
10658
10659     pv_escape(dsv, str, count, max, &escaped, flags | PERL_PV_ESCAPE_NOCLEAR);
10660
10661     if (end_color != NULL)
10662         sv_catpv(dsv, D_PPP_CONSTPV_ARG(end_color));
10663
10664     if (dq == '"')
10665         sv_catpvs(dsv, "\"");
10666     else if (flags & PERL_PV_PRETTY_LTGT)
10667         sv_catpvs(dsv, ">");
10668
10669     if ((flags & PERL_PV_PRETTY_ELLIPSES) && escaped < count)
10670         sv_catpvs(dsv, "...");
10671
10672     return SvPVX(dsv);
10673 }
10674
10675 #endif
10676 #endif
10677
10678 #ifndef pv_display
10679 #if defined(NEED_pv_display)
10680 static char * DPPP_(my_pv_display)(pTHX_ SV * dsv, const char * pv, STRLEN cur, STRLEN len, STRLEN pvlim);
10681 static
10682 #else
10683 extern char * DPPP_(my_pv_display)(pTHX_ SV * dsv, const char * pv, STRLEN cur, STRLEN len, STRLEN pvlim);
10684 #endif
10685
10686 #if defined(NEED_pv_display) || defined(NEED_pv_display_GLOBAL)
10687
10688 #ifdef pv_display
10689 #  undef pv_display
10690 #endif
10691 #define pv_display(a,b,c,d,e) DPPP_(my_pv_display)(aTHX_ a,b,c,d,e)
10692 #define Perl_pv_display DPPP_(my_pv_display)
10693
10694
10695 char *
10696 DPPP_(my_pv_display)(pTHX_ SV *dsv, const char *pv, STRLEN cur, STRLEN len, STRLEN pvlim)
10697 {
10698     pv_pretty(dsv, pv, cur, pvlim, NULL, NULL, PERL_PV_PRETTY_DUMP);
10699     if (len > cur && pv[cur] == '\0')
10700         sv_catpvs(dsv, "\\0");
10701     return SvPVX(dsv);
10702 }
10703
10704 #endif
10705 #endif
10706
10707 /* If this doesn't exist, it's not needed, so noop */
10708 #ifndef switch_to_global_locale
10709 #  define switch_to_global_locale()
10710 #endif
10711
10712 /* Originally, this didn't return a value, but in perls like that, the value
10713  * should always be TRUE.  Add a return to Perl_sync_locale() when it's
10714  * available.  And actually do a sync when its not, if locales are available on
10715  * this system. */
10716 #ifdef sync_locale
10717 #  if (PERL_BCDVERSION < 0x5027009)
10718 #    if (PERL_BCDVERSION >= 0x5021003)
10719 #      undef sync_locale
10720 #      define sync_locale() (Perl_sync_locale(aTHX), 1)
10721 #    elif defined(sync_locale)  /* These should be the 5.20 maints*/
10722 #      undef sync_locale        /* Just copy their defn and return 1 */
10723 #      define sync_locale() (new_ctype(setlocale(LC_CTYPE, NULL)),        \
10724                              new_collate(setlocale(LC_COLLATE, NULL)),    \
10725                              set_numeric_local(),                         \
10726                              new_numeric(setlocale(LC_NUMERIC, NULL)),    \
10727                              1)
10728 #    elif defined(new_ctype) && defined(LC_CTYPE)
10729 #      define sync_locale() (new_ctype(setlocale(LC_CTYPE, NULL)), 1)
10730 #    endif
10731 #  endif
10732 #endif
10733 #ifndef sync_locale
10734 #  define sync_locale()                  1
10735 #endif
10736
10737 #endif /* _P_P_PORTABILITY_H_ */
10738
10739 /* End of File ppport.h */