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;
- minimal_demerits[loose_fit] = 1073741823L;
- minimal_demerits[very_loose_fit] = 1073741823L;
+ minimum_demerits = awful_bad;
+ minimal_demerits[tight_fit] = awful_bad;
+ minimal_demerits[decent_fit] = awful_bad;
+ minimal_demerits[loose_fit] = awful_bad;
+ minimal_demerits[very_loose_fit] = awful_bad;
if (par_shape_ptr == 0)
if (hang_indent == 0)
}
else if (type(s) == ligature_node)
if (lig_ptr(s) == 0)
- goto lab22;
+ goto continu;
else
{
q = lig_ptr(s);
hf = font(q);
}
else if ((type(s) == kern_node) && (subtype(s) == normal))
- goto lab22;
+ goto continu;
else if (type(s) == whatsit_node)
{
if (subtype(s) == language_node)
lhyf = what_lhm(s);
rhyf = what_rhm(s);
}
- goto lab22;
+ goto continu;
}
else
- goto lab31;
+ goto done1;
if (lc_code(c) != 0)
if ((lc_code(c) == (halfword) c) || (uc_hyph > 0)) /* fixed signed tyoe */
- goto lab32;
+ goto done2;
else
- goto lab31;
-lab22:
+ goto done1;
+continu:
prevs = s;
s = link(prevs);
}
-lab32:
+done2:
hyf_char = hyphen_char[hf];
if (hyf_char < 0)
- goto lab31;
+ goto done1;
if (hyf_char > 255)
- goto lab31; /* ? */
+ goto done1; /* ? */
ha = prevs;
if (lhyf + rhyf > 63)
- goto lab31;
+ goto done1;
hn = 0;
if (is_char_node(s))
{
if (font(s) != hf)
- goto lab33;
+ goto done3;
hyfbchar = character(s);
c = hyfbchar; /* unsigned char c; */
if (lc_code(c) == 0)
- goto lab33;
+ goto done3;
if (hn == 63)
- goto lab33;
+ goto done3;
hb = s;
incr(hn);
else if (type(s) == ligature_node)
{
if (font(lig_char(s)) != hf)
- goto lab33;
+ goto done3;
j = hn;
q = lig_ptr(s);
c = character(q);
if (lc_code(c) == 0)
- goto lab33;
+ goto done3;
if (j == 63)
- goto lab33;
+ goto done3;
incr(j);
hu[j] = c;
hyfbchar = font_bchar[hf];
}
else
- goto lab33;
+ goto done3;
s = link(s);
}
-lab33:;
+done3:;
if (hn < lhyf + rhyf)
- goto lab31;
+ goto done1;
while (true)
{
break;
case kern_node:
if (subtype(s) != normal)
- goto lab34;
+ goto done4;
break;
case whatsit_node:
case glue_node:
case ins_node:
case adjust_node:
case mark_node:
- goto lab34;
+ goto done4;
break;
default:
- goto lab31;
+ goto done1;
break;
}
s = link(s);
}
-lab34:;
+done4:;
hyphenate();
}
-lab31:;
+done1:;
}
}
break;
prev_p = cur_p;
cur_p = s;
- goto lab35;
+ goto done5;
}
break;
prev_p = cur_p;
cur_p = link(cur_p);
-lab35:;
+done5:;
}
if (cur_p == 0)
if (link(active) != active)
{
r = link(active);
- fewest_demerits = 1073741823L; /* 2^30 - 1 */
+ fewest_demerits = awful_bad;
do
{
if (looseness == 0)
{
- goto lab30; /* normal exit */
+ goto done; /* normal exit */
}
{
if ((actual_looseness == looseness) || final_pass)
{
- goto lab30;
+ goto done;
}
}
}
{
cur_p = link(q);
- if (type(q) == 2)
- free_node(q, 7);
+ if (type(q) == delta_node)
+ free_node(q, delta_node_size);
else
- free_node(q, 3);
+ free_node(q, active_node_size);
q = cur_p;
}
while (q != 0)
{
cur_p = link(q);
- free_node(q, 2);
+ free_node(q, passive_node_size);
q = cur_p;
}
- if (! second_pass)
+ if (!second_pass)
{
#ifdef STAT
if (tracing_paragraphs > 0)
}
}
-lab30:
+done:
if (best_line == 2)
single_line++;
{
cur_p = link(q);
- if (type(q) == 2)
- free_node(q, 7);
+ if (type(q) == delta_node)
+ free_node(q, delta_node_size);
else
- free_node(q, 3);
+ free_node(q, active_node_size);
q = cur_p;
}
while (q != 0)
{
cur_p = link(q);
- free_node(q, 2);
+ free_node(q, passive_node_size);
q = cur_p;
}
add_token_ref(q);
define(p, call, q);
}
- goto lab30;
+ goto done;
}
}
if (is_initex)
{
new_patterns();
- goto lab30;
+ goto done;
}
#endif
print_err("Patterns can be loaded only by INITEX");
else
{
new_hyph_exceptions();
- goto lab30;
+ goto done;
}
break;
break;
}
-lab30:
+done:
if (after_token != 0)
{
cur_tok = after_token;
undump_int(x);
if (x != BEGINFMTCHECKSUM)
- goto lab_bad_fmt;
+ goto bad_fmt;
undump_int(x); /* mem_bot */
if (x != mem_bot)
- goto lab_bad_fmt;
+ goto bad_fmt;
undump_int(x); /* mem_top */
#endif
if (x != mem_top)
- goto lab_bad_fmt;
+ goto bad_fmt;
undump_int(x); /* eqtb_size */
if (x != eqtb_size)
- goto lab_bad_fmt;
+ goto bad_fmt;
undump_int(x); /* hash_prime */
if (x != hash_prime)
- goto lab_bad_fmt;
+ goto bad_fmt;
undump_int(x); /* hyphen_prime */
#endif
if (x != hyphen_prime)
- goto lab_bad_fmt;
+ goto bad_fmt;
{
undump_int(x); /* pool_size */
if (x < 0)
- goto lab_bad_fmt;
+ goto bad_fmt;
#ifdef ALLOCATESTRING
if (x > current_pool_size)
#endif
{
printf("%s%s\n", "---! Must increase the ", "string pool size");
- goto lab_bad_fmt;
+ goto bad_fmt;
}
else
pool_ptr = x;
undump_int(x); /* max_strings */
if (x < 0)
- goto lab_bad_fmt;
+ goto bad_fmt;
#ifdef ALLOCATESTRING
if (x > current_max_strings)
#endif
{
printf("%s%s\n", "---! Must increase the ", "max strings");
- goto lab_bad_fmt;
+ goto bad_fmt;
}
else
str_ptr = x;
p = q + node_size(q);
if ((p > lo_mem_max) || ((q >= rlink(q)) && (rlink(q) != rover)))
- goto lab_bad_fmt;
+ goto bad_fmt;
q = rlink(q);
}
{
/* or call add_variable_space(mem_bot - (mem_min + 1)) */
if (trace_flag)
- puts("Splicing in mem_min space in undump!\n");
+ puts("Splicing in mem_min space in undump!");
p = llink(rover);
q = mem_min + 1;
undump_int(x);
if ((x < 1) || (k + x > (eqtb_size + 1)))
- goto lab_bad_fmt;
+ goto bad_fmt;
if (undumpthings(eqtb[k], x))
return -1;
undump_int(x);
if ((x < 0) || (k + x > (eqtb_size + 1)))
- goto lab_bad_fmt;
+ goto bad_fmt;
for (j = k; j <= k + x - 1; j++)
eqtb[j] = eqtb[k - 1];
undump_int(x); /* font_mem_size */
if (x < 7)
- goto lab_bad_fmt;
+ goto bad_fmt;
#ifdef ALLOCATEFONT
if (trace_flag)
if (x > font_mem_size)
#endif
{
- puts("---! Must increase the font mem size\n");
- goto lab_bad_fmt;
+ puts("---! Must increase the font mem size");
+ goto bad_fmt;
}
else
fmem_ptr = x;
undump_int(x); /* font_max */
if (x < 0)
- goto lab_bad_fmt;
+ goto bad_fmt;
if (x > font_max)
{
- puts("---! Must increase the font max\n");
- goto lab_bad_fmt;
+ puts("---! Must increase the font max");
+ goto bad_fmt;
}
else
font_ptr = x;
undump_int(x);
if (x < 0)
- goto lab_bad_fmt;
+ goto bad_fmt;
#ifdef ALLOCATETRIES
if (!is_initex)
if (x > trie_size)
{
puts("---! Must increase the trie size\n");
- goto lab_bad_fmt;
+ goto bad_fmt;
}
else
j = x;
undump_int(x);
if (x < 0)
- goto lab_bad_fmt;
+ goto bad_fmt;
if (x > trie_op_size)
{
puts("---! Must increase the trie op size\n");
- goto lab_bad_fmt;
+ goto bad_fmt;
}
else
j = x;
undump_int(x);
if ((x != ENDFMTCHECKSUM) || feof(fmt_file))
- goto lab_bad_fmt;
+ goto bad_fmt;
return true;
-lab_bad_fmt:;
+bad_fmt:;
puts("(Fatal format file error; I'm stymied)\n");
return false;
print_string(" was incomplete)");
if_line = mem[cond_ptr + 1].cint;
- cur_if = mem[cond_ptr].hh.b1;
+ cur_if = subtype(cond_ptr);
temp_ptr = cond_ptr;
- cond_ptr = mem[cond_ptr].hh.rh;
- free_node(temp_ptr, 2);
+ cond_ptr = link(cond_ptr);
+ free_node(temp_ptr, if_node_size);
}
if (history != spotless)
bad = 15;
#ifdef INCREASEFONTS
- if (font_max > 1024)
+ if (font_max > 65535)
#else
if (font_max > 256)
#endif
slow_print(format_ident);
print_ln();
-
-#ifndef _WINDOWS
- fflush(stdout);
-#endif
-
+ update_terminal();
job_name = 0;
name_in_progress = false;
log_opened = false;
start = 1;
index = 0;
line = 0;
- cur_input.name_field = 0;
+ name = 0;
force_eof = false;
align_state = 1000000L;
}
if (trie_taken[h])
- goto lab45;
+ goto not_found;
q = trie_r[p];
while (q > 0)
{
if (trie_trl[h + trie_c[q]] == 0)
- goto lab45;
+ goto not_found;
q = trie_r[q];
}
- goto lab40;
-lab45:
+ goto found;
+not_found:
z = trie_trl[z];
}
-lab40:
+found:
trie_taken[h] = true; /* h may be used without ... */
trie_hash[p] = h;
q = p;
if (l > 0)
decr(l);
else
- goto lab31;
+ goto done1;
}
-lab31:
+done1:
q = 0;
hc[0] = cur_lang;
}
if (cur_cmd == right_brace)
- goto lab30;
+ goto done;
k = 0;
hyf[0] = 0;
break;
}
}
-lab30:;
+done:;
}
else
{
trie_trc[0] = 63;
trie_not_ready = false;
}
-#endif /* INITEX */
+#endif
#ifdef INITEX
/* sec 1302 */
if ((equiv(j) == equiv(j + 1)) &&
(eq_type(j) == eq_type(j + 1)) &&
(eq_level(j) == eq_level(j + 1)))
- goto lab41;
+ goto found1;
incr(j);
}
l = (int_base);
- goto lab31;
-lab41:
+ goto done1;
+found1:
incr(j);
l = j;
while (j < (int_base - 1))
if ((equiv(j) != equiv(j + 1)) ||
(eq_type(j) != eq_type(j + 1)) ||
(eq_level(j) != eq_level(j + 1)))
- goto lab31;
+ goto done1;
incr(j);
}
-lab31:
+done1:
dump_int(l - k);
if (dumpthings(eqtb[k], l - k))
while (j < (eqtb_size))
{
if (eqtb[j].cint == eqtb[j + 1].cint)
- goto lab42;
+ goto found2;
incr(j);
}
l = (eqtb_size + 1);
- goto lab32;
-lab42:
+ goto done2;
+found2:
incr(j);
l = j;
while (j < (eqtb_size))
{
if (eqtb[j].cint != eqtb[j + 1].cint)
- goto lab32;
+ goto done2;
incr(j);
}
-lab32:
+done2:
dump_int(l - k);
if (dumpthings(eqtb[k], l - k))