for (k = 0; k < 256; k++)
{
if (xord[k] != 127)
- {
- sprintf(log_line, "%d => %d\n", k, xord[k]);
- show_line(log_line, 0);
- }
+ printf("%d => %d\n", k, xord[k]);
}
}
}
mode = 1;
head = contrib_head;
tail = contrib_head;
- cur_list.aux_field.cint = ignore_depth;
+ prev_depth = ignore_depth;
mode_line = 0;
prev_graf = 0;
/* shown_mode = 0; */
int j; /* 95/Jan/7 */
/* unsigned char c; */
unsigned int c; /* 95/Jan/7 */
-/* savedbadness = 0; */ /* 96/Feb/9 */
pack_begin_line = mode_line;
link(temp_head) = link(head);
no_shrink_error_yet = true;
if ((shrink_order(left_skip) != normal) && (shrink(left_skip) != 0))
- {
left_skip = finite_shrink(left_skip);
- }
if ((shrink_order(right_skip) != normal) && (shrink(right_skip) != 0))
- {
right_skip = finite_shrink(right_skip);
- }
q = left_skip;
r = right_skip;
background[2 + stretch_order(q)] = stretch(q);
background[2 + stretch_order(r)] = background[2 + stretch_order(r)] + stretch(r);
background[6] = shrink(q) + shrink(r);
-
minimum_demerits = 1073741823L; /* 2^30 - 1 *//* 40000000 hex - 1 */
minimal_demerits[tight_fit] = 1073741823L;
minimal_demerits[decent_fit] = 1073741823L;
if (threshold >= 0)
{
-
#ifdef STAT
if (tracing_paragraphs > 0)
{
begin_diagnostic();
print_nl("@firstpass");
}
-#endif /* STAT */
+#endif
second_pass = false;
final_pass = false;
#ifdef STAT
if (tracing_paragraphs > 0)
begin_diagnostic();
-#endif /* STAT */
+#endif
}
while (true)
case rule_node:
active_width[1] = active_width[1] + width(cur_p);
break;
+
case whatsit_node:
if (subtype(cur_p) == language_node)
{
rhyf = what_rhm(cur_p);
}
break;
+
case glue_node:
{
if (auto_breaking)
#ifdef STAT
if (tracing_paragraphs > 0)
print_nl("@emergencypass");
-#endif /* STAT */
-/* can only get here is \emergencystretch has been set positive */
+#endif
+
background[2] = background[2] + emergency_stretch;
final_pass = true;
++final_pass_count; /* 96 Feb 9 */
- } /* end of if second_pass */
- } /* end of while (true)do */
-/* cannot drop through from above loop */
-lab30: /* common exit point */
+ }
+ }
+
+lab30:
if (best_line == 2)
single_line++;
end_diagnostic(true);
normalize_selector();
}
-#endif /* STAT */
+#endif
post_line_break(final_widow_penalty);
q = link(active);
switch (cur_cmd)
{
case set_font:
- if ((a >= 4))
- geq_define(cur_font_loc, data, cur_chr);
- else
- eq_define(cur_font_loc, data, cur_chr);
+ define(cur_font_loc, data, cur_chr);
break;
case def:
get_r_token();
p = cur_cs;
q = scan_toks(true, e);
-
- if ((a >= 4))
- geq_define(p, call + (a % 4), def_ref);
- else
- eq_define(p, call + (a % 4), def_ref);
+ define(p, call + (a % 4), def_ref);
}
break;
}
if (cur_cmd >= call)
- incr(mem[cur_chr].hh.lh);
+ add_token_ref(cur_chr);
- if ((a >= 4))
- geq_define(p, cur_cmd, cur_chr);
- else
- eq_define(p, cur_cmd, cur_chr);
+ define(p, cur_cmd, cur_chr);
}
break;
n = cur_chr;
get_r_token();
p = cur_cs;
-
- if ((a >= 4))
- geq_define(p, relax, 256);
- else
- eq_define(p, relax, 256);
-
+ define(p, relax, 256);
scan_optional_equals();
switch (n)
case char_def_code:
{
scan_char_num();
-
- if ((a >= 4))
- geq_define(p, char_given, cur_val);
- else
- eq_define(p, char_given, cur_val);
+ define(p, char_given, cur_val);
}
break;
case math_char_def_code:
{
scan_fifteen_bit_int();
-
- if ((a >= 4))
- geq_define(p, math_given, cur_val);
- else
- eq_define(p, math_given, cur_val);
+ define(p, math_given, cur_val);
}
break;
switch (n)
{
case count_def_code:
- if ((a >= 4))
- geq_define(p, assign_int, count_base + cur_val);
- else
- eq_define(p, assign_int, count_base + cur_val);
+ define(p, assign_int, count_base + cur_val);
break;
case dimen_def_code:
- if ((a >= 4))
- geq_define(p, assign_dimen, scaled_base + cur_val);
- else
- eq_define(p, assign_dimen, scaled_base + cur_val);
+ define(p, assign_dimen, scaled_base + cur_val);
break;
case skip_def_code:
- if ((a >= 4))
- geq_define(p, assign_glue, skip_base + cur_val);
- else
- eq_define(p, assign_glue, skip_base + cur_val);
+ define(p, assign_glue, skip_base + cur_val);
break;
case mu_skip_def_code:
- if ((a >= 4))
- geq_define(p, assign_mu_glue, mu_skip_base + cur_val);
- else
- eq_define(p, assign_mu_glue, mu_skip_base + cur_val);
+ define(p, assign_mu_glue, mu_skip_base + cur_val);
break;
case toks_def_code:
- if ((a >= 4))
- geq_define(p, assign_toks, toks_base + cur_val);
- else
- eq_define(p, assign_toks, toks_base + cur_val);
+ define(p, assign_toks, toks_base + cur_val);
break;
}
}
scan_int();
n = cur_val;
- if (! scan_keyword("to"))
+ if (!scan_keyword("to"))
{
print_err("Missing `to' inserted");
help2("You should have said `\\read<number> to \\cs'.",
get_r_token();
p = cur_cs;
read_toks(n, p);
-
- if ((a >= 4))
- geq_define(p, call, cur_val);
- else
- eq_define(p, call, cur_val);
+ define(p, call, cur_val);
}
break;
q = equiv(cur_chr);
if (q == 0)
- if ((a >= 4))
- geq_define(p, undefined_cs, 0);
- else
- eq_define(p, undefined_cs, 0);
+ define(p, undefined_cs, 0);
else
{
- incr(mem[q].hh.lh);
-
- if ((a >= 4))
- geq_define(p, call, q);
- else
- eq_define(p, call, q);
+ add_token_ref(q);
+ define(p, call, q);
}
goto lab30;
}
if (link(def_ref) == 0)
{
- if ((a >= 4))
- geq_define(p, undefined_cs, 0);
- else
- eq_define(p, undefined_cs, 0);
-
+ define(p, undefined_cs, 0);
free_avail(def_ref);
}
else
link(def_ref) = q;
}
- if ((a >= 4))
- geq_define(p, call, def_ref);
- else
- eq_define(p, call, def_ref);
+ define(p, call, def_ref);
}
}
break;
p = cur_chr;
scan_optional_equals();
scan_int();
-
- if ((a >= 4))
- geq_word_define(p, cur_val);
- else
- eq_word_define(p, cur_val);
+ word_define(p, cur_val);
}
break;
p = cur_chr;
scan_optional_equals();
scan_dimen(false, false, false);
-
- if ((a >= 4))
- geq_word_define(p, cur_val);
- else
- eq_word_define(p, cur_val);
+ word_define(p, cur_val);
}
break;
scan_glue(glue_val);
trap_zero_glue();
-
- if ((a >= 4))
- geq_define(p, glue_ref, cur_val);
- else
- eq_define(p, glue_ref, cur_val);
+ define(p, glue_ref, cur_val);
}
break;
else if (cur_chr == del_code_base)
n = 16777215L; /* 2^24 - 1 */
else
- n = 255; /* 2^8 - 1 */
+ n = 255;
p = cur_chr;
scan_char_num();
}
if (p < math_code_base)
- if ((a >= 4))
- geq_define(p, data, cur_val);
- else
- eq_define(p, data, cur_val);
+ define(p, data, cur_val);
else if (p < del_code_base)
- if ((a >= 4))
- geq_define(p, data, cur_val);
- else
- eq_define(p, data, cur_val);
+ define(p, data, cur_val);
else
- if ((a >= 4))
- geq_word_define(p, cur_val);
- else
- eq_word_define(p, cur_val);
+ word_define(p, cur_val);
}
break;
p = p + cur_val;
scan_optional_equals();
scan_font_ident();
-
- if ((a >= 4))
- geq_define(p, data, cur_val);
- else
- eq_define(p, data, cur_val);
+ define(p, data, cur_val);
}
break;
scan_optional_equals();
if (set_box_allowed)
- {
scan_box(box_flag + n);
- }
else
{
print_err("Improper ");
}
}
- if ((a >= 4))
- geq_define(par_shape_loc, shape_ref, p);
- else
- eq_define(par_shape_loc, shape_ref, p);
+ define(par_shape_loc, shape_ref, p);
}
break;
new_patterns();
goto lab30;
}
-#endif /* INITEX */
+#endif
print_err("Patterns can be loaded only by INITEX");
help_ptr = 0;
error();
#ifdef ALLOCATEMAIN
/* we already read this once earlier to grab mem_top */
if (trace_flag)
- {
- sprintf(log_line, "Read from fmt file mem_top = %d TeX words\n", x);
- show_line(log_line, 0);
- }
+ printf("Read from fmt file mem_top = %d TeX words\n", x);
mem = allocate_main_memory(x); /* allocate main memory at this point */
undump_int(x); /* eqtb_size */
- if (x != (eqtb_size))
+ if (x != eqtb_size)
goto lab_bad_fmt;
undump_int(x); /* hash_prime */
#ifdef ALLOCATEHYPHEN
/* allow format files dumped with arbitrary (prime) hyphenation exceptions */
- realloc_hyphen(x); /* reset_hyphen(); */
+ realloc_hyphen(x);
hyphen_prime = x;
#endif
if (x > current_pool_size)
{
if (trace_flag)
- {
- sprintf(log_line, "undump string pool reallocation (%d > %d)\n", x, current_pool_size);
- show_line(log_line, 0);
- }
+ printf("undump string pool reallocation (%d > %d)\n", x, current_pool_size);
str_pool = realloc_str_pool (x - current_pool_size + increment_pool_size);
}
- if (x > current_pool_size) /* 94/Jan/24 */
+ if (x > current_pool_size)
#else
if (x > pool_size)
#endif
{
- sprintf(log_line, "%s%s\n", "---! Must increase the ", "string pool size");
- show_line(log_line, 0);
+ printf("%s%s\n", "---! Must increase the ", "string pool size");
goto lab_bad_fmt;
}
else
if (x > current_max_strings)
{
if (trace_flag)
- {
- sprintf(log_line, "undump string pointer reallocation (%d > %d)\n", x, current_max_strings);
- show_line(log_line, 0);
- }
+ printf("undump string pointer reallocation (%d > %d)\n", x, current_max_strings);
str_start = realloc_str_start(x - current_max_strings + increment_max_strings);
}
if (x > max_strings)
#endif
{
- sprintf(log_line, "%s%s\n", "---! Must increase the ", "max strings");
- show_line(log_line, 0);
+ printf("%s%s\n", "---! Must increase the ", "max strings");
goto lab_bad_fmt;
}
else
undump_int(cs_count);
if (trace_flag)
- {
- sprintf(log_line, "itex undump cs_count %d ", cs_count);
- show_line(log_line, 0);
- }
+ printf("itex undump cs_count %d ", cs_count);
{
- undump_int(x); /* font_mem_size */
+ undump_int(x); /* font_mem_size */
if (x < 7)
goto lab_bad_fmt;
#ifdef ALLOCATEFONT
if (trace_flag)
- {
- sprintf(log_line, "Read from fmt fmem_ptr = %d\n", x);
- show_line(log_line, 0);
- }
+ printf("Read from fmt fmem_ptr = %d\n", x);
- if (x > current_font_mem_size) /* 93/Nov/28 dynamic allocate font_info */
+ if (x > current_font_mem_size)
{
if (trace_flag)
- {
- sprintf(log_line, "Undump realloc font_info (%d > %d)\n", x, current_font_mem_size);
- show_line(log_line, 0);
- }
+ printf("Undump realloc font_info (%d > %d)\n", x, current_font_mem_size);
font_info = realloc_font_info (x - current_font_mem_size + increment_font_mem_size);
}
- if (x > current_font_mem_size) /* in case allocation failed 94/Jan/24 */
+ if (x > current_font_mem_size)
#else
if (x > font_mem_size)
#endif
{
- sprintf(log_line, "%s%s\n", "---! Must increase the ", "font mem size");
- show_line(log_line, 0);
+ puts("---! Must increase the font mem size\n");
goto lab_bad_fmt;
}
else
if (x > font_max)
{
- sprintf(log_line, "%s%s\n", "---! Must increase the ", "font max");
- show_line(log_line, 0);
+ puts("---! Must increase the font max\n");
goto lab_bad_fmt;
}
else
font_ptr = x;
}
- frozen_font_ptr = font_ptr; /* remember number of fonts frozen into format */
+ frozen_font_ptr = font_ptr;
if (undumpthings(font_check[0], font_ptr + 1))
return -1;
/* non_address from font_mem_size to 0 96/Jan/15 ??? */
#ifdef ALLOCATEFONT
-/* deal with fmt files dumped with *different* font_mem_size 93/Nov/29 */
{
int count = 0, oldfont_mem_size = 0;
if (bchar_label[x] > oldfont_mem_size)
oldfont_mem_size = bchar_label[x];
}
-
- /* somewhat arbitrary sanity check ... */
- if (oldfont_mem_size != non_address && oldfont_mem_size > font_max) /* 96/Jan/16 */
+
+ if (oldfont_mem_size != non_address && oldfont_mem_size > font_max)
{
for (x = 0; x <= font_ptr; x++)
{
if (bchar_label[x] == oldfont_mem_size)
{
- /* bchar_label[x] = font_mem_size; */
- bchar_label[x] = non_address; /* 96/Jan/16 */
+ bchar_label[x] = non_address;
count++;
}
}
if (trace_flag)
- {
- sprintf(log_line, "oldfont_mem_size is %d --- hit %d times. Using non_address %d\n",
+ printf("oldfont_mem_size is %d --- hit %d times. Using non_address %d\n",
oldfont_mem_size, count, non_address);
- show_line(log_line, 0);
- }
}
}
#endif
if (x > trie_size)
{
- sprintf(log_line, "%s%s\n", "---! Must increase the ", "trie size");
- show_line(log_line, 0);
+ puts("---! Must increase the trie size\n");
goto lab_bad_fmt;
}
else
if (x > trie_op_size)
{
- sprintf(log_line, "%s%s\n", "---! Must increase the ", "trie op size");
- show_line(log_line, 0);
+ puts("---! Must increase the trie op size\n");
goto lab_bad_fmt;
}
else
return true;
lab_bad_fmt:;
- sprintf(log_line, "(Fatal format file error; I'm stymied)\n");
- show_line(log_line, 1);
+ puts("(Fatal format file error; I'm stymied)\n");
return false;
}
if (bad > 0)
{
- sprintf(log_line, "%s%s%ld\n", "Ouch---my internal constants have been clobbered!",
+ printf("%s%s%ld\n", "Ouch---my internal constants have been clobbered!",
"---case ", (long) bad);
- show_line(log_line, 1);
goto lab9999;
}
file_offset = 0;
show_line(tex_version, 0);
- {
#ifdef _WIN32
#ifdef _WIN64
- sprintf(log_line, " (%s %s/Windows 64bit)", application, yandyversion);
+ printf(log_line, " (%s %s/Windows 64bit)", application, yandyversion);
#else
- sprintf(log_line, " (%s %s/Windows 32bit)", application, yandyversion);
+ printf(log_line, " (%s %s/Windows 32bit)", application, yandyversion);
#endif
#else
- sprintf(log_line, " (%s %s/Linux)", application, yandyversion);
+ printf(log_line, " (%s %s/Linux)", application, yandyversion);
#endif
- }
-
- show_line(log_line, 0);
if (format_ident > 0)
slow_print(format_ident);
cs_count = frozen_control_sequence - 1 - hash_used;
if (trace_flag)
- {
- sprintf(log_line, "itex cs_count %d hash_size %d hash_extra %d hash_used %d",
+ printf("itex cs_count %d hash_size %d hash_extra %d hash_used %d",
cs_count, hash_size, hash_extra, hash_used);
- show_line(log_line, 0);
- }
for (p = hash_base; p <= hash_used; p++)
{
incr(cs_count);
if (trace_flag)
- {
- sprintf(log_line, "itex cs_count++ ");
- show_line(log_line, 0);
- }
+ puts("itex cs_count++ ");
}
}