From 0a8fba52463d5fb3f684e0eb328bc78299afdd64 Mon Sep 17 00:00:00 2001 From: maqiyuan Date: Mon, 12 May 2014 07:16:38 +0800 Subject: [PATCH] removed unused flag. --- src/texsourc/coerce.h | 5 - src/texsourc/local.c | 30 +-- src/texsourc/openinou.c | 17 +- src/texsourc/tex3.c | 2 +- src/texsourc/tex4.c | 10 +- src/texsourc/tex5.c | 4 +- src/texsourc/tex6.c | 2 +- src/texsourc/tex7.c | 2 +- src/texsourc/tex9.c | 1 - src/texsourc/texd.h | 556 ++++++++++++++++++++++++------------------------ src/texsourc/texmfmem.h | 68 +++--- 11 files changed, 341 insertions(+), 356 deletions(-) diff --git a/src/texsourc/coerce.h b/src/texsourc/coerce.h index 956cddf..33d0b28 100644 --- a/src/texsourc/coerce.h +++ b/src/texsourc/coerce.h @@ -23,11 +23,6 @@ /* It is OK for eqtb, because, even though we may allocate eqtb, */ /* we won't ever reallocate it ... */ -/* WARNING: with dynamic allocation cannot use memory_word *mem=zmem */ -/* in this case, just let mem be alias for zmem */ -/* BUT: allow continued use of register for eqtb at least ! */ -//#define mem zmem - void print_err (const char * s); void initialize (void); void print_ln (void); diff --git a/src/texsourc/local.c b/src/texsourc/local.c index 32326f0..7b262e6 100644 --- a/src/texsourc/local.c +++ b/src/texsourc/local.c @@ -1748,18 +1748,18 @@ int allocate_memory (void) /* they are all rather small, and typically don't need expansion */ /* WE ASSUME THIS DOESN'T HAPPEN, SO WON'T BOTHER WITH UPDATESTATISTICS */ #ifdef ALLOCATEHASH -/* n = 9767 * sizeof (twohalves); *//* 60 kilo bytes */ -/* n = (hash_size + 267) * sizeof (twohalves); */ /* 60 kilo bytes */ -/* n = (9767 + eqtb_extra) * sizeof (twohalves); */ +/* n = 9767 * sizeof (two_halves); *//* 60 kilo bytes */ +/* n = (hash_size + 267) * sizeof (two_halves); */ /* 60 kilo bytes */ +/* n = (9767 + eqtb_extra) * sizeof (two_halves); */ #ifdef SHORTHASH - n = (hash_size + 267 + eqtb_extra) * sizeof (htwohalves); /* 95/Feb/19 */ - zzzae = (htwohalves *) malloc (roundup(n)); + n = (hash_size + 267 + eqtb_extra) * sizeof (htwo_halves); /* 95/Feb/19 */ + zzzae = (htwo_halves *) malloc (roundup(n)); #else - n = (hash_size + 267 + eqtb_extra) * sizeof (twohalves); /* 95/Feb/19 */ - zzzae = (twohalves *) malloc (roundup(n)); + n = (hash_size + 267 + eqtb_extra) * sizeof (two_halves); /* 95/Feb/19 */ + zzzae = (two_halves *) malloc (roundup(n)); #endif if (trace_flag) trace_memory("hash table", n); -/* zzzae = (twohalves *) malloc ((hash_size + 267) * sizeof (twohalves)); */ +/* zzzae = (two_halves *) malloc ((hash_size + 267) * sizeof (two_halves)); */ if (zzzae == NULL) { memory_error("hash table", n); @@ -2634,15 +2634,6 @@ int analyze_flag (int c, char *optarg) case 'Y': reorder_arg_flag = false; /* local */ break; - case 'b': - test_dir_access = false; /* 94/Feb/10 */ - break; - case 'D': - dir_method = false; /* 94/Feb/10 */ - break; - case 'G': - file_method = false; /* 94/Feb/13 */ - break; /* *********** following command line options take arguments ************** */ case 'm': if (optarg == 0) @@ -2894,9 +2885,6 @@ int init_commands (int ac, char **av) show_missing = true; current_flag = true; current_tfm = true; /* search for TFMs in current dir as well */ - test_dir_access = true; /* test if readable item is perhaps a sub-dir */ - dir_method = true; /* in dir_p: _findfirst instead of use fopen (nul) */ - file_method = true; /* use file_p (_findfirst) not readable (access) */ c_style_flag = false; /* use c-style error output */ show_fmt_flag = true; /* show format file in log */ show_tfm_flag = false; /* don't show metric file in log */ @@ -3402,7 +3390,7 @@ int endit (int flag) if (total_pages > 0) { show_inter_val ((finish_time - main_time) / total_pages); - show_line(" sec per page", 0); + show_line(" sec per page.", 0); } show_line("\n", 0); diff --git a/src/texsourc/openinou.c b/src/texsourc/openinou.c index 4b5ee16..7cef4f8 100644 --- a/src/texsourc/openinou.c +++ b/src/texsourc/openinou.c @@ -191,7 +191,7 @@ bool open_input (FILE **f, path_constant_type path_index, char *fopen_mode) if (return_flag) { if (strcmp(fopen_mode, "r") == 0) - fopen_mode = "rb"; /* so can catch `return' bkph */ + fopen_mode = "rb"; } name_of_file[name_length + 1] = '\0'; @@ -217,9 +217,11 @@ bool open_input (FILE **f, path_constant_type path_index, char *fopen_mode) case TEXINPUTPATH: file_name = kpse_find_file((const_string) name_of_file + 1, kpse_tex_format, 0); break; + case TEXFORMATPATH: file_name = kpse_find_file((const_string) name_of_file + 1, kpse_fmt_format, 0); break; + case TFMFILEPATH: file_name = kpse_find_file((const_string) name_of_file + 1, kpse_tfm_format, 0); break; @@ -283,7 +285,7 @@ bool open_input (FILE **f, path_constant_type path_index, char *fopen_mode) } /* code added 98/Sep/29 to catch first file input */ /* is there a problem if this file bombs ? */ - else if (source_direct == NULL) /* 98/Sep/29 */ + else if (source_direct == NULL) { char *s; @@ -298,7 +300,7 @@ bool open_input (FILE **f, path_constant_type path_index, char *fopen_mode) if ((s = strrchr(source_direct, '/')) == NULL) *source_direct = '\0'; else - *(s+1) = '\0'; + *(s + 1) = '\0'; if (trace_flag) { @@ -312,7 +314,7 @@ bool open_input (FILE **f, path_constant_type path_index, char *fopen_mode) { unsigned temp_length = strlen((char *) name_of_file + 1); - name_of_file[temp_length + 1] = ' '; /* space terminate */ + name_of_file[temp_length + 1] = ' '; } return openable; @@ -391,8 +393,6 @@ bool open_output (FILE **f, char *fopen_mode) show_line(log_line, 0); } -/* Is the filename openable as given? */ - /* but we can assume this is opening here for *output* */ *f = fopen((char *) name_of_file + 1, fopen_mode); @@ -401,8 +401,6 @@ bool open_output (FILE **f, char *fopen_mode) { string temp_dir = get_env_shroud ("UFYNGPVU"); -/* if (deslash) unixify(temp_dir); */ /* deslashify 93/Dec/28 */ - if (temp_dir != NULL) { #ifdef BUILDNAMEDIRECT @@ -412,8 +410,9 @@ bool open_output (FILE **f, char *fopen_mode) /* string temp_name = concat3 (temp_dir, "/", name_of_file + 1); */ string temp_name = concat3 (temp_dir, PATH_SEP_STRING, name_of_file + 1); #endif + if (deslash) - unixify((char *) temp_name); /* deslashify 93/Dec/28 */ + unixify((char *) temp_name); /* but we can assume this is opening here for *output* */ *f = fopen((char*)temp_name, fopen_mode); diff --git a/src/texsourc/tex3.c b/src/texsourc/tex3.c index 89e2e21..3943cca 100644 --- a/src/texsourc/tex3.c +++ b/src/texsourc/tex3.c @@ -2416,7 +2416,7 @@ internal_font_number read_font_info_(halfword u, str_number nom, str_number aire internal_font_number f; internal_font_number g; eight_bits a, b, c, d; - ffourquarters qw; + ffour_quarters qw; scaled sw; integer bchlabel; short bchar; diff --git a/src/texsourc/tex4.c b/src/texsourc/tex4.c index f9d6249..6f513f7 100644 --- a/src/texsourc/tex4.c +++ b/src/texsourc/tex4.c @@ -1351,7 +1351,7 @@ halfword hpack_(halfword p, scaled w, small_number m) /* glue_ord o; */ int o; /* 95/Jan/7 */ internal_font_number f; - ffourquarters i; + ffour_quarters i; eight_bits hd; last_badness = 0; @@ -1992,7 +1992,7 @@ halfword overbar_(halfword b, scaled k, scaled t) /* sec 0709 */ halfword char_box_(internal_font_number f, quarterword c) { - ffourquarters q; + ffour_quarters q; eight_bits hd; halfword b, p; @@ -2022,7 +2022,7 @@ void stack_into_box_(halfword b, internal_font_number f, quarterword c) /* sec 0712 */ scaled height_plus_depth_(internal_font_number f, fquarterword c) { - ffourquarters q; + ffour_quarters q; eight_bits hd; q = char_info(f, c); @@ -2038,8 +2038,8 @@ halfword var_delimiter_(halfword d, small_number s, scaled v) integer m, n; scaled u; scaled w; - ffourquarters q; - ffourquarters r; + ffour_quarters q; + ffour_quarters r; eight_bits hd; /* small_number z; */ int z; /* 95/Jan/7 */ diff --git a/src/texsourc/tex5.c b/src/texsourc/tex5.c index 56f15c2..a17c4db 100644 --- a/src/texsourc/tex5.c +++ b/src/texsourc/tex5.c @@ -313,7 +313,7 @@ void make_math_accent_(halfword q) integer a; quarterword c; internal_font_number f; - ffourquarters i; + ffour_quarters i; scaled s; scaled h; scaled delta; @@ -2080,7 +2080,7 @@ scaled make_op_(halfword q) scaled delta; halfword p, v, x, y, z; quarterword c; - ffourquarters i; + ffour_quarters i; scaled shift_up, shift_down; if ((subtype(q) == normal) && (cur_style < text_style)) diff --git a/src/texsourc/tex6.c b/src/texsourc/tex6.c index f4c93a0..b661dc7 100644 --- a/src/texsourc/tex6.c +++ b/src/texsourc/tex6.c @@ -907,7 +907,7 @@ small_number reconstitute_(small_number j, small_number n, halfword bchar, halfw { halfword p; halfword t; - ffourquarters q; + ffour_quarters q; halfword cur_rh; halfword test_char; scaled w; diff --git a/src/texsourc/tex7.c b/src/texsourc/tex7.c index e4a40a2..1b66e6a 100644 --- a/src/texsourc/tex7.c +++ b/src/texsourc/tex7.c @@ -1290,7 +1290,7 @@ void make_accent (void) halfword p, q, r; internal_font_number f; scaled a, h, x, w, delta; - ffourquarters i; + ffour_quarters i; scan_char_num(); f = cur_font; diff --git a/src/texsourc/tex9.c b/src/texsourc/tex9.c index db866ab..22b5391 100644 --- a/src/texsourc/tex9.c +++ b/src/texsourc/tex9.c @@ -317,7 +317,6 @@ void close_files_and_terminate (void) } else { - //HPDF_SaveToFile(yandy_pdf, "texput.pdf"); HPDF_SaveToFile(yandy_pdf, pdf_file_name); print_nl("Output written on "); diff --git a/src/texsourc/texd.h b/src/texsourc/texd.h index bc09791..8c5360c 100644 --- a/src/texsourc/texd.h +++ b/src/texsourc/texd.h @@ -19,7 +19,7 @@ #define INCREASEFONTS /* make font_info array fmemoryword == 32 bit instead of memory_word = 64 bit */ #define SHORTFONTINFO -/* make hash table htwohalves == 32 bit instead of twohalves == 64 bit */ +/* make hash table htwo_halves == 32 bit instead of two_halves == 64 bit */ /* increase trie_op_size from 751 to 3001 96/Oct/12 */ #define INCREASETRIEOP @@ -212,56 +212,55 @@ EXTERN integer max_buf_stack; #error ERROR: hash_extra not equal to (255 - font_max) #endif -/* NOTE: if you define/undefine SHORTFONT have to redo formats */ - -/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */ +/* sec 0113 */ #ifdef INCREASEFONTS typedef unsigned short quarterword; #else typedef unsigned char quarterword; #endif - /* possible alternative ? */ /* min_halfword = 0 and double max_halfword ? */ /* typedef unsigned long halfword; NO NO: since mem_min may be < 0 */ +/* sec 0113 */ typedef integer halfword; -typedef char twochoices; -typedef char fourchoices; - +typedef char two_choices; +typedef char four_choices; +/* sec 0113 */ #include "texmfmem.h" - +/* sec 0150 */ typedef char glue_ord; - +/* sec 0212 */ typedef struct { -/* short mode_field; */ int mode_field; halfword head_field, tail_field; integer pg_field, ml_field; memory_word aux_field; } list_state_record; - +/* sec 0269 */ typedef char group_code; - +/* sec 0300 */ typedef struct { quarterword state_field, index_field; halfword start_field, loc_field, limit_field, name_field; } in_state_record; - -typedef integer internal_font_number; -typedef integer font_index; -typedef integer dvi_index; -typedef integer trie_op_code; +/* sec 0548 */ +typedef integer internal_font_number; +typedef integer font_index; +/* sec 0594 */ +typedef integer dvi_index; +/* sec 0920 */ +typedef integer trie_op_code; +/* sec 0925 */ typedef integer trie_pointer; - /* typedef short hyph_pointer; */ /* increased 1996/Oct/20 ??? */ typedef integer hyph_pointer; EXTERN integer bad; EXTERN ASCII_code xord[256]; EXTERN ASCII_code xchr[256]; -EXTERN unsigned char name_of_file[PATHMAX + 4]; // fix 2000 June 18 +EXTERN unsigned char name_of_file[PATHMAX + 4]; EXTERN integer name_length; /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */ @@ -284,7 +283,7 @@ EXTERN pool_pointer init_pool_ptr; EXTERN str_number init_str_ptr; #ifdef INITEX - EXTERN alpha_file pool_file; +EXTERN alpha_file pool_file; #endif EXTERN alpha_file log_file; @@ -293,35 +292,34 @@ EXTERN alpha_file log_file; EXTERN int selector; /* padded out */ /* 95/Jan/7 */ /* EXTERN char dig[23]; */ EXTERN char dig[23 + 1]; /* padded out */ -EXTERN integer tally; -EXTERN integer term_offset; -EXTERN integer file_offset; +EXTERN integer tally; +EXTERN integer term_offset; +EXTERN integer file_offset; EXTERN ASCII_code trick_buf[error_line + 1]; /* already padded 79 + 1 */ -EXTERN integer trick_count; -EXTERN integer first_count; +EXTERN integer trick_count; +EXTERN integer first_count; /* EXTERN char interaction; */ /* EXTERN integer interaction; */ /* padded out */ EXTERN int interaction; /* padded out */ /* 95/Jan/7 */ -EXTERN bool deletions_allowed; -EXTERN bool set_box_allowed; +EXTERN bool deletions_allowed; +EXTERN bool set_box_allowed; /* EXTERN char history; */ /* EXTERN integer history; */ /* padded out */ EXTERN int history; /* padded out */ /* 95/Jan/7 */ /* EXTERN schar error_count; */ /* EXTERN integer error_count; */ /* padded out */ EXTERN int error_count; /* padded out */ /* 95/Jan/7 */ -/* EXTERN str_number help_line[6]; */ EXTERN char * help_line[6]; /* EXTERN char help_ptr; */ /* EXTERN integer help_ptr; */ /* padded out */ EXTERN int help_ptr; /* padded out */ /* 95/Jan/7 */ -EXTERN bool use_err_help; +EXTERN bool use_err_help; /* EXTERN integer interrupt; */ EXTERN volatile integer interrupt; /* bkph - do avoid compiler optimization */ -EXTERN bool OK_to_interrupt; -EXTERN bool arith_error; -EXTERN scaled tex_remainder; -EXTERN halfword temp_ptr; +EXTERN bool OK_to_interrupt; +EXTERN bool arith_error; +EXTERN scaled tex_remainder; +EXTERN halfword temp_ptr; /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */ #ifdef ALLOCATEMAIN @@ -339,10 +337,10 @@ EXTERN halfword temp_ptr; EXTERN halfword lo_mem_max; EXTERN halfword hi_mem_min; EXTERN integer var_used, dyn_used; -EXTERN halfword avail; -EXTERN halfword mem_end; -EXTERN halfword mem_start; /* new in 3.14159 ??? */ -EXTERN halfword rover; +EXTERN halfword avail; +EXTERN halfword mem_end; +EXTERN halfword mem_start; +EXTERN halfword rover; /* NOTE: the following really also need to be dynamically allocated */ #ifdef DEBUG @@ -370,13 +368,13 @@ EXTERN char zzzac[mem_max - mem_bot + 1]; #endif -EXTERN halfword was_mem_end, was_lo_max, was_hi_min; -EXTERN bool panicking; +EXTERN halfword was_mem_end, was_lo_max, was_hi_min; +EXTERN bool panicking; #endif /* DEBUG */ -EXTERN integer font_in_short_display; -EXTERN integer depth_threshold; -EXTERN integer breadth_max; +EXTERN integer font_in_short_display; +EXTERN integer depth_threshold; +EXTERN integer breadth_max; /* EXTERN list_state_record nest[nest_size + 1]; */ /* EXTERN short shown_mode; */ /* EXTERN integer shown_mode; */ /* padded out */ @@ -387,7 +385,7 @@ EXTERN int old_setting; /* padded out */ /* 95/Jan/7 */ /* eqtn_extra is no longer used --- it should be 0 96/Jan/10 */ #ifdef INCREASEFONTS - #define eqtb_extra (font_max - 255 + hash_extra) + #define eqtb_extra (font_max - 255 + hash_extra) #else #define eqtb_extra 0 #endif @@ -403,9 +401,9 @@ EXTERN memory_word * zeqtb; /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */ #else #ifdef INCREASEFONTS -EXTERN memory_word eqtb[(hash_size + 4007) + eqtb_extra]; +EXTERN memory_word eqtb[(hash_size + 4007) + eqtb_extra]; #else -EXTERN memory_word zeqtb[(hash_size + 4007)]; +EXTERN memory_word zeqtb[(hash_size + 4007)]; #endif #endif @@ -420,30 +418,30 @@ EXTERN quarterword zzzad[844]; /* ??? attempt to fix 99/Jan/5 */ #ifdef ALLOCATEHASH #ifdef SHORTHASH -EXTERN htwohalves *zzzae; +EXTERN htwo_halves *zzzae; #else -EXTERN twohalves *zzzae; +EXTERN two_halves *zzzae; #endif #define hash (zzzae - 514) #else /* not allocating hash table */ /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */ #ifdef SHORTHASH -EXTERN htwohalves +EXTERN htwo_halves #else -EXTERN twohalves +EXTERN two_halves #endif #define hash (zzzae - 514) #ifdef INCREASEFONTS - zzzae[hash_size + 267 + eqtb_extra]; + zzzae[hash_size + 267 + eqtb_extra]; #else - zzzae[hash_size + 267]; + zzzae[hash_size + 267]; #endif #endif -EXTERN halfword hash_used; -EXTERN bool no_new_control_sequence; -EXTERN integer cs_count; +EXTERN halfword hash_used; +EXTERN bool no_new_control_sequence; +EXTERN integer cs_count; /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */ /* using allocated save stack slows it down 1% to 2% */ @@ -453,15 +451,15 @@ EXTERN integer cs_count; #define save_size 65536 /* arbitrary - ridiculously large */ #define initial_save_size 1000 #define increment_save_size 2000 - EXTERN memory_word *save_stack; + EXTERN memory_word *save_stack; #else #define save_size 8000 /* 1999/Jan/6 enough for even CRC */ /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */ - EXTERN memory_word save_stack[save_size + 1]; + EXTERN memory_word save_stack[save_size + 1]; #endif -EXTERN integer save_ptr; -EXTERN integer max_save_stack; +EXTERN integer save_ptr; +EXTERN integer max_save_stack; /* The following could really be char instead of quarterword ... */ /* EXTERN quarterword cur_level; */ @@ -472,8 +470,8 @@ EXTERN int cur_level; /* padded out */ /* 95/Jan/7 */ /* EXTERN integer cur_group; */ /* padded out */ EXTERN int cur_group; /* padded out */ /* 95/Jan/7 */ -EXTERN integer cur_boundary; -EXTERN integer mag_set; +EXTERN integer cur_boundary; +EXTERN integer mag_set; /* EXTERN eight_bits cur_cmd; */ /* EXTERN integer cur_cmd; */ /* padded out */ @@ -482,79 +480,79 @@ EXTERN int cur_cmd; /* padded out */ /* 95/Jan/7 */ /* EXTERN halfword cur_chr; */ /* itex, tex0, tex, tex3, tex5, tex6, tex7, tex8 */ EXTERN int cur_chr; /* 95/Jan/7 */ -EXTERN halfword cur_cs; -EXTERN halfword cur_tok; +EXTERN halfword cur_cs; +EXTERN halfword cur_tok; #ifdef ALLOCATENESTSTACK #define nest_size 65536 /* arbitrary - ridiculously large */ #define initial_nest_size 100 #define increment_nest_size 200 - EXTERN list_state_record * nest; + EXTERN list_state_record * nest; #else #define nest_size 200 /* 1999/Jan/7 */ - EXTERN list_state_record nest[nest_size + 1]; + EXTERN list_state_record nest[nest_size + 1]; #endif -EXTERN integer nest_ptr; -EXTERN integer max_nest_stack; -EXTERN list_state_record cur_list; +EXTERN integer nest_ptr; +EXTERN integer max_nest_stack; +EXTERN list_state_record cur_list; #ifdef ALLOCATEPARAMSTACK #define param_size 65536 /* arbitrary - ridiculously large */ #define initial_param_size 100 #define increment_param_size 200 - EXTERN halfword * param_stack; + EXTERN halfword * param_stack; #else #define param_size 500 /* 1997/Jan/17 */ -EXTERN halfword param_stack[param_size + 1]; +EXTERN halfword param_stack[param_size + 1]; #endif -EXTERN integer param_ptr; -EXTERN integer max_param_stack; +EXTERN integer param_ptr; +EXTERN integer max_param_stack; #ifdef ALLOCATEINPUTSTACK #define stack_size 65536 /* arbitrary - ridiculously large */ #define initial_stack_size 100 #define increment_stack_size 200 - EXTERN in_state_record * input_stack; + EXTERN in_state_record * input_stack; #else #define stack_size 800 - EXTERN in_state_record input_stack[stack_size + 1]; + EXTERN in_state_record input_stack[stack_size + 1]; #endif -EXTERN integer input_ptr; -EXTERN integer max_in_stack; +EXTERN integer input_ptr; +EXTERN integer max_in_stack; EXTERN integer high_in_open; /* 1997/Jan/17 */ -EXTERN in_state_record cur_input; +EXTERN in_state_record cur_input; /* EXTERN integer in_open; */ /* used in itex, tex2, texmf */ EXTERN int in_open; /* 95/Jan/7 */ EXTERN integer open_parens; -EXTERN integer max_open_parens; -EXTERN alpha_file input_file[max_in_open + 1]; -EXTERN integer line; -EXTERN integer line_stack[max_in_open + 1]; +EXTERN integer max_open_parens; +EXTERN alpha_file input_file[max_in_open + 1]; +EXTERN integer line; +EXTERN integer line_stack[max_in_open + 1]; /* EXTERN char scanner_status; */ /* EXTERN integer scanner_status; */ /* padded out */ EXTERN int scanner_status; /* padded out */ /* 95/Jan/7 */ -EXTERN halfword warning_index; -EXTERN halfword def_ref; +EXTERN halfword warning_index; +EXTERN halfword def_ref; -EXTERN integer align_state; -EXTERN integer base_ptr; -EXTERN halfword par_loc; -EXTERN halfword par_token; -EXTERN bool force_eof; +EXTERN integer align_state; +EXTERN integer base_ptr; +EXTERN halfword par_loc; +EXTERN halfword par_token; +EXTERN bool force_eof; /* EXTERN halfword cur_mark[5]; */ -EXTERN halfword cur_mark[6]; +EXTERN halfword cur_mark[6]; /* EXTERN char long_state; */ /* EXTERN integer long_state; */ /* padded out */ EXTERN int long_state; /* padded out */ /* 95/Jan/7 */ /* EXTERN halfword pstack[9]; */ -EXTERN halfword pstack[10]; +EXTERN halfword pstack[10]; /* EXTERN integer cur_val; */ EXTERN int cur_val; /* 95/Jan/7 */ @@ -575,7 +573,7 @@ EXTERN alpha_file read_file[16]; /* hard wired limit in TeX */ /* EXTERN char read_open[17]; */ EXTERN char read_open[20]; /* padded out */ -EXTERN halfword cond_ptr; +EXTERN halfword cond_ptr; /* EXTERN char if_limit; */ /* EXTERN integer if_limit; */ /* padded out */ @@ -585,22 +583,22 @@ EXTERN int if_limit; /* padded out */ /* 95/Jan/7 */ /* EXTERN integer cur_if; */ /* padded out */ EXTERN int cur_if; /* padded out */ /* 95/Jan/7 */ -EXTERN integer if_line; -EXTERN integer skip_line; -EXTERN str_number cur_name; -EXTERN str_number cur_area; -EXTERN str_number cur_ext; -EXTERN pool_pointer area_delimiter; -EXTERN pool_pointer ext_delimiter; -EXTERN integer format_default_length; -EXTERN char * TEX_format_default; -EXTERN bool name_in_progress; -EXTERN bool log_opened; +EXTERN integer if_line; +EXTERN integer skip_line; +EXTERN str_number cur_name; +EXTERN str_number cur_area; +EXTERN str_number cur_ext; +EXTERN pool_pointer area_delimiter; +EXTERN pool_pointer ext_delimiter; +EXTERN integer format_default_length; +EXTERN char * TEX_format_default; +EXTERN bool name_in_progress; +EXTERN bool log_opened; EXTERN bool quoted_file_name; -EXTERN str_number job_name; +EXTERN str_number job_name; EXTERN str_number output_file_name; // DVI file EXTERN str_number texmf_log_name; // LOG file -EXTERN byte_file dvi_file; +EXTERN byte_file dvi_file; EXTERN byte_file tfm_file; EXTERN byte_file pdf_file; EXTERN char * dvi_file_name; @@ -614,15 +612,15 @@ EXTERN char * log_file_name; #ifdef SHORTFONTINFO /* keep definition of fmemoryword in texmfmem.h */ -/* keep definition of ffourquarters in texfmem.h */ +/* keep definition of ffour_quarters in texfmem.h */ /* keep definition of fquarterword in texfmem.h */ #else /* go back to original definition as TeX memory word */ #undef fmemoryword #define fmemoryword memory_word -/* go back to original definition as fourquarters of a TeX word */ -#undef ffourquarters -#define ffourquarters fourquarters +/* go back to original definition as four_quarters of a TeX word */ +#undef ffour_quarters +#define ffour_quarters four_quarters /* go back to original definition as quaterword */ #undef fquarterword #define fquarterword quarterword @@ -630,92 +628,92 @@ EXTERN char * log_file_name; /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */ #ifdef ALLOCATEFONT - EXTERN fmemoryword * font_info; + EXTERN fmemoryword * font_info; /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */ #else /* EXTERN memory_word font_info[font_mem_size + 1]; */ - EXTERN fmemoryword font_info[font_mem_size + 1]; + EXTERN fmemoryword font_info[font_mem_size + 1]; #endif -EXTERN font_index fmem_ptr; +EXTERN font_index fmem_ptr; EXTERN internal_font_number font_ptr; EXTERN internal_font_number frozen_font_ptr; /* There are about 24 integer size items per font, or about 100 bytes */ -EXTERN ffourquarters font_check[font_max + 1]; +EXTERN ffour_quarters font_check[font_max + 1]; -EXTERN scaled font_size[font_max + 1]; -EXTERN scaled font_dsize[font_max + 1]; +EXTERN scaled font_size[font_max + 1]; +EXTERN scaled font_dsize[font_max + 1]; EXTERN font_index font_params[font_max + 1]; -EXTERN str_number font_name[font_max + 1]; -EXTERN str_number font_area[font_max + 1]; +EXTERN str_number font_name[font_max + 1]; +EXTERN str_number font_area[font_max + 1]; EXTERN eight_bits font_bc[font_max + 1]; EXTERN eight_bits font_ec[font_max + 1]; -EXTERN halfword font_glue[font_max + 1]; +EXTERN halfword font_glue[font_max + 1]; /* use char instead of bool to save space, but is it worth slow down ? */ -EXTERN bool font_used[font_max + 1]; +EXTERN bool font_used[font_max + 1]; /* might want to make some of following only one character wide also ? */ /* except some use -1 as special case value */ /* well, at least make them short instead of integer */ -EXTERN integer hyphen_char[font_max + 1]; -EXTERN integer skew_char[font_max + 1]; -EXTERN font_index bchar_label[font_max + 1]; +EXTERN integer hyphen_char[font_max + 1]; +EXTERN integer skew_char[font_max + 1]; +EXTERN font_index bchar_label[font_max + 1]; EXTERN short font_bchar[font_max + 1]; /* don't change above to int or format file will be incompatible */ EXTERN short font_false_bchar[font_max + 1]; /* don't change above to int or format file will be incompatible */ -EXTERN integer char_base[font_max + 1]; -EXTERN integer width_base[font_max + 1]; -EXTERN integer height_base[font_max + 1]; -EXTERN integer depth_base[font_max + 1]; -EXTERN integer italic_base[font_max + 1]; -EXTERN integer lig_kern_base[font_max + 1]; -EXTERN integer kern_base[font_max + 1]; -EXTERN integer exten_base[font_max + 1]; -EXTERN integer param_base[font_max + 1]; - -EXTERN ffourquarters null_character; - -EXTERN integer total_pages; -EXTERN scaled max_v; -EXTERN scaled max_h; -EXTERN integer max_push; -EXTERN integer last_bop; -EXTERN integer dead_cycles; -EXTERN bool doing_leaders; +EXTERN integer char_base[font_max + 1]; +EXTERN integer width_base[font_max + 1]; +EXTERN integer height_base[font_max + 1]; +EXTERN integer depth_base[font_max + 1]; +EXTERN integer italic_base[font_max + 1]; +EXTERN integer lig_kern_base[font_max + 1]; +EXTERN integer kern_base[font_max + 1]; +EXTERN integer exten_base[font_max + 1]; +EXTERN integer param_base[font_max + 1]; + +EXTERN ffour_quarters null_character; + +EXTERN integer total_pages; +EXTERN scaled max_v; +EXTERN scaled max_h; +EXTERN integer max_push; +EXTERN integer last_bop; +EXTERN integer dead_cycles; +EXTERN bool doing_leaders; /* EXTERN quarterword c, f; */ /* EXTERN integer c, f */; EXTERN int c, f; -EXTERN scaled rule_ht, rule_dp, rule_wd; -EXTERN halfword g; -EXTERN integer lq, lr; +EXTERN scaled rule_ht, rule_dp, rule_wd; +EXTERN halfword g; +EXTERN integer lq, lr; EXTERN eight_bits dvi_buf[dvi_buf_size + 4]; -EXTERN dvi_index half_buf; -EXTERN dvi_index dvi_limit; -EXTERN dvi_index dvi_ptr; +EXTERN dvi_index half_buf; +EXTERN dvi_index dvi_limit; +EXTERN dvi_index dvi_ptr; EXTERN integer dvi_offset; EXTERN integer pdf_offset; -EXTERN integer dvi_gone; -EXTERN halfword down_ptr, right_ptr; +EXTERN integer dvi_gone; +EXTERN halfword down_ptr, right_ptr; EXTERN scaled dvi_h, dvi_v; EXTERN scaled pdf_h, pdf_v; EXTERN scaled pdf_x, pdf_y; EXTERN scaled pdf_delta_h, pdf_delta_v; -EXTERN scaled cur_h, cur_v; -EXTERN internal_font_number dvi_f; +EXTERN scaled cur_h, cur_v; +EXTERN internal_font_number dvi_f; EXTERN internal_font_number pdf_f; EXTERN integer cur_s; /* sec 616 */ EXTERN scaled total_stretch[4], total_shrink[4]; /* padded already */ -EXTERN integer last_badness; -EXTERN halfword adjust_tail; -EXTERN integer pack_begin_line; -EXTERN twohalves empty_field; -EXTERN fourquarters null_delimiter; -EXTERN halfword cur_mlist; +EXTERN integer last_badness; +EXTERN halfword adjust_tail; +EXTERN integer pack_begin_line; +EXTERN two_halves empty_field; +EXTERN four_quarters null_delimiter; +EXTERN halfword cur_mlist; /* EXTERN small_number cur_style; */ /* EXTERN integer cur_style; */ /* padded out */ /* tex5.c, tex7.c */ @@ -725,15 +723,15 @@ EXTERN int cur_style; /* padded out */ /* 95/Jan/7 */ /* EXTERN integer cur_size; */ /* padded out */ EXTERN int cur_size; /* padded out */ /* 95/Jan/7 */ -EXTERN scaled cur_mu; -EXTERN bool mlist_penalties; -EXTERN internal_font_number cur_f; +EXTERN scaled cur_mu; +EXTERN bool mlist_penalties; +EXTERN internal_font_number cur_f; /* EXTERN quarterword cur_c; */ /* EXTERN integer cur_c; */ /* padded out */ EXTERN int cur_c; /* padded out */ /* 95/Jan/7 */ -EXTERN ffourquarters cur_i; +EXTERN ffour_quarters cur_i; EXTERN integer magic_offset; EXTERN halfword cur_align; EXTERN halfword cur_span; @@ -843,9 +841,9 @@ EXTERN integer op_start[256]; #else #define hyphen_prime 607 /* EXTERN str_number hyph_word[608]; */ - EXTERN str_number hyph_word[hyphen_prime + 1]; + EXTERN str_number hyph_word[hyphen_prime + 1]; /* EXTERN halfword hyph_list[608]; */ - EXTERN halfword hyph_list[hyphen_prime + 1]; + EXTERN halfword hyph_list[hyphen_prime + 1]; #endif /* EXTERN hyph_pointer hyph_count; */ @@ -855,14 +853,14 @@ EXTERN int hyph_count; /* padded out */ /* 95/Jan/7 */ #ifdef INITEX EXTERN integer trie_op_hash_C[trie_op_size - neg_trie_op_size + 1]; #define trie_op_hash (trie_op_hash_C - (int)(neg_trie_op_size)) -EXTERN trie_op_code trie_used[256]; +EXTERN trie_op_code trie_used[256]; EXTERN ASCII_code trie_op_lang[trie_op_size + 1]; /* already padded 751 + 1 */ -EXTERN trie_op_code trie_op_val[trie_op_size + 1]; -EXTERN integer trie_op_ptr; +EXTERN trie_op_code trie_op_val[trie_op_size + 1]; +EXTERN integer trie_op_ptr; #endif /* INITEX */ -EXTERN trie_op_code max_op_used; -EXTERN bool smallop; +EXTERN trie_op_code max_op_used; +EXTERN bool smallop; #ifdef INITEX #ifdef ALLOCATEINI @@ -872,29 +870,29 @@ EXTERN bool smallop; EXTERN trie_pointer *trie_r; /* right subtrie links */ EXTERN trie_pointer *trie_hash; /* used to identify equivlent subtries */ #else /* end ALLOCATEINI */ - EXTERN packed_ASCII_code trie_c[trie_size + 1]; - EXTERN trie_op_code trie_o[trie_size + 1]; - EXTERN trie_pointer trie_l[trie_size + 1]; - EXTERN trie_pointer trie_r[trie_size + 1]; - EXTERN trie_pointer trie_hash[trie_size + 1]; + EXTERN packed_ASCII_code trie_c[trie_size + 1]; + EXTERN trie_op_code trie_o[trie_size + 1]; + EXTERN trie_pointer trie_l[trie_size + 1]; + EXTERN trie_pointer trie_r[trie_size + 1]; + EXTERN trie_pointer trie_hash[trie_size + 1]; #endif /* end not ALLOCATEINI */ - EXTERN trie_pointer trie_ptr; + EXTERN trie_pointer trie_ptr; #endif /* INITEX */ #ifdef INITEX #ifdef ALLOCATEINI /* EXTERN bool *trie_taken; */ /* save (4 - 1) * trie_size = 90,000 byte */ - EXTERN char *trie_taken; + EXTERN char *trie_taken; #else - EXTERN bool trie_taken[trie_size + 1]; + EXTERN bool trie_taken[trie_size + 1]; #endif - EXTERN trie_pointer trie_min[256]; - EXTERN trie_pointer trie_max; - EXTERN bool trie_not_ready; + EXTERN trie_pointer trie_min[256]; + EXTERN trie_pointer trie_max; + EXTERN bool trie_not_ready; #endif /* INITEX */ -EXTERN scaled best_height_plus_depth; -EXTERN halfword page_tail; +EXTERN scaled best_height_plus_depth; +EXTERN halfword page_tail; /* EXTERN char page_contents; */ /* EXTERN integer page_contents; */ /* padded out */ @@ -951,42 +949,42 @@ EXTERN int page_contents; /* padded out */ /* 95/Jan/7 */ /* ********************************************************************* */ -EXTERN scaled page_max_depth; -EXTERN halfword best_page_break; -EXTERN integer least_page_cost; -EXTERN scaled best_size; -EXTERN scaled page_so_far[8]; -EXTERN halfword last_glue; -EXTERN integer last_penalty; -EXTERN scaled last_kern; -EXTERN integer insert_penalties; -EXTERN bool output_active; -EXTERN internal_font_number main_f; - -EXTERN ffourquarters main_i; -EXTERN ffourquarters main_j; - -EXTERN font_index main_k; -EXTERN halfword main_p; -EXTERN integer main_s; -EXTERN halfword bchar; -EXTERN halfword false_bchar; -EXTERN bool cancel_boundary; -EXTERN bool ins_disc; -EXTERN halfword cur_box; -EXTERN halfword after_token; -EXTERN bool long_help_seen; -EXTERN str_number format_ident; -EXTERN word_file fmt_file; -EXTERN integer ready_already; +EXTERN scaled page_max_depth; +EXTERN halfword best_page_break; +EXTERN integer least_page_cost; +EXTERN scaled best_size; +EXTERN scaled page_so_far[8]; +EXTERN halfword last_glue; +EXTERN integer last_penalty; +EXTERN scaled last_kern; +EXTERN integer insert_penalties; +EXTERN bool output_active; +EXTERN internal_font_number main_f; + +EXTERN ffour_quarters main_i; +EXTERN ffour_quarters main_j; + +EXTERN font_index main_k; +EXTERN halfword main_p; +EXTERN integer main_s; +EXTERN halfword bchar; +EXTERN halfword false_bchar; +EXTERN bool cancel_boundary; +EXTERN bool ins_disc; +EXTERN halfword cur_box; +EXTERN halfword after_token; +EXTERN bool long_help_seen; +EXTERN str_number format_ident; +EXTERN word_file fmt_file; +EXTERN integer ready_already; EXTERN alpha_file write_file[16]; /* hard wired limit in TeX */ -EXTERN bool write_open[18]; +EXTERN bool write_open[18]; -EXTERN halfword write_loc; -EXTERN pool_pointer edit_name_start; +EXTERN halfword write_loc; +EXTERN pool_pointer edit_name_start; /* EXTERN integer edit_name_length, edit_line, tfm_temp; */ -EXTERN integer edit_name_length, edit_line; +EXTERN integer edit_name_length, edit_line; /* EXTERN integer tfm_temp; */ /* only used in tex3.c */ EXTERN int tfm_temp; /* only used in tex3.c 95/Jan/7 */ @@ -1027,10 +1025,6 @@ EXTERN int new_hyphen_prime; EXTERN int missing_characters; EXTERN int show_in_hex; EXTERN int show_in_dos; -EXTERN int test_dir_access; -EXTERN int dir_method; -EXTERN int file_method; -/* EXTERN int waitflush; */ EXTERN int show_fmt_flag; EXTERN int show_tfm_flag; EXTERN bool show_texinput_flag; /* 1998/Jan/28 */ @@ -1047,82 +1041,80 @@ EXTERN char * format_name; EXTERN char * encoding_name; EXTERN bool format_specific; EXTERN bool encoding_specific; -EXTERN bool show_line_break_stats; /* 1996/Feb/9 */ -EXTERN int first_pass_count; /* 1996/Feb/9 */ -EXTERN int second_pass_count; /* 1996/Feb/9 */ -EXTERN int final_pass_count; /* 1996/Feb/9 */ -EXTERN int underfull_hbox; /* 1996/Feb/9 */ -EXTERN int overfull_hbox; /* 1996/Feb/9 */ -EXTERN int underfull_vbox; /* 1996/Feb/9 */ -EXTERN int overfull_vbox; /* 1996/Feb/9 */ -EXTERN int paragraph_failed; /* 1996/Feb/9 */ -EXTERN int single_line; /* 1996/Feb/15 */ +EXTERN bool show_line_break_stats; +EXTERN int first_pass_count; +EXTERN int second_pass_count; +EXTERN int final_pass_count; +EXTERN int underfull_hbox; +EXTERN int overfull_hbox; +EXTERN int underfull_vbox; +EXTERN int overfull_vbox; +EXTERN int paragraph_failed; +EXTERN int single_line; EXTERN FILE * errout; -EXTERN int font_dimen_zero; /* 1998/Oct/5 */ -EXTERN int ignore_frozen; /* 1998/Oct/5 */ -EXTERN bool suppress_f_ligs; /* 1999/Jan/5 */ -EXTERN int abort_flag; // not yet hooked up ??? -EXTERN int err_level; // not yet hooked up ??? -EXTERN int jump_used; /* 1999/Nov/28 */ -EXTERN jmp_buf jumpbuffer; /* 1999/Nov/7 */ -extern int current_pool_size; /* in local.c - bkph */ -extern int current_max_strings; /* in local.c - bkph */ -extern int current_mem_size; /* in local.c - bkph */ -extern int current_font_mem_size; /* in local.c - bkph */ -extern int current_save_size; /* in local.c - bkph */ -extern int current_stack_size; /* in local.c - bkph */ -extern int current_nest_size; /* in local.c - bkph */ -extern int current_param_size; /* in local.c - bkph */ -extern int current_buf_size; /* in local.c - bkph */ -extern char *tex_version; /* in local.c - bkph */ -extern char *application; /* in local.c - bkph */ -extern char *yandyversion; /* in local.c - bkph */ -extern unsigned char wintodos[128]; /* in local.c - bkph */ -extern char log_line[MAXLINE]; /* in local.c */ -extern char *texpath; /* in local.c */ - -memory_word * allocate_main_memory (int); /* in local.c - bkph */ -memory_word * realloc_main (int, int); /* in local.c - bkph */ -packed_ASCII_code * realloc_str_pool (int); /* in local.c - bkph */ -pool_pointer * realloc_str_start (int); /* in local.c - bkph */ -memory_word * realloc_save_stack (int); /* in local.c - bkph */ -list_state_record * realloc_nest_stack (int); /* in local.c - bkph */ -in_state_record * realloc_input_stack (int); /* in local.c - bkph */ -halfword * realloc_param_stack (int); /* in local.c - bkph */ -ASCII_code * realloc_buffer (int); /* in local.c - bkph */ -fmemoryword * realloc_font_info (int); /* in local.c - bkph */ - -int realloc_hyphen (int); /* in local.c - bkph */ -int allocate_tries (int); /* in local.c - bkph */ -void check_eqtb (char *); /* in local.c - bkph */ -void probe_memory (void); /* 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 */ -void stamp_it (char *); /* in local.c - bkph */ -void stampcopy (char *); /* in local.c - bkph */ -bool prime (int); /* in local.c - bkph */ -int endit (int); /* in local.c - bkph */ - -void uexit (int unix_code); /* in lib/uexit.c - bkph */ -void t_open_in (void); /* in lib/texmf.c - bkph */ +EXTERN int font_dimen_zero; +EXTERN int ignore_frozen; +EXTERN bool suppress_f_ligs; +EXTERN int abort_flag; +EXTERN int err_level; +EXTERN int jump_used; +EXTERN jmp_buf jumpbuffer; +extern int current_pool_size; +extern int current_max_strings; +extern int current_mem_size; +extern int current_font_mem_size; +extern int current_save_size; +extern int current_stack_size; +extern int current_nest_size; +extern int current_param_size; +extern int current_buf_size; +extern char *tex_version; +extern char *application; +extern char *yandyversion; +extern unsigned char wintodos[128]; +extern char log_line[MAXLINE]; +extern char *texpath; + +memory_word * allocate_main_memory (int); +memory_word * realloc_main (int, int); +packed_ASCII_code * realloc_str_pool (int); +pool_pointer * realloc_str_start (int); +memory_word * realloc_save_stack (int); +list_state_record * realloc_nest_stack (int); +in_state_record * realloc_input_stack (int); +halfword * realloc_param_stack (int); +ASCII_code * realloc_buffer (int); +fmemoryword * realloc_font_info (int); + +int realloc_hyphen (int); +int allocate_tries (int); +void check_eqtb (char *); +void probe_memory (void); +void print_cs_names (FILE *, int); +void perrormod(char *); +char *grabenv(char *); +void stamp_it (char *); +void stampcopy (char *); +bool prime (int); +int endit (int); + +void uexit (int unix_code); +void t_open_in (void); void call_edit (ASCII_code *filename, pool_pointer fnstart, - integer fnlength, integer linenumber); /* from lib/texmf.c - bkph */ + integer fnlength, integer linenumber); -void add_variable_space(int); /* in itex.c - bkph */ +void add_variable_space(int); void get_date_and_time (integer *minutes, integer *day, - integer *month, integer *year); /* in lib/texmf.c - bkph */ + integer *month, integer *year); -char *unixify (char *); /* in pathsrch.c bkph */ +char *unixify (char *); /****************************************************************************/ - #include "coerce.h" #include "yandy_macros.h" - /****************************************************************************/ /* sec 79 */ extern void synch_h(void); @@ -1153,13 +1145,11 @@ extern int load_pool_strings (integer spare_size); #define help6(...) tex_help(6, __VA_ARGS__) /********BINDING WITH LIBHARU*********/ - EXTERN HPDF_Doc yandy_pdf; EXTERN HPDF_Page yandy_page; EXTERN HPDF_Font yandy_font[1024]; EXTERN bool pdf_doing_string; EXTERN bool pdf_doing_text; -//EXTERN integer ten_pow[10]; EXTERN integer scaled_out; EXTERN bool pdf_output_flag; EXTERN void pdf_ship_out(pointer p); @@ -1168,4 +1158,4 @@ EXTERN void pdf_hlist_out (void); EXTERN void pdf_begin_text(void); EXTERN void pdf_font_def(internal_font_number f); EXTERN void pdf_error_handler (HPDF_STATUS error_no, HPDF_STATUS detail_no, void * user_data); -/********BINDING WITH LIBHARU*********/ \ No newline at end of file +/********BINDING WITH LIBHARU*********/ diff --git a/src/texsourc/texmfmem.h b/src/texsourc/texmfmem.h index fb72064..d367305 100644 --- a/src/texsourc/texmfmem.h +++ b/src/texsourc/texmfmem.h @@ -22,42 +22,59 @@ that the (un)dumping routines do suffices to put things in the right place in memory. - A memory_word can be broken up into a `twohalves' or a - `fourquarters', and a `twohalves' can be further broken up. Here is + A memory_word can be broken up into a `two_halves' or a + `four_quarters', and a `two_halves' can be further broken up. Here is a picture. ..._M = most significant byte, ..._L = least significant byte. If BigEndian: - twohalves.v: RH_M RH_L LH_M LH_L - twohalves.u: JNK1 JNK2 B0 B1 - fourquarters: B0 B1 B2 B3 + two_halves.v: RH_M RH_L LH_M LH_L + two_halves.u: JNK1 JNK2 B0 B1 + four_quarters: B0 B1 B2 B3 If LittleEndian: - twohalves.v: LH_L LH_M RH_L RH_M - twohalves.u: B1 B0 JNK1 JNK2 - fourquarters: B3 B2 B1 B0 + two_halves.v: LH_L LH_M RH_L RH_M + two_halves.u: B1 B0 JNK1 JNK2 + four_quarters: B3 B2 B1 B0 The halfword fields are four bytes if we are building a TeX or MF; this leads to further complications: BigEndian: - twohalves.v: RH_MM RH_ML RH_LM RH_LL LH_MM LH_ML LH_LM LH_LL - twohalves.u: ---------JUNK---------- B0 B1 - fourquarters: B0 B1 B2 B3 + two_halves.v: RH_MM RH_ML RH_LM RH_LL LH_MM LH_ML LH_LM LH_LL + two_halves.u: ---------JUNK---------- B0 B1 + four_quarters: B0 B1 B2 B3 LittleEndian: - twohalves.v: LH_LL LH_LM LH_ML LH_MM RH_LL RH_LM RH_ML RH_MM - twohalves.u: junkx junky B1 B0 - fourquarters: ---------JUNK---------- B3 B2 B1 B0 + two_halves.v: LH_LL LH_LM LH_ML LH_MM RH_LL RH_LM RH_ML RH_MM + two_halves.u: junkx junky B1 B0 + four_quarters: ---------JUNK---------- B3 B2 B1 B0 I guess TeX and Metafont never refer to the B1 and B0 in the - fourquarters structure as the B1 and B0 in the twohalves.u structure. + four_quarters structure as the B1 and B0 in the two_halves.u structure. This file can't be part of texmf.h, because texmf.h gets included by {tex,mf}d.h before the `halfword' etc. types are defined. So we include it from the change file instead. */ +/* + meaning structure @TeX @draft + ---------------------------------------------------------------------- + integer | int || 4: long | 8: long long | min_quarterword 0 + ---------------------------------------------------------------------- max_quarterword FFFF + scaled | sc || 4: long | 8: long long | min_halfword + ---------------------------------------------------------------------- + glue_ratio | gr || 4: float | 8: double | + ---------------------------------------------------------------------- + halfword | lh | rh || 2: unsigned short | 4: unsigned long | + ---------------------------------------------------------------------- + half+quarter | b0 | b1 | rh || | + ---------------------------------------------------------------------- + quarter | b0 | b1 | b2 | b3 || 1: unsigned char | 2: unsigned short | + ---------------------------------------------------------------------- +*/ + typedef union { struct @@ -84,7 +101,7 @@ typedef union quarterword B1, B0; #endif /* not WORDS_BIGENDIAN */ } u; -} twohalves; +} two_halves; /* new in Y&Y TeX 1.3 1996/Jan/18 used for hash [...] if SHORTHASH defined */ typedef struct { @@ -96,7 +113,7 @@ typedef struct { quarterword LH, RH; #endif } v; -} htwohalves; +} htwo_halves; typedef struct { @@ -108,20 +125,20 @@ typedef struct quarterword B3, B2, B1, B0; #endif } u; -} fourquarters; +} four_quarters; typedef union { #ifdef TeX glue_ratio gr; - twohalves hh; + two_halves hh; #else - twohalves hhfield; + two_halves hhfield; #endif #ifdef WORDS_BIGENDIAN integer cint; - fourquarters qqqq; + four_quarters qqqq; #else /* not WORDS_BIGENDIAN */ struct { @@ -136,7 +153,7 @@ typedef union #if defined (TeX) && !defined (SMALLTeX) || !defined (TeX) && !defined (SMALLMF) halfword junk; #endif /* big TeX or big MF */ - fourquarters QQQQ; + four_quarters QQQQ; } v; #endif /* not WORDS_BIGENDIAN */ } memory_word; @@ -153,14 +170,14 @@ typedef struct unsigned char B3, B2, B1, B0; #endif } u; -} ffourquarters; /* was fourunsignedchars; */ +} ffour_quarters; /* was fourunsignedchars; */ #define fquarterword unsigned char typedef union { integer cint; - ffourquarters qqqq; + ffour_quarters qqqq; } fmemoryword; /* To keep the original structure accesses working, we must go through @@ -170,9 +187,6 @@ typedef union #define b2 u.B2 #define b3 u.B3 -#define rh v.RH -#define lhfield v.LH - #ifndef WORDS_BIGENDIAN #define cint u.CINT #define qqqq v.QQQQ -- 2.11.0