act_width -> active_width[1].
kern_break().
is_hex().
end_line_char_inactive().
cur_file.
void line_break_ (integer final_widow_penalty)
{
boolean auto_breaking;
void line_break_ (integer final_widow_penalty)
{
boolean auto_breaking;
halfword q, r, s, prevs;
internal_font_number f;
/* small_number j; */
halfword q, r, s, prevs;
internal_font_number f;
/* small_number j; */
init_r_hyf = (prev_graf / 65536L) % 64;
pop_nest();
no_shrink_error_yet = true;
init_r_hyf = (prev_graf / 65536L) % 64;
pop_nest();
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);
-
+ check_shrinkage(left_skip);
+ check_shrinkage(right_skip);
q = left_skip;
r = right_skip;
background[1] = width(q) + width(r);
q = left_skip;
r = right_skip;
background[1] = width(q) + width(r);
line_number(q) = prev_graf + 1;
total_demerits(q) = 0;
link(active) = q;
line_number(q) = prev_graf + 1;
total_demerits(q) = 0;
link(active) = q;
- active_width[1] = background[1];
+ act_width = background[1];
active_width[2] = background[2];
active_width[3] = background[3];
active_width[4] = background[4];
active_width[2] = background[2];
active_width[3] = background[3];
active_width[4] = background[4];
cur_p = link(temp_head);
auto_breaking = true;
cur_p = link(temp_head);
auto_breaking = true;
while ((cur_p != 0) && (link(active) != active))
{
if (is_char_node(cur_p))
{
while ((cur_p != 0) && (link(active) != active))
{
if (is_char_node(cur_p))
{
- active_width[1] = active_width[1] + char_width(f, char_info(f, character(cur_p)));
+ act_width = act_width + char_width(f, char_info(f, character(cur_p)));
cur_p = link(cur_p);
}
while (!(!is_char_node(cur_p)));
cur_p = link(cur_p);
}
while (!(!is_char_node(cur_p)));
case hlist_node:
case vlist_node:
case rule_node:
case hlist_node:
case vlist_node:
case rule_node:
- active_width[1] = active_width[1] + width(cur_p);
+ act_width = act_width + width(cur_p);
break;
case whatsit_node:
break;
case whatsit_node:
- if (is_char_node(prevp))
+ if (is_char_node(prev_p))
try_break(0, unhyphenated);
try_break(0, unhyphenated);
- else if ((mem[prevp].hh.b0 < 9))
+ else if ((mem[prev_p].hh.b0 < 9))
try_break(0, unhyphenated);
try_break(0, unhyphenated);
- else if ((type(prevp) == kern_node) && (subtype(prevp) != explicit))
+ else if ((type(prev_p) == kern_node) && (subtype(prev_p) != explicit))
try_break(0, unhyphenated);
}
try_break(0, unhyphenated);
}
- if ((mem[glue_ptr(cur_p)].hh.b1 != 0) && (mem[glue_ptr(cur_p) + 3].cint != 0))
- {
- glue_ptr(cur_p) = finite_shrink(glue_ptr(cur_p));
- }
-
+ check_shrinkage(glue_ptr(cur_p));
- active_width[1] = active_width[1]+ width(q);
+ act_width = act_width+ width(q);
active_width[2 + stretch_order(q)] = active_width[2 + stretch_order(q)] + stretch(q);
active_width[6] = active_width[6] + shrink(q);
active_width[2 + stretch_order(q)] = active_width[2 + stretch_order(q)] + stretch(q);
active_width[6] = active_width[6] + shrink(q);
break;
case kern_node:
if (subtype(cur_p) == explicit)
break;
case kern_node:
if (subtype(cur_p) == explicit)
- {
- if (!is_char_node(link(cur_p)) && auto_breaking)
- if (type(link(cur_p)) == glue_node)
- try_break(0, unhyphenated);
-
- active_width[1] = active_width[1] + width(cur_p);
- }
- active_width[1] = active_width[1] + width(cur_p);
+ act_width = act_width + width(cur_p);
break;
case ligature_node:
{
f = font(lig_char(cur_p));
break;
case ligature_node:
{
f = font(lig_char(cur_p));
- active_width[1] = active_width[1] + char_width(f, char_info(f, character(lig_char(cur_p))));
+ act_width = act_width + char_width(f, char_info(f, character(lig_char(cur_p))));
- active_width[1] = active_width[1] + disc_width;
+ act_width = act_width + disc_width;
try_break(hyphen_penalty, hyphenated);
try_break(hyphen_penalty, hyphenated);
- active_width[1] = active_width[1] - disc_width;
+ act_width = act_width - disc_width;
}
r = replace_count(cur_p);
s = link(cur_p);
}
r = replace_count(cur_p);
s = link(cur_p);
if (is_char_node(s))
{
f = font(s);
if (is_char_node(s))
{
f = font(s);
- active_width[1] = active_width[1] + char_width(f, char_info(f, character(s)));
+ act_width = act_width + char_width(f, char_info(f, character(s)));
}
else switch(type(s))
{
case ligature_node:
{
f = font(lig_char(s));
}
else switch(type(s))
{
case ligature_node:
{
f = font(lig_char(s));
- active_width[1] = active_width[1] + char_width(f, char_info(f, character(lig_char(s))));
+ act_width = act_width + char_width(f, char_info(f, character(lig_char(s))));
case vlist_node:
case rule_node:
case kern_node:
case vlist_node:
case rule_node:
case kern_node:
- active_width[1] = active_width[1] + width(s);
+ act_width = act_width + width(s);
- auto_breaking = (subtype(cur_p) == 1);
- {
- if (!is_char_node(link(cur_p)) && auto_breaking)
- if (type(link(cur_p)) == glue_node)
- try_break(0, unhyphenated);
-
- active_width[1] = active_width[1] + width(cur_p);
- }
+ auto_breaking = (subtype(cur_p) == after);
+ kern_break();
cur_p = link(cur_p);
lab35:;
}
cur_p = link(cur_p);
lab35:;
}
#ifdef STAT
if (tracing_paragraphs > 0)
print_nl("@secondpass");
#ifdef STAT
if (tracing_paragraphs > 0)
print_nl("@secondpass");
threshold = tolerance;
second_pass = true;
second_pass_count++; /* 96 Feb 9 */
threshold = tolerance;
second_pass = true;
second_pass_count++; /* 96 Feb 9 */
- if ((end_line_char < 0) || (end_line_char > 255))
+ if (end_line_char_inactive())
decr(limit);
else
buffer[limit] = end_line_char;
decr(limit);
else
buffer[limit] = end_line_char;
line = line_stack[index];
if (cur_input.name_field > 17)
line = line_stack[index];
if (cur_input.name_field > 17)
- a_close(input_file[index]);
pop_input();
decr(in_open);
pop_input();
decr(in_open);
- if ((((c >= 48) && (c <= 57)) || ((c >= 97) && (c <= 102))))
if (k + 2 <= limit)
{
cc = buffer[k + 2];
if (k + 2 <= limit)
{
cc = buffer[k + 2];
- if ((((cc >= 48) && (cc <= 57)) || ((cc >= 97) && (cc <= 102))))
- if (c <= 57)
- cur_chr = c - 48;
- else
- cur_chr = c - 87;
-
- if (cc <= 57)
- cur_chr = 16 * cur_chr + cc - 48;
- else
- cur_chr = 16 * cur_chr + cc - 87;
-
buffer[k - 1] = cur_chr;
}
else if (c < 64)
buffer[k - 1] = cur_chr;
}
else if (c < 64)
if (c < 128) /* ? */
{
d = 2;
if (c < 128) /* ? */
{
d = 2;
- if ((((c >= 48) && (c <= 57)) || ((c >= 97) && (c <= 102))))
if (k + 2 <= limit)
{
cc = buffer[k + 2];
if (k + 2 <= limit)
{
cc = buffer[k + 2];
- if ((((cc >= 48) && (cc <= 57)) || ((cc >= 97) && (cc <= 102))))
- if (c <= 57)
- cur_chr = c - 48;
- else
- cur_chr = c - 87;
-
- if (cc <= 57) /* cc may be used without ... */
- cur_chr = 16 * cur_chr + cc - 48;
- else
- cur_chr = 16 * cur_chr + cc - 87;
-
buffer[k - 1] = cur_chr;
}
else if (c < 64)
buffer[k - 1] = cur_chr;
}
else if (c < 64)
- if ((((c >= 48) && (c <= 57)) || ((c >= 97) && (c <= 102))))
if (loc <= limit)
{
cc = buffer[loc];
if (loc <= limit)
{
cc = buffer[loc];
- if ((((cc >= 48) && (cc <= 57)) || ((cc >= 97) && (cc <= 102))))
-
- if (c <= 57)
- cur_chr = c - 48;
- else
- cur_chr = c - 87;
-
- if (cc <= 57)
- cur_chr = 16 * cur_chr + cc - 48;
- else
- cur_chr = 16 * cur_chr + cc - 87;
-
- if (input_ln(input_file[index], true))
+ if (input_ln(cur_file, true))
firm_up_the_line();
else
force_eof = true;
firm_up_the_line();
else
force_eof = true;
- if ((end_line_char < 0) || (end_line_char > 255))
+ if (end_line_char_inactive())
decr(limit);
else
buffer[limit] = end_line_char;
decr(limit);
else
buffer[limit] = end_line_char;
if (interaction > nonstop_mode)
{
if (interaction > nonstop_mode)
{
- if ((end_line_char < 0) || (end_line_char > 255))
+ if (end_line_char_inactive())
incr(limit);
if (limit == start)
incr(limit);
if (limit == start)
prompt_input("*");
limit = last;
prompt_input("*");
limit = last;
- if ((end_line_char < 0) || (end_line_char > 255))
+ if (end_line_char_inactive())
decr(limit);
else
buffer[limit]= end_line_char;
decr(limit);
else
buffer[limit]= end_line_char;
- if ((end_line_char < 0) || (end_line_char > 255))
+ if (end_line_char_inactive())
decr(limit);
else
buffer[limit] = end_line_char;
decr(limit);
else
buffer[limit] = end_line_char;
- if (a_open_in(input_file[index], TEXINPUTPATH))
+ if (a_open_in(cur_file, TEXINPUTPATH))
goto lab30;
end_file_reading();
goto lab30;
end_file_reading();
- cur_input.name_field = a_make_name_string(input_file[index]);
+ cur_input.name_field = a_make_name_string(cur_file);
- if (input_ln(input_file[index], false));
+ if (input_ln(cur_file, false));
- if ((end_line_char < 0) || (end_line_char > 255))
+ if (end_line_char_inactive())
decr(limit);
else
buffer[limit] = end_line_char;
decr(limit);
else
buffer[limit] = end_line_char;
else
b = badness(h - cur_height, active_width[2]);
else
else
b = badness(h - cur_height, active_width[2]);
else
- if (active_width[1] - h > active_width[6])
+ if (act_width - h > active_width[6])
b = awful_bad;
else
b = badness(cur_height - h, active_width[6]);
b = awful_bad;
else
b = badness(cur_height - h, active_width[6]);
print_scaled(page_max_depth);
end_diagnostic(false);
}
print_scaled(page_max_depth);
end_diagnostic(false);
}
}
/* sec 0992 */
void box_error_(eight_bits n)
}
/* sec 0992 */
void box_error_(eight_bits n)
#define mid_line 1
#define skip_blanks 2 + max_char_code // 17
#define new_line 3 + max_char_code + max_char_code // 33
#define mid_line 1
#define skip_blanks 2 + max_char_code // 17
#define new_line 3 + max_char_code + max_char_code // 33
+/* sec 0304 */
+#define cur_file input_file[index]
/* sec 0305 */
#define skipping 1
#define defining 2
/* sec 0305 */
#define skipping 1
#define defining 2
case (a) + sub_mark: \
case (a) + letter: \
case (a) + other_char
case (a) + sub_mark: \
case (a) + letter: \
case (a) + other_char
+/* sec 0352 */
+#define is_hex(a) \
+ (((a >= '0') && (a <= '9')) || ((a >= 'a') && (a <= 'f')))
+#define hex_to_cur_chr() \
+do \
+{ \
+ if (c <= '9') \
+ cur_chr = c - '0'; \
+ else \
+ cur_chr = c - 'a' + 10; \
+ \
+ if (cc <= '9') \
+ cur_chr = 16 * cur_chr + cc - '0'; \
+ else \
+ cur_chr = 16 * cur_chr + cc - 'a' + 10; \
+} \
+while (0)
+/* sec 0360 */
+#define end_line_char_inactive() \
+ (end_line_char < 0) || (end_line_char > 255)
/* sec 0358 */
/* sec 0371 */
#define store_new_token(a) \
/* sec 0358 */
/* sec 0371 */
#define store_new_token(a) \
#define delta_node 2
/* sec 0823 */
#define do_all_six(a) a(1); a(2); a(3); a(4); a(5); a(6)
#define delta_node 2
/* sec 0823 */
#define do_all_six(a) a(1); a(2); a(3); a(4); a(5); a(6)
+/* sec 0825 */
+#define check_shrinkage(s) \
+do \
+{ \
+ if ((shrink_order(s) != normal) && (shrink(s) != 0))\
+ s = finite_shrink(s); \
+} \
+while (0)
/* sec 0829 */
#define copy_to_cur_active(a) cur_active_width[a] = active_width[a]
/* sec 0832 */
/* sec 0829 */
#define copy_to_cur_active(a) cur_active_width[a] = active_width[a]
/* sec 0832 */
#define downdate_width(a) cur_active_width[(a)] = cur_active_width[(a)] - mem[prev_r + (a)].cint
/* sec 0861 */
#define update_active(a) active_width[(a)] = active_width[(a)] + mem[r + (a)].cint
#define downdate_width(a) cur_active_width[(a)] = cur_active_width[(a)] - mem[prev_r + (a)].cint
/* sec 0861 */
#define update_active(a) active_width[(a)] = active_width[(a)] + mem[r + (a)].cint
+/* sec 0866 */
+#define act_width active_width[1]
+#define kern_break() \
+do \
+{ \
+ if (!is_char_node(link(cur_p)) && auto_breaking) \
+ if (type(link(cur_p)) == glue_node) \
+ try_break(0, unhyphenated); \
+ \
+ act_width = act_width + width(cur_p); \
+} \
+while (0)
/* sec 0877 */
#define next_break prev_break
/* sec 0908 */
/* sec 0877 */
#define next_break prev_break
/* sec 0908 */