Date: Fri, 26 Feb 88 14:24:27 +1300 From: Mark Davies Subject: Common TeX Patches A few months ago I posted some patches to Common TeX to the usenet group comp.text. I had hoped that they would get sufficiently wide distribution [international email costs from this part of the world are not cheap, so wanted to cover a lot of people with one posting and news (via aus) is half the cost of email (states direct)]. I have just received some mail from Joe Weening (jsw@sail.stanford.edu) suggesting that I also send the patches to TeXhax so, damn the expense, here they are. also included at the bottom is a patch that Joe Weening sent me. cheers mark -- domainised: mark@comp.vuw.ac.nz bang form: ...!uunet!vuwcomp!mark --- What follows are context diffs of the changes I have made to Common TeX 2.1 in an attempt to get it to pass the trip test. It includes: o Several bug fixes, most importantly one in def.c where the function trap_zero_glue was not getting called due to a missing pair of (). o The changes made to TeX in version 2.1 to correct anomalies in discretionary breaks. o Various fixes of spelling/punctuation/grammar in the error messages Common TeX with these changes almost passes the version of the Trip Test distributed with the UNIX TeX 2.1 release (the dvi file produced is fine, but there are a couple of discrepancies in the log file that I am not sure of yet). NOTE: Your line numbers will probably differ as I have been adding comments to my version but have not included them here as they would more than triple the size of this diff. diff -c Common.TeX.orig/box.c Common.TeX/box.c *** Common.TeX.orig/box.c Tue Jul 28 17:40:53 1987 --- Common.TeX/box.c Tue Dec 1 00:08:03 1987 *************** *** 264,270 print_char('*'); else { print_scaled(width(p)); ! print(s); if (stretch(p) != 0) { print(" plus "); print_glue(stretch(p), stretch_order(p), s); --- 264,270 ----- print_char('*'); else { print_scaled(width(p)); ! if (s) print(s); if (stretch(p) != 0) { print(" plus "); print_glue(stretch(p), stretch_order(p), s); diff -c Common.TeX.orig/boxlists.c Common.TeX/boxlists.c *** Common.TeX.orig/boxlists.c Tue Jul 28 17:40:54 1987 --- Common.TeX/boxlists.c Tue Nov 17 21:27:58 1987 *************** *** 665,673 you_cant(); help_delete_last(); if (cur_chr == KERN_NODE) ! help_line[1] = "Try `I\\kern-\\lastkern instead."; else if (cur_chr != GLUE_NODE) ! help_line[1] = "Perhaps you can make an output routine do it."; error(); } } else if (!is_char_node(tail) && type(tail) == cur_chr) { --- 665,673 ----- you_cant(); help_delete_last(); if (cur_chr == KERN_NODE) ! help_line[1] = "Try `I\\kern-\\lastkern' instead."; else if (cur_chr != GLUE_NODE) ! help_line[1] = "Perhaps you can make the output routine do it."; error(); } } else if (!is_char_node(tail) && type(tail) == cur_chr) { diff -c Common.TeX.orig/cmds.c Common.TeX/cmds.c *** Common.TeX.orig/cmds.c Tue Jul 28 17:40:55 1987 --- Common.TeX/cmds.c Fri Dec 4 14:34:44 1987 *************** *** 690,696 break; case SCROLL_MODE: ! print_esc("scroll"); break; default: --- 690,696 ----- break; case SCROLL_MODE: ! print_esc("scrollmode"); break; default: *************** *** 747,753 break; case LONG_CALL: ! print("long macro"); break; case OUTER_CALL: --- 747,753 ----- break; case LONG_CALL: ! print_esc("long macro"); break; case OUTER_CALL: *************** *** 1195,1201 primitive("noalign", NO_ALIGN, 0); primitive("noexpand", NO_EXPAND, 0); eq_type(FROZEN_DONT_EXPAND) = DONT_EXPAND; ! text(FROZEN_DONT_EXPAND) = make_string_given("notexpanded"); primitive("nonscript", NON_SCRIPT, 0); primitive("omit", OMIT, 0); primitive("parshape", SET_SHAPE, 0); --- 1195,1201 ----- primitive("noalign", NO_ALIGN, 0); primitive("noexpand", NO_EXPAND, 0); eq_type(FROZEN_DONT_EXPAND) = DONT_EXPAND; ! text(FROZEN_DONT_EXPAND) = make_string_given("notexpanded:"); primitive("nonscript", NON_SCRIPT, 0); primitive("omit", OMIT, 0); primitive("parshape", SET_SHAPE, 0); diff -c Common.TeX.orig/def.c Common.TeX/def.c *** Common.TeX.orig/def.c Tue Jul 28 17:40:56 1987 --- Common.TeX/def.c Mon Dec 7 11:28:08 1987 *************** *** 563,569 if (p < GLUE_VAL) { word_def(l, cur_val); } else { ! trap_zero_glue; def(l, GLUE_REF, (ptr) cur_val); } } --- 563,569 ----- if (p < GLUE_VAL) { word_def(l, cur_val); } else { ! trap_zero_glue(); def(l, GLUE_REF, (ptr) cur_val); } } *************** *** 602,608 scan_optional_equals(); scan_int(); if (cur_val < 0) { ! print_err("Bad"); print_esc("prevgraf"); help_prevgraf(); int_error(cur_val); --- 602,608 ----- scan_optional_equals(); scan_int(); if (cur_val < 0) { ! print_err("Bad "); print_esc("prevgraf"); help_prevgraf(); int_error(cur_val); *************** *** 813,819 use_err_help = TRUE; else if (long_help_seen) help_err_msg(); ! else help_poirot(); error(); use_err_help = FALSE; } --- 818,828 ----- use_err_help = TRUE; else if (long_help_seen) help_err_msg(); ! else { ! if (interaction < ERROR_STOP_MODE) ! long_help_seen = TRUE; ! help_poirot(); ! } error(); use_err_help = FALSE; } *************** *** 915,924 help_missing_cs () { help5("Please don't say `\\def cs{...}', say `\\def\\cs{...}'.", ! "I've inserted an innaccessible control sequence so that your", "definition will be completed without mixing me up too badly.", "You can recover graciously from this error, if you're", ! "careful; see excersize 27.2 in the TeXbook."); } help_prefix () --- 928,937 ----- help_missing_cs () { help5("Please don't say `\\def cs{...}', say `\\def\\cs{...}'.", ! "I've inserted an inaccessible control sequence so that your", "definition will be completed without mixing me up too badly.", "You can recover graciously from this error, if you're", ! "careful; see exercise 27.2 in The TeXbook."); } help_prefix () *************** *** 971,977 help_font_magnification () { ! help1("The magnification ratio must be between 1 and 32768"); } help_mag() --- 984,990 ----- help_font_magnification () { ! help1("The magnification ratio must be between 1 and 32768."); } help_mag() diff -c Common.TeX.orig/eq.c Common.TeX/eq.c *** Common.TeX.orig/eq.c Tue Jul 28 17:40:56 1987 --- Common.TeX/eq.c Mon Nov 30 23:48:57 1987 *************** *** 380,386 break; case DISPLAY_INDENT_CODE: ! print_esc("diplayindent"); break; case DISPLAY_WIDTH_CODE: --- 380,386 ----- break; case DISPLAY_INDENT_CODE: ! print_esc("displayindent"); break; case DISPLAY_WIDTH_CODE: diff -c Common.TeX.orig/error.c Common.TeX/error.c *** Common.TeX.orig/error.c Tue Jul 28 17:40:57 1987 --- Common.TeX/error.c Tue Dec 1 00:22:44 1987 *************** *** 328,335 help_wounded () { ! help2("One of your earlier faux pas has wounded me deeply,", ! "so I'm barely conscious. Please fix it and try again."); } help_interrupt () --- 328,335 ----- help_wounded () { ! help2("One of your faux pas seems to have wounded me deeply...", ! "in fact, I'm barely conscious. Please fix it and try again."); } help_interrupt () *************** *** 336,340 { help3("You rang?", "Try to insert some instructions for me (e.g., `I\\showlists),", ! "unless you just want to jump out by typing `X'."); } --- 336,340 ----- { help3("You rang?", "Try to insert some instructions for me (e.g., `I\\showlists),", ! "unless you just want to quit by typing `X'."); } diff -c Common.TeX.orig/eval.c Common.TeX/eval.c *** Common.TeX.orig/eval.c Tue Jul 28 17:40:57 1987 --- Common.TeX/eval.c Tue Nov 17 21:25:53 1987 *************** *** 718,722 help4("Sorry, but I'm not programmed to handle this case;", "I'll just pretend that you didn't ask for it.", "If you're in the wrong mode, you might be able to", ! "return to the right one by typing `I}' or `I\par'."); } --- 718,722 ----- help4("Sorry, but I'm not programmed to handle this case;", "I'll just pretend that you didn't ask for it.", "If you're in the wrong mode, you might be able to", ! "return to the right one by typing `I}' or `I$' or `I\\par'."); } diff -c Common.TeX.orig/expand.c Common.TeX/expand.c *** Common.TeX.orig/expand.c Tue Jul 28 17:40:58 1987 --- Common.TeX/expand.c Wed Dec 2 14:27:01 1987 *************** *** 442,448 { help6("I've run across a `}' that doesn't seem to match anything.", "For example, `\\def\\a#1{...}' and `\\a}' would produce", ! "this error. If you simply proceed nw, the `\\par' that", "I've just inserted will cause me to report a runaway", "argument that might be the root of the problem. But if", "your `}' was spurious, just type `2' and it will go away."); --- 482,488 ----- { help6("I've run across a `}' that doesn't seem to match anything.", "For example, `\\def\\a#1{...}' and `\\a}' would produce", ! "this error. If you simply proceed now, the `\\par' that", "I've just inserted will cause me to report a runaway", "argument that might be the root of the problem. But if", "your `}' was spurious, just type `2' and it will go away."); *************** *** 460,466 help_cs () { help2("The control sequence marked should", ! "not appear between \\csname and \\endcsname"); } help_extra_if () --- 500,506 ----- help_cs () { help2("The control sequence marked should", ! "not appear between \\csname and \\endcsname."); } help_extra_if () diff -c Common.TeX.orig/fmt.c Common.TeX/fmt.c *** Common.TeX.orig/fmt.c Tue Jul 28 17:40:59 1987 --- Common.TeX/fmt.c Fri Dec 4 15:24:33 1987 *************** *** 409,415 dump_int(exten_base[k]); dump_int(param_base[k]); dump_int(font_glue[k]); ! print_nl("\\font "); print_esc(""); print_str(font_id_text(k)); print_char('='); --- 409,415 ----- dump_int(exten_base[k]); dump_int(param_base[k]); dump_int(font_glue[k]); ! print_nl("\\font"); print_esc(""); print_str(font_id_text(k)); print_char('='); diff -c Common.TeX.orig/hash.c Common.TeX/hash.c *** Common.TeX.orig/hash.c Tue Jul 28 17:40:59 1987 --- Common.TeX/hash.c Tue Dec 1 16:24:08 1987 *************** *** 86,96 print_char(' '); } } else if (p < ACTIVE_BASE) ! print_esc("IMPOSSIBLE"); else print_str(p - ACTIVE_BASE); } else if (p >= UNDEFINED_CONTROL_SEQUENCE) print_esc("IMPOSSIBLE."); ! else if (text(p) < 0 || text(p) > str_ptr) print_esc("NONEXISTENT."); else { print_esc(""); --- 108,118 ----- print_char(' '); } } else if (p < ACTIVE_BASE) ! print_esc("IMPOSSIBLE."); else print_str(p - ACTIVE_BASE); } else if (p >= UNDEFINED_CONTROL_SEQUENCE) print_esc("IMPOSSIBLE."); ! else if (text(p) < 0 || text(p) >= str_ptr) print_esc("NONEXISTENT."); else { print_esc(""); diff -c Common.TeX.orig/hyph.c Common.TeX/hyph.c *** Common.TeX.orig/hyph.c Tue Jul 28 17:41:00 1987 --- Common.TeX/hyph.c Tue Nov 17 19:27:37 1987 *************** *** 703,709 } if (trie_o[q] != MIN_QUARTERWORD) { print_err("Duplicate pattern"); ! help1("(See Appendix H)"); error(); } trie_o[q] = v; --- 703,709 ----- } if (trie_o[q] != MIN_QUARTERWORD) { print_err("Duplicate pattern"); ! help1("(See Appendix H.)"); error(); } trie_o[q] = v; *************** *** 718,724 default: print_err("Bad "); print_esc("patterns"); ! help1("(See Appendix H)"); error(); break; } --- 718,724 ----- default: print_err("Bad "); print_esc("patterns"); ! help1("(See Appendix H.)"); error(); break; } diff -c Common.TeX.orig/math.c Common.TeX/math.c *** Common.TeX.orig/math.c Tue Jul 28 17:41:01 1987 --- Common.TeX/math.c Mon Nov 30 23:43:46 1987 *************** *** 246,252 show_fraction_noad (p) ptr p; { ! print_esc("fraction, thickness"); if (thickness(p) == DEFAULT_CODE) print("= default"); else print_scaled(thickness(p)); --- 246,252 ----- show_fraction_noad (p) ptr p; { ! print_esc("fraction, thickness "); if (thickness(p) == DEFAULT_CODE) print("= default"); else print_scaled(thickness(p)); diff -c Common.TeX.orig/page.c Common.TeX/page.c *** Common.TeX.orig/page.c Tue Jul 28 17:41:03 1987 --- Common.TeX/page.c Wed Nov 25 22:41:29 1987 *************** *** 884,890 help_box_255 () { ! help2("You shouldn't use \\box255 except in output routines.", "Proceed, and I'll discard its present contents."); } --- 884,890 ----- help_box_255 () { ! help2("You shouldn't use \\box255 except in \\output routines.", "Proceed, and I'll discard its present contents."); } *************** *** 891,896 help_dead_cycles () { help3("I've concluded that your \\output is awry; it never does a", ! "\\shipout, so I'm shipping \box255 out myself. Next time", "increase \\maxdeadcycles if you want me to be more patient!"); } --- 892,897 ----- help_dead_cycles () { help3("I've concluded that your \\output is awry; it never does a", ! "\\shipout, so I'm shipping \\box255 out myself. Next time", "increase \\maxdeadcycles if you want me to be more patient!"); } diff -c Common.TeX.orig/par.c Common.TeX/par.c *** Common.TeX.orig/par.c Tue Jul 28 17:41:04 1987 --- Common.TeX/par.c Sat Dec 5 13:02:54 1987 *************** *** 186,243 int break_type; { ptr s; ! qword t; ptr v; do_all_six(set_break_width_to_background); ! if (break_type == UNHYPHENATED || cur_p == NULL) { ! for (s = cur_p; s != NULL; s = link(s)) { ! if (is_char_node(s)) ! return; ! switch (type(s)) ! { ! case GLUE_NODE: ! v = glue_ptr(s); ! break_width[1] -= width(v); ! break_width[2 + stretch_order(v)] -= stretch(v); ! break_width[6] -= shrink(v); ! break; ! ! case PENALTY_NODE: ! break; ! ! case MATH_NODE: ! case KERN_NODE: ! if (subtype(s) == ACC_KERN) ! return; ! else break_width[1] -= width(s); ! break; ! ! default: ! return; ! break; ! } ! } ! } else { t = replace_count(cur_p); ! s = cur_p; while (t > 0) { decr(t); ! s = link(s); ! if (is_char_node(s)) ! break_width[1] -= width_char(s); else { ! switch (type(s)) { case LIGATURE_NODE: ! break_width[1] -= width_lig_char(s); break; case HLIST_NODE: case VLIST_NODE: case RULE_NODE: case KERN_NODE: ! break_width[1] -= width(s); break; default: --- 186,217 ----- int break_type; { ptr s; ! int t; ptr v; do_all_six(set_break_width_to_background); ! s = cur_p; ! if (break_type > UNHYPHENATED && cur_p != NULL) { t = replace_count(cur_p); ! v = cur_p; ! s = post_break(cur_p); while (t > 0) { decr(t); ! v = link(v); ! if (is_char_node(v)) ! break_width[1] -= width_char(v); else { ! switch (type(v)) { case LIGATURE_NODE: ! break_width[1] -= width_lig_char(v); break; case HLIST_NODE: case VLIST_NODE: case RULE_NODE: case KERN_NODE: ! break_width[1] -= width(v); break; default: *************** *** 246,252 } } } ! for (s = post_break(cur_p); s != NULL; s = link(s)) { if (is_char_node(s)) break_width[1] += width_char(s); else { --- 220,226 ----- } } } ! for (; s != NULL; s = link(s)) { if (is_char_node(s)) break_width[1] += width_char(s); else { *************** *** 259,276 case HLIST_NODE: case VLIST_NODE: case RULE_NODE: - case KERN_NODE: break_width[1] += width(s); break; default: confusion("disc2"); break; } } } break_width[1] += disc_width; } } try_break (pi, break_type) --- 233,286 ----- case HLIST_NODE: case VLIST_NODE: case RULE_NODE: break_width[1] += width(s); break; + case KERN_NODE: + if (t == 0 && subtype(s) != ACC_KERN) + t = -1; /* discardable */ + else + break_width[1] += width(s); + break; + default: confusion("disc2"); break; } } + incr(t); } break_width[1] += disc_width; + if (t == 0) + s = link(v); /* more nodes may be discardable after + the break */ } + for (; s != NULL; s = link(s)) { + if (is_char_node(s)) + return; + switch (type(s)) { + case GLUE_NODE: + v = glue_ptr(s); + break_width[1] -= width(v); + break_width[2 + stretch_order(v)] -= stretch(v); + break_width[6] -= shrink(v); + break; + + case PENALTY_NODE: + break; + + case MATH_NODE: + case KERN_NODE: + if (subtype(s) == ACC_KERN) + return; + else break_width[1] -= width(s); + break; + + default: + return; + break; + } + } } try_break (pi, break_type) *************** *** 971,980 } link(q) = r; disc_break = TRUE; ! } ! if (!is_char_node(q) && ! (type(q) == MATH_NODE || type(q) == KERN_NODE)) ! width(q) = 0; } } else { q = temp_head; --- 981,990 ----- } link(q) = r; disc_break = TRUE; ! } else ! if (type(q) == MATH_NODE || ! type(q) == KERN_NODE) ! width(q) = 0; } } else { q = temp_head; diff -c Common.TeX.orig/print.c Common.TeX/print.c *** Common.TeX.orig/print.c Tue Jul 28 17:41:04 1987 --- Common.TeX/print.c Sun Nov 29 12:22:22 1987 *************** *** 304,310 print_char(*j); n -= v; } ! if (n == 0) return; k = j + 2; u = v / (*(k - 1) - '0'); if (*(k - 1) == '2') { --- 324,330 ----- print_char(*j); n -= v; } ! if (n <= 0) return; /* nonpositive input produces no output */ k = j + 2; u = v / (*(k - 1) - '0'); if (*(k - 1) == '2') { diff -c Common.TeX.orig/scan.c Common.TeX/scan.c *** Common.TeX.orig/scan.c Tue Jul 28 17:41:05 1987 --- Common.TeX/scan.c Mon Dec 7 12:56:32 1987 *************** *** 245,250 case GLUE_VAL: cur_val = skip(cur_val); break; } cur_val_level = m; break; --- 286,295 ----- case GLUE_VAL: cur_val = skip(cur_val); break; + + case MU_VAL: + cur_val = mu_skip(cur_val); + break; } cur_val_level = m; break; *************** *** 363,369 scan_int(); if (cur_val < 0 || cur_val > 255) { print_err("Bad character code"); ! help_char(); int_error(cur_val); cur_val = 0; } --- 408,414 ----- scan_int(); if (cur_val < 0 || cur_val > 255) { print_err("Bad character code"); ! help_char_num(); int_error(cur_val); cur_val = 0; } *************** *** 741,748 help_mathchar () { ! help2("A numeric \\mathchar code must be between 0 and 32767.", ! "I changed this one to zero"); } help_number () --- 841,848 ----- help_mathchar () { ! help2("A numeric math code must be between 0 and 32767.", ! "I changed this one to zero."); } help_number () *************** *** 753,762 help_char () { ! help2("The numeric code following \\char must be between 0 and 255.", "I changed this one to zero."); } help_char_const () { help2("A one-character control sequence belongs after a ` mark.", --- 853,868 ----- help_char () { ! help2("The numeric code for a character must be between 0 and 127.", "I changed this one to zero."); } + help_char_num () + { + help2("A character number must be between 0 and 255.", + "I changed this one to zero."); + } + help_char_const () { help2("A one-character control sequence belongs after a ` mark.", *************** *** 772,779 help_missing_number () { help3("A number should have been here; I inserted `0'.", ! "(If you can't figure out why I needed a number,", ! "look up `weird error' in the TeX manual index.)"); } help_filll () --- 878,885 ----- help_missing_number () { help3("A number should have been here; I inserted `0'.", ! "(If you can't figure out why I needed to see a number,", ! "look up `weird error' in the index to The TeXbook.)"); } help_filll () *************** *** 783,792 help_mu () { ! help4("The unit of measurement in \\mskip glue must be mu.", "To recover gracefully from this error, it's best to", ! "delete the erroneous units; e.g. type `2' to delete", ! "two letters. (See Chapter 27 of the manual.)"); } help_mu_error () --- 889,898 ----- help_mu () { ! help4("The unit of measurement in math glue must be mu.", "To recover gracefully from this error, it's best to", ! "delete the erroneous units; e.g., type `2' to delete", ! "two letters. (See Chapter 27 of The TeXbook.)"); } help_mu_error () *************** *** 812,819 help_thee () { ! help2("I'm forgetting what you said", ! "and using zero for this \\the."); } help_left () --- 918,924 ----- help_thee () { ! help1("I'm forgetting what you said and using zero instead."); } help_left () *************** *** 840,844 help_reg () { ! help1("I'm forgetting what you said and not changing anything."); } --- 945,950 ----- help_reg () { ! help2("A register number must be between 0 and 255.", ! "I changed this one to zero."); } diff -c Common.TeX.orig/tex.c Common.TeX/tex.c *** Common.TeX.orig/tex.c Tue Jul 28 17:41:06 1987 --- Common.TeX/tex.c Fri Dec 4 15:38:58 1987 *************** *** 35,41 #include "print.h" #include "page.h" ! char banner[] = "This is Common TeX, Version 2.1"; int ready_already; main (argc, argv) --- 35,41 ----- #include "print.h" #include "page.h" ! char banner[] = "This is Common TeX, Version 2.1.1"; int ready_already; main (argc, argv) diff -c Common.TeX.orig/texext.c Common.TeX/texext.c *** Common.TeX.orig/texext.c Tue Jul 28 17:41:06 1987 --- Common.TeX/texext.c Mon Dec 7 16:19:42 1987 *************** *** 124,130 case CLOSE_NODE: print_write("closeout", p); - print_int(write_stream(p)); break; case SPECIAL_NODE: --- 124,129 ----- case CLOSE_NODE: print_write("closeout", p); break; case SPECIAL_NODE: *************** *** 353,358 help_unbal_write () { ! help2("On this page there's a \\write with fewer real {'s than }'s", "I can't handle that very well; good luck."); } --- 358,363 ----- help_unbal_write () { ! help2("On this page there's a \\write with fewer real {'s than }'s.", "I can't handle that very well; good luck."); } diff -c Common.TeX.orig/tfm.c Common.TeX/tfm.c *** Common.TeX.orig/tfm.c Tue Jul 28 17:41:07 1987 --- Common.TeX/tfm.c Fri Dec 4 15:24:42 1987 *************** *** 68,74 {print_err("Font "); sprint_cs(u); \ print_char('='); print_file_name(nom, aire, null_str); \ if (s >= 0) {print(" at "); print_scaled(s); print("pt");} \ ! else if (s != -1000) {print(" scaled "); print_scaled(-s);}} #define get_font_byte() \ (font_byte = getc(tfm_file)) --- 68,74 ----- {print_err("Font "); sprint_cs(u); \ print_char('='); print_file_name(nom, aire, null_str); \ if (s >= 0) {print(" at "); print_scaled(s); print("pt");} \ ! else if (s != -1000) {print(" scaled "); print_int(-s);}} #define get_font_byte() \ (font_byte = getc(tfm_file)) *************** *** 416,422 { if (tracing_lost_chars > 0) { begin_diagnostic(); ! print("Missing character: There is no "); print_ASCII(c); print(" in font "); print_str(font_name[f]); --- 447,453 ----- { if (tracing_lost_chars > 0) { begin_diagnostic(); ! print_nl("Missing character: There is no "); print_ASCII(c); print(" in font "); print_str(font_name[f]); *************** *** 479,485 help_font_param () { help2("To increase the number of font parameters, you must", ! "use \\fontdimen immediately after the font code is defined."); } help_font_cs () --- 516,522 ----- help_font_param () { help2("To increase the number of font parameters, you must", ! "use \\fontdimen immediately after the \\font is loaded."); } help_font_cs () diff -c Common.TeX.orig/token.c Common.TeX/token.c *** Common.TeX.orig/token.c Tue Jul 28 17:41:07 1987 --- Common.TeX/token.c Wed Dec 2 14:09:58 1987 *************** *** 508,515 { help4("I suspect you have forgotten a `}', causing me", "to read past where you wanted me to stop.", ! "Either type `I}' to try recovering,", ! "or type 'X' and fix your file."); } help_funny () --- 535,542 ----- { help4("I suspect you have forgotten a `}', causing me", "to read past where you wanted me to stop.", ! "I'll try to recover; but if the error is serious,", ! "you'd better type `E' or `X' now and fix your file."); } help_funny () diff -c Common.TeX.orig/tokenlists.c Common.TeX/tokenlists.c *** Common.TeX.orig/tokenlists.c Tue Jul 28 17:41:08 1987 --- Common.TeX/tokenlists.c Sat Dec 5 15:31:25 1987 *************** *** 400,406 else { m = token(p) / 0400; c = token(p) % 0400; ! if (m < 0 || c > 127) print_esc("BAD."); else { switch (m) --- 492,498 ----- else { m = token(p) / 0400; c = token(p) % 0400; ! if (token(p) < 0 || c > 127) print_esc("BAD."); else { switch (m) *************** *** 418,429 break; case MAC_PARAM: ! print_char(c); ! print_char(c); break; case OUT_PARAM: ! print_char(match_chr); if (c <= 9) print_char(c + '0'); else { --- 510,521 ----- break; case MAC_PARAM: ! print_str(c); ! print_str(c); break; case OUT_PARAM: ! print_str(match_chr); if (c <= 9) print_char(c + '0'); else { *************** *** 434,440 case MATCH: match_chr = c; ! print_char(c); incr(n); print_char(n); if (n > '9') --- 526,532 ----- case MATCH: match_chr = c; ! print_str(c); incr(n); print_char(n); if (n > '9') diff -c Common.TeX.orig/tokenstack.c Common.TeX/tokenstack.c *** Common.TeX.orig/tokenstack.c Tue Jul 28 17:41:08 1987 --- Common.TeX/tokenstack.c Fri Dec 4 16:45:50 1987 *************** *** 282,288 for (i = start; i < j; incr(i)) { if (i == loc) set_trick_count(); ! print_char(buffer[i]); } } } else { --- 337,343 ----- for (i = start; i < j; incr(i)) { if (i == loc) set_trick_count(); ! print_str(buffer[i]); } } } else { -- and here is Joe Weenings patch Also, we recently discovered a bug in Common TeX apparently not caught by the trip test. It's just a transcription error from the Pascal code, and occurs when you add glue with different stretch order. Here's the fix, which I've also sent to Pat Monardo: diff -c def.c.bad def.c *** def.c.bad Mon Jul 27 22:40:56 1987 --- def.c Fri Feb 19 18:33:11 1988 *************** *** 514,520 width(q) += width(r); if (stretch(q) == 0) stretch_order(q) = NORMAL; ! else if (stretch_order(q) == stretch_order(r)) stretch(q) += stretch(r); else if (stretch_order(q) < stretch_order(r) && stretch_order(r) != 0) { --- 514,520 ----- width(q) += width(r); if (stretch(q) == 0) stretch_order(q) = NORMAL; ! if (stretch_order(q) == stretch_order(r)) stretch(q) += stretch(r); else if (stretch_order(q) < stretch_order(r) && stretch_order(r) != 0) { -- Domainised: mark@comp.vuw.ac.nz Bang form: ...!uunet!vuwcomp!mark