This is a live mirror of the Perl 5 development currently hosted at
12 years agoAdd Ali Polatel to AUTHORS
Father Chrysostomos [Sat, 16 Oct 2010 00:40:22 +0000 (17:40 -0700)]
Add Ali Polatel to AUTHORS

12 years agodist/IO: Always bind to localhost in tests.
Ali Polatel [Sat, 16 Oct 2010 00:15:34 +0000 (17:15 -0700)]
dist/IO: Always bind to localhost in tests.

This is necessary on Exherbo, at least, because of the network
sandboxing that is done by 'sydbox'. And, in general, tests shouldn't be
listening on all interfaces.

12 years agoUse __declspec(dllimport) for XS code on Windows
Jan Dubois [Fri, 15 Oct 2010 21:48:38 +0000 (14:48 -0700)]
Use __declspec(dllimport) for XS code on Windows

By default C compilers will generate direct call instructions that the
linker will have to route trhough a call thunk if the call site is not
available at link time.  By annotating all imported symbols the compiler
is able to generate a indirect call instruction directly.

This should improve performance minimally, but will also make sure the
Perl API functions have the same addresses inside the core and inside
XS modules.  The ext/XS-APItest/t/call_checker.t tests rely on being able
to compare function addresses.

12 years agoUpdate regen targets on VMS.
Craig A. Berry [Fri, 15 Oct 2010 19:56:58 +0000 (14:56 -0500)]
Update regen targets on VMS.

12 years agoBand-aid to handle long API symbol on VMS.
Craig A. Berry [Fri, 15 Oct 2010 19:38:53 +0000 (14:38 -0500)]
Band-aid to handle long API symbol on VMS.

For the first time we now have a symbol longer than 31 characters
in the API, not just internally or generated in xsubs.  That means
we have to provide the shortened name in the linker options file
used to produce the shareable image, but the documentation on the
CRC used to produce the short name is incomplete.  For a more
general solution, we may have to root through the demangler
database or parse the output of CC/WARN=ENABLE=NAMESHORTENED.

12 years agoMake splice invoke set magic
Florian Ragwitz [Fri, 15 Oct 2010 17:34:52 +0000 (19:34 +0200)]
Make splice invoke set magic

12 years agoSubject: [perl #58182] partial: Add uni \s,\w matching
Karl Williamson [Fri, 24 Sep 2010 05:36:40 +0000 (23:36 -0600)]
Subject: [perl #58182] partial: Add uni \s,\w matching

This commit causes regex sequences \b, \s, and \w (and complements) to
match in the latin1 range in the scope of feature 'unicode_strings' or
with the /u regex modifier.

It uses the previously unused flags field in the respective regnodes to
indicate the type of matching, and in regexec.c, uses that to decide
which of the handy.h macros to use, native or Latin1.

I chose this for now rather than create new nodes for each type of
match.  An earlier version of this patch did that, and in every case the
switch case: statements were adjacent, offering no performance
advantage.  If regexec were modified to use in-line functions or more
macros for various short section of it, then it would be faster to have
new nodes rather than using the flags field.  But, using that field
simplified things, as this change flies under the radar in a number of
places where it would not if separate nodes were used.

12 years agoperlre.pod: slight rewording
Karl Williamson [Thu, 23 Sep 2010 15:35:53 +0000 (09:35 -0600)]
perlre.pod: slight rewording

12 years agoSubject: unicode_strings.t: Imprv test output
Karl Williamson [Thu, 23 Sep 2010 13:57:02 +0000 (07:57 -0600)]
Subject: unicode_strings.t: Imprv test output

This improves the phrasing of the output of the tests

12 years agoSubject: unicode_strings.t: rmv trail blanks
Karl Williamson [Thu, 23 Sep 2010 13:55:15 +0000 (07:55 -0600)]
Subject: unicode_strings.t: rmv trail blanks

12 years agoSubject: regcomp.h: Add macro to get regnode flags
Karl Williamson [Thu, 23 Sep 2010 13:53:10 +0000 (07:53 -0600)]
Subject: regcomp.h: Add macro to get regnode flags

12 years agoSubject: [PATCH] regexec.c: make macros fit 80 cols
Karl Williamson [Thu, 23 Sep 2010 13:51:09 +0000 (07:51 -0600)]
Subject: [PATCH] regexec.c: make macros fit 80 cols

Certain multi-line macros had their continuation backslashes way out.
One line of each is longer than 80 chars, but no point in makeing all
the lines that long.

12 years agoSubject: [PATCH] regexec.c: add and refactor macros
Karl Williamson [Thu, 23 Sep 2010 13:49:37 +0000 (07:49 -0600)]
Subject: [PATCH] regexec.c: add and refactor macros

Add macros that will have unicode semantics; these share much code in
common with ones that don't.  So factor out that common code.

These might be good candidates for inline functions.

12 years agoregcomp.c: Fix white space, cuddled else
Karl Williamson [Thu, 23 Sep 2010 13:18:12 +0000 (07:18 -0600)]
regcomp.c: Fix white space, cuddled else

12 years agoperlrebackslash: Fix poor grammar
Karl Williamson [Thu, 23 Sep 2010 13:15:36 +0000 (07:15 -0600)]
perlrebackslash: Fix poor grammar

12 years agoremove some broken markup from release_schedule
Jesse Vincent [Fri, 15 Oct 2010 14:12:05 +0000 (23:12 +0900)]
remove some broken markup from release_schedule

12 years agoAdd another victim, get a 2011 heading
Jesse Vincent [Fri, 15 Oct 2010 14:11:45 +0000 (23:11 +0900)]
Add another victim, get a 2011 heading

12 years agoUpdate our victim list through spring
Jesse Vincent [Fri, 15 Oct 2010 14:04:19 +0000 (23:04 +0900)]
Update our victim list through spring

12 years agosign myself up for a blead release and the 5.14 RC0
Jesse Vincent [Fri, 15 Oct 2010 13:53:21 +0000 (22:53 +0900)]
sign myself up for a blead release and the 5.14 RC0

12 years agoImplement File::Glob::GLOB_CSH in XS instead of perl.
Nicholas Clark [Fri, 15 Oct 2010 13:42:47 +0000 (14:42 +0100)]
Implement File::Glob::GLOB_CSH in XS instead of perl.

12 years agoUse inlineable proxy constant subs for File::Glob
Nicholas Clark [Fri, 15 Oct 2010 13:11:44 +0000 (14:11 +0100)]
Use inlineable proxy constant subs for File::Glob

12 years agoExpress @File::Glob::EXPORT_OK in terms of %File::Glob::EXPORT_TAGS.
Nicholas Clark [Fri, 15 Oct 2010 10:29:53 +0000 (11:29 +0100)]
Express @File::Glob::EXPORT_OK in terms of %File::Glob::EXPORT_TAGS.

This reduces duplication.

12 years agoFile::Glob::GLOB_ERROR is a real subroutine, not a constant().
Nicholas Clark [Fri, 15 Oct 2010 10:00:27 +0000 (11:00 +0100)]
File::Glob::GLOB_ERROR is a real subroutine, not a constant().

Previously it was bodged as a constant(), with an explicit wrapper subroutine
in to call each time to get the value.

12 years agoNothing autoloaded in Sys::Hostname or I18N::Langinfo, so don't use AutoLoader;
Nicholas Clark [Fri, 15 Oct 2010 08:53:28 +0000 (09:53 +0100)]
Nothing autoloaded in Sys::Hostname or I18N::Langinfo, so don't use AutoLoader;

12 years agoRemove erroneous references to AutoLoader from File::Glob.
Nicholas Clark [Fri, 15 Oct 2010 08:52:54 +0000 (09:52 +0100)]
Remove erroneous references to AutoLoader from File::Glob.

12 years agoDocument that av_delete and hv_delete make their return values mortal.
Chip Salzenberg [Fri, 15 Oct 2010 00:50:10 +0000 (17:50 -0700)]
Document that av_delete and hv_delete make their return values mortal.

12 years agoMake cpan/CGI/t/http.t (hopefully) compatible with VMS
Father Chrysostomos [Thu, 14 Oct 2010 21:04:55 +0000 (14:04 -0700)]
Make cpan/CGI/t/http.t (hopefully) compatible with VMS

I will submit a similar patch upstream in a few days.

12 years agoperldelta: Missing a C from C<>
Father Chrysostomos [Thu, 14 Oct 2010 20:45:13 +0000 (13:45 -0700)]
perldelta: Missing a C from C<>

12 years agoConvert modules in ext/ to pass minimal arguments to XSLoader::load().
Nicholas Clark [Thu, 14 Oct 2010 20:44:08 +0000 (21:44 +0100)]
Convert modules in ext/ to pass minimal arguments to XSLoader::load().

12 years agoXSLoader::load() with no arguments can use caller to find a default package.
Nicholas Clark [Thu, 14 Oct 2010 20:30:16 +0000 (21:30 +0100)]
XSLoader::load() with no arguments can use caller to find a default package.

In the case of dynamic linking, it's already using caller to get a filename, so
this isn't usually any extra work.

12 years agoperldelta: delete $+{...} was in the wrong section
Father Chrysostomos [Thu, 14 Oct 2010 20:37:18 +0000 (13:37 -0700)]
perldelta: delete $+{...} was in the wrong section

12 years agoperldelta up to 97a3247
Father Chrysostomos [Thu, 14 Oct 2010 20:34:15 +0000 (13:34 -0700)]
perldelta up to 97a3247

12 years agoCorrect threads version
Father Chrysostomos [Thu, 14 Oct 2010 20:02:40 +0000 (13:02 -0700)]
Correct threads version

12 years agoUpdate .gitignore for the Tie::Hash::NamedCapture move
Florian Ragwitz [Thu, 14 Oct 2010 16:55:52 +0000 (18:55 +0200)]
Update .gitignore for the Tie::Hash::NamedCapture move

12 years agoChange the perl version mentioned in concerning dirhandles
Father Chrysostomos [Thu, 14 Oct 2010 16:33:01 +0000 (09:33 -0700)]
Change the perl version mentioned in concerning dirhandles
as this may change before 5.14.

12 years agoRemove the code for file exclusions from - nothing needs it now.
Nicholas Clark [Thu, 14 Oct 2010 14:30:47 +0000 (15:30 +0100)]
Remove the code for file exclusions from - nothing needs it now.

12 years agoSince c440907b, doesn't need exclusions for XSLoader's files.
Nicholas Clark [Thu, 14 Oct 2010 13:39:15 +0000 (14:39 +0100)]
Since c440907b, doesn't need exclusions for XSLoader's files.

Previously, XSLoader and DynaLoader shared a directory (ext/DynaLoader).
The ownership lists for core files was expressed as ext/DynaLoader, with
specific exclusions for XSLoader's files. These are now superfluous.

12 years agoMove remaining Tie::Hash::NamedCapture XS code to NamedCapture.xs
Nicholas Clark [Thu, 14 Oct 2010 14:34:03 +0000 (15:34 +0100)]
Move remaining Tie::Hash::NamedCapture XS code to NamedCapture.xs

Now all the support code for %+ and %- is contained in the module in ext/

12 years agoMove Tie::Hash::NamedCapture::{FIRST,NEXT}KEY to NamedCapture.xs
Nicholas Clark [Thu, 14 Oct 2010 13:09:15 +0000 (14:09 +0100)]
Move Tie::Hash::NamedCapture::{FIRST,NEXT}KEY to NamedCapture.xs

12 years agoConvert lib/Tie/Hash/ to an XS module in ext/
Nicholas Clark [Thu, 14 Oct 2010 12:29:22 +0000 (13:29 +0100)]
Convert lib/Tie/Hash/ to an XS module in ext/

Initially move only Tie::Hash::NamedCapture::flags from universal.c to it.

12 years agoMerge XS_Tie_Hash_NamedCapture_{FIRSTK,NEXTK} into S_named_capture_iter_common.
Nicholas Clark [Thu, 14 Oct 2010 10:41:50 +0000 (11:41 +0100)]
Merge XS_Tie_Hash_NamedCapture_{FIRSTK,NEXTK} into S_named_capture_iter_common.

12 years agoMerge XS_Tie_Hash_NamedCapture_STORE into S_named_capture_common.
Nicholas Clark [Thu, 14 Oct 2010 10:17:35 +0000 (11:17 +0100)]
Merge XS_Tie_Hash_NamedCapture_STORE into S_named_capture_common.

12 years agoMerge XS_Tie_Hash_NamedCapture_CLEAR into S_named_capture_common.
Nicholas Clark [Thu, 14 Oct 2010 10:04:51 +0000 (11:04 +0100)]
Merge XS_Tie_Hash_NamedCapture_CLEAR into S_named_capture_common.

12 years agoMerge XS_Tie_Hash_NamedCapture_DELETE into S_named_capture_common.
Nicholas Clark [Thu, 14 Oct 2010 09:44:15 +0000 (10:44 +0100)]
Merge XS_Tie_Hash_NamedCapture_DELETE into S_named_capture_common.

12 years agoMerge XS_Tie_Hash_NamedCapture_SCALAR into S_named_capture_common.
Nicholas Clark [Thu, 14 Oct 2010 09:24:45 +0000 (10:24 +0100)]
Merge XS_Tie_Hash_NamedCapture_SCALAR into S_named_capture_common.

12 years agoMerge XS_Tie_Hash_NamedCapture_{FETCH,EXISTS} into S_named_capture_common.
Nicholas Clark [Thu, 14 Oct 2010 09:08:08 +0000 (10:08 +0100)]
Merge XS_Tie_Hash_NamedCapture_{FETCH,EXISTS} into S_named_capture_common.

12 years agoExpand CALLREG_NAMED_BUFF* macros in XS_Tie_Hash_NamedCapture_*
Nicholas Clark [Thu, 14 Oct 2010 08:47:57 +0000 (09:47 +0100)]
Expand CALLREG_NAMED_BUFF* macros in XS_Tie_Hash_NamedCapture_*

This reveals even more similarity between the routines' bodies.

12 years agoFix x2p and utils dependencies for static builds
Andy Dougherty [Wed, 13 Oct 2010 17:27:12 +0000 (13:27 -0400)]
Fix x2p and utils dependencies for static builds

The x2p and utils .PL extractions use the Cwd module, which is not
available in miniperl in a static build.  (For a dynamic build, miniperl
only loads the pure perl portion of Cwd, but building the whole extension
ensures that the pure perl part is correctly built and available.  It might
be cleaner just to always require the full perl.)

12 years agoRemove or update pod references to regexp re├źntrance.
Father Chrysostomos [Thu, 14 Oct 2010 06:41:38 +0000 (23:41 -0700)]
Remove or update pod references to regexp re├źntrance.

12 years -> regen/
Father Chrysostomos [Thu, 14 Oct 2010 06:29:57 +0000 (23:29 -0700)] -> regen/

12 years -> regen/
Father Chrysostomos [Thu, 14 Oct 2010 06:28:48 +0000 (23:28 -0700)] -> regen/

12 years -> regen/
Father Chrysostomos [Thu, 14 Oct 2010 06:26:14 +0000 (23:26 -0700)] -> regen/

12 years -> regen/
Father Chrysostomos [Thu, 14 Oct 2010 06:24:22 +0000 (23:24 -0700)] -> regen/

12 years -> regen/
Father Chrysostomos [Thu, 14 Oct 2010 06:18:36 +0000 (23:18 -0700)] -> regen/

12 years -> regen/
Father Chrysostomos [Thu, 14 Oct 2010 06:22:56 +0000 (23:22 -0700)] -> regen/

12 years -> regen/
Father Chrysostomos [Thu, 14 Oct 2010 06:15:06 +0000 (23:15 -0700)] -> regen/

so newcomers can find it more easily

12 years agoaf00134636ffe4172cbffeaed3bbad802e58d8a0 broke regen_perly.
Zefram [Thu, 14 Oct 2010 05:34:15 +0000 (22:34 -0700)]
af00134636ffe4172cbffeaed3bbad802e58d8a0 broke regen_perly.

12 years agoperldelta up to 825563b9
Father Chrysostomos [Thu, 14 Oct 2010 05:31:59 +0000 (22:31 -0700)]
perldelta up to 825563b9

12 years agoperldelta up to 7ec2c349
Father Chrysostomos [Thu, 14 Oct 2010 01:15:07 +0000 (18:15 -0700)]
perldelta up to 7ec2c349

12 years agoperldelta up to 07ffcb738
Father Chrysostomos [Thu, 14 Oct 2010 01:01:47 +0000 (18:01 -0700)]
perldelta up to 07ffcb738

12 years agoperldelta up to 91332126
Father Chrysostomos [Wed, 13 Oct 2010 23:31:28 +0000 (16:31 -0700)]
perldelta up to 91332126

12 years agoperldelta up to 2748c77610
Father Chrysostomos [Wed, 13 Oct 2010 21:53:09 +0000 (14:53 -0700)]
perldelta up to 2748c77610

12 years agoAdd tests for the usage messages for Tie::Hash::NamedCapture::*
Nicholas Clark [Wed, 13 Oct 2010 20:04:47 +0000 (21:04 +0100)]
Add tests for the usage messages for Tie::Hash::NamedCapture::*

12 years agoIn reg_nc_tie.t, use like() to get better diagnostics on failure.
Nicholas Clark [Wed, 13 Oct 2010 17:58:06 +0000 (18:58 +0100)]
In reg_nc_tie.t, use like() to get better diagnostics on failure.

12 years agoAdd perl5122delta
Florian Ragwitz [Wed, 13 Oct 2010 15:35:03 +0000 (17:35 +0200)]
Add perl5122delta

12 years agoStop cpan/CGI/t/http.t from failing
Father Chrysostomos [Wed, 13 Oct 2010 16:45:08 +0000 (09:45 -0700)]
Stop cpan/CGI/t/http.t from failing

A similar patch has been applied upstream. This will be overwritten
when the next is merged into blead, but at least we can get
the tests passing for now.

This does not affect any installed files.

12 years agoIn S_save_scalar_at, remove oldtainted, unneeded since 0cbee0a449cc4e11.
Nicholas Clark [Wed, 13 Oct 2010 16:07:34 +0000 (17:07 +0100)]
In S_save_scalar_at, remove oldtainted, unneeded since 0cbee0a449cc4e11.

0cbee0a449cc4e11 removed the call to mg_get(), and hence any possibility of
calling code with the side effect of changing PL_tainted.

12 years agoConsistent stack handling for XS_re_regnames_*
Nicholas Clark [Wed, 13 Oct 2010 15:16:11 +0000 (16:16 +0100)]
Consistent stack handling for XS_re_regnames_*

This may also fix bugs for the (untested) cases where the called routine
returns NULL, and the calling routine attempted XSRETURN_UNDEF.

12 years agoConsistent usage messages for XS_Tie_Hash_NamedCapture_*
Nicholas Clark [Wed, 13 Oct 2010 13:37:16 +0000 (14:37 +0100)]
Consistent usage messages for XS_Tie_Hash_NamedCapture_*

The $flags argument is actually the object, so should not be mentioned.

12 years agoIn XS_Tie_Hash_NamedCapture_{CLEAR,STORE}, free any returned value.
Nicholas Clark [Wed, 13 Oct 2010 13:12:27 +0000 (14:12 +0100)]
In XS_Tie_Hash_NamedCapture_{CLEAR,STORE}, free any returned value.

The calling convention for CALLREG_NAMED_BUFF_*() is to return NULL, or a
reference to a scalar. For CLEAR and STORE we return no values, so if we're
erroneously passed a reference, we should free it to stop it being leaked.

12 years agoConsistent stack handling for XS_Tie_Hash_NamedCapture_*
Nicholas Clark [Wed, 13 Oct 2010 12:56:38 +0000 (13:56 +0100)]
Consistent stack handling for XS_Tie_Hash_NamedCapture_*

This may also fix bugs for the (untested) cases where CALLREG_NAMED_BUFF_*
returned NULL, and the calling routine attempted XSRETURN_UNDEF.

It's fine to call sv_2mortal() on the immortals returned by

12 years agoXS_Tie_Hash_NamedCapture_DELETE should return a value.
Nicholas Clark [Wed, 13 Oct 2010 10:09:02 +0000 (11:09 +0100)]
XS_Tie_Hash_NamedCapture_DELETE should return a value.

The core's regexp implementation will always croak, but other pluggable engines
may have read/write semantics, and hence return from their delete call.

Note that STORE and EXISTS are called in void context, hence their return stack
is discarded.

12 years agoperlfaq4: use given() in number/float/integer answer
brian d foy [Wed, 13 Oct 2010 07:40:49 +0000 (02:40 -0500)]
perlfaq4: use given() in number/float/integer answer

How do I determine whether a scalar is a number/whole/integer/float?

David Canzi also adjusted some of the regexes. The
real number and decimal number tests are really the
same thing, and we don't have to capture in the float

12 years agoFix typos in comments
Karl Williamson [Tue, 12 Oct 2010 22:24:59 +0000 (16:24 -0600)]
Fix typos in comments

12 years agoperldelta entries for op-building functions and LINKLIST
Zefram [Wed, 13 Oct 2010 05:18:46 +0000 (22:18 -0700)]
perldelta entries for op-building functions and LINKLIST

12 years agocharnames.t: Make sure code point aliasess are right
Karl Williamson [Thu, 7 Oct 2010 04:16:56 +0000 (22:16 -0600)]
charnames.t: Make sure code point aliasess are right

Some code points have two (possibly more names).  This makes sure that
all work.

12 years agocharnames.t: Extract common code to subroutine
Karl Williamson [Thu, 7 Oct 2010 04:12:35 +0000 (22:12 -0600)]
charnames.t: Extract common code to subroutine

12 years ago[perl #78362] Make mro_package_moved check for recursion
Father Chrysostomos [Wed, 13 Oct 2010 05:07:17 +0000 (22:07 -0700)]
[perl #78362] Make mro_package_moved check for recursion

The existence of main::main::... caused mro_package_moved to break
Text::Template, and probably Acme::Meta as well.

12 years agoANSI C-ify the Perl_mro_isa_changed_in return mathoms.c
Tony Cook [Tue, 12 Oct 2010 23:12:35 +0000 (10:12 +1100)]
ANSI C-ify the Perl_mro_isa_changed_in return mathoms.c

A return statement with an expression shall not appear in a
function whose return type is void.

for an example build failure.

12 years agomktables: Change name of option to -annotate
Karl Williamson [Mon, 11 Oct 2010 19:04:02 +0000 (13:04 -0600)]
mktables: Change name of option to -annotate

This name is more descriptive of what this option has come to be.  The
previous option name has been released only in a few of the 5.13 series
Perls, and is for internal mktables development only, so backward
compatibility shouldn't be an issue.

12 years agomktables: Change variable name
Karl Williamson [Mon, 11 Oct 2010 19:00:59 +0000 (13:00 -0600)]
mktables: Change variable name

More than just names are output now, $output_names is renamed $annotate

12 years agomktables: Extend -output_names option
Karl Williamson [Mon, 11 Oct 2010 18:49:58 +0000 (12:49 -0600)]
mktables: Extend -output_names option

This option is not used for production, but is useful for someone
running mktables by hand who wants to compare Unicode versions, and
perhaps for debugging mktables.  It causes the code points in the output
tables to have comments added that give information about that code
point, so it isn't necessary to look up the hex numbers.

This patch is a significant expansion of the previous capability, and
adds the character's representation, and text for the non-named

I'm finding it useful in moving to Unicode 6.0.

12 years agomktables: Add arg to write() to say if in utf8
Karl Williamson [Mon, 11 Oct 2010 18:10:28 +0000 (12:10 -0600)]
mktables: Add arg to write() to say if in utf8

This will be used for annotations.  Currently no file is written in
utf8, so the calls all have 0 for the parameter.

12 years agomktables: Move method to different class
Karl Williamson [Mon, 11 Oct 2010 17:20:25 +0000 (11:20 -0600)]
mktables: Move method to different class

matches_identically_to() was a Table method, but it really applies to
the Range_List contained in the table.  Moving it to that class instead
will help with later code that wants to compare a Range_List that isn't
in a table.

12 years agomktables: Remove extraneous error message
Karl Williamson [Mon, 11 Oct 2010 16:47:04 +0000 (10:47 -0600)]
mktables: Remove extraneous error message

When I created matches_identically_to() originally, I just copied from
another subroutine, changing a few things.  I shouldn't have copied this
message, as it was only applicable to the original routine.

12 years agomktables: Change method name for clarity
Karl Williamson [Mon, 11 Oct 2010 16:33:06 +0000 (10:33 -0600)]
mktables: Change method name for clarity

is_equivalent_to() doesn't mean what it says.  Instead it means if the
two objects have been set equivalent to each other.

12 years agomktables: Finish the refactoring out of a pass.
Karl Williamson [Mon, 11 Oct 2010 03:59:25 +0000 (21:59 -0600)]
mktables: Finish the refactoring out of a pass.

Commit e1a3bfbd2f5194edc05010f0b5e5a568b1fdf508
omitted some code that was in my working version.  My git skills aren't
good enough to go back and add that in without zapping everything else.

12 years agomktables: Remove unshift onto large array
Karl Williamson [Mon, 11 Oct 2010 00:14:08 +0000 (18:14 -0600)]
mktables: Remove unshift onto large array

This changes the parameters to write() so it can accept more than one
array ref, thus eliminating the need for an unshift onto a large array.

12 years agomktables: Rmv obsolete field
Karl Williamson [Sun, 10 Oct 2010 22:36:06 +0000 (16:36 -0600)]
mktables: Rmv obsolete field

has_specials was used to avoid an extra pass for tables that didn't
need it.  That pass has been eliminated, so this code is useless.

12 years agomktables: refactor to eliminate a pass over tables
Karl Williamson [Sun, 10 Oct 2010 22:22:44 +0000 (16:22 -0600)]
mktables: refactor to eliminate a pass over tables

This patch is mainly for performance, but in eliminating a pass which
modified the tables, it allows for later changes to not have to rely on
things happening in a certain order.

Previously, tables that had special ranges in them, such as mappings to
multiple characters and character names that are algorithmically
derivable had a separate pass to process those ranges ahead of the main
table, as the information about these is output at the beginning of the

What this patch does is to add a call-back for the processing of
the main body to call when it finds a special range that it doesn't
handle.  That call-back just adds the information to various
temporaries, depending on what the range is.

After the processing of all the ranges, those temporaries hold all the
information needed to output the specials data.  This is processed and
the text is unshifted to the beginning of the output.

pre_body() used to process all this.  But it has been split up.  The
code that does need to go at the beginning is moved to the write()
routine for the sub-class, which processes it before calling the super
class's write.  The code that figured out about the special ranges is
moved to the new call-back handle_special_range().  The remaining code
remains in pre_body(), but it is now called later in the process.

12 years agomktables: Add # XXX so can find experimental code
Karl Williamson [Sun, 10 Oct 2010 21:01:28 +0000 (15:01 -0600)]
mktables: Add # XXX so can find experimental code

12 years agomktables: Move 'format' to base class
Karl Williamson [Sun, 10 Oct 2010 15:58:24 +0000 (09:58 -0600)]
mktables: Move 'format' to base class

This patch is in preparation for adding more complete annotations to the
output tables.  Previously, only Map tables had a listed format.  Match
tables also have a format (empty), but that was understood.  But the new
annotation code will need to refer to that format, so I moved the field
into the base class common to both types of tables, and added the
EMPTY_FORMAT for use by Match tables.

12 years agomktables: Change format name for
Karl Williamson [Sun, 10 Oct 2010 15:41:44 +0000 (09:41 -0600)]
mktables: Change format name for

This table which is used only by has a special format that
is used in no other table.  In preparation for adding annotations to it,
make a special format signifier for it.  This affects only one line at
the top that indicates to the user the format of the table.

The table has comments in it to say it is volatile and no one should use
this table besides, which currently doesn't look at that

12 years agomktables: change variable name for clarity
Karl Williamson [Sun, 10 Oct 2010 15:36:45 +0000 (09:36 -0600)]
mktables: change variable name for clarity

I found that 'youngest' was confusing

12 years agomktables: if modify during run, regen tables
Karl Williamson [Sun, 10 Oct 2010 15:28:09 +0000 (09:28 -0600)]
mktables: if modify during run, regen tables

This bug has bitten me enough times that I decided to fix it.  It would
only be applicable to someone who is developing mktables, and making
changes to it while the program is running.  Due to the complicated
nature of the dependencies of mktables, it basically functions as its
own make command, knowing when to rebuild or not based on the
modification times of itself and its input and output files.
Previously, it did not account for changes to itself made while running,
so it would think that it wouldn't have to rebuild, even though it did.

I solve this problem by keeping track of the time the process started,
and storing it in mktables.lst.  If something has changed since then,
then the files need to be rebuilt.

12 years agomktables: rewrite 'if' statement for clarity
Karl Williamson [Sun, 10 Oct 2010 15:08:05 +0000 (09:08 -0600)]
mktables: rewrite 'if' statement for clarity

12 years agomktables: complement variable name for rebuilding
Karl Williamson [Sun, 10 Oct 2010 14:57:56 +0000 (08:57 -0600)]
mktables: complement variable name for rebuilding

This is an intermediate patch that changes the variable name as to
whether the files need rebuilding or not to something I understand
better.  This has long been confusing, as up until a year ago, there had
been a long-standing bug in the program that didn't get it right.

12 years agomktables: Add type_of() method to get range's type
Karl Williamson [Sat, 9 Oct 2010 23:58:11 +0000 (17:58 -0600)]
mktables: Add type_of() method to get range's type

This will be useful in outputting better annotations.

12 years agomktables: Convert value_of() to use containing_range()
Karl Williamson [Sat, 9 Oct 2010 23:42:48 +0000 (17:42 -0600)]
mktables: Convert value_of() to use containing_range()

12 years agomktables: Remove extraneous debug statement
Karl Williamson [Sat, 9 Oct 2010 23:40:45 +0000 (17:40 -0600)]
mktables: Remove extraneous debug statement