Update of /cvsroot/flexml/flexml
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3476
Modified Files:
flexml.pl
Log Message:
Add an option to modify the default FLEXML_BUFFERSTACKSIZE. That is useful
when you get an error like "Assertion next<limit' failed".
Index: flexml.pl
===================================================================
RCS file: /cvsroot/flexml/flexml/flexml.pl,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- flexml.pl 10 Feb 2005 11:13:51 -0000 1.38
+++ flexml.pl 13 Feb 2005 18:12:19 -0000 1.39
@@ -53,6 +53,7 @@
my $quiet_parser; # -q option flag
my $uri; # -u option uri
my $pubid; # -p option string
+my $stacksize; # -b option flag
my $dtd; # DTD file name (or URI)
my $dtdrevision; # DTD version pruned from file
@@ -460,9 +461,9 @@
# Parse options.
$Use = "Usage: flexml [-ASHDvdqnLXV] [-s skel] [-p pubid] [-u uri]\n"
- . " [-r roottags] [-a actions] name[.dtd]";
+ . " [-b stack_size] [-r roottags] [-a actions] name[.dtd]";
-getopts('ASHDvdnLXVp:s:u:r:a:', \%opt);
+getopts('ASHDvdnLXVp:b:s:u:r:a:', \%opt);
# Version!
print "FleXML version $Id.\n" if $opt{V} or $opt{v};
@@ -486,6 +487,9 @@
for (split ',',$opt{r}) { $roottags{$_} = 'true'; }
}
+# Specific stack size?
+$stacksize = ($opt{'b'} ? $opt{'b'} : 100000);
+
# Set skeleton scanner file name and check it is readable (if needed).
$SKELETON = ($opt{'s'} ? $opt{'s'} : '/usr/share/flexml/skel');
die "$0: No skeleton file $SKELETON.\n" if not -r $SKELETON and $opt{S};
@@ -1103,7 +1107,7 @@
print "#define FLEXML_NOFAIL\n" if $nofail;
print "#define FLEXML_quiet_parser\n" if $quiet_parser;
print "#define FLEXML_HasMixed\n" if %inmixed;
- print "#define FLEXML_BUFFERSTACKSIZE 100000\n";
+ print "#define FLEXML_BUFFERSTACKSIZE $stacksize\n";
print "\n";
if ($opt{A}) {
@@ -1712,6 +1716,12 @@
Use the skeleton scanner I<skel> instead of the default.
+=item B<-b> I<stack_size>
+
+Sets the FLEXML_BUFFERSTACKSIZE to stack_size (100000 by default). Use
+this option when you get an error like "Assertion `next<limit'
+failed".
+
=item B<-u> I<uri>
Sets the URI of the DTD, used in the C<DOCTYPE> header, to the
|