summaryrefslogtreecommitdiff
path: root/Build/source/texk/bibtexu/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/bibtexu/utils.c')
-rw-r--r--Build/source/texk/bibtexu/utils.c80
1 files changed, 18 insertions, 62 deletions
diff --git a/Build/source/texk/bibtexu/utils.c b/Build/source/texk/bibtexu/utils.c
index 7200a149a4b..f01d64b080a 100644
--- a/Build/source/texk/bibtexu/utils.c
+++ b/Build/source/texk/bibtexu/utils.c
@@ -193,9 +193,9 @@ static struct option long_options[] = {
{"wolfgang", VALUE_NONE, 0, 'W'},
{"min_crossrefs", VALUE_REQD, 0, 'M'},
- {"mcites", VALUE_REQD, 0, '\x0A'},
+ {"mcites", VALUE_REQD, 0, '\x0A'}, /* obsolete */
{"mentints", VALUE_REQD, 0, '\x0B'}, /* obsolete */
- {"mentstrs", VALUE_REQD, 0, '\x0C'},
+ {"mentstrs", VALUE_REQD, 0, '\x0C'}, /* obsolete */
{"mfields", VALUE_REQD, 0, '\x0D'}, /* obsolete */
{"mpool", VALUE_REQD, 0, '\x0E'}, /* obsolete */
{"mstrings", VALUE_REQD, 0, '\x0F'},
@@ -311,18 +311,15 @@ static void allocate_arrays (void)
/*
** Boolean_T entry_ints[Max_Ent_Ints + 1];
+ ** allocated when num_ent_ints and num_cites are known
*/
- bytes_required = (Max_Ent_Ints + 1) * (unsigned long) sizeof (Integer_T);
- entry_ints = (Integer_T *) mymalloc (bytes_required, "entry_ints");
+ entry_ints = NULL;
/*
** ASCIICode_T entry_strs[Max_Ent_Strs + 1][ENT_STR_SIZE + 1];
+ ** allocated when num_ent_strs and num_cites are known
*/
- bytes_required = (unsigned long) (Max_Ent_Strs + 1)
- * (unsigned long) (ENT_STR_SIZE + 1)
- * (unsigned long) sizeof (ASCIICode_T);
-
- entry_strs = (ASCIICode_T *) mymalloc (bytes_required, "entry_strs");
+ entry_strs = NULL;
/*
** ASCIICode_T ex_buf[Buf_Size + 1];
@@ -955,9 +952,9 @@ FILE *open_op_file (void)
** required for automatic inclusion of the cross
** referenced entry in the citation list
** (default = 2)
-** --mcites ## allow ## \\cites in the .aux files
+** --mcites ## ignored
** --mentints ## ignored
-** --mentstrs ## allow ## string entries in the .bib databases
+** --mentstrs ## ignored
** --mfields ## ignored
** --mpool ## ignored
** --mstrings ## allow ## unique strings
@@ -1062,28 +1059,11 @@ Get the option, and change the flag. 23/sep/2009
break;
case '\x0A': /**************** --mcites *****************/
- M_cites = checklong (optarg);
- if (M_cites < 0) {
- mark_fatal ();
- usage ("invalid max number of cites `%s'\n", optarg);
- }
- break;
-
case '\x0B': /**************** --mentints ***************/
- (void) checklong (optarg); /******** ignored ********/
- break;
-
case '\x0C': /**************** --mentstrs ***************/
- M_entstrs = checklong (optarg);
- if (M_entstrs < 0) {
- mark_fatal ();
- usage ("invalid max number of string entries `%s'\n",
- optarg);
- }
- break;
-
case '\x0D': /**************** --mfields ****************/
case '\x0E': /**************** --mpool *****************/
+ case '\x10': /**************** --mwizfuns ***************/
(void) checklong (optarg); /******** ignored ********/
break;
@@ -1095,10 +1075,6 @@ Get the option, and change the flag. 23/sep/2009
}
break;
- case '\x10': /**************** --mwizfuns ***************/
- (void) checklong (optarg); /******** ignored ********/
- break;
-
default: /**************** Unknown argument ********/
mark_fatal ();
usage ("unknown option");
@@ -1206,8 +1182,6 @@ void report_bibtex_capacity (void)
LOG_CAPACITY (LIT_STK_SIZE);
LOG_CAPACITY (Max_Bib_Files);
LOG_CAPACITY (Max_Cites);
- LOG_CAPACITY (Max_Ent_Ints);
- LOG_CAPACITY (Max_Ent_Strs);
LOG_CAPACITY (Max_Fields);
LOG_CAPACITY (MAX_GLOB_STRS);
LOG_CAPACITY (MAX_PRINT_LINE);
@@ -1339,9 +1313,9 @@ static void compute_hash_prime (void)
** Hash_Prime *** computed from Hash_Size ***
** Hash_Size *** determined from Max_Strings ***
** Max_Bib_Files *** initialy 20, increased as required ***
-** Max_Cites Y 750 2,000 5,000 7,500
-** Max_Ent_Ints *** initialy 3000, increased as required ***
-** Max_Ent_Strs Y 3,000 6,000 10,000 10,000
+** Max_Cites *** initialy 750, increased as required ***
+** Max_Ent_Ints *** as required ***
+** Max_Ent_Strs *** as required ***
** Max_Fields *** initialy 5000, increased as required ***
** Max_Strings Y 4,000 10,000 19,000 30,000
** Pool_Size *** initialy 65,000, increased as required ***
@@ -1354,26 +1328,18 @@ void set_array_sizes (void)
{
debug_msg (DBG_MEM, "Setting BibTeX's capacity ... ");
- Max_Cites = 750;
- Max_Ent_Strs = 3000;
Max_Strings = 4000;
Min_Crossrefs = 2;
if (Flag_big) {
- Max_Cites = 2000;
- Max_Ent_Strs = 5000;
Max_Strings = 10000;
}
if (Flag_huge) {
- Max_Cites = 5000;
- Max_Ent_Strs = 10000;
Max_Strings = 19000;
}
if (Flag_wolfgang) {
- Max_Cites = 7500;
- Max_Ent_Strs = 10000;
Max_Strings = 30000;
}
@@ -1381,13 +1347,7 @@ void set_array_sizes (void)
Max_Bib_Files = MAX_BIB_FILES;
- if (M_cites > 0)
- Max_Cites = M_cites;
-
- Max_Ent_Ints = MAX_ENT_INTS;
-
- if (M_entstrs > 0)
- Max_Ent_Strs = M_entstrs;
+ Max_Cites = MAX_CITES;
Max_Fields = MAX_FIELDS;
@@ -1415,10 +1375,8 @@ void set_array_sizes (void)
Hash_Prime, Hash_Size);
debug_msg (DBG_MEM, "Buf_Size = %d, Max_Bib_Files = %d",
Buf_Size, Max_Bib_Files);
- debug_msg (DBG_MEM, "Max_Cites = %d, Max_Ent_Ints = %d",
- Max_Cites, Max_Ent_Ints);
- debug_msg (DBG_MEM, "Max_Ent_Strs = %d, Max_Fields = %d",
- Max_Ent_Strs, Max_Fields);
+ debug_msg (DBG_MEM, "Max_Cites = %d, Max_Fields = %d",
+ Max_Cites, Max_Fields);
debug_msg (DBG_MEM, "Max_Strings = %d, Pool_Size = %d",
Max_Strings, Pool_Size);
debug_msg (DBG_MEM, "Min_Crossrefs = %d, Wiz_Fn_Space = %d",
@@ -1509,12 +1467,10 @@ void usage (const char *printf_fmt, ...)
FSO (" -l --language input the option language, ex: -l fr\n");
FSO (" -o --location input the option location, ex: -o fr\n\n");
- FSO (" -B --big set large BibTeX capacity\n");
- FSO (" -H --huge set huge BibTeX capacity\n");
- FSO (" -W --wolfgang set really huge BibTeX capacity for Wolfgang\n");
+ FSO (" -B --big same as --mstrings 10000\n");
+ FSO (" -H --huge same as --mstrings 19000\n");
+ FSO (" -W --wolfgang same as --mstrings 30000\n");
FSO (" -M --min_crossrefs ## set min_crossrefs to ##\n");
- FSO (" --mcites ## allow ## \\cites in the .aux files\n");
- FSO (" --mentstrs ## allow ## string entries in the .bib databases\n");
FSO (" --mstrings ## allow ## unique strings\n");
debug_msg (DBG_MISC, "calling longjmp (Exit_Program_Flag) ... ");