- equiv(end_write) = 0;
-}
-#endif /* INITEX */
-
-#ifdef INITEX
-/* starts string pool with strings for 256 chars and then reads tex.pool */
-/* adjusted to try both "tex.pool" and "tex.poo" 95/Feb/19 */
-/* I have added a texpool file, but I need merge the pool to the binary */
-/* lots of things updates the kpathsea sources -- Clerk Ma */
-
-bool get_strings_started (void)
-{
- register bool Result;
- unsigned char k/*, l*/;
- /* ASCII_code m, n;*/
- str_number g;
- /* integer a; */ /* not used */
- /*bool c;*/
-/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
- /*int flag;*/ /* 95/Feb/19 */
-/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
- pool_ptr = 0;
- str_ptr = 0;
- str_start[0] = 0;
-
- {
- register integer for_end;
- k = 0;
- for_end = 255;
- if (k <= for_end)
- do {
- if (((k < ' ') || (k > '~')))
- {
- append_char('^');
- append_char('^');
- if (k < 64)
- append_char(k + 64);
- else
- if (k < 128)
- append_char(k - 64);
- else
- {
- append_lc_hex(k / 16);
- append_lc_hex(k % 16);
- }
- }
- else
- append_char(k);
- g = make_string();
- } while(k++ < for_end);
- }
-#ifdef STDPOOL
- vstrcpy((char *) name_of_file + 1, pool_name);
- name_of_file[0] = ' ';
- name_of_file[strlen(pool_name) + 1] = ' ';
- name_length = strlen(pool_name);
-/* if (a_open_in(pool_file, TEXPOOLPATH)) */
- flag = a_open_in(pool_file, TEXPOOLPATH);
- if (flag == 0) /* 95/Feb/19 */
- {
- pool_name [name_length - 1] = '\0'; /* `tex.pool' => `tex.poo' */
- vstrcpy((char *) name_of_file + 1, pool_name);
- name_of_file[0] = ' ';
- name_of_file[strlen(pool_name) + 1] = ' ';
- name_length = strlen(pool_name);
- flag = a_open_in(pool_file, TEXPOOLPATH);
- }
- if (flag)
- {
- c = false;
- do {
- {
- if (test_eof(pool_file))
- {
- show_line("! string pool file has no check sum.\n", 1);
- if (! knuth_flag)
- bad_formator_pool(string_file, "the pool file", "TEXPOOL");
- (void) a_close(pool_file);
- Result = false;
- return(Result);
- }
- read(pool_file, m);
- read(pool_file, n);
- if (m == '*') /* last line starts with * */
- {
- a = 0;
- k = 1;
- while (true) {
- if ((xord[n]< 48) || (xord[n]> 57))
- {
- show_line("! string pool file check sum doesn't have nine digits.\n", 1);
- if (!knuth_flag)
- bad_formator_pool(string_file, "the pool file", "TEXPOOL");
- (void) a_close(pool_file);
- Result = false;
- return(Result);
- }
- a = 10 * a + xord[n] - 48;
- if (k == 9)
- goto lab30;
- incr(k);
- read(pool_file, n);
- }
-/* tex.pool file check sum *367403084 */
-lab30:
- if (a != BEGINFMTCHECKSUM)
- {
- show_line("! string pool check sum doesn't match; tangle me again.\n", 1);
- if (!knuth_flag)
- bad_formator_pool(string_file, "the pool file", "TEXPOOL");
- (void) a_close(pool_file);
- Result = false;
- return(Result);
- }
- c = true;
- }
- else
- {
- if ((xord[m] < 48) || (xord[m] > 57) || (xord[n] < 48) || (xord[n] > 57))
- {
- show_line("! string pool line doesn't begin with two digits.\n", 1);
- if (! knuth_flag)
- bad_formator_pool(string_file, "the pool file", "TEXPOOL");
- (void) a_close(pool_file);
- Result = false;
- return(Result);
- }
- l = xord[m] * 10 + xord[n] - 48 * 11;
-#ifdef ALLOCATESTRING
-/* can freely extend memory, so we need not be paranoid - stringvacancies */
-/* if (pool_ptr + l + stringvacancies > current_pool_size)*/
- if (pool_ptr + l + stringmargin > current_pool_size)
- {
- if (trace_flag)
- show_line("String margin reallocation\n", 0);
-/* str_pool = realloc_str_pool (pool_ptr + l + stringvacancies */
- str_pool = realloc_str_pool (pool_ptr + l + stringmargin - current_pool_size + increment_pool_size);
- }
- if (pool_ptr + l + stringmargin > current_pool_size) /* 94/Jan/24 */
-#else
- if (pool_ptr + l + stringvacancies > pool_size)
-#endif
- {
- show_line("! You have to increase POOLSIZE.\n", 1);
- (void) a_close(pool_file);
- Result = false;
- return(Result);
- }
- {
- register integer for_end;
- k = 1;
- for_end = l;
- if (k <= for_end)
- do {
- if (eoln(pool_file))
- m = ' ';
- else read(pool_file, m);
- {
- str_pool[pool_ptr] = xord[m];
- incr(pool_ptr);
- }
- } while(k++ < for_end);
- }
- readln(pool_file); /* flush rest to end of file / end of line */
- g = make_string();
- }
- }
- } while (!(c));
- (void) a_close(pool_file);
- Result = true;
- }
- else