case no_print:
case pseudo:
case new_string:
+ do_nothing();
break;
default:
break;
case no_print:
+ do_nothing();
break;
case pseudo:
return;
}
- if ((s == new_line_char))
+ if (s == new_line_char)
if (selector < pseudo)
{
print_ln();
return;
}
- nl = new_line_char;
- new_line_char = -1;
+ nl = new_line_char;
+ new_line_char = -1;
- /* translate ansi to dos 850 */
- if (!show_in_hex && s < 256 && s >= 32)
+ /* translate ansi to dos 850 */
+ if (!show_in_hex && s < 256 && s >= 32)
+ {
+ if (show_in_dos && s > 127)
{
- if (show_in_dos && s > 127)
+ if (wintodos[s - 128] > 0)
{
- if (wintodos[s - 128] > 0)
- {
- print_char(wintodos[s - 128]);
- }
- else
- {
- j = str_start[s];
-
- while (j < str_start[s + 1])
- {
- print_char(str_pool[j]);
- incr(j);
- }
- }
+ print_char(wintodos[s - 128]);
}
else
{
- print_char(s); /* don't translate to hex */
+ j = str_start[s];
+
+ while (j < str_start[s + 1])
+ {
+ print_char(str_pool[j]);
+ incr(j);
+ }
}
}
else
- { /* not just a character */
- j = str_start[s];
+ {
+ print_char(s); /* don't translate to hex */
+ }
+ }
+ else
+ { /* not just a character */
+ j = str_start[s];
- while (j < str_start[s + 1])
- {
- print_char(str_pool[j]);
- incr(j);
- }
+ while (j < str_start[s + 1])
+ {
+ print_char(str_pool[j]);
+ incr(j);
}
+ }
- new_line_char = nl; /* restore eol */
- return;
+ new_line_char = nl; /* restore eol */
+ return;
}
}
}
}
}
/* string version print. */
-void print_string_ (const char *s)
+void prints_ (const char *s)
{
while (*s > 0)
print_char(*s++);
((file_offset > 0) && (selector >= log_only)))
print_ln();
- print_string(s);
+ prints(s);
}
/* sec 0063 */
void print_esc (const char * s)
if (c < 256)
print(c);
- print_string(s);
+ prints(s);
}
/* sec 0064 */
void print_the_digs_ (eight_bits k)
print_esc("scriptscriptfont");
}
/* sec 1355 */
-void print_write_whatsit_(str_number s, pointer p)
+void print_write_whatsit_(const char * s, pointer p)
{
- print_esc("");
- print(s);
+ print_esc(s);
if (write_stream(p) < 16)
print_int(write_stream(p));
do
{
decr(help_ptr);
- print_string(help_line[help_ptr]);
+ prints(help_line[help_ptr]);
print_ln();
}
while (!(help_ptr == 0));
{
error_count = 0;
interaction = 0 + c - 81; /* Q = 0, R = 1, S = 2, T = 3 */
- print_string("OK, entering ");
+ prints("OK, entering ");
switch (c)
{
break;
}
- print_string("...");
+ prints("...");
print_ln();
update_terminal();
return;
} /* end of switch analysing response character */
{
- print_string("Type <return> to proceed, S to scroll future error messages,");
+ prints("Type <return> to proceed, S to scroll future error messages,");
print_nl("R to run without stopping, Q to run quietly,");
print_nl("I to insert something, ");
if (base_ptr > 0)
- print_string("E to edit your file,");
+ prints("E to edit your file,");
if (deletions_allowed)
print_nl("1 or ... or 9 to ignore the next 1 to 9 tokens of input,");
{
normalize_selector();
print_err("TeX capacity exceeded, sorry [");
- print_string(s);
+ prints(s);
print_char('=');
print_int(n);
print_char(']');
if (history < error_message_issued)
{
print_err("This can't happen (");
- print_string(s);
+ prints(s);
print_char(')');
help1("I'm broken. Please show this to someone who can fix can fix");
}
/* sec 0091 */
void int_error_ (integer n)
{
- print_string(" (");
+ prints(" (");
print_int(n);
print_char(')');
error();
break;
case end_match:
- print_string("->");
+ prints("->");
break;
default:
switch (scanner_status)
{
case defining:
- print_string("definition");
+ prints("definition");
p = def_ref;
break;
case matching:
- print_string("argument");
+ prints("argument");
p = temp_head;
break;
case aligning:
- print_string("preamble");
+ prints("preamble");
p = hold_head;
break;
case absorbing:
- print_string("text");
+ prints("text");
p = def_ref;
break;
}
{
q = p + node_size(p);
- while ((mem[q].hh.rh == empty_flag))
+ while (is_empty(q))
{
t = rlink(q);
{
if (trace_flag)
{
- sprintf(log_line, "mem_min %d, mem_start %d, block_size %d\n", mem_min, mem_start, block_size);
+ sprintf(log_line, "mem_min %lld, mem_start %ld, block_size %d\n", mem_min, mem_start, block_size);
show_line(log_line, 0);
}
return 0;
}
- add_variable_space (block_size); /* now to be found in itex.c */
- goto restart; /* go try get_node again */
+ add_variable_space (block_size);
+ goto restart; /* go try get_node again */
found:
link(r) = 0;
case mark_node:
case adjust_node:
case unset_node:
- print_string("[]");
+ prints("[]");
break;
case rule_node:
print_char('|');
/* sec 0176 */
void print_rule_dimen(scaled d)
{
- if ((d == -1073741824L)) /* - 2^30 */
+ if (is_running(d))
print_char('*');
else
print_scaled(d);
print_scaled(d);
if ((order < normal) || (order > filll))
- print_string("foul");
+ prints("foul");
else if (order > 0)
{
- print_string("fil");
+ prints("fil");
while (order > 1)
{
}
}
else if (*s != '\0')
- print_string(s);
+ prints(s);
}
/* sec 0178 */
void print_spec_(integer p, char * s)
print_scaled(width(p));
if (*s != '\0')
- print_string(s);
+ prints(s);
if (stretch(p) != 0)
{
- print_string("plus");
+ prints("plus");
print_glue(stretch(p), stretch_order(p), s);
}
if (shrink(p) != 0)
{
- print_string("minus");
+ prints("minus");
print_glue(shrink(p), shrink_order(p), s);
}
}
if ((pool_ptr - str_start[str_ptr]) >= depth_threshold)
{
if (math_type(p) != 0)
- print_string(" []");
+ prints(" []");
}
else
{
{
print_ln();
print_current_string();
- print_string("{}");
+ prints("{}");
}
else
show_info();
print_esc("scriptscriptstyle");
break;
default:
- print_string("Unknown style!");
+ prints("Unknown style!");
break;
}
}
break;
default:
- print_string("[unknown glue parameter!]");
+ prints("[unknown glue parameter!]");
break;
}
}
if (cur_length > depth_threshold)
{
if (p != 0) /* fixed 94/Mar/23 BUG FIX NOTE: still not fixed in 3.14159 ! */
- print_string(" []");
+ prints(" []");
return;
}
if (p > mem_end)
{
- print_string("Bad link, display aborted.");
+ prints("Bad link, display aborted.");
return;
}
if (n > breadth_max)
{
- print_string("etc.");
+ prints("etc.");
return;
}
print_esc("v");
else print_esc("unset");
- print_string("box(");
+ prints("box(");
print_scaled(height(p));
print_char('+');
print_scaled(depth(p));
- print_string(")x");
+ prints(")x");
print_scaled(width(p));
if (type(p) == unset_node)
{
if (span_count(p) != 0)
{
- print_string(" (");
+ prints(" (");
print_int(span_count(p) + 1);
- print_string(" columns)");
+ prints(" columns)");
}
if (glue_stretch(p) != 0)
{
- print_string(", stretch ");
+ prints(", stretch ");
print_glue(glue_stretch(p), glue_order(p), "");
}
if (glue_shrink(p) != 0)
{
- print_string(", shrink ");
+ prints(", shrink ");
print_glue(glue_shrink(p), glue_sign(p), "");
}
}
if ((g != 0.0) && (glue_sign(p) != 0))
{
- print_string(", glue set ");
+ prints(", glue set ");
if (glue_sign(p) == shrinking)
- print_string("- ");
+ prints("- ");
if (fabs(g)> 20000.0)
{
if (g > 0.0)
print_char('>');
else
- print_string("< -");
+ prints("< -");
print_glue(20000 * unity, glue_order(p), "");
}
if (shift_amount(p) != 0)
{
- print_string(", shifted ");
+ prints(", shifted ");
print_scaled(shift_amount(p));
}
}
- {
- {
- str_pool[pool_ptr] = 46;
- incr(pool_ptr);
- }
- show_node_list(mem[p + 5].hh.rh);
- decr(pool_ptr);
- }
+ node_list_display(list_ptr(p));
}
break;
print_rule_dimen(height(p));
print_char('+');
print_rule_dimen(depth(p));
- print_string(")x");
+ prints(")x");
print_rule_dimen(width(p));
}
break;
{
print_esc("insert");
print_int(subtype(p));
- print_string(", natural size ");
+ prints(", natural size ");
print_scaled(height(p));
- print_string("; split(");
+ prints("; split(");
print_spec(split_top_ptr(p), "");
print_char(',');
print_scaled(depth(p));
- print_string("); float cost ");
+ prints("); float cost ");
print_int(float_cost(p));
- {
- {
- str_pool[pool_ptr] = 46;
- incr(pool_ptr);
- }
- show_node_list(mem[p + 4].hh.lh);
- decr(pool_ptr);
- }
+ node_list_display(ins_ptr(p));
}
break;
- case 8:
+
+ case whatsit_node:
switch (subtype(p))
{
case open_node:
{
- print_write_whatsit(1279, p); /* debug # (-1 to exit): */
+ print_write_whatsit("openout", p);
print_char('=');
print_file_name(open_name(p), open_area(p), open_ext(p));
}
case write_node:
{
- print_write_whatsit(591, p); /* write */
+ print_write_whatsit("write", p);
print_mark(write_tokens(p));
}
break;
case close_node:
- print_write_whatsit(1280, p); /* closeout */
+ print_write_whatsit("closeout", p);
break;
case special_node:
{
print_esc("setlanguage");
print_int(what_lang(p));
- print_string(" (hyphenmin ");
+ prints(" (hyphenmin ");
print_int(what_lhm(p));
print_char(',');
print_int(what_rhm(p));
break;
default:
- print_string("whatsit?");
+ prints("whatsit?");
break;
}
break;
else if (subtype(p) == x_leaders)
print_char('x');
- print_string("leaders ");
-
+ prints("leaders ");
print_spec(glue_ptr(p), "");
- {
- {
- str_pool[pool_ptr] = 46;
- incr(pool_ptr);
- }
- show_node_list(mem[p + 1].hh.rh);
- decr(pool_ptr);
- }
+ node_list_display(leader_ptr(p));
}
else
{
print_scaled(width(p));
if (subtype(p) == acc_kern)
- print_string(" (for accent)");
+ prints(" (for accent)");
}
else
{
print_esc("mkern");
print_scaled(width(p));
- print_string("mu");
+ prints("mu");
}
break;
print_esc("math");
if (subtype(p) == before)
- print_string("on");
+ prints("on");
else
- print_string("off");
+ prints("off");
if (width(p) != 0)
{
- print_string(", surrounded ");
+ prints(", surrounded ");
print_scaled(width(p));
}
}
case ligature_node:
{
print_font_and_char(lig_char(p));
- print_string("(ligature ");
+ prints("(ligature ");
if (subtype(p) > 1)
print_char('|');
if (replace_count(p) > 0)
{
- print_string(" replacing ");
+ prints(" replacing ");
print_int(replace_count(p));
}
- {
- {
- str_pool[pool_ptr] = 46;
- incr(pool_ptr);
- }
- show_node_list(mem[p + 1].hh.lh);
- decr(pool_ptr);
- }
- {
- str_pool[pool_ptr]= 124;
- incr(pool_ptr);
- }
- show_node_list(mem[p + 1].hh.rh);
+ node_list_display(pre_break(p));
+ append_char('|');
+ show_node_list(post_break(p));
decr(pool_ptr);
}
break;
case adjust_node:
{
print_esc("vadjust");
- {
- {
- str_pool[pool_ptr] = 46;
- incr(pool_ptr);
- }
- show_node_list(mem[p + 1].cint);
- decr(pool_ptr);
- }
+ node_list_display(adjust_ptr(p));
}
break;
print_esc("fraction, thickness ");
if (thickness(p) == 1073741824L) /* 2^30 */
- print_string("= default");
+ prints("= default");
else
print_scaled(thickness(p));
if ((small_fam(left_delimiter(p)) != 0) || (small_char(left_delimiter(p)) != 0) ||
(large_fam(left_delimiter(p)) != 0) || (large_char(left_delimiter(p)) != 0))
{
- print_string(", left-delimiter ");
+ prints(", left-delimiter ");
print_delimiter(left_delimiter(p));
}
if ((small_fam(right_delimiter(p)) != 0) || (small_char(right_delimiter(p)) != 0) ||
(large_fam(right_delimiter(p)) != 0) || (large_char(right_delimiter(p)) != 0))
{
- print_string(", right-delimiter ");
+ prints(", right-delimiter ");
print_delimiter(right_delimiter(p));
}
break;
default:
- print_string("Unknown node type!");
+ prints("Unknown node type!");
break;
}
p = link(p);