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