This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
2 years agodevel/scanprov: Rename variable to be more mnemonic
Karl Williamson [Sun, 28 Jul 2019 15:51:46 +0000 (09:51 -0600)]
devel/scanprov: Rename variable to be more mnemonic

(cherry picked from commit 157a5aebaba3103015fb49b167941c5158554965)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agodevel/scanprov: Comments, white-space
Karl Williamson [Sun, 28 Jul 2019 15:48:56 +0000 (09:48 -0600)]
devel/scanprov: Comments, white-space

(cherry picked from commit 76db8504124b170fdeda965d724a830eba465bc5)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoMove finding perl versions from mktodo to devtools.pl
Karl Williamson [Sat, 20 Jul 2019 22:55:37 +0000 (16:55 -0600)]
Move finding perl versions from mktodo to devtools.pl

This is in preparation for this calculation to be done from a second
place.

(cherry picked from commit 0cca64a344d7e677ed62e307aa8183fecb63f5ea)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agodevel/mktodo.pl: Stop using a known bad API element
Karl Williamson [Sat, 24 Aug 2019 21:05:05 +0000 (15:05 -0600)]
devel/mktodo.pl: Stop using a known bad API element

This was a bug which led to some unpredicatble results due to hash key
randomization.  We determined that a function or macro is not suitable
for a given release, but then forget that fact, and try to use it
anyway.

This single line change fixed a bunch of problems.  As I understand, you
couldn't regenerate on newer perls, and still may have had to try
multiple times for success.  I believe this is because of the hash key
randomization in v5.18.  I sort of understand how that could cause this
kind of issue, but I can't explain it easily, and its gone now anyway.

(cherry picked from commit 63d92fe04f63baa649f33ce9d751a6f5d58b3ce6)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agodevel/mktodo.pl: Put hash lookups in variables
Karl Williamson [Sat, 24 Aug 2019 21:03:20 +0000 (15:03 -0600)]
devel/mktodo.pl: Put hash lookups in variables

Looked up once, and easier to read.

(cherry picked from commit 04d3d1b8c41271de1940e81ae3a516e229e2e434)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agodevel/mktodo.pl: Explicitly close file
Karl Williamson [Mon, 15 Jul 2019 19:16:54 +0000 (13:16 -0600)]
devel/mktodo.pl: Explicitly close file

I'm not sure if it was always getting closed or not.

(cherry picked from commit b173ed3c45da4be559e3c5da128a9fcb9b95f27c)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agodevel/mktodo.pl: Add some comments
Karl Williamson [Tue, 2 Jul 2019 16:58:44 +0000 (10:58 -0600)]
devel/mktodo.pl: Add some comments

(cherry picked from commit 99f5969f6583102fb7bcf1f28e18b91324f208b7)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agodevel/mktodo.pl: Reorder else clauses
Karl Williamson [Mon, 15 Jul 2019 20:25:58 +0000 (14:25 -0600)]
devel/mktodo.pl: Reorder else clauses

This makes the trivial (short) case first, so it's easier to read

(cherry picked from commit 9f3102880cda991067d28d7f59759bc4005f886a)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agodevel/mktodo.pl: Move invariant expression out of loop
Karl Williamson [Thu, 11 Jul 2019 04:22:07 +0000 (22:22 -0600)]
devel/mktodo.pl: Move invariant expression out of loop

(cherry picked from commit a513fe6f824d69d855753d04893a94692433a718)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agodevel/mktodo.pl: Add ability to dump generated file
Karl Williamson [Tue, 2 Jul 2019 17:08:56 +0000 (11:08 -0600)]
devel/mktodo.pl: Add ability to dump generated file

For use in debugging

(cherry picked from commit 7dd1ddf8118d5e9d622609d393be81055d5156b9)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agodevel/mktodo.pl: Add comments, dump stderr if error
Karl Williamson [Sat, 29 Jun 2019 06:32:21 +0000 (00:32 -0600)]
devel/mktodo.pl: Add comments, dump stderr if error

These are some rudimentary comments.  It started working before I had to
delve deeper.

(cherry picked from commit a70e4aafcde7761301e62b6f630d11da5788c61f)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agodevel/mktodo.pl: Rename some variables
Karl Williamson [Sat, 13 Jul 2019 19:06:29 +0000 (13:06 -0600)]
devel/mktodo.pl: Rename some variables

These were confusingly named.

(cherry picked from commit 269a0070e5633ab951c216bb706aef1250c22af5)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agodevel/mktodo: Add ability for multiple source dirs
Karl Williamson [Mon, 8 Jul 2019 20:47:25 +0000 (14:47 -0600)]
devel/mktodo: Add ability for multiple source dirs

This allows the parameter that takes the prefix for where the perls to
use are to be a comma separated list of such directory prefixes

(cherry picked from commit 93a1b4370969c51dd0315cd8d3a218265800b7ed)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agodevel/mktodo: Add some comments
Karl Williamson [Tue, 2 Jul 2019 16:57:55 +0000 (10:57 -0600)]
devel/mktodo: Add some comments

(cherry picked from commit e00ce51fae01f6ca67ee85158d42d483ede947e2)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agodevel/mktodo: Notify user of blead compilation issues
Karl Williamson [Tue, 2 Jul 2019 16:54:56 +0000 (10:54 -0600)]
devel/mktodo: Notify user of blead compilation issues

The results will be off unless the very first time, things work.  Prior
to this commit that could go undetected.

(cherry picked from commit 04103542d777e907b9775abf042e9a23dbed7812)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agodevel/mktodo: Fix location of old perls
Karl Williamson [Tue, 25 Jun 2019 17:41:31 +0000 (11:41 -0600)]
devel/mktodo: Fix location of old perls

This had an extra layer of directory structure beyond what typical
places old perls are kept.

A future commit allows specifying mutiple directories on the command
line, which gives full generality.

(cherry picked from commit dbe3786586c45ed8ac1fca184a30924630a5dbf0)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoNo longer need special handling of my_sprintf
Karl Williamson [Tue, 2 Jul 2019 16:44:06 +0000 (10:44 -0600)]
No longer need special handling of my_sprintf

A month ago, I made a commit that had a special case for my_sprintf.  It
turns out if this function is marked in blead as deprecated (which has
now been done), the problem doesn't come up.

(cherry picked from commit 70c38e06ffec0f0c34041c0582c6456e1d70263d)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agodevel/mkapidoc.sh: Add some config symbols
Karl Williamson [Wed, 14 Aug 2019 23:40:20 +0000 (17:40 -0600)]
devel/mkapidoc.sh: Add some config symbols

These symbols are available to XS writers, and some are backported by
this module.  Only the easy to handle symbols are added by this commit,
with no plans to extend this until there is a future need..

(cherry picked from commit ca3dc33a326bc91061976a259a3a3920c111d37c)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoparts/inc/inctools: Add sort fcn of API lines
Karl Williamson [Tue, 13 Aug 2019 04:37:44 +0000 (22:37 -0600)]
parts/inc/inctools: Add sort fcn of API lines

These lines have the name be the 3rd field with separator '|'

(cherry picked from commit 7f9278b13869baea6e8b01690990c71ff3ce8838)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoparts/apicheck.pl: Convert to use parse_version
Karl Williamson [Sat, 20 Jul 2019 21:00:56 +0000 (15:00 -0600)]
parts/apicheck.pl: Convert to use parse_version

This function is now suitable here, instead of duplicating logic

(cherry picked from commit 9a55a3a3baf52d0d53571f576f6dc69d915220eb)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoparts/inc/inctools: Add fcn to return integer version
Karl Williamson [Sat, 20 Jul 2019 23:22:36 +0000 (17:22 -0600)]
parts/inc/inctools: Add fcn to return integer version

This is a Perl version of the C macro PERL_BCDVERSION, so the value
returned can be used  as the file names in parts/base and parts/todo,
and is easy to compare.

(cherry picked from commit 7be255fab4621aecfe8192ea2fa2d4aa842067f4)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoparts/inc/inctools: Rewrite parse_version
Karl Williamson [Sat, 20 Jul 2019 20:52:09 +0000 (14:52 -0600)]
parts/inc/inctools: Rewrite parse_version

This now accepts more input formats than before, and dies when wrong
with the same messages that ppport.h uses, so that the latter can now
convert to use this function.

And, importantly, it fixes a bug where the lowest component of version
numbers in early perls was multiplied by 10.

(cherry picked from commit 38f1e0a218ae97b719e1cd048bde157d08dd3f37)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoparts/inc/parse_version: Call fcn to not duplicate logic
Karl Williamson [Thu, 18 Jul 2019 20:42:22 +0000 (14:42 -0600)]
parts/inc/parse_version: Call fcn to not duplicate logic

Change to avoid redundant code; add comment

(cherry picked from commit b02f52889c1a5d1d79cb91fd545ce9f6c454c963)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoSort a bunch of outputs in dictionary order
Karl Williamson [Sat, 20 Jul 2019 20:12:11 +0000 (14:12 -0600)]
Sort a bunch of outputs in dictionary order

Makes them easier to read

(cherry picked from commit 2d3877590e755fab8a115cd49bb99953dee5d516)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoExtract duplicate common subs into common file
Karl Williamson [Thu, 18 Jul 2019 20:31:56 +0000 (14:31 -0600)]
Extract duplicate common subs into common file

These had gotten slightly out of sync.  This file is in parts/inc, as it
needs to be expanded as part of ppport.h

(cherry picked from commit cfa14856d571b28a8542c3285990b105c2923d71)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoUpdate minimum perl version to 5.003_07
Karl Williamson [Wed, 10 Jul 2019 23:17:51 +0000 (17:17 -0600)]
Update minimum perl version to 5.003_07

It used to say plain 5.003, but for many years the earliest data had
been 5.003_07.  I have tested it back to there and think this is good
enough.  This is actually quite early in the 5.003 cycle.  If we wanted
to try another 5.003, it would be more likely 5.003_97 which perlhist
says was widely used, but is real close to 5.004

(cherry picked from commit 1dd8b06856003dc87de669ef8356e66eb30985f9)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoPPPort_pm.PL: Prototypes differing only in pTHX_
Karl Williamson [Fri, 12 Jul 2019 16:43:35 +0000 (10:43 -0600)]
PPPort_pm.PL: Prototypes differing only in pTHX_

Use special wording for these, as this can be an unavoidable issue for
very early perls that don't port thread context back that far.

(cherry picked from commit b8a73dca70de398e16e70857f461cc88d99ac5c8)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoPPPort_pm.PL: Note the functions that are special
Karl Williamson [Fri, 12 Jul 2019 19:19:35 +0000 (13:19 -0600)]
PPPort_pm.PL: Note the functions that are special

Special meaning deprecated, experimental, or not documented

(cherry picked from commit ae56cb8010ec0ad4487040218ec6f90924908eb2)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoPPPort_pm.PL: Move some includes to earlier
Karl Williamson [Fri, 12 Jul 2019 19:18:57 +0000 (13:18 -0600)]
PPPort_pm.PL: Move some includes to earlier

These need to be defined earlier to work on very early perls

(cherry picked from commit ed2f32accaedeed3f4b4471c831503263e65fa6a)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoPPPort_pm.PL: Add/fix comments, pod
Karl Williamson [Thu, 8 Aug 2019 17:51:28 +0000 (11:51 -0600)]
PPPort_pm.PL: Add/fix comments, pod

(cherry picked from commit 04a21a21f6a7cbbb24e10848f5483f35be516936)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agobuildperl.pl: Add pod/usage info
Karl Williamson [Mon, 8 Jul 2019 20:38:18 +0000 (14:38 -0600)]
buildperl.pl: Add pod/usage info

(cherry picked from commit cc4f886f095f23621d29ae3f1a472bda71b92b12)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agobuildperl.pl: Don't try to install man pages
Karl Williamson [Mon, 8 Jul 2019 20:35:05 +0000 (14:35 -0600)]
buildperl.pl: Don't try to install man pages

(cherry picked from commit 0a183db5b6138fcded66ba407a3d8216734d7e70)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agobuildperl.pl: Don't die if make install returns >0
Karl Williamson [Mon, 8 Jul 2019 20:32:29 +0000 (14:32 -0600)]
buildperl.pl: Don't die if make install returns >0

Sometimes 'make install' returns non-success even if it actually
installed enough for our purposes.

(cherry picked from commit c3f61c3653ab3e67676930f49fd5e16f45e3df4f)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agobuildperl.pl: Add ability to build in parallel
Karl Williamson [Mon, 8 Jul 2019 20:30:11 +0000 (14:30 -0600)]
buildperl.pl: Add ability to build in parallel

This allows you to manually call this with a -j parameter to give the
number of parallel jobs to run, default 1.

(cherry picked from commit baffbaef885a245b50c5c20dc60b4dc180615433)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agodevtools.pl: Re-prompt if user typed wrong
Karl Williamson [Mon, 8 Jul 2019 20:36:19 +0000 (14:36 -0600)]
devtools.pl: Re-prompt if user typed wrong

Previously it just waited for the user to type the right thing without
prompting that it was doing so.

It also prints a BEL character to notify that attention is needed.

(cherry picked from commit 4b79a8599508f7ad03e4f6e8b62062f5ba989969)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoHandle "literal string" args
Karl Williamson [Wed, 14 Aug 2019 22:42:46 +0000 (16:42 -0600)]
Handle "literal string" args

Some of the macros in perl require an argument to be a literal C string,
that is, one enclosed in quotation marks.  This change causes trim_arg()
to recognize these and return them properly, and apicheck.pl to use the
passed string directly as the argument.

(cherry picked from commit bc85e4126fa938abcaecadef4cbd8678da215250)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoparts/apicheck.pl: Special case things like _aTHX
Karl Williamson [Wed, 14 Aug 2019 03:34:00 +0000 (21:34 -0600)]
parts/apicheck.pl: Special case things like _aTHX

A few macros have a leading underscore to indicate a comma.  This adds
code to handle them.  I made separate variabled for threaded and maybe
non-threaded, but I don't know if the latter actually happens.

(cherry picked from commit 1187530614591229d1a4f1d7b2989439b1038861)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoparts/apicheck.pl: Add declarations for MY_CXT testing
Karl Williamson [Wed, 14 Aug 2019 03:17:58 +0000 (21:17 -0600)]
parts/apicheck.pl: Add declarations for MY_CXT testing

(cherry picked from commit aed2f395177f375003a5eecdc9535ac1e22c7f93)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoparts/apicheck.pl: Handle macros with trailing '_'
Karl Williamson [Tue, 6 Aug 2019 21:50:56 +0000 (15:50 -0600)]
parts/apicheck.pl: Handle macros with trailing '_'

The underscore represents a comma when expanded.  This commit makes this
program handle it.

(cherry picked from commit 12c850af3cce16d98a6a316b41a6992cfe6c6bda)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoparts/apicheck.pl: A couple better diagnosics
Karl Williamson [Tue, 6 Aug 2019 21:49:54 +0000 (15:49 -0600)]
parts/apicheck.pl: A couple better diagnosics

(cherry picked from commit efe0e70e31d29bb9fdafee482bc4652151973f31)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoparts/apicheck.pl: Add special parameter name 'block'
Karl Williamson [Tue, 6 Aug 2019 21:47:10 +0000 (15:47 -0600)]
parts/apicheck.pl: Add special parameter name 'block'

A new macro has been added to blead that has a parameter that can be a C
block.  This can easily be accommodated by the code in this file, if we
know about how to handle it.

(cherry picked from commit 2095204694d4f9df74463fc45d58b441759de865)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoparts/apicheck.pl: Add white-space to m//x for readability
Karl Williamson [Wed, 14 Aug 2019 19:04:14 +0000 (13:04 -0600)]
parts/apicheck.pl: Add white-space to m//x for readability

And some comments to regex

(cherry picked from commit a76243946786233602fab339e55b29851c3785e9)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoparts/apicheck.pl: Silence warnings on old perls
Karl Williamson [Sun, 14 Jul 2019 16:01:59 +0000 (10:01 -0600)]
parts/apicheck.pl: Silence warnings on old perls

A hash element wasn't always automatically quoted: {foo} warned, {'foo'}
doesn't.

(cherry picked from commit 2a1fab422eb86442cc09296f3fe03d027e9c7254)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoparts/apicheck.pl: Add a few comments; white-space
Karl Williamson [Tue, 2 Jul 2019 16:52:45 +0000 (10:52 -0600)]
parts/apicheck.pl: Add a few comments; white-space

(cherry picked from commit fc50937fba868cf630ba6ccedd83d88a307ea81f)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoparts/apicheck.pl: Ignore some hard-to-handle functions
Karl Williamson [Tue, 2 Jul 2019 16:49:25 +0000 (10:49 -0600)]
parts/apicheck.pl: Ignore some hard-to-handle functions

These are hard to get to work, so punt.

(cherry picked from commit 5e34d4c395ed0f10bae66d83e8ac0ab5264197bd)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoparts/apicheck.pl: BOOTCHECK needs some declarations to compile
Karl Williamson [Tue, 2 Jul 2019 16:48:39 +0000 (10:48 -0600)]
parts/apicheck.pl: BOOTCHECK needs some declarations to compile

(cherry picked from commit 5490382d8d66af8e7a06103b6fc74baa90c6c7d0)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoparts/apicheck.pl: MULTICALL needs declarations to compile
Karl Williamson [Tue, 2 Jul 2019 16:46:18 +0000 (10:46 -0600)]
parts/apicheck.pl: MULTICALL needs declarations to compile

(cherry picked from commit 27cc0c8cf320818b8d81ec0f0ddd9e1f71cb1a38)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoparts/apicheck.pl: Sort some lists
Karl Williamson [Tue, 2 Jul 2019 16:39:21 +0000 (10:39 -0600)]
parts/apicheck.pl: Sort some lists

This makes it easier to see if something is on the list.

(cherry picked from commit 84572eb25b1204a8832d83d99df67a7d4f5e155d)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoparts/apicheck.pl: LC_NUMERIC manip requires a decl
Karl Williamson [Sat, 29 Jun 2019 17:24:56 +0000 (11:24 -0600)]
parts/apicheck.pl: LC_NUMERIC manip requires a decl

The tests for these macros need to be special cased, like some others,
so that a declaration is made.

(cherry picked from commit eec0adf3b6947231b219e9d03dfaeeb9bebb2cb7)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoparts/apicheck.pl: Fix up aTHX
Karl Williamson [Tue, 25 Jun 2019 17:58:35 +0000 (11:58 -0600)]
parts/apicheck.pl: Fix up aTHX

Now that we have better flags indicating if a macro or function needs
thread context or not, we can do a better job of handling it.

(cherry picked from commit 26a7bc7c87b1326539c5ec9b6389e615051a066a)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoparts/apicheck.pl: Handle const parameters
Karl Williamson [Tue, 25 Jun 2019 17:46:33 +0000 (11:46 -0600)]
parts/apicheck.pl: Handle const parameters

We now have parameters that are declared 'const'.  The code generated
previously was declared const without being initialized, which is now
fatal.

(cherry picked from commit 35286f38df4517fb5fa338fcff410eaa5c0ddce0)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoparts/apicheck.pl: Handle identifier containing 'const'
Karl Williamson [Tue, 25 Jun 2019 17:35:51 +0000 (11:35 -0600)]
parts/apicheck.pl: Handle identifier containing 'const'

While reading the code, I realized that if an identifier name contained
the substring 'const' this wouldn't work.  It's a simple matter to add
\b to prevent this unlikely scenario.

(cherry picked from commit eaa9c034d31c5a167bf85b6888fed5201bf0667f)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoparts/apicheck.pl: ignore duplicate function
Karl Williamson [Sat, 20 Jul 2019 21:01:59 +0000 (15:01 -0600)]
parts/apicheck.pl: ignore duplicate function

(cherry picked from commit 9dfb2a45f3db2125b67e3f6b9783e10a129dab57)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoparts/ppptools.pl: Misspelled intended lookbehind assertion
Karl Williamson [Wed, 14 Aug 2019 22:28:33 +0000 (16:28 -0600)]
parts/ppptools.pl: Misspelled intended lookbehind assertion

And when I corrected the spelling, I discovered that it would never have
worked if spelled correctly on perls that predate this feature.  So I
used a less efficient loop.

(cherry picked from commit e1584b7d3806e80c64225acc2dd0e4b0ee45196e)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoparts/ppptools.pl: Add comments, white-space, m//x
Karl Williamson [Mon, 15 Jul 2019 21:35:14 +0000 (15:35 -0600)]
parts/ppptools.pl: Add comments, white-space, m//x

This makes some patterns /x with white space to make them more readable.
It also changes several s/\s*// to s/\s+//, which is faster.

(cherry picked from commit 49ee9fdc8f67a4180bee01519cba8bce36f33387)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoparts/ppptools.pl: Rename variables
Karl Williamson [Thu, 18 Jul 2019 20:50:00 +0000 (14:50 -0600)]
parts/ppptools.pl: Rename variables

to be more mnemonic

(cherry picked from commit dd19dfc1234756d5bc4e21e49a7e0e1a47924f96)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoparts/ppptools.pl: Normalize prototypes
Karl Williamson [Fri, 12 Jul 2019 16:38:10 +0000 (10:38 -0600)]
parts/ppptools.pl: Normalize prototypes

This is so the existing comparison routines don't show that things are
different solely because of white space differences

(cherry picked from commit 93e8c96d2cd21f17b16636c3876a7960ef48b74e)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoparts/ppptools.pl: Yet another instance of an old flag
Karl Williamson [Thu, 11 Jul 2019 04:32:55 +0000 (22:32 -0600)]
parts/ppptools.pl: Yet another instance of an old flag

THe meanings of various flags changed a couple of months ago.  This is
the final (AFAICT) one to update.

(cherry picked from commit f03de555ac51a65231b9116f35506a751f5d559b)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoparts/ppptools.pl: Don't omit any fcns/macros in parsing .fnc
Karl Williamson [Tue, 9 Jul 2019 17:47:47 +0000 (11:47 -0600)]
parts/ppptools.pl: Don't omit any fcns/macros in parsing .fnc

A commit I made some years ago caused deprecated and experimental
functions from not being parsed.  This was the wrong thing to do.
This is because some tools like scan_prov (which hasn't been run in many
years) need them.  Instead this moves the skipping to the routine that
needs to skip, and doesn't skip as many categories.

(cherry picked from commit 24f05e758aa2d50ac85aa495b956b209e52a5e84)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoapicheck_c.PL: Add detail to comment
Karl Williamson [Wed, 14 Aug 2019 13:20:40 +0000 (07:20 -0600)]
apicheck_c.PL: Add detail to comment

(cherry picked from commit 948b1be3996812d97c85115a7c35678a0ab2b596)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agodevel/mkapidoc.sh: Add strict, warnings
Karl Williamson [Wed, 14 Aug 2019 23:39:10 +0000 (17:39 -0600)]
devel/mkapidoc.sh: Add strict, warnings

(cherry picked from commit 5b5e4dc3f866089d8a51f580d4ecb554452a816a)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoAll entries in apidoc.fnc are documented
Karl Williamson [Thu, 4 Jul 2019 20:25:29 +0000 (14:25 -0600)]
All entries in apidoc.fnc are documented

They often don't have that flag in the source, but since they're in the
source, they're documented.  So just add the flag when generating the
file.

(cherry picked from commit 78cf0bdd4bbf969d6ec7058755320706aff9143e)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agodevel/mkapidoc.sh: Slight clean up
Karl Williamson [Tue, 6 Aug 2019 04:54:32 +0000 (22:54 -0600)]
devel/mkapidoc.sh: Slight clean up

(cherry picked from commit 3135597a40b0d2fdc6daaa57cedd88b6963b58ff)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agodevel/mkapidoc.sh: Sort the apidoc macros by name
Karl Williamson [Tue, 25 Jun 2019 17:19:18 +0000 (11:19 -0600)]
devel/mkapidoc.sh: Sort the apidoc macros by name

(cherry picked from commit ba3cdff1750f4339cf04e511c9ac9099c93d10a4)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agodevel/mkapidoc.sh: White-space, comments only
Karl Williamson [Tue, 25 Jun 2019 17:09:58 +0000 (11:09 -0600)]
devel/mkapidoc.sh: White-space, comments only

This makes it more readable

(cherry picked from commit 9b98f505fc1548b82871f2870b10282bcdc489d2)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agodevel/mkapidoc.sh: Skip irrelevant embed.fnc lines
Karl Williamson [Thu, 8 Aug 2019 18:33:18 +0000 (12:33 -0600)]
devel/mkapidoc.sh: Skip irrelevant embed.fnc lines

Skip comments, for example.

(cherry picked from commit a71d41a14e304380acebac8be29cba06b6e5d137)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoparts/apidoc.fnc: Update to latest blead
Karl Williamson [Sun, 15 Sep 2019 00:05:15 +0000 (18:05 -0600)]
parts/apidoc.fnc: Update to latest blead

(cherry picked from commit 7a3ddf4b0ce4331d84b33ea64c6c33e22df6c51b)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoUpdate to latest blead embed.fnc
Karl Williamson [Sat, 14 Sep 2019 21:09:24 +0000 (15:09 -0600)]
Update to latest blead embed.fnc

(cherry picked from commit c788af012154f2734511c5b7f6f0a9be18de78e7)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoparts/inc/utf8: Don't use postfix for in D:P tests
Karl Williamson [Sun, 15 Sep 2019 16:21:06 +0000 (10:21 -0600)]
parts/inc/utf8: Don't use postfix for in D:P tests

Devel::PPPort goes back further than this construct.
(cherry picked from commit f5c4f171dfbd4ead0b9a9dd191c9709f9fedcbd5)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoparts/inc/utf8: blead still doesn't work
Karl Williamson [Tue, 20 Aug 2019 01:29:29 +0000 (19:29 -0600)]
parts/inc/utf8: blead still doesn't work

This was a commit that was made in blead, and needs to be copied to the
distro.  The release at which blead will start working without being
overridden by ppport.h had to be delayed one month.

(cherry picked from commit 7b671cf31e5d22e692481b72066c2624b7cbf823)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoImplement sv_len_utf8_nomg() and sv_len_utf8()
Pali [Tue, 27 Aug 2019 11:44:35 +0000 (13:44 +0200)]
Implement sv_len_utf8_nomg() and sv_len_utf8()

Also fix sv_len_utf8() for Perl versions prior to 5.17.5.

(cherry picked from commit 91ea0ce8f1d77f9ba270b19eb01ed94cb349b7b3)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoHACKERS: Add info about Hints and Warnings
Karl Williamson [Thu, 4 Jul 2019 20:19:42 +0000 (14:19 -0600)]
HACKERS: Add info about Hints and Warnings

(cherry picked from commit 51b0c694ca09fb4656215cbe4575b9654a63a522)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoImplement SvIV_nomg(), SvUV_nomg(), SvNV_nomg() and SvTRUE_nomg()
Pali [Fri, 12 Jul 2019 11:37:06 +0000 (13:37 +0200)]
Implement SvIV_nomg(), SvUV_nomg(), SvNV_nomg() and SvTRUE_nomg()

Use sv_mortalcopy_flags() macro with SV_NOSTEAL flag to create non-magical
copy of input scalar. And on this non-magical copy call original Perl's
SvIV/SvUV/SvNV/SvTRUE macro.

This would ensure that get magic is not processed on original input scalar
argument and also that correct value is returned.

(cherry picked from commit c01919df38e1d016f008b3572c81a86f70e53be5)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoFix eval_pv for Perl versions prior to 5.31.2
Pali [Tue, 9 Jul 2019 10:18:09 +0000 (12:18 +0200)]
Fix eval_pv for Perl versions prior to 5.31.2

Seems that check for SvROK() and SvTRUE() is enough, see:
https://rt.perl.org/Public/Bug/Display.html?id=134177
https://rt.perl.org/Public/Bug/Display.html?id=134175

(cherry picked from commit 0f5184e818b7217c9a75d5275b716a055f7bef6c)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoBackport PL_mess_sv
Karl Williamson [Mon, 8 Jul 2019 22:04:23 +0000 (16:04 -0600)]
Backport PL_mess_sv

(cherry picked from commit 8f700bf9c63f435025a5d92bfd424c1312b9bc3d)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoBackport foldEQ_utf8 using ibcmp_utf8
Karl Williamson [Thu, 4 Jul 2019 18:21:16 +0000 (12:21 -0600)]
Backport foldEQ_utf8 using ibcmp_utf8

Though I think there were some bugs in earlier versions.

(cherry picked from commit 53fcb552d031c2a48d34ce24e9f213f5167ce05a)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoBackport is_utf8_invariant_string, is_invariant_string
Karl Williamson [Thu, 4 Jul 2019 19:15:21 +0000 (13:15 -0600)]
Backport is_utf8_invariant_string, is_invariant_string

These are more correct synonyms for is_ascii_string

(cherry picked from commit 7d9499b7ae83f2017b5c3a659547d98dc11633eb)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoBackport BOM_UTF8 REPLACEMENT_CHARACTER_UTF8
Karl Williamson [Thu, 4 Jul 2019 18:19:10 +0000 (12:19 -0600)]
Backport BOM_UTF8 REPLACEMENT_CHARACTER_UTF8

(cherry picked from commit 95c5c8d34cb28d3774aac13153a03ae61673bd82)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoBackport isUTF8_CHAR
Karl Williamson [Thu, 4 Jul 2019 18:14:56 +0000 (12:14 -0600)]
Backport isUTF8_CHAR

(cherry picked from commit 9ef04c4cd59fdfe1f76083ad76803544d38a9012)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoConsolidate UTF-8 functions/macros into new file
Karl Williamson [Thu, 4 Jul 2019 18:05:32 +0000 (12:05 -0600)]
Consolidate UTF-8 functions/macros into new file

It's easier to grok when these are all together, and not in several
files.

(cherry picked from commit 365c133b9378a47cbf5ccf78a6dfc713cb8388de)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoImplement sv_mortalcopy_flags()
Pali [Thu, 4 Jul 2019 15:05:34 +0000 (17:05 +0200)]
Implement sv_mortalcopy_flags()

(cherry picked from commit a8ddf81bea0c2c5a7476a76c98b307764f69bee5)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoImplement newSVsv_flags()
Pali [Thu, 4 Jul 2019 10:01:59 +0000 (12:01 +0200)]
Implement newSVsv_flags()

(cherry picked from commit d1ffac9ac663e9293129c76289d5bb8124566060)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoAdd tests for IVdf, UVuf, IV_MAX and UV_MAX
Pali [Mon, 1 Jul 2019 12:37:19 +0000 (14:37 +0200)]
Add tests for IVdf, UVuf, IV_MAX and UV_MAX

(cherry picked from commit 2b31db974097bbec6a64078e2a3f8c1c166236ad)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoFix several other implemented todo
Nicolas R [Thu, 16 May 2019 21:58:36 +0000 (15:58 -0600)]
Fix several other implemented todo

Fixes GH #61 aka RT 134101

(cherry picked from commit 92ceda883e0bc1fc9a093bb0af07d04e81dc01ab)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoEnable Perl compile-time warnings at all places
Pali [Mon, 1 Jul 2019 20:54:13 +0000 (22:54 +0200)]
Enable Perl compile-time warnings at all places

(cherry picked from commit aad9feda2ec7fa8b44924162ed852de4ea074ab4)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoMakefile.PL: Fix so works on early perls
Karl Williamson [Tue, 9 Jul 2019 17:40:50 +0000 (11:40 -0600)]
Makefile.PL: Fix so works on early perls

You can't declare a variable within a looping statement like 'for' in
early perls.  Just declare it immediately beforehand.

(cherry picked from commit 1b3fbf992bcf862b418afbd705ce1d1eb0c573fb)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoAdd required dependency for $(VERSION_FROM) target in Makefile.PL
Pali [Sun, 2 Jun 2019 11:34:45 +0000 (13:34 +0200)]
Add required dependency for $(VERSION_FROM) target in Makefile.PL

(cherry picked from commit 4b59ba9792a43a0891ad07adff7b15b11b239649)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoUse correct method for checking module version in Makefile.PL
Pali [Sun, 2 Jun 2019 11:34:33 +0000 (13:34 +0200)]
Use correct method for checking module version in Makefile.PL

(cherry picked from commit 45499778ea5ff8fbb51a5e75059b3c94e221f9e6)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoFix inclusion of META_MERGE in Makefile.PL
Pali [Sun, 2 Jun 2019 11:34:26 +0000 (13:34 +0200)]
Fix inclusion of META_MERGE in Makefile.PL

(cherry picked from commit a145a59bef4ca21685181c0b912d9c7218e0742d)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoEnable warnings in Makefile.PL
Pali [Sun, 2 Jun 2019 11:34:14 +0000 (13:34 +0200)]
Enable warnings in Makefile.PL

(cherry picked from commit f74454f179348ed4aebc04ba735ccc12eee3c980)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoUpdate HACKERS
Karl Williamson [Sun, 21 Jul 2019 00:25:23 +0000 (18:25 -0600)]
Update HACKERS

(cherry picked from commit faa4c9817e61fd8aa4c1d18877c2c5800bf113b6)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoHACKERS: Update
Karl Williamson [Wed, 10 Jul 2019 03:53:12 +0000 (21:53 -0600)]
HACKERS: Update

(cherry picked from commit ac27a862173e52405c4f93657cd350ad9312ec24)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoHACKERS: Add info about Hints and Warnings
Karl Williamson [Thu, 4 Jul 2019 20:19:42 +0000 (14:19 -0600)]
HACKERS: Add info about Hints and Warnings

(cherry picked from commit 5df9c36cef7b172a0fe805f209de55cbb87f6ac6)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoDocument D_PPP_ prefix for macros
Pali [Mon, 17 Jun 2019 13:54:13 +0000 (15:54 +0200)]
Document D_PPP_ prefix for macros

(cherry picked from commit 7556987e03558cd2f200df996ee222da58e5889c)
Signed-off-by: Nicolas R <atoomic@cpan.org>
2 years agoregcomp.h: Parenthesize param in macro expansion
Karl Williamson [Sat, 21 Sep 2019 19:18:12 +0000 (13:18 -0600)]
regcomp.h: Parenthesize param in macro expansion

This is always a good idea

2 years agoregcomp.h: Remove duplicate macro expansion
Karl Williamson [Sat, 21 Sep 2019 19:14:25 +0000 (13:14 -0600)]
regcomp.h: Remove duplicate macro expansion

This macro has the same definition as another.

2 years agoregcomp.c: Clarify some comments
Karl Williamson [Fri, 27 Sep 2019 04:09:51 +0000 (22:09 -0600)]
regcomp.c: Clarify some comments

2 years agoregcomp.sym Update and improve descriptions of some nodes
Karl Williamson [Sun, 22 Sep 2019 21:09:05 +0000 (15:09 -0600)]
regcomp.sym Update and improve descriptions of some nodes

EXACTFU nodes always now fold their strings; the information here had
not been updated to reflect that change.

And the descriptions of several EXACTish nodes are now changed to be
slightly shorter and to remove mention of the string length, which is
problematic, and is covered in the description for EXACT

2 years agoregen/regcomp.pl: Rename variable
Karl Williamson [Thu, 26 Sep 2019 22:30:21 +0000 (16:30 -0600)]
regen/regcomp.pl: Rename variable

The old name was misleading.

2 years agoregen/regcomp.pl, regcomp.sym: Comments
Karl Williamson [Thu, 26 Sep 2019 22:23:33 +0000 (16:23 -0600)]
regen/regcomp.pl, regcomp.sym: Comments

I spent some time in this code trying to understand some things, and as
a result I'm commenting previously undocumented features.  The comments
about what an entry in regcomp.sym should look like are moved to that
file, rather than the file that reads it.  The former is most often
touched, and they had gotten out-of-sync in the latter.  Things now make
more sense to me, and hopefully anyone using this in the future.