diff options
Diffstat (limited to 'Build/source/texk/bibtexu')
-rw-r--r-- | Build/source/texk/bibtexu/ChangeLog | 6 | ||||
-rw-r--r-- | Build/source/texk/bibtexu/bibtex-3.c | 2 | ||||
-rw-r--r-- | Build/source/texk/bibtexu/bibtex-4.c | 5 | ||||
-rw-r--r-- | Build/source/texk/bibtexu/bibtex.h | 2 | ||||
-rw-r--r-- | Build/source/texk/bibtexu/utils.c | 14 |
5 files changed, 24 insertions, 5 deletions
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; } |