halfword new_math_(scaled, small_number);
#define new_math(w, s) new_math_((scaled) (w), (small_number) (s))
#define newmath_regmem register memory_word *mem=zmem;
-halfword znewspec(halfword);
-#define new_spec(p) znewspec((halfword) (p))
+halfword new_spec_(halfword);
+#define new_spec(p) new_spec_((halfword) (p))
#define newspec_regmem register memory_word *mem=zmem;
halfword new_param_glue_(small_number);
#define new_param_glue(n) new_param_glue_((small_number) (n))
#define newparamglue_regmem register memory_word *mem=zmem, *eqtb=zeqtb;
-halfword znewglue(halfword);
-#define new_glue(q) znewglue((halfword) (q))
+halfword new_glue_(halfword);
+#define new_glue(q) new_glue_((halfword) (q))
#define newglue_regmem register memory_word *mem=zmem;
-halfword znewskipparam(small_number);
-#define new_skip_param(n) znewskipparam((small_number) (n))
+halfword new_skip_param_(small_number);
+#define new_skip_param(n) new_skip_param_((small_number) (n))
#define newskipparam_regmem register memory_word *mem=zmem, *eqtb=zeqtb;
halfword new_kern_(scaled);
#define new_kern(w) new_kern_((scaled) (w))
#define newcharacter_regmem register memory_word *mem=zmem;
void dvi_swap(void); /* void dvi_swap(); */
#define dviswap_regmem
-void zdvifour(integer); /* void zdvifour(); */
-#define dvi_four(x) zdvifour((integer) (x))
+void dvi_four_(integer); /* void dvi_four_(); */
+#define dvi_four(x) dvi_four_((integer) (x))
#define dvifour_regmem
void zdvipop(integer); /* void zdvipop(); */
#define dvi_pop(l) zdvipop((integer) (l))
#define dvipop_regmem
-void zdvifontdef(internal_font_number); /* void zdvifontdef(); */
-#define dvi_font_def(f) zdvifontdef((internal_font_number) (f))
+void dvi_font_def_(internal_font_number); /* void dvi_font_def_(); */
+#define dvi_font_def(f) dvi_font_def_((internal_font_number) (f))
#define dvifontdef_regmem
void zmovement(scaled, eight_bits); /* void zmovement(); */
#define movement(w, o) zmovement((scaled) (w), (eight_bits) (o))
void prune_movements_(integer); /* void prune_movements_(); */
#define prune_movements(l) prune_movements_((integer) (l))
#define prunemovements_regmem register memory_word *mem=zmem;
-void zspecialout(halfword); /* void zspecialout(); */
-#define special_out(p) zspecialout((halfword) (p))
+void special_out_(halfword); /* void special_out_(); */
+#define special_out(p) special_out_((halfword) (p))
#define specialout_regmem register memory_word *mem=zmem;
void write_out_(halfword); /* void write_out_(); */
#define write_out(p) write_out_((halfword) (p))
#define hlistout_regmem register memory_word *mem=zmem;
void vlist_out(void); /* void vlist_out(); */
#define vlistout_regmem register memory_word *mem=zmem;
-void zshipout(halfword); /* void zshipout(); */
-#define ship_out(p) zshipout((halfword) (p))
+void ship_out_(halfword); /* void ship_out_(); */
+#define ship_out(p) ship_out_((halfword) (p))
#define shipout_regmem register memory_word *mem=zmem, *eqtb=zeqtb;
void scan_spec_(group_code, bool); /* void scan_spec_(); */
#define scan_spec(c, threecodes) scan_spec_((group_code) (c), (bool) (threecodes))
#define shiftcase_regmem register memory_word *mem=zmem, *eqtb=zeqtb;
void show_whatever(void); /* void show_whatever(); */
#define showwhatever_regmem register memory_word *mem=zmem, *eqtb=zeqtb;
-// void storefmtfile(void);
-int storefmtfile(void);
+// void store_fmt_file(void);
+int store_fmt_file(void);
#define storefmtfile_regmem register memory_word *mem=zmem, *eqtb=zeqtb;
void new_whatsit_(small_number, small_number); /* void new_whatsit_(); */
#define new_whatsit(s, w) new_whatsit_((small_number) (s), (small_number) (w))
#endif
/* this basically removes all use for these stupid #define foo_regmem s */
-
+void print_err (const char * s);
void initialize (void);
void print_ln (void);
void print_char_(ASCII_code);
#define print_char(s) print_char_((ASCII_code) (s))
void print_(integer);
#define print(s) print_((integer) (s))
+void print_string_(unsigned char * s);
+#define print_string(s) print_string_((unsigned char *) s)
void slow_print_(integer);
#define slow_print(s) slow_print_((integer) (s))
void print_nl_(str_number);
halfword new_disc(void);
halfword new_math_(scaled, small_number);
#define new_math(w, s) new_math_((scaled) (w), (small_number) (s))
-halfword znewspec(halfword);
-#define new_spec(p) znewspec((halfword) (p))
+halfword new_spec_(halfword);
+#define new_spec(p) new_spec_((halfword) (p))
halfword new_param_glue_(small_number);
#define new_param_glue(n) new_param_glue_((small_number) (n))
-halfword znewglue(halfword);
-#define new_glue(q) znewglue((halfword) (q))
-halfword znewskipparam(small_number);
-#define new_skip_param(n) znewskipparam((small_number) (n))
+halfword new_glue_(halfword);
+#define new_glue(q) new_glue_((halfword) (q))
+halfword new_skip_param_(small_number);
+#define new_skip_param(n) new_skip_param_((small_number) (n))
halfword new_kern_(scaled);
#define new_kern(w) new_kern_((scaled) (w))
halfword new_penalty_(integer);
#define new_character(f, c) new_character_((internal_font_number) (f), (eight_bits) (c))
#ifdef ALLOCATEDVIBUF
void dvi_swap(void);
- void zdvifour(integer);
- #define dvi_four(x) zdvifour((integer) (x))
+ void dvi_four_(integer);
+ #define dvi_four(x) dvi_four_((integer) (x))
void zdvipop(integer);
#define dvi_pop(l) zdvipop((integer) (l))
- void zdvifontdef(internal_font_number);
- #define dvi_font_def(f) zdvifontdef((internal_font_number) (f))
+ void dvi_font_def_(internal_font_number);
+ #define dvi_font_def(f) dvi_font_def_((internal_font_number) (f))
void zmovement(scaled, eight_bits);
#define movement(w, o) zmovement((scaled) (w), (eight_bits) (o))
- void zspecialout(halfword);
- #define special_out(p) zspecialout((halfword) (p))
+ void special_out_(halfword);
+ #define special_out(p) special_out_((halfword) (p))
void hlist_out(void);
void vlist_out(void);
- void zshipout(halfword);
- #define ship_out(p) zshipout((halfword) (p))
+ void ship_out_(halfword);
+ #define ship_out(p) ship_out_((halfword) (p))
#else /* not ALLOCATEDVIBUF */
void dvi_swap(void);
- void zdvifour(integer);
- #define dvi_four(x) zdvifour((integer) (x))
+ void dvi_four_(integer);
+ #define dvi_four(x) dvi_four_((integer) (x))
void zdvipop(integer);
#define dvi_pop(l) zdvipop((integer) (l))
- void zdvifontdef(internal_font_number);
- #define dvi_font_def(f) zdvifontdef((internal_font_number) (f))
+ void dvi_font_def_(internal_font_number);
+ #define dvi_font_def(f) dvi_font_def_((internal_font_number) (f))
void zmovement(scaled, eight_bits);
#define movement(w, o) zmovement((scaled) (w), (eight_bits) (o))
- void zspecialout(halfword);
- #define special_out(p) zspecialout((halfword) (p))
+ void special_out_(halfword);
+ #define special_out(p) special_out_((halfword) (p))
void hlist_out(void);
void vlist_out(void);
- void zshipout(halfword);
- #define ship_out(p) zshipout((halfword) (p))
+ void ship_out_(halfword);
+ #define ship_out(p) ship_out_((halfword) (p))
#endif
void prune_movements_(integer);
#define prune_movements(l) prune_movements_((integer) (l))
void issue_message(void);
void shift_case(void);
void show_whatever(void);
-void storefmtfile(void);
+void store_fmt_file(void);
void new_whatsit_(small_number, small_number);
#define new_whatsit(s, w) new_whatsit_((small_number) (s), (small_number) (w))
void new_write_whatsit_(small_number);
extern integer inputint (FILE *); /* extern integer inputint (); */
extern void zinput3ints (integer *, integer *, integer *);
/* extern void zinput3ints (); */
-extern void setpaths (int); /* extern void setpaths (); */
-// extern void checkfclose (FILE *); /* in openinou.c 93/Nov/20 */
-extern int checkfclose (FILE *); /* in openinou.c 93/Nov/20 */
+extern void set_paths (int); /* extern void set_paths (); */
+// extern void check_fclose (FILE *); /* in openinou.c 93/Nov/20 */
+extern int check_fclose (FILE *); /* in openinou.c 93/Nov/20 */
/* String routines. */
/* extern void makesuffixpas (); */ /* not defined, not used ? bkph */
break;
}
if (flag) { /* 127 here means mapping undefined */
- showline("Inverted mapping xord[] pairs:\n", 0);
+ show_line("Inverted mapping xord[] pairs:\n", 0);
for (k = 0; k < 256; k++) { /* entries in xord / xchr */
if (xord[k]!= 127) {
sprintf(log_line, "%d => %d\n", k, xord[k]);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
}
}
#else
/* trap the -i on command line situation if INITEX was NOT defined */
if (is_initex) {
- showline("Sorry, somebody forgot to make an INITEX!\n", 1);
+ show_line("Sorry, somebody forgot to make an INITEX!\n", 1);
}
#endif /* not INITEX */
}
} while(!((cur_cmd != 10)&&(cur_cmd != 0)));
if(cur_cmd <= 70)
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(1173); /* You can't use a prefix with ` */
- }
+ print_err("You can't use a prefix with `");
print_cmd_chr(cur_cmd, cur_chr);
print_char(39); /* ' */
{
}
}
if((cur_cmd != 97)&&(a % 4 != 0)) {
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(682); /* You can't use ` */
- }
+ print_err("You can't use `");
print_esc(1165); /* long */
print(1175); /* ' or ` */
print_esc(1166); /* outer */
n = cur_val;
if(! scan_keyword(836)) /* to */
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(1067); /* Missing `to' inserted */
- }
+ print_err("Missing `to' inserted");
{
help_ptr = 2;
help_line[1]= 1194; /* You should have said `\read<number> to \cs'. */
scan_int ();
if(((cur_val < 0)&&(p < (hash_size + 3474))) ||(cur_val > n))
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(1196); /* Invalid code(*/
- }
+ print_err("Invalid code(");
print_int(cur_val);
if(p < (hash_size + 3474))
print(1197); /*), should be in the range 0.. */
scan_box(1073741824L + n); /* 2^30 + n */ /* box_flag + n */
}
else {
-
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(677); /* Improper */
- }
+ print_err("Improper ");
print_esc(533); /* setbox */
{
help_ptr = 2;
goto lab30;
} /* bkph */
#endif /* INITEX */
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(1210); /* Patterns can be loaded only by INITEX */
- }
+ print_err("Patterns can be loaded only by INITEX");
help_ptr = 0;
error ();
do {
/* added following explanations 96/Jan/10 */
-void badformatorpool (char *name, char *defaultname, char *envvar)
+void bad_formator_pool (char *name, char *defaultname, char *envvar)
{
if (name == NULL) name = defaultname;
sprintf(log_line, "(Perhaps %s is for an older version of TeX)\n", name);
- showline(log_line, 0);
+ show_line(log_line, 0);
name_of_file[name_length + 1] = '\0'; /* null terminate */
sprintf(log_line, "(Alternatively, %s may have been corrupted)\n", name_of_file+1);
- showline(log_line, 0);
+ show_line(log_line, 0);
name_of_file[name_length + 1] = ' '; /* space terminate */
sprintf(log_line,
"(Perhaps your %s environment variable is not set correctly)\n", envvar);
- showline(log_line, 0);
+ show_line(log_line, 0);
{
char *s; /* extra info 99/April/28 */
if ((s = grabenv(envvar)) != NULL) {
sprintf(log_line, "(%s=%s)\n", envvar, s);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
else {
sprintf(log_line, "%s environment variable not set\n", envvar);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
}
#ifndef _WINDOWS
/* we already read this once earlier to grab mem_top */
if (trace_flag) {
sprintf(log_line, "Read from fmt file mem_top = %d TeX words\n", x);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
/* allocate_main_memory (x); */ /* allocate main memory at this point */
mem = allocate_main_memory(x); /* allocate main memory at this point */
if (trace_flag) {
sprintf(log_line, "undump string pool reallocation (%d > %d)\n",
x, current_pool_size);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
str_pool = realloc_str_pool (x - current_pool_size + increment_pool_size);
}
{
;
sprintf(log_line, "%s%s\n", "---! Must increase the ", "string pool size");
- showline(log_line, 0);
+ show_line(log_line, 0);
goto lab6666;
}
else pool_ptr = x;
if (trace_flag) {
sprintf(log_line, "undump string pointer reallocation (%d > %d)\n",
x, current_max_strings);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
str_start = realloc_str_start(x - current_max_strings + increment_max_strings);
}
{
;
sprintf(log_line, "%s%s\n", "---! Must increase the ", "max strings");
- showline(log_line, 0);
+ show_line(log_line, 0);
goto lab6666;
}
else str_ptr = x;
/* if(mem_min < -2) */
if(mem_min < mem_bot - 2) /* ? splice in block below */
{
-/* or call addvariablespace(mem_bot - (mem_min + 1)) */
+/* or call add_variable_space(mem_bot - (mem_min + 1)) */
- if (trace_flag) showline("Splicing in mem_min space in undump!\n", 0);
+ if (trace_flag) show_line("Splicing in mem_min space in undump!\n", 0);
p = mem[rover + 1].hh.v.LH;
q = mem_min + 1;
undump_int(cs_count); /* cs_count */
if (trace_flag) {
sprintf(log_line, "itex undump cs_count %d ", cs_count); /* debugging */
- showline(log_line, 0);
+ show_line(log_line, 0);
}
{
undump_int(x); /* font_mem_size */
#ifdef ALLOCATEFONT
if (trace_flag) {
sprintf(log_line, "Read from fmt fmem_ptr = %d\n", x);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
if(x > current_font_mem_size){ /* 93/Nov/28 dynamic allocate font_info */
if (trace_flag) {
sprintf(log_line, "Undump realloc font_info (%d > %d)\n",
x, current_font_mem_size);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
font_info = realloc_font_info(x - current_font_mem_size + increment_font_mem_size);
}
{
;
sprintf(log_line, "%s%s\n", "---! Must increase the ", "font mem size");
- showline(log_line, 0);
+ show_line(log_line, 0);
goto lab6666;
}
else fmem_ptr = x;
{
;
sprintf(log_line, "%s%s\n", "---! Must increase the ", "font max");
- showline(log_line, 0);
+ show_line(log_line, 0);
goto lab6666;
}
else font_ptr = x;
sprintf(log_line,
"oldfont_mem_size is %d --- hit %d times. Using non_address %d\n",
oldfont_mem_size, count, non_address);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
}
{
;
sprintf(log_line, "%s%s\n", "---! Must increase the ", "trie size");
- showline(log_line, 0);
+ show_line(log_line, 0);
goto lab6666;
}
else j = x;
{
;
sprintf(log_line, "%s%s\n", "---! Must increase the ", "trie op size");
- showline(log_line, 0);
+ show_line(log_line, 0);
goto lab6666;
}
else j = x;
lab6666:;
sprintf(log_line, "(Fatal format file error; I'm stymied)\n");
- showline(log_line, 1);
+ show_line(log_line, 1);
/* added following bit of explanation 96/Jan/10 */
if (! knuth_flag)
- badformatorpool(format_file, "the format file", "TEXFORMATS");
+ bad_formator_pool(format_file, "the format file", "TEXFORMATS");
Result = false;
return Result;
}
while(c++ < for_end);
}
/* *********************************************************************** */
- storefmtfile (); // returns a value ?
+ store_fmt_file (); // returns a value ?
}
#endif /* INITEX */
if (!is_initex) /* 2000/March/3 */
if (task != NULL) {
sprintf(log_line, "Check on string pool start (%s)\n", task);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
for (k = 0; k < 32; k++) {
if (str_start[k] != 3 * k) {
sprintf(log_line, "k %d str_start[k] %d\n", k, str_start[k]);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
}
for (k = 32; k < 128; k++) {
if (str_start[k] != 96 + (k - 32)) {
sprintf(log_line, "k %d str_start[k] %d\n", k, str_start[k]);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
}
for (k = 128; k < 256; k++) {
if (str_start[k] != 194 + 4 * (k - 128)){
sprintf(log_line, "k %d str_start[k] %d\n", k, str_start[k]);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
}
if (task != NULL) {
sprintf(log_line, "Check on string pool (%s)\n", task);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
for (k = 0; k < str_ptr; k++) {
if (str_start[k+1] == 0) break;
if (flag) {
bad++;
sprintf(log_line, "BAD %d (start at %d): ", k, st);
- showline(log_line, 0);
+ show_line(log_line, 0);
s = log_line;
for (i = 0; i < n; i++) {
c = str_pool[st + i];
}
*s++ = '\n';
*s++ = '\0';
- showline(log_line, stdout);
+ show_line(log_line, stdout);
}
}
sprintf(log_line, "end of check (%s)\n", bad ? "BAD" : "OK");
- showline(log_line, 0);
+ show_line(log_line, 0);
if (bad) {
if (task == NULL) return bad;
else exit(1);
} /* DEBUGGING ONLY */
#endif
-void showfrozen (void)
+void show_frozen (void)
{
int i, j, n;
fprintf(log_file, "\n");
{
history = 3;
- setpaths(TEXFORMATPATHBIT + TEXINPUTPATHBIT + TEXPOOLPATHBIT + TFMFILEPATHBIT);
+ set_paths(TEXFORMATPATHBIT + TEXINPUTPATHBIT + TEXPOOLPATHBIT + TFMFILEPATHBIT);
if(ready_already == 314159L)goto lab1; /* magic number */
/* These tests are almost all compile time tests and so could be eliminated */
if(bad > 0) {
sprintf(log_line, "%s%s%ld\n", "Ouch---my internal constants have been clobbered!",
"---case ", (long) bad);
- showline(log_line, 1);
+ show_line(log_line, 1);
if (! knuth_flag)
- badformatorpool(format_file, "the format file", "TEXFORMATS"); /* 96/Jan/17 */
+ bad_formator_pool(format_file, "the format file", "TEXFORMATS"); /* 96/Jan/17 */
goto lab9999; // abort
}
initialize ();
tally = 0;
term_offset = 0;
file_offset = 0;
- showline(tex_version, 0);
+ show_line(tex_version, 0);
sprintf(log_line, " (%s %s)", application, yandyversion);
- showline(log_line, 0);
+ show_line(log_line, 0);
if(format_ident > 0)slow_print(format_ident);
print_ln ();
#ifndef _WINDOWS
/* show font TFMs frozen into format file */
/* moved here after start_input to ensure the log file is open */
if (show_tfm_flag && log_opened && font_ptr > 0) /* 98/Sep/28 */
- showfrozen();
+ show_frozen();
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
history = 0;
- if (show_cs_names) printcsnames(stdout, 0); /* 98/Mar/31 */
+ if (show_cs_names) print_cs_names(stdout, 0); /* 98/Mar/31 */
main_control(); /* read-eval-print loop :-) in tex8.c */
// what if abort_flag is set now ?
- if (show_cs_names) printcsnames(stdout, 1); /* 98/Mar/31 */
+ if (show_cs_names) print_cs_names(stdout, 1); /* 98/Mar/31 */
// what if abort_flag is set now ?
#ifdef ALLOCATEMAIN
/* add a block of variable size node space below mem_bot */
-void addvariablespace(int size)
+void add_variable_space(int size)
{ /* used in tex0.c, local.c, itex.c */
halfword p;
mem_min = t - (size + 1); /* first word in new block - 1 */
/* mem_min = mem_start; */ /* allocate all of it at once */
if (mem_min < mem_start) { /* sanity test */
- if (trace_flag) showline("WARNING: mem_min < mem_start!\n", 0);
+ if (trace_flag) show_line("WARNING: mem_min < mem_start!\n", 0);
mem_min = mem_start;
}
p = mem[rover + 1].hh.v.LH;
#ifdef INITEX
/* split out to allow sharing of code from do_initex and newpattern */
-void resettrie (void)
+void reset_trie (void)
{
integer k;
{
/* hash_used = (hash_size + 514); */
hash_used = (hash_size + hash_extra + 514); /* 96/Jan/10 */
cs_count = 0;
- if (trace_flag) showline("itex cs_count=0 ", 0); /* debugging */
+ if (trace_flag) show_line("itex cs_count=0 ", 0); /* debugging */
/* eq_type(frozen_dont_expand) <- dont_expand; */
/* eqtb[10023].hh.b0 = 116; */
/* eqtb[(hash_size + 523)].hh.b0 = 116; */
font_params[0]= 7;
param_base[0]= -1;
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
- resettrie (); /* shared 93/Nov/26 */
+ reset_trie (); /* shared 93/Nov/26 */
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
/* {register integer for_end; k = 0; for_end = 6; if(k <= for_end) do
font_info[k].cint = 0;
{
;
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
- showline("! string pool file has no check sum.\n", 1);
+ show_line("! string pool file has no check sum.\n", 1);
/* added following bit of explanation 96/Jan/16 */
if (! knuth_flag)
- badformatorpool(string_file, "the pool file", "TEXPOOL");
+ bad_formator_pool(string_file, "the pool file", "TEXPOOL");
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
(void) a_close(pool_file);
Result = false;
{
;
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
- showline("! string pool file check sum doesn't have nine digits.\n", 1);
+ show_line("! string pool file check sum doesn't have nine digits.\n", 1);
/* added following bit of explanation 96/Jan/16 */
if (! knuth_flag)
- badformatorpool(string_file, "the pool file", "TEXPOOL");
+ bad_formator_pool(string_file, "the pool file", "TEXPOOL");
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
(void) a_close(pool_file);
Result = false;
lab30: if(a != BEGINFMTCHECKSUM){
;
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
- showline("! string pool check sum doesn't match; tangle me again.\n", 1);
+ show_line("! string pool check sum doesn't match; tangle me again.\n", 1);
/* added following bit of explanation 96/Jan/16 */
if (! knuth_flag)
- badformatorpool(string_file, "the pool file", "TEXPOOL");
+ bad_formator_pool(string_file, "the pool file", "TEXPOOL");
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
(void) a_close(pool_file);
Result = false;
{
;
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
- showline("! string pool line doesn't begin with two digits.\n", 1);
+ show_line("! string pool line doesn't begin with two digits.\n", 1);
/* added following bit of explanation 96/Jan/16 */
if (! knuth_flag)
- badformatorpool(string_file, "the pool file", "TEXPOOL");
+ bad_formator_pool(string_file, "the pool file", "TEXPOOL");
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
(void) a_close(pool_file);
Result = false;
/* can freely extend memory, so we need not be paranoid - stringvacancies */
/* if(pool_ptr + l + stringvacancies > current_pool_size)*/
if(pool_ptr + l + stringmargin > current_pool_size){
- if (trace_flag) showline("String margin reallocation\n", 0);
+ if (trace_flag) show_line("String margin reallocation\n", 0);
/* str_pool = realloc_str_pool (pool_ptr + l + stringvacancies */
str_pool = realloc_str_pool (pool_ptr + l + stringmargin
- current_pool_size + increment_pool_size);
#endif
{
;
- showline("! You have to increase POOLSIZE.\n", 1);
+ show_line("! You have to increase POOLSIZE.\n", 1);
(void) a_close(pool_file);
Result = false;
return(Result);
;
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
sprintf(log_line, "! I can't read %s.\n", poolname);
- showline(log_line, 1);
+ show_line(log_line, 1);
if (! knuth_flag)
- showline(" (Was unable to find tex.poo or tex.pool)\n", 0); /* extra explain */
+ show_line(" (Was unable to find tex.poo or tex.pool)\n", 0); /* extra explain */
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
Result = false;
return(Result);
}
/* ********************** debugging only 96/Jan/20 should not happen */
#ifdef SHORTHASH
- if (s > 65535L) showline("ERROR: hash entry too large\n", 1);
+ if (s > 65535L) show_line("ERROR: hash entry too large\n", 1);
#endif
hash[cur_val].v.RH = s;
}
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
if (! trie_not_ready) { /* new stuff */
if (allow_patterns) {
- if (trace_flag) showline("Resetting patterns\n", 0);
- resettrie(); /* RESET PATTERNS - 93/Nov/26 */
+ if (trace_flag) show_line("Resetting patterns\n", 0);
+ reset_trie(); /* RESET PATTERNS - 93/Nov/26 */
if (reset_exceptions) {
- if (trace_flag) showline("Resetting exceptions\n", 0);
+ if (trace_flag) show_line("Resetting exceptions\n", 0);
reset_hyphen(); /* RESET HYPHENEXCEPTIONS - 93/Nov/26 */
}
}
cur_chr = eqtb[(hash_size + 2139) + cur_chr].hh.v.RH;
if(cur_chr == 0)
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(951); /* Nonletter */
- }
+ print_err("Nonletter");
{
help_ptr = 1;
help_line[0]= 950; /* (See Appendix H.) */
}
if(trie_o[q]!= min_trie_op)
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(952); /* Duplicate pattern */
- }
+ print_err("Duplicate pattern");
{
help_ptr = 1;
help_line[0]= 950; /* (See Appendix H.) */
break;
default:
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(949); /* Bad */
- }
+ print_err("Bad ");
print_esc(947); /* patterns */
{
help_ptr = 1;
lab30:;
}
else {
-
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(946); /* Too late for */
- }
+ print_err("Too late for ");
print_esc(947); /* patterns */
{
help_ptr = 1;
#endif /* INITEX */
#ifdef INITEX
-void storefmtfile (void)
+void store_fmt_file (void)
{/* 41 42 31 32 */
integer j, k, l;
halfword p, q;
integer x;
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
if (!is_initex) { /* redundant check 94/Feb/14 */
- showline("! \\dump is performed only by INITEX\n", 1);
+ show_line("! \\dump is performed only by INITEX\n", 1);
if (! knuth_flag)
- showline(" (Use -i on the command line)\n", 0);
+ show_line(" (Use -i on the command line)\n", 0);
abort_flag++;
return;
}
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
if(save_ptr != 0) {
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(1252); /* You can't dump inside a group */
- }
+ print_err("You can't dump inside a group");
{
help_ptr = 1;
help_line[0]= 1253; /* `{...\dump}' is a no-no.. */
/* {
int n= eqtb[(hash_size + 3186)].cint;
sprintf(log_line, "YEAR: %ld\n", n);
- showline(log_line, 0);
+ show_line(log_line, 0);
} */
print_char(46); /* . */
print_int(eqtb[(hash_size + 3185)].cint);
if (trace_flag) {
sprintf(log_line, "itex cs_count %d hash_size %d hash_extra %d hash_used %d",
cs_count, hash_size, hash_extra, hash_used); /* debugging */
- showline(log_line, 0);
+ show_line(log_line, 0);
}
/* for p <- hash_base to hash_used do */
{
incr(cs_count);
if (trace_flag) {
sprintf(log_line, "itex cs_count++ ");
- showline(log_line, 0); /* debugging */
+ show_line(log_line, 0); /* debugging */
}
}
while(p++ < for_end);
eqtb[(hash_size + 3194)].cint = 0; /* tracingstats */
w_close(fmt_file);
// return 0;
-} /* end of storefmtfile */
+} /* end of store_fmt_file */
#endif /* INITEX */
#ifdef INITEX
-a write AUX file in specified directory (default current directory)\n\
");
strcat(s, "\n");
- showline(s, 1);
+ show_line(s, 1);
#ifndef _WINDOWS
uexit(1); // has this been setup yet ???
#endif
else {
sprintf(log_line, "NOTE: %s collision: %d => %d, %d\n",
"xchr", from, xchr[from], to);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
if (xord[to]== NOTDEF)
xord[to]= (unsigned char) from;
else {
sprintf(log_line, "NOTE: %s collision: %d => %d, %d\n",
"xord", to, xord[to], from);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
count++;
}
xchr[NOTDEF]= NOTDEF; /* fixed point of mapping */
if (trace_flag) {
sprintf(log_line, "Read %d xchr[] pairs:\n", count);
- showline(log_line, 0);
+ show_line(log_line, 0);
for (k = 0; k < MAXCHRS; k++) {
if (xchr[k]!= NOTDEF) {
sprintf(log_line, "%d => %d\n", k, xchr[k]);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
}
}
}
else {
sprintf(log_line, "ERROR: don't understand %s", buffer);
- showline(log_line, 1);
+ show_line(log_line, 1);
}
}
if (trace_flag) { /* debugging output */
- showline("Key replacement table\n", 0);
+ show_line("Key replacement table\n", 0);
for (k = 0; k < MAXCHRS; k++) {
if (replacement[k] != NULL) {
sprintf(log_line, "%d\t%s\n", k, replacement[k]);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
}
}
if (filename == NULL) return -1;
if (trace_flag) {
sprintf(log_line, "Reading xchr/repl %s\n", filename);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
/* first try using file as specified */
strcpy(infile, filename);
if (trace_flag) {
sprintf(log_line, "Trying %s\n", infile);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
if (share_flag == 0) input = fopen (infile, "r");
else input = _fsopen (infile, "r", share_flag); /* 94/July/12 */
else strcat(infile, ".key");
if (trace_flag) {
sprintf(log_line, "Trying %s\n", infile);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
if (share_flag == 0) input = fopen (infile, "r");
else input = _fsopen (infile, "r", share_flag); /* 94/July/12 */
strcat (infile, filename);
if (trace_flag) {
sprintf(log_line, "Trying %s\n", infile);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
if (share_flag == 0) input = fopen (infile, "r");
else input = _fsopen (infile, "r", share_flag); /* 94/July/12 */
else strcat(infile, ".key");
if (trace_flag) {
sprintf(log_line, "Trying %s\n", infile);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
if (share_flag == 0) input = fopen (infile, "r");
else input = _fsopen (infile, "r", share_flag); /* 94/July/12 */
strcat (infile, filename);
if (trace_flag) {
sprintf(log_line, "Trying %s\n", infile);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
if (share_flag == 0) input = fopen (infile, "r");
else input = _fsopen (infile, "r", share_flag);
else strcat(infile, ".key");
if (trace_flag) {
sprintf(log_line, "Trying %s\n", infile);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
if (share_flag == 0) input = fopen (infile, "r");
else input = _fsopen (infile, "r", share_flag);
if (input == NULL) {
sprintf(log_line, "ERROR: Sorry, cannot find %s file %s",
flag ? " xchr[]" : "key mapping", filename);
- showline(log_line, 1);
+ show_line(log_line, 1);
perrormod (filename);
return 0; // failed
}
k++;
}
sprintf(log_line, "Floating test: dx = %lg (k = %d)\n", dxold, k - 1);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
#endif
for (k = hash_size + 780 + hash_extra; k < hash_size + 780 + eqtb_extra; k++) {
if (eqtb[k].cint != 0) {
if (count == 0) {
- showchar('\n');
- showline("EQTB ", 0);
+ show_char('\n');
+ show_line("EQTB ", 0);
}
sprintf(log_line, "%d ", k);
- showline(log_line, 0);
+ show_line(log_line, 0);
if (count++ > 256) break;
}
}
- if (count != 0) showchar('\n');
+ if (count != 0) show_char('\n');
}
#endif
"Max allocated %d --- max address %d\n",
total_allocated, max_address);
// if (output != NULL) fputs(log_line, output); // log file
-// else if (flag == 0) showline(log_line, 0); // informative
-// else if (flag == 1) showline(log_line, 1); // error
- if (output == stderr) showline(log_line, 1);
- else if (output == stdout) showline(log_line, 0);
+// else if (flag == 0) show_line(log_line, 0); // informative
+// else if (flag == 1) show_line(log_line, 1); // error
+ if (output == stderr) show_line(log_line, 1);
+ else if (output == stdout) show_line(log_line, 0);
else fputs(log_line, output);
}
/* _heapmin(); */ /* release unused heap space to the system - no op ? */
#ifdef HEAPSHOW
if (trace_flag) {
- showline("BEFORE REALLOC: \n", 0);
+ show_line("BEFORE REALLOC: \n", 0);
#ifdef HEAPWALK
(void) heap_dump(stdout, 1); /* debugging 96/Jan/18 */
#endif
if (trace_flag) {
sprintf(log_line, "EXPANDED! %d (%d) == %d (%d)\n",
new, new_size, old, old_size);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
return new;
}
new = realloc (old, new_size);
#ifdef HEAPSHOW
if (trace_flag) {
- showline("AFTER REALLOC: \n", 0);
+ show_line("AFTER REALLOC: \n", 0);
#ifdef HEAPWALK
(void) heap_dump(stdout, 1); /* debugging 96/Jan/18 */
#endif
#endif
}
sprintf(log_line, "\n! Unable to allocate %d bytes for %s\n", n, s);
- showline(log_line, 1);
+ show_line(log_line, 1);
show_maximums(stderr);
#ifdef HEAPWALK
if (heap_flag) (void) heap_dump(stderr, 1);
void trace_memory (char *s, int n)
{
sprintf(log_line, "Allocating %d bytes for %s\n", n, s);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
void update_statistics (int address, int size, int oldsize)
/* if (trie_max > trie_size) {
sprintf(log_line, "ERROR: invalid trie size (%d > %d)\n",
trie_max, trie_size);
- showline(log_line, 1);
+ show_line(log_line, 1);
exit (1);
} */ /* ??? removed 1993/dec/17 */
if (trie_max > 1000000) trie_max = 1000000; /* some sort of sanity limit */
if (trace_flag) {
sprintf(log_line, "Addresses trietrl %d trietro %d trietrc %d\n",
trietrl, trietro, trietrc);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
update_statistics ((int) trietrl, nl, 0);
update_statistics ((int) trietro, no, 0);
if (!prime(hyphen_prime)) {
sprintf(log_line, "ERROR: non-prime hyphen exception number (%d)\n",
hyphen_prime);
- showline(log_line, 1);
+ show_line(log_line, 1);
// exit (1);
return -1;
}
if (trace_flag) {
sprintf(log_line, "Addresses hyph_word %d hyph_list %d\n",
hyph_word, hyph_list);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
/* cannot preserve old contents when hyphen prime is changed */
#ifdef USEMEMSET
if (mainmemory != NULL) {
/* free(mainmemory); */
/* mainmemory = NULL; */
- if (trace_flag) showline("Reallocating initial memory allocation\n", 1);
+ if (trace_flag) show_line("Reallocating initial memory allocation\n", 1);
/* if (mem_spec_flag)
- showline("Cannot change initial main memory size when format is read\n", 1);*/
+ show_line("Cannot change initial main memory size when format is read\n", 1);*/
}
mem_top = mem_bot + size;
}
if (trace_flag) {
sprintf(log_line, "Address main memory == %d\n", mainmemory);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
zzzaa = mainmemory;
if (mem_start != 0 && !is_initex) zzzaa = mainmemory - mem_start;
if (trace_flag) {
sprintf(log_line, "Offset address main memory == %d\n", zzzaa);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
update_statistics ((int) mainmemory, n,
(current_mem_size + 1) * sizeof (memory_word));
if (trace_flag) {
sprintf(log_line, "WARNING: Entering realloc_main lo %d hi %d\n",
losize, hisize);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
if (is_initex) {
- showline("ERROR: Cannot extent main memory in iniTeX\n", 1);
+ show_line("ERROR: Cannot extent main memory in iniTeX\n", 1);
if (! knuth_flag)
- showline("Please use `-m=...' on command line\n", 0);
+ show_line("Please use `-m=...' on command line\n", 0);
// exit (1);
// abort_flag++; // ???
return NULL;
}
if (trace_flag) {
sprintf(log_line, "Old Address %s == %d\n", "main memory", mainmemory);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
if (current_mem_size + 1 == max_mem_size) {/* if we REALLY run up to limit ! */
memory_error("main memory", (max_mem_size + 1) * sizeof(memory_word));
}
if (trace_flag) {
sprintf(log_line, "New Address %s == %d\n", "main memory", newmemory);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
if (losize > 0) {
/* shift everything upward to make space for new low area */
if (trace_flag) {
sprintf(log_line, "memmove %d %d %d \n", newmemory + losize,
newmemory, (current_mem_size + 1) * sizeof(memory_word));
- showline(log_line, 0);
+ show_line(log_line, 0);
}
memmove (newmemory + losize, newmemory,
/* current_mem_size * sizeof(memory_word)); */
(current_mem_size + 1) * sizeof (memory_word));
current_mem_size = newsize;
if (current_mem_size != mem_max - mem_start) {
- showline("ERROR: Impossible Memory Error\n", 1);
+ show_line("ERROR: Impossible Memory Error\n", 1);
}
if (mem_start != 0) zzzaa = mainmemory - mem_start; /* ??? sign ??? */
else zzzaa = mainmemory;
if (trace_flag) {
sprintf(log_line, "Old Address %s == %d\n", "font_info", font_info);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
/* during initial allocation, font_info == NULL - realloc acts like malloc */
/* during initial allocation current_font_mem_size == 0 */
font_info = newfontinfo;
if (trace_flag) {
sprintf(log_line, "New Address %s == %d\n", "font_info", font_info);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
update_statistics ((int) font_info, n, current_font_mem_size * sizeof(fmemoryword));
current_font_mem_size = newsize;
if (trace_flag) {
sprintf(log_line, "Old Address %s == %d\n", "string pool", str_pool);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
if (current_pool_size == pool_size) {
/* memory_error ("string pool", (pool_size + 1) * sizeof(packed_ASCII_code)); */
current_pool_size = newsize;
if (trace_flag) {
sprintf(log_line, "New Address %s == %d\n", "string pool", str_pool);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
if (trace_flag) probe_show (); /* 94/Mar/25 */
return str_pool;
if (trace_flag) {
sprintf(log_line, "Old Address %s == %d\n", "string start", str_start);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
if (current_max_strings == max_strings) {
/* memory_error ("string pointer", (max_strings + 1) * sizeof(pool_pointer)); */
current_max_strings = newsize;
if (trace_flag) {
sprintf(log_line, "New Address %s == %d\n", "string start", str_start);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
if (trace_flag) probe_show (); /* 94/Mar/25 */
return str_start;
if (trace_flag) {
sprintf(log_line, "Addresses trie_l %d trie_o %d trie_c %d\n",
trie_l, trie_o, trie_c);
- showline(log_line, 0);
+ show_line(log_line, 0);
sprintf(log_line, "Addresses trie_r %d trie_hash %d trie_taken %d\n",
trie_r, trie_hash, trie_taken);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
update_statistics ((int) trie_l, nl, 0);
update_statistics ((int) trie_o, no, 0);
if (trace_flag) {
sprintf(log_line, "Old Address %s == %d\n", "save stack", save_stack);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
if (current_save_size == save_size) { /* arbitrary limit */
/* memory_error ("save stack", (save_size + 1) * sizeof(memory_word)); */
current_save_size = newsize;
if (trace_flag) {
sprintf(log_line, "Current%s %d\n", "save_size", current_save_size);
- showline(log_line, 0);
+ show_line(log_line, 0);
sprintf(log_line, "New Address %s == %d\n", "save stack", save_stack);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
if (trace_flag) probe_show (); /* 94/Mar/25 */
return save_stack;
if (trace_flag) {
sprintf(log_line, "Old Address %s == %d\n", "input stack", input_stack);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
if (current_stack_size == stack_size) { /* arbitrary limit */
/* memory_error ("input stack", (stack_size + 1) * sizeof(in_state_record)); */
current_stack_size = newsize;
if (trace_flag) {
sprintf(log_line, "Current%s %d\n", "stack_size", current_stack_size);
- showline(log_line, 0);
+ show_line(log_line, 0);
sprintf(log_line, "New Address %s == %d\n", "input stack", input_stack);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
if (trace_flag) probe_show (); /* 94/Mar/25 */
return input_stack;
if (trace_flag) {
sprintf(log_line, "Old Address %s == %d\n", "nest stack", nest);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
if (current_nest_size == nest_size) { /* arbitrary limit */
/* memory_error ("nest stack", (nest_size + 1) * sizeof(list_state_record)); */
current_nest_size = newsize;
if (trace_flag) {
sprintf(log_line, "Current%s %d\n", "nest_size", current_nest_size);
- showline(log_line, 0);
+ show_line(log_line, 0);
sprintf(log_line, "New Address %s == %d\n", "nest stack", nest);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
if (trace_flag) probe_show (); /* 94/Mar/25 */
return nest;
if (trace_flag) {
sprintf(log_line, "Old Address %s == %d\n", "param stack", param_stack);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
if (current_param_size == param_size) { /* arbitrary limit */
/* memory_error ("param stack", (param_size + 1) * sizeof(halfword)); */
current_param_size = newsize;
if (trace_flag) {
sprintf(log_line, "Current%s %d\n", "param_size", current_param_size);
- showline(log_line, 0);
+ show_line(log_line, 0);
sprintf(log_line, "New Address %s == %d\n", "param stack", param_stack);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
if (trace_flag) probe_show (); /* 94/Mar/25 */
return param_stack;
if (trace_flag) {
sprintf(log_line, "Old Address %s == %d\n", "buffer", buffer);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
if (current_buf_size == buf_size) { /* arbitrary limit */
/* memory_error ("buffer", buf_size); */
current_buf_size = newsize;
if (trace_flag) {
sprintf(log_line, "Current%s %d\n", "buffer", current_buf_size);
- showline(log_line, 0);
+ show_line(log_line, 0);
sprintf(log_line, "New Address %s == %d\n", "buffer", buffer);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
if (trace_flag) probe_show (); /* 94/Mar/25 */
return buffer;
}
if (trace_flag) {
sprintf(log_line, "Address dvi_buf %d\n", dvi_buf);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
update_statistics ((int) dvi_buf, n, 0);
if (trace_flag) probe_show (); /* 94/Mar/25 */
}
if (trace_flag) {
sprintf(log_line, "Address zeqtb %d\n", zeqtb);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
update_statistics ((int) zeqtb, n, 0);
if (trace_flag) probe_show (); /* 94/Mar/25 */
/* for a start, puts in strings for 256 characters */
/* maybe taylor allocations to actual pool file 1300 strings 27000 bytes ? */
if (is_initex) {
- if (trace_flag) showline("ini TeX pool and string allocation\n", 0);
+ if (trace_flag) show_line("ini TeX pool and string allocation\n", 0);
str_pool = realloc_str_pool (initial_pool_size);
str_start = realloc_str_start (initial_max_strings);
}
unsigned heaptotal=0;
/* unsigned total; */
- if (trace_flag) showline("free_memory ", 0);
+ if (trace_flag) show_line("free_memory ", 0);
#ifdef CHECKEQTB
if (debug_flag) check_eqtb("free_memory");
#endif
sprintf(log_line, "Heap total: %u bytes --- max address %u\n",
heaptotal, max_address);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
if (trace_flag) {
sprintf(log_line, "Main Memory: variable node %d (%d - %d) one word %d (%d - %d)\n",
lo_mem_max - mem_min, mem_min, lo_mem_max, mem_end - hi_mem_min, hi_mem_min, mem_end);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
/* following only needed to check consistency of heap ... useful debugging */
- if (trace_flag) showline("Freeing memory again\n", 0);
+ if (trace_flag) show_line("Freeing memory again\n", 0);
/* if (trace_flag)
- showline(log_line, "Zero Glue Reference Count %d\n", mem[0].hh.v.RH); */
+ show_line(log_line, "Zero Glue Reference Count %d\n", mem[0].hh.v.RH); */
/* the following checks the heap integrity */
n = _heapchk();
if (n != _HEAPOK) { /* 94/Feb/18 */
sprintf(log_line, "WARNING: Heap corrupted (%d)\n", n);
- showline(log_line, 1);
+ show_line(log_line, 1);
sprintf(log_line, "HEAP %s (%s)\n", heapstrings[-n], "free_memory");
- showline(log_line, 0);
+ show_line(log_line, 0);
return n; /* non-zero and negative */ /* unreachable ??? */
}
#endif
void complainarg (int c, char *s)
{
sprintf(log_line, "ERROR: Do not understand `%c' argument value `%s'\n", c, s);
- showline(log_line, 1);
+ show_line(log_line, 1);
show_use = 1; // 2000 June 21
}
/* for (n = 1; n < ac; n++) sprintf(log_line, "%s ", av[n]); */
if (ac < 3) { /* need more than one arg to reorder anything 94/Feb/25 */
-/* showline("No arguments?\n", 0); */ /* debugging */
+/* show_line("No arguments?\n", 0); */ /* debugging */
return; /* no args ! */
}
}
*t = '\0';
if (trace_flag) {
- showline(takeargs, 0);
- showchar('\n');
+ show_line(takeargs, 0);
+ show_char('\n');
}
n = 1;
else n = address % size;
if (n != 0) {
sprintf(log_line, "OFFSET %d (ELEMENT %d) in %s\n", n, size, name);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
return n;
}
/* activate detailed checking of alignment when trace_flag is set */
-void checkfixedalign (int flag)
+void check_fixed_align (int flag)
{
if (testalign ((int) &mem_top, 4, "FIXED ALIGNMENT")) {
- showline("PLEASE RECOMPILE ME!\n", 1);
+ show_line("PLEASE RECOMPILE ME!\n", 1);
}
#ifdef CHECKALIGNMENT
if (!flag) return;
#endif
}
-void checkallocalign (int flag) {
+void check_alloc_align (int flag) {
if (testalign ((int) zeqtb, sizeof(zeqtb[0]), "ALLOCATED ALIGNMENT"))
- showline("PLEASE RECOMPILE ME!\n", 1);
+ show_line("PLEASE RECOMPILE ME!\n", 1);
#ifdef CHECKALIGNMENT
if (!flag) return;
#ifndef ALLOCZEQTB
int c;
int d;
sprintf(log_line, "STACK %d %d (grows %s) ", &c, &d, (&d > &c) ? "upward" : "downward");
- showline(log_line, 0);
+ show_line(log_line, 0);
sprintf(log_line, "eqtb %d hash %d ", zeqtb, zzzae);
- showline(log_line, 0);
+ show_line(log_line, 0);
sprintf(log_line, "dvi_buf %d xchr %d xord %d nest %d\n",
zdvibuf, xchr, xord, nest);
- showline(log_line, 0);
+ show_line(log_line, 0);
sprintf(log_line, "save_stack %d input_stack %d line_stack %d param_stack %d\n",
save_stack, input_stack, line_stack, param_stack);
- showline(log_line, 0);
+ show_line(log_line, 0);
sprintf(log_line, "font_check %d font_size %d font_dsize %d font_params %d font_name %d\n",
font_check, font_size, font_dsize, font_params, font_name);
- showline(log_line, 0);
+ show_line(log_line, 0);
sprintf(log_line, "main %d font_info %d str_pool %d str_start %d hyph_word %d hyph_list %d\n",
zmem, font_info, str_pool, str_start, hyph_word, hyph_list);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
#endif
if (_strnicmp(line, wndsection, wm) == 0) {
if (trace_flag) {
sprintf(log_line, "Found %s", line); /* DEBUGGING */
- showline(log_line, 0);
+ show_line(log_line, 0);
}
wndflag++;
}
else if (_strnicmp(line, envsection, em) == 0) {
if (trace_flag) {
sprintf(log_line, "Found %s", line); /* DEBUGGING */
- showline(log_line, 0);
+ show_line(log_line, 0);
}
/* fclose(input); */
/* return true; */
else if (wndflag && _strnicmp(line, workdirect, dm) == 0) {
if (trace_flag) {
sprintf(log_line, "Found %s", line); /* DEBUGGING */
- showline(log_line, 0);
+ show_line(log_line, 0);
}
workingdirectory = true;
}
return true;
}
if (trace_flag)
- showline("Failed to find [Environment]", 1); /* DEBUGGING */
+ show_line("Failed to find [Environment]", 1); /* DEBUGGING */
(void) fclose(input);
}
else if (trace_flag) perrormod(dviwindo); /* DEBUGGING */
if (varname == NULL) return NULL; /* sanity check */
if (*varname == '\0') return NULL; /* sanity check */
-/* speedup to avoid double lookup when called from setpaths in ourpaths.c */
+/* speedup to avoid double lookup when called from set_paths in ourpaths.c */
/* if (lastname != NULL && strcmp(lastname, varname) == 0) { */
if (lastname != NULL && _strcmpi(lastname, varname) == 0) {
if (trace_flag) {
sprintf(log_line, "Cache hit: %s=%s\n", lastname, lastvalue);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
/* return lastvalue; */ /* save some time here */
return xstrdup(lastvalue);
while (*s <= ' ' && s > line) *s-- = '\0';
if (trace_flag) { /* DEBUGGING ONLY */
sprintf(log_line, "%s=%s\n", varname, line+n+1);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
s = line+n+1;
if (lastname != NULL) free(lastname);
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
-/* following made global so analyzeflag can be made separate procedure */
+/* following made global so analyze_flag can be made separate procedure */
// char *xchrfile=""; /* save space use xstrdup */
char *xchrfile = NULL; /* save space use xstrdup */
/* when making changes, revise allowedargs */
-int analyzeflag (int c, char *optarg)
+int analyze_flag (int c, char *optarg)
{
switch (c) {
case 'v': want_version = true;
/* The following does not deslashify arguments ? Do we need to ? */
-int readcommands (char *filename)
+int read_commands (char *filename)
{
char commandfile[PATH_MAX];
FILE *command;
/* sfplogline, rintf("From %s:\t%s", commandfile, line); */
linedup = xstrdup (line); /* 93/Nov/15 */
if (linedup == NULL) {
- showline("ERROR: out of memory\n", 1); /* readcommands */
+ show_line("ERROR: out of memory\n", 1); /* read_commands */
// exit(1);
return -1; // failure
}
optarg = s+2;
/* if (*optarg = '=') optarg++; */
if (*optarg == '=') optarg++;
- if (analyzeflag(c, optarg) < 0) return -1; // failure ???
+ if (analyze_flag(c, optarg) < 0) return -1; // failure ???
}
/* else break; */ /* ignore non-flag items */
s = strtok(NULL, " \t\n\r"); /* go to next token */
/* try and read commands on command line */
-int readcommandline (int ac, char **av)
+int read_command_line (int ac, char **av)
{
int c;
char *optargnew; /* equal to optarg, unless that starts with `=' */
/* in which case it is optarg+1 to step over the `=' */
/* if optarg = 0, then optargnew = 0 also */
-// showline("readcommandline\n", 0);
+// show_line("read_command_line\n", 0);
if (ac < 2) return 0; /* no args to analyze ? 94/Apr/10 */
/* while ((c = getopt(ac, av, "+vitrdczp?m:h:x:E:")) != EOF) { */
while ((c = getopt(ac, av, allowedargs)) != EOF) {
if (optarg != 0 && *optarg == '=') optargnew = optarg+1;
else optargnew = optarg;
- analyzeflag (c, optargnew);
+ analyze_flag (c, optargnew);
}
if (show_use || quitflag == 3) {
// showversion (stdout);
stamp_it(log_line);
strcat(log_line, "\n");
- showline(log_line, 0);
+ show_line(log_line, 0);
stampcopy(log_line);
strcat(log_line, "\n");
- showline(log_line, 0);
+ show_line(log_line, 0);
if (show_use) show_usage(av[0]);
else if (quitflag == 3) {
strcat(log_line, "\n");
- showline(log_line, 0);
+ show_line(log_line, 0);
}
// exit (0);
return -1; // failure
if (replfile != NULL && *replfile != '\0') { /* read user defined replacement */
if (read_xchr_file(replfile, 1, av)) {
- if (trace_flag) showline("KEY REPLACE ON\n", 0);
+ if (trace_flag) show_line("KEY REPLACE ON\n", 0);
key_replace = true;
}
}
if (xchrfile != NULL && *xchrfile != '\0') { /* read user defined xchr[] */
if (read_xchr_file(xchrfile, 0, av)) {
- if (trace_flag) showline("NON ASCII ON\n", 0);
+ if (trace_flag) show_line("NON ASCII ON\n", 0);
non_ascii = true;
}
}
-/* non_ascii used in texmf.c (t_open_in & input_line & calledit) */
+/* non_ascii used in texmf.c (t_open_in & input_line & call_edit) */
/* see also xchr [] & xord [] use in tex3.c and itex.c */
return 0;
}
encoding_name = "";
- if (readcommands(yytexcmd) < 0) /* read yandytex.cmd 1994/July/12 */
+ if (read_commands(yytexcmd) < 0) /* read yandytex.cmd 1994/July/12 */
return -1; // in case of error
- if (readcommandline(ac, av) < 0) /* move out to subr 94/Apr/10 */
+ if (read_command_line(ac, av) < 0) /* move out to subr 94/Apr/10 */
return -1; // in case of error
if (optind == 0) optind = ac; /* no arg case paranoia 94/Apr/10 */
// showversion (log_line);
stamp_it(log_line);
strcat(log_line, "\n");
- showline(log_line, 0);
+ show_line(log_line, 0);
stampcopy(log_line);
strcat(log_line, "\n");
- showline(log_line, 0);
+ show_line(log_line, 0);
}
/* if (show_use) show_usage(av[0]); */ /* show usage and quit */
if (is_initex) {
#if defined(ALLOCATEHIGH) || defined(ALLOCATELOW)
if (mem_extra_high != 0 || mem_extra_low != 0) {
- showline("ERROR: Cannot extend main memory in iniTeX\n", 1);
+ show_line("ERROR: Cannot extend main memory in iniTeX\n", 1);
mem_extra_high = 0; mem_extra_low = 0;
}
#endif
}
else {
if (mem_initex != 0) {
- showline("ERROR: Can only set initial main memory size in iniTeX\n", 1);
+ show_line("ERROR: Can only set initial main memory size in iniTeX\n", 1);
mem_initex = 0;
}
if (trie_size != 0) {
- showline("ERROR: Need only set hyphenation trie size in iniTeX\n", 1);
+ show_line("ERROR: Need only set hyphenation trie size in iniTeX\n", 1);
/* trie_size = 0; */
}
}
if (mem_initex > 10000L * 1024L) mem_initex = mem_initex / 1024;
#ifdef ALLOCATEHIGH /* not used anymore */
if (mem_extra_high > 2048L * 1024L) { /* extend SW area by 16 mega byte! */
- showline(
+ show_line(
"WARNING: There may be no benefit to asking for so much memory\n", 0);
mem_extra_high = 2048 * 1024; /* limit to SW to 4 x VLR */
}
#endif
#ifdef ALLOCATELOW /* not used anymore */
if (mem_extra_low > 2048L * 1024L) { /* extend VL area by 16 mega byte! */
- showline(
+ show_line(
"WARNING: There may be no benefit to asking for so much memory\n", 0);
mem_extra_low = 2048 * 1024; /* limit VLR to 4 x SW */
}
#endif
if (mem_initex > 2048L * 1024L) { /* extend main memory by 16 mega byte! */
- showline(
+ show_line(
"WARNING: There may be no benefit to asking for so much memory\n", 0);
/* mem_initex = 2048 * 1024; */
}
if (new_hyphen_prime < 0) new_hyphen_prime = 0;
if (new_hyphen_prime > 0) {
if (! is_initex)
- showline("ERROR: Can only set hyphen prime in iniTeX\n", 1);
+ show_line("ERROR: Can only set hyphen prime in iniTeX\n", 1);
else {
if (new_hyphen_prime % 2 == 0) new_hyphen_prime++;
while (!prime(new_hyphen_prime)) new_hyphen_prime = new_hyphen_prime+2;
if (trace_flag) {
sprintf(log_line, "Using %d as hyphen prime\n", new_hyphen_prime);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
}
}
void perrormod (char *s)
{
sprintf(log_line, "`%s': %s\n", s, strerror(errno));
- showline(log_line, 1);
+ show_line(log_line, 1);
}
void pause (void)
if (debugpause) {
// if ((debugpause > 1) || flag) {
if (debugpause || flag > 0) {
- showline("\n", 0);
+ show_line("\n", 0);
#ifndef _WINDOWS
- showline("Press any key to continue . . .\n", 0);
+ show_line("Press any key to continue . . .\n", 0);
pause();
#endif
}
if (grabenv ("DEBUGPAUSE") != NULL) {
(void) _getcwd(current, sizeof(current));
sprintf(log_line, "Current directory: `%s'\n", current);
- showline(log_line, 0);
+ show_line(log_line, 0);
for (m = 0; m < argc; m++) {
// sprintf(log_line, "%2d:\t`%s'\n", m, argv[m]);
sprintf(log_line, "%2d: `%s'\n", m, argv[m]);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
// checkpause(0);
checkpause(-1);
#ifdef DEBUGTWIDDLE
if (trace_flag) {
sprintf(log_line, "Hidetwiddle %s", name);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
#endif
/* while (*s != '\0' && *s != ' ') { */
#ifdef DEBUGTWIDDLE
if (trace_flag) {
sprintf(log_line, "=> %s\n", name);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
#endif
}
if (trace_flag || debug_flag) {
sprintf(log_line, "deslash: k %d argv[k] %s (argc %d)\n",
optind, av[optind], ac);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
unixify(av[optind]);
}
if (trace_flag || debug_flag) {
sprintf(log_line, "deslash: k %d argv[k] %s (argc %d)\n",
optind+1, av[optind+1], ac);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
unixify(av[optind+1]);
}
if (debugfile) debug_flag = 1;
else debug_flag = 0;
if (debug_flag) {
- showline("TEXDEBUG\n", 0);
+ show_line("TEXDEBUG\n", 0);
trace_flag = 1; /* 94/April/14 */
}
if (sizeof(memory_word) != 8) { /* compile time test */
sprintf(log_line, "ERROR: Bad word size %d!\n", sizeof(memory_word));
- showline(log_line, 1);
+ show_line(log_line, 1);
}
start_time = clock(); /* get time */
if (initcommands(ac, av))
return -1; // failure
- checkfixedalign(trace_flag); /* sanity check 1994/Jan/8 */
+ check_fixed_align(trace_flag); /* sanity check 1994/Jan/8 */
format_file = NULL; /* to be set in openinou.c 94/Jun/21 */
string_file = NULL; /* to be set in openinou.c 96/Jan/15 */
closed_already=0; // so can only do once
- if (trace_flag) showline("Entering init (local)\n", 0);
+ if (trace_flag) show_line("Entering init (local)\n", 0);
/* Print version *after* banner ? */ /* does this get in log file ? */
no_interrupts = 0;
if (format_spec && mem_spec_flag) {
- showline("WARNING: Cannot change initial main memory size when format specified", 1);
+ show_line("WARNING: Cannot change initial main memory size when format specified", 1);
}
if (allocate_memory() != 0) /* NOW, try and ALLOCATE MEMORY if needed */
return -1; // if failed to allocate
/* following is more or less useless since most all things not yet alloc */
- checkallocalign(trace_flag); /* sanity check 1994/Jan/8 */
+ check_alloc_align(trace_flag); /* sanity check 1994/Jan/8 */
#ifdef HEAPSHOW
if (trace_flag) showaddresses(); /* debugging only 1996/Jan/20 */
#endif
/* if (heap_flag) heap_dump(stdout, 1); */ /* redundant ? */
#endif
- if (trace_flag) showline("Leaving init (local)\n", 0);
+ if (trace_flag) show_line("Leaving init (local)\n", 0);
return 0; // success
}
/* #define CLOCKS_PER_SEC 1000 */ /* #define CLK_TCK CLOCKS_PER_SEC */
-/* void showinterval (clock_t start, clock_t end) { */
-void showinterval (clock_t interval)
+/* void show_inter_val (clock_t start, clock_t end) { */
+void show_inter_val (clock_t interval)
{
/* clock_t interval; */
/* int seconds, tenths; */
seconds = tenths / 10;
tenths = tenths % 10;
sprintf(log_line, "%d.%d", seconds, tenths);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
else if (interval >= CLK_TCK) { /* 94/Feb/25 */
hundredth = (interval * 100 + CLK_TCK / 2) / CLK_TCK;
seconds = hundredth / 100;
hundredth = hundredth % 100;
sprintf(log_line, "%d.%02d", seconds, hundredth);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
else if (interval > 0) { /* 94/Oct/4 */
thousands = (interval * 1000 + CLK_TCK / 2) / CLK_TCK;
seconds = thousands / 1000;
thousands = thousands % 1000;
sprintf(log_line, "%d.%03d", seconds, thousands);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
- else showline("0", 0); /* 95/Mar/1 */
+ else show_line("0", 0); /* 95/Mar/1 */
}
/* final cleanup opportunity */ /* flag is non-zero if error exit */
"! There %s %d missing character%s --- see log file\n",
(missing_characters == 1) ? "was" : "were", missing_characters,
(missing_characters == 1) ? "" : "s");
- showline(log_line, 0);
+ show_line(log_line, 0);
}
if (free_memory() != 0) flag++;
/* dumpaccess(); */
if (verbose_flag) {
/* sprintf(log_line, "start %ld main %ld finish %ld\n",
start_time, main_time, finish_time); */
- showline("Total ", 0);
-/* showinterval(start_time, finish_time); */
- showinterval(finish_time - start_time);
- showline(" sec (", 0);
-/* showinterval(start_time, main_time); */
- showinterval(main_time - start_time);
- showline(" format load + ", 0);
-/* showinterval(main_time, finish_time); */
- showinterval(finish_time - main_time);
- showline(" processing) ", 0);
+ show_line("Total ", 0);
+/* show_inter_val(start_time, finish_time); */
+ show_inter_val(finish_time - start_time);
+ show_line(" sec (", 0);
+/* show_inter_val(start_time, main_time); */
+ show_inter_val(main_time - start_time);
+ show_line(" format load + ", 0);
+/* show_inter_val(main_time, finish_time); */
+ show_inter_val(finish_time - main_time);
+ show_line(" processing) ", 0);
if (total_pages > 0) {
/* msec = (finish_time - main_time) * 1000 / (CLK_TCK * total_pages); */
/* sprintf(log_line, " %d.%d sec per page", msec / 1000, msec % 1000); */
/* sprintf(log_line, " %d.%03d sec per page", msec / 1000, msec % 1000); */
- showinterval ((finish_time - main_time) / total_pages);
- showline(" sec per page", 0);
+ show_inter_val ((finish_time - main_time) / total_pages);
+ show_line(" sec per page", 0);
}
- showline("\n", 0);
+ show_line("\n", 0);
}
checkpause(flag);
#define MAXCOLUMN 78
-void printcsname (FILE *output, int h)
+void print_cs_name (FILE *output, int h)
{
int c, textof, n;
char *s;
if (textcolumn != 0) {
sprintf(log_line, ", ");
if (output != NULL) fprintf(output, log_line);
- else showline(log_line, 0);
+ else show_line(log_line, 0);
textcolumn += 2;
}
if (textcolumn + n + 2 >= MAXCOLUMN) {
sprintf(log_line, "\n");
- if (output == stderr) showline(log_line, 1);
- else if (output == stdout) showline(log_line, 0);
+ if (output == stderr) show_line(log_line, 1);
+ else if (output == stdout) show_line(log_line, 0);
else fputs(log_line, output);
textcolumn=0;
}
for (c = str_start[textof]; c < str_start[textof+1]; c++) {
*s++ = str_pool[c];
}
- if (output == stderr) showline(log_line, 1);
- else if (output == stdout) showline(log_line, 0);
+ if (output == stderr) show_line(log_line, 1);
+ else if (output == stdout) show_line(log_line, 0);
else fprintf(output, log_line);
textcolumn += n;
}
/* Allocate table of indeces to allow sorting on csname */
/* Allocate flags to remember which ones already listed at start */
-void printcsnames (FILE *output, int pass)
+void print_cs_names (FILE *output, int pass)
{
int h, k, ccount, repeatflag;
int *cnumtable;
sprintf(log_line, "\n%d %s multiletter control sequences:\n\n",
ccount, (pass == 1) ? "new" : "");
- if (output == stderr) showline(log_line, 1);
- else if (output == stdout) showline(log_line, 0);
+ if (output == stderr) show_line(log_line, 1);
+ else if (output == stdout) show_line(log_line, 0);
else fprintf(output, log_line);
if (ccount > 0) { /* don't bother to get into trouble */
for (k = 0; k < ccount; k++) {
h = cnumtable[ k];
if (pass == 1 && csused[ h]) continue;
- printcsname(output, h);
+ print_cs_name(output, h);
}
sprintf(log_line, "\n");
- if (output == stderr) showline(log_line, 1);
- else if (output == stdout) showline(log_line, 0);
+ if (output == stderr) show_line(log_line, 1);
+ else if (output == stdout) show_line(log_line, 0);
else fprintf(output, log_line);
free((void *)cnumtable);
}
while (l-- > 0) *s++ = str_pool[k++];
*s++ = ' ';
*s = '\0';
- showline(log_line, 0);
+ show_line(log_line, 0);
}
/* compare two strings in str_pool (not null terminated) */
// communicate with DVIWindo (for yandytex.dll)
-void showline (char *line, int errflag) { /* 99/June/11 */
+void show_line (char *line, int errflag) { /* 99/June/11 */
int ret;
if (IsWindow(hConsoleWnd) == 0) { // in case the other end died
// Provide means for buffering up individual characters
-void showchar (int chr) {
+void show_char (int chr) {
if (showlineinx +2 >= SHOWLINEBUFLEN) ClearShowBuffer();
showlinebuf[showlineinx++] = (char) chr;
if (chr == '\n') ClearShowBuffer();
// char *s;
if (AskUserCall == NULL) return 0;
// sprintf(log_line, "str_start %x %x\n", str_start, str_start [831]);
-// showline(log_line, 1);
+// show_line(log_line, 1);
*buffer = '\0';
ret = AskUserCall (question, help, buffer); // value returned by dialogbox
// strcpy(buffer, "x");
// strcat(buffer, " "); // ???
// sprintf(log_line, "str_start %x %x\n", str_start, str_start[831]);
-// showline(log_line, 1);
+// show_line(log_line, 1);
// input_line_finish(); // ???
// s = buffer + strlen(buffer);
// *s++ = ' '; // space terminate
// can't getenv("DEBUGPAUSE") cause setupdviwindo not called yet
// if (grabenv("DEBUGPAUSE") != NULL) {
-// showline(line, 0); // debugging - show command line
-// showline("\n", 0);
+// show_line(line, 0); // debugging - show command line
+// show_line("\n", 0);
// }
xargc = makecommandargs(line); // sets up global *xargv[]
# CFLAGS=-c -DDOS -DMSDOS -DPHARLAP -DTeX -DMYDEBUG -Ilib -YX -Ox -Ge -Gy -Gf -W4
# Release version
# CFLAGS=/c /MT /W4 /GX /Ox /O2 /DMT /DMSDOS /DTeX /DPHARLAP /DNDEBUG /D_X86=1 /DWIN32 /D_WIN32 /DNDEBUG /D_WINDOWS /Ilib /YX
-CFLAGS=/c /MT /W4 /Ox /O2 /DMT /DMSDOS /DTeX /DPHARLAP /DNDEBUG /D_X86=1 /DWIN32 /D_WIN32 /DNDEBUG /D_WINDOWS /Ilib /YX
+CFLAGS=/c /MT /W4 /Ox /O2 /DMT /DMSDOS /DTeX /DPHARLAP /DNDEBUG /D_X86=1 /DWIN32 /D_WIN32 /DNDEBUG /D_WINDOWS
# Debugging version
# CFLAGS=/c /MT /W4 /GX /Od /Zi /DMT /DMSDOS /DTeX /DPHARLAP /D_X86=1 /DWIN32 /D_WIN32 /D_WINDOWS
$(LINK) $(LFLAGS) texmf itex openinou subroute local \
tex0 tex1 tex2 tex3 tex4 tex5 tex6 tex7 tex8 tex9
copy texmf.dll yandytex.dll
- copy yandytex.dll .\winsourc\ /y
# ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ###
Copyright 2007 TeX Users Group.
+Copyright 2014 Clerk Ma.
You may freely use, modify and/or distribute this file.
makefile 9945 1-09-95 8:20a current selected
Copyright 2007 TeX Users Group.
+Copyright 2014 Clerk Ma.
You may freely use, modify and/or distribute this file.
use \write18{...} to execute system commmands?
/* Following works on null-terminated strings */
-/* void checkshortname(void) { */ /* 1995/Feb/20 */
-void checkshortname (unsigned char *s)
+/* void check_short_name(void) { */ /* 1995/Feb/20 */
+void check_short_name (unsigned char *s)
{ /* 1995/Sep/26 */
unsigned char *star, *sdot;
int n;
#ifdef MSDOS
if (shortenfilename) { /* 8 + 3 file names on Windows NT 95/Feb/20 */
/* null_terminate (name_of_file + 1); */
- checkshortname(name_of_file + 1); /* 95/Sep/26 */
+ check_short_name(name_of_file + 1); /* 95/Sep/26 */
/* space_terminate (name_of_file + 1); */
}
#endif /* MSDOS */
if (open_trace_flag) {
/* null_terminate (name_of_file + 1); */
sprintf(log_line, " Open `%s' for input ", name_of_file+1); /* Pascal */
- showline(log_line, 0);
+ show_line(log_line, 0);
/* space_terminate (name_of_file + 1); */
} // debugging only
/* space_terminate (name_of_file + 1); */
if (trace_flag) {
sprintf(log_line, "Methinks the source %s is `%s'\n", "file", source_direct);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
if ((s = strrchr(source_direct, '/')) == NULL) *source_direct='\0';
else *(s+1) = '\0';
if (trace_flag) {
sprintf(log_line, "Methinks the source %s is `%s'\n", "directory", source_direct);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
}
#endif /* ifndef TEXONLY */
\f
-char *getenvshroud (char *); /* defined in texmf.c */
+char *get_env_shroud (char *); /* defined in texmf.c */
/* char outputdirectory[PATH_MAX]; */ /* defined in local.c */
\f
/* #define a_close(f) if (f) { if (ferror (f)) {perror(""); exit(1);} } if (f) (void) fclose (f) */
-/* #define a_close(f) if (f) (void) checkfclose (f) */
+/* #define a_close(f) if (f) (void) check_fclose (f) */
/* At least check for I/O error (such as disk full) when closing */
/* Would be better to check while writing - but this is better than nothing */
void perrormod (char *s); /* in local.c */
-// checkfclose not used by anything
+// check_fclose not used by anything
-int checkfclose (FILE *f)
+int check_fclose (FILE *f)
{ /* 1993/Nov/20 - bkph */
if (f == NULL) return 0; // sanity check
if (ferror(f) || fclose (f)) {
#ifdef MSDOS
if (shortenfilename) { /* 8 + 3 file names on Windows NT 95/Feb/20 */
/* null_terminate (name_of_file + 1); */
-/* checkshortname(); */
- checkshortname(name_of_file + 1); /* 95/Sep/26 */
+/* check_short_name(); */
+ check_short_name(name_of_file + 1); /* 95/Sep/26 */
/* space_terminate (name_of_file + 1); */
}
#endif
prepend_path_if(name_of_file+1, name_of_file+1, ".aux", aux_directory)) {
if (open_trace_flag) {
sprintf(log_line, "After prepend %s\n", name_of_file+1);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
}
#endif
if (open_trace_flag) {
/* null_terminate (name_of_file + 1); */
sprintf(log_line, " Open `%s' for output ", name_of_file+1); /* C string */
- showline(log_line, 0);
+ show_line(log_line, 0);
/* space_terminate (name_of_file + 1); */
} // debugging only
if (*f == NULL) { /* Can't open as given. Try the envvar. */
/* string temp_dir = getenv ("TEXMFOUTPUT"); */ /* 93/Nov/20 */
/* string temp_dir = getenv ("TEXMFOUT"); */ /* 93/Nov/20 */
-/* string temp_dir = getenvshroud ("UFYNGPVUQVU"); */
- string temp_dir = getenvshroud ("UFYNGPVU");
+/* string temp_dir = get_env_shroud ("UFYNGPVUQVU"); */
+ string temp_dir = get_env_shroud ("UFYNGPVU");
/* if (deslash) unixify(temp_dir); */ /* deslashify 93/Dec/28 */
}
}
-// showline(name_of_file+1, 1); // debugging only
+// show_line(name_of_file+1, 1); // debugging only
// New code to remember complete dvi_file name and log_file_name
// To remember for output at the end 2000 June 18
if (strstr(name_of_file + 1, ".dvi") != NULL) {
strcat(log_line, (char*)name_of_file+1);
unixify(log_line);
dvi_file_name = xstrdup(log_line);
-// showline(dvi_file_name, 1); // debugging only
+// show_line(dvi_file_name, 1); // debugging only
}
else if (strstr(name_of_file + 1, ".log") != NULL) {
if (qualified(name_of_file+1)) *log_line = '\0';
strcat(log_line, name_of_file+1);
unixify(log_line);
log_file_name = xstrdup(log_line);
-// showline(log_file_name, 1); // debugging only
+// show_line(log_file_name, 1); // debugging only
}
/* Back into a Pascal string, but first get its length. */
temp_length = strlen (name_of_file + 1);
/* ourpaths.h: declarations for path searching. The `...PATH' constants
are used both as indices and just as enumeration values. Their
values must match the initialization of `env_var_names'. The
- `...PATHBIT' constants are used in the argument to `setpaths'.
+ `...PATHBIT' constants are used in the argument to `set_paths'.
Copyright 1992 Karl Berry
Copyright 2007 TeX Users Group
/* At least for output, we SHOULD check error status !!! */
/* Ideally should check this DURING output from time to time */
/* #define a_close(f) if (f) { if (ferror (f)) {perror(""); exit(1);} } if (f) (void) fclose (f) */
-/* #define a_close(f) if (f) (void) checkfclose (f) */
-#define a_close(f) checkfclose (f)
+/* #define a_close(f) if (f) (void) check_fclose (f) */
+#define a_close(f) check_fclose (f)
#ifdef BibTeX
/* See bibtex.ch for why these are necessary. */
else
final_code = unix_code;
if (jump_used) {
- showline("Jump Buffer already used\n", 1);
+ show_line("Jump Buffer already used\n", 1);
exit(1);
}
jump_used++;
address new_mem = (address) malloc (size);
if (new_mem == NULL) {
sprintf(log_line, "malloc: Unable to honor request for %u bytes.\n", size);
- showline(log_line, 1);
+ show_line(log_line, 1);
abort (); // ???
}
#ifdef MYDEBUG
if (trace_flag) {
sprintf(log_line, "XMALLOC %d\n", size); /* 1996/Jan/20 */
- showline(log_line, 0);
+ show_line(log_line, 0);
}
#endif
return new_mem;
sprintf(log_line,
"Unable to honor request for %u elements of size %u.\n",
nelem, elsize);
- showline(log_line, 1);
+ show_line(log_line, 1);
abort ();
}
return new_mem;
#ifdef MYDEBUG
if (trace_flag) {
sprintf(log_line, "XSTRDUP %d %s\n", strlen(s)+1, s);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
#endif
return strcpy (pnew_string, s);
new_mem = (address) realloc (old_ptr, size);
if (new_mem == NULL) {
sprintf(log_line, "Unable to honor request for %u bytes.\n", size);
- showline(log_line, 1);
+ show_line(log_line, 1);
abort ();
}
}
#ifdef MYDEBUG
if (trace_flag) {
sprintf(log_line, "CONCAT %s and %s ", s1, s2);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
#endif
answer = (string) xmalloc (strlen (s1) + strlen (s2) + 1);
#ifdef MYDEBUG
if (trace_flag) {
sprintf(log_line, "=> %s\n", answer);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
#endif
return answer;
#ifdef MYDEBUG
if (trace_flag) {
sprintf(log_line, "CONCAT3 %s, %s, and %s ", s1, s2, s3);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
#endif
answer = (string) xmalloc (strlen (s1) + strlen (s2) + strlen (s3) + 1);
#ifdef MYDEBUG
if (trace_flag) {
sprintf(log_line, "=> %s\n", answer);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
#endif
return answer;
loc++;
if (loc == limit-1) { /* very unlikely */
sprintf(log_line, " ERROR: line too long\n");
- showline(log_line, 1);
- showline(line, 0);
- showline("\n", 0);
+ show_line(log_line, 1);
+ show_line(line, 0);
+ show_line("\n", 0);
break;
}
}
#define CACHEFILENAME /* cache last full path/file name 96/Nov/16 */
/* to speed up LaTeX 2e which opens files twice */
-/* `path_dirs' is initialized in `setpaths', to a null-terminated array
+/* `path_dirs' is initialized in `set_paths', to a null-terminated array
of directories to search for. */
static string *path_dirs[LAST_PATH];
(with the same name as the environment variable) in `site.h'. The
parameter PATH_BITS is a logical or of the paths we need to set. */
-void setpaths (int path_bits)
+void set_paths (int path_bits)
{
int n; /* 97/Apr/2 */
char *s, *t, *u; /* 94/Jan/6 */
if (trace_flag) {
sprintf(log_line, "Checking `%s' = %s %s %s\n",
buffer, texpath, PATH_SEP_STRING, "fmt"); /* 95/Jan/25 */
- showline(log_line, 0);
+ show_line(log_line, 0);
}
/* if (dir_p(buffer)) t = _strdup(buffer); */
if (dir_p(buffer)) t = xstrdup(buffer); /* 96/Jan/20 */
}
if (trace_flag) {
sprintf(log_line, "\nSetting up %s (default %s) ", "TEXFORMATS", t);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
}
/* path_dirs[TEXFORMATPATH] = initialize_path_list ("TEXFORMATS", TEXFORMATS); */
if (trace_flag) {
sprintf(log_line, "Checking `%s' = %s %s %s\n",
buffer, texpath, PATH_SEP_STRING, "fmt"); /* 95/Jan/25 */
- showline(log_line, 0);
+ show_line(log_line, 0);
}
/* if (dir_p(buffer)) t = _strdup(buffer); */
if (dir_p(buffer)) t = xstrdup(buffer); /* 96/Jan/20 */
}
if (trace_flag) {
sprintf(log_line, "\nSetting up %s (default %s) ", "TEXPOOL", t);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
}
}
if (trace_flag) {
sprintf(log_line, "Checking `%s' = %s %s %s\n",
buffer, texpath, PATH_SEP_STRING, "tfm"); /* 95/Jan/25 */
- showline(log_line, 0);
+ show_line(log_line, 0);
}
/* if (dir_p(buffer)) t = _strdup(buffer); */
if (dir_p(buffer)) t = xstrdup(buffer); /* 96/Jan/20 */
}
if (trace_flag) {
sprintf(log_line, "\nSetting up %s (default %s) ", "TEXFONTS", t);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
}
/* path_dirs[TFMFILEPATH] = initialize_path_list ("TEXFONTS", TEXFONTS); */
s = "TEXINPUT"; /* added PC-TeX vers 94/Jan/6 */
if (trace_flag) {
sprintf(log_line, "\nSetting up %s ", "TEXINPUTS");
- showline(log_line, 0);
+ show_line(log_line, 0);
}
}
/* path_dirs[TEXINPUTPATH] = initialize_path_list ("TEXINPUTS", TEXINPUTS); */
if (open_trace_flag) {
sprintf(log_line, "Test read access for `%s' ", name); /* C */
- showline(log_line, 0);
+ show_line(log_line, 0);
}
if (*name == '\0') return FALSE; /* sanity check */
sprintf(log_line, "\nFOUND `%s' (%d) IN CACHE: `%s' ",
name, path_index, last_filename);
/* name+1, path_index, last_filename); */
- showline(log_line, 0);
+ show_line(log_line, 0);
}
strcpy(name, last_filename);
return TRUE;
if (fontmap == NULL) {
if (trace_flag) {
sprintf(log_line, "Loading in texfonts.map file for %s\n", name);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
fontmap = map_create (path_dirs[path_index]);
}
}
if (open_trace_flag) {
- showline("\n", 0); /* improve trace format out 94/Jan/8 */
+ show_line("\n", 0); /* improve trace format out 94/Jan/8 */
}
if (open_trace_flag) {
#ifdef BUILDNAMEDIRECT
if (foundflag != 0) {
sprintf(log_line, "`%s' in test_read_access\n", buffer);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
#else
if (foundname != NULL) {
sprintf(log_line, "`%s' in test_read_access\n", foundname);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
#endif
}
if (trace_flag) {
sprintf(log_line, "Opening %s\n", map_filename); /* 97/May/17 */
- showline(log_line, 0);
+ show_line(log_line, 0);
}
// f = xfopen (map_filename, FOPEN_R_MODE);
f = fopen (map_filename, FOPEN_R_MODE);
sprintf(log_line,
" Have file name `%s', but no mapping (line %u in file %s).\n",
filename, map_lineno, map_filename);
- showline(log_line, 1);
+ show_line(log_line, 1);
}
else {
/* We've got everything. Insert the new entry. */
return 0; // success
}
-void unshroudstring (char *, char *, int); /* in texmf.c */
+void unshroud_string (char *, char *, int); /* in texmf.c */
/* Look for the file `texfonts.map' in each of the directories in
DIR_LIST. Entries in earlier files override later files. */
intermediate directory names in the path. */
strcpy (filename, *dir_list);
/* strcat (filename, "texfonts.map"); */ /* 1993/Nov/20 */
- unshroudstring (filename+strlen(filename),
+ unshroud_string (filename+strlen(filename),
"ufygpout/nbq", PATH_MAX - strlen(filename));
/* testing access first so xfopen won't fail... */
if (open_trace_flag) {
sprintf(log_line, "Is `%s' a readable file? ", fn);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
/* allow for `normal' (_A_NORMAL) as well as `read-only' files */
if ((fi.attrib & _A_SUBDIR) == 0) {
if (open_trace_flag) {
sprintf(log_line, "`%s' IS a readable file. ", fn);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
return fn; /* true - its a file, not a dir */
}
else {
if (open_trace_flag) {
sprintf(log_line, "`%s' is a subdirectory. ", fn);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
return NULL; /* false - directory */
}
else {
if (open_trace_flag) {
sprintf(log_line, "`%s' is NOT a readable file. ", fn);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
return NULL; /* false - not found or no read access */
}
strcpy (tmpfn, fn); /* make copy so can modify */
if (open_trace_flag) {
sprintf(log_line, "Is `%s' a directory? ", tmpfn);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
s = tmpfn + strlen(tmpfn) - 1;
if (fi.attrib & _A_SUBDIR) {
if (open_trace_flag) {
sprintf(log_line, "Directory `%s' DOES exist ", fn);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
return 1; /* true - it is a sub-directory */
}
else {
if (open_trace_flag) {
sprintf(log_line, "`%s' is a FILE, not a DIRECTORY ", fn);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
return 0; /* false - its a file, not a dir */
}
/* it is *not* top level and _findfirst failed - give up */
if (open_trace_flag) {
sprintf(log_line, "Directory `%s' does NOT exist ", fn);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
return 0; /* false - it is not a directory */
}
if (test == NULL) {
if (open_trace_flag) {
sprintf(log_line, "Directory `%s' does NOT exist ", tmpfn);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
return 0; /* false */
}
(void) fclose(test); /* have to remember to close it again */
if (open_trace_flag) {
sprintf(log_line, "Directory `%s' DOES exist ", tmpfn);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
return 1; /* true */
}
string found_name = NULL;
if (buffer == filename) {
- showline("buffer == filename\n", 1);
+ show_line("buffer == filename\n", 1);
}
*buffer = '\0'; /* "" in case we fail */
if (open_trace_flag) {
sprintf(log_line, "Find path for `%s' ", filename);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
/* ignore current directory for TFM files ? */ /* 1994/Jan/24 */
strcmp(*dir_list, "./") == 0) {
if (open_trace_flag) {
sprintf(log_line, "Ignoring `.' for %s ", filename);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
dir_list++; /* step over first entry in dir list */
}
if (trace_flag && open_trace_flag) { /* debugging trace 1994/Jan/8 */
char **pstrs;
pstrs = dir_list;
- showline("\n", 0);
+ show_line("\n", 0);
sprintf(log_line, "Find path for `%s' ", filename);
- showline(log_line, 0);
- showline("- IN: ", 0);
+ show_line(log_line, 0);
+ show_line("- IN: ", 0);
while (*pstrs != NULL) {
sprintf(log_line, "%s ", *pstrs);
- showline(log_line, 0);
+ show_line(log_line, 0);
pstrs++;
}
- showline("\n", 0);
+ show_line("\n", 0);
}
/* Do this before testing for absolute-ness, as a leading ~ will be an
s = source_direct;
if (trace_flag) {
sprintf(log_line, "Using %s dir %s %s\n", "source", s, "X");
- showline(log_line, 0);
+ show_line(log_line, 0);
}
sourceflag = 1; /* avoid increment of list below */
firsttime = 0; /* special stuff only first time */
}
else if (trace_flag) {
sprintf(log_line, "Using %s dir %s %s\n", "current", s, "X");
- showline(log_line, 0);
+ show_line(log_line, 0);
}
}
if (trace_flag) {
sprintf(log_line, "XCONCAT %s %s in find_path_filename\n",
s, filename);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
/* filename = concat (*dir_list, save_filename); */
(void) xconcat (buffer, s, filename);
if (open_trace_flag) {
// printf("Find path for `%s' ", filename);
sprintf(log_line, "Find path for `%s' ", filename);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
/* ignore current directory for TFM files ? */ /* 1994/Jan/24 */
strcmp(*dir_list, "./") == 0) {
if (open_trace_flag) {
sprintf(log_line, "Ignoring `.' for %s ", filename);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
dir_list++; /* step over first entry in dir list */
}
if (trace_flag && open_trace_flag) { /* debugging trace 1994/Jan/8 */
char **pstrs;
pstrs = dir_list;
- showline("\n", 0);
+ show_line("\n", 0);
sprintf(log_line, "Find path for `%s' ", filename);
- showline(log_line, 0);
- showline("- IN: ", 0);
+ show_line(log_line, 0);
+ show_line("- IN: ", 0);
while (*pstrs != NULL) {
// printf("%s ", *pstrs);
sprintf(log_line, "%s ", *pstrs);
- showline(log_line, 0);
+ show_line(log_line, 0);
pstrs++;
}
- showline("\n", 0);
+ show_line("\n", 0);
}
/* Do this before testing for absolute-ness, as a leading ~ will be an
s = source_direct;
if (trace_flag) {
sprintf(log_line, "Using %s dir %s %s\n", "source", s, "F");
- showline(log_line, 0);
+ show_line(log_line, 0);
}
sourceflag = 1; /* avoid increment of list below */
firsttime = 0; /* special stuff only first time */
}
else if (trace_flag) {
sprintf(log_line, "Using %s dir %s %s\n", "current", s, "F");
- showline(log_line, 0);
+ show_line(log_line, 0);
}
}
if (trace_flag) {
sprintf(log_line, "CONCAT %s %s in find_path_filename\n",
s, save_filename); /* 1996/Jan/20 */
- showline(log_line, 0);
+ show_line(log_line, 0);
}
filename = concat (s, save_filename);
/* found_name = readable (filename); */
if (open_trace_flag) {
sprintf(log_line, "is %s readable? ", name);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
/* Check first whether we have read access, then */
if (dir_p (name)) {
if (open_trace_flag) {
sprintf(log_line, "tested read access of directory `%s' ", name);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
ret = NULL;
}
}
#endif
else if (errno == EACCES) {
- if (trace_flag) showline("Access denied!\n", 0);
+ if (trace_flag) show_line("Access denied!\n", 0);
ret = NULL;
}
else if (errno == ENOENT) {
- if (trace_flag) showline("File or path name not found!\n", 1);
+ if (trace_flag) show_line("File or path name not found!\n", 1);
ret = NULL;
}
else {
if (trace_flag) {
sprintf(log_line, "Unknown access error %d!\n", errno);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
ret = NULL;
}
if (trace_flag) {
sprintf(log_line, "WARNING: no env_name noted, using default %s\n",
default_path);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
return;
}
if (trace_flag) {
sprintf(log_line, "WARNING: %s not defined in environment, using default %s\n",
env_name, default_path);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
return;
}
}
if (trace_flag) {
sprintf(log_line,"Now is %s\n", env_value);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
}
#endif
if (trace_flag) {
if (env_name) { /* only if env_name is non-null 94/Feb/24 */
sprintf(log_line, "\nSet %s=", env_name);
- showline(log_line, 0);
+ show_line(log_line, 0);
if (env_value) { /* only if env_name value is set */
- showline(env_value, 0);
+ show_line(env_value, 0);
}
- showline("\n", 0);
+ show_line("\n", 0);
}
}
#ifdef MSDOS
if (current_flag) { /* suppress adding current directory - debugging */
if (trace_flag) {
sprintf(log_line, "Adding directory `%s'\n", "."); /* 95/Jan/24 */
- showline(log_line, 0);
+ show_line(log_line, 0);
}
add_directory(&dir_list, &dir_count, ".");
}
// #ifdef MYDEBUG
if (trace_flag) {
sprintf(log_line, "dir %s\n", dir);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
// #endif
/* If the path starts with ~ or ~user, expand it. Do this
{
if (open_trace_flag) {
sprintf(log_line, "Double backslash on `%s' ", dir); /* bkph */
- showline(log_line, 0);
+ show_line(log_line, 0);
}
dir[len - 1] = 0;
if (dir_p (dir)) {
if (trace_flag) {
sprintf(log_line, "Adding directory `%s'\n", dir);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
add_directory (&dir_list, &dir_count, dir);
/* local variable 'findt' used without having been initialized ? &findt ? */
{
if (open_trace_flag) {
sprintf(log_line, "Single backslash on `%s' ", dir); /* bkph */
- showline(log_line, 0);
+ show_line(log_line, 0);
}
/* dir[len - 1] = 0; */
if (dir_p (dir)) {
if (trace_flag) {
sprintf(log_line, "Adding directory `%s'\n", dir);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
add_directory (&dir_list, &dir_count, dir);
expand_subdir (&dir_list, &dir_count, dir,
if (dir_p (dir)) {
if (trace_flag) {
sprintf(log_line, "Adding directory `%s'\n", dir);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
add_directory (&dir_list, &dir_count, dir);
}
// #ifdef MYDEBUG
if (trace_flag) {
- showline("Adding terminating null\n", 0);
+ show_line("Adding terminating null\n", 0);
}
// #endif
// #ifdef MYDEBUG
if (trace_flag) {
sprintf(log_line, "Adding directory `%s'\n", dir);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
// #else
// if (open_trace_flag) {
// sprintf(log_line, "Adding directory `%s' ", dir);
-// showline(log_line, 0);
+// show_line(log_line, 0);
// }
// #endif
if (trace_flag) { /* 1994/Jan/8 */
if (env_path == NULL) {
sprintf(log_line, "Using the default %s\n", expansion);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
else if (expansion == env_path) {
sprintf(log_line, "Using %s (default was %s)\n", expansion, default_path);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
else { /* expansion != env_path */
sprintf(log_line, "Expanded %s (default was %s) to %s\n",
env_path, default_path, expansion);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
}
return expansion;
// #ifdef MYDEBUG
if (trace_flag) {
sprintf(log_line, "Find Dir List for path: %s\n", path);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
// #endif
// #ifdef MYDEBUG
if (trace_flag) {
sprintf(log_line, "Unixified name: %s\n", t);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
// #endif
#endif /* DOS */
if (trace_flag) {
sprintf(log_line, "\nExpanding sub dir %s ", dirname);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
#ifdef MSDOS
/* Note: the _A_SUBDIR means we get ordinary files PLUS sub-directories */
if (open_trace_flag) {
sprintf(log_line, "\nDIRNAME `%s' ", dirname);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
/* we'll need to step over `.' and `..' up front of directory list */
hFind = _findfirst(buffer, &findt);
/* if (open_trace_flag) */
if (open_trace_flag && trace_flag) {
sprintf(log_line, "NEXT `%s' (%0x) ", findt.name, findt.attrib);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
/* if (strchr(findt.name, '.') != NULL) continue; *//* not needed */
if (findt.name[0] != '.' && /* ignore "." and ".." */
findt.attrib & _A_SUBDIR){ /* only look at SUBDIRs */
if (open_trace_flag) {
sprintf(log_line, "\nDIRNAME `%s' ", dirname);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
#ifdef MSDOS
potential = concat3(dirname,
lowercase (potential); /* make look nicer ? */
if (open_trace_flag) {
sprintf(log_line, "POTENTIAL `%s' ", potential);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
if (trace_flag) {
sprintf(log_line, "Adding directory `%s'\n", potential); /* 95/Jan/24 */
- showline(log_line, 0);
+ show_line(log_line, 0);
}
add_directory(dir_list_ptr, dir_count_ptr, potential);
if (recurseflag)
{ /* It's a subdirectory; add `potential' to the list. */
if (trace_flag) {
sprintf(log_line, "Adding directory `%s'\n", potential); /* 95/Jan/24 */
- showline(log_line, 0);
+ show_line(log_line, 0);
}
add_directory (dir_list_ptr, dir_count_ptr, potential);
}
-char *getenvshroud (char *); /* in texmf.c */
+char *get_env_shroud (char *); /* in texmf.c */
/* Scan elements of ARGV (whose length is ARGC) for option characters
given in OPTSTRING.
++optstring;
}
/* else if (getenv ("POSIXLY_CORRECT") != NULL) */
- else if (getenvshroud ("QPTJYMZ`DPSSFDU") != NULL)
+ else if (get_env_shroud ("QPTJYMZ`DPSSFDU") != NULL)
ordering = REQUIRE_ORDER;
else
ordering = PERMUTE;
if (opterr) {
sprintf(log_line,
"%s `%s' is ambiguous\n", commandlineflag, argv[optind]);
- showline(log_line, 1);
+ show_line(log_line, 1);
}
nextchar += strlen (nextchar);
optind++;
sprintf(log_line,
"%s `--%s' does not take an argument\n",
commandlineflag,pfound->name);
- showline(log_line, 1);
+ show_line(log_line, 1);
}
else { /* +option or -option */
// fprintf (stderr,
sprintf(log_line,
"%s `%c%s' does not take an argument\n",
commandlineflag, argv[optind - 1][0], pfound->name);
- showline(log_line, 1);
+ show_line(log_line, 1);
}
}
nextchar += strlen (nextchar);
sprintf(log_line,
"%s `%s' requires an argument\n",
commandlineflag, argv[optind - 1]);
- showline(log_line, 1);
+ show_line(log_line, 1);
}
nextchar += strlen (nextchar);
return '?';
sprintf (log_line,
"don't understand %s `--%s'\n",
commandlineflag, nextchar);
- showline(log_line, 1);
+ show_line(log_line, 1);
}
else { /* +option or -option */
sprintf (log_line,
"don't understand %s `%c%s'\n",
commandlineflag, argv[optind][0], nextchar);
- showline(log_line, 1);
+ show_line(log_line, 1);
}
}
nextchar = (char *) "";
// fprintf (stderr,
sprintf(log_line,
"Unrecognized %s (0%o)\n", commandlineflag, c);
- showline(log_line, 1);
+ show_line(log_line, 1);
}
else {
// fprintf (stderr,
sprintf(log_line,
"Unrecognized %s `-%c'\n", commandlineflag, c);
- showline(log_line, 1);
+ show_line(log_line, 1);
}
}
return '?';
sprintf(log_line,
"%s `-%c' requires an argument\n",
commandlineflag, c);
- showline(log_line, 1);
+ show_line(log_line, 1);
}
c = '?';
}
#endif
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
+void print_err (const char * s)
+{
+ if (interaction == error_stop_mode);
+ //print_nl("! ");
+ print_string(s);
+}
+/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
// print newline
/* sec 0058 */
switch(selector){
case term_and_log:
{
- showchar('\n');
+ show_char('\n');
term_offset = 0;
(void) putc ('\n', log_file);
file_offset = 0;
break;
case term_only:
{
- showchar('\n');
+ show_char('\n');
term_offset = 0;
}
break;
switch(selector){
case term_and_log:
{
- (void) showchar(Xchr(s));
+ (void) show_char(Xchr(s));
incr(term_offset);
(void) putc(Xchr(s), log_file);
incr(file_offset);
if(term_offset == max_print_line){
- showchar('\n');
+ show_char('\n');
term_offset = 0;
}
if(file_offset == max_print_line){
break;
case term_only:
{
- (void) showchar(Xchr(s));
+ (void) show_char(Xchr(s));
incr(term_offset);
if(term_offset == max_print_line)print_ln ();
}
incr(j);
}
}
+void print_string_ (unsigned char *s)
+{
+ // 2000 Jun 18
+ while (*s > 0) print_char(*s++);
+}
/* sec 0060 */
// print string number s from string pool by calling print_
void slow_print_(integer s)
void print_file_name_(integer n, integer a, integer e)
{
/* sprintf(log_line, "\na %d n %d e %d\n", a, n, e); */
-/* showline(log_line, 0); */
+/* show_line(log_line, 0); */
// print_char(33); // debugging only
slow_print(a);
// print_char(33); // debugging only
/* sec 0699 */
void print_size_(integer s)
{
- if(s == 0)print_esc(409); /* textfont */
- else if(s == 16) print_esc(410); /* scriptfont */
- else print_esc(411); /* scriptscriptfont */
+ if (s == 0)
+ print_esc(409); /* textfont */
+ else if (s == 16)
+ print_esc(410); /* scriptfont */
+ else
+ print_esc(411); /* scriptscriptfont */
}
/* sec 1355 */
void print_write_whatsit_(str_number s, halfword p)
#endif
ready_already = 0;
- if (trace_flag) showline("EXITING at JUMPOUT\n", 0);
+ if (trace_flag) show_line("EXITING at JUMPOUT\n", 0);
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
// if (endit(history) != 0) history = 2; /* 93/Dec/26 in local.c */
// NOTE: this may JUMPOUT either via X, or because of too many errors
void error(void)
{/* 22 10 */
- ASCII_code c;
+ ASCII_code c;
integer s1, s2, s3, s4;
if(history < 2) history = 2;
void fatal_error_(str_number s)
{
- normalize_selector ();
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(285); /* Emergency stop */
- }
+ normalize_selector ();
+ print_err("Emergency stop");
{
help_ptr = 1;
help_line[0]= s; // given string goes into help line
/* sec 0094 */
void overflow_(str_number s, integer n)
{
- normalize_selector ();
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(286); /* TeX capacity exceeded, sorry[*/
- }
+ normalize_selector ();
+ print_err("TeX capacity exceeded, sorry[");
print(s);
print_char(61); /* '=' */
print_int(n);
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");
- showline(log_line, 0);
+ show_line(log_line, 0);
}
else if (s == 942 && n == hyphen_prime) {
sprintf(log_line, "\n (Maybe use -e=... on command line in ini-TeX)\n");
- showline(log_line, 0);
+ show_line(log_line, 0);
}
}
if(interaction == 3)interaction = 2;
/* sec 0095 */
void confusion_(str_number s)
{
- normalize_selector ();
+ normalize_selector ();
if(history < 2) {
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(289); /* This can't happen(*/
- }
+ print_err("This can't happen(");
print(s);
print_char(41); /*)*/
{
}
}
else {
-
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(291); /* I can't go on meeting you like this */
- }
+ 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... */
}
/* sec 0037 */
bool init_terminal (void)
-{/* 10 */ register bool Result;
+{/* 10 */
+ register bool Result;
int flag;
t_open_in ();
if(last > first) {
cur_input.loc_field = first;
- while((cur_input.loc_field < last)&&
- (buffer[cur_input.loc_field]== ' '))
+ while((cur_input.loc_field < last) && (buffer[cur_input.loc_field]== ' '))
incr(cur_input.loc_field); // step over initial white space
if(cur_input.loc_field < last){
Result = true;
flag = input_ln(stdin, true);
#endif
if(! flag){
- showchar('\n');
- showline("! End of file on the terminal... why?\n", 1);
+ show_char('\n');
+ show_line("! End of file on the terminal... why?\n", 1);
Result = false;
return Result;
}
return Result; // there is an input file name
}
sprintf(log_line, "%s\n", "Please type the name of your input file.");
- showline(log_line, 1);
+ show_line(log_line, 1);
}
// return Result;
}
}
/* sec 0045 */
bool str_eq_str_(str_number s, str_number t)
-{/* 45 */ register bool Result;
+{/* 45 */
+ register bool Result;
pool_pointer j, k;
bool result;
result = false;
j = str_start[s];
k = str_start[t];
while(j < str_start[s + 1]){
-
if(str_pool[j]!= str_pool[k])
goto lab45;
incr(j);
}
/* sec 0070 */
void print_current_string(void)
-{
- pool_pointer j;
- j = str_start[str_ptr];
+{
+ pool_pointer j;
+ j = str_start[str_ptr];
while(j < pool_ptr) {
- print_char(str_pool[j]);
- incr(j);
- }
-}
+ print_char(str_pool[j]);
+ incr(j);
+ }
+}
int stringlength (int str_ptr)
{
// void term_input(void)
void term_input (int promptstr, int nhelplines)
{
- integer k;
+ integer k;
int flag;
- char *helpstring=NULL;
- char *querystring=NULL;
+ char *helpstring = NULL;
+ char *querystring = NULL;
// if (nhelplines != 0) {
// helpstring = make_up_help_string (nhelplines);
// printf(helpstring);
// free(helpstring);
// }
- showline("\n", 0); // force it to show what may be buffered up ???
+ show_line("\n", 0); // force it to show what may be buffered up ???
helpstring = NULL;
#ifdef _WINDOWS
if (promptstr != 0) querystring = make_up_query_string (promptstr);
void normalize_selector (void)
{
- if(log_opened) selector = 19;
- else selector = 17;
- if(job_name == 0) open_log_file ();
- if(interaction == 0)decr(selector);
-}
+ if (log_opened)
+ selector = 19;
+ else
+ selector = 17;
+ if (job_name == 0)
+ open_log_file ();
+ if (interaction == 0)
+ decr(selector);
+}
void pause_for_instructions (void)
{
- if(OK_to_interrupt){
+ if (OK_to_interrupt) {
interaction = 3;
- if((selector == 18)||(selector == 16)) incr(selector);
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(294); /* Interruption */
- }
+ if((selector == 18)||(selector == 16))
+ incr(selector);
+ print_err("Interruption");
{
help_ptr = 3;
help_line[2]= 295; /* You rang? */
/* This has some minor speedup changes - no real advantage probably ... */
void print_scaled_(scaled s)
{
- scaled delta;
+ scaled delta;
if(s < 0)
{
print_char(45); /* '-' */
}
scaled mult_and_add_(integer n, scaled x, scaled y, scaled maxanswer)
-{register scaled Result;
+{
+ register scaled Result;
if(n < 0)
{
x = - (integer) x;
}
scaled xn_over_d_(scaled x, integer n, integer d)
-{register scaled Result;
+{
+ register scaled Result;
bool positive;
nonnegative_integer t, u, v;
if(x >= 0)
}
halfword badness_(scaled t, scaled s)
-{register halfword Result;
+{
+ register halfword Result;
integer r;
if(t == 0)
Result = 0;
/* else fail ! */ /* paragraph 120 */
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
halfword get_avail (void)
-{register halfword Result;
+{
+ register halfword Result;
halfword p;
p = avail;
if(p != 0) /* while p<>null do */
}
halfword get_node_(integer s)
-{/* 40 10 20 */ register halfword Result;
+{/* 40 10 20 */
+ register halfword Result;
halfword p;
halfword q;
integer r;
/* Result = 262143L; */ /* NO ! */
Result = empty_flag;
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
- if (trace_flag) showline("Merged adjacent multi-word nodes\n", 0);
+ if (trace_flag) show_line("Merged adjacent multi-word nodes\n", 0);
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
return Result;
}
return 0;
}
}
-/* if (trace_flag) showline("Extending downwards by %d\n", block_size, 0); */
+/* if (trace_flag) show_line("Extending downwards by %d\n", block_size, 0); */
if (mem_min - (block_size + 1) <= mem_start) { /* check again */
if (trace_flag) {
- sprintf(log_line, "mem_min %d, mem_start %d, block_size %d\n",
- mem_min, mem_start, block_size);
- showline(log_line, 0);
+ sprintf(log_line, "mem_min %d, mem_start %d, block_size %d\n", mem_min, mem_start, block_size);
+ show_line(log_line, 0);
}
overflow(298, mem_max + 1 - mem_min); /* darn: allocation failed ! */
return 0; // abort_flag set
}
/* avoid function call in following ? */
- addvariablespace (block_size); /* now to be found in itex.c */
+ add_variable_space (block_size); /* now to be found in itex.c */
goto lab20; /* go try get_node again */
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
#endif /* STAT */
/* if (trace_flag) {
- if (r == 0) showline("r IS ZERO in ZGETNODE!\n", 0);
+ if (r == 0) show_line("r IS ZERO in ZGETNODE!\n", 0);
} */ /* debugging code 93/dec/15 */
Result = r;
}
halfword new_null_box (void)
-{register halfword Result;
+{
+ register halfword Result;
halfword p;
p = get_node(7);
mem[p].hh.b0 = 0;
// ones that are not allowed to run.
halfword new_rule (void)
-{register halfword Result;
+{
+ register halfword Result;
halfword p;
p = get_node(4); /* rule_node_size */
mem[p].hh.b0 = 2; /* rule_node type */
// contents of the |font|, |character|, and |lig_ptr| fields.
halfword new_ligature_(quarterword f, quarterword c, halfword q)
-{register halfword Result;
+{
+ register halfword Result;
halfword p;
p = get_node(2); /* small_node_size */
mem[p].hh.b0 = 6; /* ligature_node type */
// temporary processing as ligatures are being created.
halfword new_lig_item_(quarterword c)
-{register halfword Result;
+{
+ register halfword Result;
halfword p;
p = get_node(2); /* small_node_size */
mem[p].hh.b1 = c; /* character */
}
halfword new_disc (void)
-{register halfword Result;
+{
+ register halfword Result;
halfword p;
p = get_node(2);
mem[p].hh.b0 = 7;
}
halfword new_math_(scaled w, small_number s)
-{register halfword Result;
+{
+ register halfword Result;
halfword p;
p = get_node(2);
mem[p].hh.b0 = 9;
return Result;
}
-halfword znewspec(halfword p)
-{register halfword Result;
+halfword new_spec_(halfword p)
+{
+ register halfword Result;
halfword q;
q = get_node(4);
mem[q]= mem[p];
}
halfword new_param_glue_(small_number n)
-{register halfword Result;
+{
+ register halfword Result;
halfword p;
halfword q;
p = get_node(2);
return Result;
}
-halfword znewglue(halfword q)
-{register halfword Result;
+halfword new_glue_(halfword q)
+{
+ register halfword Result;
halfword p;
p = get_node(2);
mem[p].hh.b0 = 10;
return Result;
}
-halfword znewskipparam(small_number n)
-{register halfword Result;
+halfword new_skip_param_(small_number n)
+{
+ register halfword Result;
halfword p;
temp_ptr = new_spec(eqtb[(hash_size + 782) + n].hh.v.RH); /* gluebase + n */
p = new_glue(temp_ptr);
}
halfword new_kern_(scaled w)
-{register halfword Result;
+{
+ register halfword Result;
halfword p;
p = get_node(2);
mem[p].hh.b0 = 11;
}
halfword new_penalty_(integer m)
-{register halfword Result;
+{
+ register halfword Result;
halfword p;
p = get_node(2);
mem[p].hh.b0 = 12;
void print_font_and_char_ (integer p)
{
if(p > mem_end)
- print_esc(307); /* CLOBBERED. */
+ print_esc(307); /* CLOBBERED. */
else {
-
if((mem[p].hh.b0 > font_max)) /* font(p) */
- print_char(42); /* * */
+ print_char(42); /* * */
/* else print_esc(hash[(hash_size + 524) + mem[p].hh.b0].v.RH); */
- else print_esc(hash[(hash_size + hash_extra + 524) + mem[p].hh.b0].v.RH);
- /* 96/Jan/10 */
+ else
+ print_esc(hash[(hash_size + hash_extra + 524) + mem[p].hh.b0].v.RH); /* 96/Jan/10 */
print_char(32); /* */
print(mem[p].hh.b1); /* character(p) */
}
void print_rule_dimen_ (scaled d)
{
if((d == -1073741824L)) /* - 2^30 */
- print_char(42); /* * */
- else print_scaled(d);
+ print_char(42); /* * */
+ else
+ print_scaled(d);
}
void print_glue_(scaled d, integer order, str_number s)
{
print_scaled(d);
if((order < 0)||(order > 3))
- print(308); /* foul */
+ print(308); /* foul */
else if(order > 0)
{
print(309); /* fil */
if((p < mem_min)||(p >= lo_mem_max))
print_char(42); /* * */
else {
-
print_scaled(mem[p + 1].cint);
if(s != 0)
print(s);
void print_subsidiary_data_(halfword p, ASCII_code c)
{
- if((pool_ptr - str_start[str_ptr])>= depth_threshold)
+ if((pool_ptr - str_start[str_ptr]) >= depth_threshold)
{
if(mem[p].hh.v.RH != 0)
print(312); /* [] */
if (hash_used > 65535L) { /* debugging only 1996/Jan/20 */
sprintf(log_line, "ERROR: %s too large %d\n",
"hash entry", hash_used);
- showline(log_line, 1);
+ show_line(log_line, 1);
}
#endif
hash[p].v.LH = hash_used;
p = hash_used;
}
#ifdef CHECKPOOL
- if (checkpool(NULL)) showline("after hash_used\n", 0);
+ if (checkpool(NULL)) show_line("after hash_used\n", 0);
#endif
{
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
str_pool[pool_ptr + l]= str_pool[pool_ptr];
}
#ifdef CHECKPOOL
- if (checkpool(NULL)) showline("after pool_ptr\n", 0);
+ if (checkpool(NULL)) show_line("after pool_ptr\n", 0);
#endif
{
register integer for_end;
if (tempstring > 65535L) { /* cannot happen */
sprintf(log_line, "ERROR: %s too large %d\n",
"string ptr", tempstring);
- showline(log_line, 1);
+ show_line(log_line, 1);
}
hash[p].v.RH = tempstring;
}
hash[p].v.RH = make_string ();
#endif
#ifdef CHECKPOOL
- if (checkpool(NULL)) showline("after make_string\n", 0);
+ if (checkpool(NULL)) show_line("after make_string\n", 0);
#endif
pool_ptr = pool_ptr + d;
;
if (trace_flag) {
str_pool[pool_ptr] = '\0';
sprintf(log_line, " tex1 cs_count++ '%s' ", &str_pool[pool_ptr-l-d]);
- showline(log_line, 0); /* debugging */
+ show_line(log_line, 0); /* debugging */
}
#endif /* STAT */
}
#ifdef CHECKPOOL
- if (checkpool(NULL)) showline("after cs_count++\n", 0);
+ if (checkpool(NULL)) show_line("after cs_count++\n", 0);
#endif
goto lab40;
}
p = hash[p].v.LH;
}
#ifdef CHECKPOOL
- if (checkpool(NULL)) showline("before return\n", 0);
+ if (checkpool(NULL)) show_line("before return\n", 0);
#endif
lab40:
Result = p;
{
if((mag_set > 0)&&(eqtb[(hash_size + 3180)].cint != mag_set))
{
- {
- if(interaction == 3)
- ;
- print_nl(266); /* ! */
- print(544); /* Incompatible magnification(*/
- }
+ print_err("Incompatible magnification(");
print_int(eqtb[(hash_size + 3180)].cint);
print(545); /*)*/
print_nl(546); /* the previous value will be retained */
if((eqtb[(hash_size + 3180)].cint <= 0)||
(eqtb[(hash_size + 3180)].cint > 32768L))
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(549); /* Illegal magnification has been changed to 1000 */
- }
+ 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. */
{
runaway ();
if(cur_cs == 0)
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(601); /* File ended */
- }
+ print_err("File ended");
else {
- cur_cs = 0;
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(602); /* Forbidden control sequence found */
- }
+ cur_cs = 0;
+ print_err("Forbidden control sequence found");
}
print(603); /* while scanning */
p = get_avail ();
error ();
}
else {
-
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(595); /* Incomplete */
- }
+ print_err("Incomplete ");
print_cmd_chr(105, cur_if); /* i */
print(596); /*; all text was ignored after line */
print_int(skip_line);
if(s != r)
if(s == 0)
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(647); /* Use of */
- }
+ print_err("Use of ");
sprint_cs(warning_index);
print(648); /* doesn't match its definition */
{
{
if(long_state == 111)
{
- runaway ();
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(642); /* Paragraph ended before */
- }
+ runaway ();
+ print_err("Paragraph ended before ");
sprint_cs(warning_index);
print(643); /* was complete */
{
{
if(long_state == 111)
{
- runaway ();
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(642); /* Paragraph ended before */
- }
+ runaway ();
+ print_err("Paragraph ended before ");
sprint_cs(warning_index);
print(643); /* was complete */
{
}
else {
- back_input ();
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(634); /* Argument of */
- }
+ back_input ();
+ print_err("Argument of ");
sprint_cs(warning_index);
print(635); /* has an extra } */
{
} while(!(cur_cs != 0));
if(cur_cmd != 67)
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(622); /* Missing */
- }
+ print_err("Missing ");
print_esc(502); /* endcsname */
print(623); /* inserted */
{
if(if_limit == 1)
insert_relax ();
else {
-
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(773); /* Extra */
- }
+ print_err("Extra ");
print_cmd_chr(106, cur_chr); /* j */
{
help_ptr = 1;
break;
default:
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(616); /* Undefined control sequence */
- }
+ print_err("Undefined control sequence");
{
help_ptr = 5;
help_line[4]= 617; /* The control sequence at the end of the top line */
} while(!((cur_cmd != 10)&&(cur_cmd != 0)));
if(cur_cmd != 1)
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(654); /* Missing { inserted */
- }
+ print_err("Missing { inserted");
{
help_ptr = 4;
help_line[3]= 655; /* A left brace was mandatory here, so I've put one in. */
}
void mu_error (void)
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(659); /* Incompatible glue units */
- }
+ print_err("Incompatible glue units");
{
help_ptr = 1;
help_line[0]= 660; /* I'm going to assume that 1mu=1pt when they're mixed. */
scan_int ();
if((cur_val < 0)||(cur_val > 255))
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(684); /* Bad register code */
- }
+ print_err("Bad register code");
{
help_ptr = 2;
help_line[1]= 685; /* A register number must be between 0 and 255. */
scan_int ();
if((cur_val < 0)||(cur_val > 255))
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(687); /* Bad character code */
- }
+ print_err("Bad character code");
{
help_ptr = 2;
help_line[1]= 688; /* A character number must be between 0 and 255. */
scan_int ();
if((cur_val < 0)||(cur_val > 15))
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(689); /* Bad number */
- }
+ print_err("Bad number");
{
help_ptr = 2;
help_line[1]= 690; /* Since I expected to read a number between 0 and 15, */
scan_int ();
if((cur_val < 0)||(cur_val > 32767))
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(691); /* Bad mathchar */
- }
+ print_err("Bad mathchar");
{
help_ptr = 2;
help_line[1]= 692; /* A mathchar number must be between 0 and 32767. */
scan_int ();
if((cur_val < 0)||(cur_val > 134217727L)) /* 2^27 - 1 */
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(693); /* Bad delimiter code */
- }
+ print_err("Bad delimiter code");
{
help_ptr = 2;
help_line[1]= 694; /* A numeric delimiter code must be between 0 and 2^{27}-1. */
f = eqtb[m + cur_val].hh.v.RH;
}
else {
-
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(811); /* Missing font identifier */
- }
+ print_err("Missing font identifier");
{
help_ptr = 2;
help_line[1]= 812; /* I was looking for a control sequence whose */
}
/* compiler error: '-' : incompatible types - from 'union fmemoryword *' to 'struct fourunsignedchars *' */
if(cur_val == fmem_ptr){
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(796); /* Font */
- }
+ print_err("Font ");
/* print_esc(hash[(hash_size + 524) + f].v.RH); */
print_esc(hash[(hash_size + hash_extra + 524) + f].v.RH); /*96/Jan/10*/
print(814); /* has only */
case 88 :
if(level != 5)
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(661); /* Missing number, treated as zero */
- }
+ print_err("Missing number, treated as zero");
{
help_ptr = 3;
help_line[2]= 662; /* A number should have been here; I inserted `0'. */
case 79 :
if(abs(mode)!= m)
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(677); /* Improper */
- }
+ print_err("Improper ");
print_cmd_chr(79, m); /* O */
{
help_ptr = 4;
break;
default:
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(682); /* You can't use ` */
- }
+ print_err("You can't use `");
print_cmd_chr(cur_cmd, cur_chr);
print(683); /* ' after */
print_esc(534); /* the */
case 32 :
case 48 :
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(610); /* Text line contains an invalid character */
- }
+ 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. */
else cur_val = cur_tok - 4352; /* 4095 + 257 */
if(cur_val > 255)
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(695); /* Improper alphabetic constant */
- }
+ print_err("Improper alphabetic constant");
{
help_ptr = 2;
help_line[1]= 696; /* A one-character control sequence belongs after a ` mark. */
{
if(OKsofar)
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(698); /* Number too big */
- }
+ print_err("Number too big");
{
help_ptr = 2;
help_line[1]= 699; /* I can only go up to 2147483647='17777777777="7FFFFFFF, */
lab30:;
if(vacuous)
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(661); /* Missing number, treated as zero */
- }
+ print_err("Missing number, treated as zero");
{
help_ptr = 3;
help_line[2]= 662; /* A number should have been here; I inserted `0'. */
while(scan_keyword(108)) { /* l */
if(cur_order == 3) {
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(702); /* Illegal unit of measure(*/
- }
+ print_err("Illegal unit of measure(");
print(703); /* replaced by filll) */
{
help_ptr = 1;
if(scan_keyword(334)) /* mu */
goto lab88;
else {
-
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(702); /* Illegal unit of measure(*/
- }
+ print_err("Illegal unit of measure(");
print(707); /* mu inserted) */
{
help_ptr = 4;
else if(scan_keyword(719)) /* sp */
goto lab30;
else {
-
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(702); /* Illegal unit of measure(*/
- }
+ print_err("Illegal unit of measure(");
print(720); /* pt inserted) */
{
help_ptr = 6;
lab89:
if(arith_error ||(abs(cur_val)>= 1073741824L)) /* 2^30 */
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(724); /* Dimension too large */
- }
+ print_err("Dimension too large");
{
help_ptr = 2;
help_line[1]= 725; /* I can't work with sizes bigger than about 19 feet. */
}
if(t == 3129)
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(741); /* You already have nine parameters */
- }
+ print_err("You already have nine parameters");
{
help_ptr = 1;
help_line[0]= 742; /* I'm going to ignore the # sign you just used. */
incr(t);
if(cur_tok != t)
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(743); /* Parameters must be numbered consecutively */
- }
+ 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 #. */
}
if(cur_cmd == 2)
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(654); /* Missing { inserted */
- }
+ print_err("Missing { inserted");
incr(align_state);
{
help_ptr = 2;
else get_token ();
if(cur_cmd != 6)
if((cur_tok <= 3120)||(cur_tok > t)) {
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(746); /* Illegal parameter number in definition of */
- }
+ print_err("Illegal parameter number in definition of");
sprint_cs(warning_index);
{
help_ptr = 3;
(void) a_close(read_file[m]);
read_open[m]= 2;
if(align_state != 1000000L) {
- runaway ();
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(751); /* File ended within */
- }
+ runaway ();
+ print_err("File ended within");
print_esc(531); /* read */
{
help_ptr = 1;
if((cur_tok >= 3132)&&(cur_tok <= 3134))
r = cur_tok - 3072;
else {
-
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(777); /* Missing = inserted for */
- }
+ print_err("Missing = inserted for ");
print_cmd_chr(105, thisif); /* i */
{
help_ptr = 1;
if(cond_ptr == savecondptr)
{
if(cur_chr != 4)
- goto lab50;
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(773); /* Extra */
- }
+ goto lab50;
+ print_err("Extra ");
print_esc(771); /* or */
{
help_ptr = 1;
s = log_line + strlen(log_line);
strncpy(s, str_pool+start, nlen);
strcpy(s+nlen, "");
- showline(log_line, 0);
+ show_line(log_line, 0);
}
// avoid problems with(cur_name == flushablestring)by going only up to str_ptr-1
s = log_line + strlen(log_line);
strncpy(s, str_pool+start, nlen);
strcpy(s+nlen, "\n");
- showline(log_line, 0);
+ show_line(log_line, 0);
}
return k; // return number of matching string
}
s = log_line + strlen(log_line);
strncpy(s, str_pool+start, nlen);
strcpy(s+nlen, "\n");
- showline(log_line, 0);
+ show_line(log_line, 0);
}
return -1; // no match found
}
void remove_string (int start, int end)
{
- int nlen = pool_ptr-end; // how many bytes to move down
+ int nlen = pool_ptr - end; // how many bytes to move down
char *s;
// int trace_flag=1; // debugging only
-// if (end < start) showline("\nEND < START", 1);
-// if (pool_ptr < end) showline("\nPOOLPTR < END", 1);
+// if (end < start) show_line("\nEND < START", 1);
+// if (pool_ptr < end) show_line("\nPOOLPTR < END", 1);
if (trace_flag) {
int n = end-start;
s = log_line + strlen(log_line);
strncpy(s, str_pool+start, n);
strcpy(s+n, "\n");
- showline(log_line, 0);
+ show_line(log_line, 0);
}
if (nlen > 0) memcpy(str_pool+start, str_pool+end, nlen);
pool_ptr = start + nlen; // poolprt - (end-start);
s = log_line + strlen(log_line);
strncpy(s, str_pool+str_start[k], nlen);
strcpy(s + nlen, "");
- showline(log_line, 0);
+ show_line(log_line, 0);
}
void show_all_strings (void)
else {
if (save_strings_flag &&
(cur_area = find_string(str_start[str_ptr], str_start[str_ptr]+area_delimiter)) > 0) {
- remove_string(str_start[str_ptr], str_start[str_ptr]+area_delimiter);
+ remove_string(str_start[str_ptr], str_start[str_ptr] + area_delimiter);
area_delimiter = 0; // area_delimiter - area_delimiter;
if (ext_delimiter != 0) ext_delimiter = ext_delimiter - area_delimiter;
// str_start[str_ptr + 1]= str_start[str_ptr]+ area_delimiter; // test only
}
else { // did find an extension
if (save_strings_flag &&
- (cur_name = find_string(str_start[str_ptr], str_start[str_ptr]+ext_delimiter-area_delimiter-1)) > 0) {
- remove_string(str_start[str_ptr], str_start[str_ptr]+ext_delimiter-area_delimiter-1);
+ (cur_name = find_string(str_start[str_ptr], str_start[str_ptr] + ext_delimiter - area_delimiter-1)) > 0) {
+ remove_string(str_start[str_ptr], str_start[str_ptr] + ext_delimiter - area_delimiter - 1);
// str_start[str_ptr + 1]= str_start[str_ptr]+ ext_delimiter - area_delimiter - 1; // test only
// incr(str_ptr); // test only
}
if (trace_flag) {
sprintf(log_line, " pack_file_name `%s' (%d) ",
name_of_file+1, name_length); /* debugging */
- showline(log_line, 0);
+ show_line(log_line, 0);
}
name_of_file [name_length+1] = ' ';
}
{
str_pool[pool_ptr]= xord[name_of_file[k]];
// sprintf(log_line, "%d => %d ", name_of_file[k], xord[name_of_file[k]]);
-// showline(log_line, 0); // debugging only
+// show_line(log_line, 0); // debugging only
incr(pool_ptr);
}
while(k++ < for_end); }
/* show TEXINPUTS=... or format specific */
/* only show this if name was not fully qualified ? */
-void showtexinputs (void)
+void show_tex_inputs (void)
{ /* 98/Jan/28 */
char *s, *t, *v;
s = "TEXINPUTS"; /* default */
integer k;
if(interaction == 2)
;
- if(s == 781){ /* input file name */
- if(interaction == 3);
- print_nl(262); /* ! */
- print(782); /* I can't find file ` */
- }
- else {
- if(interaction == 3);
- print_nl(262); /* ! */
- print(783); /* I can't write on file ` */
- }
+ if(s == 781)
+ print_err("I can't find file `");
+ else
+ print_err("I can't write on file `");
print_file_name(cur_name, cur_area, cur_ext);
print(784); /* '. */
if(s == 781){ /* input file name */
if (cur_area == 335) { /* "" only if path not specified */
- if (show_texinput_flag) showtexinputs();
+ if (show_texinput_flag) show_tex_inputs();
}
}
if(e == 785) /* .tex */
}
if (! knuth_flag)
#ifdef _WINDOWS
-// showline(" (or ^Z to exit)\n", 0);
- showline(" (or ^z to exit)", 0);
+// show_line(" (or ^Z to exit)\n", 0);
+ show_line(" (or ^z to exit)", 0);
#else
- showline(" (or Ctrl-Z to exit)", 0);
+ show_line(" (or Ctrl-Z to exit)", 0);
#endif
{
;
stamp_it(log_line); // ??? use log_line ???
strcat(log_line, "\n");
(void) fputs(log_line, log_file);
-// showline(buffer, 0); // ??? show on screen as well
+// show_line(buffer, 0); // ??? show on screen as well
// print_ln ();
stampcopy(log_line);
strcat(log_line, "\n");
-// showline(buffer, 0); // ??? show on screen as well
+// show_line(buffer, 0); // ??? show on screen as well
(void) fputs(log_line, log_file);
// print_ln ();
}
if (trace_flag) {
sprintf(log_line, "font_ptr %d font_max %d fmem_ptr %d lf %d font_mem_size %d\n",
font_ptr, font_max, fmem_ptr, lf, font_mem_size); /* debugging */
- showline(log_line, 0);
+ show_line(log_line, 0);
}
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(796); /* Font */
- }
+ print_err("Font ");
sprint_cs(u);
print_char(61); /* = */
print_file_name(nom, aire, 335); /* "" */
g = f;
goto lab30;
- lab11: { /* error in reading font TFM */
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(796); /* Font */
- }
+lab11: print_err("Font ");
sprint_cs(u);
print_char(61); /* = */
print_file_name(nom, aire, 335); /* "" */
{
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
if (trace_flag) {
- showchar('\n');
+ show_char('\n');
sprintf(log_line, "dvi_swap %d", dvi_gone);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
if(dvi_limit == dvi_buf_size) {
dvi_gone = dvi_gone + half_buf;
}
/* following needs access to dvi_buf=zdvibuf see coerce.h */
-void zdvifour(integer x) /* attempt at speeding up bkph - is compiler smart ? */
+void dvi_four_(integer x) /* attempt at speeding up bkph - is compiler smart ? */
{
if(x >= 0)
{
}
}
/* following needs access to dvi_buf=zdvibuf see coerce.h */
-void zdvifontdef(internal_font_number f)
+void dvi_font_def_(internal_font_number f)
{
pool_pointer k;
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
}
}
/* following needs access to dvi_buf=zdvibuf see coerce.h */
-void zspecialout(halfword p)
+void special_out_(halfword p)
{
char old_setting;
pool_pointer k;
str_pool [k+1] == 'r' &&
str_pool [k+2] == 'c' &&
str_pool [k+3] == ':') { /* \special{src: ... } */
- showchar('\n');
+ show_char('\n');
s = log_line;
while (k < kend) {
*s++ = str_pool[k++];
}
*s++ = ' ';
*s++ = '\0';
- showline(log_line, 0)
+ show_line(log_line, 0)
#ifndef _WINDOWS
fflush(stdout);
#endif
/* if(cur_tok != (hash_size + 4095 + 522)) */
if(cur_tok != (hash_size + hash_extra + 4095 + 522))
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(1291); /* Unbalanced write command */
- }
+ 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. */
decr(cur_s);
}
/* following needs access to dvi_buf=zdvibuf see coerce.h */
-void zshipout(halfword p)
+void ship_out_(halfword p)
{/* 30 */
integer pageloc;
char j, k;
eqtb[(hash_size + 3749)].cint > 1073741823L)||
(mem[p + 1].cint + eqtb[(hash_size + 3748)].cint > 1073741823L))
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(827); /* Huge page cannot be shipped out */
- }
+ 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 */
cur_f = eqtb[(hash_size + 1835) + mem[a].hh.b0 + cur_size].hh.v.RH;
if(cur_f == 0)
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(335); /* */
- }
+ print_err("");
print_size(cur_size);
print_char(32); /* */
print_int(mem[a].hh.b0);
if((mode == 203)&&((tail != cur_list
.head_field)||(cur_list.aux_field.cint != 0)))
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(677); /* Improper */
- }
+ print_err("Improper ");
print_esc(517); /* halign */
print(888); /* inside $$ */
{
if((p == mem_top - 4)&&(cur_loop == 0)&&(cur_cmd == 4))
cur_loop = cur_align;
else {
-
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(897); /* Missing # inserted in alignment preamble */
- }
+ print_err("Missing # inserted in alignment preamble");
{
help_ptr = 3;
help_line[2]= 898; /* There should be exactly one # between &'s, when an */
goto lab32;
if(cur_cmd == 6)
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(901); /* Only one # is allowed per tab */
- }
+ print_err("Only one # is allowed per tab");
{
help_ptr = 3;
help_line[2]= 898; /* There should be exactly one # between &'s, when an */
{
do_assignments ();
if(cur_cmd != 3) {
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(1164); /* Missing $$ inserted */
- }
+ print_err("Missing $$ inserted");
{
help_ptr = 2;
help_line[1]= 889; /* Displays can use special alignments (like \eqalignno) */
get_x_token ();
if(cur_cmd != 3)
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(1160); /* Display math should end with $$ */
- }
+ print_err("Display math should end with $$");
{
help_ptr = 2;
help_line[1]= 1161; /* The `$' that I just saw supposedly matches a previous `$$'. */
mem[p].hh.v.RH = new_glue(mem[cur_loop + 1].hh.v.LH);
}
else {
-
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(904); /* Extra alignment tab has been changed to */
- }
+ print_err("Extra alignment tab has been changed to ");
print_esc(893); /* cr */
{
help_ptr = 3;
{register halfword Result;
halfword q;
if(noshrinkerroryet){
- noshrinkerroryet = false;
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(911); /* Infinite glue shrinkage found in a paragraph */
- }
+ 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 */
if(eqtb[(hash_size + 2139) + cur_chr].hh.v.RH == 0)
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(939); /* Not a letter */
- }
+ print_err("Not a letter");
{
help_ptr = 2;
help_line[1]= 940; /* Letters in \hyphenation words must have \lccode>0. */
break;
default:
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(677); /* Improper */
- }
+ print_err("Improper ");
print_esc(935); /* hyphenation */
print(936); /* will be flushed */
{
active_width[6]= active_width[6]+ mem[q + 3].cint;
if((mem[q].hh.b1 != 0)&&(mem[q + 3].cint != 0))
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(955); /* Infinite glue shrinkage found in box being split */
- }
+ 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 */
}
if(mem[v].hh.b0 != 1)
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(335); /* */
-
- }
+ print_err("");
print_esc(959); /* vsplit */
print(960); /* needs a */
print_esc(961); /* vbox */
if(p != 0) /* if p<>null then if type(p)=hlist_node then l.19324 */
if(mem[p].hh.b0 == 0)
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(983); /* Insertions can only be added to a vbox */
- }
+ 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 */
best_page_break = 0;
if(eqtb[(hash_size + 1833)].hh.v.RH != 0)
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(335); /* */
- }
+ print_err("");
print_esc(406); /* box */
print(997); /* 255 is not void */
{
if(eqtb[(hash_size + 1313)].hh.v.RH != 0)
if(dead_cycles >= eqtb[(hash_size + 3203)].cint)
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(999); /* Output loop--- */
- }
+ print_err("Output loop---");
print_int(dead_cycles);
print(1000); /* consecutive dead cycles */
{
/* begin if (link(contrib_head)=null)or output_active then return; l.19351 */
if((mem[mem_top - 1].hh.v.RH == 0)|| output_active)
- return;
+ return;
do {
lab22: p = mem[mem_top - 1].hh.v.RH;
/* if(last_glue != 262143L) */
if(last_glue != empty_flag)
- delete_glue_ref(last_glue);
- last_penalty = 0;
- last_kern = 0;
+ delete_glue_ref(last_glue);
+ last_penalty = 0;
+ last_kern = 0;
if(mem[p].hh.b0 == 10)
{
last_glue = mem[p + 1].hh.v.LH;
/* last_glue = 262143L; */
last_glue = empty_flag;
if(mem[p].hh.b0 == 12)
- last_penalty = mem[p + 1].cint;
+ last_penalty = mem[p + 1].cint;
else if(mem[p].hh.b0 == 11)
- last_kern = mem[p + 1].cint;
+ last_kern = mem[p + 1].cint;
}
switch(mem[p].hh.b0)
- {case 0 :
- case 1 :
- case 2 :
- if(page_contents < 2)
- {
- if(page_contents == 0)
- freeze_page_specs(2);
- else page_contents = 2;
- q = new_skip_param(9);
- if(mem[temp_ptr + 1].cint > mem[p + 3].cint)
- mem[temp_ptr + 1].cint = mem[temp_ptr + 1].cint - mem[p + 3]
- .cint;
- else mem[temp_ptr + 1].cint = 0;
- mem[q].hh.v.RH = p;
- mem[mem_top - 1].hh.v.RH = q;
- goto lab22;
+ {
+ case 0 :
+ case 1 :
+ case 2 :
+ if(page_contents < 2)
+ {
+ if(page_contents == 0)
+ freeze_page_specs(2);
+ else
+ page_contents = 2;
+ q = new_skip_param(9);
+ if(mem[temp_ptr + 1].cint > mem[p + 3].cint)
+ mem[temp_ptr + 1].cint = mem[temp_ptr + 1].cint - mem[p + 3].cint;
+ else
+ mem[temp_ptr + 1].cint = 0;
+ mem[q].hh.v.RH = p;
+ mem[mem_top - 1].hh.v.RH = q;
+ goto lab22;
}
else {
-
- page_so_far[1]= page_so_far[1]+ page_so_far[7]+ mem[p + 3]
- .cint;
- page_so_far[7]= mem[p + 2].cint;
- goto lab80;
+ page_so_far[1]= page_so_far[1]+ page_so_far[7]+ mem[p + 3].cint;
+ page_so_far[7]= mem[p + 2].cint;
+ goto lab80;
}
break;
- case 8 :
- goto lab80;
+ case 8 :
+ goto lab80;
break;
- case 10 :
+ case 10 :
if(page_contents < 2)
- goto lab31;
+ goto lab31;
else if((mem[page_tail].hh.b0 < 9))
- pi = 0;
- else goto lab90;
- break;
+ pi = 0;
+ else
+ goto lab90;
+ break;
case 11 :
if(page_contents < 2)
- goto lab31;
+ goto lab31;
else if(mem[p].hh.v.RH == 0)
- return;
+ return;
else if(mem[mem[p].hh.v.RH].hh.b0 == 10)
- pi = 0;
- else goto lab90;
+ pi = 0;
+ else
+ goto lab90;
break;
case 12 :
if(page_contents < 2)
- goto lab31;
- else pi = mem[p + 1].cint;
+ goto lab31;
+ else
+ pi = mem[p + 1].cint;
break;
case 4 :
goto lab80;
break;
case 3 :
{
- if(page_contents == 0)
- freeze_page_specs(1);
- n = mem[p].hh.b1;
- r = mem_top;
- while(n >= mem[mem[r].hh.v.RH].hh.b1)r = mem[r].hh
- .v.RH;
- n = n;
- if(mem[r].hh.b1 != n)
- {
- q = get_node(4);
- mem[q].hh.v.RH = mem[r].hh.v.RH;
- mem[r].hh.v.RH = q;
- r = q;
- mem[r].hh.b1 = n;
- mem[r].hh.b0 = 0;
- ensure_vbox(n);
- if(eqtb[(hash_size + 1578) + n].hh.v.RH == 0)
- mem[r + 3].cint = 0;
- else mem[r + 3].cint = mem[eqtb[(hash_size + 1578) + n].hh.v.RH + 3]
- .cint + mem[eqtb[(hash_size + 1578) + n].hh.v.RH + 2].cint;
- mem[r + 2].hh.v.LH = 0;
- q = eqtb[(hash_size + 800) + n].hh.v.RH;
- if(eqtb[(hash_size + 3218) + n].cint == 1000)
- h = mem[r + 3].cint;
- else h = x_over_n(mem[r + 3].cint, 1000)* eqtb[(hash_size + 3218) + n]
- .cint;
- page_so_far[0]= page_so_far[0]- h - mem[q + 1].cint;
- page_so_far[2 + mem[q].hh.b0]= page_so_far[2 + mem[q]
- .hh.b0]+ mem[q + 2].cint;
- page_so_far[6]= page_so_far[6]+ mem[q + 3].cint;
- if((mem[q].hh.b1 != 0)&&(mem[q + 3].cint != 0))
- {
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(992); /* 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. */
- }
- error ();
- }
- }
- if(mem[r].hh.b0 == 1)
- insert_penalties = insert_penalties + mem[p + 1].cint;
- else {
-
- mem[r + 2].hh.v.RH = p;
- delta = page_so_far[0]- page_so_far[1]- page_so_far[7]+
- page_so_far[6];
- if(eqtb[(hash_size + 3218) + n].cint == 1000)
- h = mem[p + 3].cint;
- else h = x_over_n(mem[p + 3].cint, 1000)* eqtb[(hash_size + 3218) + n]
- .cint;
- if(((h <= 0)||(h <= delta)) &&(mem[p + 3].cint + mem
- [r + 3].cint <= eqtb[(hash_size + 3751) + n].cint))
- {
- page_so_far[0]= page_so_far[0]- h;
- mem[r + 3].cint = mem[r + 3].cint + mem[p + 3].cint;
- }
- else {
-
- if(eqtb[(hash_size + 3218) + n].cint <= 0)
- w = 1073741823L; /* 2^30 - 1 */
- else {
-
- w = page_so_far[0]- page_so_far[1]- page_so_far[7];
- if(eqtb[(hash_size + 3218) + n].cint != 1000)
- w = x_over_n(w, eqtb[(hash_size + 3218) + n].cint)* 1000;
- }
- if(w > eqtb[(hash_size + 3751) + n].cint - mem[r + 3].cint)
- w = eqtb[(hash_size + 3751) + n].cint - mem[r + 3].cint;
- q = vert_break(mem[p + 4].hh.v.LH, w, mem[p + 2].cint);
- mem[r + 3].cint = mem[r + 3].cint + best_height_plus_depth;
-;
+ if(page_contents == 0)
+ freeze_page_specs(1);
+ n = mem[p].hh.b1;
+ r = mem_top;
+ while(n >= mem[mem[r].hh.v.RH].hh.b1)
+ r = mem[r].hh.v.RH;
+ n = n;
+ if(mem[r].hh.b1 != n)
+ {
+ q = get_node(4);
+ mem[q].hh.v.RH = mem[r].hh.v.RH;
+ mem[r].hh.v.RH = q;
+ r = q;
+ mem[r].hh.b1 = n;
+ mem[r].hh.b0 = 0;
+ ensure_vbox(n);
+ if(eqtb[(hash_size + 1578) + n].hh.v.RH == 0)
+ mem[r + 3].cint = 0;
+ else
+ mem[r + 3].cint = mem[eqtb[(hash_size + 1578) + n].hh.v.RH + 3].cint + mem[eqtb[(hash_size + 1578) + n].hh.v.RH + 2].cint;
+ mem[r + 2].hh.v.LH = 0;
+ q = eqtb[(hash_size + 800) + n].hh.v.RH;
+ if(eqtb[(hash_size + 3218) + n].cint == 1000)
+ h = mem[r + 3].cint;
+ else
+ h = x_over_n(mem[r + 3].cint, 1000)* eqtb[(hash_size + 3218) + n].cint;
+ page_so_far[0]= page_so_far[0]- h - mem[q + 1].cint;
+ page_so_far[2 + mem[q].hh.b0]= page_so_far[2 + mem[q].hh.b0]+ mem[q + 2].cint;
+ page_so_far[6]= page_so_far[6]+ mem[q + 3].cint;
+ if((mem[q].hh.b1 != 0)&&(mem[q + 3].cint != 0))
+ {
+ 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. */
+ }
+ error ();
+ }
+ }
+ if(mem[r].hh.b0 == 1)
+ insert_penalties = insert_penalties + mem[p + 1].cint;
+ else {
+ mem[r + 2].hh.v.RH = p;
+ delta = page_so_far[0]- page_so_far[1]- page_so_far[7] + page_so_far[6];
+ if(eqtb[(hash_size + 3218) + n].cint == 1000)
+ h = mem[p + 3].cint;
+ else
+ h = x_over_n(mem[p + 3].cint, 1000)* eqtb[(hash_size + 3218) + n].cint;
+ if(((h <= 0)||(h <= delta)) &&(mem[p + 3].cint + mem[r + 3].cint <= eqtb[(hash_size + 3751) + n].cint))
+ {
+ page_so_far[0]= page_so_far[0]- h;
+ mem[r + 3].cint = mem[r + 3].cint + mem[p + 3].cint;
+ }
+ else {
+ if(eqtb[(hash_size + 3218) + n].cint <= 0)
+ w = 1073741823L; /* 2^30 - 1 */
+ else {
+ w = page_so_far[0]- page_so_far[1]- page_so_far[7];
+ if(eqtb[(hash_size + 3218) + n].cint != 1000)
+ w = x_over_n(w, eqtb[(hash_size + 3218) + n].cint)* 1000;
+ }
+ if(w > eqtb[(hash_size + 3751) + n].cint - mem[r + 3].cint)
+ w = eqtb[(hash_size + 3751) + n].cint - mem[r + 3].cint;
+ q = vert_break(mem[p + 4].hh.v.LH, w, mem[p + 2].cint);
+ mem[r + 3].cint = mem[r + 3].cint + best_height_plus_depth;
+ ;
#ifdef STAT
- if(eqtb[(hash_size + 3196)].cint > 0)
- {
- begin_diagnostic ();
- print_nl(995); /* % split */
- print_int(n);
- print(996); /* to */
- print_scaled(w);
- print_char(44); /*, */
- print_scaled(best_height_plus_depth);
- print(925); /* p= */
- if(q == 0) /* if q=null l.19614 */
- print_int(-10000);
- else if(mem[q].hh.b0 == 12)
- print_int(mem[q + 1].cint);
- else print_char(48); /* 0 */
- end_diagnostic(false);
- }
+ if(eqtb[(hash_size + 3196)].cint > 0)
+ {
+ begin_diagnostic ();
+ print_nl(995); /* % split */
+ print_int(n);
+ print(996); /* to */
+ print_scaled(w);
+ print_char(44); /*, */
+ print_scaled(best_height_plus_depth);
+ print(925); /* p= */
+ if(q == 0) /* if q=null l.19614 */
+ print_int(-10000);
+ else if(mem[q].hh.b0 == 12)
+ print_int(mem[q + 1].cint);
+ else print_char(48); /* 0 */
+ end_diagnostic(false);
+ }
#endif /* STAT */
- if(eqtb[(hash_size + 3218) + n].cint != 1000)
- best_height_plus_depth = x_over_n(best_height_plus_depth, 1000)*
- eqtb[(hash_size + 3218) + n].cint;
- page_so_far[0]= page_so_far[0]- best_height_plus_depth;
- mem[r].hh.b0 = 1;
- mem[r + 1].hh.v.RH = q;
- mem[r + 1].hh.v.LH = p;
- if(q == 0)
- insert_penalties = insert_penalties - 10000;
- else if(mem[q].hh.b0 == 12)
- insert_penalties = insert_penalties + mem[q + 1].cint;
- }
- }
- goto lab80;
+ if(eqtb[(hash_size + 3218) + n].cint != 1000)
+ best_height_plus_depth = x_over_n(best_height_plus_depth, 1000) * eqtb[(hash_size + 3218) + n].cint;
+ page_so_far[0]= page_so_far[0]- best_height_plus_depth;
+ mem[r].hh.b0 = 1;
+ mem[r + 1].hh.v.RH = q;
+ mem[r + 1].hh.v.LH = p;
+ if(q == 0)
+ insert_penalties = insert_penalties - 10000;
+ else if(mem[q].hh.b0 == 12)
+ insert_penalties = insert_penalties + mem[q + 1].cint;
+ }
+ }
+ goto lab80;
}
- break;
- default:
- {
- confusion(987); /* page */
- return; // abort_flag set
- }
break;
- }
+ default:
+ {
+ confusion(987); /* page */
+ return; // abort_flag set
+ }
+ break;
+ }
if(pi < 10000)/* pi may be used ... */
{
if(page_so_far[1]< page_so_far[0])
- if((page_so_far[3]!= 0)||(page_so_far[4]!= 0)||(page_so_far
- [5]!= 0))
- b = 0;
- else b = badness(page_so_far[0]- page_so_far[1], page_so_far[2])
- ;
+ if((page_so_far[3]!= 0)||(page_so_far[4]!= 0)||(page_so_far[5]!= 0))
+ b = 0;
+ else
+ b = badness(page_so_far[0]- page_so_far[1], page_so_far[2]);
else if(page_so_far[1]- page_so_far[0]> page_so_far[6])
- b = 1073741823L; /* 2^30 - 1 */
- else b = badness(page_so_far[1]- page_so_far[0], page_so_far[6])
- ;
+ b = 1073741823L; /* 2^30 - 1 */
+ else
+ b = badness(page_so_far[1]- page_so_far[0], page_so_far[6]);
if(b < 1073741823L) /* 2^30 - 1 */
- if(pi <= -10000)
- c = pi;
- else if(b < 10000)
- c = b + pi + insert_penalties;
- else c = 100000L;
- else c = b;
- if(insert_penalties >= 10000)
- c = 1073741823L; /* 2^30 - 1 */
-;
+ if(pi <= -10000)
+ c = pi;
+ else if(b < 10000)
+ c = b + pi + insert_penalties;
+ else
+ c = 100000L;
+ else
+ c = b;
+ if (insert_penalties >= 10000)
+ c = 1073741823L; /* 2^30 - 1 */
+ ;
#ifdef STAT
if(eqtb[(hash_size + 3196)].cint > 0)
{
- begin_diagnostic ();
- print_nl(37); /* % */
- print(921); /* t= */
- print_totals ();
- print(990); /* g= */
- print_scaled(page_so_far[0]);
- print(924); /* b= */
- if(b == 1073741823L) /* 2^30 - 1 */
- print_char(42); /* * */
- else print_int(b);
- print(925); /* p= */
- print_int(pi);
- print(991); /* c= */
- if(c == 1073741823L) /* 2^30 - 1 */
- print_char(42); /* * */
- else print_int(c);
- if(c <= least_page_cost)
- print_char(35); /* # */
- end_diagnostic(false);
+ begin_diagnostic ();
+ print_nl(37); /* % */
+ print(921); /* t= */
+ print_totals ();
+ print(990); /* g= */
+ print_scaled(page_so_far[0]);
+ print(924); /* b= */
+ if(b == 1073741823L) /* 2^30 - 1 */
+ print_char(42); /* * */
+ else
+ print_int(b);
+ print(925); /* p= */
+ print_int(pi);
+ print(991); /* c= */
+ if(c == 1073741823L) /* 2^30 - 1 */
+ print_char(42); /* * */
+ else print_int(c);
+ if(c <= least_page_cost)
+ print_char(35); /* # */
+ end_diagnostic(false);
}
#endif /* STAT */
if(c <= least_page_cost)
page_so_far[6]= page_so_far[6]+ mem[q + 3].cint;
if((mem[q].hh.b1 != 0)&&(mem[q + 3].cint != 0))
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(988); /* Infinite glue shrinkage found on current page */
- }
+ 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 */
void app_space (void)
{
halfword q;
- if((space_factor >= 2000)&&
- (eqtb[(hash_size + 795)].hh.v.RH != 0))
+ if((space_factor >= 2000) && (eqtb[(hash_size + 795)].hh.v.RH != 0))
q = new_param_glue(13);
- else {
-
+ else {
if(eqtb[(hash_size + 794)].hh.v.RH != 0)
main_p = eqtb[(hash_size + 794)].hh.v.RH;
- else {
-
+ else {
main_p = font_glue[eqtb[(hash_size + 1834)].hh.v.RH];
if(main_p == 0)
{
}
main_p = new_spec(main_p);
if(space_factor >= 2000)
- mem[main_p + 1].cint = mem[main_p + 1].cint + font_info[7 +
- param_base[eqtb[(hash_size + 1834)].hh.v.RH]].cint;
- mem[main_p + 2].cint = xn_over_d(mem[main_p + 2].cint, cur_list
- .aux_field.hh.v.LH, 1000);
- mem[main_p + 3].cint = xn_over_d(mem[main_p + 3].cint, 1000,
- space_factor);
+ mem[main_p + 1].cint = mem[main_p + 1].cint + font_info[7 + param_base[eqtb[(hash_size + 1834)].hh.v.RH]].cint;
+ mem[main_p + 2].cint = xn_over_d(mem[main_p + 2].cint, cur_list.aux_field.hh.v.LH, 1000);
+ mem[main_p + 3].cint = xn_over_d(mem[main_p + 3].cint, 1000, space_factor);
q = new_glue(main_p);
mem[main_p].hh.v.RH = 0;
}
void insert_dollar_sign (void)
{
back_input ();
- cur_tok = 804;
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(1011); /* Proceed; I'll discard its present contents. */
- }
+ 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 */
/* sec 1049 */
void you_cant (void)
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(682); /* You can't use ` */
- }
+ print_err("You can't use `");
print_cmd_chr(cur_cmd, cur_chr);
print(1014); /* ' in */
print_mode(mode);
}
/* sec 1051 */
bool privileged (void)
-{register bool Result;
+{
+ register bool Result;
if(mode > 0)Result = true;
else {
report_illegal_case ();
}
/* sec 1054 */
bool its_all_over (void)
-{/* 10 */ register bool Result;
+{/* 10 */
+ register bool Result;
if(privileged ())
{
- if((mem_top - 2 == page_tail)&&(head == cur_list
- .tail_field)&&(dead_cycles == 0))
+ if((mem_top - 2 == page_tail) && (head == cur_list.tail_field) && (dead_cycles == 0))
{
Result = true;
return(Result);
/* sec 1060 */
void append_glue (void)
{
- small_number s;
+ small_number s;
s = cur_chr;
switch(s)
{case 0 :
halfword p;
if(cur_group == 0)
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(773); /* Extra */
- }
+ print_err("Extra ");
print_cmd_chr(cur_cmd, cur_chr);
{
help_ptr = 1;
back_input ();
p = get_avail ();
mem[mem_top - 3].hh.v.RH = p;
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(622); /* Missing */
- }
+ print_err("Missing ");
switch(cur_group)
{case 14 :
{
/* sec 1069 */
void extra_right_brace (void)
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(1042); /* Extra }, or forgotten */
- }
+ print_err("Extra }, or forgotten");
switch(cur_group)
{case 14 :
print_esc(513); /* endgroup */
mem[tail + 1].hh.v.RH = cur_box;
}
else {
-
- {
- if(interaction == 3)
-;
- print_nl(262); /* ! */
- print(1060); /* Leaders not followed by proper glue */
- }
+ print_err("Leaders not followed by proper glue");
{
help_ptr = 3;
help_line[2]= 1061; /* You should say `\leaders <box or rule><hskip or vskip>'. */
n = cur_val;
if(! scan_keyword(836)) /* to */
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(1067); /* Missing `to' inserted */
- }
+ print_err("Missing `to' inserted");
{
help_ptr = 2;
help_line[1]= 1068; /* I'm working on `\vsplit<box number> to <dimen>'; */
box_end(boxcontext);
}
else {
-
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(1070); /* A <box> was supposed to be here */
- }
+ print_err("A <box> 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 */
off_save ();
}
else {
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(682); /* You can't use ` */
- }
+ print_err("You can't use `");
print_esc(518); /* hrule */
print(1076); /* ' here except with leaders */
{
scan_eight_bit_int ();
if(cur_val == 255)
{
- {
- if(interaction == 3)
-;
- print_nl(262); /* ! */
- print(1079); /* You can't */
- }
+ print_err("You can't ");
print_esc(327); /* insert */
print_int(255);
{
== 1)&&(mem[p].hh.b0 != 1)) ||((abs(mode)==
102)&&(mem[p].hh.b0 != 0)))
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(1091); /* Incompatible list can't be unboxed */
- }
+ print_err("Incompatible list can't be unboxed");
{
help_ptr = 3;
help_line[2]= 1092; /* Sorry, Pandora. (You sneaky devil.) */
if(mem[p].hh.b0 != 11)
if(mem[p].hh.b0 != 6)
{
- {
- if(interaction == 3)
-;
- print_nl(262); /* ! */
- print(1101); /* Improper discretionary list */
- }
+ print_err("Improper discretionary list");
{
help_ptr = 1;
help_line[0]= 1102; /* Discretionary lists must contain only boxes and kerns. */
{
if((n > 0)&&(abs(mode)== 203))
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(1095); /* Illegal math */
- }
+ print_err("Illegal math ");
print_esc(346); /* discretionary */
{
help_ptr = 2;
if(n <= max_quarterword) /* 96/Oct/12 ??? */
mem[tail].hh.b1 = n;
else {
-
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(1098); /* Discretionary list is too long */
- }
+ print_err("Discretionary list is too long");
{
help_ptr = 2;
help_line[1]= 1099; /* Wow---I never thought anybody would tweak me here. */
void align_error (void)
{
if(abs(align_state)> 2){
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(1108); /* Misplaced */
- }
+ print_err("Misplaced ");
print_cmd_chr(cur_cmd, cur_chr);
if(cur_tok == 1062) {
{
else {
back_input ();
if(align_state < 0) {
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(654); /* Missing { inserted */
- }
+ print_err("Missing { inserted");
incr(align_state);
cur_tok = 379; /* belowdisplayshortskip ? */
}
else {
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(1104); /* Missing } inserted */
- }
+ print_err("Missing } inserted");
decr(align_state);
cur_tok = 637;
}
/* sec 1129 */
void noalign_error (void)
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(1108); /* Misplaced */
- }
+ print_err("Misplaced ");
print_esc(524); /* noalign */
{
help_ptr = 2;
/* sec 1129 */
void omit_error (void)
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(1108); /* Misplaced */
- }
+ print_err("Misplaced ");
print_esc(527); /* omit */
{
help_ptr = 2;
/* sec 1135 */
void cs_error (void)
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(773); /* Extra */
- }
+ print_err("Extra ");
print_esc(502); /* endcsname */
{
help_ptr = 1;
{
mem[tail].hh.b1 = cur_chr;
return;
- }
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(1124); /* Limit controls must follow a math operator */
- }
+ }
+ 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. */
}
if(cur_val < 0)
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(1126); /* Missing delimiter (. inserted) */
- }
+ print_err("Missing delimiter (. inserted)");
{
help_ptr = 6;
help_line[5]= 1127; /* I was expecting to see something like `(' or `\{' or */
{
if(cur_cmd == 45)
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(1133); /* Please use */
- }
+ print_err("Please use ");
print_esc(520); /* mathaccent */
print(1134); /* for accents in math mode */
{
{
if(cur_cmd == 7)
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(1137); /* Double superscript */
- }
+ print_err("Double superscript");
{
help_ptr = 1;
help_line[0]= 1138; /* I treat `x^1^2' essentially like `x^1{}^2'. */
}
}
else {
-
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(1139); /* Double subscript */
- }
+ print_err("Double subscript");
{
help_ptr = 1;
help_line[0]= 1140; /* I treat `x_1_2' essentially like `x_1{}_2'. */
scan_delimiter(mem_top - 12, false);
}
if(c % 3 == 0)
- scan_dimen(false, false, false);
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(1147); /* Ambiguous; you need another { and } */
- }
+ 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 */
{
if(cur_group == 15)
{
- scan_delimiter(mem_top - 12, false);
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(773); /* Extra */
- }
+ scan_delimiter(mem_top - 12, false);
+ print_err("Extra ");
print_esc(871); /* right */
{
help_ptr = 1;
(font_params[eqtb[(hash_size + 1853)].hh.v.RH]< 22)||
(font_params[eqtb[(hash_size + 1869)].hh.v.RH]< 22))
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(1152); /* Math formula deleted: Insufficient symbol fonts */
- }
+ 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 */
(font_params[eqtb[(hash_size + 1854)].hh.v.RH]< 13)||
(font_params[eqtb[(hash_size + 1870)].hh.v.RH]< 13))
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(1156); /* Math formula deleted: Insufficient extension fonts */
- }
+ 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 */
get_x_token ();
if(cur_cmd != 3)
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(1160); /* Display math should end with $$ */
- }
+ print_err("Display math should end with $$");
{
help_ptr = 2;
help_line[1]= 1161; /* The `$' that I just saw supposedly matches a previous `$$'. */
(font_params[eqtb[(hash_size + 1853)].hh.v.RH]< 22)||
(font_params[eqtb[(hash_size + 1869)].hh.v.RH]< 22))
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(1152); /* Math formula deleted: Insufficient symbol fonts */
- }
+ 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 */
(font_params[eqtb[(hash_size + 1854)].hh.v.RH]< 13)||
(font_params[eqtb[(hash_size + 1870)].hh.v.RH]< 13))
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(1156); /* Math formula deleted: Insufficient extension fonts */
- }
+ 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 */
{
get_x_token ();
if(cur_cmd != 3) {
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(1160); /* Display math should end with $$ */
- }
+ print_err("Display math should end with $$");
{
help_ptr = 2;
help_line[1]= 1161; /* The `$' that I just saw supposedly matches a previous `$$'. */
} while(!(cur_tok != 2592));
/* if((cur_cs == 0)||(cur_cs > (hash_size + 514))) */ /* 95/Jan/10 */
if((cur_cs == 0)||(cur_cs > (hash_size + hash_extra + 514))) {
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(1178); /* Missing control sequence inserted */
- }
+ print_err("Missing control sequence inserted");
{
help_ptr = 5;
help_line[4]= 1179; /* Please don't say `\def cs{...}', say `\def\cs{...}'. */
}
if(cur_cmd != 89)
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(682); /* You can't use ` */
- }
+ print_err("You can't use `");
print_cmd_chr(cur_cmd, cur_chr);
print(683); /* ' after */
print_cmd_chr(q, 0);
}
}
if(arith_error){
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(1201); /* Arithmetic overflow */
- }
+ print_err("Arithmetic overflow");
{
help_ptr = 2;
help_line[1]= 1202; /* I can't carry out that multiplication or division, */
scan_int ();
if((cur_val <= 0)||(cur_val > 32767))
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(1207); /* Bad space factor */
- }
+ print_err("Bad space factor");
{
help_ptr = 1;
help_line[0]= 1208; /* I allow only values in the range 1..32767 here. */
scan_int ();
if(cur_val < 0)
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(949); /* Bad */
- }
+ print_err("Bad ");
print_esc(529); /* prevgraf */
{
help_ptr = 1;
s = cur_val;
if((s <= 0)||(s >= 134217728L)) /* 2^27 */
{
- {
- if(interaction == 3) ;
- print_nl(262); /* ! */
- print(1216); /* Improper `at' size(*/
- }
+ print_err("Improper `at' size(");
print_scaled(s);
print(1217); /* pt), replaced by 10pt */
{
scan_int ();
s = - (integer) cur_val;
if((cur_val <= 0)||(cur_val > 32768L)) {
- {
- if(interaction == 3) ;
- print_nl(262); /* ! */
- print(549); /* Illegal magnification has been changed to 1000 */
- }
+ 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. */
k2 = str_start[cur_name];
l1 = str_start[cur_area + 1] - str_start[cur_area];
l2 = str_start[cur_name + 1] - str_start[cur_name];
- showchar('\n');
- showline("FONT ", 0);
+ show_char('\n');
+ show_line("FONT ", 0);
for (i = 0; i < l1; i++) {
*sch++ = str_pool[i+k1];
}
}
*sch++ = ' ';
*sch++ = '\0';
- showline(log_line, 0);
+ show_line(log_line, 0);
}
/* if (ignore_frozen) goto lab69; */ /* 98/Oct/5 */
if (ignore_frozen == 0 || f > frozenfontptr) { /* 99/Mar/26 */
if (trace_flag) {
sprintf(log_line, "SKIPPING %ld ", s);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
goto lab50;
}
if (ignore_frozen == 0 || f > frozenfontptr) { /* 99/Mar/26 */
if (trace_flag) {
sprintf(log_line, "SKIPPING %ld ", s);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
goto lab50;
}
/* lab69: */ /* 98/Oct/5 */
/* end of paragraph 1257 */
- if (trace_flag) showline("READING ", 0); /* debugging only */
+ if (trace_flag) show_line("READING ", 0); /* debugging only */
f = read_font_info(u, cur_name, cur_area, s);
/* common_ending: equiv[u] <- f; */ /* use existing font info */
lab50:
if (trace_flag) {
sprintf(log_line, "NEW FONT %d ", f); /* debugging only */
- showline(log_line, 0);
+ show_line(log_line, 0);
}
eqtb[u].hh.v.RH = f;
/* eqtb[(hash_size + 524) + f]= eqtb[u];*/ /* eqtb[frozen_null+font+f] */
#ifdef SHORTHASH /* debugging only 1996/Jan/20 */
if (t > 65535L) {
sprintf(log_line, "ERROR: %s too large %d\n", "hash_used", t);
- showline(log_line, 1);
+ show_line(log_line, 1);
}
#endif
/* hash[(hash_size + 524) + f].v.RH = t; */
#endif
}
else {
-
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(335); /* */
- }
+ print_err("");
slow_print(s);
if(eqtb[(hash_size + 1321)].hh.v.RH != 0)
use_err_help = true;
}
break;
}
- end_diagnostic(true);
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(1249); /* OK */
- }
+ end_diagnostic(true);
+ print_err("OK");
if(selector == 19)
if(eqtb[(hash_size + 3192)].cint <= 0)
{
break;
case 0 :
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(1038); /* Too many }'s */
- }
+ print_err("Too many }'s");
{
help_ptr = 2;
help_line[1]= 1039; /* You've closed more groups than you opened. */
if((cur_input.loc_field != 0)||((cur_input.index_field != 6)&&(
cur_input.index_field != 3)))
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(1004); /* Unbalanced output routine */
- }
+ print_err("Unbalanced output routine");
{
help_ptr = 2;
help_line[1]= 1005; /* Your sneaky output routine has problematic {'s and/or }'s. */
insert_penalties = 0;
if(eqtb[(hash_size + 1833)].hh.v.RH != 0)
{
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(1007); /* Output routine didn't use all of */
- }
+ print_err("Output routine didn't use all of ");
print_esc(406); /* box */
print_int(255);
{
back_input ();
/* cur_tok = (hash_size + 4610); */
/* cur_tok = (hash_size + 4095 + 515); */
- cur_tok = (hash_size + hash_extra + 4095 + 515);
- {
- if(interaction == 3)
- ;
- print_nl(262); /* ! */
- print(622); /* Missing */
- }
+ cur_tok = (hash_size + hash_extra + 4095 + 515);
+ print_err("Missing ");
print_esc(893); /* cr */
print(623); /* inserted */
{
}
/* sec 0524 */
bool open_fmt_file (void)
-{/* 40 10 */ register bool Result;
+{/* 40 10 */
+ register bool Result;
integer j;
j = cur_input.loc_field;
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
/* For Windows NT, lets allow + instead of & for format specification */
/* if(buffer[cur_input.loc_field]== 38) */ /* 95/Jan/22 */
- if(buffer[cur_input.loc_field]== '&' ||
- buffer[cur_input.loc_field]== '+')
+ if(buffer[cur_input.loc_field]== '&' || buffer[cur_input.loc_field]== '+')
{
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
/* User specified a format name on the command line */
// format file open failed
if (knuth_flag) {
(void) sprintf(log_line, "%s;%s\n", "Sorry, I can't find that format", " will try the default.");
- showline(log_line, 1);
+ show_line(log_line, 1);
}
else {
char *s=log_line;
sprintf(s, "%s environment variable not set\n", "TEXFORMATS");
}
}
- showline(log_line, 1); // show all three lines at once
+ show_line(log_line, 1); // show all three lines at once
}
#ifndef _WINDOWS
fflush(stdout);
{
;
if (knuth_flag) {
- (void) sprintf(log_line, "%s!\n",
- "I can't find the default format file");
- showline(log_line, 1);
+ (void) sprintf(log_line, "%s!\n", "I can't find the default format file");
+ show_line(log_line, 1);
}
else {
char *s=log_line;
/* null_terminate (name_of_file + 1); */
name_of_file[name_length + 1] = '\0'; /* null terminate */
- (void) sprintf(s, "%s (%s)!\n",
- "I can't find the default format file", name_of_file+1);
+ (void) sprintf(s, "%s (%s)!\n", "I can't find the default format file", name_of_file + 1);
/* space_terminate (name_of_file + 1); */
name_of_file[name_length + 1] = ' '; /* space terminate */
s += strlen(s);
- (void) sprintf(s,
- "(Perhaps your %s environment variable is not set correctly)\n",
- "TEXFORMATS");
+ (void) sprintf(s, "(Perhaps your %s environment variable is not set correctly)\n", "TEXFORMATS");
s += strlen(s);
{
char *t; /* extra info 97/June/13 */
sprintf(s, "%s environment variable not set\n", "TEXFORMATS");
}
}
- showline(log_line, 1); // show all three lines at once
+ show_line(log_line, 1); // show all three lines at once
}
Result = false;
return(Result);
}
/**************************************************************************/
void print_char_string (unsigned char *s)
-{ // 2000 Jun 18
+{
+ // 2000 Jun 18
while (*s > 0) print_char(*s++);
}
void show_font_info (void); // now in local.c
integer k;
if (closed_already++) {
- showline("CLOSEDFILESANDTERMINATED ALREADY ", 0);
+ show_line("CLOSEDFILESANDTERMINATED ALREADY ", 0);
return; // sanity check
}
- if (trace_flag) showline("\nCLOSEFILESANDTERMINATE ", 0);
+ if (trace_flag) show_line("\nCLOSEFILESANDTERMINATE ", 0);
// close all open files
{
register integer for_end;
verbose_flag != 0) /* 93/Nov/30 - bkph */
if(log_opened) {
/* used to output paragraph breaking statistics here */
- (void) fprintf(log_file, "%c\n", ' ');
- (void) fprintf(log_file, "\n");
- (void) fprintf(log_file, "%s%s\n", "Here is how much of TeX's memory", " you used:");
- (void) fprintf(log_file, "%c%ld%s", ' ', (long)str_ptr - init_str_ptr, " string");
+ (void) fprintf(log_file, "%c\n", ' ');
+ (void) fprintf(log_file, "\n");
+ (void) fprintf(log_file, "%s%s\n", "Here is how much of TeX's memory", " you used:");
+ (void) fprintf(log_file, "%c%ld%s", ' ', (long)str_ptr - init_str_ptr, " string");
if(str_ptr != init_str_ptr + 1)
(void) putc('s', log_file);
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
#ifdef ALLOCATESTRING
if (show_current)
- (void) fprintf(log_file, "%s%ld\n", " out of ", (long) current_max_strings - init_str_ptr);
+ (void) fprintf(log_file, "%s%ld\n", " out of ", (long) current_max_strings - init_str_ptr);
else
#endif
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
- (void) fprintf(log_file, "%s%ld\n", " out of ", (long) max_strings - init_str_ptr);
+ (void) fprintf(log_file, "%s%ld\n", " out of ", (long) max_strings - init_str_ptr);
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
#ifdef ALLOCATESTRING
if (show_current)
- (void) fprintf(log_file, "%c%ld%s%ld\n", ' ',
- (long) pool_ptr - init_pool_ptr,
- " string characters out of ",
- (long) current_pool_size - init_pool_ptr);
+ (void) fprintf(log_file, "%c%ld%s%ld\n", ' ', (long) pool_ptr - init_pool_ptr, " string characters out of ", (long) current_pool_size - init_pool_ptr);
else
#endif
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
- (void) fprintf(log_file, "%c%ld%s%ld\n", ' ',
- (long) pool_ptr - init_pool_ptr,
- " string characters out of ",
- (long) pool_size - init_pool_ptr);
+ (void) fprintf(log_file, "%c%ld%s%ld\n", ' ', (long) pool_ptr - init_pool_ptr, " string characters out of ", (long) pool_size - init_pool_ptr);
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
#ifdef ALLOCATEMAIN
if (show_current)
else
#endif
(void) fprintf(log_file, "%c%ld%s%ld\n", ' ', (long)lo_mem_max - mem_min + mem_end - hi_mem_min + 2, " words of memory out of ", (long)mem_end + 1 - mem_min);
-/* (void) fprintf(log_file, "%c%ld%s%ld\n", ' ', (long)lo_mem_max - mem_min + mem_end - hi_mem_min + 2, " words of memory out of ", (long)max_mem_size); */
+/* (void) fprintf(log_file, "%c%ld%s%ld\n", ' ', (long)lo_mem_max - mem_min + mem_end - hi_mem_min + 2, " words of memory out of ", (long)max_mem_size); */
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
- (void) fprintf(log_file, "%c%ld%s%ld\n", ' ', (long)cs_count,
- " multiletter control sequences out of ", (long)(hash_size + hash_extra));
- (void) fprintf(log_file, "%c%ld%s%ld%s", ' ', (long)fmem_ptr,
- " words of font info for ", (long)font_ptr - 0 , " font");
+ (void) fprintf(log_file, "%c%ld%s%ld\n", ' ', (long)cs_count, " multiletter control sequences out of ", (long)(hash_size + hash_extra));
+ (void) fprintf(log_file, "%c%ld%s%ld%s", ' ', (long)fmem_ptr, " words of font info for ", (long)font_ptr - 0, " font");
if(font_ptr != 1)
- (void) putc('s', log_file);
+ (void) putc('s', log_file);
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
#ifdef ALLOCATEFONT
if (show_current)
- (void) fprintf(log_file, "%s%ld%s%ld\n",
- ", out of ", (long)current_font_mem_size, " for ", (long)font_max - 0);
+ (void) fprintf(log_file, "%s%ld%s%ld\n", ", out of ", (long)current_font_mem_size, " for ", (long)font_max - 0);
else
#endif
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
- (void) fprintf(log_file, "%s%ld%s%ld\n",
- ", out of ", (long)font_mem_size, " for ", (long)font_max - 0);
- (void) fprintf(log_file, "%c%ld%s", ' ', (long)hyph_count, " hyphenation exception");
- if(hyph_count != 1)(void) putc('s', log_file);
+ (void) fprintf(log_file, "%s%ld%s%ld\n", ", out of ", (long)font_mem_size, " for ", (long)font_max - 0);
+ (void) fprintf(log_file, "%c%ld%s", ' ', (long)hyph_count, " hyphenation exception");
+ if(hyph_count != 1)
+ (void) putc('s', log_file);
/* (void) fprintf(log_file, "%s%ld\n", " out of ", (long)607); */
- (void) fprintf(log_file, "%s%ld\n", " out of ", (long) hyphen_prime);
- (void) fprintf(log_file, " ");
+ (void) fprintf(log_file, "%s%ld\n", " out of ", (long) hyphen_prime);
+ (void) fprintf(log_file, " ");
(void) fprintf(log_file, "%ld%s", (long)max_in_stack, "i,");
- (void) fprintf(log_file, "%ld%s", (long)max_nest_stack, "n,");
- (void) fprintf(log_file, "%ld%s", (long)max_param_stack, "p,");
- (void) fprintf(log_file, "%ld%s", (long)max_buf_stack + 1, "b,");
- (void) fprintf(log_file, "%ld%s", (long)max_save_stack + 6, "s");
- (void) fprintf(log_file, " stack positions out of ");
+ (void) fprintf(log_file, "%ld%s", (long)max_nest_stack, "n,");
+ (void) fprintf(log_file, "%ld%s", (long)max_param_stack, "p,");
+ (void) fprintf(log_file, "%ld%s", (long)max_buf_stack + 1, "b,");
+ (void) fprintf(log_file, "%ld%s", (long)max_save_stack + 6, "s");
+ (void) fprintf(log_file, " stack positions out of ");
#ifdef ALLOCATESAVESTACK
if (show_current)
(void) fprintf(log_file, "%ld%s", (long)current_stack_size, "i,");
(void) fprintf(log_file, "\n");
/************************************************************************/
if (! knuth_flag)
- fprintf(log_file, " (i = instack, n = neststack, p = param_stack, b = bufstack, s = save_stack)\n");
+ fprintf(log_file, " (i = in_stack, n = nest_stack, p = param_stack, b = buf_stack, s = save_stack)\n");
/************************************************************************/
if (! knuth_flag) /* 1999/Jan/17 */
fprintf(log_file,
/* Modified 98/Jan/14 to leave out lines with zero counts */
if (show_line_break_stats && first_pass_count > 0) { /* 96/Feb/8 */
int first_count, secondcount, thirdcount;
- (void) fprintf(log_file,
- "\nSuccess at breaking %d paragraph%s:",
- first_pass_count, (first_pass_count == 1) ? "" : "s");
+ (void) fprintf(log_file, "\nSuccess at breaking %d paragraph%s:", first_pass_count, (first_pass_count == 1) ? "" : "s");
if (singleline > 0)
- (void) fprintf(log_file,
- "\n %d single line `paragraph%s'",
- singleline, (singleline == 1) ? "" : "s"); /* 96/Apr/23 */
+ (void) fprintf(log_file, "\n %d single line `paragraph%s'", singleline, (singleline == 1) ? "" : "s"); /* 96/Apr/23 */
first_count = first_pass_count-singleline-second_pass_count;
if (first_count < 0) first_count = 0; /* sanity check */
secondcount = second_pass_count-final_pass_count;
thirdcount = final_pass_count-paragraph_failed;
if (first_count != 0 || secondcount != 0 || thirdcount != 0)
- (void) fprintf(log_file, "\n %d first pass (\\pretolerance = %d)",
- first_count, eqtb[(hash_size + 3163)].cint);
+ (void) fprintf(log_file, "\n %d first pass (\\pretolerance = %d)", first_count, eqtb[(hash_size + 3163)].cint);
if (secondcount != 0 || thirdcount != 0)
- (void) fprintf(log_file, "\n %d second pass (\\tolerance = %d)",
- secondcount, eqtb[(hash_size + 3164)].cint);
+ (void) fprintf(log_file, "\n %d second pass (\\tolerance = %d)", secondcount, eqtb[(hash_size + 3164)].cint);
if (final_pass_count > 0 || eqtb[(hash_size + 3750)].cint > 0) {
- (void) fprintf(log_file, "\n %d third pass (\\emergencystretch = %lgpt)",
- thirdcount,
- (double) eqtb[(hash_size + 3750)].cint / 65536.0);
+ (void) fprintf(log_file, "\n %d third pass (\\emergencystretch = %lgpt)", thirdcount, (double) eqtb[(hash_size + 3750)].cint / 65536.0);
/* above converted from scaled points to printer's points */
}
if (paragraph_failed > 0)
(void) fprintf(log_file, "\n %d failed", paragraph_failed);
(void) putc('\n', log_file);
if (overfull_hbox > 0)
- (void) fprintf(log_file, "\n %d overfull \\hbox%s",
- overfull_hbox, (overfull_hbox > 1) ? "es" : "");
+ (void) fprintf(log_file, "\n %d overfull \\hbox%s", overfull_hbox, (overfull_hbox > 1) ? "es" : "");
if (underfull_hbox > 0)
- (void) fprintf(log_file, "\n %d underfull \\hbox%s",
- underfull_hbox, (underfull_hbox > 1) ? "es" : "");
+ (void) fprintf(log_file, "\n %d underfull \\hbox%s", underfull_hbox, (underfull_hbox > 1) ? "es" : "");
if (overfull_vbox > 0)
- (void) fprintf(log_file, "\n %d overfull \\vbox%s",
- overfull_vbox, (overfull_vbox > 1) ? "es" : "");
+ (void) fprintf(log_file, "\n %d overfull \\vbox%s", overfull_vbox, (overfull_vbox > 1) ? "es" : "");
if (underfull_vbox > 0)
- (void) fprintf(log_file, "\n %d underfull \\vbox%s",
- underfull_vbox, (underfull_vbox > 1) ? "es" : "");
+ (void) fprintf(log_file, "\n %d underfull \\vbox%s", underfull_vbox, (underfull_vbox > 1) ? "es" : "");
if (overfull_hbox || underfull_hbox || overfull_vbox || underfull_vbox)
(void) putc('\n', log_file);
}
(total_pages % 65536),
total_pages);
if (log_opened) fputs (log_line, log_file);
- showline(log_line, 1);
+ show_line(log_line, 1);
}
{
dvi_buf[dvi_ptr]=(total_pages / 256)% 256;
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
if (trace_flag) { /* 93/Dec/28 - bkph */
sprintf(log_line, "\ndviwrite %d", dvi_gone);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
if(dvi_limit == half_buf)writedvi(half_buf, dvi_buf_size - 1);
}
print_ln ();
if((edit_name_start != 0)&&(interaction > 0)) {
- calledit(str_pool, edit_name_start, edit_name_length, edit_line);
+ call_edit(str_pool, edit_name_start, edit_name_length, edit_line);
}
} /* end of close_files_and_terminate */
#ifdef DEBUG
void check_eqtb (char *); /* in local.c - bkph */
void probe_memory (void); /* in local.c - bkph */
// void show_maximums (FILE *); /* in local.c - bkph */
-void printcsnames (FILE *, int); /* in local.c - bkph */
+void print_cs_names (FILE *, int); /* in local.c - bkph */
void perrormod(char *); /* in local.c */
char *grabenv(char *); /* in local.c - bkph */
bool extensionirrelevantp (unsigned char *base, int nlen, char *suffix);
-void calledit (ASCII_code *filename, pool_pointer fnstart,
+void call_edit (ASCII_code *filename, pool_pointer fnstart,
integer fnlength, integer linenumber); /* from lib/texmf.c - bkph */
-void addvariablespace(int); /* in itex.c - bkph */
+void add_variable_space(int); /* in itex.c - bkph */
void get_date_and_time (integer *minutes, integer *day,
integer *month, integer *year); /* in lib/texmf.c - bkph */
unsigned char *unixify (unsigned char *); /* in pathsrch.c bkph */
#ifdef _WINDOWS
- void showline (char *, int); /* in local.c */
- void showchar (int); /* in local.c */
+ void show_line (char *, int); /* in local.c */
+ void show_char (int); /* in local.c */
int main(int, char *[]); /* in lib\texmf.c */
#endif
flag = main_program (); // texbody in itex.c
if (trace_flag) {
sprintf(log_line, "EXITING at %s %d %d %d\n", "MAIN", flag, ret, jump_used);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
}
else { // get here from non-local jump via jumpbuffer - if any
if (trace_flag) {
sprintf(log_line, "EXITING at %s %d %d %d\n", "JUMPOUT", flag, ret, jump_used);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
}
/* int ch, flag; */
int i;
-/* if (trace_flag) showline("Entering t_open_in (texmf)\n", 0); */
+/* if (trace_flag) show_line("Entering t_open_in (texmf)\n", 0); */
buffer[first] = 0; /* So the first `strcat' will work. */
(void) time (&clock); /* - seconds since 1970 */
if (trace_flag) {
sprintf(log_line, "The time is %u\n", clock); /* debugging */
- showline(log_line, 0);
+ show_line(log_line, 0);
}
if (clock < 0) {
- showline("Time not available!\n", 1);
+ show_line("Time not available!\n", 1);
/* clock = 0; *//* 901621283 1998 July 28 06:21:00 */
}
tmptr = localtime (&clock);
/* MS C runtime library has trouble for clock >= 2^31 !!! */
if (tmptr == NULL) { /* debugging 95/Dec/30*/
sprintf(log_line, "Cannot convert time (%0ld)!\n", clock);
- showline(log_line, 1);
+ show_line(log_line, 1);
*year=2038; *month=1; *day=18; *minutes=22 * 60 + 14;
}
else {
sprintf(log_line, "%d-%d-%d %d:%d\n",
tmptr->tm_year + 1900, tmptr->tm_mon + 1, tmptr->tm_mday,
tmptr->tm_hour, tmptr->tm_min);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
}
#ifdef MSDOS
if (!no_interrupts) {
if (signal(SIGINT, catch_interrupt)== SIG_ERR) {
- showline(" CTRL-C handler not installed\n", 0);
+ show_line(" CTRL-C handler not installed\n", 0);
#ifndef _WINDOWS
uexit(1); /* do we care when run as DLL ? */
#endif
\f
/* I/O for TeX and Metafont. */ /* give file name ? */
-void complainline (FILE *output)
+void complain_line (FILE *output)
{
- showline("\n", 0);
+ show_line("\n", 0);
#ifdef ALLOCATEBUFFER
sprintf(log_line, "! Unable to read an entire line---buf_size=%d.\n", current_buf_size);
#else
sprintf(log_line, "! Unable to read an entire line---buf_size=%d.\n", buf_size);
#endif
- if (output == stderr) showline(log_line, 1);
- else if (output == stdout) showline(log_line, 0);
+ if (output == stderr) show_line(log_line, 1);
+ else if (output == stdout) show_line(log_line, 0);
else fputs(log_line, output); // never
- showline(" (File may have a line termination problem.)", 0);
+ show_line(" (File may have a line termination problem.)", 0);
}
-void showbadline (FILE *output, int first, int last)
+void show_bad_line (FILE *output, int first, int last)
{ /* 1994/Jan/21 */
int i, c, d, ch;
char *s=log_line;
// putc(' ', output); /* putc('\n', output); */
*s++ = ' ';
*s++ = '\0';
- if (output == stderr) showline(log_line, 1);
- else if (output == stdout) showline(log_line, 0);
+ if (output == stderr) show_line(log_line, 1);
+ else if (output == stdout) show_line(log_line, 0);
else fputs(log_line, output); // log_file
}
if (ch > 126 || (ch < ' ' && ch != '\t' && ch != '\f'
&& ch != '\r' && ch != '\n')) {
sprintf(log_line, "\n! non ASCII char (%d) in line: ", ch);
- showline(log_line, 1);
+ show_line(log_line, 1);
if (log_opened)
fprintf(log_file, "\n! non ASCII char (%d) in line: ", ch);
/* buffer[i]= 127; */ /* not defined - invalid char */
}
}
if (flag) {
- showbadline(errout, first, last);
- if (log_opened) showbadline(log_file, first, last);
+ show_bad_line(errout, first, last);
+ if (log_opened) show_bad_line(log_file, first, last);
}
}
/* Don't bother using xord if we don't need to. */ /* for input line */
// can break out of above on EOF '\n' or '\r
// sprintf(log_line, "BREAK on %d at %ld\n", i, ftell(f));
-// showline(log_line, 0); // debugging only
+// show_line(log_line, 0); // debugging only
if (return_flag) { /* let return terminate line as well as newline */
if (i == '\r') { /* see whether return followed by newline */
}
// sprintf(log_line, "first %d last %d\n", first, last);
-// showline(log_line, 0); // debugging only
+// show_line(log_line, 0); // debugging only
// strncpy(log_line, &buffer[first], last - first + 1);
// log_line[last-first] = '\n';
// log_line[last-first+1] = '\0';
-// showline(log_line, 0); // debugging only
+// show_line(log_line, 0); // debugging only
// Turn Ctrl-Z at end of file into newline 2000 June 22
// if (i == EOF && trimeof != 0 && buffer[last-1] == 26) last--; /* ^Z */
// buffer[last] = '\0';
last--;
// sprintf(log_line, "CTRL-Z first %d last %d\n", first, last);
-// showline(log_line, 0); // debugging only
+// show_line(log_line, 0); // debugging only
}
if (i == EOF && last == first)
return false; /* EOF and line empty - true end of file */
/* Didn't get the whole line because buffer was too small? */
/* This shouldn't happen anymore 99/Jan/23 */
if (i != EOF && i != '\n' && i != '\r') {
- complainline(errout);
- if (log_opened) complainline(log_file); /* ? 93/Nov/20 */
+ complain_line(errout);
+ if (log_opened) complain_line(log_file); /* ? 93/Nov/20 */
/* This may no longer be needed ... now that we grow it */
if (truncate_long_lines) { /* 98/Feb/3 */
while (i != EOF && i != '\n' && i != '\r') {
static char *edit_value = EDITOR;
-void unshroudstring (char *real_var, char *var, int n) {
+void unshroud_string (char *real_var, char *var, int n) {
int c;
char *s=real_var;
char *t=var;
else *s = '\0'; /* terminate it anyway */
} /* 93/Nov/20 */
-char *getenvshroud (char *var) {
+char *get_env_shroud (char *var) {
char real_var[32];
char *real_value;
- unshroudstring (real_var, var, sizeof(real_var));
+ unshroud_string (real_var, var, sizeof(real_var));
/* real_value = getenv(real_var); */ /* 1994/Mar/1 */
real_value = grabenv(real_var); /* 1994/Mar/1 */
if (trace_flag) {
sprintf(log_line, "\nset %s=", real_var);
- showline(log_line, 0);
+ show_line(log_line, 0);
if (real_value != NULL) {
- showline(real_value, 0);
+ show_line(real_value, 0);
}
- showline("\n", 0);
+ show_line("\n", 0);
}
-/* return getenvshroud (real_var); */ /* serious bug ! since 93/Nov/20 */
+/* return get_env_shroud (real_var); */ /* serious bug ! since 93/Nov/20 */
/* return getenv (real_var); */ /* fixed 93/Dec/28 */
return real_value; /* 94/Mar/1 */
} /* 93/Nov/20 */
/* called from close_files_and_terminate in tex9.c */
-void calledit (ASCII_code *stringpool, pool_pointer fnstart,
+void call_edit (ASCII_code *stringpool, pool_pointer fnstart,
integer fnlength, integer linenumber) {
char *command, *s, *t, *u;
char c;
n = fcloseall(); /* paranoia 1994/Aug/10 */
if (n > 0 && verbose_flag) {
sprintf(log_line, "Closed %d streams\n", n);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
/* Replace the default with the value of the appropriate environment
variable, if it's set. */
/* s = getenv (edit_var); */ /* 93/Nov/20 */
- s = getenvshroud (edit_var);
+ s = get_env_shroud (edit_var);
if (s != NULL) edit_value = s; /* OK, replace wired in default */
/* Construct the command string. */
#ifdef MSDOS
sprintf(log_line,
"! bad command syntax (%c).\n", 'd');
- showline(log_line, 1);
+ show_line(log_line, 1);
#else
sprintf(log_line,
"! `%%d' cannot appear twice in editor command.\n");
- showline(log_line, 1);
+ show_line(log_line, 1);
#endif
uexit(1);
}
#ifdef MSDOS
sprintf(log_line,
"! bad command syntax (%c).\n", 's');
- showline(log_line, 1);
+ show_line(log_line, 1);
#else
sprintf(log_line,
"! `%%s' cannot appear twice in editor command.\n");
- showline(log_line, 1);
+ show_line(log_line, 1);
#endif
uexit(1);
}
#ifdef MSDOS
sprintf(log_line,
"! bad command syntax (%c).\n", 'l');
- showline(log_line, 1);
+ show_line(log_line, 1);
#else
sprintf(log_line,
"! `%%l' cannot appear twice in editor command.\n");
- showline(log_line, 1);
+ show_line(log_line, 1);
#endif
uexit(1);
}
if (strlen(command) + 1 >= commandlen) { /* should not happen! */
sprintf(log_line,
"Command too long (%d > %d)\n", strlen(command) + 1, commandlen);
- showline(log_line, 1);
+ show_line(log_line, 1);
uexit(1);
}
if (system (command) != 0) {
// fprintf (errout, "\n");
- showline("\n", 0);
+ show_line("\n", 0);
// fprintf (errout,
sprintf(log_line,
"! Error in call: %s\n", command); /* shroud ? */
- showline(log_line, 1);
+ show_line(log_line, 1);
/* errno seems to be 0 typically, so perror says "no error" */
#ifdef MSDOS
if (errno != 0) perrormod("! DOS says"); /* 94/Aug/10 - bkph */
#endif
sprintf(log_line, " (TEXEDIT=%s)\n", edit_value);
- showline(log_line, 0);
- showline(" (Editor specified may be missing or path may be wrong)\n", 0);
- showline(" (or there may be missing -- or extraneous -- quotation signs)\n", 0);
+ show_line(log_line, 0);
+ show_line(" (Editor specified may be missing or path may be wrong)\n", 0);
+ show_line(" (or there may be missing -- or extraneous -- quotation signs)\n", 0);
}
uexit(1); /* Quit, since we found an error. */
}
break;
default:
- showline("\n", 0);
+ show_line("\n", 0);
sprintf(log_line, "! I can't (un)dump a %d byte item.\n", size);
- showline(log_line, 1);
+ show_line(log_line, 1);
uexit(1);
}
return 0;
/* if (fwrite (p, item_size, nitems, out_file) != nitems) */ /* bkph */
if ((int) fwrite (p, item_size, nitems, out_file) != nitems){
- showline("\n", 0);
+ show_line("\n", 0);
sprintf(log_line, "! Could not write %d %d-byte item%s.\n",
nitems, item_size, (nitems > 1) ? "s" : "");
- showline(log_line, 1);
+ show_line(log_line, 1);
uexit(1);
}
#ifdef MSDOS_HACK
unsigned int nbytes = item_size * nitems;
if ((unsigned int) read(fileno (in_file), p, nbytes) != nbytes) {
- showline("\n", 0);
+ show_line("\n", 0);
sprintf(log_line, "! Could not read %d %d-byte item%s.\n",
nitems, item_size, (nitems > 1) ? "s" : "");
- showline(log_line, 1);
+ show_line(log_line, 1);
uexit(1);
}
#else
if ((int) fread(p, item_size, nitems, in_file) != nitems) {
- showline("\n", 0);
+ show_line("\n", 0);
sprintf(log_line, "! Could not read %d %d-byte item%s.\n",
nitems, item_size, (nitems > 1) ? "s" : "");
- showline(log_line, 1);
+ show_line(log_line, 1);
uexit(1);
}
#endif
return ((*mfwp->mfwsw_initscreen) ());
else
{
- showline("\n", 0);
+ show_line("\n", 0);
sprintf(log_line,
"! Couldn't initialize the online display for a `%s'.\n",
ttytype);
- showline(log_line, 1);
+ show_line(log_line, 1);
return 1;
}
((*mfwp->mfwsw_updatescrn) ());
else
{
- showline("Updatescreen called\n", 0);
+ show_line("Updatescreen called\n", 0);
}
#else /* TRAP */
fprintf (log_file, "Calling UPDATESCREEN\n");
{
sprintf(log_line, "Blankrectangle l=%d r=%d t=%d b=%d\n",
left, right, top, bottom);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
#else /* TRAP */
fprintf (log_file, "\nCalling BLANKRECTANGLE(%d,%d,%d,%d)\n", left,
else
{
sprintf(log_line, "Paintrow r=%d c=%d v=");
- showline(log_line, 0);
+ show_line(log_line, 0);
while (vector_size-- > 0) {
// printf ("%d ", transition_vector++);
sprintf(log_line, "%d ", transition_vector++);
- showline(log_line, 0);
+ show_line(log_line, 0);
}
- showline("\n", 0);
+ show_line("\n", 0);
}
#else /* TRAP */
unsigned k;
/* Declare routines in texmf.c. */
extern void get_date_and_time ();
extern void t_open_in ();
-// extern void calledit ();
-// extern int calledit ();
+// extern void call_edit ();
+// extern int call_edit ();
extern bool extensionirrelevantp ();
extern bool input_line ();
// extern void do_dump ();
#ifdef _WINDOWS
int ConsoleInput(char * question, char * help, char * buffer);
#else
- #define showline(str,flag) fputs(str,stdout)
- #define showchar(chr) putc(chr, stdout)
+ #define show_line(str,flag) fputs(str,stdout)
+ #define show_char(chr) putc(chr, stdout)
#endif
//////////////////////////////////////////////////////////