void tex::print_totals () { print_scaled(page_total); print_plus(2, null_str); print_plus(3, "fil"); print_plus(4, "fill"); print_plus(5, "filll"); if (page_shrink != 0) { print(" minus "); print_scaled(page_shrink); } }
void tex::show_insertion(ptr p) { print_esc("insert"); print_int(tex::subtype(p)); print(", natural size "); print_scaled(ins_height(p)); print("; split("); print_spec(split_top_ptr(p), null_str); print(","); print_scaled(ins_depth(p)); print("); float cost "); print_int(float_cost(p)); node_list_display(ins_ptr(p)); }
void tex::show_kern(ptr p) { if (subtype(p) != MU_GLUE) { print_esc("kern"); if (subtype(p) != NORMAL) print(" "); print_scaled(kern_width(p)); if (subtype(p) == ACC_KERN) print(" (for accent)"); } else { print_esc("mkern"); print_scaled(kern_width(p)); print("mu"); } }
void tex::show_page_stats(int b, int pi, int c) { begin_diagnostic(); print_nl("%"); print(" t="); print_totals(); print(" g="); print_scaled(page_goal); print(" b="); if (b == AWFUL_BAD) { print_char('*'); } else { print_int(b); } print(" p="); print_int(pi); print(" c="); if (c == AWFUL_BAD) { print("*"); } else { print_int(c); } if (c <= least_page_cost) { print("#"); } end_diagnostic(FALSE); }
void print_rule_dimen(scaled d) { if(is_running(d)) print_char('*'); else print_scaled(d); }
void tex::freeze_page_specs(int s) { page_contents = s; page_goal = vsize; page_max_depth = max_depth; page_depth = 0; do_all_six(set_page_so_far_zero); least_page_cost = AWFUL_BAD; if (tracing_pages > 0) { begin_diagnostic(); print_nl("%% goal height="); print_scaled(page_goal); print(", max depth="); print_scaled(page_max_depth); end_diagnostic(FALSE); } }
void tex::print_plus(int s, str o) { if (page_so_far[s] != 0) { print(" plus "); print_scaled(page_so_far[s]); print(o); } }
/* sec 0985 */ void print_plus (int i, const char * s) { if (page_so_far[i] != 0) { prints(" plus "); print_scaled(page_so_far[i]); prints(s); } }
void tex::show_split(int n, scal w, ptr q) { begin_diagnostic(); print_nl("% split"); print_int(n); print(" to "); print_scaled(w); print_char(','); print_scaled(best_height_plus_depth); print(" p="); if (q == null) { print_int(EJECT_PENALTY); } else if (type(q) == PENALTY_NODE) { print_int(penalty(q)); } else { print("0"); } end_diagnostic(FALSE); }
void tex::show_cur_page() { ptr p, q; int t; if (page_head == page_tail) return; print_nl("### current page:"); if (output_active) print(" (held over for next output)"); show_box(link(page_head)); if (page_contents > EMPTY) { print_nl("total height "); print_totals(); print_nl(" goal height "); print_scaled(page_goal); p = link(page_ins_head); while (p != page_ins_head) { print_ln(); print_esc("insert"); t = subtype(p); print_int(t); print(" adds "); t = x_over_n(page_ins_height(p), 1000) * count(t); print_scaled(t); if (type(p) == SPLIT_UP) { q = page_head; t = 0; do { q = link(q); if (type(q) == INS_NODE && subtype(q) == subtype(p)) incr(t); } while (q != broken_ins(p)); print(", #"); print_int(t); print(" might split"); } p = link(p); } } }
void tex::print_spec(ptr p, str s) { print_scaled(glue_width(p)); print(s); if (stretch(p) != 0) { print(" plus "); print_glue(stretch(p), stretch_order(p), s); } if (shrink(p) != 0) { print(" minus "); print_glue(shrink(p), shrink_order(p), s); } }
void tex::show_math(ptr p) { print_esc("math"); if (subtype(p) == BEFORE) { print("on"); } else { print("off"); } if (math_width(p) != 0) { print(", surrounded "); print_scaled(math_width(p)); } }
void print_glue(scaled d,int order,const char*s) { print_scaled(d); if((order<normal)||(order> filll)){ tprint("foul"); }else if(order> normal){ tprint("fi"); while(order> sfi){ print_char('l'); decr(order); } }else if(s!=NULL){ tprint(s); } }
void tex::show_box1(ptr p) { if (tex::type(p) == HLIST_NODE) print_esc("h"); else if (tex::type(p) == VLIST_NODE) print_esc("v"); else print_esc("unset"); print("box("); print_scaled(box_height(p)); print("+") ; print_scaled(box_depth(p)); print(")x") ; print_scaled(box_width(p)); if (tex::type(p) == UNSET_NODE) { if (unset_span_count(p) != MIN_QUARTERWORD) { print(" ("); print_int(unset_span_count(p)+1); print(" columns)"); } if (unset_stretch(p) != 0) { print(", stretch "); print_glue(unset_stretch(p), glue_order(p), null_str); } if (unset_shrink(p) != 0) { print(", shrink "); print_glue(unset_shrink(p), glue_sign(p), null_str); } } else { show_glue_set(p); if (shift_amount(p) != 0) { print(", shifted "); print_scaled(shift_amount(p)); } } node_list_display(list_ptr(p)); }
void tex::print_glue(scal d, int o, str s) { print_scaled(d); if (o < NORMAL || o > FILLL) { print("foul"); } else if (o > NORMAL) { print("fil"); while (o > FIL) { print("l"); decr(o); } } else if (s) { print(s); } }
void print_spec(int p,const char*s) { if(p<0){ print_char('*'); }else{ print_scaled(width(p)); if(s!=NULL) tprint(s); if(stretch(p)!=0){ tprint(" plus "); print_glue(stretch(p),stretch_order(p),s); } if(shrink(p)!=0){ tprint(" minus "); print_glue(shrink(p),shrink_order(p),s); } } }
void print_font_identifier(internal_font_number f) { str_number fonttext; fonttext= font_id_text(f); if(fonttext> 0){ print_esc(fonttext); }else{ tprint_esc("FONT"); print_int(f); } if(tracing_fonts_par> 0){ tprint(" ("); print_font_name(f); if(font_size(f)!=font_dsize(f)){ tprint("@"); print_scaled(font_size(f)); tprint("pt"); } print_char(')'); } }
void tex::show_activities () { int a; int m; list *p; *nest_ptr = cur_list; print_nl(null_str); print_ln(); for (p = nest_ptr; p >= nest; decr(p)) { m = p->mode_field; a = p->aux_field; print_nl("### "); print_mode(m); print(" entered at line "); print_int(abs(p->ml_field)); if (m == HMODE) { if (p->lhm_field != 2 || p->rhm_field != 3) { print(" (hyphenmin "); print_int(p->lhm_field); print(","); print_int(p->rhm_field); print(")"); } } if (p->ml_field < 0) { print(" (\\output routine)"); } if (p == nest) { show_cur_page(); if (link(contrib_head) != null) print_nl("### recent contributions:"); } show_box(link(p->head_field)); switch (abs(m) / (MAX_COMMAND + 1)) { case 0: print_nl("prevdepth "); if (a <= IGNORE_DEPTH) { print("ignored"); } else { print_scaled(a); } if (p->pg_field != 0) { print(", prevgraf "); print_int(p->pg_field); print(" line"); if (p->pg_field != 1) print("s"); } break; case 1: print_nl("spacefactor "); print_int(a); if (m > 0 && p->clang_field > 0) { print(", current language "); print_int(p->clang_field); } break; case 2: if (a != null) { print_nl("this will be denominator of:"); show_box(a); } break; } } }
void tex::print_rule_dimen(scal d) { if (is_running(d)) print("*"); else print_scaled(d); }
void show_activities(void) { /*tex Index into |nest|: */ int p; /*tex The mode: */ int m; /*tex For showing the current page: */ halfword q, r; /*tex Ditto: */ int t; tprint_nl(""); print_ln(); for (p = nest_ptr; p >= 0; p--) { m = nest[p].mode_field; tprint_nl("### "); print_mode(m); tprint(" entered at line "); print_int(abs(nest[p].ml_field)); if (nest[p].ml_field < 0) tprint(" (\\output routine)"); if (p == 0) { /*tex Show the status of the current page */ if (page_head != page_tail) { tprint_nl("### current page:"); if (output_active) tprint(" (held over for next output)"); show_box(vlink(page_head)); if (page_contents > empty) { tprint_nl("total height "); print_totals(); tprint_nl(" goal height "); print_scaled(page_goal); r = vlink(page_ins_head); while (r != page_ins_head) { print_ln(); tprint_esc("insert"); t = subtype(r); print_int(t); tprint(" adds "); if (count(t) == 1000) t = height(r); else t = x_over_n(height(r), 1000) * count(t); print_scaled(t); if (type(r) == split_up_node) { q = page_head; t = 0; do { q = vlink(q); if ((type(q) == ins_node) && (subtype(q) == subtype(r))) incr(t); } while (q != broken_ins(r)); tprint(", #"); print_int(t); tprint(" might split"); } r = vlink(r); } } } if (vlink(contrib_head) != null) tprint_nl("### recent contributions:"); } show_box(vlink(nest[p].head_field)); /*tex Show the auxiliary field, |a|. */ switch (abs(m) / (max_command_cmd + 1)) { case 0: tprint_nl("prevdepth "); if (nest[p].prev_depth_field <= ignore_depth) tprint("ignored"); else print_scaled(nest[p].prev_depth_field); if (nest[p].pg_field != 0) { tprint(", prevgraf "); print_int(nest[p].pg_field); if (nest[p].pg_field != 1) tprint(" lines"); else tprint(" line"); } break; case 1: tprint_nl("spacefactor "); print_int(nest[p].space_factor_field); break; case 2: if (nest[p].incompleat_noad_field != null) { tprint("this will be denominator of:"); show_box(nest[p].incompleat_noad_field); } break; } } }