From bda68de2848d1d8a6bb8957c134d3b6604a859e8 Mon Sep 17 00:00:00 2001 From: maqiyuan Date: Sat, 1 Feb 2014 09:49:04 +0800 Subject: [PATCH] help_line: str_number -> char *. --- src/texsourc/itex.c | 54 +++-------- src/texsourc/local.c | 2 +- src/texsourc/tex0.c | 74 +++++++------- src/texsourc/tex2.c | 205 +++++++++++++-------------------------- src/texsourc/tex3.c | 130 ++++++++----------------- src/texsourc/tex4.c | 14 +-- src/texsourc/tex5.c | 63 ++++-------- src/texsourc/tex6.c | 70 +++++--------- src/texsourc/tex7.c | 268 +++++++++++++++++---------------------------------- src/texsourc/tex8.c | 178 +++++++++++----------------------- src/texsourc/texd.h | 20 +--- 11 files changed, 348 insertions(+), 730 deletions(-) diff --git a/src/texsourc/itex.c b/src/texsourc/itex.c index 0e83e2e..58ad215 100644 --- a/src/texsourc/itex.c +++ b/src/texsourc/itex.c @@ -1174,10 +1174,7 @@ void prefixed_command (void) print_err("You can't use a prefix with `"); print_cmd_chr(cur_cmd, cur_chr); print_char(39); /* ' */ - { - help_ptr = 1; - help_line[0]= 1174; /* I'll pretend you didn't say \long or \outer or \global. */ - } + help1("I'll pretend you didn't say \\long or \\outer or \\global."); back_error (); return; } @@ -1190,10 +1187,7 @@ void prefixed_command (void) print(1176); /* ' with ` */ print_cmd_chr(cur_cmd, cur_chr); print_char(39); /* ' */ - { - help_ptr = 1; - help_line[0]= 1177; /* I'll pretend you didn't say \long or \outer here. */ - } + help1("I'll pretend you didn't say \\long or \\outer here."); error (); } if(eqtb[(hash_size + 3206)].cint != 0) @@ -1328,11 +1322,8 @@ void prefixed_command (void) if(! scan_keyword(836)) /* to */ { print_err("Missing `to' inserted"); - { - help_ptr = 2; - help_line[1]= 1194; /* You should have said `\read to \cs'. */ - help_line[0]= 1195; /* I'm going to look for the \cs now. */ - } + help2("You should have said `\\read to \\cs'.", + "I'm going to look for the \\cs now."); error (); } get_r_token (); @@ -1473,10 +1464,7 @@ void prefixed_command (void) print(1197); /*), should be in the range 0.. */ else print(1198); /*), should be at most */ print_int(n); - { - help_ptr = 1; - help_line[0]= 1199; /* I'm going to use 0 instead of that illegal code value. */ - } + help1("I'm going to use 0 instead of that illegal code value."); error (); cur_val = 0; } @@ -1524,11 +1512,8 @@ void prefixed_command (void) else { print_err("Improper "); print_esc(533); /* setbox */ - { - help_ptr = 2; - help_line[1]= 1205; /* Sorry, \setbox is not allowed after \halign in a display, */ - help_line[0]= 1206; /* or between \accent and an accented character. */ - } + help2("Sorry, \\setbox is not allowed after \\halign in a display,", + "or between \\accent and an accented character."); error (); } } @@ -3636,10 +3621,7 @@ void new_patterns (void) if(cur_chr == 0) { print_err("Nonletter"); - { - help_ptr = 1; - help_line[0]= 950; /* (See Appendix H.) */ - } + help1("(See Appendix H.)"); error (); } } @@ -3710,10 +3692,7 @@ void new_patterns (void) if(trie_o[q]!= min_trie_op) { print_err("Duplicate pattern"); - { - help_ptr = 1; - help_line[0]= 950; /* (See Appendix H.) */ - } + help1("(See Appendix H.)"); error (); } trie_o[q]= v; @@ -3729,10 +3708,7 @@ void new_patterns (void) { print_err("Bad "); print_esc(947); /* patterns */ - { - help_ptr = 1; - help_line[0]= 950; /* (See Appendix H.) */ - } + help1("(See Appendix H.)"); error (); } break; @@ -3743,10 +3719,7 @@ void new_patterns (void) else { print_err("Too late for "); print_esc(947); /* patterns */ - { - help_ptr = 1; - help_line[0]= 948; /* All patterns must be given before typesetting begins. */ - } + help1("All patterns must be given before typesetting begins."); error (); mem[mem_top - 12].hh.v.RH = scan_toks(false, false); flush_list(def_ref); @@ -3882,10 +3855,7 @@ void store_fmt_file (void) /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */ if(save_ptr != 0) { print_err("You can't dump inside a group"); - { - help_ptr = 1; - help_line[0]= 1253; /* `{...\dump}' is a no-no.. */ - } + help1("`{...\\dump}' is a no-no.."); { if(interaction == 3) interaction = 2; if(log_opened){ diff --git a/src/texsourc/local.c b/src/texsourc/local.c index 415e6e7..0d876df 100644 --- a/src/texsourc/local.c +++ b/src/texsourc/local.c @@ -2046,7 +2046,7 @@ void check_fixed_align (int flag) testalign ((int) &first_count, 4, "first_count"); testalign ((int) &deletions_allowed, 4, "deletions_allowed"); testalign ((int) &set_box_allowed, 4, "set_box_allowed"); - testalign ((int) &help_line, sizeof(help_line[0]), "help_line"); + testalign ((char *) &help_line, sizeof(help_line[0]), "help_line"); testalign ((int) &use_err_help, 4, "use_err_help"); testalign ((int) &interrupt, 4, "interrupt"); testalign ((int) &OK_to_interrupt, 4, "OK_to_interrupt"); diff --git a/src/texsourc/tex0.c b/src/texsourc/tex0.c index 414365e..9479874 100644 --- a/src/texsourc/tex0.c +++ b/src/texsourc/tex0.c @@ -35,6 +35,18 @@ void print_err (const char * s) //print_nl("! "); print_string(s); } +void tex_help (unsigned int n, ...) +{ + unsigned int i; + va_list help_arg; + + if (n > 6) n = 6; + help_ptr = n; + va_start(help_arg, n); + for (i = n - 1; i >= 0; i--) + help_line[i] = va_arg(help_arg, char *); + va_end(help_arg); +} /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */ // print newline @@ -441,12 +453,9 @@ lab22: /* loop */ cur_cmd = s2; cur_chr = s3; align_state = s4; - OK_to_interrupt = true; - { - help_ptr = 2; - help_line[1]= 277; /* I have just deleted some text, as you asked. */ - help_line[0]= 278; /* You can now delete more, or insert, or whatever. */ - } + OK_to_interrupt = true; + help2("I have just deleted some text, as you asked.", + "You can now delete more, or insert, or whatever."); show_context (); goto lab22; /* loop again */ } @@ -479,24 +488,18 @@ lab22: /* loop */ } else { if(help_ptr == 0) - { - help_ptr = 2; - help_line[1]= 279; /* Sorry, I don't know how to help in this situation. */ - help_line[0]= 280; /* Maybe you should try asking a human? */ - } + help2("Sorry, I don't know how to help in this situation.", + "Maybe you should try asking a human?"); do { decr(help_ptr); print(help_line[help_ptr]); print_ln (); } while(!(help_ptr == 0)); - } - { - help_ptr = 4; - help_line[3]= 281; /* Sorry, I already gave what help I could... */ - help_line[2]= 280; /* Maybe you should try asking a human? */ - help_line[1]= 282; /* An error might have occurred before I noticed any problems. */ - help_line[0]= 283; /* ``If all else fails, read the instructions.'' */ - } + } + help4("Sorry, I already gave what help I could...", + "Maybe you should try asking a human?", + "An error might have occurred before I noticed any problems.", + "``If all else fails, read the instructions.''"); goto lab22; /* loop again */ } break; @@ -596,9 +599,10 @@ void fatal_error_(str_number s) { normalize_selector (); print_err("Emergency stop"); + //help1(""); { help_ptr = 1; - help_line[0]= s; // given string goes into help line + help_line[0] = ""; //s; // given string goes into help line } { if(interaction == 3)interaction = 2; @@ -623,11 +627,8 @@ void overflow_(str_number s, integer n) print_char(61); /* '=' */ print_int(n); print_char(93); /* ']' */ - { - help_ptr = 2; - help_line[1]= 287; /* If you really absolutely need more capacity, */ - help_line[0]= 288; /* you can ask a wizard to enlarge me. */ - } + help2("If you really absolutely need more capacity,", + "you can ask a wizard to enlarge me."); if (! knuth_flag) { /* Additional comments 98/Jan/5 */ if (s == 945 && n == trie_size) { sprintf(log_line, "\n (Maybe use -h=... on command line in ini-TeX)\n"); @@ -658,18 +659,12 @@ void confusion_(str_number s) print_err("This can't happen("); print(s); print_char(41); /*)*/ - { - help_ptr = 1; - help_line[0]= 290; /* I'm broken. Please show this to someone who can fix can fix */ - } + help1("I'm broken. Please show this to someone who can fix can fix"); } else { print_err("I can't go on meeting you like this"); - { - help_ptr = 2; - help_line[1]= 292; /* One of your faux pas seems to have wounded me deeply... */ - help_line[0]= 293; /* in fact, I'm barely conscious. Please fix it and try again. */ - } + help2("One of your faux pas seems to have wounded me deeply...", + "in fact, I'm barely conscious. Please fix it and try again."); } { if(interaction == 3)interaction = 2; @@ -900,7 +895,7 @@ char * make_up_help_string (int nhelplines) // get length of help for this specific message for (k = nhelplines-1; k >= 0; k--) { - nlen += stringlength(help_line[ k]); + nlen += stringlength(help_line[k]); } nlen += 2; // for blank line separator if (addextrahelp) { @@ -1054,12 +1049,9 @@ void pause_for_instructions (void) if((selector == 18)||(selector == 16)) incr(selector); print_err("Interruption"); - { - help_ptr = 3; - help_line[2]= 295; /* You rang? */ - help_line[1]= 296; /* Try to insert some instructions for me (e.g.,`I\showlists'), */ - help_line[0]= 297; /* unless you just want to quit by typing `X'. */ - } + help3("You rang?", + "Try to insert some instructions for me (e.g.,`I\showlists'),", + "unless you just want to quit by typing `X'."); deletions_allowed = false; error (); deletions_allowed = true; diff --git a/src/texsourc/tex2.c b/src/texsourc/tex2.c index 68aba6f..6a53ccb 100644 --- a/src/texsourc/tex2.c +++ b/src/texsourc/tex2.c @@ -125,12 +125,8 @@ void prepare_mag (void) print_int(eqtb[(hash_size + 3180)].cint); print(545); /*)*/ print_nl(546); /* the previous value will be retained */ - { - help_ptr = 2; - help_line[1]= 547; /* I can handle only one magnification ratio per job. */ - help_line[0]= 548; /* So I've reverted to the magnification you used earlier on this run. */ - - } + help2("I can handle only one magnification ratio per job.", + "So I've reverted to the magnification you used earlier on this run."); int_error(mag_set); geq_word_define((hash_size + 3180), mag_set); } @@ -138,10 +134,7 @@ void prepare_mag (void) (eqtb[(hash_size + 3180)].cint > 32768L)) { print_err("Illegal magnification has been changed to 1000"); - { - help_ptr = 1; - help_line[0]= 550; /* The magnification ratio must be between 1 and 32768. */ - } + help1("The magnification ratio must be between 1 and 32768."); int_error(eqtb[(hash_size + 3180)].cint); geq_word_define((hash_size + 3180), 1000); } @@ -695,27 +688,21 @@ void check_outer_validity (void) } begin_token_list(p, 4); print(604); /* of */ - sprint_cs(warning_index); - { - help_ptr = 4; - help_line[3]= 605; /* I suspect you have forgotten a `}', causing me */ - help_line[2]= 606; /* to read past where you wanted me to stop. */ - help_line[1]= 607; /* I'll try to recover; but if the error is serious, */ - help_line[0]= 608; /* you'd better type `E' or `X' now and fix your file. */ - } + sprint_cs(warning_index); + 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."); error (); } else { print_err("Incomplete "); print_cmd_chr(105, cur_if); /* i */ print(596); /*; all text was ignored after line */ - print_int(skip_line); - { - help_ptr = 3; - help_line[2]= 597; /* A forbidden control sequence occurred in skipped text. */ - help_line[1]= 598; /* This kind of error happens when you say `\if...' and forget */ - help_line[0]= 599; /* the matching `\fi'. I've inserted a `\fi'; this might work. */ - } + print_int(skip_line); + help3("A forbidden control sequence occurred in skipped text.", + "This kind of error happens when you say `\\if...' and forget", + "the matching `\\fi'. I've inserted a `\\fi'; this might work."); if(cur_cs != 0) cur_cs = 0; else help_line[2]= 600; /* The file ended while I was skipping conditional text. */ @@ -842,13 +829,10 @@ void macro_call (void) print_err("Use of "); sprint_cs(warning_index); print(648); /* doesn't match its definition */ - { - help_ptr = 4; - help_line[3]= 649; /* If you say, e.g., `\def\a1{...}', then you must always */ - help_line[2]= 650; /* put `1' after `\a', since control sequence names are */ - help_line[1]= 651; /* made up of letters only. The macro here has not been */ - help_line[0]= 652; /* followed by the required stuff, so I'm ignoring it. */ - } + help4("If you say, e.g., `\\def\\a1{...}', then you must always", + "put `1' after `\\a', since control sequence names are", + "made up of letters only. The macro here has not been", + "followed by the required stuff, so I'm ignoring it."); error (); goto lab10; } @@ -892,12 +876,9 @@ void macro_call (void) print_err("Paragraph ended before "); sprint_cs(warning_index); print(643); /* was complete */ - { - help_ptr = 3; - help_line[2]= 644; /* I suspect you've forgotten a `}', causing me to apply this */ - help_line[1]= 645; /* control sequence to too much text. How can we recover? */ - help_line[0]= 646; /* My plan is to forget the whole thing and hope for the best. */ - } + help3("I suspect you've forgotten a `}', causing me to apply this", + "control sequence to too much text. How can we recover?", + "My plan is to forget the whole thing and hope for the best."); back_error (); } pstack[n]= mem[mem_top - 3].hh.v.RH; @@ -946,12 +927,9 @@ void macro_call (void) print_err("Paragraph ended before "); sprint_cs(warning_index); print(643); /* was complete */ - { - help_ptr = 3; - help_line[2]= 644; /* I suspect you've forgotten a `}', causing me to apply this */ - help_line[1]= 645; /* control sequence to too much text. How can we recover? */ - help_line[0]= 646; /* My plan is to forget the whole thing and hope for the best. */ - } + help3("I suspect you've forgotten a `}', causing me to apply this", + "control sequence to too much text. How can we recover?", + "My plan is to forget the whole thing and hope for the best."); back_error (); } pstack[n]= mem[mem_top - 3].hh.v.RH; @@ -990,15 +968,12 @@ void macro_call (void) print_err("Argument of "); sprint_cs(warning_index); print(635); /* has an extra } */ - { - help_ptr = 6; - help_line[5]= 636; /* I've run across a `}' that doesn't seem to match anything. */ - help_line[4]= 637; /* For example, `\def\a#1{...}' and `\a}' would produce */ - help_line[3]= 638; /* this error. If you simply proceed now, the `\par' that */ - help_line[2]= 639; /* I've just inserted will cause me to report a runaway */ - help_line[1]= 640; /* argument that might be the root of the problem. But if */ - help_line[0]= 641; /* your `}' was spurious, just type `2' and it will go away. */ - } + 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."); incr(align_state); long_state = 111; cur_tok = par_token; @@ -1190,11 +1165,8 @@ void expand (void) print_err("Missing "); print_esc(502); /* endcsname */ print(623); /* inserted */ - { - help_ptr = 2; - help_line[1]= 624; /* The control sequence marked should */ - help_line[0]= 625; /* not appear between \csname and \endcsname. */ - } + help2("The control sequence marked should", + "not appear between \\csname and \\endcsname."); back_error (); } j = first; @@ -1258,10 +1230,7 @@ void expand (void) else { print_err("Extra "); print_cmd_chr(106, cur_chr); /* j */ - { - help_ptr = 1; - help_line[0]= 774; /* I'm ignoring this; it doesn't match any \if. */ - } + help1("I'm ignoring this; it doesn't match any \\if."); error (); } else { @@ -1285,14 +1254,11 @@ void expand (void) default: { print_err("Undefined control sequence"); - { - help_ptr = 5; - help_line[4]= 617; /* The control sequence at the end of the top line */ - help_line[3]= 618; /* of your error message was never \def'ed. If you have */ - help_line[2]= 619; /* misspelled it (e.g., `\hobx'), type `I' and the correct */ - help_line[1]= 620; /* spelling (e.g., `I\hbox'). Otherwise just continue, */ - help_line[0]= 621; /* and I'll forget about whatever was undefined. */ - } + help5("The control sequence at the end of the top line", + "of your error message was never \\def'ed. If you have", + "misspelled it (e.g., `\\hobx'), type `I' and the correct", + "spelling (e.g., `I\\hbox'). Otherwise just continue,", + "and I'll forget about whatever was undefined."); error (); } break; @@ -1356,13 +1322,10 @@ void scan_left_brace (void) if(cur_cmd != 1) { print_err("Missing { inserted"); - { - help_ptr = 4; - help_line[3]= 655; /* A left brace was mandatory here, so I've put one in. */ - help_line[2]= 656; /* You might want to delete and/or insert some corrections */ - help_line[1]= 657; /* so that I will find a matching right brace soon. */ - help_line[0]= 658; /* (If you're confused by all this, try typing `I}' now.) */ - } + help4("A left brace was mandatory here, so I've put one in.", + "You might want to delete and/or insert some corrections", + "so that I will find a matching right brace soon.", + "(If you're confused by all this, try typing `I}' now.)"); back_error (); cur_tok = 379; cur_cmd = 1; @@ -1413,10 +1376,7 @@ bool scan_keyword_(str_number s) void mu_error (void) { print_err("Incompatible glue units"); - { - help_ptr = 1; - help_line[0]= 660; /* I'm going to assume that 1mu=1pt when they're mixed. */ - } + help1("I'm going to assume that 1mu=1pt when they're mixed."); error (); } void scan_eight_bit_int (void) @@ -1425,11 +1385,8 @@ void scan_eight_bit_int (void) if((cur_val < 0)||(cur_val > 255)) { print_err("Bad register code"); - { - help_ptr = 2; - help_line[1]= 685; /* A register number must be between 0 and 255. */ - help_line[0]= 686; /* I changed this one to zero. */ - } + help2("A register number must be between 0 and 255.", + "I changed this one to zero."); int_error(cur_val); cur_val = 0; } @@ -1440,11 +1397,8 @@ void scan_char_num (void) if((cur_val < 0)||(cur_val > 255)) { print_err("Bad character code"); - { - help_ptr = 2; - help_line[1]= 688; /* A character number must be between 0 and 255. */ - help_line[0]= 686; /* I changed this one to zero. */ - } + help2("A character number must be between 0 and 255.", + "I changed this one to zero."); int_error(cur_val); cur_val = 0; } @@ -1455,11 +1409,8 @@ void scan_four_bit_int (void) if((cur_val < 0)||(cur_val > 15)) { print_err("Bad number"); - { - help_ptr = 2; - help_line[1]= 690; /* Since I expected to read a number between 0 and 15, */ - help_line[0]= 686; /* I changed this one to zero. */ - } + help2("Since I expected to read a number between 0 and 15,", + "I changed this one to zero."); int_error(cur_val); cur_val = 0; } @@ -1470,11 +1421,8 @@ void scan_fifteen_bit_int (void) if((cur_val < 0)||(cur_val > 32767)) { print_err("Bad mathchar"); - { - help_ptr = 2; - help_line[1]= 692; /* A mathchar number must be between 0 and 32767. */ - help_line[0]= 686; /* I changed this one to zero. */ - } + help2("A mathchar number must be between 0 and 32767.", + "I changed this one to zero."); int_error(cur_val); cur_val = 0; } @@ -1485,11 +1433,8 @@ void scan_twenty_seven_bit_int (void) if((cur_val < 0)||(cur_val > 134217727L)) /* 2^27 - 1 */ { print_err("Bad delimiter code"); - { - help_ptr = 2; - help_line[1]= 694; /* A numeric delimiter code must be between 0 and 2^{27}-1. */ - help_line[0]= 686; /* I changed this one to zero. */ - } + help2("A numeric delimiter code must be between 0 and 2^{27}-1.", + "I changed this one to zero."); int_error(cur_val); cur_val = 0; } @@ -1513,11 +1458,8 @@ void scan_font_ident (void) } else { print_err("Missing font identifier"); - { - help_ptr = 2; - help_line[1]= 812; /* I was looking for a control sequence whose */ - help_line[0]= 813; /* current meaning has been defined by \font. */ - } + help2("I was looking for a control sequence whose", + "current meaning has been defined by \\font."); back_error (); f = 0; } @@ -1584,11 +1526,8 @@ void find_font_dimen_(bool writing) print(814); /* has only */ print_int(font_params[f]); print(815); /* fontdimen parameters */ - { - help_ptr = 2; - help_line[1]= 816; /* To increase the number of font parameters, you must */ - help_line[0]= 817; /* use \fontdimen immediately after the \font is loaded. */ - } + help2("To increase the number of font parameters, you must", + "use \\fontdimen immediately after the \\font is loaded."); error (); } } @@ -1632,12 +1571,9 @@ void scan_something_internal_(small_number level, bool negative) if(level != 5) { print_err("Missing number, treated as zero"); - { - help_ptr = 3; - help_line[2]= 662; /* A number should have been here; I inserted `0'. */ - help_line[1]= 663; /* (If you can't figure out why I needed to see a number, */ - help_line[0]= 664; /* look up `weird error' in the index to The TeXbook.) */ - } + 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.)"); back_error (); { cur_val = 0; @@ -1696,13 +1632,10 @@ void scan_something_internal_(small_number level, bool negative) { print_err("Improper "); print_cmd_chr(79, m); /* O */ - { - help_ptr = 4; - help_line[3]= 678; /* You can refer to \spacefactor only in horizontal mode; */ - help_line[2]= 679; /* you can refer to \prevdepth only in vertical mode; and */ - help_line[1]= 680; /* neither of these is meaningful inside \write. So */ - help_line[0]= 681; /* I'm forgetting what you said and using zero instead. */ - } + help4("You can refer to \\spacefactor only in horizontal mode;", + "you can refer to \\prevdepth only in vertical mode; and", + "neither of these is meaningful inside \\write. So", + "I'm forgetting what you said and using zero instead."); error (); if(level != 5) { cur_val = 0; @@ -1885,10 +1818,7 @@ void scan_something_internal_(small_number level, bool negative) print_cmd_chr(cur_cmd, cur_chr); print(683); /* ' after */ print_esc(534); /* the */ - { - help_ptr = 1; - help_line[0]= 681; /* I'm forgetting what you said and using zero instead. */ - } + help1("I'm forgetting what you said and using zero instead."); error (); if(level != 5){ cur_val = 0; @@ -2140,12 +2070,9 @@ lab20: case 32 : case 48 : { - print_err("Text line contains an invalid character"); - { - help_ptr = 2; - help_line[1]= 611; /* A funny symbol that I can't read has just been input. */ - help_line[0]= 612; /* Continue, and I'll forget that it ever happened. */ - } + print_err("Text line contains an invalid character"); + help2("A funny symbol that I can't read has just been input.", + "Continue, and I'll forget that it ever happened."); deletions_allowed = false; error (); deletions_allowed = true; diff --git a/src/texsourc/tex3.c b/src/texsourc/tex3.c index e351184..1669f37 100644 --- a/src/texsourc/tex3.c +++ b/src/texsourc/tex3.c @@ -65,11 +65,8 @@ void scan_int (void) if(cur_val > 255) { print_err("Improper alphabetic constant"); - { - help_ptr = 2; - help_line[1]= 696; /* A one-character control sequence belongs after a ` mark. */ - help_line[0]= 697; /* So I'm essentially inserting \0 here. */ - } + help2("A one-character control sequence belongs after a ` mark.", + "So I'm essentially inserting \\0 here."); cur_val = 48; back_error (); } @@ -119,11 +116,8 @@ void scan_int (void) if(OKsofar) { print_err("Number too big"); - { - help_ptr = 2; - help_line[1]= 699; /* I can only go up to 2147483647='17777777777="7FFFFFFF, */ - help_line[0]= 700; /* so I'm using that number instead of yours. */ - } + help2("I can only go up to 2147483647='17777777777=\"7FFFFFFF,", + "so I'm using that number instead of yours."); error (); cur_val = 2147483647L; /* 7FFFFFFF hex */ OKsofar = false; @@ -136,12 +130,9 @@ void scan_int (void) if(vacuous) { print_err("Missing number, treated as zero"); - { - help_ptr = 3; - help_line[2]= 662; /* A number should have been here; I inserted `0'. */ - help_line[1]= 663; /* (If you can't figure out why I needed to see a number, */ - help_line[0]= 664; /* look up `weird error' in the index to The TeXbook.) */ - } + 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.)"); back_error (); } else if(cur_cmd != 10) @@ -266,10 +257,7 @@ void scan_dimen_(bool mu, bool inf, bool shortcut) if(cur_order == 3) { print_err("Illegal unit of measure("); print(703); /* replaced by filll) */ - { - help_ptr = 1; - help_line[0]= 704; /* I dddon't go any higher than filll. */ - } + help1("I dddon't go any higher than filll."); error (); } else incr(cur_order); @@ -323,13 +311,10 @@ void scan_dimen_(bool mu, bool inf, bool shortcut) else { print_err("Illegal unit of measure("); print(707); /* mu inserted) */ - { - help_ptr = 4; - help_line[3]= 708; /* The unit of measurement in math glue must be mu. */ - help_line[2]= 709; /* To recover gracefully from this error, it's best to */ - help_line[1]= 710; /* delete the erroneous units; e.g., type `2' to delete */ - help_line[0]= 711; /* two letters. (See Chapter 27 of The TeXbook.) */ - } + 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.)"); error (); goto lab88; } @@ -389,15 +374,12 @@ void scan_dimen_(bool mu, bool inf, bool shortcut) else { print_err("Illegal unit of measure("); print(720); /* pt inserted) */ - { - help_ptr = 6; - help_line[5]= 721; /* Dimensions can be in units of em, ex, in, pt, pc, */ - help_line[4]= 722; /* cm, mm, dd, cc, bp, or sp; but yours is a new one! */ - help_line[3]= 723; /* I'll assume that you meant to say pt, for printer's points. */ - help_line[2]= 709; /* To recover gracefully from this error, it's best to */ - help_line[1]= 710; /* delete the erroneous units; e.g., type `2' to delete */ - help_line[0]= 711; /* two letters. (See Chapter 27 of The TeXbook.) */ - } + help6("Dimensions can be in units of em, ex, in, pt, pc,", + "cm, mm, dd, cc, bp, or sp; but yours is a new one!", + "I'll assume that you meant to say pt, for printer's points.", + "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.)"); error (); goto lab32; } @@ -421,11 +403,8 @@ lab89: if(arith_error ||(abs(cur_val)>= 1073741824L)) /* 2^30 */ { print_err("Dimension too large"); - { - help_ptr = 2; - help_line[1]= 725; /* I can't work with sizes bigger than about 19 feet. */ - help_line[0]= 726; /* Continue and I'll use the largest value I can. */ - } + help2("I can't work with sizes bigger than about 19 feet.", + "Continue and I'll use the largest value I can."); error (); cur_val = 1073741823L; /* 2^30 - 1 */ arith_error = false; @@ -781,10 +760,7 @@ halfword scan_toks_(bool macrodef, bool xpand) if(t == 3129) { print_err("You already have nine parameters"); - { - help_ptr = 1; - help_line[0]= 742; /* I'm going to ignore the # sign you just used. */ - } + help1("I'm going to ignore the # sign you just used."); error (); } else { @@ -793,11 +769,8 @@ halfword scan_toks_(bool macrodef, bool xpand) if(cur_tok != t) { print_err("Parameters must be numbered consecutively"); - { - help_ptr = 2; - help_line[1]= 744; /* I've inserted the digit you should have used after the #. */ - help_line[0]= 745; /* Type `1' to delete what you did use. */ - } + help2("I've inserted the digit you should have used after the #.", + "Type `1' to delete what you did use."); back_error (); } cur_tok = s; @@ -821,11 +794,8 @@ halfword scan_toks_(bool macrodef, bool xpand) { print_err("Missing { inserted"); incr(align_state); - { - help_ptr = 2; - help_line[1]= 739; /* Where was the left brace? You said something like `\def\a}', */ - help_line[0]= 740; /* which I'm going to interpret as `\def\a{}'. */ - } + help2("Where was the left brace? You said something like `\\def\\a}',", + "which I'm going to interpret as `\\def\\a{}'."); error (); goto lab40; } @@ -873,13 +843,10 @@ lab32: if(cur_cmd != 6) if((cur_tok <= 3120)||(cur_tok > t)) { print_err("Illegal parameter number in definition of"); - sprint_cs(warning_index); - { - help_ptr = 3; - help_line[2]= 747; /* You meant to type ## instead of #, right? */ - help_line[1]= 748; /* Or maybe a } was forgotten somewhere earlier, and things */ - help_line[0]= 749; /* are all screwed up? I'm going to assume that you meant ##. */ - } + sprint_cs(warning_index); + help3("You meant to type ## instead of #, right?", + "Or maybe a } was forgotten somewhere earlier, and things", + "are all screwed up? I'm going to assume that you meant ##."); back_error (); cur_tok = s; } @@ -966,10 +933,7 @@ void read_toks_(integer n, halfword r) runaway (); print_err("File ended within"); print_esc(531); /* read */ - { - help_ptr = 1; - help_line[0]= 752; /* This \read has unbalanced braces. */ - } + help1("This \\read has unbalanced braces."); align_state = 1000000L; error (); } @@ -1137,10 +1101,7 @@ void conditional (void) else { print_err("Missing = inserted for "); print_cmd_chr(105, thisif); /* i */ - { - help_ptr = 1; - help_line[0]= 778; /* I was expecting to see `<', `=', or `>'. Didn't. */ - } + help1("I was expecting to see `<', `=', or `>'. Didn't."); back_error (); r = 61; } @@ -1296,10 +1257,7 @@ void conditional (void) goto lab50; print_err("Extra "); print_esc(771); /* or */ - { - help_ptr = 1; - help_line[0]= 774; /* I'm ignoring this; it doesn't match any \if. */ - } + help1("I'm ignoring this; it doesn't match any \\if."); error (); } else if(cur_chr == 2) @@ -2311,13 +2269,10 @@ internal_font_number read_font_info_(halfword u, str_number nom, str_number aire print_int(- (integer) s); } print(806); /* not loaded: Not enough room left */ - { - help_ptr = 4; - help_line[3]= 807; /* I'm afraid I won't be able to make use of this font, */ - help_line[2]= 808; /* because my memory for character-size data is too small. */ - help_line[1]= 809; /* If you're really stuck, ask a wizard to enlarge me. */ - help_line[0]= 810; /* Or maybe try `I\font='. */ - } + help4("I'm afraid I won't be able to make use of this font,", + "because my memory for character-size data is too small.", + "If you're really stuck, ask a wizard to enlarge me.", + "Or maybe try `I\\font='."); error (); goto lab30; } @@ -2716,14 +2671,11 @@ lab11: print_err("Font "); if (aire == 335) { /* "" only if path not specified */ if (show_texinput_flag) show_tex_fonts(); /* 98/Jan/31 */ } - { - help_ptr = 5; - help_line[4]= 800; /* I wasn't able to read the size data for this font, */ - help_line[3]= 801; /* so I will ignore the font specification. */ - help_line[2]= 802; /* [Wizards can fix TFM files using TFtoPL/PLtoTF.] */ - help_line[1]= 803; /* You might try inserting a different font spec; */ - help_line[0]= 804; /* e.g., type `I\font='. */ - } + help5("I wasn't able to read the size data for this font,", + "so I will ignore the font specification.", + "[Wizards can fix TFM files using TFtoPL/PLtoTF.]", + "You might try inserting a different font spec;", + "e.g., type `I\\font='."); error (); lab30: diff --git a/src/texsourc/tex4.c b/src/texsourc/tex4.c index c751e09..9b82521 100644 --- a/src/texsourc/tex4.c +++ b/src/texsourc/tex4.c @@ -673,11 +673,8 @@ void write_out_(halfword p) if(cur_tok != (hash_size + hash_extra + 4095 + 522)) { print_err("Unbalanced write command"); - { - help_ptr = 2; - help_line[1]= 1292; /* On this page there's a \write with fewer real {'s than }'s. */ - help_line[0]= 1006; /* I can't handle that very well; good luck. */ - } + help2("On this page there's a \\write with fewer real {'s than }'s.", + "I can't handle that very well; good luck."); error (); do { get_token (); @@ -1350,11 +1347,8 @@ void ship_out_(halfword p) (mem[p + 1].cint + eqtb[(hash_size + 3748)].cint > 1073741823L)) { print_err("Huge page cannot be shipped out"); - { - help_ptr = 2; - help_line[1]= 828; /* The page just created is more than 18 feet tall or */ - help_line[0]= 829; /* more than 18 feet wide, so I suspect something went wrong. */ - } + help2("The page just created is more than 18 feet tall or", + "more than 18 feet wide, so I suspect something went wrong."); error (); if(eqtb[(hash_size + 3197)].cint <= 0) { diff --git a/src/texsourc/tex5.c b/src/texsourc/tex5.c index 2fb538b..c5fbcd4 100644 --- a/src/texsourc/tex5.c +++ b/src/texsourc/tex5.c @@ -196,13 +196,10 @@ void fetch_(halfword a) print(878); /* is undefined (character */ print(cur_c); print_char(41); /*)*/ - { - help_ptr = 4; - help_line[3]= 879; /* Somewhere in the math formula just ended, you used the */ - help_line[2]= 880; /* stated character from an undefined font family. For example, */ - help_line[1]= 881; /* plain TeX doesn't allow \it or \sl in subscripts. Proceed, */ - help_line[0]= 882; /* and I'll try to forget that I needed that character. */ - } + help4("Somewhere in the math formula just ended, you used the", + "stated character from an undefined font family. For example,", + "plain TeX doesn't allow \\it or \\sl in subscripts. Proceed,", + "and I'll try to forget that I needed that character."); error (); cur_i = null_character; mem[a].hh.v.RH = 0; @@ -1130,12 +1127,9 @@ void init_align (void) print_err("Improper "); print_esc(517); /* halign */ print(888); /* inside $$ */ - { - help_ptr = 3; - help_line[2]= 889; /* Displays can use special alignments (like \eqalignno) */ - help_line[1]= 890; /* only if nothing but the alignment itself is between $$'s. */ - help_line[0]= 891; /* So I've deleted the formulas that preceded this alignment. */ - } + help3("Displays can use special alignments (like \eqalignno)", + "only if nothing but the alignment itself is between $$'s.", + "So I've deleted the formulas that preceded this alignment."); error (); flush_math (); } @@ -1171,12 +1165,9 @@ void init_align (void) cur_loop = cur_align; else { print_err("Missing # inserted in alignment preamble"); - { - help_ptr = 3; - help_line[2]= 898; /* There should be exactly one # between &'s, when an */ - help_line[1]= 899; /* \halign or \valign is being set up. In this case you had */ - help_line[0]= 900; /* none, so I've put one in; maybe that will work. */ - } + help3("There should be exactly one # between &'s, when an", + "\\halign or \\valign is being set up. In this case you had", + "none, so I've put one in; maybe that will work."); back_error (); goto lab31; } @@ -1203,12 +1194,9 @@ lab22: if(cur_cmd == 6) { print_err("Only one # is allowed per tab"); - { - help_ptr = 3; - help_line[2]= 898; /* There should be exactly one # between &'s, when an */ - help_line[1]= 899; /* \halign or \valign is being set up. In this case you had */ - help_line[0]= 902; /* more than one, so I'm ignoring all but the first. */ - } + help3("There should be exactly one # between &'s, when an", + "\\halign or \\valign is being set up. In this case you had", + "more than one, so I'm ignoring all but the first."); error (); goto lab22; } @@ -1577,11 +1565,8 @@ void fin_align (void) do_assignments (); if(cur_cmd != 3) { print_err("Missing $$ inserted"); - { - help_ptr = 2; - help_line[1]= 889; /* Displays can use special alignments (like \eqalignno) */ - help_line[0]= 890; /* only if nothing but the alignment itself is between $$'s. */ - } + help2("Displays can use special alignments (like \\eqalignno)", + "only if nothing but the alignment itself is between $$'s."); back_error (); } else { @@ -1589,12 +1574,9 @@ void fin_align (void) get_x_token (); if(cur_cmd != 3) { - print_err("Display math should end with $$"); - { - help_ptr = 2; - help_line[1]= 1161; /* The `$' that I just saw supposedly matches a previous `$$'. */ - help_line[0]= 1162; /* So I shall assume that you typed `$$' both times. */ - } + print_err("Display math should end with $$"); + help2("The `$' that I just saw supposedly matches a previous `$$'.", + "So I shall assume that you typed `$$' both times."); back_error (); } } @@ -1702,12 +1684,9 @@ bool fin_col (void) else { print_err("Extra alignment tab has been changed to "); print_esc(893); /* cr */ - { - help_ptr = 3; - help_line[2]= 905; /* You have given more \span or & marks than there were */ - help_line[1]= 906; /* in the preamble to the \halign or \valign now in progress. */ - help_line[0]= 907; /* So I'll assume that you meant to type \cr instead. */ - } + help3("You have given more \\span or & marks than there were", + "in the preamble to the \\halign or \\valign now in progress.", + "So I'll assume that you meant to type \\cr instead."); /* extra_info(cur_align) < cr_code) ? */ mem[cur_align + 5].hh.v.LH = 257; error (); diff --git a/src/texsourc/tex6.c b/src/texsourc/tex6.c index b1e1a49..5d4da00 100644 --- a/src/texsourc/tex6.c +++ b/src/texsourc/tex6.c @@ -51,14 +51,11 @@ halfword finite_shrink_(halfword p) if(noshrinkerroryet){ noshrinkerroryet = false; print_err("Infinite glue shrinkage found in a paragraph"); - { - help_ptr = 5; - help_line[4]= 912; /* The paragraph just ended includes some glue that has */ - help_line[3]= 913; /* infinite shrinkability, e.g., `\hskip 0pt minus 1fil'. */ - help_line[2]= 914; /* Such glue doesn't belong there---it allows a paragraph */ - help_line[1]= 915; /* of any length to fit on one line. But it's safe to proceed, */ - help_line[0]= 916; /* since the offensive shrinkability has been made finite. */ - } + help5("The paragraph just ended includes some glue that has", + "infinite shrinkability, e.g., `\hskip 0pt minus 1fil'.", + "Such glue doesn't belong there---it allows a paragraph", + "of any length to fit on one line. But it's safe to proceed,", + "since the offensive shrinkability has been made finite."); error (); } q = new_spec(p); @@ -1448,11 +1445,8 @@ lab21: switch(cur_cmd){ if(eqtb[(hash_size + 2139) + cur_chr].hh.v.RH == 0) { print_err("Not a letter"); - { - help_ptr = 2; - help_line[1]= 940; /* Letters in \hyphenation words must have \lccode>0. */ - help_line[0]= 941; /* Proceed; I'll ignore the character I just read. */ - } + help2("Letters in \\hyphenation words must have \\lccode>0.", + "Proceed; I'll ignore the character I just read."); error (); } else if(n < 63) @@ -1565,11 +1559,8 @@ lab21: switch(cur_cmd){ print_err("Improper "); print_esc(935); /* hyphenation */ print(936); /* will be flushed */ - { - help_ptr = 2; - help_line[1]= 937; /* Hyphenation exceptions must contain only letters */ - help_line[0]= 938; /* and hyphens. But continue; I'll forgive and forget. */ - } + help2("Hyphenation exceptions must contain only letters", + "and hyphens. But continue; I'll forgive and forget."); error (); } break; @@ -1730,13 +1721,10 @@ halfword vert_break_(halfword p, scaled h, scaled d) if((mem[q].hh.b1 != 0)&&(mem[q + 3].cint != 0)) { print_err("Infinite glue shrinkage found in box being split"); - { - help_ptr = 4; - help_line[3]= 956; /* The box you are \vsplitting contains some infinitely */ - help_line[2]= 957; /* shrinkable glue, e.g., `\vss' or `\vskip 0pt minus 1fil'. */ - help_line[1]= 958; /* Such glue doesn't belong there; but you can safely proceed, */ - help_line[0]= 916; /* since the offensive shrinkability has been made finite. */ - } + help4("The box you are \\vsplitting contains some infinitely", + "shrinkable glue, e.g., `\\vss' or `\\vskip 0pt minus 1fil'.", + "Such glue doesn't belong there; but you can safely proceed,", + "since the offensive shrinkability has been made finite."); error (); r = new_spec(q); mem[r].hh.b1 = 0; @@ -1783,11 +1771,8 @@ halfword vsplit_(eight_bits n, scaled h) print_esc(959); /* vsplit */ print(960); /* needs a */ print_esc(961); /* vbox */ - { - help_ptr = 2; - help_line[1]= 962; /* The box you are trying to split is an \hbox. */ - help_line[0]= 963; /* I can't split such a box, so I'll leave it alone. */ - } + help2("The box you are trying to split is an \\hbox.", + "I can't split such a box, so I'll leave it alone."); error (); Result = 0; return(Result); @@ -1904,12 +1889,9 @@ void ensure_vbox_(eight_bits n) if(mem[p].hh.b0 == 0) { print_err("Insertions can only be added to a vbox"); - { - help_ptr = 3; - help_line[2]= 984; /* Tut tut: You're trying to \insert into a */ - help_line[1]= 985; /* \box register that now contains an \hbox. */ - help_line[0]= 986; /* Proceed, and I'll discard its present contents. */ - } + help3("Tut tut: You're trying to \\insert into a", + "\\box register that now contains an \\hbox.", + "Proceed, and I'll discard its present contents."); box_error(n); } } @@ -1946,11 +1928,8 @@ void fire_up_(halfword c) print_err(""); print_esc(406); /* box */ print(997); /* 255 is not void */ - { - help_ptr = 2; - help_line[1]= 998; /* You shouldn't use \box255 except in \output routines. */ - help_line[0]= 986; /* Proceed, and I'll discard its present contents. */ - } + help2("You shouldn't use \\box255 except in \\output routines.", + "Proceed, and I'll discard its present contents."); box_error(255); } insert_penalties = 0; @@ -2118,12 +2097,9 @@ void fire_up_(halfword c) print_err("Output loop---"); print_int(dead_cycles); print(1000); /* consecutive dead cycles */ - { - help_ptr = 3; - help_line[2]= 1001; /* I've concluded that your \output is awry; it never does */ - help_line[1]= 1002; /* \ship_out, so I'm shipping \box255 out myself. Next */ - help_line[0]= 1003; /* increase \maxdeadcycles if you want me to be more patient! */ - } + help3("I've concluded that your \\output is awry; it never does", + "\\ship_out, so I'm shipping \box255 out myself. Next ", + "increase \\maxdeadcycles if you want me to be more patient!"); error (); } else { diff --git a/src/texsourc/tex7.c b/src/texsourc/tex7.c index 382d075..f15ac72 100644 --- a/src/texsourc/tex7.c +++ b/src/texsourc/tex7.c @@ -150,12 +150,9 @@ void build_page (void) print_err("Infinite glue shrinkage inserted from"); print_esc(392); /* skip*/ print_int(n); - { - help_ptr = 3; - help_line[2]= 993; /* The correction glue for page breaking with insertions */ - help_line[1]= 994; /* must have finite shrinkability. But you may proceed, */ - help_line[0]= 916; /* since the offensive shrinkability has been made finite. */ - } + help3("The correction glue for page breaking with insertions", + "must have finite shrinkability. But you may proceed,", + "since the offensive shrinkability has been made finite."); error (); } } @@ -307,13 +304,10 @@ void build_page (void) if((mem[q].hh.b1 != 0)&&(mem[q + 3].cint != 0)) { print_err("Infinite glue shrinkage found on current page"); - { - help_ptr = 4; - help_line[3]= 989; /* The page about to be output contains some infinitely */ - help_line[2]= 957; /* shrinkable glue, e.g., `\vss' or `\vskip 0pt minus 1fil'. */ - help_line[1]= 958; /* Such glue doesn't belong there; but you can safely proceed, */ - help_line[0]= 916; /* since the offensive shrinkability has been made finite. */ - } + help4("The page about to be output contains some infinitely", + "shrinkable glue, e.g., `\\vss' or `\\vskip 0pt minus 1fil'.", + "Such glue doesn't belong there; but you can safely proceed,", + "since the offensive shrinkability has been made finite."); error (); r = new_spec(q); mem[r].hh.b1 = 0; @@ -383,11 +377,8 @@ void insert_dollar_sign (void) back_input (); cur_tok = 804; print_err("Proceed; I'll discard its present contents."); - { - help_ptr = 2; - help_line[1]= 1012; /* I've inserted a begin-math/end-math symbol since I think */ - help_line[0]= 1013; /* you left one out. Proceed, with fingers crossed. */ - } + help2("I've inserted a begin-math/end-math symbol since I think", + "you left one out. Proceed, with fingers crossed."); ins_error (); } /* sec 1049 */ @@ -401,14 +392,11 @@ void you_cant (void) /* sec 1050 */ void report_illegal_case (void) { - you_cant (); - { - help_ptr = 4; - help_line[3]= 1015; /* Sorry, but I'm not programmed to handle this case; */ - help_line[2]= 1016; /* I'll just pretend that you didn't ask for it. */ - help_line[1]= 1017; /* If you're in the wrong mode, you might be able to */ - help_line[0]= 1018; /* return to the right one by typing `I}' or `I$' or `I\par'. */ - } + you_cant (); + 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'."); error (); } /* sec 1051 */ @@ -508,11 +496,8 @@ void off_save (void) if(cur_group == 0) { print_err("Extra "); - print_cmd_chr(cur_cmd, cur_chr); - { - help_ptr = 1; - help_line[0]= 1037; /* Things are pretty mixed up, but I think the worst is over. */ - } + print_cmd_chr(cur_cmd, cur_chr); + help1("Things are pretty mixed up, but I think the worst is over."); error (); } else { @@ -555,15 +540,12 @@ void off_save (void) break; } print(623); /* inserted */ - begin_token_list(mem[mem_top - 3].hh.v.RH, 4); - { - help_ptr = 5; - help_line[4]= 1031; /* I've inserted something that you may have forgotten. */ - help_line[3]= 1032; /* (See the above.) */ - help_line[2]= 1033; /* With luck, this will get me unwedged. But if you */ - help_line[1]= 1034; /* really didn't forget anything, try typing `2' now; then */ - help_line[0]= 1035; /* my insertion and my current dilemma will both disappear. */ - } + begin_token_list(mem[mem_top - 3].hh.v.RH, 4); + help5("I've inserted something that you may have forgotten.", + "(See the above.)", + "With luck, this will get me unwedged. But if you", + "really didn't forget anything, try typing `2' now; then", + "my insertion and my current dilemma will both disappear."); error (); } } @@ -582,15 +564,12 @@ void extra_right_brace (void) case 16 : print_esc(871); /* right */ break; - } - { - help_ptr = 5; - help_line[4]= 1043; /* I've deleted a group-closing symbol because it seems to be */ - help_line[3]= 1044; /* spurious, as in `$x}$'. But perhaps the } is legitimate and */ - help_line[2]= 1045; /* you forgot something else, as in `\hbox{$x}'. In such cases */ - help_line[1]= 1046; /* the way to recover is to insert both the forgotten and the */ - help_line[0]= 1047; /* deleted material, e.g., by typing `I$}'. */ - } + } + help5("I've deleted a group-closing symbol because it seems to be", + "spurious, as in `$x}$'. But perhaps the } is legitimate and", + "you forgot something else, as in `\hbox{$x}'. In such cases", + "the way to recover is to insert both the forgotten and the", + "deleted material, e.g., by typing `I$}'."); error (); incr(align_state); } @@ -684,12 +663,9 @@ void box_end_(integer boxcontext) } else { print_err("Leaders not followed by proper glue"); - { - help_ptr = 3; - help_line[2]= 1061; /* You should say `\leaders '. */ - help_line[1]= 1062; /* I found the , but there's no suitable */ - help_line[0]= 1063; /* , so I'm ignoring these leaders. */ - } + help3("You should say `\\leaders '.", + "I found the , but there's no suitable", + ", so I'm ignoring these leaders."); back_error (); flush_node_list(cur_box); } @@ -723,22 +699,16 @@ void begin_box_(integer boxcontext) cur_box = 0; if(abs(mode)== 203) { - you_cant (); - { - help_ptr = 1; - help_line[0]= 1064; /* Sorry; this \lastbox will be void. */ - } + you_cant (); + help1("Sorry; this \\lastbox will be void."); error (); } else if((mode == 1)&&(head == cur_list .tail_field)) { - you_cant (); - { - help_ptr = 2; - help_line[1]= 1065; /* Sorry...I usually can't take things from the current page. */ - help_line[0]= 1066; /* This \lastbox will therefore be void. */ - } + you_cant (); + help2("Sorry...I usually can't take things from the current page.", + "This \\lastbox will therefore be void."); error (); } else { @@ -781,11 +751,8 @@ void begin_box_(integer boxcontext) if(! scan_keyword(836)) /* to */ { print_err("Missing `to' inserted"); - { - help_ptr = 2; - help_line[1]= 1068; /* I'm working on `\vsplit to '; */ - help_line[0]= 1069; /* will look for the next. */ - } + help2("I'm working on `\\vsplit to ';", + "will look for the next."); error (); } scan_dimen(false, false, false); @@ -850,12 +817,9 @@ void scan_box_(integer boxcontext) } else { print_err("A was supposed to be here"); - { - help_ptr = 3; - help_line[2]= 1071; /* I was expecting to see \hbox or \vbox or \copy or \box or */ - help_line[1]= 1072; /* something like that. So you might find something missing in */ - help_line[0]= 1073; /* your output. But keep trying; you can fix this later. */ - } + help3("I was expecting to see \\hbox or \\vbox or \\copy or \\box or", + "something like that. So you might find something missing in", + "your output. But keep trying; you can fix this later."); back_error (); } } @@ -949,11 +913,8 @@ void head_for_vmode (void) print_err("You can't use `"); print_esc(518); /* hrule */ print(1076); /* ' here except with leaders */ - { - help_ptr = 2; - help_line[1]= 1077; /* To put a horizontal rule in an hbox or an alignment, */ - help_line[0]= 1078; /* you should use \leaders or \hrulefill (see The TeXbook). */ - } + help2("To put a horizontal rule in an hbox or an alignment,", + "you should use \\leaders or \\hrulefill (see The TeXbook)."); error (); } else { @@ -989,11 +950,8 @@ void begin_insert_or_adjust (void) { print_err("You can't "); print_esc(327); /* insert */ - print_int(255); - { - help_ptr = 1; - help_line[0]= 1080; /* I'm changing to \insert0; box 255 is special. */ - } + print_int(255); + help1("I'm changing to \\insert0; box 255 is special."); error (); cur_val = 0; } @@ -1043,16 +1001,13 @@ void delete_last (void) /* if((cur_chr != 10)||(last_glue != 262143L)) */ if((cur_chr != 10)||(last_glue != empty_flag)) { - you_cant (); - { - help_ptr = 2; - help_line[1]= 1065; /* Sorry...I usually can't take things from the current page. */ - help_line[0]= 1081; /* Try `I\vskip-\lastskip' instead. */ - } + you_cant (); + help2("Sorry...I usually can't take things from the current page.", + "Try `I\\vskip-\\lastskip' instead."); if(cur_chr == 11) - help_line[0]=(1082); /* Try `I\kern-\last_kern' instead. */ + help_line[0] = "Try `I\\kern-\\last_kern' instead."; else if(cur_chr != 10) - help_line[0]=(1083); /* Perhaps you can make the output routine do it. */ + help_line[0] = "Perhaps you can make the output routine do it."; error (); } } @@ -1103,12 +1058,9 @@ void unpackage (void) 102)&&(mem[p].hh.b0 != 0))) { print_err("Incompatible list can't be unboxed"); - { - help_ptr = 3; - help_line[2]= 1092; /* Sorry, Pandora. (You sneaky devil.) */ - help_line[1]= 1093; /* I refuse to unbox an \hbox in vertical mode or vice versa. */ - help_line[0]= 1094; /* And I can't open any boxes in math mode. */ - } + help3("Sorry, Pandora. (You sneaky devil.)", + "I refuse to unbox an \hbox in vertical mode or vice versa.", + "And I can't open any boxes in math mode."); error (); return; } @@ -1191,10 +1143,7 @@ void build_discretionary (void) if(mem[p].hh.b0 != 6) { print_err("Improper discretionary list"); - { - help_ptr = 1; - help_line[0]= 1102; /* Discretionary lists must contain only boxes and kerns. */ - } + help1("Discretionary lists must contain only boxes and kerns."); error (); begin_diagnostic (); print_nl(1103); /* The following discretionary sublist has been deleted: */ @@ -1224,11 +1173,8 @@ void build_discretionary (void) { print_err("Illegal math "); print_esc(346); /* discretionary */ - { - help_ptr = 2; - help_line[1]= 1096; /* Sorry: The third part of a discretionary break must be */ - help_line[0]= 1097; /* empty, in math formulas. I had to delete your third part. */ - } + help2("Sorry: The third part of a discretionary break must be", + "empty, in math formulas. I had to delete your third part."); flush_node_list(p); n = 0; error (); @@ -1240,11 +1186,8 @@ void build_discretionary (void) mem[tail].hh.b1 = n; else { print_err("Discretionary list is too long"); - { - help_ptr = 2; - help_line[1]= 1099; /* Wow---I never thought anybody would tweak me here. */ - help_line[0]= 1100; /* You can't seriously need such a huge discretionary list? */ - } + help2("Wow---I never thought anybody would tweak me here.", + "You can't seriously need such a huge discretionary list?"); error (); } if(n > 0) @@ -1323,25 +1266,19 @@ void align_error (void) print_err("Misplaced "); print_cmd_chr(cur_cmd, cur_chr); if(cur_tok == 1062) { - { - help_ptr = 6; - help_line[5]= 1109; /* I can't figure out why you would want to use a tab mark */ - help_line[4]= 1110; /* here. If you just want an ampersand, the remedy is */ - help_line[3]= 1111; /* simple: Just type `I\&' now. But if some right brace */ - help_line[2]= 1112; /* up above has ended a previous alignment prematurely, */ - help_line[1]= 1113; /* you're probably due for more error messages, and you */ - help_line[0]= 1114; /* might try typing `S' now just to see what is salvageable. */ - } + help6("I can't figure out why you would want to use a tab mark", + "here. If you just want an ampersand, the remedy is", + "simple: Just type `I\\&' now. But if some right brace", + "up above has ended a previous alignment prematurely,", + "you're probably due for more error messages, and you", + "might try typing `S' now just to see what is salvageable."); } else { - { - help_ptr = 5; - help_line[4]= 1109; /* I can't figure out why you would want to use a tab mark */ - help_line[3]= 1115; /* or \cr or \span just now. If something like a right brace */ - help_line[2]= 1112; /* up above has ended a previous alignment prematurely, */ - help_line[1]= 1113; /* you're probably due for more error messages, and you */ - help_line[0]= 1114; /* might try typing `S' now just to see what is salvageable. */ - } + help5("I can't figure out why you would want to use a tab mark", + "or \\cr or \\span just now. If something like a right brace", + "up above has ended a previous alignment prematurely,", + "you're probably due for more error messages, and you", + "might try typing `S' now just to see what is salvageable."); } error (); } @@ -1356,13 +1293,10 @@ void align_error (void) print_err("Missing } inserted"); decr(align_state); cur_tok = 637; - } - { - help_ptr = 3; - help_line[2]= 1105; /* I've put in what seems to be necessary to fix */ - help_line[1]= 1106; /* the current column of the current alignment. */ - help_line[0]= 1107; /* Try to go on, since this might almost work. */ - } + } + help3("I've put in what seems to be necessary to fix", + "the current column of the current alignment.", + "Try to go on, since this might almost work."); ins_error (); } } @@ -1371,11 +1305,8 @@ void noalign_error (void) { print_err("Misplaced "); print_esc(524); /* noalign */ - { - help_ptr = 2; - help_line[1]= 1116; /* I expect to see \noalign only after the \cr of */ - help_line[0]= 1117; /* an alignment. Proceed, and I'll ignore this case. */ - } + help2("I expect to see \\noalign only after the \\cr of", + "an alignment. Proceed, and I'll ignore this case."); error (); } /* only called from tex8.c */ @@ -1384,11 +1315,8 @@ void omit_error (void) { print_err("Misplaced "); print_esc(527); /* omit */ - { - help_ptr = 2; - help_line[1]= 1118; /* I expect to see \omit only after tab marks or the \cr of */ - help_line[0]= 1117; /* an alignment. Proceed, and I'll ignore this case. */ - } + help2("I expect to see \\omit only after tab marks or the \\cr of", + "an alignment. Proceed, and I'll ignore this case."); error (); } /* sec 1131 */ @@ -1406,10 +1334,7 @@ void cs_error (void) { print_err("Extra "); print_esc(502); /* endcsname */ - { - help_ptr = 1; - help_line[0]= 1120; /* I'm ignoring this, since I wasn't doing a \csname. */ - } + help1("I'm ignoring this, since I wasn't doing a \\csname."); error (); } /* sec 1136 */ @@ -1696,10 +1621,7 @@ void math_limit_switch (void) return; } print_err("Limit controls must follow a math operator"); - { - help_ptr = 1; - help_line[0]= 1125; /* I'm ignoring this misplaced \limits or \nolimits command. */ - } + help1("I'm ignoring this misplaced \\limits or \\nolimits command."); error (); } /* sec 1160 */ @@ -1729,15 +1651,12 @@ void scan_delimiter_(halfword p, bool r) if(cur_val < 0) { print_err("Missing delimiter (. inserted)"); - { - help_ptr = 6; - help_line[5]= 1127; /* I was expecting to see something like `(' or `\{' or */ - help_line[4]= 1128; /* `\}' here. If you typed, e.g., `{' instead of `\{', you */ - help_line[3]= 1129; /* should probably delete the `{' by typing `1' now, so that */ - help_line[2]= 1130; /* braces don't get unbalanced. Otherwise just proceed. */ - help_line[1]= 1131; /* Acceptable delimiters are characters whose \delcode is */ - help_line[0]= 1132; /* nonnegative, or you can use `\delimiter '. */ - } + help6("I was expecting to see something like `(' or `\\{' or", + "`\\}' here. If you typed, e.g., `{' instead of `\\{', you", + "should probably delete the `{' by typing `1' now, so that", + "braces don't get unbalanced. Otherwise just proceed.", + "Acceptable delimiters are characters whose \\delcode is", + "nonnegative, or you can use `\\delimiter '."); back_error (); cur_val = 0; } @@ -1774,11 +1693,8 @@ void math_ac (void) print_err("Please use "); print_esc(520); /* mathaccent */ print(1134); /* for accents in math mode */ - { - help_ptr = 2; - help_line[1]= 1135; /* I'm changing \accent to \mathaccent here; wish me luck. */ - help_line[0]= 1136; /* (Accents are not the same in formulas as they are in text.) */ - } + help2("I'm changing \accent to \mathaccent here; wish me luck.", + "(Accents are not the same in formulas as they are in text.)"); error (); } { @@ -1901,17 +1817,11 @@ void sub_sup (void) if(cur_cmd == 7) { print_err("Double superscript"); - { - help_ptr = 1; - help_line[0]= 1138; /* I treat `x^1^2' essentially like `x^1{}^2'. */ - } + help1("I treat `x^1^2' essentially like `x^1{}^2'."); } else { print_err("Double subscript"); - { - help_ptr = 1; - help_line[0]= 1140; /* I treat `x_1_2' essentially like `x_1{}_2'. */ - } + help1("I treat `x_1_2' essentially like `x_1{}_2'."); } error (); } diff --git a/src/texsourc/tex8.c b/src/texsourc/tex8.c index 2da4370..378271f 100644 --- a/src/texsourc/tex8.c +++ b/src/texsourc/tex8.c @@ -41,12 +41,9 @@ void math_fraction (void) if(c % 3 == 0) scan_dimen(false, false, false); print_err("Ambiguous; you need another { and }"); - { - help_ptr = 3; - help_line[2]= 1148; /* I'm ignoring this fraction specification, since I don't */ - help_line[1]= 1149; /* know whether a construction like `x \over y \over z' */ - help_line[0]= 1150; /* means `{x \over y} \over z' or `x \over {y \over z}'. */ - } + help3("I'm ignoring this fraction specification, since I don't", + "know whether a construction like `x \\over y \\over z'", + "means `{x \\over y} \\over z' or `x \\over {y \\over z}'."); error (); } else { @@ -96,10 +93,7 @@ void math_left_right (void) scan_delimiter(mem_top - 12, false); print_err("Extra "); print_esc(871); /* right */ - { - help_ptr = 1; - help_line[0]= 1151; /* I'm ignoring a \right that had no matching \left. */ - } + help1("I'm ignoring a \\right that had no matching \\left."); error (); } else { @@ -155,12 +149,9 @@ void after_math (void) (font_params[eqtb[(hash_size + 1869)].hh.v.RH]< 22)) { print_err("Math formula deleted: Insufficient symbol fonts"); - { - help_ptr = 3; - help_line[2]= 1153; /* Sorry, but I can't typeset math unless \textfont Sorry, but I can't typeset math unless \textfont 2 */ - help_line[1]= 1154; /* and \scriptfont 2 and \scriptscriptfont 2 have and \scriptfont 2 and \scriptscriptfont 2 have all */ - help_line[0]= 1155; /* the \fontdimen values needed in math symbol the \fontdimen values needed in math symbol fonts.. */ - } + help3("Sorry, but I can't typeset math unless \\textfont Sorry, but I can't typeset math unless \\textfont 2", + "and \\scriptfont 2 and \\scriptscriptfont 2 have and \\scriptfont 2 and \\scriptscriptfont 2 have all", + "the \\fontdimen values needed in math symbol the \\fontdimen values needed in math symbol fonts.."); error (); flush_math (); danger = true; @@ -170,12 +161,9 @@ void after_math (void) (font_params[eqtb[(hash_size + 1870)].hh.v.RH]< 13)) { print_err("Math formula deleted: Insufficient extension fonts"); - { - help_ptr = 3; - help_line[2]= 1157; /* Sorry, but I can't typeset math unless \textfont 3 */ - help_line[1]= 1158; /* and \scriptfont 3 and \scriptscriptfont 3 have all */ - help_line[0]= 1159; /* the \fontdimen values needed in math extension fonts. */ - } + help3("Sorry, but I can't typeset math unless \\textfont 3", + "and \\scriptfont 3 and \\scriptscriptfont 3 have all", + "the \\fontdimen values needed in math extension fonts."); error (); flush_math (); danger = true; @@ -190,11 +178,8 @@ void after_math (void) if(cur_cmd != 3) { print_err("Display math should end with $$"); - { - help_ptr = 2; - help_line[1]= 1161; /* The `$' that I just saw supposedly matches a previous `$$'. */ - help_line[0]= 1162; /* So I shall assume that you typed `$$' both times. */ - } + help2("The `$' that I just saw supposedly matches a previous `$$'.", + "So I shall assume that you typed `$$' both times."); back_error (); } } @@ -213,12 +198,9 @@ void after_math (void) (font_params[eqtb[(hash_size + 1869)].hh.v.RH]< 22)) { print_err("Math formula deleted: Insufficient symbol fonts"); - { - help_ptr = 3; - help_line[2]= 1153; /* Sorry, but I can't typeset math unless \textfont 2 */ - help_line[1]= 1154; /* and \scriptfont 2 and \scriptscriptfont 2 have all */ - help_line[0]= 1155; /* the \fontdimen values needed in math symbol fonts. */ - } + help3("Sorry, but I can't typeset math unless \\textfont 2", + "and \\scriptfont 2 and \\scriptscriptfont 2 have all", + "the \\fontdimen values needed in math symbol fonts."); error (); flush_math (); danger = true; @@ -228,12 +210,9 @@ void after_math (void) (font_params[eqtb[(hash_size + 1870)].hh.v.RH]< 13)) { print_err("Math formula deleted: Insufficient extension fonts"); - { - help_ptr = 3; - help_line[2]= 1157; /* Sorry, but I can't typeset math unless \textfont 3 */ - help_line[1]= 1158; /* and \scriptfont 3 and \scriptscriptfont 3 have all */ - help_line[0]= 1159; /* the \fontdimen values needed in math extension fonts. */ - } + help3("Sorry, but I can't typeset math unless \\textfont 3", + "and \\scriptfont 3 and \\scriptscriptfont 3 have all", + "the \\fontdimen values needed in math extension fonts."); error (); flush_math (); danger = true; @@ -271,11 +250,8 @@ void after_math (void) get_x_token (); if(cur_cmd != 3) { print_err("Display math should end with $$"); - { - help_ptr = 2; - help_line[1]= 1161; /* The `$' that I just saw supposedly matches a previous `$$'. */ - help_line[0]= 1162; /* So I shall assume that you typed `$$' both times. */ - } + help2("The `$' that I just saw supposedly matches a previous `$$'.", + "So I shall assume that you typed `$$' both times."); back_error (); } } @@ -450,14 +426,11 @@ lab20: /* if((cur_cs == 0)||(cur_cs > (hash_size + 514))) */ /* 95/Jan/10 */ if((cur_cs == 0)||(cur_cs > (hash_size + hash_extra + 514))) { print_err("Missing control sequence inserted"); - { - help_ptr = 5; - help_line[4]= 1179; /* Please don't say `\def cs{...}', say `\def\cs{...}'. */ - help_line[3]= 1180; /* I've inserted an inaccessible control sequence so that your */ - help_line[2]= 1181; /* definition will be completed without mixing me up too badly. */ - help_line[1]= 1182; /* You can recover graciously from this error, if you're */ - help_line[0]= 1183; /* careful; see exercise 27.2 in The TeXbook. */ - } + 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."); if(cur_cs == 0) back_input (); /* cur_tok = (hash_size + 4609); */ @@ -500,10 +473,7 @@ void do_register_command_ (small_number a) print_cmd_chr(cur_cmd, cur_chr); print(683); /* ' after */ print_cmd_chr(q, 0); - { - help_ptr = 1; - help_line[0]= 1204; /* I'm forgetting what you said and not changing anything. */ - } + help1("I'm forgetting what you said and not changing anything."); error (); return; } @@ -606,11 +576,8 @@ void do_register_command_ (small_number a) } if(arith_error){ print_err("Arithmetic overflow"); - { - help_ptr = 2; - help_line[1]= 1202; /* I can't carry out that multiplication or division, */ - help_line[0]= 1203; /* since the result is out of range. */ - } + help2("I can't carry out that multiplication or division,", + "since the result is out of range."); error (); return; } @@ -647,10 +614,7 @@ void alter_aux (void) if((cur_val <= 0)||(cur_val > 32767)) { print_err("Bad space factor"); - { - help_ptr = 1; - help_line[0]= 1208; /* I allow only values in the range 1..32767 here. */ - } + help1("I allow only values in the range 1..32767 here."); int_error(cur_val); } else space_factor = cur_val; @@ -670,10 +634,7 @@ void alter_prev_graf (void) { print_err("Bad "); print_esc(529); /* prevgraf */ - { - help_ptr = 1; - help_line[0]= 1209; /* I allow only nonnegative values here. */ - } + help1("I allow only nonnegative values here."); int_error(cur_val); } else { @@ -774,11 +735,8 @@ void new_font_(small_number a) print_err("Improper `at' size("); print_scaled(s); print(1217); /* pt), replaced by 10pt */ - { - help_ptr = 2; - help_line[1]= 1218; /* I can only handle fonts at positive sizes that are */ - help_line[0]= 1219; /* less than 2048pt, so I've changed what you said to 10pt. */ - } + help2("I can only handle fonts at positive sizes that are", + "less than 2048pt, so I've changed what you said to 10pt."); error (); s = 10 * 65536L; /* 10pt */ } @@ -789,10 +747,7 @@ void new_font_(small_number a) s = - (integer) cur_val; if((cur_val <= 0)||(cur_val > 32768L)) { print_err("Illegal magnification has been changed to 1000"); - { - help_ptr = 1; - help_line[0]= 550; /* The magnification ratio must be between 1 and 32768. */ - } + help1("The magnification ratio must be between 1 and 32768."); int_error(cur_val); s = -1000; } @@ -1015,21 +970,15 @@ void issue_message (void) if(eqtb[(hash_size + 1321)].hh.v.RH != 0) use_err_help = true; else if(long_help_seen) - { - help_ptr = 1; - help_line[0]= 1226; /* (That was another \errmessage.) */ - } + help1("(That was another \\errmessage.)"); else { if(interaction < 3) long_help_seen = true; - { - help_ptr = 4; - help_line[3]= 1227; /* This error message was generated by an \errmessage */ - help_line[2]= 1228; /* command, so I can't give any explicit help. */ - help_line[1]= 1229; /* Pretend that you're Hercule Poirot: Examine all clues, */ - help_line[0]= 1230; /* and deduce the truth by order and method. */ - } + help4("This error message was generated by an \\errmessage", + "command, so I can't give any explicit help.", + "Pretend that you're Hercule Poirot: Examine all clues,", + "and deduce the truth by order and method."); } error (); use_err_help = false; @@ -1136,23 +1085,16 @@ void show_whatever (void) } else if(eqtb[(hash_size + 3192)].cint > 0) { - { - help_ptr = 3; - help_line[2]= 1237; /* This isn't an error message; I'm just \showing something. */ - help_line[1]= 1238; /* Type `I\show...' to show more (e.g., \show\cs, */ - help_line[0]= 1239; /* \showthe\count10, \showbox255, \showlists). */ - } + help3("This isn't an error message; I'm just \\showing something.", + "Type `I\\show...' to show more (e.g., \\show\\cs,", + "\\showthe\\count10, \\showbox255, \\showlists)."); } else { - - { - help_ptr = 5; - help_line[4]= 1237; /* This isn't an error message; I'm just \showing something. */ - help_line[3]= 1238; /* Type `I\show...' to show more (e.g., \show\cs, */ - help_line[2]= 1239; /* \showthe\count10, \showbox255, \showlists). */ - help_line[1]= 1240; /* And type `I\tracingonline=1\show...' to show boxes and */ - help_line[0]= 1241; /* lists on your terminal as well as in the transcript file. */ - } + help5("This isn't an error message; I'm just \\showing something.", + "Type `I\\show...' to show more (e.g., \\show\\cs,", + "\\showthe\\count10, \\showbox255, \\showlists).", + "And type `I\\tracingonline=1\\show...' to show boxes and", + "lists on your terminal as well as in the transcript file."); } error (); } @@ -1296,11 +1238,8 @@ void handle_right_brace (void) case 0 : { print_err("Too many }'s"); - { - help_ptr = 2; - help_line[1]= 1039; /* You've closed more groups than you opened. */ - help_line[0]= 1040; /* Such booboos are generally harmless, so keep going. */ - } + help2("You've closed more groups than you opened.", + "Such booboos are generally harmless, so keep going."); error (); } break; @@ -1380,11 +1319,8 @@ void handle_right_brace (void) cur_input.index_field != 3))) { print_err("Unbalanced output routine"); - { - help_ptr = 2; - help_line[1]= 1005; /* Your sneaky output routine has problematic {'s and/or }'s. */ - help_line[0]= 1006; /* I can't handle that very well; good luck. */ - } + help2("Your sneaky output routine has problematic {'s and/or }'s.", + "I can't handle that very well; good luck."); error (); do { get_token (); @@ -1400,12 +1336,9 @@ void handle_right_brace (void) print_err("Output routine didn't use all of "); print_esc(406); /* box */ print_int(255); - { - help_ptr = 3; - help_line[2]= 1008; /* Your \output commands should empty \box255, */ - help_line[1]= 1009; /* e.g., by saying `\ship_out\box255'. */ - help_line[0]= 1010; /* Proceed; I'll discard its present contents. */ - } + help3("Your \\output commands should empty \\box255,", + "e.g., by saying `\\ship_out\\box255'.", + "Proceed; I'll discard its present contents."); box_error(255); } if(tail != head) @@ -1439,10 +1372,7 @@ void handle_right_brace (void) print_err("Missing "); print_esc(893); /* cr */ print(623); /* inserted */ - { - help_ptr = 1; - help_line[0]= 1119; /* I'm guessing that you meant to end an alignment here. */ - } + help1("I'm guessing that you meant to end an alignment here."); ins_error (); } break; diff --git a/src/texsourc/texd.h b/src/texsourc/texd.h index 7dcc86f..3ca2037 100644 --- a/src/texsourc/texd.h +++ b/src/texsourc/texd.h @@ -449,7 +449,8 @@ EXTERN int history; /* padded out */ /* 95/Jan/7 */ /* EXTERN schar error_count; */ /* EXTERN integer error_count; */ /* padded out */ EXTERN int error_count; /* padded out */ /* 95/Jan/7 */ -EXTERN str_number help_line[6]; +/* EXTERN str_number help_line[6]; */ +EXTERN char * help_line[6]; /* EXTERN char help_ptr; */ /* EXTERN integer help_ptr; */ /* padded out */ EXTERN int help_ptr; /* padded out */ /* 95/Jan/7 */ @@ -1412,26 +1413,13 @@ unsigned char *unixify (unsigned char *); /* in pathsrch.c bkph */ #define level_zero min_quarterword #define level_one level_zero + 1 /* sec 79 */ -/* + extern void tex_help (unsigned int n, ...); -void tex_help (unsigned int n, ...) -{ - unsigned int i; - va_list help_arg; - - if (n > 6) n = 6; - help_ptr = n; - va_start(help_arg, n); - for (i = 0; i < n; i++) - help_line[i] = 0; //va_arg(help_arg, char *); - va_end(help_arg); -} #define help0() tex_help(0) #define help1(...) tex_help(1, __VA_ARGS__) #define help2(...) tex_help(2, __VA_ARGS__) #define help3(...) tex_help(3, __VA_ARGS__) #define help4(...) tex_help(4, __VA_ARGS__) #define help5(...) tex_help(5, __VA_ARGS__) -#define help6(...) tex_help(6, __VA_ARGS__) -*/ \ No newline at end of file +#define help6(...) tex_help(6, __VA_ARGS__) \ No newline at end of file -- 2.11.0