In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/39ecab1c690aee1a1fdeefb6c706448af5d2981f?hp=6d5abc62848da0e110869e2b13c68bf498ff3a90>

- Log -----------------------------------------------------------------
commit 39ecab1c690aee1a1fdeefb6c706448af5d2981f
Merge: 6d5abc6 843b375
Author: Nicholas Clark <[email protected]>
Date:   Mon May 20 21:12:01 2013 +0200

    Merge the reworking of how genpacksizetables.pl is used.

commit 843b37592a564e2e84c28a00619ac6c132c6dbc9
Author: Nicholas Clark <[email protected]>
Date:   Mon Apr 29 12:06:39 2013 +0200

    Add regen/genpacksizetables.pl to t/porting/regen.t

M       t/porting/regen.t

commit e3f061af802f7db7c760d810c495d83763fff668
Author: Nicholas Clark <[email protected]>
Date:   Mon Apr 29 11:54:19 2013 +0200

    Move genpacksizetables.pl to regen/genpacksizetables.pl

M       MANIFEST
D       genpacksizetables.pl
M       packsizetables.c
A       regen/genpacksizetables.pl

commit 6b05cb8115fc15fed0e6bf162a9cc797222572ee
Author: Nicholas Clark <[email protected]>
Date:   Mon Apr 29 11:47:30 2013 +0200

    Refactor genpacksizetables.pl to use regen/regen_lib.pl

M       genpacksizetables.pl
M       packsizetables.c

commit 298bc19c0935302faa4957de141245bb64c6b2df
Author: Nicholas Clark <[email protected]>
Date:   Mon Apr 29 11:23:11 2013 +0200

    Extract the generated packprops array into packsizetables.c.
    
    The C source is the output from genpacksizetables.pl
    Previously it was pasted into pp_pack.c
    
     LocalWords:  packprops

M       MANIFEST
A       packsizetables.c
M       pp_pack.c

commit e2add64b70b6d5c55a6598257032bf0777c5976c
Author: Nicholas Clark <[email protected]>
Date:   Mon Apr 29 11:08:05 2013 +0200

    Propagate a change from commit 1651fc447620d361 into genpacksizetables.pl.
    
    pp_pack.c contains a table generated by genpacksizetables.pl, pasted into 
the
    C source. The C source was updated by commit 1651fc447620d361 in April 2007,
    but the table used to generate the code was not.

M       genpacksizetables.pl

commit d8a3828919c2d8a9e1344ba4d05795d37ed9cdb6
Author: Karl Williamson <[email protected]>
Date:   Wed Mar 13 16:18:12 2013 -0600

    genpacksizetables.pl: Correct comment typo

M       genpacksizetables.pl
-----------------------------------------------------------------------

Summary of changes:
 MANIFEST                                           |    3 +-
 packsizetables.c                                   |  254 ++++++++++++++++++++
 pp_pack.c                                          |  250 +-------------------
 genpacksizetables.pl => regen/genpacksizetables.pl |   12 +-
 t/porting/regen.t                                  |    2 +-
 5 files changed, 265 insertions(+), 256 deletions(-)
 create mode 100644 packsizetables.c
 rename genpacksizetables.pl => regen/genpacksizetables.pl (92%)

diff --git a/MANIFEST b/MANIFEST
index 90b5042..7115372 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -3886,7 +3886,6 @@ fakethr.h                 Fake threads header
 feature.h                      Feature header
 form.h                         Public declarations for formats
 generate_uudmap.c              Generate uudmap.h, the uuencode decoding map
-genpacksizetables.pl           Generate the size tables for pack/unpack
 globals.c                      File to declare global symbols (for shared 
library)
 globvar.sym                    Global variables that need hiding when embedded
 gv.c                           Glob value code
@@ -4424,6 +4423,7 @@ os2/perlrexx.c                    Support perl 
interpreter embedded in REXX
 os2/perlrexx.cmd               Test perl interpreter embedded in REXX
 overload.c                     generated overload enum (public)
 overload.h                     generated overload name table (implementation)
+packsizetables.c               The generated packprops array used in pp_pack.c
 pad.c                          Scratchpad functions
 pad.h                          Scratchpad headers
 parser.h                       parser object header
@@ -4712,6 +4712,7 @@ regcomp.sym                       Data for regnodes.h
 regen/embed_lib.pl             Reads embed.fnc and regen/opcodes
 regen/embed.pl                 Produces {embed,embedvar,proto}.h
 regen/feature.pl               Generates feature.pm
+regen/genpacksizetables.pl     Generate the size tables for pack/unpack
 regen/keywords.pl              Program to write keywords.h
 regen/mg_vtable.pl             generate mg_vtable.h
 regen/mk_invlists.pl           Generates charclass_invlists.h
diff --git a/packsizetables.c b/packsizetables.c
new file mode 100644
index 0000000..afeb210
--- /dev/null
+++ b/packsizetables.c
@@ -0,0 +1,254 @@
+/* -*- buffer-read-only: t -*-
+   !!!!!!!   DO NOT EDIT THIS FILE   !!!!!!!
+   This file is built by regen/genpacksizetables.pl from its data.
+   Any changes made here will be lost!
+ */
+
+#if TYPE_IS_SHRIEKING != 0x100
+   ++++shriek offset should be 256
+#endif
+
+typedef U8 packprops_t;
+#if 'J'-'I' == 1
+/* ASCII */
+STATIC const packprops_t packprops[512] = {
+    /* normal */
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0,
+    /* C */ sizeof(unsigned char),
+#if defined(HAS_LONG_DOUBLE) && defined(USE_LONG_DOUBLE)
+    /* D */ LONG_DOUBLESIZE,
+#else
+    0,
+#endif
+    0,
+    /* F */ NVSIZE,
+    0, 0,
+    /* I */ sizeof(unsigned int),
+    /* J */ UVSIZE,
+    0,
+    /* L */ SIZE32,
+    0,
+    /* N */ SIZE32,
+    0, 0,
+#if defined(HAS_QUAD)
+    /* Q */ sizeof(Uquad_t),
+#else
+    0,
+#endif
+    0,
+    /* S */ SIZE16,
+    0,
+    /* U */ sizeof(char) | PACK_SIZE_UNPREDICTABLE,
+    /* V */ SIZE32,
+    /* W */ sizeof(unsigned char) | PACK_SIZE_UNPREDICTABLE,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    /* c */ sizeof(char),
+    /* d */ sizeof(double),
+    0,
+    /* f */ sizeof(float),
+    0, 0,
+    /* i */ sizeof(int),
+    /* j */ IVSIZE,
+    0,
+    /* l */ SIZE32,
+    0,
+    /* n */ SIZE16,
+    0,
+    /* p */ sizeof(char *) | PACK_SIZE_CANNOT_CSUM,
+#if defined(HAS_QUAD)
+    /* q */ sizeof(Quad_t),
+#else
+    0,
+#endif
+    0,
+    /* s */ SIZE16,
+    0, 0,
+    /* v */ SIZE16,
+    /* w */ sizeof(char) | PACK_SIZE_UNPREDICTABLE | PACK_SIZE_CANNOT_CSUM,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0,
+    /* shrieking */
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0,
+    /* I */ sizeof(unsigned int),
+    0, 0,
+    /* L */ sizeof(unsigned long),
+    0,
+#if defined(PERL_PACK_CAN_SHRIEKSIGN)
+    /* N */ SIZE32,
+#else
+    0,
+#endif
+    0, 0, 0, 0,
+    /* S */ sizeof(unsigned short),
+    0, 0,
+#if defined(PERL_PACK_CAN_SHRIEKSIGN)
+    /* V */ SIZE32,
+#else
+    0,
+#endif
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0,
+    /* i */ sizeof(int),
+    0, 0,
+    /* l */ sizeof(long),
+    0,
+#if defined(PERL_PACK_CAN_SHRIEKSIGN)
+    /* n */ SIZE16,
+#else
+    0,
+#endif
+    0, 0, 0, 0,
+    /* s */ sizeof(short),
+    0, 0,
+#if defined(PERL_PACK_CAN_SHRIEKSIGN)
+    /* v */ SIZE16,
+#else
+    0,
+#endif
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+#else
+/* EBCDIC (or bust) */
+STATIC const packprops_t packprops[512] = {
+    /* normal */
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0,
+    /* c */ sizeof(char),
+    /* d */ sizeof(double),
+    0,
+    /* f */ sizeof(float),
+    0, 0,
+    /* i */ sizeof(int),
+    0, 0, 0, 0, 0, 0, 0,
+    /* j */ IVSIZE,
+    0,
+    /* l */ SIZE32,
+    0,
+    /* n */ SIZE16,
+    0,
+    /* p */ sizeof(char *) | PACK_SIZE_CANNOT_CSUM,
+#if defined(HAS_QUAD)
+    /* q */ sizeof(Quad_t),
+#else
+    0,
+#endif
+    0, 0, 0, 0, 0, 0, 0, 0, 0,
+    /* s */ SIZE16,
+    0, 0,
+    /* v */ SIZE16,
+    /* w */ sizeof(char) | PACK_SIZE_UNPREDICTABLE | PACK_SIZE_CANNOT_CSUM,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    /* C */ sizeof(unsigned char),
+#if defined(HAS_LONG_DOUBLE) && defined(USE_LONG_DOUBLE)
+    /* D */ LONG_DOUBLESIZE,
+#else
+    0,
+#endif
+    0,
+    /* F */ NVSIZE,
+    0, 0,
+    /* I */ sizeof(unsigned int),
+    0, 0, 0, 0, 0, 0, 0,
+    /* J */ UVSIZE,
+    0,
+    /* L */ SIZE32,
+    0,
+    /* N */ SIZE32,
+    0, 0,
+#if defined(HAS_QUAD)
+    /* Q */ sizeof(Uquad_t),
+#else
+    0,
+#endif
+    0, 0, 0, 0, 0, 0, 0, 0, 0,
+    /* S */ SIZE16,
+    0,
+    /* U */ sizeof(char) | PACK_SIZE_UNPREDICTABLE,
+    /* V */ SIZE32,
+    /* W */ sizeof(unsigned char) | PACK_SIZE_UNPREDICTABLE,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0,
+    /* shrieking */
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0,
+    /* i */ sizeof(int),
+    0, 0, 0, 0, 0, 0, 0, 0, 0,
+    /* l */ sizeof(long),
+    0,
+#if defined(PERL_PACK_CAN_SHRIEKSIGN)
+    /* n */ SIZE16,
+#else
+    0,
+#endif
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    /* s */ sizeof(short),
+    0, 0,
+#if defined(PERL_PACK_CAN_SHRIEKSIGN)
+    /* v */ SIZE16,
+#else
+    0,
+#endif
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0,
+    /* I */ sizeof(unsigned int),
+    0, 0, 0, 0, 0, 0, 0, 0, 0,
+    /* L */ sizeof(unsigned long),
+    0,
+#if defined(PERL_PACK_CAN_SHRIEKSIGN)
+    /* N */ SIZE32,
+#else
+    0,
+#endif
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    /* S */ sizeof(unsigned short),
+    0, 0,
+#if defined(PERL_PACK_CAN_SHRIEKSIGN)
+    /* V */ SIZE32,
+#else
+    0,
+#endif
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+#endif
+
+/* ex: set ro: */
diff --git a/pp_pack.c b/pp_pack.c
index 6c3dc5f..b41ec78 100644
--- a/pp_pack.c
+++ b/pp_pack.c
@@ -389,255 +389,7 @@ S_mul128(pTHX_ SV *sv, U8 m)
 #define PACK_SIZE_UNPREDICTABLE                0x40    /* Not a fixed size 
element */
 #define PACK_SIZE_MASK                 0x3F
 
-/* These tables are regenerated by genpacksizetables.pl (and then hand pasted
-   in).  You're unlikely ever to need to regenerate them.  */
-
-#if TYPE_IS_SHRIEKING != 0x100
-   ++++shriek offset should be 256
-#endif
-
-typedef U8 packprops_t;
-#if 'J'-'I' == 1
-/* ASCII */
-STATIC const packprops_t packprops[512] = {
-    /* normal */
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0,
-    /* C */ sizeof(unsigned char),
-#if defined(HAS_LONG_DOUBLE) && defined(USE_LONG_DOUBLE)
-    /* D */ LONG_DOUBLESIZE,
-#else
-    0,
-#endif
-    0,
-    /* F */ NVSIZE,
-    0, 0,
-    /* I */ sizeof(unsigned int),
-    /* J */ UVSIZE,
-    0,
-    /* L */ SIZE32,
-    0,
-    /* N */ SIZE32,
-    0, 0,
-#if defined(HAS_QUAD)
-    /* Q */ sizeof(Uquad_t),
-#else
-    0,
-#endif
-    0,
-    /* S */ SIZE16,
-    0,
-    /* U */ sizeof(char) | PACK_SIZE_UNPREDICTABLE,
-    /* V */ SIZE32,
-    /* W */ sizeof(unsigned char) | PACK_SIZE_UNPREDICTABLE,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    /* c */ sizeof(char),
-    /* d */ sizeof(double),
-    0,
-    /* f */ sizeof(float),
-    0, 0,
-    /* i */ sizeof(int),
-    /* j */ IVSIZE,
-    0,
-    /* l */ SIZE32,
-    0,
-    /* n */ SIZE16,
-    0,
-    /* p */ sizeof(char *) | PACK_SIZE_CANNOT_CSUM,
-#if defined(HAS_QUAD)
-    /* q */ sizeof(Quad_t),
-#else
-    0,
-#endif
-    0,
-    /* s */ SIZE16,
-    0, 0,
-    /* v */ SIZE16,
-    /* w */ sizeof(char) | PACK_SIZE_UNPREDICTABLE | PACK_SIZE_CANNOT_CSUM,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0,
-    /* shrieking */
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0,
-    /* I */ sizeof(unsigned int),
-    0, 0,
-    /* L */ sizeof(unsigned long),
-    0,
-#if defined(PERL_PACK_CAN_SHRIEKSIGN)
-    /* N */ SIZE32,
-#else
-    0,
-#endif
-    0, 0, 0, 0,
-    /* S */ sizeof(unsigned short),
-    0, 0,
-#if defined(PERL_PACK_CAN_SHRIEKSIGN)
-    /* V */ SIZE32,
-#else
-    0,
-#endif
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0,
-    /* i */ sizeof(int),
-    0, 0,
-    /* l */ sizeof(long),
-    0,
-#if defined(PERL_PACK_CAN_SHRIEKSIGN)
-    /* n */ SIZE16,
-#else
-    0,
-#endif
-    0, 0, 0, 0,
-    /* s */ sizeof(short),
-    0, 0,
-#if defined(PERL_PACK_CAN_SHRIEKSIGN)
-    /* v */ SIZE16,
-#else
-    0,
-#endif
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0
-};
-#else
-/* EBCDIC (or bust) */
-STATIC const packprops_t packprops[512] = {
-    /* normal */
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0,
-    /* c */ sizeof(char),
-    /* d */ sizeof(double),
-    0,
-    /* f */ sizeof(float),
-    0, 0,
-    /* i */ sizeof(int),
-    0, 0, 0, 0, 0, 0, 0,
-    /* j */ IVSIZE,
-    0,
-    /* l */ SIZE32,
-    0,
-    /* n */ SIZE16,
-    0,
-    /* p */ sizeof(char *) | PACK_SIZE_CANNOT_CSUM,
-#if defined(HAS_QUAD)
-    /* q */ sizeof(Quad_t),
-#else
-    0,
-#endif
-    0, 0, 0, 0, 0, 0, 0, 0, 0,
-    /* s */ SIZE16,
-    0, 0,
-    /* v */ SIZE16,
-    /* w */ sizeof(char) | PACK_SIZE_UNPREDICTABLE | PACK_SIZE_CANNOT_CSUM,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    /* C */ sizeof(unsigned char),
-#if defined(HAS_LONG_DOUBLE) && defined(USE_LONG_DOUBLE)
-    /* D */ LONG_DOUBLESIZE,
-#else
-    0,
-#endif
-    0,
-    /* F */ NVSIZE,
-    0, 0,
-    /* I */ sizeof(unsigned int),
-    0, 0, 0, 0, 0, 0, 0,
-    /* J */ UVSIZE,
-    0,
-    /* L */ SIZE32,
-    0,
-    /* N */ SIZE32,
-    0, 0,
-#if defined(HAS_QUAD)
-    /* Q */ sizeof(Uquad_t),
-#else
-    0,
-#endif
-    0, 0, 0, 0, 0, 0, 0, 0, 0,
-    /* S */ SIZE16,
-    0,
-    /* U */ sizeof(char) | PACK_SIZE_UNPREDICTABLE,
-    /* V */ SIZE32,
-    /* W */ sizeof(unsigned char) | PACK_SIZE_UNPREDICTABLE,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0,
-    /* shrieking */
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0,
-    /* i */ sizeof(int),
-    0, 0, 0, 0, 0, 0, 0, 0, 0,
-    /* l */ sizeof(long),
-    0,
-#if defined(PERL_PACK_CAN_SHRIEKSIGN)
-    /* n */ SIZE16,
-#else
-    0,
-#endif
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    /* s */ sizeof(short),
-    0, 0,
-#if defined(PERL_PACK_CAN_SHRIEKSIGN)
-    /* v */ SIZE16,
-#else
-    0,
-#endif
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0,
-    /* I */ sizeof(unsigned int),
-    0, 0, 0, 0, 0, 0, 0, 0, 0,
-    /* L */ sizeof(unsigned long),
-    0,
-#if defined(PERL_PACK_CAN_SHRIEKSIGN)
-    /* N */ SIZE32,
-#else
-    0,
-#endif
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    /* S */ sizeof(unsigned short),
-    0, 0,
-#if defined(PERL_PACK_CAN_SHRIEKSIGN)
-    /* V */ SIZE32,
-#else
-    0,
-#endif
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0
-};
-#endif
+#include "packsizetables.c"
 
 STATIC U8
 uni_to_byte(pTHX_ const char **s, const char *end, I32 datumtype)
diff --git a/genpacksizetables.pl b/regen/genpacksizetables.pl
similarity index 92%
rename from genpacksizetables.pl
rename to regen/genpacksizetables.pl
index 9dffc2c..6d70cad 100644
--- a/genpacksizetables.pl
+++ b/regen/genpacksizetables.pl
@@ -1,8 +1,9 @@
 #!/usr/bin/perl -w
 # I'm assuming that you're running this on some kind of ASCII system, but
-# it will generate EDCDIC too. (TODO)
+# it will generate EBCDIC too. (TODO)
 use strict;
 use Encode;
+require 'regen/regen_lib.pl';
 
 sub make_text {
     my ($chrmap, $letter, $unpredictable, $nocsum, $size, $condition) = @_;
@@ -66,10 +67,9 @@ my @lines = grep {
 my %asciimap  = map {chr $_, chr $_} 0..255;
 my %ebcdicmap = map {chr $_, Encode::encode("posix-bc", chr $_)} 0..255;
 
-print <<"EOC";
-/* These tables are regenerated by genpacksizetables.pl (and then hand pasted
-   in).  You're unlikely ever to need to regenerate them.  */
+my $fh = open_new('packsizetables.c', '>', { by => $0, from => 'its data'});
 
+print $fh <<"EOC";
 #if TYPE_IS_SHRIEKING != 0x100
    ++++shriek offset should be 256
 #endif
@@ -84,11 +84,13 @@ typedef U8 packprops_t;
 #endif
 EOC
 
+read_only_bottom_close_and_rename($fh);
+
 __DATA__
 #Symbol        unpredictable
 #              nocsum  size
 c                      char
-C      *               unsigned char
+C                      unsigned char
 W      *               unsigned char
 U      *               char
 s!                     short
diff --git a/t/porting/regen.t b/t/porting/regen.t
index e38ea81..ec8e62d 100644
--- a/t/porting/regen.t
+++ b/t/porting/regen.t
@@ -19,7 +19,7 @@ if ( $^O eq "VMS" ) {
 my $in_regen_pl = 23; # I can't see a clean way to calculate this 
automatically.
 my @files = qw(perly.act perly.h perly.tab keywords.c keywords.h uconfig.h);
 my @progs = qw(regen/regcharclass.pl regen/mk_PL_charclass.pl
-               regen/unicode_constants.pl);
+               regen/unicode_constants.pl regen/genpacksizetables.pl);
 
 plan (tests => $in_regen_pl + @files + @progs + 2);
 

--
Perl5 Master Repository

Reply via email to