summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2010-03-22 15:42:34 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2010-03-22 15:42:34 +0000
commitcbc1cd0c0fa2ce847278e354fb17358519ad42d6 (patch)
tree0f6a717aa9cf05f65ad84e90bfc0ddfa467cea7d
parentce80ff89bd98a40a048c0420d6eb2886eed84e0e (diff)
bibtex/bibtex8/bibtexu: bug fix and more updates
git-svn-id: svn://tug.org/texlive/trunk@17528 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Build/source/README.config7
-rw-r--r--Build/source/texk/bibtex8/ChangeLog6
-rw-r--r--Build/source/texk/bibtex8/bibtex-3.c2
-rw-r--r--Build/source/texk/bibtex8/bibtex-4.c5
-rw-r--r--Build/source/texk/bibtex8/bibtex.h2
-rwxr-xr-xBuild/source/texk/bibtex8/tests/bibtex-mem.test10
-rw-r--r--Build/source/texk/bibtex8/utils.c14
-rw-r--r--Build/source/texk/bibtexu/ChangeLog6
-rw-r--r--Build/source/texk/bibtexu/bibtex-3.c2
-rw-r--r--Build/source/texk/bibtexu/bibtex-4.c5
-rw-r--r--Build/source/texk/bibtexu/bibtex.h2
-rw-r--r--Build/source/texk/bibtexu/utils.c14
-rw-r--r--Build/source/texk/kpathsea/ChangeLog3
-rw-r--r--Build/source/texk/kpathsea/texmf.cnf2
-rw-r--r--Build/source/texk/web2c/ChangeLog6
-rw-r--r--Build/source/texk/web2c/bibtex.ch27
-rw-r--r--Build/source/texk/web2c/lib/ChangeLog4
-rw-r--r--Build/source/texk/web2c/lib/setupvar.c2
-rwxr-xr-xBuild/source/texk/web2c/tests/bibtex-mem.test8
19 files changed, 110 insertions, 17 deletions
diff --git a/Build/source/README.config b/Build/source/README.config
index 2ab104bdd2d..00a4aedbe21 100644
--- a/Build/source/README.config
+++ b/Build/source/README.config
@@ -36,10 +36,11 @@ Options specified on the command line will never be modified.
If enabled (by default) build for a TeX Live binary distribution as
shipped by the user groups; this implies '--enable-multiplatform' and
'--enable-cxx-runtime-hack' unless they are explicitly disabled and
-enforces '--disable-shared'.
+enforces '--disable-shared'. This also requires GNU make.
If building TL for a GNU/Linux or other distribution, this would be
disabled and system versions of most libraries would be used (see below).
+This may require GNU make, but will also try without it.
A related option '--enable-texlive-build' is automatically passed to all
subdirectories (and can not be disabled). Programs that could also be built
@@ -263,6 +264,10 @@ To build xindy docs.
---------------------------------
For `make check'.
+4.7. MAKE=/path/to/GNU_make
+---------------------------------
+For the top-level.
+
Happy building. Please use the tlbuild list for questions or
discussion: http://lists.tug.org/tlbuild.
diff --git a/Build/source/texk/bibtex8/ChangeLog b/Build/source/texk/bibtex8/ChangeLog
index 332251eebb1..195e05f8fd3 100644
--- a/Build/source/texk/bibtex8/ChangeLog
+++ b/Build/source/texk/bibtex8/ChangeLog
@@ -1,7 +1,11 @@
2010-03-19 Peter Breitenlohner <peb@mppmu.mpg.de>
+ * utils.c: Default csfile and Max_Strings from env or config.
* bibtex.c: Call kpse_set_program_name with "bibtex8".
- * utils.c: Default csfile from environment or config file.
+ * bibtex.h (STR_ROOM): Call pool_overflow() as often as needed.
+ * bibtex-3.c (scan_fn_def): Same for increase Wiz_Fn_Space.
+ * bibtex-4.c (BST_STRING_SIZE_EXCEEDED): Drop extra "%ld".
+ (x_text_prefix): Add missing STR_ROOM.
2010-03-18 Peter Breitenlohner <peb@mppmu.mpg.de>
diff --git a/Build/source/texk/bibtex8/bibtex-3.c b/Build/source/texk/bibtex8/bibtex-3.c
index 75e5ad208e5..308cbed1425 100644
--- a/Build/source/texk/bibtex8/bibtex-3.c
+++ b/Build/source/texk/bibtex8/bibtex-3.c
@@ -2054,7 +2054,7 @@ Next_Token_Label:
***************************************************************************/
BEGIN
INSERT_FN_LOC (END_OF_DEF);
- if ((single_ptr + wiz_def_ptr) > Wiz_Fn_Space)
+ while ((single_ptr + wiz_def_ptr) > Wiz_Fn_Space)
BEGIN
BIB_XRETALLOC ("wiz_functions", wiz_functions, HashPtr2_T,
Wiz_Fn_Space, Wiz_Fn_Space + WIZ_FN_SPACE);
diff --git a/Build/source/texk/bibtex8/bibtex-4.c b/Build/source/texk/bibtex8/bibtex-4.c
index 1627614cb59..07cf8d0f0e7 100644
--- a/Build/source/texk/bibtex8/bibtex-4.c
+++ b/Build/source/texk/bibtex8/bibtex-4.c
@@ -1316,7 +1316,7 @@ BEGIN
sp_xptr1 = str_start[pop_lit2 + 1];
if ((sp_xptr1 - sp_ptr) > ENT_STR_SIZE)
BEGIN
- BST_STRING_SIZE_EXCEEDED (ENT_STR_SIZE, "%ld, the entry");
+ BST_STRING_SIZE_EXCEEDED (ENT_STR_SIZE, ", the entry");
sp_xptr1 = sp_ptr + ENT_STR_SIZE;
END
while (sp_ptr < sp_xptr1)
@@ -1378,7 +1378,7 @@ BEGIN
sp_end = str_start[pop_lit2 + 1];
if ((sp_end - sp_ptr) > GLOB_STR_SIZE)
BEGIN
- BST_STRING_SIZE_EXCEEDED (GLOB_STR_SIZE, "%ld, the global");
+ BST_STRING_SIZE_EXCEEDED (GLOB_STR_SIZE, ", the global");
sp_end = sp_ptr + GLOB_STR_SIZE;
END
while (sp_ptr < sp_end)
@@ -2251,6 +2251,7 @@ BEGIN
END
/*^^^^^^^^^^^^^^^^^^^^^^^^^^ END OF SECTION 445 ^^^^^^^^^^^^^^^^^^^^^^^^^^^*/
+ STR_ROOM (sp_brace_level + sp_end - sp_ptr);
if (pop_lit2 >= cmd_str_ptr)
BEGIN
pool_ptr = sp_end;
diff --git a/Build/source/texk/bibtex8/bibtex.h b/Build/source/texk/bibtex8/bibtex.h
index dd5dbf1fb13..ae6ef197af3 100644
--- a/Build/source/texk/bibtex8/bibtex.h
+++ b/Build/source/texk/bibtex8/bibtex.h
@@ -467,7 +467,7 @@
***************************************************************************/
#define APPEND_CHAR(X) {str_pool[pool_ptr] = (X);\
INCR(pool_ptr);}
-#define STR_ROOM(X) {if((pool_ptr+(X))>Pool_Size)\
+#define STR_ROOM(X) {while((pool_ptr+(X))>Pool_Size)\
pool_overflow();}
/***************************************************************************
diff --git a/Build/source/texk/bibtex8/tests/bibtex-mem.test b/Build/source/texk/bibtex8/tests/bibtex-mem.test
index 2c0d883516b..19d50f6c402 100755
--- a/Build/source/texk/bibtex8/tests/bibtex-mem.test
+++ b/Build/source/texk/bibtex8/tests/bibtex-mem.test
@@ -50,15 +50,21 @@ for t in 1 2 3; do
case $t in
1) mk_bib 0 >tests/memtest.bib;;
2) mk_bib 1 >>tests/memtest.bib;;
- 3) exit 0;; # requires larger constatnts
+ 3) exit 0;; # requires larger constants
esac
+# memtest3 requires:
+# SINGLE_FN_SPACE 200 (100)
+# ENT_STR_SIZE 2000 (250)
+# GLOB_STR_SIZE 2000 (1000)
+# MAX_GLOB_STRS 50 (10)
+
echo "Running memtest$t ..."
TEXMFCNF=$srcdir/../kpathsea \
BSTINPUTS=$srcdir/../web2c/tests:$srcdir/csf \
BIBINPUTS=./tests \
- ./bibtex8 tests/memtest$t || exit 1so
+ ./bibtex8 tests/memtest$t || exit 1
done
diff --git a/Build/source/texk/bibtex8/utils.c b/Build/source/texk/bibtex8/utils.c
index 685c3ce1f67..17e853015d7 100644
--- a/Build/source/texk/bibtex8/utils.c
+++ b/Build/source/texk/bibtex8/utils.c
@@ -1283,6 +1283,20 @@ void set_array_sizes (void)
Max_Strings = 4000;
Min_Crossrefs = 2;
+ {
+ char *expansion = kpse_var_value ("max_strings");
+ if (expansion) {
+ int conf_val = atoi (expansion);
+ if (conf_val < Max_Strings)
+ fprintf (stderr,
+ "%s: Bad value (%ld) in texmf.cnf for max_strings, keeping %ld.\n",
+ program_invocation_name, (long) conf_val, (long) Max_Strings);
+ else
+ Max_Strings = conf_val;
+ free (expansion);
+ }
+ }
+
if (Flag_big) {
Max_Strings = 10000;
}
diff --git a/Build/source/texk/bibtexu/ChangeLog b/Build/source/texk/bibtexu/ChangeLog
index 74f5260579c..683eb167a66 100644
--- a/Build/source/texk/bibtexu/ChangeLog
+++ b/Build/source/texk/bibtexu/ChangeLog
@@ -1,7 +1,11 @@
2010-03-19 Peter Breitenlohner <peb@mppmu.mpg.de>
+ * utils.c: Default csfile and Max_Strings from env or config.
* bibtex.c: Call kpse_set_program_name with "bibtexu".
- * utils.c: Default csfile from environment or config file.
+ * bibtex.h (STR_ROOM): Call pool_overflow() as often as needed.
+ * bibtex-3.c (scan_fn_def): Same for increase Wiz_Fn_Space.
+ * bibtex-4.c (BST_STRING_SIZE_EXCEEDED): Drop extra "%ld".
+ (x_text_prefix): Add missing STR_ROOM.
2010-03-18 Peter Breitenlohner <peb@mppmu.mpg.de>
diff --git a/Build/source/texk/bibtexu/bibtex-3.c b/Build/source/texk/bibtexu/bibtex-3.c
index 1d8125354f2..4de2c06448e 100644
--- a/Build/source/texk/bibtexu/bibtex-3.c
+++ b/Build/source/texk/bibtexu/bibtex-3.c
@@ -2062,7 +2062,7 @@ Next_Token_Label:
***************************************************************************/
BEGIN
INSERT_FN_LOC (END_OF_DEF);
- if ((single_ptr + wiz_def_ptr) > Wiz_Fn_Space)
+ while ((single_ptr + wiz_def_ptr) > Wiz_Fn_Space)
BEGIN
BIB_XRETALLOC ("wiz_functions", wiz_functions, HashPtr2_T,
Wiz_Fn_Space, Wiz_Fn_Space + WIZ_FN_SPACE);
diff --git a/Build/source/texk/bibtexu/bibtex-4.c b/Build/source/texk/bibtexu/bibtex-4.c
index 6119dd5542e..3131d287c12 100644
--- a/Build/source/texk/bibtexu/bibtex-4.c
+++ b/Build/source/texk/bibtexu/bibtex-4.c
@@ -1452,7 +1452,7 @@ BEGIN
sp_xptr1 = str_start[pop_lit2 + 1];
if ((sp_xptr1 - sp_ptr) > ENT_STR_SIZE)
BEGIN
- BST_STRING_SIZE_EXCEEDED (ENT_STR_SIZE, "%ld, the entry");
+ BST_STRING_SIZE_EXCEEDED (ENT_STR_SIZE, ", the entry");
sp_xptr1 = sp_ptr + ENT_STR_SIZE;
END
while (sp_ptr < sp_xptr1)
@@ -1518,7 +1518,7 @@ BEGIN
sp_end = str_start[pop_lit2 + 1];
if ((sp_end - sp_ptr) > GLOB_STR_SIZE)
BEGIN
- BST_STRING_SIZE_EXCEEDED (GLOB_STR_SIZE, "%ld, the global");
+ BST_STRING_SIZE_EXCEEDED (GLOB_STR_SIZE, ", the global");
sp_end = sp_ptr + GLOB_STR_SIZE;
END
while (sp_ptr < sp_end)
@@ -2760,6 +2760,7 @@ The same for the length of character UTF-8. 23/sep/2009
END
/*^^^^^^^^^^^^^^^^^^^^^^^^^^ END OF SECTION 445 ^^^^^^^^^^^^^^^^^^^^^^^^^^^*/
+ STR_ROOM (sp_brace_level + sp_end - sp_ptr);
if (pop_lit2 >= cmd_str_ptr)
BEGIN
pool_ptr = sp_end;
diff --git a/Build/source/texk/bibtexu/bibtex.h b/Build/source/texk/bibtexu/bibtex.h
index a30395c518a..1210419cb28 100644
--- a/Build/source/texk/bibtexu/bibtex.h
+++ b/Build/source/texk/bibtexu/bibtex.h
@@ -467,7 +467,7 @@
***************************************************************************/
#define APPEND_CHAR(X) { str_pool[pool_ptr] = (X);\
INCR(pool_ptr);}
-#define STR_ROOM(X) {if((pool_ptr+(X))>Pool_Size)\
+#define STR_ROOM(X) {while((pool_ptr+(X))>Pool_Size)\
pool_overflow();}
/***************************************************************************
diff --git a/Build/source/texk/bibtexu/utils.c b/Build/source/texk/bibtexu/utils.c
index 32623bd9796..63f7044317a 100644
--- a/Build/source/texk/bibtexu/utils.c
+++ b/Build/source/texk/bibtexu/utils.c
@@ -1311,6 +1311,20 @@ void set_array_sizes (void)
Max_Strings = 4000;
Min_Crossrefs = 2;
+ {
+ char *expansion = kpse_var_value ("max_strings");
+ if (expansion) {
+ int conf_val = atoi (expansion);
+ if (conf_val < Max_Strings)
+ fprintf (stderr,
+ "%s: Bad value (%ld) in texmf.cnf for max_strings, keeping %ld.\n",
+ program_invocation_name, (long) conf_val, (long) Max_Strings);
+ else
+ Max_Strings = conf_val;
+ free (expansion);
+ }
+ }
+
if (Flag_big) {
Max_Strings = 10000;
}
diff --git a/Build/source/texk/kpathsea/ChangeLog b/Build/source/texk/kpathsea/ChangeLog
index 3223920f749..45708aeecb5 100644
--- a/Build/source/texk/kpathsea/ChangeLog
+++ b/Build/source/texk/kpathsea/ChangeLog
@@ -1,7 +1,8 @@
-2010-03-11 Peter Breitenlohner <peb@mppmu.mpg.de>
+2010-03-19 Peter Breitenlohner <peb@mppmu.mpg.de>
* texmf.cnf (BIBTEX_CSFILE): Default codepage and sort order
file for BibTeX8.
+ (max_strings): Also for BibTeX8 and BibTeX8U.
2010-03-18 Karl Berry <karl@tug.org>
diff --git a/Build/source/texk/kpathsea/texmf.cnf b/Build/source/texk/kpathsea/texmf.cnf
index ac9758fdd81..fc00fb78ae4 100644
--- a/Build/source/texk/kpathsea/texmf.cnf
+++ b/Build/source/texk/kpathsea/texmf.cnf
@@ -690,6 +690,8 @@ screen_depth.mf = 1200
% BibTeX only (also used for hash_size and hash_prime).
max_strings.bibtex = 35307
+max_strings.bibtex8 = 35307
+max_strings.bibtexu = 35307
% GFtype only.
line_length.gftype = 500
diff --git a/Build/source/texk/web2c/ChangeLog b/Build/source/texk/web2c/ChangeLog
index 1d000ce83b8..08e5f2dca6c 100644
--- a/Build/source/texk/web2c/ChangeLog
+++ b/Build/source/texk/web2c/ChangeLog
@@ -1,3 +1,9 @@
+2010-03-19 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * bibtex.ch (str_room): Call pool_overflow() as often as needed.
+ (scan_fn_def): Increase wiz_fn_space as often as needed.
+ (x_text_prefix): Add missing str_room.
+
2010-03-17 Peter Breitenlohner <peb@mppmu.mpg.de>
* bibtex.ch (max_cites): Dynamically resize the cite_list,
diff --git a/Build/source/texk/web2c/bibtex.ch b/Build/source/texk/web2c/bibtex.ch
index 6c0cf265d56..2174f73132c 100644
--- a/Build/source/texk/web2c/bibtex.ch
+++ b/Build/source/texk/web2c/bibtex.ch
@@ -201,6 +201,12 @@ end.
{|min_crossrefs| can be set at runtime now.}
@z
+@x [still 14]
+@!single_fn_space=100; {maximum amount for a single |wiz_defined|-function}
+@y
+@!single_fn_space=100; {maximum amount for a single |wiz_defined|-function}
+@z
+
@x [still 14] handle long citation strings
@!max_ent_ints=3000; {maximum number of |int_entry_var|s
(entries $\times$ |int_entry_var|s)}
@@ -217,6 +223,12 @@ end.
@!MAX_FIELDS=5000; {initial number of fields (entries $\times$ fields,
@z
+@x [still 14]
+@!lit_stk_size=100; {maximum number of literal functions on the stack}
+@y
+@!lit_stk_size=100; {maximum number of literal functions on the stack}
+@z
+
@x [15] Increase more constants in the web defines.
@d hash_size=5000 {must be |>= max_strings| and |>= hash_prime|}
@d hash_prime=4253 {a prime number about 85\% of |hash_size| and |>= 128|
@@ -456,6 +468,11 @@ BIB_XRETALLOC ('name_sep_char', name_sep_char, ASCII_code,
@d log_pr_pool_str(#) == trace_pr_pool_str(#)
@z
+@x [54] Reallocate str_pool. We may need more than POOL_SIZE.
+ if (pool_ptr+# > pool_size) then
+@y
+ while (pool_ptr+# > pool_size) do
+@z
@x [54] Reallocate str_pool.
overflow('pool size ',pool_size);
@y
@@ -1046,7 +1063,7 @@ if (single_ptr + wiz_def_ptr > wiz_fn_space) then
overflow('wizard-defined function space ',wiz_fn_space);
end;
@y
-if (single_ptr + wiz_def_ptr > wiz_fn_space) then
+while (single_ptr + wiz_def_ptr > wiz_fn_space) do
begin
BIB_XRETALLOC ('wiz_functions', wiz_functions, hash_ptr2,
wiz_fn_space, wiz_fn_space + WIZ_FN_SPACE);
@@ -1305,6 +1322,14 @@ str_room(sp_end - sp_ptr);
while (sp_ptr < sp_end) do {shift the substring}
@z
+% Forgot to check for pool overflow here. Triggered by bibtex-mem.test (3).
+@x [445]
+if (pop_lit2 >= cmd_str_ptr) then {no shifting---merely change pointers}
+@y
+str_room(sp_brace_level + sp_end - sp_ptr);
+if (pop_lit2 >= cmd_str_ptr) then {no shifting---merely change pointers}
+@z
+
% [460] Eliminate unreferenced statement label, because `undefined' is
% now a constant expression that is not evaluated at the Web level. If
% this label were ever required, it could be replaced by the constant
diff --git a/Build/source/texk/web2c/lib/ChangeLog b/Build/source/texk/web2c/lib/ChangeLog
index c7f6330451a..ecd6c33876c 100644
--- a/Build/source/texk/web2c/lib/ChangeLog
+++ b/Build/source/texk/web2c/lib/ChangeLog
@@ -1,3 +1,7 @@
+2010-03-19 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * setupvar.c (setupboundvariable): Fix off by one error in msg.
+
2010-03-05 Peter Breitenlohner <peb@mppmu.mpg.de>
* texmfmp.c (setupboundvariable): Moved from here ...
diff --git a/Build/source/texk/web2c/lib/setupvar.c b/Build/source/texk/web2c/lib/setupvar.c
index df0d43d79e9..5fb37062d08 100644
--- a/Build/source/texk/web2c/lib/setupvar.c
+++ b/Build/source/texk/web2c/lib/setupvar.c
@@ -24,7 +24,7 @@ setupboundvariable (integer *var, const_string var_name, integer dflt)
fprintf (stderr,
"%s: Bad value (%ld) in texmf.cnf for %s, keeping %ld.\n",
program_invocation_name,
- (long) conf_val, var_name + 1, (long) dflt);
+ (long) conf_val, var_name, (long) dflt);
} else {
*var = conf_val; /* We'll make further checks later. */
}
diff --git a/Build/source/texk/web2c/tests/bibtex-mem.test b/Build/source/texk/web2c/tests/bibtex-mem.test
index 044b1c5888a..b8ff4edcf77 100755
--- a/Build/source/texk/web2c/tests/bibtex-mem.test
+++ b/Build/source/texk/web2c/tests/bibtex-mem.test
@@ -50,9 +50,15 @@ for t in 1 2 3; do
case $t in
1) mk_bib 0 >tests/memtest.bib;;
2) mk_bib 1 >>tests/memtest.bib;;
- 3) exit 0;; # requires larger constatnts
+ 3) exit 0;; # requires larger constants
esac
+# memtest3 requires:
+# SINGLE_FN_SPACE 200 (100)
+# ENT_STR_SIZE 2000 (250)
+# GLOB_STR_SIZE 2000 (1000)
+# MAX_GLOB_STRS 50 (10)
+
echo "Running memtest$t ..."
TEXMFCNF=$srcdir/../kpathsea \