void print_cs(int p) { str_number t= cs_text(p); if(p<hash_base){ if(p==null_cs){ tprint_esc("csname"); tprint_esc("endcsname"); print_char(' '); }else{ tprint_esc("IMPOSSIBLE."); } }else if((p>=undefined_control_sequence)&& ((p<=eqtb_size)||p> eqtb_size+hash_extra)){ tprint_esc("IMPOSSIBLE."); }else if(t>=str_ptr){ tprint_esc("NONEXISTENT."); }else{ if(is_active_cs(t)){ print(active_cs_value(t)); }else{ print_esc(t); if(single_letter(t)){ if(get_cat_code(cat_code_table_par,pool_to_unichar(str_string(t)))==letter_cmd) print_char(' '); }else{ print_char(' '); } } } }
void sprint_cs(pointer p) { str_number t; if(p==null_cs){ tprint_esc("csname"); tprint_esc("endcsname"); }else{ t= cs_text(p); if(is_active_cs(t)) print(active_cs_value(t)); else print_esc(t); } }
void print_mark(int p) { print_char('{'); if((p<(int)fix_mem_min)||(p> (int)fix_mem_end)) tprint_esc("CLOBBERED."); else show_token_list(token_link(p),null,max_print_line-10); print_char('}'); }
void file_warning(void) { halfword p= save_ptr; int l= cur_level; int c= cur_group; int i; save_ptr= cur_boundary; while(grp_stack[in_open]!=save_ptr){ decr(cur_level); tprint_nl("Warning: end of file when "); print_group(true); tprint(" is incomplete"); cur_group= save_level(save_ptr); save_ptr= save_value(save_ptr); } save_ptr= p; cur_level= (quarterword)l; cur_group= (group_code)c; p= cond_ptr; l= if_limit; c= cur_if; i= if_line; while(if_stack[in_open]!=cond_ptr){ tprint_nl("Warning: end of file when "); print_cmd_chr(if_test_cmd,cur_if); if(if_limit==fi_code) tprint_esc("else"); print_if_line(if_line); tprint(" is incomplete"); if_line= if_line_field(cond_ptr); cur_if= if_limit_subtype(cond_ptr); if_limit= if_limit_type(cond_ptr); cond_ptr= vlink(cond_ptr); } cond_ptr= p; if_limit= l; cur_if= c; if_line= i; print_ln(); if(tracing_nesting_par> 1) show_context(); if(history==spotless) history= warning_issued; }
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 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; } } }