summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Build/source/texk/web2c/hitexdir/hiformat.hntbin1105224 -> 966205 bytes
-rw-r--r--Build/source/texk/web2c/hitexdir/hiformat.pdfbin1220482 -> 1922833 bytes
-rw-r--r--Build/source/texk/web2c/hitexdir/hiformat.w37
-rw-r--r--Build/source/texk/web2c/hitexdir/hilexer.c796
-rw-r--r--Build/source/texk/web2c/hitexdir/hintview/src/Makefile33
-rw-r--r--Build/source/texk/web2c/hitexdir/hintview/src/basetypes.h4
-rw-r--r--Build/source/texk/web2c/hitexdir/hintview/src/format.h44
-rw-r--r--Build/source/texk/web2c/hitexdir/hintview/src/get.c91
-rw-r--r--Build/source/texk/web2c/hitexdir/hintview/src/get.h16
-rw-r--r--Build/source/texk/web2c/hitexdir/hintview/src/main.c27
-rw-r--r--Build/source/texk/web2c/hitexdir/hintview/src/main.h27
-rw-r--r--Build/source/texk/web2c/hitexdir/hintview/src/renderOGL.c29
-rw-r--r--Build/source/texk/web2c/hitexdir/hiparser.c152
-rw-r--r--Build/source/texk/web2c/hitexdir/hiparser.h2
-rw-r--r--Build/source/texk/web2c/hitexdir/hitex.w1058
15 files changed, 1280 insertions, 1036 deletions
diff --git a/Build/source/texk/web2c/hitexdir/hiformat.hnt b/Build/source/texk/web2c/hitexdir/hiformat.hnt
index 8c82960265c..cdd45e13a0e 100644
--- a/Build/source/texk/web2c/hitexdir/hiformat.hnt
+++ b/Build/source/texk/web2c/hitexdir/hiformat.hnt
Binary files differ
diff --git a/Build/source/texk/web2c/hitexdir/hiformat.pdf b/Build/source/texk/web2c/hitexdir/hiformat.pdf
index 08b1cadf39d..13f4e9a75b4 100644
--- a/Build/source/texk/web2c/hitexdir/hiformat.pdf
+++ b/Build/source/texk/web2c/hitexdir/hiformat.pdf
Binary files differ
diff --git a/Build/source/texk/web2c/hitexdir/hiformat.w b/Build/source/texk/web2c/hitexdir/hiformat.w
index f9bafd457f0..b0324de1f57 100644
--- a/Build/source/texk/web2c/hitexdir/hiformat.w
+++ b/Build/source/texk/web2c/hitexdir/hiformat.w
@@ -47,9 +47,9 @@
\def\setrevision$#1: #2 ${\gdef\lastrevision{#2}}
-\setrevision$Revision: 2636 $
+\setrevision$Revision: 2655 $
\def\setdate$#1(#2) ${\gdef\lastdate{#2}}
-\setdate$Date: 2022-01-07 16:10:00 +0100 (Fri, 07 Jan 2022) $
+\setdate$Date: 2022-01-24 09:01:21 +0100 (Mon, 24 Jan 2022) $
\null
@@ -6242,8 +6242,6 @@ remainder of the banner is simply ignored but may be used to contain
other useful information about the file. The maximum size of the
banner is 256 byte.
@<hint macros@>=
-#define HINT_VERSION 1
-#define HINT_SUB_VERSION 3
#define MAX_BANNER 256
@
@@ -6253,19 +6251,19 @@ it returns |true| if successful.
@<common variables@>=
char hbanner[MAX_BANNER+1];
+int hbanner_size=0;
@
@<function to check the banner@>=
bool hcheck_banner(char *magic)
-{ int hbanner_size=0;
+{
int v;
char *t;
t=hbanner;
if (strncmp(magic,hbanner,4)!=0)
{ MESSAGE("This is not a %s file\n",magic); return false; }
else t+=4;
- hbanner_size=(int)strnlen(hbanner,MAX_BANNER);
if(hbanner[hbanner_size-1]!='\n')
{ MESSAGE("Banner exceeds maximum size=0x%x\n",MAX_BANNER); return false; }
if (*t!=' ')
@@ -6297,24 +6295,27 @@ Checking the banner is a separate step.
\getcode
@<get file functions@>=
void hget_banner(void)
-{ int i;
- for (i=0;i<MAX_BANNER && hpos<hend;i++)@/
- { hbanner[i]=HGET8;
- if (hbanner[i]=='\n') break;
- }
- hbanner[++i]=0;
+{ hbanner_size=0;
+ while (hbanner_size<MAX_BANNER && hpos<hend)
+ { uint8_t c=HGET8;
+ hbanner[hbanner_size++]=c;
+ if (c=='\n') break;
+ }
+ hbanner[hbanner_size]=0;
}
@
To read a long format file, we use the function |fgetc|.
\readcode
@<read the banner@>=
-{ int i,c;
- for (i=0;i<MAX_BANNER && (c=fgetc(hin))!=EOF;i++)@/
- { hbanner[i]=c;
- if (hbanner[i]=='\n') break;
+{ hbanner_size=0;
+ while ( hbanner_size<MAX_BANNER)
+ { int c=fgetc(hin);
+ if (c==EOF) break;
+ hbanner[hbanner_size++]=c;
+ if (c=='\n') break;
}
- hbanner[++i]=0;
+ hbanner[hbanner_size]=0;
}
@
@@ -9991,6 +9992,8 @@ typedef double float64_t;
#if __SIZEOF_DOUBLE__!=8
#error @=float64 type must have size 8@>
#endif
+#define HINT_VERSION 1
+#define HINT_SUB_VERSION 3
#endif
@
diff --git a/Build/source/texk/web2c/hitexdir/hilexer.c b/Build/source/texk/web2c/hitexdir/hilexer.c
index 9f8efcbd42a..0ae187127ea 100644
--- a/Build/source/texk/web2c/hitexdir/hilexer.c
+++ b/Build/source/texk/web2c/hitexdir/hilexer.c
@@ -1,12 +1,13 @@
-#line 1 "lexer.c"
+#line 2 "lexer.c"
-#line 3 "lexer.c"
+#line 4 "lexer.c"
#define YY_INT_ALIGNED short int
/* A lexical scanner generated by flex */
/* %not-for-header */
+
/* %if-c-only */
/* %if-not-reentrant */
@@ -16,8 +17,8 @@
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
-#define YY_FLEX_MINOR_VERSION 6
-#define YY_FLEX_SUBMINOR_VERSION 4
+#define YY_FLEX_MINOR_VERSION 5
+#define YY_FLEX_SUBMINOR_VERSION 37
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
@@ -26,7 +27,7 @@
/* %endif */
/* %if-c-only */
-
+
/* %endif */
/* %if-c-only */
@@ -108,39 +109,50 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
-#ifndef SIZE_MAX
-#define SIZE_MAX (~(size_t)0)
-#endif
-
#endif /* ! C99 */
#endif /* ! FLEXINT_H */
/* %endif */
-/* begin standard C++ headers. */
/* %if-c++-only */
/* %endif */
-/* TODO: this is always defined, so inline it */
-#define yyconst const
+#ifdef __cplusplus
+
+/* The "const" storage-class-modifier is valid. */
+#define YY_USE_CONST
-#if defined(__GNUC__) && __GNUC__ >= 3
-#define yynoreturn __attribute__((__noreturn__))
+#else /* ! __cplusplus */
+
+/* C99 requires __STDC__ to be defined as 1. */
+#if defined (__STDC__)
+
+#define YY_USE_CONST
+
+#endif /* defined (__STDC__) */
+#endif /* ! __cplusplus */
+
+#ifdef YY_USE_CONST
+#define yyconst const
#else
-#define yynoreturn
+#define yyconst
#endif
/* %not-for-header */
+
/* Returned upon end-of-file. */
#define YY_NULL 0
/* %ok-for-header */
/* %not-for-header */
-/* Promotes a possibly negative, possibly signed char to an
- * integer in range [0..255] for use as an array index.
+
+/* Promotes a possibly negative, possibly signed char to an unsigned
+ * integer for use as an array index. If the signed char is negative,
+ * we want to instead treat it as an 8-bit unsigned char, hence the
+ * double cast.
*/
-#define YY_SC_TO_UI(c) ((YY_CHAR) (c))
+#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
/* %ok-for-header */
/* %if-reentrant */
@@ -155,29 +167,25 @@ typedef unsigned int flex_uint32_t;
* definition of BEGIN.
*/
#define BEGIN (yy_start) = 1 + 2 *
+
/* Translate the current start state into a value that can be later handed
* to BEGIN to return to the state. The YYSTATE alias is for lex
* compatibility.
*/
#define YY_START (((yy_start) - 1) / 2)
#define YYSTATE YY_START
+
/* Action number for EOF rule of a given start state. */
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
+
/* Special action meaning "start processing a new file". */
-#define YY_NEW_FILE yyrestart( yyin )
+#define YY_NEW_FILE yyrestart(yyin )
+
#define YY_END_OF_BUFFER_CHAR 0
/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
-#ifdef __ia64__
-/* On IA-64, the buffer size is 16k, not 8k.
- * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
- * Ditto for the __ia64__ case accordingly.
- */
-#define YY_BUF_SIZE 32768
-#else
#define YY_BUF_SIZE 16384
-#endif /* __ia64__ */
#endif
/* The state buf must be large enough to hold one state per character in the main buffer.
@@ -195,7 +203,7 @@ typedef size_t yy_size_t;
#endif
/* %if-not-reentrant */
-extern int yyleng;
+extern yy_size_t yyleng;
/* %endif */
/* %if-c-only */
@@ -207,10 +215,10 @@ extern FILE *yyin, *yyout;
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
-
+
/* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
* access to the local variable yy_act. Since yyless() is a macro, it would break
- * existing scanners that call yyless() from OUTSIDE yylex.
+ * existing scanners that call yyless() from OUTSIDE yylex.
* One obvious solution it to make yy_act a global. I tried that, and saw
* a 5% performance hit in a non-yylineno scanner, because yy_act is
* normally declared as a register variable-- so it is not worth it.
@@ -222,13 +230,6 @@ extern FILE *yyin, *yyout;
if ( yytext[yyl] == '\n' )\
--yylineno;\
}while(0)
- #define YY_LINENO_REWIND_TO(dst) \
- do {\
- const char *p;\
- for ( p = yy_cp-1; p >= (dst); --p)\
- if ( *p == '\n' )\
- --yylineno;\
- }while(0)
/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
@@ -243,6 +244,7 @@ extern FILE *yyin, *yyout;
YY_DO_BEFORE_ACTION; /* set up yytext again */ \
} \
while ( 0 )
+
#define unput(c) yyunput( c, (yytext_ptr) )
#ifndef YY_STRUCT_YY_BUFFER_STATE
@@ -262,12 +264,12 @@ struct yy_buffer_state
/* Size of input buffer in bytes, not including room for EOB
* characters.
*/
- int yy_buf_size;
+ yy_size_t yy_buf_size;
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
- int yy_n_chars;
+ yy_size_t yy_n_chars;
/* Whether we "own" the buffer - i.e., we know we created it,
* and can realloc() it to grow it, and should free() it to
@@ -290,7 +292,7 @@ struct yy_buffer_state
int yy_bs_lineno; /**< The line count. */
int yy_bs_column; /**< The column count. */
-
+
/* Whether to try to fill the input buffer when we reach the
* end of it.
*/
@@ -317,12 +319,13 @@ struct yy_buffer_state
/* %if-c-only Standard (non-C++) definition */
/* %not-for-header */
+
/* %if-not-reentrant */
/* Stack of input buffers. */
static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
-static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
+static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
/* %endif */
/* %ok-for-header */
@@ -337,6 +340,7 @@ static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
? (yy_buffer_stack)[(yy_buffer_stack_top)] \
: NULL)
+
/* Same as previous macro, but useful when we know that the buffer stack is not
* NULL or when we need an lvalue. For internal use only.
*/
@@ -346,13 +350,14 @@ static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
/* %if-not-reentrant */
/* %not-for-header */
+
/* yy_hold_char holds the character lost when yytext is formed. */
static char yy_hold_char;
-static int yy_n_chars; /* number of characters read into yy_ch_buf */
-int yyleng;
+static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */
+yy_size_t yyleng;
/* Points to current character in buffer. */
-static char *yy_c_buf_p = NULL;
+static char *yy_c_buf_p = (char *) 0;
static int yy_init = 0; /* whether we need to initialize */
static int yy_start = 0; /* start state number */
@@ -364,77 +369,78 @@ static int yy_did_buffer_switch_on_eof;
/* %endif */
-void yyrestart ( FILE *input_file );
-void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer );
-YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size );
-void yy_delete_buffer ( YY_BUFFER_STATE b );
-void yy_flush_buffer ( YY_BUFFER_STATE b );
-void yypush_buffer_state ( YY_BUFFER_STATE new_buffer );
-void yypop_buffer_state ( void );
+void yyrestart (FILE *input_file );
+void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
+YY_BUFFER_STATE yy_create_buffer (FILE *file,int size );
+void yy_delete_buffer (YY_BUFFER_STATE b );
+void yy_flush_buffer (YY_BUFFER_STATE b );
+void yypush_buffer_state (YY_BUFFER_STATE new_buffer );
+void yypop_buffer_state (void );
+
+static void yyensure_buffer_stack (void );
+static void yy_load_buffer_state (void );
+static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file );
-static void yyensure_buffer_stack ( void );
-static void yy_load_buffer_state ( void );
-static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file );
-#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )
+#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
-YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size );
-YY_BUFFER_STATE yy_scan_string ( const char *yy_str );
-YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len );
+YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size );
+YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str );
+YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len );
/* %endif */
-void *yyalloc ( yy_size_t );
-void *yyrealloc ( void *, yy_size_t );
-void yyfree ( void * );
+void *yyalloc (yy_size_t );
+void *yyrealloc (void *,yy_size_t );
+void yyfree (void * );
#define yy_new_buffer yy_create_buffer
+
#define yy_set_interactive(is_interactive) \
{ \
if ( ! YY_CURRENT_BUFFER ){ \
yyensure_buffer_stack (); \
YY_CURRENT_BUFFER_LVALUE = \
- yy_create_buffer( yyin, YY_BUF_SIZE ); \
+ yy_create_buffer(yyin,YY_BUF_SIZE ); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
}
+
#define yy_set_bol(at_bol) \
{ \
if ( ! YY_CURRENT_BUFFER ){\
yyensure_buffer_stack (); \
YY_CURRENT_BUFFER_LVALUE = \
- yy_create_buffer( yyin, YY_BUF_SIZE ); \
+ yy_create_buffer(yyin,YY_BUF_SIZE ); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
}
+
#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
/* %% [1.0] yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here */
/* Begin user sect3 */
#define FLEX_DEBUG
-typedef flex_uint8_t YY_CHAR;
-FILE *yyin = NULL, *yyout = NULL;
+typedef unsigned char YY_CHAR;
+
+FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
typedef int yy_state_type;
extern int yylineno;
+
int yylineno = 1;
extern char *yytext;
-#ifdef yytext_ptr
-#undef yytext_ptr
-#endif
#define yytext_ptr yytext
-/* %% [1.5] DFA */
-
/* %if-c-only Standard (non-C++) definition */
-static yy_state_type yy_get_previous_state ( void );
-static yy_state_type yy_try_NUL_trans ( yy_state_type current_state );
-static int yy_get_next_buffer ( void );
-static void yynoreturn yy_fatal_error ( const char* msg );
+static yy_state_type yy_get_previous_state (void );
+static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
+static int yy_get_next_buffer (void );
+static void yy_fatal_error (yyconst char msg[] );
/* %endif */
@@ -444,11 +450,12 @@ static void yynoreturn yy_fatal_error ( const char* msg );
#define YY_DO_BEFORE_ACTION \
(yytext_ptr) = yy_bp; \
/* %% [2.0] code to fiddle yytext and yyleng for yymore() goes here \ */\
- yyleng = (int) (yy_cp - yy_bp); \
+ yyleng = (size_t) (yy_cp - yy_bp); \
(yy_hold_char) = *yy_cp; \
*yy_cp = '\0'; \
/* %% [3.0] code to copy yytext_ptr to yytext[] goes here, if %array \ */\
(yy_c_buf_p) = yy_cp;
+
/* %% [4.0] data tables for the DFA and the user's section 1 definitions go here */
#define YY_NUM_RULES 126
#define YY_END_OF_BUFFER 127
@@ -459,7 +466,7 @@ struct yy_trans_info
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
-static const flex_int16_t yy_accept[371] =
+static yyconst flex_int16_t yy_accept[371] =
{ 0,
0, 0, 0, 0, 0, 0, 127, 125, 6, 6,
43, 47, 10, 125, 114, 125, 4, 4, 1, 2,
@@ -503,7 +510,7 @@ static const flex_int16_t yy_accept[371] =
92, 124, 124, 38, 93, 124, 117, 124, 119, 0
} ;
-static const YY_CHAR yy_ec[256] =
+static yyconst flex_int32_t yy_ec[256] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
4, 4, 2, 1, 1, 1, 1, 1, 1, 1,
@@ -535,7 +542,7 @@ static const YY_CHAR yy_ec[256] =
65, 65, 65, 65, 65
} ;
-static const YY_CHAR yy_meta[66] =
+static yyconst flex_int32_t yy_meta[66] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -546,7 +553,7 @@ static const YY_CHAR yy_meta[66] =
4, 1, 1, 1, 4
} ;
-static const flex_int16_t yy_base[376] =
+static yyconst flex_int16_t yy_base[376] =
{ 0,
0, 0, 65, 130, 194, 258, 629, 630, 630, 630,
630, 630, 74, 68, 64, 68, 77, 72, 630, 630,
@@ -591,7 +598,7 @@ static const flex_int16_t yy_base[376] =
503, 507, 511, 514, 70
} ;
-static const flex_int16_t yy_def[376] =
+static yyconst flex_int16_t yy_def[376] =
{ 0,
370, 1, 371, 371, 372, 372, 370, 370, 370, 370,
370, 370, 373, 374, 370, 370, 370, 370, 370, 370,
@@ -636,7 +643,7 @@ static const flex_int16_t yy_def[376] =
370, 370, 370, 370, 370
} ;
-static const flex_int16_t yy_nxt[696] =
+static yyconst flex_int16_t yy_nxt[696] =
{ 0,
8, 9, 10, 9, 9, 11, 12, 8, 13, 14,
8, 15, 16, 16, 8, 17, 18, 18, 19, 20,
@@ -717,7 +724,7 @@ static const flex_int16_t yy_nxt[696] =
} ;
-static const flex_int16_t yy_chk[696] =
+static yyconst flex_int16_t yy_chk[696] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -799,7 +806,7 @@ static const flex_int16_t yy_chk[696] =
} ;
/* Table of booleans, true if rule could match eol. */
-static const flex_int32_t yy_rule_can_match_eol[127] =
+static yyconst flex_int32_t yy_rule_can_match_eol[127] =
{ 0,
0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -815,22 +822,22 @@ static char *yy_last_accepting_cpos;
extern int yy_flex_debug;
int yy_flex_debug = 1;
-static const flex_int16_t yy_rule_linenum[126] =
+static yyconst flex_int16_t yy_rule_linenum[126] =
{ 0,
- 171, 172, 173, 174, 175, 176, 177, 179, 181, 183,
- 185, 186, 187, 188, 189, 194, 195, 196, 197, 198,
- 199, 200, 201, 203, 205, 207, 208, 209, 210, 212,
- 213, 214, 216, 217, 218, 220, 221, 223, 225, 226,
- 227, 229, 230, 232, 233, 234, 236, 239, 241, 242,
- 244, 245, 246, 247, 248, 249, 250, 252, 253, 255,
- 257, 258, 259, 260, 261, 262, 263, 264, 265, 268,
- 270, 271, 272, 274, 275, 276, 277, 280, 281, 282,
- 284, 285, 286, 287, 288, 289, 290, 292, 293, 294,
- 295, 297, 299, 301, 303, 305, 307, 308, 310, 312,
-
- 313, 314, 315, 317, 319, 320, 321, 323, 325, 327,
- 328, 329, 330, 331, 333, 335, 337, 338, 340, 342,
- 344, 346, 348, 350, 351
+ 170, 171, 172, 173, 174, 175, 176, 178, 180, 182,
+ 184, 185, 186, 187, 188, 193, 194, 195, 196, 197,
+ 198, 199, 200, 202, 204, 206, 207, 208, 209, 211,
+ 212, 213, 215, 216, 217, 219, 220, 222, 224, 225,
+ 226, 228, 229, 231, 232, 233, 235, 238, 240, 241,
+ 243, 244, 245, 246, 247, 248, 249, 251, 252, 254,
+ 256, 257, 258, 259, 260, 261, 262, 263, 264, 267,
+ 269, 270, 271, 273, 274, 275, 276, 279, 280, 281,
+ 283, 284, 285, 286, 287, 288, 289, 291, 292, 293,
+ 294, 296, 298, 300, 302, 304, 306, 307, 309, 311,
+
+ 312, 313, 314, 316, 318, 319, 320, 322, 324, 326,
+ 327, 328, 329, 330, 332, 334, 336, 337, 339, 341,
+ 343, 345, 347, 349, 350
} ;
/* The intent behind this definition is that it'll catch
@@ -842,9 +849,9 @@ static const flex_int16_t yy_rule_linenum[126] =
#define YY_RESTORE_YY_MORE_OFFSET
char *yytext;
#line 1 "lexer.l"
-#line 2 "lexer.l"
- /*511:*/
- #line 10272 "format.w"
+/*511:*/
+#line 3 "lexer.l"
+ #line 10275 "format.w"
#include "hibasetypes.h"
#include "hierror.h"
@@ -980,27 +987,25 @@ float64_t xtof(char*x)
}
/*:61*/
int yywrap(void){
- #line 10283 "format.w"
+ #line 10286 "format.w"
return 1;}
#ifdef _MSC_VER
#pragma warning( disable : 4267)
#endif
-#line 989 "lexer.c"
#define YY_NO_UNISTD_H 1
#define YY_NO_INPUT 1
-#line 152 "lexer.l"
- /*23:*/
- /*:23*/ /*32:*/
+/*23:*/
+/*:23*/ /*32:*/
- /*:32*/ /*39:*/
- /*:39*/ /*41:*/
- /*:41*/ /*43:*/
- /*:43*/ /*45:*/
- /*:45*/ /*149:*/
+/*:32*/ /*39:*/
+/*:39*/ /*41:*/
+/*:41*/ /*43:*/
+/*:43*/ /*45:*/
+/*:45*/ /*149:*/
- /*:149*/
-#line 1003 "lexer.c"
+/*:149*/
+#line 1009 "lexer.c"
#define INITIAL 0
#define STR 1
@@ -1026,7 +1031,7 @@ int yywrap(void){
/* %if-reentrant */
/* %if-c-only */
-static int yy_init_globals ( void );
+static int yy_init_globals (void );
/* %endif */
/* %if-reentrant */
@@ -1036,31 +1041,31 @@ static int yy_init_globals ( void );
/* Accessor methods to globals.
These are made visible to non-reentrant scanners for convenience. */
-int yylex_destroy ( void );
+int yylex_destroy (void );
-int yyget_debug ( void );
+int yyget_debug (void );
-void yyset_debug ( int debug_flag );
+void yyset_debug (int debug_flag );
-YY_EXTRA_TYPE yyget_extra ( void );
+YY_EXTRA_TYPE yyget_extra (void );
-void yyset_extra ( YY_EXTRA_TYPE user_defined );
+void yyset_extra (YY_EXTRA_TYPE user_defined );
-FILE *yyget_in ( void );
+FILE *yyget_in (void );
-void yyset_in ( FILE * _in_str );
+void yyset_in (FILE * in_str );
-FILE *yyget_out ( void );
+FILE *yyget_out (void );
-void yyset_out ( FILE * _out_str );
+void yyset_out (FILE * out_str );
- int yyget_leng ( void );
+yy_size_t yyget_leng (void );
-char *yyget_text ( void );
+char *yyget_text (void );
-int yyget_lineno ( void );
+int yyget_lineno (void );
-void yyset_lineno ( int _line_number );
+void yyset_lineno (int line_number );
/* %if-bison-bridge */
/* %endif */
@@ -1071,35 +1076,34 @@ void yyset_lineno ( int _line_number );
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
-extern "C" int yywrap ( void );
+extern "C" int yywrap (void );
#else
-extern int yywrap ( void );
+extern int yywrap (void );
#endif
#endif
/* %not-for-header */
-#ifndef YY_NO_UNPUT
-
-#endif
+
/* %ok-for-header */
/* %endif */
#ifndef yytext_ptr
-static void yy_flex_strncpy ( char *, const char *, int );
+static void yy_flex_strncpy (char *,yyconst char *,int );
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen ( const char * );
+static int yy_flex_strlen (yyconst char * );
#endif
#ifndef YY_NO_INPUT
/* %if-c-only Standard (non-C++) definition */
/* %not-for-header */
+
#ifdef __cplusplus
-static int yyinput ( void );
+static int yyinput (void );
#else
-static int input ( void );
+static int input (void );
#endif
/* %ok-for-header */
@@ -1112,20 +1116,15 @@ static int input ( void );
static int yy_start_stack_depth = 0;
static int *yy_start_stack = NULL;
- static void yy_push_state ( int _new_state );
+ static void yy_push_state (int new_state );
- static void yy_pop_state ( void );
+ static void yy_pop_state (void );
/* %endif */
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
-#ifdef __ia64__
-/* On IA-64, the buffer size is 16k, not 8k */
-#define YY_READ_BUF_SIZE 16384
-#else
#define YY_READ_BUF_SIZE 8192
-#endif /* __ia64__ */
#endif
/* Copy whatever the last rule matched to the standard output. */
@@ -1134,7 +1133,7 @@ static int input ( void );
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
-#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
+#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
/* %endif */
/* %if-c++-only C++ definition */
/* %endif */
@@ -1149,7 +1148,7 @@ static int input ( void );
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- int n; \
+ size_t n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
@@ -1162,7 +1161,7 @@ static int input ( void );
else \
{ \
errno=0; \
- while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
+ while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
{ \
if( errno != EINTR) \
{ \
@@ -1203,9 +1202,11 @@ static int input ( void );
/* %if-tables-serialization structures and prototypes */
/* %not-for-header */
+
/* %ok-for-header */
/* %not-for-header */
+
/* %tables-yydmap generated elements */
/* %endif */
/* end tables serialization structures and prototypes */
@@ -1236,7 +1237,7 @@ extern int yylex (void);
/* Code executed at the end of each rule. */
#ifndef YY_BREAK
-#define YY_BREAK /*LINTED*/break;
+#define YY_BREAK break;
#endif
/* %% [6.0] YY_RULE_SETUP definition goes here */
@@ -1244,14 +1245,22 @@ extern int yylex (void);
YY_USER_ACTION
/* %not-for-header */
+
/** The main scanner function which does all the work.
*/
YY_DECL
{
- yy_state_type yy_current_state;
- char *yy_cp, *yy_bp;
- int yy_act;
+ register yy_state_type yy_current_state;
+ register char *yy_cp, *yy_bp;
+ register int yy_act;
+/* %% [7.0] user's declarations go here */
+#line 167 "lexer.l"
+
+
+ /*3:*/
+#line 1263 "lexer.c"
+
if ( !(yy_init) )
{
(yy_init) = 1;
@@ -1280,21 +1289,13 @@ YY_DECL
if ( ! YY_CURRENT_BUFFER ) {
yyensure_buffer_stack ();
YY_CURRENT_BUFFER_LVALUE =
- yy_create_buffer( yyin, YY_BUF_SIZE );
+ yy_create_buffer(yyin,YY_BUF_SIZE );
}
- yy_load_buffer_state( );
+ yy_load_buffer_state( );
}
- {
-/* %% [7.0] user's declarations go here */
-#line 168 "lexer.l"
-
-
- /*3:*/
-#line 1295 "lexer.c"
-
- while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
+ while ( 1 ) /* loops until end-of-file is reached */
{
/* %% [8.0] yymore()-related code goes here */
yy_cp = (yy_c_buf_p);
@@ -1312,7 +1313,7 @@ YY_DECL
yy_match:
do
{
- YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
+ register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
if ( yy_accept[yy_current_state] )
{
(yy_last_accepting_state) = yy_current_state;
@@ -1322,9 +1323,9 @@ yy_match:
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 371 )
- yy_c = yy_meta[yy_c];
+ yy_c = yy_meta[(unsigned int) yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
++yy_cp;
}
while ( yy_current_state != 370 );
@@ -1344,7 +1345,7 @@ yy_find_action:
int yyl;
for ( yyl = 0; yyl < yyleng; ++yyl )
if ( yytext[yyl] == '\n' )
-
+
yylineno++;
;
}
@@ -1380,686 +1381,686 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
YY_RULE_SETUP
-#line 171 "lexer.l"
+#line 170 "lexer.l"
SCAN_START;return START;
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 172 "lexer.l"
+#line 171 "lexer.l"
SCAN_END;return END;
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 173 "lexer.l"
+#line 172 "lexer.l"
return GLYPH;
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 174 "lexer.l"
+#line 173 "lexer.l"
SCAN_UDEC(yytext);return UNSIGNED;
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 175 "lexer.l"
+#line 174 "lexer.l"
SCAN_UDEC(yytext+1);return REFERENCE;
YY_BREAK
case 6:
/* rule 6 can match eol */
YY_RULE_SETUP
-#line 176 "lexer.l"
+#line 175 "lexer.l"
;
YY_BREAK
case 7:
/* rule 7 can match eol */
YY_RULE_SETUP
-#line 177 "lexer.l"
+#line 176 "lexer.l"
;
YY_BREAK
/*:3*/ /*24:*/
case 8:
YY_RULE_SETUP
-#line 179 "lexer.l"
+#line 178 "lexer.l"
SCAN_HEX(yytext+2);return UNSIGNED;
YY_BREAK
/*:24*/ /*27:*/
case 9:
YY_RULE_SETUP
-#line 181 "lexer.l"
+#line 180 "lexer.l"
SCAN_DEC(yytext);return SIGNED;
YY_BREAK
/*:27*/ /*34:*/
case 10:
YY_RULE_SETUP
-#line 183 "lexer.l"
+#line 182 "lexer.l"
STR_START;BEGIN(STR);
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 185 "lexer.l"
+#line 184 "lexer.l"
STR_END;SCAN_STR;BEGIN(INITIAL);return STRING;
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 186 "lexer.l"
+#line 185 "lexer.l"
STR_ADD('\'');
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 187 "lexer.l"
+#line 186 "lexer.l"
STR_ADD(yytext[0]);
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 188 "lexer.l"
+#line 187 "lexer.l"
RNG("String character",yytext[0],0x20,0x7E);
YY_BREAK
case 15:
/* rule 15 can match eol */
YY_RULE_SETUP
-#line 189 "lexer.l"
+#line 188 "lexer.l"
QUIT("Unterminated String in line %d",yylineno);
YY_BREAK
/*:34*/ /*48:*/
case 16:
YY_RULE_SETUP
-#line 194 "lexer.l"
+#line 193 "lexer.l"
STR_START;STR_PUT('\'');BEGIN(STR);
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 195 "lexer.l"
+#line 194 "lexer.l"
SCAN_UTF8_1(yytext+1);return CHARCODE;
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 196 "lexer.l"
+#line 195 "lexer.l"
STR_START;STR_PUT(yytext[1]);STR_PUT('\'');BEGIN(STR);
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 197 "lexer.l"
+#line 196 "lexer.l"
STR_START;STR_PUT('\'');STR_PUT('\'');BEGIN(STR);
YY_BREAK
case 20:
/* rule 20 can match eol */
YY_RULE_SETUP
-#line 198 "lexer.l"
+#line 197 "lexer.l"
SCAN_UTF8_1(yytext+1);return CHARCODE;
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 199 "lexer.l"
+#line 198 "lexer.l"
SCAN_UTF8_2(yytext+1);return CHARCODE;
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 200 "lexer.l"
+#line 199 "lexer.l"
SCAN_UTF8_3(yytext+1);return CHARCODE;
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 201 "lexer.l"
+#line 200 "lexer.l"
SCAN_UTF8_4(yytext+1);return CHARCODE;
YY_BREAK
/*:48*/ /*55:*/
case 24:
YY_RULE_SETUP
-#line 203 "lexer.l"
+#line 202 "lexer.l"
SCAN_DECFLOAT;return FPNUM;
YY_BREAK
/*:55*/ /*59:*/
case 25:
YY_RULE_SETUP
-#line 205 "lexer.l"
+#line 204 "lexer.l"
SCAN_HEXFLOAT;return FPNUM;
YY_BREAK
/*:59*/ /*80:*/
case 26:
YY_RULE_SETUP
-#line 207 "lexer.l"
+#line 206 "lexer.l"
return DIMEN;
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 208 "lexer.l"
+#line 207 "lexer.l"
return PT;
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 209 "lexer.l"
+#line 208 "lexer.l"
return MM;
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 210 "lexer.l"
+#line 209 "lexer.l"
return INCH;
YY_BREAK
/*:80*/ /*88:*/
case 30:
YY_RULE_SETUP
-#line 212 "lexer.l"
+#line 211 "lexer.l"
return XDIMEN;
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 213 "lexer.l"
+#line 212 "lexer.l"
return H;
YY_BREAK
case 32:
YY_RULE_SETUP
-#line 214 "lexer.l"
+#line 213 "lexer.l"
return V;
YY_BREAK
/*:88*/ /*99:*/
case 33:
YY_RULE_SETUP
-#line 216 "lexer.l"
+#line 215 "lexer.l"
return FIL;
YY_BREAK
case 34:
YY_RULE_SETUP
-#line 217 "lexer.l"
+#line 216 "lexer.l"
return FILL;
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 218 "lexer.l"
+#line 217 "lexer.l"
return FILLL;
YY_BREAK
/*:99*/ /*103:*/
case 36:
YY_RULE_SETUP
-#line 220 "lexer.l"
+#line 219 "lexer.l"
return PENALTY;
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 221 "lexer.l"
+#line 220 "lexer.l"
return INTEGER;
YY_BREAK
/*:103*/ /*109:*/
case 38:
YY_RULE_SETUP
-#line 223 "lexer.l"
+#line 222 "lexer.l"
return LANGUAGE;
YY_BREAK
/*:109*/ /*115:*/
case 39:
YY_RULE_SETUP
-#line 225 "lexer.l"
+#line 224 "lexer.l"
return RULE;
YY_BREAK
case 40:
YY_RULE_SETUP
-#line 226 "lexer.l"
+#line 225 "lexer.l"
return RUNNING;
YY_BREAK
case 41:
YY_RULE_SETUP
-#line 227 "lexer.l"
+#line 226 "lexer.l"
return RUNNING;
YY_BREAK
/*:115*/ /*124:*/
case 42:
YY_RULE_SETUP
-#line 229 "lexer.l"
+#line 228 "lexer.l"
return KERN;
YY_BREAK
case 43:
YY_RULE_SETUP
-#line 230 "lexer.l"
+#line 229 "lexer.l"
return EXPLICIT;
YY_BREAK
/*:124*/ /*133:*/
case 44:
YY_RULE_SETUP
-#line 232 "lexer.l"
+#line 231 "lexer.l"
return GLUE;
YY_BREAK
case 45:
YY_RULE_SETUP
-#line 233 "lexer.l"
+#line 232 "lexer.l"
return PLUS;
YY_BREAK
case 46:
YY_RULE_SETUP
-#line 234 "lexer.l"
+#line 233 "lexer.l"
return MINUS;
YY_BREAK
/*:133*/ /*151:*/
case 47:
YY_RULE_SETUP
-#line 236 "lexer.l"
+#line 235 "lexer.l"
SCAN_TXT_START;return TXT_START;
YY_BREAK
case 48:
YY_RULE_SETUP
-#line 239 "lexer.l"
+#line 238 "lexer.l"
SCAN_TXT_END;return TXT_END;
YY_BREAK
case 49:
YY_RULE_SETUP
-#line 241 "lexer.l"
+#line 240 "lexer.l"
SCAN_START;return START;
YY_BREAK
case 50:
YY_RULE_SETUP
-#line 242 "lexer.l"
+#line 241 "lexer.l"
QUIT("> not allowed in text mode");
YY_BREAK
case 51:
YY_RULE_SETUP
-#line 244 "lexer.l"
+#line 243 "lexer.l"
yylval.u= '\\';return TXT_CC;
YY_BREAK
case 52:
YY_RULE_SETUP
-#line 245 "lexer.l"
+#line 244 "lexer.l"
yylval.u= '"';return TXT_CC;
YY_BREAK
case 53:
YY_RULE_SETUP
-#line 246 "lexer.l"
+#line 245 "lexer.l"
yylval.u= '<';return TXT_CC;
YY_BREAK
case 54:
YY_RULE_SETUP
-#line 247 "lexer.l"
+#line 246 "lexer.l"
yylval.u= '>';return TXT_CC;
YY_BREAK
case 55:
YY_RULE_SETUP
-#line 248 "lexer.l"
+#line 247 "lexer.l"
yylval.u= ' ';return TXT_CC;
YY_BREAK
case 56:
YY_RULE_SETUP
-#line 249 "lexer.l"
+#line 248 "lexer.l"
yylval.u= '-';return TXT_CC;
YY_BREAK
case 57:
YY_RULE_SETUP
-#line 250 "lexer.l"
+#line 249 "lexer.l"
return TXT_IGNORE;
YY_BREAK
case 58:
/* rule 58 can match eol */
YY_RULE_SETUP
-#line 252 "lexer.l"
+#line 251 "lexer.l"
return TXT_FONT_GLUE;
YY_BREAK
case 59:
/* rule 59 can match eol */
YY_RULE_SETUP
-#line 253 "lexer.l"
+#line 252 "lexer.l"
;
YY_BREAK
case 60:
YY_RULE_SETUP
-#line 255 "lexer.l"
+#line 254 "lexer.l"
yylval.u= yytext[1]-'0';return TXT_FONT;
YY_BREAK
case 61:
YY_RULE_SETUP
-#line 257 "lexer.l"
+#line 256 "lexer.l"
SCAN_REF(font_kind);return TXT_GLOBAL;
YY_BREAK
case 62:
YY_RULE_SETUP
-#line 258 "lexer.l"
+#line 257 "lexer.l"
SCAN_REF(penalty_kind);return TXT_GLOBAL;
YY_BREAK
case 63:
YY_RULE_SETUP
-#line 259 "lexer.l"
+#line 258 "lexer.l"
SCAN_REF(kern_kind);return TXT_GLOBAL;
YY_BREAK
case 64:
YY_RULE_SETUP
-#line 260 "lexer.l"
+#line 259 "lexer.l"
SCAN_REF(ligature_kind);return TXT_GLOBAL;
YY_BREAK
case 65:
YY_RULE_SETUP
-#line 261 "lexer.l"
+#line 260 "lexer.l"
SCAN_REF(disc_kind);return TXT_GLOBAL;
YY_BREAK
case 66:
YY_RULE_SETUP
-#line 262 "lexer.l"
+#line 261 "lexer.l"
SCAN_REF(glue_kind);return TXT_GLOBAL;
YY_BREAK
case 67:
YY_RULE_SETUP
-#line 263 "lexer.l"
+#line 262 "lexer.l"
SCAN_REF(language_kind);return TXT_GLOBAL;
YY_BREAK
case 68:
YY_RULE_SETUP
-#line 264 "lexer.l"
+#line 263 "lexer.l"
SCAN_REF(rule_kind);return TXT_GLOBAL;
YY_BREAK
case 69:
YY_RULE_SETUP
-#line 265 "lexer.l"
+#line 264 "lexer.l"
SCAN_REF(image_kind);return TXT_GLOBAL;
YY_BREAK
case 70:
YY_RULE_SETUP
-#line 268 "lexer.l"
+#line 267 "lexer.l"
SCAN_UDEC(yytext+2);return TXT_CC;
YY_BREAK
case 71:
YY_RULE_SETUP
-#line 270 "lexer.l"
+#line 269 "lexer.l"
yylval.u= yytext[1]-'a';return TXT_LOCAL;
YY_BREAK
case 72:
YY_RULE_SETUP
-#line 271 "lexer.l"
+#line 270 "lexer.l"
return TXT_FONT_GLUE;
YY_BREAK
case 73:
YY_RULE_SETUP
-#line 272 "lexer.l"
+#line 271 "lexer.l"
return TXT_FONT_HYPHEN;
YY_BREAK
case 74:
/* rule 74 can match eol */
YY_RULE_SETUP
-#line 274 "lexer.l"
+#line 273 "lexer.l"
SCAN_UTF8_1(yytext);return TXT_CC;
YY_BREAK
case 75:
YY_RULE_SETUP
-#line 275 "lexer.l"
+#line 274 "lexer.l"
SCAN_UTF8_2(yytext);return TXT_CC;
YY_BREAK
case 76:
YY_RULE_SETUP
-#line 276 "lexer.l"
+#line 275 "lexer.l"
SCAN_UTF8_3(yytext);return TXT_CC;
YY_BREAK
case 77:
YY_RULE_SETUP
-#line 277 "lexer.l"
+#line 276 "lexer.l"
SCAN_UTF8_4(yytext);return TXT_CC;
YY_BREAK
/*:151*/ /*162:*/
case 78:
YY_RULE_SETUP
-#line 280 "lexer.l"
+#line 279 "lexer.l"
return HBOX;
YY_BREAK
case 79:
YY_RULE_SETUP
-#line 281 "lexer.l"
+#line 280 "lexer.l"
return VBOX;
YY_BREAK
case 80:
YY_RULE_SETUP
-#line 282 "lexer.l"
+#line 281 "lexer.l"
return SHIFTED;
YY_BREAK
/*:162*/ /*170:*/
case 81:
YY_RULE_SETUP
-#line 284 "lexer.l"
+#line 283 "lexer.l"
return HPACK;
YY_BREAK
case 82:
YY_RULE_SETUP
-#line 285 "lexer.l"
+#line 284 "lexer.l"
return HSET;
YY_BREAK
case 83:
YY_RULE_SETUP
-#line 286 "lexer.l"
+#line 285 "lexer.l"
return VPACK;
YY_BREAK
case 84:
YY_RULE_SETUP
-#line 287 "lexer.l"
+#line 286 "lexer.l"
return VSET;
YY_BREAK
case 85:
YY_RULE_SETUP
-#line 288 "lexer.l"
+#line 287 "lexer.l"
return ADD;
YY_BREAK
case 86:
YY_RULE_SETUP
-#line 289 "lexer.l"
+#line 288 "lexer.l"
return TO;
YY_BREAK
case 87:
YY_RULE_SETUP
-#line 290 "lexer.l"
+#line 289 "lexer.l"
return DEPTH;
YY_BREAK
/*:170*/ /*175:*/
case 88:
YY_RULE_SETUP
-#line 292 "lexer.l"
+#line 291 "lexer.l"
return LEADERS;
YY_BREAK
case 89:
YY_RULE_SETUP
-#line 293 "lexer.l"
+#line 292 "lexer.l"
return ALIGN;
YY_BREAK
case 90:
YY_RULE_SETUP
-#line 294 "lexer.l"
+#line 293 "lexer.l"
return CENTER;
YY_BREAK
case 91:
YY_RULE_SETUP
-#line 295 "lexer.l"
+#line 294 "lexer.l"
return EXPAND;
YY_BREAK
/*:175*/ /*182:*/
case 92:
YY_RULE_SETUP
-#line 297 "lexer.l"
+#line 296 "lexer.l"
return BASELINE;
YY_BREAK
/*:182*/ /*189:*/
case 93:
YY_RULE_SETUP
-#line 299 "lexer.l"
+#line 298 "lexer.l"
return LIGATURE;
YY_BREAK
/*:189*/ /*197:*/
case 94:
YY_RULE_SETUP
-#line 301 "lexer.l"
+#line 300 "lexer.l"
return DISC;
YY_BREAK
/*:197*/ /*205:*/
case 95:
YY_RULE_SETUP
-#line 303 "lexer.l"
+#line 302 "lexer.l"
return PAR;
YY_BREAK
/*:205*/ /*210:*/
case 96:
YY_RULE_SETUP
-#line 305 "lexer.l"
+#line 304 "lexer.l"
return MATH;
YY_BREAK
/*:210*/ /*215:*/
case 97:
YY_RULE_SETUP
-#line 307 "lexer.l"
+#line 306 "lexer.l"
return ON;
YY_BREAK
case 98:
YY_RULE_SETUP
-#line 308 "lexer.l"
+#line 307 "lexer.l"
return OFF;
YY_BREAK
/*:215*/ /*219:*/
case 99:
YY_RULE_SETUP
-#line 310 "lexer.l"
+#line 309 "lexer.l"
return ADJUST;
YY_BREAK
/*:219*/ /*223:*/
case 100:
YY_RULE_SETUP
-#line 312 "lexer.l"
+#line 311 "lexer.l"
return TABLE;
YY_BREAK
case 101:
YY_RULE_SETUP
-#line 313 "lexer.l"
+#line 312 "lexer.l"
return ITEM;
YY_BREAK
case 102:
YY_RULE_SETUP
-#line 314 "lexer.l"
+#line 313 "lexer.l"
return ITEM;
YY_BREAK
case 103:
YY_RULE_SETUP
-#line 315 "lexer.l"
+#line 314 "lexer.l"
return ITEM;
YY_BREAK
/*:223*/ /*230:*/
case 104:
YY_RULE_SETUP
-#line 317 "lexer.l"
+#line 316 "lexer.l"
return IMAGE;
YY_BREAK
/*:230*/ /*247:*/
case 105:
YY_RULE_SETUP
-#line 319 "lexer.l"
+#line 318 "lexer.l"
return LABEL;
YY_BREAK
case 106:
YY_RULE_SETUP
-#line 320 "lexer.l"
+#line 319 "lexer.l"
return BOT;
YY_BREAK
case 107:
YY_RULE_SETUP
-#line 321 "lexer.l"
+#line 320 "lexer.l"
return MID;
YY_BREAK
/*:247*/ /*261:*/
case 108:
YY_RULE_SETUP
-#line 323 "lexer.l"
+#line 322 "lexer.l"
return LINK;
YY_BREAK
/*:261*/ /*271:*/
case 109:
YY_RULE_SETUP
-#line 325 "lexer.l"
+#line 324 "lexer.l"
return OUTLINE;
YY_BREAK
/*:271*/ /*278:*/
case 110:
YY_RULE_SETUP
-#line 327 "lexer.l"
+#line 326 "lexer.l"
if(section_no==1)return STREAMDEF;else return STREAM;
YY_BREAK
case 111:
YY_RULE_SETUP
-#line 328 "lexer.l"
+#line 327 "lexer.l"
return FIRST;
YY_BREAK
case 112:
YY_RULE_SETUP
-#line 329 "lexer.l"
+#line 328 "lexer.l"
return LAST;
YY_BREAK
case 113:
YY_RULE_SETUP
-#line 330 "lexer.l"
+#line 329 "lexer.l"
return TOP;
YY_BREAK
case 114:
YY_RULE_SETUP
-#line 331 "lexer.l"
+#line 330 "lexer.l"
return NOREFERENCE;
YY_BREAK
/*:278*/ /*288:*/
case 115:
YY_RULE_SETUP
-#line 333 "lexer.l"
+#line 332 "lexer.l"
return PAGE;
YY_BREAK
/*:288*/ /*296:*/
case 116:
YY_RULE_SETUP
-#line 335 "lexer.l"
+#line 334 "lexer.l"
return RANGE;
YY_BREAK
/*:296*/ /*323:*/
case 117:
YY_RULE_SETUP
-#line 337 "lexer.l"
+#line 336 "lexer.l"
return DIRECTORY;
YY_BREAK
case 118:
YY_RULE_SETUP
-#line 338 "lexer.l"
+#line 337 "lexer.l"
return SECTION;
YY_BREAK
/*:323*/ /*344:*/
case 119:
YY_RULE_SETUP
-#line 340 "lexer.l"
+#line 339 "lexer.l"
return DEFINITIONS;
YY_BREAK
/*:344*/ /*352:*/
case 120:
YY_RULE_SETUP
-#line 342 "lexer.l"
+#line 341 "lexer.l"
return MAX;
YY_BREAK
/*:352*/ /*367:*/
case 121:
YY_RULE_SETUP
-#line 344 "lexer.l"
+#line 343 "lexer.l"
return PARAM;
YY_BREAK
/*:367*/ /*376:*/
case 122:
YY_RULE_SETUP
-#line 346 "lexer.l"
+#line 345 "lexer.l"
return FONT;
YY_BREAK
/*:376*/ /*404:*/
case 123:
YY_RULE_SETUP
-#line 348 "lexer.l"
+#line 347 "lexer.l"
return CONTENT;
YY_BREAK
/*:404*/
case 124:
YY_RULE_SETUP
-#line 350 "lexer.l"
+#line 349 "lexer.l"
QUIT("Unexpected keyword '%s' in line %d",yytext,yylineno);
YY_BREAK
case 125:
YY_RULE_SETUP
-#line 351 "lexer.l"
+#line 350 "lexer.l"
QUIT("Unexpected character '%c' (0x%02X) in line %d",yytext[0]>' '?yytext[0]:' ',yytext[0],yylineno);
YY_BREAK
case 126:
YY_RULE_SETUP
-#line 353 "lexer.l"
+#line 352 "lexer.l"
ECHO;
YY_BREAK
-#line 2062 "lexer.c"
+#line 2064 "lexer.c"
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(STR):
case YY_STATE_EOF(TXT):
@@ -2086,11 +2087,7 @@ case YY_STATE_EOF(TXT):
* back-up) that will match for the new input source.
*/
(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
-/* %if-c-only */
YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
-/* %endif */
-/* %if-c++-only */
-/* %endif */
YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
}
@@ -2145,7 +2142,7 @@ case YY_STATE_EOF(TXT):
{
(yy_did_buffer_switch_on_eof) = 0;
- if ( yywrap( ) )
+ if ( yywrap( ) )
{
/* Note: because we've taken care in
* yy_get_next_buffer() to have set up
@@ -2198,12 +2195,12 @@ case YY_STATE_EOF(TXT):
"fatal flex scanner internal error--no action found" );
} /* end of action switch */
} /* end of scanning one token */
- } /* end of user's declarations */
} /* end of yylex */
/* %ok-for-header */
/* %if-c++-only */
/* %not-for-header */
+
/* %ok-for-header */
/* %endif */
@@ -2221,9 +2218,9 @@ static int yy_get_next_buffer (void)
/* %if-c++-only */
/* %endif */
{
- char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
- char *source = (yytext_ptr);
- int number_to_move, i;
+ register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
+ register char *source = (yytext_ptr);
+ register int number_to_move, i;
int ret_val;
if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
@@ -2252,7 +2249,7 @@ static int yy_get_next_buffer (void)
/* Try to read more data. */
/* First move last chars to start of buffer. */
- number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
+ number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
for ( i = 0; i < number_to_move; ++i )
*(dest++) = *(source++);
@@ -2265,7 +2262,7 @@ static int yy_get_next_buffer (void)
else
{
- int num_to_read =
+ yy_size_t num_to_read =
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
@@ -2279,7 +2276,7 @@ static int yy_get_next_buffer (void)
if ( b->yy_is_our_buffer )
{
- int new_size = b->yy_buf_size * 2;
+ yy_size_t new_size = b->yy_buf_size * 2;
if ( new_size <= 0 )
b->yy_buf_size += b->yy_buf_size / 8;
@@ -2288,12 +2285,11 @@ static int yy_get_next_buffer (void)
b->yy_ch_buf = (char *)
/* Include room in for 2 EOB chars. */
- yyrealloc( (void *) b->yy_ch_buf,
- (yy_size_t) (b->yy_buf_size + 2) );
+ yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
}
else
/* Can't grow it, we don't own it. */
- b->yy_ch_buf = NULL;
+ b->yy_ch_buf = 0;
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR(
@@ -2321,7 +2317,7 @@ static int yy_get_next_buffer (void)
if ( number_to_move == YY_MORE_ADJ )
{
ret_val = EOB_ACT_END_OF_FILE;
- yyrestart( yyin );
+ yyrestart(yyin );
}
else
@@ -2335,15 +2331,12 @@ static int yy_get_next_buffer (void)
else
ret_val = EOB_ACT_CONTINUE_SCAN;
- if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
+ if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
/* Extend the array by 50%, plus the number we really need. */
- int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
- YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
- (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size );
+ yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
- /* "- 2" to take care of EOB's */
- YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
}
(yy_n_chars) += number_to_move;
@@ -2359,13 +2352,14 @@ static int yy_get_next_buffer (void)
/* %if-c-only */
/* %not-for-header */
+
static yy_state_type yy_get_previous_state (void)
/* %endif */
/* %if-c++-only */
/* %endif */
{
- yy_state_type yy_current_state;
- char *yy_cp;
+ register yy_state_type yy_current_state;
+ register char *yy_cp;
/* %% [15.0] code to get the start state into yy_current_state goes here */
yy_current_state = (yy_start);
@@ -2373,7 +2367,7 @@ static int yy_get_next_buffer (void)
for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
{
/* %% [16.0] code to find the next state goes here */
- YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
+ register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
if ( yy_accept[yy_current_state] )
{
(yy_last_accepting_state) = yy_current_state;
@@ -2383,9 +2377,9 @@ static int yy_get_next_buffer (void)
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 371 )
- yy_c = yy_meta[yy_c];
+ yy_c = yy_meta[(unsigned int) yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
}
return yy_current_state;
@@ -2402,11 +2396,11 @@ static int yy_get_next_buffer (void)
/* %if-c++-only */
/* %endif */
{
- int yy_is_jam;
+ register int yy_is_jam;
/* %% [17.0] code to find the next state, and perhaps do backing up, goes here */
- char *yy_cp = (yy_c_buf_p);
+ register char *yy_cp = (yy_c_buf_p);
- YY_CHAR yy_c = 1;
+ register YY_CHAR yy_c = 1;
if ( yy_accept[yy_current_state] )
{
(yy_last_accepting_state) = yy_current_state;
@@ -2416,19 +2410,17 @@ static int yy_get_next_buffer (void)
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 371 )
- yy_c = yy_meta[yy_c];
+ yy_c = yy_meta[(unsigned int) yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
yy_is_jam = (yy_current_state == 370);
return yy_is_jam ? 0 : yy_current_state;
}
-#ifndef YY_NO_UNPUT
/* %if-c-only */
/* %endif */
-#endif
/* %if-c-only */
#ifndef YY_NO_INPUT
@@ -2458,7 +2450,7 @@ static int yy_get_next_buffer (void)
else
{ /* need more input */
- int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
+ yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
++(yy_c_buf_p);
switch ( yy_get_next_buffer( ) )
@@ -2475,14 +2467,14 @@ static int yy_get_next_buffer (void)
*/
/* Reset buffer status. */
- yyrestart( yyin );
+ yyrestart(yyin );
/*FALLTHROUGH*/
case EOB_ACT_END_OF_FILE:
{
- if ( yywrap( ) )
- return 0;
+ if ( yywrap( ) )
+ return EOF;
if ( ! (yy_did_buffer_switch_on_eof) )
YY_NEW_FILE;
@@ -2506,7 +2498,7 @@ static int yy_get_next_buffer (void)
/* %% [19.0] update BOL and yylineno */
if ( c == '\n' )
-
+
yylineno++;
;
@@ -2531,16 +2523,13 @@ static int yy_get_next_buffer (void)
if ( ! YY_CURRENT_BUFFER ){
yyensure_buffer_stack ();
YY_CURRENT_BUFFER_LVALUE =
- yy_create_buffer( yyin, YY_BUF_SIZE );
+ yy_create_buffer(yyin,YY_BUF_SIZE );
}
- yy_init_buffer( YY_CURRENT_BUFFER, input_file );
- yy_load_buffer_state( );
+ yy_init_buffer(YY_CURRENT_BUFFER,input_file );
+ yy_load_buffer_state( );
}
-/* %if-c++-only */
-/* %endif */
-
/** Switch to a different input buffer.
* @param new_buffer The new input buffer.
*
@@ -2570,7 +2559,7 @@ static int yy_get_next_buffer (void)
}
YY_CURRENT_BUFFER_LVALUE = new_buffer;
- yy_load_buffer_state( );
+ yy_load_buffer_state( );
/* We don't actually know whether we did this switch during
* EOF (yywrap()) processing, but the only time this flag
@@ -2588,11 +2577,7 @@ static void yy_load_buffer_state (void)
{
(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
-/* %if-c-only */
yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
-/* %endif */
-/* %if-c++-only */
-/* %endif */
(yy_hold_char) = *(yy_c_buf_p);
}
@@ -2610,7 +2595,7 @@ static void yy_load_buffer_state (void)
{
YY_BUFFER_STATE b;
- b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
+ b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
@@ -2619,20 +2604,17 @@ static void yy_load_buffer_state (void)
/* yy_ch_buf has to be 2 characters longer than the size given because
* we need to put in 2 end-of-buffer characters.
*/
- b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
+ b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 );
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_is_our_buffer = 1;
- yy_init_buffer( b, file );
+ yy_init_buffer(b,file );
return b;
}
-/* %if-c++-only */
-/* %endif */
-
/** Destroy the buffer.
* @param b a buffer created with yy_create_buffer()
*
@@ -2651,9 +2633,9 @@ static void yy_load_buffer_state (void)
YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
if ( b->yy_is_our_buffer )
- yyfree( (void *) b->yy_ch_buf );
+ yyfree((void *) b->yy_ch_buf );
- yyfree( (void *) b );
+ yyfree((void *) b );
}
/* Initializes or reinitializes a buffer.
@@ -2669,13 +2651,9 @@ static void yy_load_buffer_state (void)
{
int oerrno = errno;
- yy_flush_buffer( b );
+ yy_flush_buffer(b );
-/* %if-c-only */
b->yy_input_file = file;
-/* %endif */
-/* %if-c++-only */
-/* %endif */
b->yy_fill_buffer = 1;
/* If b is the current buffer, then yy_init_buffer was _probably_
@@ -2725,7 +2703,7 @@ static void yy_load_buffer_state (void)
b->yy_buffer_status = YY_BUFFER_NEW;
if ( b == YY_CURRENT_BUFFER )
- yy_load_buffer_state( );
+ yy_load_buffer_state( );
}
/* %if-c-or-c++ */
@@ -2761,7 +2739,7 @@ void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
YY_CURRENT_BUFFER_LVALUE = new_buffer;
/* copied from yy_switch_to_buffer. */
- yy_load_buffer_state( );
+ yy_load_buffer_state( );
(yy_did_buffer_switch_on_eof) = 1;
}
/* %endif */
@@ -2786,7 +2764,7 @@ void yypop_buffer_state (void)
--(yy_buffer_stack_top);
if (YY_CURRENT_BUFFER) {
- yy_load_buffer_state( );
+ yy_load_buffer_state( );
(yy_did_buffer_switch_on_eof) = 1;
}
}
@@ -2810,15 +2788,15 @@ static void yyensure_buffer_stack (void)
* scanner will even need a stack. We use 2 instead of 1 to avoid an
* immediate realloc on the next call.
*/
- num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
+ num_to_alloc = 1;
(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
(num_to_alloc * sizeof(struct yy_buffer_state*)
);
if ( ! (yy_buffer_stack) )
YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
-
+
memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
-
+
(yy_buffer_stack_max) = num_to_alloc;
(yy_buffer_stack_top) = 0;
return;
@@ -2827,7 +2805,7 @@ static void yyensure_buffer_stack (void)
if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
/* Increase the buffer to prepare for a possible push. */
- yy_size_t grow_size = 8 /* arbitrary grow size */;
+ int grow_size = 8 /* arbitrary grow size */;
num_to_alloc = (yy_buffer_stack_max) + grow_size;
(yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
@@ -2849,7 +2827,7 @@ static void yyensure_buffer_stack (void)
* @param base the character buffer
* @param size the size in bytes of the character buffer
*
- * @return the newly allocated buffer state object.
+ * @return the newly allocated buffer state object.
*/
YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
{
@@ -2859,23 +2837,23 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
base[size-2] != YY_END_OF_BUFFER_CHAR ||
base[size-1] != YY_END_OF_BUFFER_CHAR )
/* They forgot to leave room for the EOB's. */
- return NULL;
+ return 0;
- b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
+ b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
- b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
+ b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
b->yy_buf_pos = b->yy_ch_buf = base;
b->yy_is_our_buffer = 0;
- b->yy_input_file = NULL;
+ b->yy_input_file = 0;
b->yy_n_chars = b->yy_buf_size;
b->yy_is_interactive = 0;
b->yy_at_bol = 1;
b->yy_fill_buffer = 0;
b->yy_buffer_status = YY_BUFFER_NEW;
- yy_switch_to_buffer( b );
+ yy_switch_to_buffer(b );
return b;
}
@@ -2890,10 +2868,10 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
* @note If you want to scan bytes that may contain NUL values, then use
* yy_scan_bytes() instead.
*/
-YY_BUFFER_STATE yy_scan_string (const char * yystr )
+YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
{
- return yy_scan_bytes( yystr, (int) strlen(yystr) );
+ return yy_scan_bytes(yystr,strlen(yystr) );
}
/* %endif */
@@ -2905,7 +2883,7 @@ YY_BUFFER_STATE yy_scan_string (const char * yystr )
*
* @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
+YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )
{
YY_BUFFER_STATE b;
char *buf;
@@ -2913,8 +2891,8 @@ YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
int i;
/* Get memory for full buffer, including space for trailing EOB's. */
- n = (yy_size_t) (_yybytes_len + 2);
- buf = (char *) yyalloc( n );
+ n = _yybytes_len + 2;
+ buf = (char *) yyalloc(n );
if ( ! buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
@@ -2923,7 +2901,7 @@ YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
- b = yy_scan_buffer( buf, n );
+ b = yy_scan_buffer(buf,n );
if ( ! b )
YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
@@ -2937,7 +2915,7 @@ YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
/* %endif */
/* %if-c-only */
- static void yy_push_state (int _new_state )
+ static void yy_push_state (int new_state )
/* %endif */
/* %if-c++-only */
/* %endif */
@@ -2947,14 +2925,13 @@ YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
yy_size_t new_size;
(yy_start_stack_depth) += YY_START_STACK_INCR;
- new_size = (yy_size_t) (yy_start_stack_depth) * sizeof( int );
+ new_size = (yy_start_stack_depth) * sizeof( int );
if ( ! (yy_start_stack) )
- (yy_start_stack) = (int *) yyalloc( new_size );
+ (yy_start_stack) = (int *) yyalloc(new_size );
else
- (yy_start_stack) = (int *) yyrealloc(
- (void *) (yy_start_stack), new_size );
+ (yy_start_stack) = (int *) yyrealloc((void *) (yy_start_stack),new_size );
if ( ! (yy_start_stack) )
YY_FATAL_ERROR( "out of memory expanding start-condition stack" );
@@ -2962,7 +2939,7 @@ YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
(yy_start_stack)[(yy_start_stack_ptr)++] = YY_START;
- BEGIN(_new_state);
+ BEGIN(new_state);
}
/* %if-c-only */
@@ -2982,9 +2959,9 @@ YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
#endif
/* %if-c-only */
-static void yynoreturn yy_fatal_error (const char* msg )
+static void yy_fatal_error (yyconst char* msg )
{
- fprintf( stderr, "%s\n", msg );
+ (void) fprintf( stderr, "%s\n", msg );
exit( YY_EXIT_FAILURE );
}
/* %endif */
@@ -3019,7 +2996,7 @@ static void yynoreturn yy_fatal_error (const char* msg )
*/
int yyget_lineno (void)
{
-
+
return yylineno;
}
@@ -3042,7 +3019,7 @@ FILE *yyget_out (void)
/** Get the length of the current token.
*
*/
-int yyget_leng (void)
+yy_size_t yyget_leng (void)
{
return yyleng;
}
@@ -3060,29 +3037,29 @@ char *yyget_text (void)
/* %endif */
/** Set the current line number.
- * @param _line_number line number
+ * @param line_number
*
*/
-void yyset_lineno (int _line_number )
+void yyset_lineno (int line_number )
{
- yylineno = _line_number;
+ yylineno = line_number;
}
/** Set the input stream. This does not discard the current
* input buffer.
- * @param _in_str A readable stream.
+ * @param in_str A readable stream.
*
* @see yy_switch_to_buffer
*/
-void yyset_in (FILE * _in_str )
+void yyset_in (FILE * in_str )
{
- yyin = _in_str ;
+ yyin = in_str ;
}
-void yyset_out (FILE * _out_str )
+void yyset_out (FILE * out_str )
{
- yyout = _out_str ;
+ yyout = out_str ;
}
int yyget_debug (void)
@@ -3090,9 +3067,9 @@ int yyget_debug (void)
return yy_flex_debug;
}
-void yyset_debug (int _bdebug )
+void yyset_debug (int bdebug )
{
- yy_flex_debug = _bdebug ;
+ yy_flex_debug = bdebug ;
}
/* %endif */
@@ -3112,10 +3089,10 @@ static int yy_init_globals (void)
/* We do not touch yylineno unless the option is enabled. */
yylineno = 1;
- (yy_buffer_stack) = NULL;
+ (yy_buffer_stack) = 0;
(yy_buffer_stack_top) = 0;
(yy_buffer_stack_max) = 0;
- (yy_c_buf_p) = NULL;
+ (yy_c_buf_p) = (char *) 0;
(yy_init) = 0;
(yy_start) = 0;
@@ -3128,8 +3105,8 @@ static int yy_init_globals (void)
yyin = stdin;
yyout = stdout;
#else
- yyin = NULL;
- yyout = NULL;
+ yyin = (FILE *) 0;
+ yyout = (FILE *) 0;
#endif
/* For future reference: Set errno on error, since we are called by
@@ -3146,7 +3123,7 @@ int yylex_destroy (void)
/* Pop the buffer stack, destroying each element. */
while(YY_CURRENT_BUFFER){
- yy_delete_buffer( YY_CURRENT_BUFFER );
+ yy_delete_buffer(YY_CURRENT_BUFFER );
YY_CURRENT_BUFFER_LVALUE = NULL;
yypop_buffer_state();
}
@@ -3156,7 +3133,7 @@ int yylex_destroy (void)
(yy_buffer_stack) = NULL;
/* Destroy the start condition stack. */
- yyfree( (yy_start_stack) );
+ yyfree((yy_start_stack) );
(yy_start_stack) = NULL;
/* Reset the globals. This is important in a non-reentrant scanner so the next time
@@ -3174,19 +3151,18 @@ int yylex_destroy (void)
*/
#ifndef yytext_ptr
-static void yy_flex_strncpy (char* s1, const char * s2, int n )
+static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
{
-
- int i;
+ register int i;
for ( i = 0; i < n; ++i )
s1[i] = s2[i];
}
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (const char * s )
+static int yy_flex_strlen (yyconst char * s )
{
- int n;
+ register int n;
for ( n = 0; s[n]; ++n )
;
@@ -3196,12 +3172,11 @@ static int yy_flex_strlen (const char * s )
void *yyalloc (yy_size_t size )
{
- return malloc(size);
+ return (void *) malloc( size );
}
void *yyrealloc (void * ptr, yy_size_t size )
{
-
/* The cast to (char *) in the following accommodates both
* implementations that use char* generic pointers, and those
* that use void* generic pointers. It works with the latter
@@ -3209,12 +3184,12 @@ void *yyrealloc (void * ptr, yy_size_t size )
* any pointer type to void*, and deal with argument conversions
* as though doing an assignment.
*/
- return realloc(ptr, size);
+ return (void *) realloc( (char *) ptr, size );
}
void yyfree (void * ptr )
{
- free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
+ free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
}
/* %if-tables-serialization definitions */
@@ -3224,7 +3199,8 @@ void yyfree (void * ptr )
/* %ok-for-header */
-#line 353 "lexer.l"
+#line 352 "lexer.l"
+
/*:511*/
diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/Makefile b/Build/source/texk/web2c/hitexdir/hintview/src/Makefile
index 1716ac75bde..fc1e262a431 100644
--- a/Build/source/texk/web2c/hitexdir/hintview/src/Makefile
+++ b/Build/source/texk/web2c/hitexdir/hintview/src/Makefile
@@ -2,18 +2,36 @@
CC = gcc
CFLAGS = -g -Og -DDEBUG -Wall
LDFLAGS = -g -Og
+#GL_DEFINES = -DGLEW_STATIC -DTW_NO_DIRECT3D -DTW_NO_LIB_PRAGMA -DTW_STATIC -D_CRT_SECURE_NO_WARNINGS
FT_INCLUDES = -I/usr/include/freetype2
+GL_INCLUDES = $(FT_INCLUDES)
+
+
+HFILES = hint.h htex.h format.h get.h basetypes.h error.h \
+ hrender.h rendernative.h hfonts.h
+
+WFILES = format.w hint.w htex.ch btex.w
+
+HINT_FILES = get.c hint.c tables.c htex.c hrender.c hfonts.c \
+ $(HFILES) $(WFILES)
OBJ=main.o renderOGL.o get.o hint.o tables.o htex.o hrender.o hfonts.o
+ifeq (Msys,$(shell uname -o))
+LIBS= ../external/glfw-3.1.2/msys.build/src/libglfw3.a ../external/libglew.a -lfreetype \
+ -lm -lz
+# -ldl -lm -lX11 -lpthread -lXrandr -lXinerama -lXi -lXcursor -lGL -lz
+else
LIBS= -lglfw -lGLEW -ldl -lfreetype -lX11 -lXrandr -lXinerama -lXi -lXcursor -lGL -lz -lpthread -lm
+endif
all: hintview
.SUFFIXES:
+
hint.o: hint.c
$(CC) $(CFLAGS) -Wno-unused-but-set-variable -o $@ -c $<
@@ -32,6 +50,13 @@ hfonts.o: hfonts.c
hintview: $(OBJ)
$(CC) $(LDFLAGS) $(OBJ) $(LIBS) -o $@
+SRC= $(OBJ:.o=.c) $(HFILES) main.h stb_image.h Makefile
+DIST_SRC = $(SRC:%=src/%)
+DIST_MAN = man/hintview.1
+
+hintview.tgz:
+ tar -c -C .. --transform 's,^,hintview/,' -z -f $@ $(DIST_SRC) $(DIST_MAN)
+
BINDIR=/usr/local/bin
MANDIR=/usr/local/man
@@ -40,7 +65,13 @@ install: hintview
install -t $(BINDIR) --mode=755 hintview
install -t $(MANDIR)/man1 --mode=644 ../man/hintview.1
+
+.PHONY: www
+www: hintview hintview.tgz
+ cp hintview hintview.tgz ../man/hintview.1 ../../www/linux/
+
clean:
rm -f *.o *~ *.dvi *.log *.aux
- rm -f hintview
+ rm -f hintview hintview.tgz
+ $(MAKE) -C ../../hint viewlinux || true
diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/basetypes.h b/Build/source/texk/web2c/hitexdir/hintview/src/basetypes.h
index 1db75956522..6f9c1f3cff0 100644
--- a/Build/source/texk/web2c/hitexdir/hintview/src/basetypes.h
+++ b/Build/source/texk/web2c/hitexdir/hintview/src/basetypes.h
@@ -1,5 +1,5 @@
/*503:*/
- #line 9953 "format.w"
+ #line 9954 "format.w"
#ifndef __BASETYPES_H__
#define __BASETYPES_H__
@@ -41,5 +41,7 @@ typedef double float64_t;
#if __SIZEOF_DOUBLE__!=8
#error float64 type must have size 8
#endif
+#define HINT_VERSION 1
+#define HINT_SUB_VERSION 3
#endif
/*:503*/
diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/format.h b/Build/source/texk/web2c/hitexdir/hintview/src/format.h
index a4ed4b630af..ad6524eb274 100644
--- a/Build/source/texk/web2c/hitexdir/hintview/src/format.h
+++ b/Build/source/texk/web2c/hitexdir/hintview/src/format.h
@@ -1,19 +1,19 @@
/*504:*/
- #line 10003 "format.w"
+ #line 10006 "format.w"
#ifndef _HFORMAT_H_
#define _HFORMAT_H_
/*349:*/
- #line 7407 "format.w"
+ #line 7408 "format.w"
#define REF_RNG(K,N) if ((int)(N)>max_ref[K]) QUIT("Reference %d to %s out of range [0 - %d]",\
(N),definition_name[K],max_ref[K])
/*:349*/ /*350:*/
- #line 7421 "format.w"
+ #line 7422 "format.w"
#define MAX_REF(K) ((K)==label_kind?0xFFFF:0xFF)
/*:350*/ /*423:*/
- #line 8876 "format.w"
+ #line 8877 "format.w"
#ifdef WIN32
#define SIZE_F "0x%x"
@@ -32,10 +32,10 @@
#define TAGERR(A) QUIT("Unknown tag [%s,%d] at " SIZE_F "\n",NAME(A),INFO(A),hpos-hstart)
/*:423*/
- #line 10006 "format.w"
+ #line 10009 "format.w"
/*410:*/
- #line 8614 "format.w"
+ #line 8615 "format.w"
#define DBGNONE 0x0
#define DBGBASIC 0x1
@@ -55,7 +55,7 @@
#define DBGRENDER 0x4000
#define DBGLABEL 0x8000
/*:410*/
- #line 10007 "format.w"
+ #line 10010 "format.w"
/*12:*/
#line 635 "format.w"
@@ -97,15 +97,13 @@
/*:294*/ /*302:*/
#line 6244 "format.w"
-#define HINT_VERSION 1
-#define HINT_SUB_VERSION 3
#define MAX_BANNER 256
/*:302*/ /*315:*/
- #line 6447 "format.w"
+ #line 6448 "format.w"
#define MAX_TAG_DISTANCE 32
/*:315*/
- #line 10008 "format.w"
+ #line 10011 "format.w"
/*6:*/
#line 487 "format.w"
@@ -220,14 +218,14 @@ int next;
uint32_t pos0;uint8_t f;
}Label;
/*:242*/ /*373:*/
- #line 7941 "format.w"
+ #line 7942 "format.w"
#define MAX_FONT_PARAMS 11
/*:373*/
- #line 10009 "format.w"
+ #line 10012 "format.w"
/*385:*/
- #line 8176 "format.w"
+ #line 8177 "format.w"
typedef enum{
zero_int_no= 0,
@@ -256,7 +254,7 @@ floating_penalty_no= 22
}Int_no;
#define MAX_INT_DEFAULT floating_penalty_no
/*:385*/ /*387:*/
- #line 8249 "format.w"
+ #line 8250 "format.w"
typedef enum{
zero_dimen_no= 0,
@@ -272,7 +270,7 @@ math_quad_no= 9
}Dimen_no;
#define MAX_DIMEN_DEFAULT math_quad_no
/*:387*/ /*389:*/
- #line 8294 "format.w"
+ #line 8295 "format.w"
typedef enum{
zero_xdimen_no= 0,
@@ -281,7 +279,7 @@ vsize_xdimen_no= 2
}Xdimen_no;
#define MAX_XDIMEN_DEFAULT vsize_xdimen_no
/*:389*/ /*391:*/
- #line 8318 "format.w"
+ #line 8319 "format.w"
typedef enum{
zero_skip_no= 0,
@@ -302,42 +300,42 @@ par_fill_skip_no= 14
}Glue_no;
#define MAX_GLUE_DEFAULT par_fill_skip_no
/*:391*/ /*393:*/
- #line 8404 "format.w"
+ #line 8405 "format.w"
typedef enum{
zero_baseline_no= 0
}Baseline_no;
#define MAX_BASELINE_DEFAULT zero_baseline_no
/*:393*/ /*395:*/
- #line 8429 "format.w"
+ #line 8430 "format.w"
typedef enum{
zero_label_no= 0
}Label_no;
#define MAX_LABEL_DEFAULT zero_label_no
/*:395*/ /*397:*/
- #line 8443 "format.w"
+ #line 8444 "format.w"
typedef enum{
zero_stream_no= 0
}Stream_no;
#define MAX_STREAM_DEFAULT zero_stream_no
/*:397*/ /*399:*/
- #line 8459 "format.w"
+ #line 8460 "format.w"
typedef enum{
zero_page_no= 0
}Page_no;
#define MAX_PAGE_DEFAULT zero_page_no
/*:399*/ /*401:*/
- #line 8476 "format.w"
+ #line 8477 "format.w"
typedef enum{
zero_range_no= 0
}Range_no;
#define MAX_RANGE_DEFAULT zero_range_no
/*:401*/
- #line 10010 "format.w"
+ #line 10013 "format.w"
extern const char*content_name[32];
diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/get.c b/Build/source/texk/web2c/hitexdir/hintview/src/get.c
index b4a40e9e6e7..41dadeeed3e 100644
--- a/Build/source/texk/web2c/hitexdir/hintview/src/get.c
+++ b/Build/source/texk/web2c/hitexdir/hintview/src/get.c
@@ -1,5 +1,5 @@
/*508:*/
- #line 10150 "format.w"
+ #line 10153 "format.w"
#include "basetypes.h"
#include <string.h>
@@ -25,26 +25,27 @@ RangePos*range_pos;
int next_range= 1,max_range;
int*page_on;
/*:292*/ /*303:*/
- #line 6254 "format.w"
+ #line 6252 "format.w"
char hbanner[MAX_BANNER+1];
+int hbanner_size= 0;
/*:303*/ /*310:*/
- #line 6392 "format.w"
+ #line 6393 "format.w"
uint8_t*hpos= NULL,*hstart= NULL,*hend= NULL,*hpos0= NULL;
/*:310*/ /*316:*/
- #line 6473 "format.w"
+ #line 6474 "format.w"
char*hin_name= NULL;
uint64_t hin_size= 0;
uint8_t*hin_addr= NULL;
uint64_t hin_time= 0;
/*:316*/ /*372:*/
- #line 7937 "format.w"
+ #line 7938 "format.w"
char**hfont_name;
/*:372*/ /*411:*/
- #line 8637 "format.w"
+ #line 8638 "format.w"
unsigned int debugflags= DBGNONE;
int option_utf8= false;
@@ -56,15 +57,15 @@ int option_compress= false;
char*stem_name= NULL;
int stem_length= 0;
/*:411*/ /*414:*/
- #line 8771 "format.w"
+ #line 8772 "format.w"
FILE*hin= NULL,*hout= NULL,*hlog= NULL;
/*:414*/
- #line 10163 "format.w"
+ #line 10166 "format.w"
/*317:*/
- #line 6480 "format.w"
+ #line 6481 "format.w"
#ifndef USE_MMAP
void hget_unmap(void)
@@ -158,21 +159,20 @@ return hin_size;
#endif
/*:317*/
- #line 10165 "format.w"
+ #line 10168 "format.w"
/*304:*/
- #line 6258 "format.w"
+ #line 6257 "format.w"
bool hcheck_banner(char*magic)
-{int hbanner_size= 0;
+{
int v;
char*t;
t= hbanner;
if(strncmp(magic,hbanner,4)!=0)
{MESSAGE("This is not a %s file\n",magic);return false;}
else t+= 4;
-hbanner_size= (int)strnlen(hbanner,MAX_BANNER);
if(hbanner[hbanner_size-1]!='\n')
{MESSAGE("Banner exceeds maximum size=0x%x\n",MAX_BANNER);return false;}
if(*t!=' ')
@@ -194,10 +194,10 @@ DBG(DBGDIR,"banner size=0x%x\n",hbanner_size);
return true;
}
/*:304*/
- #line 10166 "format.w"
+ #line 10169 "format.w"
/*326:*/
- #line 6813 "format.w"
+ #line 6814 "format.w"
Entry*dir= NULL;
uint16_t section_no,max_section_no;
@@ -209,7 +209,7 @@ ALLOCATE(dir,entries,Entry);
dir[0].section_no= 0;dir[1].section_no= 1;dir[2].section_no= 2;
}
/*:326*/ /*327:*/
- #line 6826 "format.w"
+ #line 6827 "format.w"
void hset_entry(Entry*e,uint16_t i,uint32_t size,uint32_t xsize,char*file_name)
{e->section_no= i;
@@ -221,22 +221,23 @@ e->file_name= strdup(file_name);
DBG(DBGDIR,"Creating entry %d: \"%s\" size=0x%x xsize=0x%x\n",i,file_name,size,xsize);
}
/*:327*/
- #line 10167 "format.w"
+ #line 10170 "format.w"
/*305:*/
- #line 6298 "format.w"
+ #line 6296 "format.w"
void hget_banner(void)
-{int i;
-for(i= 0;i<MAX_BANNER&&hpos<hend;i++)
-{hbanner[i]= HGET8;
-if(hbanner[i]=='\n')break;
+{hbanner_size= 0;
+while(hbanner_size<MAX_BANNER&&hpos<hend)
+{uint8_t c= HGET8;
+hbanner[hbanner_size++]= c;
+if(c=='\n')break;
}
-hbanner[++i]= 0;
+hbanner[hbanner_size]= 0;
}
/*:305*/ /*318:*/
- #line 6585 "format.w"
+ #line 6586 "format.w"
static void hdecompress(uint16_t n)
@@ -273,7 +274,7 @@ hpos0= hpos= hstart= buffer;
hend= hstart+dir[n].xsize;
}
/*:318*/ /*320:*/
- #line 6673 "format.w"
+ #line 6674 "format.w"
void hget_section(uint16_t n)
{DBG(DBGDIR,"Reading section %d\n",n);
@@ -289,7 +290,7 @@ if(dir[n].xsize>0)hdecompress(n);
}
}
/*:320*/ /*337:*/
- #line 7051 "format.w"
+ #line 7052 "format.w"
void hget_entry(Entry*e)
{ /*15:*/
@@ -300,7 +301,7 @@ uint32_t node_pos= hpos-hstart;
if(hpos>=hend)QUIT("Attempt to read a start byte at the end of the section");
HGETTAG(a);
/*:15*/
- #line 7053 "format.w"
+ #line 7054 "format.w"
DBG(DBGDIR,"Reading directory entry\n");
switch(a)
@@ -322,11 +323,11 @@ if(a!=z)
QUIT("Tag mismatch [%s,%d]!=[%s,%d] at 0x%x to "SIZE_F"\n",
NAME(a),INFO(a),NAME(z),INFO(z),node_pos,hpos-hstart-1);
/*:16*/
- #line 7066 "format.w"
+ #line 7067 "format.w"
}
/*:337*/ /*338:*/
- #line 7083 "format.w"
+ #line 7084 "format.w"
static void hget_root(Entry*root)
{DBG(DBGDIR,"Root entry at "SIZE_F"\n",hpos-hstart);
@@ -362,7 +363,7 @@ free(dir);dir= NULL;
}
/*:338*/ /*356:*/
- #line 7499 "format.w"
+ #line 7500 "format.w"
void hget_max_definitions(void)
{Kind k;
@@ -374,7 +375,7 @@ uint32_t node_pos= hpos-hstart;
if(hpos>=hend)QUIT("Attempt to read a start byte at the end of the section");
HGETTAG(a);
/*:15*/
- #line 7502 "format.w"
+ #line 7503 "format.w"
if(a!=TAG(list_kind,0))QUIT("Start of maximum list expected");
for(k= 0;k<32;k++)max_ref[k]= max_default[k];max_outline= -1;
@@ -395,7 +396,7 @@ case TAG(outline_kind,b100):
case TAG(outline_kind,b101):max_outline= n;
DBG(DBGDEF|DBGLABEL,"max(outline) = %d\n",max_outline);break;
/*:238*/
- #line 7514 "format.w"
+ #line 7515 "format.w"
default:
if(max_fixed[k]>max_default[k])
@@ -413,13 +414,13 @@ if(a!=z)
QUIT("Tag mismatch [%s,%d]!=[%s,%d] at 0x%x to "SIZE_F"\n",
NAME(a),INFO(a),NAME(z),INFO(z),node_pos,hpos-hstart-1);
/*:16*/
- #line 7523 "format.w"
+ #line 7524 "format.w"
}
if(INFO(a)!=0)QUIT("End of maximum list with info %d",INFO(a));
}
/*:356*/
- #line 10169 "format.w"
+ #line 10172 "format.w"
/*52:*/
#line 1228 "format.w"
@@ -509,10 +510,10 @@ DBG(DBGNODE,"Get list at 0x%x size=%u\n",l->p,l->s);
}
}
/*:145*/
- #line 10170 "format.w"
+ #line 10173 "format.w"
/*426:*/
- #line 8943 "format.w"
+ #line 8944 "format.w"
uint32_t hff_list_pos= 0,hff_list_size= 0;
uint8_t hff_tag;
@@ -532,7 +533,7 @@ return;
}
else if(hff_tag<=TAG(param_kind,5))
/*428:*/
- #line 8988 "format.w"
+ #line 8989 "format.w"
switch(INFO(hff_tag)){
case 1:hff_list_pos= hpos-hstart+1;hff_list_size= 0;hpos= hpos+2;return;
@@ -542,12 +543,12 @@ case 4:hpos++;HGET24(hff_list_size);hff_list_pos= hpos-hstart+1;hpos= hpos+1+hff
case 5:hpos++;HGET32(hff_list_size);hff_list_pos= hpos-hstart+1;hpos= hpos+1+hff_list_size+1+4+1;return;
}
/*:428*/
- #line 8961 "format.w"
+ #line 8962 "format.w"
TAGERR(hff_tag);
}
/*:426*/ /*457:*/
- #line 9396 "format.w"
+ #line 9397 "format.w"
float32_t hteg_float32(void)
{union{float32_t d;uint32_t bits;}u;
@@ -555,7 +556,7 @@ HTEG32(u.bits);
return u.d;
}
/*:457*/ /*495:*/
- #line 9824 "format.w"
+ #line 9825 "format.w"
void hteg_size_boundary(Info info)
{uint32_t n;
@@ -578,14 +579,14 @@ return n;
void hteg_list(List*l)
{ /*454:*/
- #line 9368 "format.w"
+ #line 9369 "format.w"
uint8_t a,z;
uint32_t node_pos= hpos-hstart;
if(hpos<=hstart)return;
HTEGTAG(z);
/*:454*/
- #line 9845 "format.w"
+ #line 9846 "format.w"
if(KIND(z)!=list_kind&&KIND(z)!=text_kind&&KIND(z)!=param_kind)
QUIT("List expected at 0x%x",(uint32_t)(hpos-hstart));
@@ -601,13 +602,13 @@ s= hteg_list_size(INFO(z));
if(s!=l->s)QUIT("List sizes at "SIZE_F" and 0x%x do not match 0x%x != 0x%x",
hpos-hstart,node_pos-1,s,l->s);
/*455:*/
- #line 9375 "format.w"
+ #line 9376 "format.w"
HTEGTAG(a);
if(a!=z)QUIT("Tag mismatch [%s,%d]!=[%s,%d] at "SIZE_F" to 0x%x\n",NAME(a),INFO(a),NAME(z),INFO(z),
hpos-hstart,node_pos-1);
/*:455*/
- #line 9859 "format.w"
+ #line 9860 "format.w"
}
}
@@ -619,6 +620,6 @@ hteg_list(l);
/*:495*/
- #line 10171 "format.w"
+ #line 10174 "format.w"
/*:508*/
diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/get.h b/Build/source/texk/web2c/hitexdir/hintview/src/get.h
index 2d64ca9d8b2..bd628745c41 100644
--- a/Build/source/texk/web2c/hitexdir/hintview/src/get.h
+++ b/Build/source/texk/web2c/hitexdir/hintview/src/get.h
@@ -1,5 +1,5 @@
/*507:*/
- #line 10105 "format.w"
+ #line 10108 "format.w"
/*1:*/
#line 328 "format.w"
@@ -71,10 +71,10 @@ uint16_t r;
typedef
struct{uint8_t pg;uint32_t pos;bool on;int link;}RangePos;
/*:291*/
- #line 10106 "format.w"
+ #line 10109 "format.w"
/*325:*/
- #line 6799 "format.w"
+ #line 6800 "format.w"
typedef struct{
uint64_t pos;
@@ -85,7 +85,7 @@ uint8_t*buffer;
uint32_t bsize;
}Entry;
/*:325*/
- #line 10107 "format.w"
+ #line 10110 "format.w"
/*37:*/
#line 1062 "format.w"
@@ -104,7 +104,7 @@ uint32_t bsize;
if (s!=(L).s) \
QUIT("List sizes at 0x%x and " SIZE_F " do not match 0x%x != 0x%x",node_pos+1,hpos-hstart-I-1,(L).s,s);}
/*:146*/ /*311:*/
- #line 6400 "format.w"
+ #line 6401 "format.w"
#define HGET_ERROR QUIT("HGET overrun in section %d at " SIZE_F "\n",section_no,hpos-hstart)
#define HEND ((hpos<=hend)?0:(HGET_ERROR,0))
@@ -115,7 +115,7 @@ uint32_t bsize;
#define HGET32(X) ((X)= (hpos[0]<<24)+(hpos[1]<<16)+(hpos[2]<<8)+hpos[3],hpos+= 4,HEND)
#define HGETTAG(A) A= HGET8,DBGTAG(A,hpos-1)
/*:311*/ /*336:*/
- #line 7027 "format.w"
+ #line 7028 "format.w"
#define HGET_SIZE(I) \
if ((I)&b100) { \
@@ -139,7 +139,7 @@ uint32_t bsize;
hset_entry(&(E),i,s,xs,file_name); \
}
/*:336*/ /*456:*/
- #line 9383 "format.w"
+ #line 9384 "format.w"
#define HBACK(X) ((hpos-(X)<hstart)?(QUIT("HTEG underflow\n"),NULL):(hpos-= (X)))
@@ -149,7 +149,7 @@ uint32_t bsize;
#define HTEG32(X) (HBACK(4),(X)= (hpos[0]<<24)+(hpos[1]<<16)+(hpos[2]<<8)+hpos[3])
#define HTEGTAG(X) X= HTEG8,DBGTAG(X,hpos)
/*:456*/
- #line 10108 "format.w"
+ #line 10111 "format.w"
extern Entry*dir;
diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/main.c b/Build/source/texk/web2c/hitexdir/hintview/src/main.c
index f8e4b9e16f5..8ae36b33e95 100644
--- a/Build/source/texk/web2c/hitexdir/hintview/src/main.c
+++ b/Build/source/texk/web2c/hitexdir/hintview/src/main.c
@@ -1,3 +1,30 @@
+/* This file is part of HINT
+ * Copyright 2017-2021 Martin Ruckert, Hochschule Muenchen, Lothstrasse 64, 80336 Muenchen
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT
+ * OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the copyright holders shall
+ * not be used in advertising or otherwise to promote the sale, use or other
+ * dealings in this Software without prior written authorization from the
+ * copyright holders.
+ */
#include <stdio.h>
#include <stdlib.h>
#include <setjmp.h>
diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/main.h b/Build/source/texk/web2c/hitexdir/hintview/src/main.h
index d42397916cb..dda8b57824c 100644
--- a/Build/source/texk/web2c/hitexdir/hintview/src/main.h
+++ b/Build/source/texk/web2c/hitexdir/hintview/src/main.h
@@ -1,3 +1,30 @@
+/* This file is part of HINT
+ * Copyright 2017-2021 Martin Ruckert, Hochschule Muenchen, Lothstrasse 64, 80336 Muenchen
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT
+ * OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the copyright holders shall
+ * not be used in advertising or otherwise to promote the sale, use or other
+ * dealings in this Software without prior written authorization from the
+ * copyright holders.
+ */
#ifndef MAIN_H
#define MAIN_H
diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/renderOGL.c b/Build/source/texk/web2c/hitexdir/hintview/src/renderOGL.c
index 27de51570be..d9086b440aa 100644
--- a/Build/source/texk/web2c/hitexdir/hintview/src/renderOGL.c
+++ b/Build/source/texk/web2c/hitexdir/hintview/src/renderOGL.c
@@ -1,5 +1,32 @@
-#include <GL/glew.h>
+/* This file is part of HINT
+ * Copyright 2017-2021 Martin Ruckert, Hochschule Muenchen, Lothstrasse 64, 80336 Muenchen
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT
+ * OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the copyright holders shall
+ * not be used in advertising or otherwise to promote the sale, use or other
+ * dealings in this Software without prior written authorization from the
+ * copyright holders.
+ */
+#include <GL/glew.h>
#include "basetypes.h"
#include "main.h"
#include "error.h"
diff --git a/Build/source/texk/web2c/hitexdir/hiparser.c b/Build/source/texk/web2c/hitexdir/hiparser.c
index bdd3a47c485..ff35480a9af 100644
--- a/Build/source/texk/web2c/hitexdir/hiparser.c
+++ b/Build/source/texk/web2c/hitexdir/hiparser.c
@@ -69,7 +69,7 @@
/* First part of user prologue. */
#line 2 "parser.y"
- #line 10313 "format.w"
+ #line 10316 "format.w"
#include "hibasetypes.h"
#include <string.h>
@@ -81,7 +81,7 @@ extern char**hfont_name;
/*358:*/
uint32_t definition_bits[0x100/32][32]= {
- #line 7627 "format.w"
+ #line 7628 "format.w"
{0}};
#define SET_DBIT(N,K) ((N)>0xFF?1:(definition_bits[N/32][K] |= (1<<((N)&(32-1)))))
@@ -113,7 +113,7 @@ extern int yylex(void);
/*354:*/
void hset_max(Kind k,int n)
{
- #line 7470 "format.w"
+ #line 7471 "format.w"
DBG(DBGDEF,"Setting max %s to %d\n",definition_name[k],n);
RNG("Maximum",n,max_fixed[k]+1,MAX_REF(k));
if(n>max_ref[k])
@@ -122,7 +122,7 @@ void hset_max(Kind k,int n)
/*:354*/ /*365:*/
void check_param_def(Ref*df)
{
- #line 7776 "format.w"
+ #line 7777 "format.w"
if(df->k!=int_kind&&df->k!=dimen_kind&&df->k!=glue_kind)
QUIT("Kind %s not allowed in parameter list",definition_name[df->k]);
if(df->n<=max_fixed[df->k]||max_default[df->k]<df->n)
@@ -132,7 +132,7 @@ void check_param_def(Ref*df)
extern int yylineno;
int yyerror(const char*msg)
{
- #line 8901 "format.w"
+ #line 8902 "format.w"
QUIT(" in line %d %s",yylineno,msg);
return 0;
}
@@ -3315,7 +3315,7 @@ yyreduce:
case 185: /* $@10: %empty */
#line 837 "parser.y"
{
- #line 6788 "format.w"
+ #line 6789 "format.w"
new_directory((yyvsp[0].u)+1);new_output_buffers();}
#line 3321 "parser.c"
break;
@@ -3323,7 +3323,7 @@ yyreduce:
case 189: /* entry: "<" "entry" UNSIGNED string ">" */
#line 842 "parser.y"
{
- #line 6791 "format.w"
+ #line 6792 "format.w"
RNG("Section number",(yyvsp[-2].u),3,max_section_no);hset_entry(&(dir[(yyvsp[-2].u)]),(yyvsp[-2].u),0,0,(yyvsp[-1].s));}
#line 3329 "parser.c"
break;
@@ -3331,7 +3331,7 @@ yyreduce:
case 190: /* $@11: %empty */
#line 846 "parser.y"
{
- #line 7326 "format.w"
+ #line 7327 "format.w"
hput_definitions_start();}
#line 3337 "parser.c"
break;
@@ -3339,7 +3339,7 @@ yyreduce:
case 191: /* definition_section: "<" "definitions" $@11 max_definitions definition_list ">" */
#line 850 "parser.y"
{
- #line 7328 "format.w"
+ #line 7329 "format.w"
hput_definitions_end();}
#line 3345 "parser.c"
break;
@@ -3347,7 +3347,7 @@ yyreduce:
case 194: /* max_definitions: "<" "max" max_list ">" */
#line 856 "parser.y"
{
- #line 7444 "format.w"
+ #line 7445 "format.w"
/*245:*/
if(max_ref[label_kind]>=0)
ALLOCATE(labels,max_ref[label_kind]+1,Label);
@@ -3375,7 +3375,7 @@ yyreduce:
case 197: /* max_value: "font" UNSIGNED */
#line 882 "parser.y"
{
- #line 7448 "format.w"
+ #line 7449 "format.w"
hset_max(font_kind,(yyvsp[0].u));}
#line 3381 "parser.c"
break;
@@ -3383,7 +3383,7 @@ yyreduce:
case 198: /* max_value: "int" UNSIGNED */
#line 885 "parser.y"
{
- #line 7449 "format.w"
+ #line 7450 "format.w"
hset_max(int_kind,(yyvsp[0].u));}
#line 3389 "parser.c"
break;
@@ -3391,7 +3391,7 @@ yyreduce:
case 199: /* max_value: "dimen" UNSIGNED */
#line 888 "parser.y"
{
- #line 7450 "format.w"
+ #line 7451 "format.w"
hset_max(dimen_kind,(yyvsp[0].u));}
#line 3397 "parser.c"
break;
@@ -3399,7 +3399,7 @@ yyreduce:
case 200: /* max_value: "ligature" UNSIGNED */
#line 891 "parser.y"
{
- #line 7451 "format.w"
+ #line 7452 "format.w"
hset_max(ligature_kind,(yyvsp[0].u));}
#line 3405 "parser.c"
break;
@@ -3407,7 +3407,7 @@ yyreduce:
case 201: /* max_value: "disc" UNSIGNED */
#line 894 "parser.y"
{
- #line 7452 "format.w"
+ #line 7453 "format.w"
hset_max(disc_kind,(yyvsp[0].u));}
#line 3413 "parser.c"
break;
@@ -3415,7 +3415,7 @@ yyreduce:
case 202: /* max_value: "glue" UNSIGNED */
#line 897 "parser.y"
{
- #line 7453 "format.w"
+ #line 7454 "format.w"
hset_max(glue_kind,(yyvsp[0].u));}
#line 3421 "parser.c"
break;
@@ -3423,7 +3423,7 @@ yyreduce:
case 203: /* max_value: "language" UNSIGNED */
#line 900 "parser.y"
{
- #line 7454 "format.w"
+ #line 7455 "format.w"
hset_max(language_kind,(yyvsp[0].u));}
#line 3429 "parser.c"
break;
@@ -3431,7 +3431,7 @@ yyreduce:
case 204: /* max_value: "rule" UNSIGNED */
#line 903 "parser.y"
{
- #line 7455 "format.w"
+ #line 7456 "format.w"
hset_max(rule_kind,(yyvsp[0].u));}
#line 3437 "parser.c"
break;
@@ -3439,7 +3439,7 @@ yyreduce:
case 205: /* max_value: "image" UNSIGNED */
#line 906 "parser.y"
{
- #line 7456 "format.w"
+ #line 7457 "format.w"
hset_max(image_kind,(yyvsp[0].u));}
#line 3445 "parser.c"
break;
@@ -3447,7 +3447,7 @@ yyreduce:
case 206: /* max_value: "leaders" UNSIGNED */
#line 909 "parser.y"
{
- #line 7457 "format.w"
+ #line 7458 "format.w"
hset_max(leaders_kind,(yyvsp[0].u));}
#line 3453 "parser.c"
break;
@@ -3455,7 +3455,7 @@ yyreduce:
case 207: /* max_value: "baseline" UNSIGNED */
#line 912 "parser.y"
{
- #line 7458 "format.w"
+ #line 7459 "format.w"
hset_max(baseline_kind,(yyvsp[0].u));}
#line 3461 "parser.c"
break;
@@ -3463,7 +3463,7 @@ yyreduce:
case 208: /* max_value: "xdimen" UNSIGNED */
#line 915 "parser.y"
{
- #line 7459 "format.w"
+ #line 7460 "format.w"
hset_max(xdimen_kind,(yyvsp[0].u));}
#line 3469 "parser.c"
break;
@@ -3471,7 +3471,7 @@ yyreduce:
case 209: /* max_value: "param" UNSIGNED */
#line 918 "parser.y"
{
- #line 7460 "format.w"
+ #line 7461 "format.w"
hset_max(param_kind,(yyvsp[0].u));}
#line 3477 "parser.c"
break;
@@ -3479,7 +3479,7 @@ yyreduce:
case 210: /* max_value: "stream (definition)" UNSIGNED */
#line 921 "parser.y"
{
- #line 7461 "format.w"
+ #line 7462 "format.w"
hset_max(stream_kind,(yyvsp[0].u));}
#line 3485 "parser.c"
break;
@@ -3487,7 +3487,7 @@ yyreduce:
case 211: /* max_value: "page" UNSIGNED */
#line 924 "parser.y"
{
- #line 7462 "format.w"
+ #line 7463 "format.w"
hset_max(page_kind,(yyvsp[0].u));}
#line 3493 "parser.c"
break;
@@ -3495,7 +3495,7 @@ yyreduce:
case 212: /* max_value: "range" UNSIGNED */
#line 927 "parser.y"
{
- #line 7463 "format.w"
+ #line 7464 "format.w"
hset_max(range_kind,(yyvsp[0].u));}
#line 3501 "parser.c"
break;
@@ -3503,7 +3503,7 @@ yyreduce:
case 213: /* max_value: "label" UNSIGNED */
#line 930 "parser.y"
{
- #line 7464 "format.w"
+ #line 7465 "format.w"
hset_max(label_kind,(yyvsp[0].u));}
#line 3509 "parser.c"
break;
@@ -3511,7 +3511,7 @@ yyreduce:
case 214: /* def_node: start "font" ref font ">" */
#line 936 "parser.y"
{
- #line 7661 "format.w"
+ #line 7662 "format.w"
DEF((yyval.rf),font_kind,(yyvsp[-2].u));hput_tags((yyvsp[-4].u),(yyvsp[-1].info));}
#line 3517 "parser.c"
break;
@@ -3519,7 +3519,7 @@ yyreduce:
case 215: /* def_node: start "int" ref integer ">" */
#line 939 "parser.y"
{
- #line 7662 "format.w"
+ #line 7663 "format.w"
DEF((yyval.rf),int_kind,(yyvsp[-2].u));hput_tags((yyvsp[-4].u),hput_int((yyvsp[-1].i)));}
#line 3525 "parser.c"
break;
@@ -3527,7 +3527,7 @@ yyreduce:
case 216: /* def_node: start "dimen" ref dimension ">" */
#line 942 "parser.y"
{
- #line 7663 "format.w"
+ #line 7664 "format.w"
DEF((yyval.rf),dimen_kind,(yyvsp[-2].u));hput_tags((yyvsp[-4].u),hput_dimen((yyvsp[-1].d)));}
#line 3533 "parser.c"
break;
@@ -3535,7 +3535,7 @@ yyreduce:
case 217: /* def_node: start "language" ref string ">" */
#line 945 "parser.y"
{
- #line 7664 "format.w"
+ #line 7665 "format.w"
DEF((yyval.rf),language_kind,(yyvsp[-2].u));hput_string((yyvsp[-1].s));hput_tags((yyvsp[-4].u),TAG(language_kind,0));}
#line 3541 "parser.c"
break;
@@ -3543,7 +3543,7 @@ yyreduce:
case 218: /* def_node: start "glue" ref glue ">" */
#line 948 "parser.y"
{
- #line 7665 "format.w"
+ #line 7666 "format.w"
DEF((yyval.rf),glue_kind,(yyvsp[-2].u));hput_tags((yyvsp[-4].u),hput_glue(&((yyvsp[-1].g))));}
#line 3549 "parser.c"
break;
@@ -3551,7 +3551,7 @@ yyreduce:
case 219: /* def_node: start "xdimen" ref xdimen ">" */
#line 951 "parser.y"
{
- #line 7666 "format.w"
+ #line 7667 "format.w"
DEF((yyval.rf),xdimen_kind,(yyvsp[-2].u));hput_tags((yyvsp[-4].u),hput_xdimen(&((yyvsp[-1].xd))));}
#line 3557 "parser.c"
break;
@@ -3559,7 +3559,7 @@ yyreduce:
case 220: /* def_node: start "rule" ref rule ">" */
#line 954 "parser.y"
{
- #line 7667 "format.w"
+ #line 7668 "format.w"
DEF((yyval.rf),rule_kind,(yyvsp[-2].u));hput_tags((yyvsp[-4].u),hput_rule(&((yyvsp[-1].r))));}
#line 3565 "parser.c"
break;
@@ -3567,7 +3567,7 @@ yyreduce:
case 221: /* def_node: start "leaders" ref leaders ">" */
#line 957 "parser.y"
{
- #line 7668 "format.w"
+ #line 7669 "format.w"
DEF((yyval.rf),leaders_kind,(yyvsp[-2].u));hput_tags((yyvsp[-4].u),TAG(leaders_kind,(yyvsp[-1].info)));}
#line 3573 "parser.c"
break;
@@ -3575,7 +3575,7 @@ yyreduce:
case 222: /* def_node: start "baseline" ref baseline ">" */
#line 960 "parser.y"
{
- #line 7669 "format.w"
+ #line 7670 "format.w"
DEF((yyval.rf),baseline_kind,(yyvsp[-2].u));hput_tags((yyvsp[-4].u),TAG(baseline_kind,(yyvsp[-1].info)));}
#line 3581 "parser.c"
break;
@@ -3583,7 +3583,7 @@ yyreduce:
case 223: /* def_node: start "ligature" ref ligature ">" */
#line 963 "parser.y"
{
- #line 7670 "format.w"
+ #line 7671 "format.w"
DEF((yyval.rf),ligature_kind,(yyvsp[-2].u));hput_tags((yyvsp[-4].u),hput_ligature(&((yyvsp[-1].lg))));}
#line 3589 "parser.c"
break;
@@ -3591,7 +3591,7 @@ yyreduce:
case 224: /* def_node: start "disc" ref disc ">" */
#line 966 "parser.y"
{
- #line 7671 "format.w"
+ #line 7672 "format.w"
DEF((yyval.rf),disc_kind,(yyvsp[-2].u));hput_tags((yyvsp[-4].u),hput_disc(&((yyvsp[-1].dc))));}
#line 3597 "parser.c"
break;
@@ -3599,7 +3599,7 @@ yyreduce:
case 225: /* def_node: start "image" ref image ">" */
#line 969 "parser.y"
{
- #line 7672 "format.w"
+ #line 7673 "format.w"
DEF((yyval.rf),image_kind,(yyvsp[-2].u));hput_tags((yyvsp[-4].u),hput_image(&((yyvsp[-1].x))));}
#line 3605 "parser.c"
break;
@@ -3607,7 +3607,7 @@ yyreduce:
case 226: /* def_node: start "param" ref parameters ">" */
#line 972 "parser.y"
{
- #line 7673 "format.w"
+ #line 7674 "format.w"
DEF((yyval.rf),param_kind,(yyvsp[-2].u));hput_tags((yyvsp[-4].u),hput_list((yyvsp[-4].u)+2,&((yyvsp[-1].l))));}
#line 3613 "parser.c"
break;
@@ -3615,7 +3615,7 @@ yyreduce:
case 227: /* def_node: start "page" ref page ">" */
#line 975 "parser.y"
{
- #line 7674 "format.w"
+ #line 7675 "format.w"
DEF((yyval.rf),page_kind,(yyvsp[-2].u));hput_tags((yyvsp[-4].u),TAG(page_kind,0));}
#line 3621 "parser.c"
break;
@@ -3623,7 +3623,7 @@ yyreduce:
case 228: /* def_node: start "int" ref ref ">" */
#line 980 "parser.y"
{
- #line 7693 "format.w"
+ #line 7694 "format.w"
DEF_REF((yyval.rf),int_kind,(yyvsp[-2].u),(yyvsp[-1].u));hput_tags((yyvsp[-4].u),TAG(int_kind,0));}
#line 3629 "parser.c"
break;
@@ -3631,7 +3631,7 @@ yyreduce:
case 229: /* def_node: start "dimen" ref ref ">" */
#line 983 "parser.y"
{
- #line 7694 "format.w"
+ #line 7695 "format.w"
DEF_REF((yyval.rf),dimen_kind,(yyvsp[-2].u),(yyvsp[-1].u));hput_tags((yyvsp[-4].u),TAG(dimen_kind,0));}
#line 3637 "parser.c"
break;
@@ -3639,7 +3639,7 @@ yyreduce:
case 230: /* def_node: start "glue" ref ref ">" */
#line 986 "parser.y"
{
- #line 7695 "format.w"
+ #line 7696 "format.w"
DEF_REF((yyval.rf),glue_kind,(yyvsp[-2].u),(yyvsp[-1].u));hput_tags((yyvsp[-4].u),TAG(glue_kind,0));}
#line 3645 "parser.c"
break;
@@ -3647,7 +3647,7 @@ yyreduce:
case 232: /* def_list: def_list def_node */
#line 991 "parser.y"
{
- #line 7809 "format.w"
+ #line 7810 "format.w"
check_param_def(&((yyvsp[0].rf)));}
#line 3653 "parser.c"
break;
@@ -3655,7 +3655,7 @@ yyreduce:
case 233: /* parameters: estimate def_list */
#line 994 "parser.y"
{
- #line 7810 "format.w"
+ #line 7811 "format.w"
(yyval.l).p= (yyvsp[0].u);(yyval.l).k= param_kind;(yyval.l).s= (hpos-hstart)-(yyvsp[0].u);}
#line 3661 "parser.c"
break;
@@ -3663,7 +3663,7 @@ yyreduce:
case 234: /* empty_param_list: position */
#line 998 "parser.y"
{
- #line 7831 "format.w"
+ #line 7832 "format.w"
HPUTX(2);hpos++;hput_tags((yyvsp[0].u),TAG(param_kind,1));}
#line 3669 "parser.c"
break;
@@ -3671,7 +3671,7 @@ yyreduce:
case 235: /* $@12: %empty */
#line 1001 "parser.y"
{
- #line 7832 "format.w"
+ #line 7833 "format.w"
hpos= hpos-2;}
#line 3677 "parser.c"
break;
@@ -3679,7 +3679,7 @@ yyreduce:
case 236: /* non_empty_param_list: start "param" $@12 parameters ">" */
#line 1004 "parser.y"
{
- #line 7833 "format.w"
+ #line 7834 "format.w"
hput_tags((yyvsp[-4].u)-2,hput_list((yyvsp[-4].u)-1,&((yyvsp[-1].l))));}
#line 3685 "parser.c"
break;
@@ -3687,7 +3687,7 @@ yyreduce:
case 238: /* font_head: string dimension UNSIGNED UNSIGNED */
#line 1012 "parser.y"
{
- #line 7975 "format.w"
+ #line 7976 "format.w"
uint8_t f= (yyvsp[-4].u);SET_DBIT(f,font_kind);hfont_name[f]= strdup((yyvsp[-3].s));(yyval.info)= hput_font_head(f,hfont_name[f],(yyvsp[-2].d),(yyvsp[-1].u),(yyvsp[0].u));}
#line 3693 "parser.c"
break;
@@ -3695,7 +3695,7 @@ yyreduce:
case 241: /* font_param: start "penalty" fref penalty ">" */
#line 1019 "parser.y"
{
- #line 7980 "format.w"
+ #line 7981 "format.w"
hput_tags((yyvsp[-4].u),hput_int((yyvsp[-1].i)));}
#line 3701 "parser.c"
break;
@@ -3703,7 +3703,7 @@ yyreduce:
case 242: /* font_param: start "kern" fref kern ">" */
#line 1022 "parser.y"
{
- #line 7981 "format.w"
+ #line 7982 "format.w"
hput_tags((yyvsp[-4].u),hput_kern(&((yyvsp[-1].kt))));}
#line 3709 "parser.c"
break;
@@ -3711,7 +3711,7 @@ yyreduce:
case 243: /* font_param: start "ligature" fref ligature ">" */
#line 1025 "parser.y"
{
- #line 7982 "format.w"
+ #line 7983 "format.w"
hput_tags((yyvsp[-4].u),hput_ligature(&((yyvsp[-1].lg))));}
#line 3717 "parser.c"
break;
@@ -3719,7 +3719,7 @@ yyreduce:
case 244: /* font_param: start "disc" fref disc ">" */
#line 1028 "parser.y"
{
- #line 7983 "format.w"
+ #line 7984 "format.w"
hput_tags((yyvsp[-4].u),hput_disc(&((yyvsp[-1].dc))));}
#line 3725 "parser.c"
break;
@@ -3727,7 +3727,7 @@ yyreduce:
case 245: /* font_param: start "glue" fref glue ">" */
#line 1031 "parser.y"
{
- #line 7984 "format.w"
+ #line 7985 "format.w"
hput_tags((yyvsp[-4].u),hput_glue(&((yyvsp[-1].g))));}
#line 3733 "parser.c"
break;
@@ -3735,7 +3735,7 @@ yyreduce:
case 246: /* font_param: start "language" fref string ">" */
#line 1034 "parser.y"
{
- #line 7985 "format.w"
+ #line 7986 "format.w"
hput_string((yyvsp[-1].s));hput_tags((yyvsp[-4].u),TAG(language_kind,0));}
#line 3741 "parser.c"
break;
@@ -3743,7 +3743,7 @@ yyreduce:
case 247: /* font_param: start "rule" fref rule ">" */
#line 1037 "parser.y"
{
- #line 7986 "format.w"
+ #line 7987 "format.w"
hput_tags((yyvsp[-4].u),hput_rule(&((yyvsp[-1].r))));}
#line 3749 "parser.c"
break;
@@ -3751,7 +3751,7 @@ yyreduce:
case 248: /* font_param: start "image" fref image ">" */
#line 1040 "parser.y"
{
- #line 7987 "format.w"
+ #line 7988 "format.w"
hput_tags((yyvsp[-4].u),hput_image(&((yyvsp[-1].x))));}
#line 3757 "parser.c"
break;
@@ -3759,7 +3759,7 @@ yyreduce:
case 249: /* fref: ref */
#line 1044 "parser.y"
{
- #line 7989 "format.w"
+ #line 7990 "format.w"
RNG("Font parameter",(yyvsp[0].u),0,MAX_FONT_PARAMS);}
#line 3765 "parser.c"
break;
@@ -3767,7 +3767,7 @@ yyreduce:
case 250: /* xdimen_ref: ref */
#line 1048 "parser.y"
{
- #line 8062 "format.w"
+ #line 8063 "format.w"
REF(xdimen_kind,(yyvsp[0].u));}
#line 3773 "parser.c"
break;
@@ -3775,7 +3775,7 @@ yyreduce:
case 251: /* param_ref: ref */
#line 1051 "parser.y"
{
- #line 8063 "format.w"
+ #line 8064 "format.w"
REF(param_kind,(yyvsp[0].u));}
#line 3781 "parser.c"
break;
@@ -3783,7 +3783,7 @@ yyreduce:
case 252: /* stream_ref: ref */
#line 1054 "parser.y"
{
- #line 8064 "format.w"
+ #line 8065 "format.w"
REF_RNG(stream_kind,(yyvsp[0].u));}
#line 3789 "parser.c"
break;
@@ -3791,7 +3791,7 @@ yyreduce:
case 253: /* content_node: start "penalty" ref ">" */
#line 1060 "parser.y"
{
- #line 8068 "format.w"
+ #line 8069 "format.w"
REF(penalty_kind,(yyvsp[-1].u));hput_tags((yyvsp[-3].u),TAG(penalty_kind,0));}
#line 3797 "parser.c"
break;
@@ -3799,7 +3799,7 @@ yyreduce:
case 254: /* content_node: start "kern" explicit ref ">" */
#line 1064 "parser.y"
{
- #line 8070 "format.w"
+ #line 8071 "format.w"
REF(dimen_kind,(yyvsp[-1].u));hput_tags((yyvsp[-4].u),TAG(kern_kind,((yyvsp[-2].b))?b100:b000));}
#line 3805 "parser.c"
break;
@@ -3807,7 +3807,7 @@ yyreduce:
case 255: /* content_node: start "kern" explicit "xdimen" ref ">" */
#line 1068 "parser.y"
{
- #line 8072 "format.w"
+ #line 8073 "format.w"
REF(xdimen_kind,(yyvsp[-1].u));hput_tags((yyvsp[-5].u),TAG(kern_kind,((yyvsp[-3].b))?b101:b001));}
#line 3813 "parser.c"
break;
@@ -3815,7 +3815,7 @@ yyreduce:
case 256: /* content_node: start "glue" ref ">" */
#line 1071 "parser.y"
{
- #line 8073 "format.w"
+ #line 8074 "format.w"
REF(glue_kind,(yyvsp[-1].u));hput_tags((yyvsp[-3].u),TAG(glue_kind,0));}
#line 3821 "parser.c"
break;
@@ -3823,7 +3823,7 @@ yyreduce:
case 257: /* content_node: start "ligature" ref ">" */
#line 1074 "parser.y"
{
- #line 8074 "format.w"
+ #line 8075 "format.w"
REF(ligature_kind,(yyvsp[-1].u));hput_tags((yyvsp[-3].u),TAG(ligature_kind,0));}
#line 3829 "parser.c"
break;
@@ -3831,7 +3831,7 @@ yyreduce:
case 258: /* content_node: start "disc" ref ">" */
#line 1077 "parser.y"
{
- #line 8075 "format.w"
+ #line 8076 "format.w"
REF(disc_kind,(yyvsp[-1].u));hput_tags((yyvsp[-3].u),TAG(disc_kind,0));}
#line 3837 "parser.c"
break;
@@ -3839,7 +3839,7 @@ yyreduce:
case 259: /* content_node: start "rule" ref ">" */
#line 1080 "parser.y"
{
- #line 8076 "format.w"
+ #line 8077 "format.w"
REF(rule_kind,(yyvsp[-1].u));hput_tags((yyvsp[-3].u),TAG(rule_kind,0));}
#line 3845 "parser.c"
break;
@@ -3847,7 +3847,7 @@ yyreduce:
case 260: /* content_node: start "image" ref ">" */
#line 1083 "parser.y"
{
- #line 8077 "format.w"
+ #line 8078 "format.w"
REF(image_kind,(yyvsp[-1].u));hput_tags((yyvsp[-3].u),TAG(image_kind,0));}
#line 3853 "parser.c"
break;
@@ -3855,7 +3855,7 @@ yyreduce:
case 261: /* content_node: start "leaders" ref ">" */
#line 1086 "parser.y"
{
- #line 8078 "format.w"
+ #line 8079 "format.w"
REF(leaders_kind,(yyvsp[-1].u));hput_tags((yyvsp[-3].u),TAG(leaders_kind,0));}
#line 3861 "parser.c"
break;
@@ -3863,7 +3863,7 @@ yyreduce:
case 262: /* content_node: start "baseline" ref ">" */
#line 1089 "parser.y"
{
- #line 8079 "format.w"
+ #line 8080 "format.w"
REF(baseline_kind,(yyvsp[-1].u));hput_tags((yyvsp[-3].u),TAG(baseline_kind,0));}
#line 3869 "parser.c"
break;
@@ -3871,7 +3871,7 @@ yyreduce:
case 263: /* content_node: start "language" REFERENCE ">" */
#line 1092 "parser.y"
{
- #line 8080 "format.w"
+ #line 8081 "format.w"
REF(language_kind,(yyvsp[-1].u));hput_tags((yyvsp[-3].u),hput_language((yyvsp[-1].u)));}
#line 3877 "parser.c"
break;
@@ -3879,7 +3879,7 @@ yyreduce:
case 264: /* glue_node: start "glue" ref ">" */
#line 1096 "parser.y"
{
- #line 8082 "format.w"
+ #line 8083 "format.w"
REF(glue_kind,(yyvsp[-1].u));
if((yyvsp[-1].u)==zero_skip_no){hpos= hpos-2;(yyval.b)= false;}
else{hput_tags((yyvsp[-3].u),TAG(glue_kind,0));(yyval.b)= true;}}
@@ -3889,7 +3889,7 @@ yyreduce:
case 265: /* $@13: %empty */
#line 1103 "parser.y"
{
- #line 8513 "format.w"
+ #line 8514 "format.w"
hput_content_start();}
#line 3895 "parser.c"
break;
@@ -3897,7 +3897,7 @@ yyreduce:
case 266: /* content_section: "<" "content" $@13 content_list ">" */
#line 1106 "parser.y"
{
- #line 8514 "format.w"
+ #line 8515 "format.w"
hput_content_end();hput_range_defs();hput_label_defs();}
#line 3903 "parser.c"
break;
diff --git a/Build/source/texk/web2c/hitexdir/hiparser.h b/Build/source/texk/web2c/hitexdir/hiparser.h
index adc93a5dd9c..90c9d2890b2 100644
--- a/Build/source/texk/web2c/hitexdir/hiparser.h
+++ b/Build/source/texk/web2c/hitexdir/hiparser.h
@@ -147,7 +147,7 @@ union YYSTYPE
{
#line 79 "parser.y"
- #line 10338 "format.w"
+ #line 10341 "format.w"
uint32_t u; int32_t i; char *s; float64_t f; Glyph c;
Dimen d;Stretch st;Xdimen xd;Kern kt;
Rule r;Glue g;Image x;
diff --git a/Build/source/texk/web2c/hitexdir/hitex.w b/Build/source/texk/web2c/hitexdir/hitex.w
index 562a999ba14..26b05626406 100644
--- a/Build/source/texk/web2c/hitexdir/hitex.w
+++ b/Build/source/texk/web2c/hitexdir/hitex.w
@@ -324,7 +324,10 @@ known as `\Prote'.
@d Prote_banner "This is Prote, Version " Prote_version_string
/*printed when \Prote\ starts*/
@#
-@d banner "This is HiTeX, Version 3.141592653-" HiTeX_version_string /*printed when \TeX\ starts*/
+@d QUOTE(X) #X
+@d HINT_VER_STR(X,Y) "HINT version " QUOTE(X) "." QUOTE(Y)
+@d banner "This is HiTeX, Version 3.141592653, " HINT_VER_STR(HINT_VERSION,HINT_SUB_VERSION)
+ /*printed when \TeX\ starts*/
@ Different \PASCAL s have slightly different conventions, and the present
@!@:PASCAL H}{\ph@>
@@ -873,7 +876,8 @@ implement \TeX\ can open a file whose external name is specified by
@^system dependencies@>
@<Glob...@>=
-static unsigned char @!name_of_file0[file_name_size+1]={0}, *const @!name_of_file = @!name_of_file0-1;@;@/
+static unsigned char @!name_of_file0[file_name_size+1]={0},
+ *const @!name_of_file = @!name_of_file0-1;@;@/
/*on some systems this may be a \&{record} variable*/
static int @!name_length;@/ /*this many characters are actually
relevant in |name_of_file| (the rest are blank)*/
@@ -1982,7 +1986,9 @@ been commented~out.
@<Interpret code |c| and |return| if done@>=
switch (c) {
-case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (deletions_allowed)
+case '0': case '1': case '2': case '3':
+ case '4': case '5': case '6': case '7':
+ case '8': case '9': if (deletions_allowed)
@<Delete \(c)|c-"0"| tokens and |goto continue|@>@;@+break;
@t\4\4@>@;
#ifdef @!DEBUG
@@ -2645,7 +2651,8 @@ spend about 9\pct! of its running time allocating nodes, and about 6\pct!
deallocating them after their use.
@<Glob...@>=
-static memory_word @!mem0[mem_max-mem_min+1], *const @!mem = @!mem0-mem_min; /*the big dynamic storage area*/
+static memory_word @!mem0[mem_max-mem_min+1],
+ *const @!mem = @!mem0-mem_min; /*the big dynamic storage area*/
static pointer @!lo_mem_max; /*the largest location of variable-size memory in use*/
static pointer @!hi_mem_min; /*the smallest location of one-word memory in use*/
@@ -2803,8 +2810,8 @@ pointer @!q; /*the node physically after node |p|*/
int @!r; /*the newly allocated node, or a candidate for this honor*/
int @!t; /*temporary register*/
restart: p=rover; /*start at some free node in the ring*/
-@/do@+{@<Try to allocate within node |p| and its physical successors, and |goto found|
-if allocation was possible@>;
+@/do@+{@<Try to allocate within node |p| and its physical successors, and
+|goto found| if allocation was possible@>;
@^inner loop@>
p=rlink(p); /*move to the next node in the ring*/
}@+ while (!(p==rover)); /*repeat until the whole list has been traversed*/
@@ -2906,8 +2913,8 @@ static void sort_avail(void) /*sorts the available variable-size nodes
pointer @!old_rover; /*initial |rover| setting*/
p=get_node(010000000000); /*merge adjacent free areas*/
p=rlink(rover);rlink(rover)=max_halfword;old_rover=rover;
-while (p!=old_rover) @<Sort \(p)|p| into the list starting at |rover| and advance
-|p| to |rlink(p)|@>;
+while (p!=old_rover) @<Sort \(p)|p| into the list starting at |rover| and
+advance |p| to |rlink(p)|@>;
p=rover;
while (rlink(p)!=max_halfword)
{@+llink(rlink(p))=p;p=rlink(p);
@@ -3498,8 +3505,10 @@ are debugging.)
@<Glob...@>=
#ifdef @!DEBUG
-static bool @!is_free0[mem_max-mem_min+1], *const @!is_free = @!is_free0-mem_min; /*free cells*/
-@t\hskip10pt@>static bool @!was_free0[mem_max-mem_min+1], *const @!was_free = @!was_free0-mem_min;
+static bool @!is_free0[mem_max-mem_min+1],
+ *const @!is_free = @!is_free0-mem_min; /*free cells*/
+@t\hskip10pt@>static bool @!was_free0[mem_max-mem_min+1],
+ *const @!was_free = @!was_free0-mem_min;
/*previously free cells*/
@t\hskip10pt@>static pointer @!was_mem_end, @!was_lo_max, @!was_hi_min;
/*previous |mem_end|, |lo_mem_max|, and |hi_mem_min|*/
@@ -3678,7 +3687,8 @@ while (p > mem_min)
@ @<Print a short indication of the contents of node |p|@>=
switch (type(p)) {
-case hlist_node: case vlist_node: case ins_node: case whatsit_node: case mark_node: case adjust_node:
+case hlist_node: case vlist_node: case ins_node:
+ case whatsit_node: case mark_node: case adjust_node:
case unset_node: case unset_set_node: case unset_pack_node: print("[]");@+break;
case rule_node: print_char('|');@+break;
case glue_node: if (glue_ptr(p)!=zero_glue) print_char(' ');@+break;
@@ -4056,7 +4066,8 @@ while (p!=null)
{@+q=link(p);
if (is_char_node(p)) free_avail(p)@;
else{@+switch (type(p)) {
- case hlist_node: case vlist_node: case unset_node: case unset_set_node: case unset_pack_node: {@+flush_node_list(list_ptr(p));
+ case hlist_node: case vlist_node: case unset_node:
+ case unset_set_node: case unset_pack_node: {@+flush_node_list(list_ptr(p));
free_node(p, box_node_size);goto done;
}
case rule_node: {@+free_node(p, rule_node_size);goto done;
@@ -4129,15 +4140,16 @@ return q;
@ @<Make a copy of node |p|...@>=
words=1; /*this setting occurs in more branches than any other*/
if (is_char_node(p)) r=get_avail();
-else@<Case statement to copy different types and set |words| to the number of initial
-words not yet copied@>;
+else@<Case statement to copy different types and set |words| to the number
+of initial words not yet copied@>;
while (words > 0)
{@+decr(words);mem[r+words]=mem[p+words];
}
@ @<Case statement to copy...@>=
switch (type(p)) {
-case hlist_node: case vlist_node: case unset_node: case unset_set_node: case unset_pack_node: {@+r=get_node(box_node_size);
+case hlist_node: case vlist_node: case unset_node:
+case unset_set_node: case unset_pack_node: {@+r=get_node(box_node_size);
mem[r+6]=mem[p+6];mem[r+5]=mem[p+5]; /*copy the last two words*/
list_ptr(r)=copy_node_list(list_ptr(p)); /*this affects |mem[r+5]|*/
words=5;
@@ -4149,8 +4161,8 @@ case ins_node: {@+r=get_node(ins_node_size);mem[r+4]=mem[p+4];
ins_ptr(r)=copy_node_list(ins_ptr(p)); /*this affects |mem[r+4]|*/
words=ins_node_size-1;
} @+break;
-case whatsit_node: @<Make a partial copy of the whatsit node |p| and make |r| point
-to it; set |words| to the number of initial words not yet copied@>@;@+break;
+case whatsit_node: @<Make a partial copy of the whatsit node |p| and make
+|r| point to it; set |words| to the number of initial words not yet copied@>@;@+break;
case glue_node: {@+r=get_node(small_node_size);add_glue_ref(glue_ptr(p));
glue_ptr(r)=glue_ptr(p);leader_ptr(r)=copy_node_list(leader_ptr(p));
} @+break;
@@ -5670,12 +5682,16 @@ but \TeX\ needs to store the |eq_level| information in another array
called |xeq_level|.
@<Glob...@>=
-static memory_word @!eqtb0[eqtb_size-active_base+1], *const @!eqtb = @!eqtb0-active_base;
-static memory_word hfactor_eqtb0[dimen_pars+256]={{{0}}}, *const @!hfactor_eqtb = @!hfactor_eqtb0-dimen_base;
-static memory_word vfactor_eqtb0[dimen_pars+256]={{{0}}}, *const @!vfactor_eqtb = @!vfactor_eqtb0-dimen_base;
+static memory_word @!eqtb0[eqtb_size-active_base+1],
+ *const @!eqtb = @!eqtb0-active_base;
+static memory_word hfactor_eqtb0[dimen_pars+256]={{{0}}},
+ *const @!hfactor_eqtb = @!hfactor_eqtb0-dimen_base;
+static memory_word vfactor_eqtb0[dimen_pars+256]={{{0}}},
+ *const @!vfactor_eqtb = @!vfactor_eqtb0-dimen_base;
static scaled par_shape_hfactor=0, par_shape_vfactor=0;
static scaled hhsize=0,hvsize=0;
-static quarterword @!xeq_level0[eqtb_size-int_base+1], *const @!xeq_level = @!xeq_level0-int_base;
+static quarterword @!xeq_level0[eqtb_size-int_base+1],
+ *const @!xeq_level = @!xeq_level0-int_base;
@ @<Set init...@>=
for (k=int_base; k<=eqtb_size; k++) xeq_level[k]=level_one;
@@ -5722,7 +5738,8 @@ A global boolean variable called |no_new_control_sequence| is set to
@d font_id_text(A) text(font_id_base+A) /*a frozen font identifier's name*/
@<Glob...@>=
-static two_halves @!hash0[undefined_control_sequence-hash_base], *const @!hash = @!hash0-hash_base;
+static two_halves @!hash0[undefined_control_sequence-hash_base],
+ *const @!hash = @!hash0-hash_base;
/*the hash table*/
static pointer @!hash_used; /*allocation pointer for |hash|*/
static bool @!no_new_control_sequence; /*are new identifiers legal?*/
@@ -5761,7 +5778,8 @@ loop@+{@+if (text(p) > 0) if (length(text(p))==l)
if (next(p)==0)
{@+if (no_new_control_sequence)
p=undefined_control_sequence;
- else@<Insert a new control sequence after |p|, then make |p| point to it@>;
+ else@<Insert a new control sequence after |p|, then make |p| point to
+it@>;
goto found;
}
p=next(p);
@@ -6219,7 +6237,8 @@ within |save_stack|, so these counts must be handled carefully.
@p static void eq_destroy(memory_word @!w) /*gets ready to forget |w|*/
{@+pointer q; /*|equiv| field of |w|*/
switch (eq_type_field(w)) {
-case call: case long_call: case outer_call: case long_outer_call: delete_token_ref(equiv_field(w));@+break;
+case call: case long_call: case outer_call:
+ case long_outer_call: delete_token_ref(equiv_field(w));@+break;
case glue_ref: delete_glue_ref(equiv_field(w));@+break;
case shape_ref: {@+q=equiv_field(w); /*we need to free a \.{\\parshape} block*/
if (q!=null) free_node(q, info(q)+info(q)+1);
@@ -6384,8 +6403,8 @@ loop@+{@+decr(save_ptr);
{@+l=save_level(save_ptr);decr(save_ptr);
}
else save_stack[save_ptr]=eqtb[undefined_control_sequence];
- @<Store \(s)|save_stack[save_ptr]| in |eqtb[p]|, unless |eqtb[p]| holds a global
-value@>;
+ @<Store \(s)|save_stack[save_ptr]| in |eqtb[p]|, unless |eqtb[p]| holds
+a global value@>;
}
}
done:
@@ -6646,7 +6665,9 @@ parameters by seeing one in a |match| command before it runs into any
@<Display the token...@>=
switch (m) {
-case left_brace: case right_brace: case math_shift: case tab_mark: case sup_mark: case sub_mark: case spacer:
+case left_brace: case right_brace: case math_shift:
+ case tab_mark: case sup_mark: case sub_mark:
+ case spacer:
case letter: case other_char: printn(c);@+break;
case mac_param: {@+printn(c);printn(c);
} @+break;
@@ -6936,9 +6957,11 @@ by analogy with |line_stack|.
@<Glob...@>=
static int @!in_open; /*the number of lines in the buffer, less one*/
static int @!open_parens; /*the number of open text files*/
-static alpha_file @!input_file0[max_in_open], *const @!input_file = @!input_file0-1;
+static alpha_file @!input_file0[max_in_open],
+ *const @!input_file = @!input_file0-1;
static int @!line; /*current line number in the current source file*/
-static int @!line_stack0[max_in_open], *const @!line_stack = @!line_stack0-1;
+static int @!line_stack0[max_in_open],
+ *const @!line_stack = @!line_stack0-1;
@ Users of \TeX\ sometimes forget to balance left and right braces properly,
and one of the ways \TeX\ tries to spot such errors is by considering an
@@ -7594,8 +7617,8 @@ else{@+cur_cs=0;print_err("Forbidden control sequence found");
@.Forbidden control sequence...@>
}
print(" while scanning ");
-@<Print either `\.{definition}' or `\.{use}' or `\.{preamble}' or `\.{text}', and
-insert tokens that should lead to recovery@>;
+@<Print either `\.{definition}' or `\.{use}' or `\.{preamble}' or `\.{text}',
+and insert tokens that should lead to recovery@>;
print(" of ");sprint_cs(warning_index);
help4("I suspect you have forgotten a `}', causing me",@/
"to read past where you wanted me to stop.",@/
@@ -7651,8 +7674,8 @@ int @!d; /*number of excess characters in an expanded code*/
restart: cur_cs=0;
if (state!=token_list)
@<Input from external file, |goto restart| if no input found@>@;
-else@<Input from token list, |goto restart| if end of list or if a parameter needs
-to be expanded@>;
+else@<Input from token list, |goto restart| if end of list or if a parameter
+needs to be expanded@>;
@<If an alignment entry has just ended, take appropriate action@>;
}
@@ -7671,12 +7694,13 @@ if (cur_cmd <= car_ret) if (cur_cmd >= tab_mark) if (align_state==0)
{@+get_cur_chr: if (loc <= limit) /*current line not yet finished*/
{@+cur_chr=buffer[loc];incr(loc);
reswitch: cur_cmd=cat_code(cur_chr);
- @<Change state if necessary, and |goto switch| if the current character should be
-ignored, or |goto reswitch| if the current character changes to another@>;
+ @<Change state if necessary, and |goto switch| if the current character
+should be ignored, or |goto reswitch| if the current character changes to
+another@>;
}
else{@+state=new_line;@/
- @<Move to next line of file, or |goto restart| if there is no next line, or |return|
-if a \.{\\read} line has finished@>;
+ @<Move to next line of file, or |goto restart| if there is no next line,
+or |return| if a \.{\\read} line has finished@>;
check_interrupt;
goto get_cur_chr;
}
@@ -7688,24 +7712,26 @@ values for |mid_line|, |skip_blanks|, and |new_line| are spaced
apart from each other by |max_char_code+1|, so we can add a character's
command code to the state to get a single number that characterizes both.
-@d any_state_plus(A) case mid_line+A: case skip_blanks+A: case new_line+A
+@d any_state_plus(A) case mid_line+A:
+ case skip_blanks+A: case new_line+A
@<Change state if necessary...@>=
switch (state+cur_cmd) {
@<Cases where character is ignored@>: goto get_cur_chr;
-any_state_plus(escape): @<Scan a control sequence and set |state:=skip_blanks| or
-|mid_line|@>@;@+break;
-any_state_plus(active_char): @<Process an active-character control sequence and set
-|state:=mid_line|@>@;@+break;
-any_state_plus(sup_mark): @<If this |sup_mark| starts an expanded character like~\.{\^\^A}
-or~\.{\^\^df}, then |goto reswitch|, otherwise set |state:=mid_line|@>@;@+break;
+any_state_plus(escape): @<Scan a control sequence and set |state:=skip_blanks|
+or |mid_line|@>@;@+break;
+any_state_plus(active_char): @<Process an active-character control sequence
+and set |state:=mid_line|@>@;@+break;
+any_state_plus(sup_mark): @<If this |sup_mark| starts an expanded character
+like~\.{\^\^A} or~\.{\^\^df}, then |goto reswitch|, otherwise set |state:=mid_line|@>@;@+break;
any_state_plus(invalid_char): @<Decry the invalid character and |goto restart|@>@;
@t\4@>@<Handle situations involving spaces, braces, changes of state@>@;
default:do_nothing;
}
@ @<Cases where character is ignored@>=
-any_state_plus(ignore): case skip_blanks+spacer: case new_line+spacer
+any_state_plus(ignore): case skip_blanks+spacer:
+ case new_line+spacer
@ We go to |restart| instead of to |get_cur_chr|, because |state| might equal
|token_list| after the error has been dealt with
@@ -7737,7 +7763,8 @@ case mid_line+right_brace: decr(align_state);@+break;
case skip_blanks+right_brace: case new_line+right_brace: {@+
state=mid_line;decr(align_state);
} @+break;
-add_delims_to(case skip_blanks): add_delims_to(case new_line): state=mid_line;@+break;
+add_delims_to(case skip_blanks): add_delims_to(
+ case new_line): state=mid_line;@+break;
@ When a character of type |spacer| gets through, its character code is
changed to $\.{"\ "}=040$. This means that the ASCII codes for tab and space,
@@ -7818,9 +7845,9 @@ else{@+start_cs: k=loc;cur_chr=buffer[k];cat=cat_code(cur_chr);
else if (cat==spacer) state=skip_blanks;
else state=mid_line;
if ((cat==letter)&&(k <= limit))
- @<Scan ahead in the buffer until finding a nonletter; if an expanded code is encountered,
-reduce it and |goto start_cs|; otherwise if a multiletter control sequence is found,
-adjust |cur_cs| and |loc|, and |goto found|@>@;
+ @<Scan ahead in the buffer until finding a nonletter; if an expanded code
+is encountered, reduce it and |goto start_cs|; otherwise if a multiletter
+control sequence is found, adjust |cur_cs| and |loc|, and |goto found|@>@;
else@<If an expanded code is present, reduce it and |goto start_cs|@>;
cur_cs=single_base+buffer[loc];incr(loc);
}
@@ -7869,8 +7896,8 @@ if (k > loc+1) /*multiletter control sequence has been scanned*/
@ Let's consider now what happens when |get_next| is looking at a token list.
-@<Input from token list, |goto restart| if end of list or if a parameter needs to
-be expanded@>=
+@<Input from token list, |goto restart| if end of list or if a parameter needs
+to be expanded@>=
if (loc!=null) /*list not exhausted*/
@^inner loop@>
{@+t=info(loc);loc=link(loc); /*move to next*/
@@ -7920,8 +7947,8 @@ There is one more branch.
@d end_line_char_inactive (end_line_char < 0)||(end_line_char > 255)
@<Move to next line of file, or |goto restart|...@>=
-if (name > 17) @<Read next line of file into |buffer|, or |goto restart| if the file
-has ended@>@;
+if (name > 17) @<Read next line of file into |buffer|, or |goto restart| if
+the file has ended@>@;
else{@+if (!terminal_input) /*\.{\\read} line has ended*/
{@+cur_cmd=0;cur_chr=0;return;
}
@@ -7955,7 +7982,8 @@ by an \.{\\endinput} command.
@<Glob...@>=
static bool @!force_eof; /*should the next \.{\\input} be aborted early?*/
-@ @<Read next line of file into |buffer|, or |goto restart| if the file has ended@>=
+@ @<Read next line of file into |buffer|, or |goto restart| if the file has
+ended@>=
{@+incr(line);first=start;
if (!force_eof)
if (name <= 19)
@@ -8299,7 +8327,8 @@ array by symbolic names |top_mark|, etc. The value of |top_mark| is either
@d split_bot_mark cur_mark[split_bot_mark_code]
@<Glob...@>=
-static pointer @!cur_mark0[split_bot_mark_code-top_mark_code+1], *const @!cur_mark = @!cur_mark0-top_mark_code;
+static pointer @!cur_mark0[split_bot_mark_code-top_mark_code+1],
+ *const @!cur_mark = @!cur_mark0-top_mark_code;
/*token lists for marks*/
@ @<Set init...@>=
@@ -8396,8 +8425,8 @@ warning_index=cur_cs;ref_count=cur_chr;r=link(ref_count);n=0;
if (tracing_macros > 0) @<Show the text of the macro being expanded@>;
if (info(r)==protected_token) r=link(r);
if (info(r)!=end_match_token)
- @<Scan the parameters and make |link(r)| point to the macro body; but |return| if
-an illegal \.{\\par} is detected@>;
+ @<Scan the parameters and make |link(r)| point to the macro body; but |return|
+if an illegal \.{\\par} is detected@>;
@<Feed the macro body and its parameters to the scanner@>;
end: scanner_status=save_scanner_status;warning_index=save_warning_index;
}
@@ -8440,8 +8469,8 @@ if ((info(r) > match_token+255)||(info(r) < match_token)) s=null;
else{@+match_chr=info(r)-match_token;s=link(r);r=s;
p=temp_head;m=0;
}
-@<Scan a parameter until its delimiter string has been found; or, if |s=null|, simply
-scan the delimiter string@>;@/
+@<Scan a parameter until its delimiter string has been found; or, if |s=null|,
+simply scan the delimiter string@>;@/
/*now |info(r)| is a token whose command code is either |match| or |end_match|*/
}@+ while (!(info(r)==end_match_token));
}
@@ -8454,18 +8483,18 @@ always fail the test `|cur_tok==info(r)|' in the following algorithm.
@<Scan a parameter until its delimiter string has been found; or,...@>=
resume: get_token(); /*set |cur_tok| to the next token of input*/
if (cur_tok==info(r))
- @<Advance \(r)|r|; |goto found| if the parameter delimiter has been fully matched,
-otherwise |goto continue|@>;
-@<Contribute the recently matched tokens to the current parameter, and |goto continue|
-if a partial match is still in effect; but abort if |s=null|@>;
+ @<Advance \(r)|r|; |goto found| if the parameter delimiter has been fully
+matched, otherwise |goto continue|@>;
+@<Contribute the recently matched tokens to the current parameter, and |goto
+continue| if a partial match is still in effect; but abort if |s=null|@>;
if (cur_tok==par_token) if (long_state!=long_call)
@<Report a runaway argument and abort@>;
if (cur_tok < right_brace_limit)
if (cur_tok < left_brace_limit)
@<Contribute an entire group to the current parameter@>@;
else@<Report an extra right brace and |goto continue|@>@;
-else@<Store the current token, but |goto continue| if it is a blank space that would
-become an undelimited parameter@>;
+else@<Store the current token, but |goto continue| if it is a blank space
+that would become an undelimited parameter@>;
incr(m);
if (info(r) > end_match_token) goto resume;
if (info(r) < match_token) goto resume;
@@ -8786,8 +8815,9 @@ int @!p; /*index into |nest|*/
m=cur_chr;
switch (cur_cmd) {
case def_code: @<Fetch a character code from some table@>@;@+break;
-case toks_register: case assign_toks: case def_family: case set_font: case def_font: @<Fetch
-a token list or font identifier, provided that |level=tok_val|@>@;@+break;
+case toks_register: case assign_toks:
+ case def_family: case set_font: case def_font: @<Fetch a token list or font
+identifier, provided that |level=tok_val|@>@;@+break;
case assign_int: scanned_result(eqtb[m].i, int_val)@;@+break;
case assign_dimen:
scanned_result(eqtb[m].sc, dimen_val);
@@ -9346,7 +9376,8 @@ cur_hfactor=cur_vfactor=0;
if (!shortcut)
{@+@<Get the next non-blank non-sign...@>;
if ((cur_cmd >= min_internal)&&(cur_cmd <= max_internal))
- @<Fetch an internal dimension and |goto attach_sign|, or fetch an internal integer@>@;
+ @<Fetch an internal dimension and |goto attach_sign|, or fetch an internal
+integer@>@;
else{@+back_input();
if (cur_tok==continental_point_token) cur_tok=point_token;
if (cur_tok!=point_token) scan_int();
@@ -9359,8 +9390,8 @@ if (!shortcut)
if (cur_val < 0) /*in this case |f==0|*/
{@+negative=!negative;negate(cur_val);
}
-@<Scan units and set |cur_val| to $x\cdot(|cur_val|+f/2^{16})$, where there are |x|
-sp per unit; |goto attach_sign| if the units are internal@>;
+@<Scan units and set |cur_val| to $x\cdot(|cur_val|+f/2^{16})$, where there
+are |x| sp per unit; |goto attach_sign| if the units are internal@>;
@<Scan an optional space@>;
attach_sign:
if (arith_error||(abs(cur_val) >= 010000000000)||
@@ -9427,15 +9458,15 @@ does not overflow.
@<Scan units and set |cur_val| to $x\cdot(|cur_val|+f/2^{16})$...@>=
if (inf) @<Scan for \(f)\.{fil} units; |goto attach_fraction| if found@>;
-@<Scan for \(u)units that are internal dimensions; |goto attach_sign| with |cur_val|
-set if found@>;
+@<Scan for \(u)units that are internal dimensions; |goto attach_sign| with
+|cur_val| set if found@>;
if (mu) @<Scan for \(m)\.{mu} units and |goto attach_fraction|@>;
if (scan_keyword("true")) @<Adjust \(f)for the magnification ratio@>;
@.true@>
if (scan_keyword("pt")) goto attach_fraction; /*the easy case*/
@.pt@>
-@<Scan for \(a)all other units and adjust |cur_val| and |f| accordingly; |goto done|
-in the case of scaled points@>;
+@<Scan for \(a)all other units and adjust |cur_val| and |f| accordingly; |goto
+done| in the case of scaled points@>;
attach_fraction: if (cur_val >= 040000) arith_error=true;
else cur_val=cur_val*unity+f;
done:
@@ -9595,8 +9626,8 @@ if ((cur_cmd >= min_internal)&&(cur_cmd <= max_internal))
else{@+back_input();scan_dimen(mu, false, false);
if (negative) { negate(cur_val); negate(cur_hfactor); negate(cur_vfactor);}
}
-@<Create a new glue specification whose width is |cur_val|; scan for its stretch and
-shrink components@>;
+@<Create a new glue specification whose width is |cur_val|; scan for its stretch
+and shrink components@>;
}
@#
@<Declare procedures needed for expressions@>@;
@@ -9863,9 +9894,9 @@ return p;
{@+loop{@+resume: get_token(); /*set |cur_cmd|, |cur_chr|, |cur_tok|*/
if (cur_tok < right_brace_limit) goto done1;
if (cur_cmd==mac_param)
- @<If the next character is a parameter number, make |cur_tok| a |match| token;
-but if it is a left brace, store `|left_brace|, |end_match|', set |hash_brace|, and
-|goto done|@>;
+ @<If the next character is a parameter number, make |cur_tok| a |match|
+token; but if it is a left brace, store `|left_brace|, |end_match|', set |hash_brace|,
+and |goto done|@>;
store_new_token(cur_tok);
}
done1: store_new_token(end_match_token);
@@ -10303,7 +10334,8 @@ case if_vmode_code: b=(abs(mode)==vmode);@+break;
case if_hmode_code: b=(abs(mode)==hmode);@+break;
case if_mmode_code: b=(abs(mode)==mmode);@+break;
case if_inner_code: b=(mode < 0);@+break;
-case if_void_code: case if_hbox_code: case if_vbox_code: @<Test box register status@>@;@+break;
+case if_void_code: case if_hbox_code:
+ case if_vbox_code: @<Test box register status@>@;@+break;
case ifx_code: @<Test if two tokens match@>@;@+break;
case if_eof_code: {@+scan_four_bit_int();b=(read_open[cur_val]==closed);
} @+break;
@@ -11243,31 +11275,46 @@ static memory_word @!font_info[font_mem_size+1];
/*the big collection of font data*/
static font_index @!fmem_ptr; /*first unused word of |font_info|*/
static internal_font_number @!font_ptr; /*largest internal font number in use*/
-static four_quarters @!font_check0[font_max-font_base+1], *const @!font_check = @!font_check0-font_base; /*check sum*/
-static scaled @!font_size0[font_max-font_base+1], *const @!font_size = @!font_size0-font_base; /*``at'' size*/
-static scaled @!font_dsize0[font_max-font_base+1], *const @!font_dsize = @!font_dsize0-font_base; /*``design'' size*/
-static font_index @!font_params0[font_max-font_base+1], *const @!font_params = @!font_params0-font_base; /*how many font
+static four_quarters @!font_check0[font_max-font_base+1],
+ *const @!font_check = @!font_check0-font_base; /*check sum*/
+static scaled @!font_size0[font_max-font_base+1],
+ *const @!font_size = @!font_size0-font_base; /*``at'' size*/
+static scaled @!font_dsize0[font_max-font_base+1],
+ *const @!font_dsize = @!font_dsize0-font_base; /*``design'' size*/
+static font_index @!font_params0[font_max-font_base+1],
+ *const @!font_params = @!font_params0-font_base; /*how many font
parameters are present*/
-static str_number @!font_name0[font_max-font_base+1], *const @!font_name = @!font_name0-font_base; /*name of the font*/
-static str_number @!font_area0[font_max-font_base+1], *const @!font_area = @!font_area0-font_base; /*area of the font*/
-static eight_bits @!font_bc0[font_max-font_base+1], *const @!font_bc = @!font_bc0-font_base;
+static str_number @!font_name0[font_max-font_base+1],
+ *const @!font_name = @!font_name0-font_base; /*name of the font*/
+static str_number @!font_area0[font_max-font_base+1],
+ *const @!font_area = @!font_area0-font_base; /*area of the font*/
+static eight_bits @!font_bc0[font_max-font_base+1],
+ *const @!font_bc = @!font_bc0-font_base;
/*beginning (smallest) character code*/
-static eight_bits @!font_ec0[font_max-font_base+1], *const @!font_ec = @!font_ec0-font_base;
+static eight_bits @!font_ec0[font_max-font_base+1],
+ *const @!font_ec = @!font_ec0-font_base;
/*ending (largest) character code*/
-static pointer @!font_glue0[font_max-font_base+1], *const @!font_glue = @!font_glue0-font_base;
+static pointer @!font_glue0[font_max-font_base+1],
+ *const @!font_glue = @!font_glue0-font_base;
/*glue specification for interword space, |null| if not allocated*/
-static bool @!font_used0[font_max-font_base+1], *const @!font_used = @!font_used0-font_base;
+static bool @!font_used0[font_max-font_base+1],
+ *const @!font_used = @!font_used0-font_base;
/*has a character from this font actually appeared in the output?*/
-static int @!hyphen_char0[font_max-font_base+1], *const @!hyphen_char = @!hyphen_char0-font_base;
+static int @!hyphen_char0[font_max-font_base+1],
+ *const @!hyphen_char = @!hyphen_char0-font_base;
/*current \.{\\hyphenchar} values*/
-static int @!skew_char0[font_max-font_base+1], *const @!skew_char = @!skew_char0-font_base;
+static int @!skew_char0[font_max-font_base+1],
+ *const @!skew_char = @!skew_char0-font_base;
/*current \.{\\skewchar} values*/
-static font_index @!bchar_label0[font_max-font_base+1], *const @!bchar_label = @!bchar_label0-font_base;
+static font_index @!bchar_label0[font_max-font_base+1],
+ *const @!bchar_label = @!bchar_label0-font_base;
/*start of |lig_kern| program for left boundary character,
|non_address| if there is none*/
-static int16_t @!font_bchar0[font_max-font_base+1], *const @!font_bchar = @!font_bchar0-font_base;
+static int16_t @!font_bchar0[font_max-font_base+1],
+ *const @!font_bchar = @!font_bchar0-font_base;
/*boundary character, |non_char| if there is none*/
-static int16_t @!font_false_bchar0[font_max-font_base+1], *const @!font_false_bchar = @!font_false_bchar0-font_base;
+static int16_t @!font_false_bchar0[font_max-font_base+1],
+ *const @!font_false_bchar = @!font_false_bchar0-font_base;
/*|font_bchar| if it doesn't exist in the font, otherwise |non_char|*/
@ Besides the arrays just enumerated, we have directory arrays that make it
@@ -11280,23 +11327,32 @@ part of this word (the |b0| field), the width of the character is
stores its quarterwords that way.)
@<Glob...@>=
-static int @!char_base0[font_max-font_base+1], *const @!char_base = @!char_base0-font_base;
+static int @!char_base0[font_max-font_base+1],
+ *const @!char_base = @!char_base0-font_base;
/*base addresses for |char_info|*/
-static int @!width_base0[font_max-font_base+1], *const @!width_base = @!width_base0-font_base;
+static int @!width_base0[font_max-font_base+1],
+ *const @!width_base = @!width_base0-font_base;
/*base addresses for widths*/
-static int @!height_base0[font_max-font_base+1], *const @!height_base = @!height_base0-font_base;
+static int @!height_base0[font_max-font_base+1],
+ *const @!height_base = @!height_base0-font_base;
/*base addresses for heights*/
-static int @!depth_base0[font_max-font_base+1], *const @!depth_base = @!depth_base0-font_base;
+static int @!depth_base0[font_max-font_base+1],
+ *const @!depth_base = @!depth_base0-font_base;
/*base addresses for depths*/
-static int @!italic_base0[font_max-font_base+1], *const @!italic_base = @!italic_base0-font_base;
+static int @!italic_base0[font_max-font_base+1],
+ *const @!italic_base = @!italic_base0-font_base;
/*base addresses for italic corrections*/
-static int @!lig_kern_base0[font_max-font_base+1], *const @!lig_kern_base = @!lig_kern_base0-font_base;
+static int @!lig_kern_base0[font_max-font_base+1],
+ *const @!lig_kern_base = @!lig_kern_base0-font_base;
/*base addresses for ligature/kerning programs*/
-static int @!kern_base0[font_max-font_base+1], *const @!kern_base = @!kern_base0-font_base;
+static int @!kern_base0[font_max-font_base+1],
+ *const @!kern_base = @!kern_base0-font_base;
/*base addresses for kerns*/
-static int @!exten_base0[font_max-font_base+1], *const @!exten_base = @!exten_base0-font_base;
+static int @!exten_base0[font_max-font_base+1],
+ *const @!exten_base = @!exten_base0-font_base;
/*base addresses for extensible recipes*/
-static int @!param_base0[font_max-font_base+1], *const @!param_base = @!param_base0-font_base;
+static int @!param_base0[font_max-font_base+1],
+ *const @!param_base = @!param_base0-font_base;
/*base addresses for font parameters*/
@ @<Set init...@>=
@@ -11442,9 +11498,9 @@ scaled @!z; /*the design size or the ``at'' size*/
int @!alpha;int @!beta;
/*auxiliary quantities used in fixed-point multiplication*/
g=null_font;@/
-@<Read and check the font data; |abort| if the \.{TFM} file is malformed; if there's
-no room for this font, say so and |goto done|; otherwise |incr(font_ptr)| and |goto
-done|@>;
+@<Read and check the font data; |abort| if the \.{TFM} file is malformed;
+if there's no room for this font, say so and |goto done|; otherwise |incr(font_ptr)|
+and |goto done|@>;
bad_tfm: @<Report that the font won't be loaded@>;
done: if (file_opened) b_close(&tfm_file);
return g;
@@ -12602,10 +12658,11 @@ if (o==down1)
}
else{@+link(q)=right_ptr;right_ptr=q;
}
-@<Look at the other stack entries until deciding what sort of \.{DVI} command to generate;
-|goto found| if node |p| is a ``hit''@>;
+@<Look at the other stack entries until deciding what sort of \.{DVI} command
+to generate; |goto found| if node |p| is a ``hit''@>;
@<Generate a |down| or |right| command for |w| and |return|@>;
-found: @<Generate a |y0| or |z0| command in order to reuse a previous appearance of~|w|@>;
+found: @<Generate a |y0| or |z0| command in order to reuse a previous appearance
+of~|w|@>;
}
@ The |info| fields in the entries of the down stack or the right stack
@@ -12708,8 +12765,8 @@ decision-making.
@<Look at the other stack entries until deciding...@>=
p=link(q);mstate=none_seen;
while (p!=null)
- {@+if (width(p)==w) @<Consider a node with matching width; |goto found| if it's
-a hit@>@;
+ {@+if (width(p)==w) @<Consider a node with matching width; |goto found|
+if it's a hit@>@;
else switch (mstate+info(p)) {
case none_seen+y_here: mstate=y_seen;@+break;
case none_seen+z_here: mstate=z_seen;@+break;
@@ -12726,13 +12783,16 @@ moving finger writes, $\ldots\,\,$.''
@<Consider a node with matching width...@>=
switch (mstate+info(p)) {
-case none_seen+yz_OK: case none_seen+y_OK: case z_seen+yz_OK: case z_seen+y_OK: @t@>@;@/
+case none_seen+yz_OK: case none_seen+y_OK:
+ case z_seen+yz_OK: case z_seen+y_OK: @t@>@;@/
if (location(p) < dvi_gone) goto not_found;
else@<Change buffered instruction to |y| or |w| and |goto found|@>@;@+break;
-case none_seen+z_OK: case y_seen+yz_OK: case y_seen+z_OK: @t@>@;@/
+case none_seen+z_OK: case y_seen+yz_OK:
+ case y_seen+z_OK: @t@>@;@/
if (location(p) < dvi_gone) goto not_found;
else@<Change buffered instruction to |z| or |x| and |goto found|@>@;@+break;
-case none_seen+y_here: case none_seen+z_here: case y_seen+z_here: case z_seen+y_here: goto found;
+case none_seen+y_here: case none_seen+z_here:
+ case y_seen+z_here: case z_seen+y_here: goto found;
default:do_nothing;
}
@@ -12868,8 +12928,8 @@ incr(cur_s);
if (cur_s > 0) dvi_out(push);
if (cur_s > max_push) max_push=cur_s;
save_loc=dvi_offset+dvi_ptr;base_line=cur_v;left_edge=cur_h;
-while (p!=null) @<Output node |p| for |hlist_out| and move to the next node, maintaining
-the condition |cur_v=base_line|@>;
+while (p!=null) @<Output node |p| for |hlist_out| and move to the next node,
+maintaining the condition |cur_v=base_line|@>;
prune_movements(save_loc);
if (cur_s > 0) dvi_pop(save_loc);
decr(cur_s);
@@ -12893,7 +12953,8 @@ reswitch: if (is_char_node(p))
}@+ while (!(!is_char_node(p)));
dvi_h=cur_h;
}
-else@<Output the non-|char_node| |p| for |hlist_out| and move to the next node@>@;
+else@<Output the non-|char_node| |p| for |hlist_out| and move to the next
+node@>@;
@ @<Change font |dvi_f| to |f|@>=
{@+if (!font_used[f])
@@ -12969,7 +13030,8 @@ if (g_sign!=normal)
}
rule_wd=rule_wd+cur_g;
if (subtype(p) >= a_leaders)
- @<Output leaders in an hlist, |goto fin_rule| if a rule or to |next_p| if done@>;
+ @<Output leaders in an hlist, |goto fin_rule| if a rule or to |next_p| if
+done@>;
goto move_past;
}
@@ -12983,8 +13045,8 @@ leader_wd=width(leader_box);
if ((leader_wd > 0)&&(rule_wd > 0))
{@+rule_wd=rule_wd+10; /*compensate for floating-point rounding*/
edge=cur_h+rule_wd;lx=0;
- @<Let |cur_h| be the position of the first box, and set |leader_wd+lx| to the spacing
-between corresponding parts of boxes@>;
+ @<Let |cur_h| be the position of the first box, and set |leader_wd+lx| to
+the spacing between corresponding parts of boxes@>;
while (cur_h+leader_wd <= edge)
@<Output a leader box at |cur_h|, then advance |cur_h| by |leader_wd+lx|@>;
cur_h=edge-10;goto next_p;
@@ -13062,8 +13124,8 @@ if (cur_s > 0) dvi_out(push);
if (cur_s > max_push) max_push=cur_s;
save_loc=dvi_offset+dvi_ptr;left_edge=cur_h;cur_v=cur_v-height(this_box);
top_edge=cur_v;
-while (p!=null) @<Output node |p| for |vlist_out| and move to the next node, maintaining
-the condition |cur_h=left_edge|@>;
+while (p!=null) @<Output node |p| for |vlist_out| and move to the next node,
+maintaining the condition |cur_h=left_edge|@>;
prune_movements(save_loc);
if (cur_s > 0) dvi_pop(save_loc);
decr(cur_s);
@@ -13136,7 +13198,8 @@ if (g_sign!=normal)
}
rule_ht=rule_ht+cur_g;
if (subtype(p) >= a_leaders)
- @<Output leaders in a vlist, |goto fin_rule| if a rule or to |next_p| if done@>;
+ @<Output leaders in a vlist, |goto fin_rule| if a rule or to |next_p| if
+done@>;
goto move_past;
}
@@ -13150,8 +13213,8 @@ leader_ht=height(leader_box)+depth(leader_box);
if ((leader_ht > 0)&&(rule_ht > 0))
{@+rule_ht=rule_ht+10; /*compensate for floating-point rounding*/
edge=cur_v+rule_ht;lx=0;
- @<Let |cur_v| be the position of the first box, and set |leader_ht+lx| to the spacing
-between corresponding parts of boxes@>;
+ @<Let |cur_v| be the position of the first box, and set |leader_ht+lx| to
+the spacing between corresponding parts of boxes@>;
while (cur_v+leader_ht <= edge)
@<Output a leader box at |cur_v|, then advance |cur_v| by |leader_ht+lx|@>;
cur_v=edge-10;goto next_p;
@@ -13215,7 +13278,8 @@ if (tracing_stats > 1)
#endif
@ @<Ship box |p| out@>=
-@<Update the values of |max_h| and |max_v|; but if the page is too large, |goto done|@>;
+@<Update the values of |max_h| and |max_v|; but if the page is too large,
+|goto done|@>;
@<Initialize variables as |ship_out| begins@>;
page_loc=dvi_offset+dvi_ptr;
dvi_out(bop);
@@ -13383,7 +13447,9 @@ glue of each kind is present. A global variable |last_badness| is used
to implement \.{\\badness}.
@<Glob...@>=
-static scaled @!total_stretch0[filll-normal+1], *const @!total_stretch = @!total_stretch0-normal, @!total_shrink0[filll-normal+1], *const @!total_shrink = @!total_shrink0-normal;
+static scaled @!total_stretch0[filll-normal+1],
+ *const @!total_stretch = @!total_stretch0-normal,
+ @!total_shrink0[filll-normal+1], *const @!total_shrink = @!total_shrink0-normal;
/*glue found by |hpack| or |vpack|*/
static int @!last_badness; /*badness of the most recently packaged box*/
@@ -13411,12 +13477,14 @@ total_stretch[filll]=0;total_shrink[filll]=0
@ @<Examine node |p| in the hlist, taking account of its effect...@>=
@^inner loop@>
{@+reswitch: while (is_char_node(p))
- @<Incorporate character dimensions into the dimensions of the hbox that will contain~it,
-then move to the next node@>;
+ @<Incorporate character dimensions into the dimensions of the hbox that
+will contain~it, then move to the next node@>;
if (p!=null)
{@+switch (type(p)) {
- case hlist_node: case vlist_node: case rule_node: case unset_node: case unset_set_node: case unset_pack_node:
- @<Incorporate box dimensions into the dimensions of the hbox that will contain~it@>@;@+break;
+ case hlist_node: case vlist_node: case rule_node:
+ case unset_node: case unset_set_node: case unset_pack_node:
+ @<Incorporate box dimensions into the dimensions of the hbox that will
+contain~it@>@;@+break;
case ins_node: case mark_node: case adjust_node: if (adjust_tail!=null)
@<Transfer node |p| to the adjustment list@>@;@+break;
case whatsit_node: @<Incorporate a whatsit node into an hbox@>;@+break;
@@ -13500,9 +13568,10 @@ if (x==0)
set_glue_ratio_zero(glue_set(r));
goto end;
}
-else if (x > 0) @<Determine horizontal glue stretch setting, then |return| or \hbox{|goto
+else if (x > 0) @<Determine horizontal glue stretch setting, then |return|
+or \hbox{|goto common_ending|}@>@;
+else@<Determine horizontal glue shrink setting, then |return| or \hbox{|goto
common_ending|}@>@;
-else@<Determine horizontal glue shrink setting, then |return| or \hbox{|goto common_ending|}@>@;
@ @<Determine horizontal glue stretch setting...@>=
{@+@<Determine the stretch order@>;
@@ -13578,7 +13647,8 @@ if ((total_shrink[o] < -x)&&(o==normal)&&(list_ptr(r)!=null))
bad@>;
}
else if (o==normal) if (list_ptr(r)!=null)
- @<Report a tight hbox and |goto common_ending|, if this box is sufficiently bad@>;
+ @<Report a tight hbox and |goto common_ending|, if this box is sufficiently
+bad@>;
goto end;
}
@@ -13626,8 +13696,10 @@ static pointer vpackage(pointer p, scaled h, scaled hf, scaled vf, small_number
{@+if (is_char_node(p)) confusion("vpack");
@:this can't happen vpack}{\quad vpack@>
else switch (type(p)) {
- case hlist_node: case vlist_node: case rule_node: case unset_node: case unset_set_node: case unset_pack_node:
- @<Incorporate box dimensions into the dimensions of the vbox that will contain~it@>@;@+break;
+ case hlist_node: case vlist_node: case rule_node:
+ case unset_node: case unset_set_node: case unset_pack_node:
+ @<Incorporate box dimensions into the dimensions of the vbox that will
+contain~it@>@;@+break;
case whatsit_node: @<Incorporate a whatsit node into a vbox@>;@+break;
case glue_node: @<Incorporate glue into the vertical totals@>@;@+break;
case kern_node: {@+x=x+d+width(p);d=0;
@@ -13665,9 +13737,10 @@ if (x==0)
set_glue_ratio_zero(glue_set(r));
goto end;
}
-else if (x > 0) @<Determine vertical glue stretch setting, then |return| or \hbox{|goto
+else if (x > 0) @<Determine vertical glue stretch setting, then |return| or
+\hbox{|goto common_ending|}@>@;
+else@<Determine vertical glue shrink setting, then |return| or \hbox{|goto
common_ending|}@>@;
-else@<Determine vertical glue shrink setting, then |return| or \hbox{|goto common_ending|}@>@;
@ @<Determine vertical glue stretch setting...@>=
{@+@<Determine the stretch order@>;
@@ -13723,7 +13796,8 @@ if ((total_shrink[o] < -x)&&(o==normal)&&(list_ptr(r)!=null))
bad@>;
}
else if (o==normal) if (list_ptr(r)!=null)
- @<Report a tight vbox and |goto common_ending|, if this box is sufficiently bad@>;
+ @<Report a tight vbox and |goto common_ending|, if this box is sufficiently
+bad@>;
goto end;
}
@@ -14065,8 +14139,11 @@ the current string would be `\.{.\^.\_/}' if |p| points to the |ord_noad| for
@<Cases of |show_node_list| that arise...@>=
case style_node: print_style(subtype(p));@+break;
case choice_node: @<Display choice node |p|@>@;@+break;
-case ord_noad: case op_noad: case bin_noad: case rel_noad: case open_noad: case close_noad: case punct_noad: case inner_noad:
- case radical_noad: case over_noad: case under_noad: case vcenter_noad: case accent_noad:
+case ord_noad: case op_noad: case bin_noad:
+ case rel_noad: case open_noad: case close_noad:
+ case punct_noad: case inner_noad:
+ case radical_noad: case over_noad: case under_noad:
+ case vcenter_noad: case accent_noad:
case left_noad: case right_noad: @<Display normal noad |p|@>@;@+break;
case fraction_noad: @<Display fraction noad |p|@>@;@+break;
@@ -14214,8 +14291,11 @@ case choice_node: {@+flush_node_list(display_mlist(p));
flush_node_list(script_script_mlist(p));
free_node(p, style_node_size);goto done;
}
-case ord_noad: case op_noad: case bin_noad: case rel_noad: case open_noad: case close_noad: case punct_noad: case inner_noad:
- case radical_noad: case over_noad: case under_noad: case vcenter_noad: case accent_noad: @t@>@;@/
+case ord_noad: case op_noad: case bin_noad:
+ case rel_noad: case open_noad: case close_noad:
+ case punct_noad: case inner_noad:
+ case radical_noad: case over_noad: case under_noad:
+ case vcenter_noad: case accent_noad: @t@>@;@/
{@+if (math_type(nucleus(p)) >= sub_box)
flush_node_list(info(nucleus(p)));
if (math_type(supscr(p)) >= sub_box)
@@ -14372,8 +14452,8 @@ small_number @!z; /*runs through font family members*/
bool @!large_attempt; /*are we trying the ``large'' variant?*/
f=null_font;w=0;large_attempt=false;
z=small_fam(d);x=small_char(d);
-loop@+{@+@<Look at the variants of |(z,x)|; set |f| and |c| whenever a better character
-is found; |goto found| as soon as a large enough variant is encountered@>;
+loop@+{@+@<Look at the variants of |(z,x)|; set |f| and |c| whenever a better
+character is found; |goto found| as soon as a large enough variant is encountered@>;
if (large_attempt) goto found; /*there were none large enough*/
large_attempt=true;z=large_fam(d);x=large_char(d);
}
@@ -14395,9 +14475,9 @@ if ((z!=0)||(x!=min_quarterword))
{@+z=z+s+16;
@/do@+{z=z-16;g=fam_fnt(z);
if (g!=null_font)
- @<Look at the list of characters starting with |x| in font |g|; set |f| and |c|
-whenever a better character is found; |goto found| as soon as a large enough variant
-is encountered@>;
+ @<Look at the list of characters starting with |x| in font |g|; set |f|
+and |c| whenever a better character is found; |goto found| as soon as a large
+enough variant is encountered@>;
}@+ while (!(z < 16));
}
@@ -14475,8 +14555,8 @@ return char_height(f, hd)+char_depth(f, hd);
{@+b=new_null_box();
type(b)=vlist_node;
r=font_info[exten_base[f]+rem_byte(q)].qqqq;@/
-@<Compute the minimum suitable height, |w|, and the corresponding number of extension
-steps, |n|; also set |width(b)|@>;
+@<Compute the minimum suitable height, |w|, and the corresponding number of
+extension steps, |n|; also set |width(b)|@>;
c=ext_bot(r);
if (c!=min_quarterword) stack_into_box(b, f, c);
c=ext_rep(r);
@@ -14743,20 +14823,21 @@ mlist=cur_mlist;penalties=mlist_penalties;
style=cur_style; /*tuck global parameters away as local variables*/
q=mlist;r=null;r_type=op_noad;max_h=0;max_d=0;
@<Set up the values of |cur_size| and |cur_mu|, based on |cur_style|@>;
-while (q!=null) @<Process node-or-noad |q| as much as possible in preparation for
-the second pass of |mlist_to_hlist|, then move to the next item in the mlist@>;
+while (q!=null) @<Process node-or-noad |q| as much as possible in preparation
+for the second pass of |mlist_to_hlist|, then move to the next item in the
+mlist@>;
@<Convert \(a)a final |bin_noad| to an |ord_noad|@>;
-@<Make a second pass over the mlist, removing all noads and inserting the proper spacing
-and penalties@>;
+@<Make a second pass over the mlist, removing all noads and inserting the
+proper spacing and penalties@>;
}
@ We use the fact that no character nodes appear in an mlist, hence
the field |type(q)| is always present.
@<Process node-or-noad...@>=
-{@+@<Do first-pass processing based on |type(q)|; |goto done_with_noad| if a noad
-has been fully processed, |goto check_dimensions| if it has been translated into |new_hlist(q)|,
-or |goto done_with_node| if a node has been fully processed@>;
+{@+@<Do first-pass processing based on |type(q)|; |goto done_with_noad| if
+a noad has been fully processed, |goto check_dimensions| if it has been translated
+into |new_hlist(q)|, or |goto done_with_node| if a node has been fully processed@>;
check_dimensions: z=hpack(new_hlist(q), natural);
if (height(z) > max_h) max_h=height(z);
if (depth(z) > max_d) max_d=depth(z);
@@ -14776,17 +14857,20 @@ The values of |r| and |r_type| make this fairly easy.
reswitch: delta=0;
switch (type(q)) {
case bin_noad: switch (r_type) {
- case bin_noad: case op_noad: case rel_noad: case open_noad: case punct_noad: case left_noad:
+ case bin_noad: case op_noad: case rel_noad:
+ case open_noad: case punct_noad: case left_noad:
{@+type(q)=ord_noad;goto reswitch;
}
default:do_nothing;
} @+break;
-case rel_noad: case close_noad: case punct_noad: case right_noad: {@+@t@>@;@/
+case rel_noad: case close_noad: case punct_noad:
+ case right_noad: {@+@t@>@;@/
@<Convert \(a)a final |bin_noad| to an |ord_noad|@>;
if (type(q)==right_noad) goto done_with_noad;
} @+break;
@t\4@>@<Cases for noads that can follow a |bin_noad|@>@;
-@t\4@>@<Cases for nodes that can appear in an mlist, after which we |goto done_with_node|@>@;
+@t\4@>@<Cases for nodes that can appear in an mlist, after which we |goto
+done_with_node|@>@;
default:confusion("mlist1");
@:this can't happen mlist1}{\quad mlist1@>
} @/
@@ -14800,10 +14884,11 @@ case style_node: {@+cur_style=subtype(q);
@<Set up the values of |cur_size| and |cur_mu|, based on |cur_style|@>;
goto done_with_node;
}
-case choice_node: @<Change this node to a style node followed by the correct choice,
-then |goto done_with_node|@>@;
+case choice_node: @<Change this node to a style node followed by the correct
+choice, then |goto done_with_node|@>@;
case ins_node: case mark_node: case adjust_node:
- case whatsit_node: case penalty_node: case disc_node: goto done_with_node;
+ case whatsit_node: case penalty_node:
+ case disc_node: goto done_with_node;
case rule_node: {@+if (height(q) > max_h) max_h=height(q);
if (depth(q) > max_d) max_d=depth(q);goto done_with_node;
}
@@ -15034,15 +15119,15 @@ static void make_fraction(pointer @!q)
scaled @!delta, @!delta1, @!delta2, @!shift_up, @!shift_down, @!clr;
/*dimensions for box calculations*/
if (thickness(q)==default_code) thickness(q)=default_rule_thickness;
-@<Create equal-width boxes |x| and |z| for the numerator and denominator, and compute
-the default amounts |shift_up| and |shift_down| by which they are displaced from the
-baseline@>;
-if (thickness(q)==0) @<Adjust \(s)|shift_up| and |shift_down| for the case of no fraction
-line@>@;
+@<Create equal-width boxes |x| and |z| for the numerator and denominator,
+and compute the default amounts |shift_up| and |shift_down| by which they
+are displaced from the baseline@>;
+if (thickness(q)==0) @<Adjust \(s)|shift_up| and |shift_down| for the case
+of no fraction line@>@;
else@<Adjust \(s)|shift_up| and |shift_down| for the case of a fraction line@>;
@<Construct a vlist box for the fraction, according to |shift_up| and |shift_down|@>;
-@<Put the \(f)fraction into a box with its delimiters, and make |new_hlist(q)| point
-to it@>;
+@<Put the \(f)fraction into a box with its delimiters, and make |new_hlist(q)|
+point to it@>;
}
@ @<Create equal-width boxes |x| and |z| for the numerator and denom...@>=
@@ -15165,8 +15250,8 @@ if (width(z) > width(v)) width(v)=width(z);
x=rebox(x, width(v));y=rebox(y, width(v));z=rebox(z, width(v));@/
shift_amount(x)=half(delta);shift_amount(z)=-shift_amount(x);
height(v)=height(y);depth(v)=depth(y);
-@<Attach the limits to |y| and adjust |height(v)|, |depth(v)| to account for their
-presence@>;
+@<Attach the limits to |y| and adjust |height(v)|, |depth(v)| to account for
+their presence@>;
new_hlist(q)=v;
}
@@ -15226,9 +15311,10 @@ if (math_type(subscr(q))==empty) if (math_type(supscr(q))==empty)
{@+a=lig_kern_restart(cur_f, cur_i);
cur_i=font_info[a].qqqq;
}
- loop@+{@+@<If instruction |cur_i| is a kern with |cur_c|, attach the kern
-after~|q|; or if it is a ligature with |cur_c|, combine noads |q| and~|p| appropriately;
-then |return| if the cursor has moved past a noad, or |goto restart|@>;
+ loop@+{@+@<If instruction |cur_i| is a kern with |cur_c|, attach the
+kern after~|q|; or if it is a ligature with |cur_c|, combine noads |q| and~|p|
+appropriately; then |return| if the cursor has moved past a noad, or |goto
+restart|@>;
if (skip_byte(cur_i) >= stop_flag) return;
a=a+qo(skip_byte(cur_i))+1;
cur_i=font_info[a].qqqq;
@@ -15288,9 +15374,9 @@ when both are present.
@<Convert \(n)|nucleus(q)| to an hlist and attach the sub/superscripts@>=
switch (math_type(nucleus(q))) {
case math_char: case math_text_char:
- @<Create a character node |p| for |nucleus(q)|, possibly followed by a kern node
-for the italic correction, and set |delta| to the italic correction if a subscript
-is present@>@;@+break;
+ @<Create a character node |p| for |nucleus(q)|, possibly followed by a kern
+node for the italic correction, and set |delta| to the italic correction if
+a subscript is present@>@;@+break;
case empty: p=null;@+break;
case sub_box: p=info(nucleus(q));@+break;
case sub_mlist: {@+cur_mlist=info(nucleus(q));save_style=cur_style;
@@ -15347,8 +15433,8 @@ if (math_type(supscr(q))==empty)
@<Construct a subscript box |x| when there is no superscript@>@;
else{@+@<Construct a superscript box |x|@>;
if (math_type(subscr(q))==empty) shift_amount(x)=-shift_up;
- else@<Construct a sub/superscript combination box |x|, with the superscript offset
-by |delta|@>;
+ else@<Construct a sub/superscript combination box |x|, with the superscript
+offset by |delta|@>;
}
if (new_hlist(q)==null) new_hlist(q)=x;
else{@+p=new_hlist(q);
@@ -15418,10 +15504,10 @@ to a node at the current end of the final hlist.
p=temp_head;link(p)=null;q=mlist;r_type=0;cur_style=style;
@<Set up the values of |cur_size| and |cur_mu|, based on |cur_style|@>;
while (q!=null)
- {@+@<If node |q| is a style node, change the style and |goto delete_q|; otherwise
-if it is not a noad, put it into the hlist, advance |q|, and |goto done|; otherwise
-set |s| to the size of noad |q|, set |t| to the associated type (|ord_noad.. inner_noad|),
-and set |pen| to the associated penalty@>;
+ {@+@<If node |q| is a style node, change the style and |goto delete_q|;
+otherwise if it is not a noad, put it into the hlist, advance |q|, and |goto
+done|; otherwise set |s| to the size of noad |q|, set |t| to the associated
+type (|ord_noad.. inner_noad|), and set |pen| to the associated penalty@>;
@<Append inter-element spacing based on |r_type| and |t|@>;
@<Append any |new_hlist| entries for |q|, and any appropriate penalties@>;
if (type(q)==right_noad) t=open_noad;
@@ -15435,18 +15521,22 @@ sets up default values so that most of the branches are short.
@<If node |q| is a style node, change the style...@>=
t=ord_noad;s=noad_size;pen=inf_penalty;
switch (type(q)) {
-case op_noad: case open_noad: case close_noad: case punct_noad: case inner_noad: t=type(q);@+break;
+case op_noad: case open_noad: case close_noad:
+ case punct_noad: case inner_noad: t=type(q);@+break;
case bin_noad: {@+t=bin_noad;pen=bin_op_penalty;
} @+break;
case rel_noad: {@+t=rel_noad;pen=rel_penalty;
} @+break;
-case ord_noad: case vcenter_noad: case over_noad: case under_noad: do_nothing;@+break;
+case ord_noad: case vcenter_noad: case over_noad:
+ case under_noad: do_nothing;@+break;
case radical_noad: s=radical_noad_size;@+break;
case accent_noad: s=accent_noad_size;@+break;
case fraction_noad: s=fraction_noad_size;@+break;
case left_noad: case right_noad: t=make_left_right(q, style, max_d, max_h);@+break;
case style_node: @<Change the current style and |goto delete_q|@>@;
-case whatsit_node: case penalty_node: case rule_node: case disc_node: case adjust_node: case ins_node: case mark_node:
+case whatsit_node: case penalty_node:
+ case rule_node: case disc_node: case adjust_node:
+ case ins_node: case mark_node:
case glue_node: case kern_node: @t@>@;@/
{@+link(p)=q;p=q;q=link(q);link(p)=null;goto done;
}
@@ -15814,8 +15904,8 @@ warning_index=save_cs_ptr;align_state=-1000000;
/*at this point, |cur_cmd==left_brace|*/
loop@+{@+@<Append the current tabskip glue to the preamble list@>;
if (cur_cmd==car_ret) goto done; /*\.{\\cr} ends the preamble*/
- @<Scan preamble text until |cur_cmd| is |tab_mark| or |car_ret|, looking for changes
-in the tabskip glue; append an alignrecord to the preamble list@>;
+ @<Scan preamble text until |cur_cmd| is |tab_mark| or |car_ret|, looking
+for changes in the tabskip glue; append an alignrecord to the preamble list@>;
}
done: scanner_status=normal
@@ -16213,15 +16303,15 @@ if (cur_group!=align_group) confusion("align0");
unsave(); /*that |align_group| was for the whole alignment*/
if (nest[nest_ptr-1].mode_field==mmode) o=display_indent;
else o=0;
-@<Go through the preamble list, determining the column widths and changing the alignrecords
-to dummy unset boxes@>;
+@<Go through the preamble list, determining the column widths and changing
+the alignrecords to dummy unset boxes@>;
if (x)
{ @<Handle an alignment that depends on |hsize| or |vsize|@>@;
pop_alignment();
}
else
-{ @<Package the preamble list, to determine the actual tabskip glue amounts, and let
- |p| point to this prototype box@>;
+{ @<Package the preamble list, to determine the actual tabskip glue amounts,
+ and let |p| point to this prototype box@>;
@<Set the glue in all the unset boxes of the current list@>;
flush_node_list(p);pop_alignment();
}
@@ -16271,8 +16361,8 @@ p=link(link(q));
if (width(q)==null_flag)
@<Nullify |width(q)| and the tabskip glue following this column@>;
if (info(q)!=end_span)
- @<Merge the widths in the span nodes of |q| with those of |p|, destroying the span
-nodes of |q|@>;
+ @<Merge the widths in the span nodes of |q| with those of |p|, destroying
+the span nodes of |q|@>;
type(q)=unset_node;span_count(q)=min_quarterword;height(q)=0;
depth(q)=0;glue_order(q)=normal;glue_sign(q)=normal;
glue_stretch(q)=0;glue_shrink(q)=0;q=p;
@@ -16341,7 +16431,8 @@ while (q!=null)
if (type(q)==unset_node)
@<Set the unset box |q| and the unset boxes in it@>@;
else if (type(q)==rule_node)
- @<Make the running dimensions in rule |q| extend to the boundaries of the alignment@>;
+ @<Make the running dimensions in rule |q| extend to the boundaries of
+the alignment@>;
s=q;q=link(q);
}
@@ -16381,14 +16472,14 @@ arithmetic from entering into the dimensions of any boxes.
n=span_count(r);t=width(s);w=t;u=hold_head;
while (n > min_quarterword)
{@+decr(n);
- @<Append tabskip glue and an empty box to list |u|, and update |s| and |t| as the
-prototype nodes are passed@>;
+ @<Append tabskip glue and an empty box to list |u|, and update |s| and |t|
+as the prototype nodes are passed@>;
}
if (mode==-vmode)
- @<Make the unset node |r| into an |hlist_node| of width |w|, setting the glue as
-if the width were |t|@>@;
-else@<Make the unset node |r| into a |vlist_node| of height |w|, setting the glue
-as if the height were |t|@>;
+ @<Make the unset node |r| into an |hlist_node| of width |w|, setting the
+glue as if the width were |t|@>@;
+else@<Make the unset node |r| into a |vlist_node| of height |w|, setting the
+glue as if the height were |t|@>;
shift_amount(r)=0;
if (u!=hold_head) /*append blank boxes to account for spanned nodes*/
{@+link(u)=link(r);link(r)=link(hold_head);r=u;
@@ -16534,8 +16625,8 @@ static void line_break(int @!final_widow_penalty)
pack_begin_line=mode_line; /*this is for over/underfull box messages*/
@<Get ready to start line breaking@>;
@<Find optimal breakpoints@>;
-@<Break the paragraph at the chosen breakpoints, justify the resulting lines to the
-correct widths, and append them to the current vertical list@>;
+@<Break the paragraph at the chosen breakpoints, justify the resulting lines
+to the correct widths, and append them to the current vertical list@>;
@<Clean up the memory by removing the break nodes@>;
pack_begin_line=0;
}
@@ -16706,7 +16797,8 @@ macro makes such six-tuples convenient.
@<Glob...@>=
static scaled @!active_width0[6], *const @!active_width = @!active_width0-1;
/*distance from first active node to~|cur_p|*/
-static scaled @!cur_active_width0[6], *const @!cur_active_width = @!cur_active_width0-1; /*distance from current active node*/
+static scaled @!cur_active_width0[6],
+ *const @!cur_active_width = @!cur_active_width0-1; /*distance from current active node*/
static scaled @!background0[6], *const @!background = @!background0-1; /*length of an ``empty'' line*/
static scaled @!break_width0[6], *const @!break_width = @!break_width0-1; /*length being computed after current break*/
@@ -16855,14 +16947,14 @@ bool @!no_break_yet; /*have we found a feasible break at |cur_p|?*/
no_break_yet=true;prev_r=active;old_l=0;
do_all_six(copy_to_cur_active);
loop@+{@+resume: r=link(prev_r);
- @<If node |r| is of type |delta_node|, update |cur_active_width|, set |prev_r| and
-|prev_prev_r|, then |goto continue|@>;
- @<If a line number class has ended, create new active nodes for the best feasible
-breaks in that class; then |return| if |r=last_active|, otherwise compute the new
-|line_width|@>;
- @<Consider the demerits for a line from |r| to |cur_p|; deactivate node |r| if it
-should no longer be active; then |goto continue| if a line from |r| to |cur_p| is
-infeasible, otherwise record a new feasible break@>;
+ @<If node |r| is of type |delta_node|, update |cur_active_width|, set |prev_r|
+and |prev_prev_r|, then |goto continue|@>;
+ @<If a line number class has ended, create new active nodes for the best
+feasible breaks in that class; then |return| if |r=last_active|, otherwise
+compute the new |line_width|@>;
+ @<Consider the demerits for a line from |r| to |cur_p|; deactivate node
+|r| if it should no longer be active; then |goto continue| if a line from
+|r| to |cur_p| is infeasible, otherwise record a new feasible break@>;
}
end: ;
#ifdef @!STAT
@@ -16922,13 +17014,16 @@ keeps track of the smallest value in the |minimal_demerits| array.
@d awful_bad 07777777777 /*more than a billion demerits*/
@<Global...@>=
-static int @!minimal_demerits0[tight_fit-very_loose_fit+1], *const @!minimal_demerits = @!minimal_demerits0-very_loose_fit; /*best total
+static int @!minimal_demerits0[tight_fit-very_loose_fit+1],
+ *const @!minimal_demerits = @!minimal_demerits0-very_loose_fit; /*best total
demerits known for current line class and position, given the fitness*/
static int @!minimum_demerits; /*best total demerits known for current line class
and position*/
-static pointer @!best_place0[tight_fit-very_loose_fit+1], *const @!best_place = @!best_place0-very_loose_fit; /*how to achieve
+static pointer @!best_place0[tight_fit-very_loose_fit+1],
+ *const @!best_place = @!best_place0-very_loose_fit; /*how to achieve
|minimal_demerits|*/
-static halfword @!best_pl_line0[tight_fit-very_loose_fit+1], *const @!best_pl_line = @!best_pl_line0-very_loose_fit; /*corresponding
+static halfword @!best_pl_line0[tight_fit-very_loose_fit+1],
+ *const @!best_pl_line = @!best_pl_line0-very_loose_fit; /*corresponding
line number*/
@ @<Get ready to start...@>=
@@ -17070,7 +17165,8 @@ else switch (type(v)) {
break_width[1]=@|break_width[1]-
char_width(f, char_info(f, character(lig_char(v))));
} @+break;
- case hlist_node: case vlist_node: case rule_node: case kern_node:
+ case hlist_node: case vlist_node: case rule_node:
+ case kern_node:
break_width[1]=break_width[1]-width(v);@+break;
default:confusion("disc1");
@:this can't happen disc1}{\quad disc1@>
@@ -17086,7 +17182,8 @@ else switch (type(s)) {
break_width[1]=break_width[1]+
char_width(f, char_info(f, character(lig_char(s))));
} @+break;
- case hlist_node: case vlist_node: case rule_node: case kern_node:
+ case hlist_node: case vlist_node: case rule_node:
+ case kern_node:
break_width[1]=break_width[1]+width(s);@+break;
default:confusion("disc2");
@:this can't happen disc2}{\quad disc2@>
@@ -17252,13 +17349,13 @@ breaks must go through a forced break.
@^inner loop@>
shortfall=line_width-cur_active_width[1]; /*we're this much too short*/
if (shortfall > 0)
- @<Set the value of |b| to the badness for stretching the line, and compute the corresponding
-|fit_class|@>@;
-else@<Set the value of |b| to the badness for shrinking the line, and compute the
-corresponding |fit_class|@>;
+ @<Set the value of |b| to the badness for stretching the line, and compute
+the corresponding |fit_class|@>@;
+else@<Set the value of |b| to the badness for shrinking the line, and compute
+the corresponding |fit_class|@>;
if ((b > inf_bad)||(pi==eject_penalty))
- @<Prepare to deactivate node~|r|, and |goto deactivate| unless there is a reason
-to consider lines of text from |r| to |cur_p|@>@;
+ @<Prepare to deactivate node~|r|, and |goto deactivate| unless there is
+a reason to consider lines of text from |r| to |cur_p|@>@;
else{@+prev_r=r;
if (b > threshold) goto resume;
node_r_stays_active=true;
@@ -17412,8 +17509,8 @@ to~|cur_p|.
@<Deactivate node |r|@>=
link(prev_r)=link(r);free_node(r, active_node_size);
-if (prev_r==active) @<Update the active widths, since the first active node has been
-deleted@>@;
+if (prev_r==active) @<Update the active widths, since the first active node
+has been deleted@>@;
else if (type(prev_r)==delta_node)
{@+r=link(prev_r);
if (r==last_active)
@@ -17498,12 +17595,12 @@ loop@+{@+if (threshold > inf_bad) threshold=inf_bad;
cur_p=link(temp_head);auto_breaking=true;@/
prev_p=cur_p; /*glue at beginning is not a legal breakpoint*/
while ((cur_p!=null)&&(link(active)!=last_active))
- @<Call |try_break| if |cur_p| is a legal breakpoint; on the second pass, also
-try to hyphenate the next word, if |cur_p| is a glue node; then advance |cur_p| to
-the next node of the paragraph that could possibly be a legal breakpoint@>;
+ @<Call |try_break| if |cur_p| is a legal breakpoint; on the second pass,
+also try to hyphenate the next word, if |cur_p| is a glue node; then advance
+|cur_p| to the next node of the paragraph that could possibly be a legal breakpoint@>;
if (cur_p==null)
- @<Try the final line break at the end of the paragraph, and |goto done| if the
-desired breakpoints have been found@>;
+ @<Try the final line break at the end of the paragraph, and |goto done|
+if the desired breakpoints have been found@>;
@<Clean up the memory by removing the break nodes@>;
if (!second_pass)
{
@@ -17573,9 +17670,10 @@ the component of active width that represents real width as opposed to glue.
@<Advance \(c)|cur_p| to the node following the present string of characters@>;
switch (type(cur_p)) {
case hlist_node: case vlist_node: case rule_node: act_width=act_width+width(cur_p);@+break;
-case whatsit_node: @<Advance \(p)past a whatsit node in the \(l)|line_break| loop@>@;@+break;
-case glue_node: {@+@<If node |cur_p| is a legal breakpoint, call |try_break|; then
-update the active widths by including the glue in |glue_ptr(cur_p)|@>;
+case whatsit_node: @<Advance \(p)past a whatsit node in the \(l)|line_break|
+loop@>@;@+break;
+case glue_node: {@+@<If node |cur_p| is a legal breakpoint, call |try_break|;
+then update the active widths by including the glue in |glue_ptr(cur_p)|@>;
if (second_pass&&auto_breaking)
hyphenate_word();
} @+break;
@@ -17584,7 +17682,8 @@ case kern_node: if (subtype(cur_p)==explicit) kern_break@;
case ligature_node: {@+f=font(lig_char(cur_p));
act_width=act_width+char_width(f, char_info(f, character(lig_char(cur_p))));
} @+break;
-case disc_node: @<Try to break after a discretionary fragment, then |goto done5|@>@;
+case disc_node: @<Try to break after a discretionary fragment, then |goto
+done5|@>@;
case math_node: {@+auto_breaking=(subtype(cur_p)==after);kern_break;
} @+break;
case penalty_node: try_break(penalty(cur_p), unhyphenated);@+break;
@@ -17657,7 +17756,8 @@ else switch (type(s)) {
disc_width=disc_width+
char_width(f, char_info(f, character(lig_char(s))));
} @+break;
- case hlist_node: case vlist_node: case rule_node: case kern_node:
+ case hlist_node: case vlist_node: case rule_node:
+ case kern_node:
disc_width=disc_width+width(s);@+break;
default:confusion("disc3");
@:this can't happen disc3}{\quad disc3@>
@@ -17673,7 +17773,8 @@ else switch (type(s)) {
act_width=act_width+
char_width(f, char_info(f, character(lig_char(s))));
} @+break;
- case hlist_node: case vlist_node: case rule_node: case kern_node:
+ case hlist_node: case vlist_node: case rule_node:
+ case kern_node:
act_width=act_width+width(s);@+break;
default:confusion("disc4");
@:this can't happen disc4}{\quad disc4@>
@@ -17771,10 +17872,11 @@ scaled @!cur_indent; /*left margin of line number |cur_line|*/
quarterword @!t; /*used for replacement counts in discretionary nodes*/
int @!pen; /*use when calculating penalties between lines*/
halfword @!cur_line; /*the current line number being justified*/
-@<Reverse the links of the relevant passive nodes, setting |cur_p| to the first breakpoint@>;
+@<Reverse the links of the relevant passive nodes, setting |cur_p| to the
+first breakpoint@>;
cur_line=prev_graf+1;
-@/do@+{@<Justify the line ending at breakpoint |cur_p|, and append it to the current
-vertical list, together with associated penalties and other insertions@>;
+@/do@+{@<Justify the line ending at breakpoint |cur_p|, and append it to the
+current vertical list, together with associated penalties and other insertions@>;
incr(cur_line);cur_p=next_break(cur_p);
if (cur_p!=null) if (!post_disc_break)
@<Prune unwanted nodes at the beginning of the next line@>;
@@ -17829,12 +17931,12 @@ is compulsory, and we set |disc_break| to |true|. We also append
the |left_skip| glue at the left of the line, unless it is zero.
@<Justify the line ending at breakpoint |cur_p|, and append it...@>=
-@<Modify the end of the line to reflect the nature of the break and to include \.{\\rightskip};
-also set the proper value of |disc_break|@>;
+@<Modify the end of the line to reflect the nature of the break and to include
+\.{\\rightskip}; also set the proper value of |disc_break|@>;
@<Put the \(l)\.{\\leftskip} glue at the left and detach this line@>;
@<Call the packaging subroutine, setting |just_box| to the justified box@>;
-@<Append the new box to the current vertical list, followed by the list of special
-nodes taken out of the box by the packager@>;
+@<Append the new box to the current vertical list, followed by the list of
+special nodes taken out of the box by the packager@>;
@<Append a penalty node, if a nonzero penalty is appropriate@>@;
@ At the end of the following code, |q| will point to the final node on the
@@ -17861,7 +17963,8 @@ done:
@ @<Change discretionary to compulsory...@>=
{@+t=replace_count(q);
-@<Destroy the |t| nodes following |q|, and make |r| point to the following node@>;
+@<Destroy the |t| nodes following |q|, and make |r| point to the following
+node@>;
if (post_break(q)!=null) @<Transplant the post-break list@>;
if (pre_break(q)!=null) @<Transplant the pre-break list@>;
link(q)=r;disc_break=true;
@@ -18055,8 +18158,8 @@ if (s!=null)
{@+@<Skip to node |ha|, or |goto done1| if no hyphenation should be attempted@>;
if (l_hyf+r_hyf > 63) goto done1;
@<Skip to node |hb|, putting letters into |hu| and |hc|@>;
- @<Check that the nodes following |hb| permit hyphenation and that at least |l_hyf+r_hyf|
-letters have been found, otherwise |goto done1|@>;
+ @<Check that the nodes following |hb| permit hyphenation and that at least
+|l_hyf+r_hyf| letters have been found, otherwise |goto done1|@>;
hyphenate();
}
done1: ;}
@@ -18068,7 +18171,8 @@ static void hyphenate(void)
@<Local variables for hyphenation@>@;
@<Find hyphen locations for the word in |hc|, or |return|@>;
@<If no hyphens were found, |return|@>;
-@<Replace nodes |ha..hb| by a sequence of nodes that includes the discretionary hyphens@>;
+@<Replace nodes |ha..hb| by a sequence of nodes that includes the discretionary
+hyphens@>;
}
@ The first thing we need to do is find the node |ha| just before the
@@ -18110,8 +18214,8 @@ loop@+{@+if (is_char_node(s))
hb=s;incr(hn);hu[hn]=c;hc[hn]=lc_code(c);hyf_bchar=non_char;
}
else if (type(s)==ligature_node)
- @<Move the characters of a ligature node to |hu| and |hc|; but |goto done3| if
-they are not all letters@>@;
+ @<Move the characters of a ligature node to |hu| and |hc|; but |goto done3|
+if they are not all letters@>@;
else if ((type(s)==kern_node)&&(subtype(s)==normal))
{@+hb=s;
hyf_bchar=font_bchar[hf];
@@ -18146,7 +18250,9 @@ loop@+{@+if (!(is_char_node(s)))
switch (type(s)) {
case ligature_node: do_nothing;@+break;
case kern_node: if (subtype(s)!=normal) goto done4;@+break;
- case whatsit_node: case glue_node: case penalty_node: case ins_node: case adjust_node: case mark_node:
+ case whatsit_node: case glue_node:
+ case penalty_node: case ins_node: case adjust_node:
+ case mark_node:
goto done4;
default:goto done1;
}
@@ -18303,10 +18409,10 @@ font_index @!k; /*position of current lig/kern instruction*/
hyphen_passed=0;t=hold_head;w=0;link(hold_head)=null;
/*at this point |ligature_present==lft_hit==rt_hit==false|*/
@<Set up data structures with the cursor following position |j|@>;
-resume: @<If there's a ligature or kern at the cursor position, update the data structures,
-possibly advancing~|j|; continue until the cursor moves@>;
-@<Append a ligature and/or kern to the translation; |goto continue| if the stack of
-inserted ligatures is nonempty@>;
+resume: @<If there's a ligature or kern at the cursor position, update the
+data structures, possibly advancing~|j|; continue until the cursor moves@>;
+@<Append a ligature and/or kern to the translation; |goto continue| if the
+stack of inserted ligatures is nonempty@>;
return j;
}
@@ -18379,8 +18485,9 @@ loop@+{@+if (next_char(q)==test_char) if (skip_byte(q) <= stop_flag)
{@+hyphen_passed=j;hchar=non_char;
}
if (op_byte(q) < kern_flag)
- @<Carry out a ligature replacement, updating the cursor structure and possibly
-advancing~|j|; |goto continue| if the cursor doesn't advance, otherwise |goto done|@>;
+ @<Carry out a ligature replacement, updating the cursor structure and
+possibly advancing~|j|; |goto continue| if the cursor doesn't advance, otherwise
+|goto done|@>;
w=char_kern(hf, q);goto done; /*this kern will be inserted below*/
}
if (skip_byte(q) >= stop_flag)
@@ -18482,8 +18589,8 @@ if (hyphen_passed==0)
}
}
if (hyphen_passed > 0)
- @<Create and append a discretionary node as an alternative to the unhyphenated word,
-and continue to develop both branches until they become equivalent@>;
+ @<Create and append a discretionary node as an alternative to the unhyphenated
+word, and continue to develop both branches until they become equivalent@>;
}@+ while (!(j > hn));
link(s)=q
@@ -18504,9 +18611,10 @@ major_tail=r;r_count=0;
while (link(major_tail) > null) advance_major_tail;
i=hyphen_passed;hyf[i]=0;
@<Put the \(c)characters |hu[l..i]| and a hyphen into |pre_break(r)|@>;
-@<Put the \(c)characters |hu[i+1..]| into |post_break(r)|, appending to this list
-and to |major_tail| until synchronization has been achieved@>;
-@<Move pointer |s| to the end of the current list, and set |replace_count(r)| appropriately@>;
+@<Put the \(c)characters |hu[i+1..]| into |post_break(r)|, appending to this
+list and to |major_tail| until synchronization has been achieved@>;
+@<Move pointer |s| to the end of the current list, and set |replace_count(r)|
+appropriately@>;
hyphen_passed=j-1;link(hold_head)=null;
}@+ while (!(!odd(hyf[j-1])))
@@ -18632,9 +18740,12 @@ typedef int32_t trie_pointer; /*an index into |trie|*/
@<Glob...@>=
static two_halves @!trie[trie_size+1]; /*|trie_link|, |trie_char|, |trie_op|*/
-static small_number @!hyf_distance0[trie_op_size], *const @!hyf_distance = @!hyf_distance0-1; /*position |k-j| of $n_j$*/
-static small_number @!hyf_num0[trie_op_size], *const @!hyf_num = @!hyf_num0-1; /*value of $n_j$*/
-static quarterword @!hyf_next0[trie_op_size], *const @!hyf_next = @!hyf_next0-1; /*continuation code*/
+static small_number @!hyf_distance0[trie_op_size],
+ *const @!hyf_distance = @!hyf_distance0-1; /*position |k-j| of $n_j$*/
+static small_number @!hyf_num0[trie_op_size],
+ *const @!hyf_num = @!hyf_num0-1; /*value of $n_j$*/
+static quarterword @!hyf_next0[trie_op_size],
+ *const @!hyf_next = @!hyf_next0-1; /*continuation code*/
static uint16_t @!op_start[256]; /*offset for current language*/
@ @<Local variables for hyph...@>=
@@ -18648,8 +18759,8 @@ never be fetched.
@<Find hyphen locations for the word in |hc|...@>=
for (j=0; j<=hn; j++) hyf[j]=0;
-@<Look for the word |hc[1..hn]| in the exception table, and |goto found| (with |hyf|
-containing the hyphens) if an entry is found@>;
+@<Look for the word |hc[1..hn]| in the exception table, and |goto found| (with
+|hyf| containing the hyphens) if an entry is found@>;
if (trie_char(cur_lang+1)!=qi(cur_lang)) return; /*no patterns for |cur_lang|*/
hc[0]=0;hc[hn+1]=0;hc[hn+2]=256; /*insert delimiters*/
for (j=0; j<=hn-r_hyf+1; j++)
@@ -18721,8 +18832,9 @@ separate by appending the language code to the string.
@<Look for the word |hc[1...@>=
h=hc[1];incr(hn);hc[hn]=cur_lang;
for (j=2; j<=hn; j++) h=(h+h+hc[j])%hyph_size;
-loop@+{@+@<If the string |hyph_word[h]| is less than \(hc)|hc[1..hn]|, |goto not_found|;
-but if the two strings are equal, set |hyf| to the hyphen positions and |goto found|@>;
+loop@+{@+@<If the string |hyph_word[h]| is less than \(hc)|hc[1..hn]|, |goto
+not_found|; but if the two strings are equal, set |hyf| to the hyphen positions
+and |goto found|@>;
if (h > 0) decr(h);@+else h=hyph_size;
}
not_found: decr(hn)
@@ -18777,15 +18889,16 @@ str_number @!s, @!t; /*strings being compared or stored*/
pool_pointer @!u, @!v; /*indices into |str_pool|*/
scan_left_brace(); /*a left brace must follow \.{\\hyphenation}*/
set_cur_lang;
-@<Enter as many hyphenation exceptions as are listed, until coming to a right brace;
-then |return|@>;
+@<Enter as many hyphenation exceptions as are listed, until coming to a right
+brace; then |return|@>;
}
@ @<Enter as many...@>=
n=0;p=null;
loop@+{@+get_x_token();
reswitch: switch (cur_cmd) {
- case letter: case other_char: case char_given: @<Append a new letter or hyphen@>@;@+break;
+ case letter: case other_char: case char_given: @<Append a new letter or
+hyphen@>@;@+break;
case char_num: {@+scan_char_num();cur_chr=cur_val;cur_cmd=char_given;
goto reswitch;
}
@@ -18903,13 +19016,16 @@ is |trie_op_ptr|.
@<Glob...@>=
#ifdef @!INIT
-static uint16_t @!trie_op_hash0[trie_op_size+trie_op_size+1], *const @!trie_op_hash = @!trie_op_hash0+trie_op_size;
+static uint16_t @!trie_op_hash0[trie_op_size+trie_op_size+1],
+ *const @!trie_op_hash = @!trie_op_hash0+trie_op_size;
/*trie op codes for quadruples*/
static quarterword @!trie_used[256];
/*largest opcode used so far for this language*/
-static ASCII_code @!trie_op_lang0[trie_op_size], *const @!trie_op_lang = @!trie_op_lang0-1;
+static ASCII_code @!trie_op_lang0[trie_op_size],
+ *const @!trie_op_lang = @!trie_op_lang0-1;
/*language part of a hashed quadruple*/
-static quarterword @!trie_op_val0[trie_op_size], *const @!trie_op_val = @!trie_op_val0-1;
+static quarterword @!trie_op_val0[trie_op_size],
+ *const @!trie_op_val = @!trie_op_val0-1;
/*opcode corresponding to a hashed quadruple*/
static int @!trie_op_ptr; /*number of stored ops so far*/
#endif
@@ -19083,7 +19199,8 @@ entries.
@<Glob...@>=
#ifdef @!INIT
-static bool @!trie_taken0[trie_size], *const @!trie_taken = @!trie_taken0-1;
+static bool @!trie_taken0[trie_size],
+ *const @!trie_taken = @!trie_taken0-1;
/*does a family start here?*/
@t\hskip10pt@>static trie_pointer @!trie_min[256];
/*the first possible slot for each character*/
@@ -19134,8 +19251,8 @@ z=trie_min[c]; /*get the first conceivably good hole*/
loop@+{@+h=z-c;@/
@<Ensure that |trie_max>=h+256|@>;
if (trie_taken[h]) goto not_found;
- @<If all characters of the family fit relative to |h|, then |goto found|,\30\ otherwise
-|goto not_found|@>;
+ @<If all characters of the family fit relative to |h|, then |goto found|,\30\
+otherwise |goto not_found|@>;
not_found: z=trie_link(z); /*move to the next hole*/
}
found: @<Pack the family into |trie| relative to |h|@>;
@@ -19242,7 +19359,8 @@ bool @!first_child; /*is |p==trie_l[q]|?*/
ASCII_code @!c; /*character being inserted*/
if (trie_not_ready)
{@+set_cur_lang;scan_left_brace(); /*a left brace must follow \.{\\patterns}*/
- @<Enter all of the patterns into a linked trie, until coming to a right brace@>;
+ @<Enter all of the patterns into a linked trie, until coming to a right
+brace@>;
}
else{@+print_err("Too late for ");print_esc("patterns");
help1("All patterns must be given before typesetting begins.");
@@ -19437,9 +19555,9 @@ scaled @!prev_dp; /*depth of previous box in the list*/
small_number @!t; /*|type| of the node following a kern*/
prev_p=p; /*an initial glue node is not a legal breakpoint*/
least_cost=awful_bad;do_all_six(set_height_zero);prev_dp=0;
-loop@+{@+@<If node |p| is a legal breakpoint, check if this break is the best known,
-and |goto done| if |p| is null or if the page-so-far is already too full to accept
-more stuff@>;
+loop@+{@+@<If node |p| is a legal breakpoint, check if this break is the best
+known, and |goto done| if |p| is null or if the page-so-far is already too
+full to accept more stuff@>;
prev_p=p;p=link(prev_p);
}
done: return best_place;
@@ -19459,14 +19577,14 @@ after a glue or kern node.
@<If node |p| is a legal breakpoint, check...@>=
if (p==null) pi=eject_penalty;
-else@<Use node |p| to update the current height and depth measurements; if this node
-is not a legal breakpoint, |goto not_found| or |update_heights|, otherwise set |pi|
-to the associated penalty at the break@>;
-@<Check if node |p| is a new champion breakpoint; then \(go)|goto done| if |p| is
-a forced break or if the page-so-far is already too full@>;
+else@<Use node |p| to update the current height and depth measurements; if
+this node is not a legal breakpoint, |goto not_found| or |update_heights|,
+otherwise set |pi| to the associated penalty at the break@>;
+@<Check if node |p| is a new champion breakpoint; then \(go)|goto done| if
+|p| is a forced break or if the page-so-far is already too full@>;
if ((type(p) < glue_node)||(type(p) > kern_node)) goto not_found;
-update_heights: @<Update the current height and depth measurements with respect to
-a glue or kern node~|p|@>;
+update_heights: @<Update the current height and depth measurements with respect
+to a glue or kern node~|p|@>;
not_found: if (prev_dp > d)
{@+cur_height=cur_height+prev_dp-d;
prev_dp=d;
@@ -19568,8 +19686,8 @@ if (split_first_mark!=null)
}
@<Dispense with trivial cases of void or bad boxes@>;
q=vert_break(list_ptr(v), h, split_max_depth);
-@<Look at all the marks in nodes before the break, and set the final link to |null|
-at the break@>;
+@<Look at all the marks in nodes before the break, and set the final link
+to |null| at the break@>;
q=prune_page_top(q, saving_vdiscards > 0);
p=list_ptr(v);list_ptr(v)=null;flush_node_list(v);
if (q!=null) q=vpack(q, natural);
@@ -19957,16 +20075,17 @@ programming, but the author doesn't see much wrong with it, as long as
the various labels have a well-understood meaning.
@<Move node |p| to the current page;...@>=
-@<If the current page is empty and node |p| is to be deleted, |goto done1|; otherwise
-use node |p| to update the state of the current page; if this node is an insertion,
-|goto contribute|; otherwise if this node is not a legal breakpoint, |goto contribute|
-or |update_heights|; otherwise set |pi| to the penalty associated with this breakpoint@>;
-@<Check if node |p| is a new champion breakpoint; then \(if)if it is time for a page
-break, prepare for output, and either fire up the user's output routine and |return|
-or ship out the page and |goto done|@>;
+@<If the current page is empty and node |p| is to be deleted, |goto done1|;
+otherwise use node |p| to update the state of the current page; if this node
+is an insertion, |goto contribute|; otherwise if this node is not a legal
+breakpoint, |goto contribute| or |update_heights|; otherwise set |pi| to the
+penalty associated with this breakpoint@>;
+@<Check if node |p| is a new champion breakpoint; then \(if)if it is time
+for a page break, prepare for output, and either fire up the user's output
+routine and |return| or ship out the page and |goto done|@>;
if ((type(p) < glue_node)||(type(p) > kern_node)) goto contribute;
-update_heights: @<Update the current page measurements with respect to the glue or
-kern specified by node~|p|@>;
+update_heights: @<Update the current page measurements with respect to the
+glue or kern specified by node~|p|@>;
contribute: @<Make sure that |page_max_depth| is not exceeded@>;
@<Link node |p| into the current page and |goto done|@>;
done1: @<Recycle node |p|@>;
@@ -19992,10 +20111,12 @@ we know its successor.
@<If the current page is empty...@>=
switch (type(p)) {
case hlist_node: case vlist_node: case rule_node: if (page_contents < box_there)
- @<Initialize the current page, insert the \.{\\topskip} glue ahead of |p|, and
-|goto continue|@>@;
- else@<Prepare to move a box or rule node to the current page, then |goto contribute|@>@;@+break;
-case whatsit_node: @<Prepare to move whatsit |p| to the current page, then |goto contribute|@>;
+ @<Initialize the current page, insert the \.{\\topskip} glue ahead of
+|p|, and |goto continue|@>@;
+ else@<Prepare to move a box or rule node to the current page, then |goto
+contribute|@>@;@+break;
+case whatsit_node: @<Prepare to move whatsit |p| to the current page, then
+|goto contribute|@>;
case glue_node: if (page_contents < box_there) goto done1;
else if (precedes_break(page_tail)) pi=0;
else goto update_heights;@+break;
@@ -20055,8 +20176,8 @@ page_total=page_total+page_depth+width(q);page_depth=0
@ @<Check if node |p| is a new champion breakpoint; then \(if)...@>=
if (pi < inf_penalty)
- {@+@<Compute the badness, |b|, of the current page, using |awful_bad| if the box
-is too full@>;
+ {@+@<Compute the badness, |b|, of the current page, using |awful_bad| if
+the box is too full@>;
if (b < awful_bad)
if (pi <= eject_penalty) c=pi;
else if (b < inf_bad) c=b+pi+insert_penalties;
@@ -20111,8 +20232,8 @@ n=subtype(p);r=page_ins_head;
while (n >= subtype(link(r))) r=link(r);
n=qo(n);
if (subtype(r)!=qi(n))
- @<Create a page insertion node with |subtype(r)=qi(n)|, and include the glue correction
-for box |n| in the current page state@>;
+ @<Create a page insertion node with |subtype(r)=qi(n)|, and include the
+glue correction for box |n| in the current page state@>;
if (type(r)==split_up) insert_penalties=insert_penalties+float_cost(p);
else{@+last_ins_ptr(r)=p;
delta=page_goal-page_total-page_depth+page_shrink;
@@ -20122,7 +20243,8 @@ else{@+last_ins_ptr(r)=p;
if (((h <= 0)||(h <= delta))&&(height(p)+height(r) <= dimen(n)))
{@+page_goal=page_goal-h;height(r)=height(r)+height(p);
}
- else@<Find the best way to split the insertion, and change |type(r)| to |split_up|@>;
+ else@<Find the best way to split the insertion, and change |type(r)| to
+|split_up|@>;
}
goto contribute;
}
@@ -20230,8 +20352,8 @@ if (bot_mark!=null)
delete_token_ref(first_mark);first_mark=null;
}
@<Put the \(o)optimal current page into box 255, update |first_mark| and |bot_mark|,
-append insertions to their boxes, and put the remaining nodes back on the contribution
-list@>;
+append insertions to their boxes, and put the remaining nodes back on the
+contribution list@>;
if ((top_mark!=null)&&(first_mark==null))
{@+first_mark=top_mark;add_token_ref(top_mark);
}
@@ -20265,15 +20387,15 @@ q=hold_head;link(q)=null;prev_p=page_head;p=link(prev_p);
while (p!=best_page_break)
{@+if (type(p)==ins_node)
{@+if (holding_inserts <= 0)
- @<Either insert the material specified by node |p| into the appropriate box,
-or hold it for the next page; also delete node |p| from the current page@>;
+ @<Either insert the material specified by node |p| into the appropriate
+box, or hold it for the next page; also delete node |p| from the current page@>;
}
else if (type(p)==mark_node) @<Update the values of |first_mark| and |bot_mark|@>;
prev_p=p;p=link(prev_p);
}
split_top_skip=save_split_top_skip;
-@<Break the current page at node |p|, put it in box~255, and put the remaining nodes
-on the contribution list@>;
+@<Break the current page at node |p|, put it in box~255, and put the remaining
+nodes on the contribution list@>;
@<Delete \(t)the page-insertion nodes@>@;
@ @<Ensure that box 255 is empty before output@>=
@@ -20362,14 +20484,14 @@ while (subtype(r)!=subtype(p)) r=link(r);
if (best_ins_ptr(r)==null) wait=true;
else{@+wait=false;s=last_ins_ptr(r);link(s)=ins_ptr(p);
if (best_ins_ptr(r)==p)
- @<Wrap up the box specified by node |r|, splitting node |p| if called for; set
-|wait:=true| if node |p| holds a remainder after splitting@>@;
+ @<Wrap up the box specified by node |r|, splitting node |p| if called
+for; set |wait:=true| if node |p| holds a remainder after splitting@>@;
else{@+while (link(s)!=null) s=link(s);
last_ins_ptr(r)=s;
}
}
-@<Either append the insertion node |p| after node |q|, and remove it from the current
-page, or delete |node(p)|@>;
+@<Either append the insertion node |p| after node |q|, and remove it from
+the current page, or delete |node(p)|@>;
}
@ @<Wrap up the box specified by node |r|, splitting node |p| if...@>=
@@ -20540,7 +20662,8 @@ if (every_job!=null) begin_token_list(every_job, every_job_text);
big_switch: get_x_token();@/
reswitch: @<Give diagnostic information, if requested@>;
switch (abs(mode)+cur_cmd) {
-case hmode+letter: case hmode+other_char: case hmode+char_given: goto main_loop;
+case hmode+letter: case hmode+other_char:
+ case hmode+char_given: goto main_loop;
case hmode+char_num: {@+scan_char_num();cur_chr=cur_val;goto main_loop;@+}
case hmode+no_boundary: {@+get_x_token();
if ((cur_cmd==letter)||(cur_cmd==other_char)||(cur_cmd==char_given)||
@@ -20553,10 +20676,11 @@ case hmode+ex_space: case mmode+ex_space: goto append_normal_space;
@t\4@>@<Cases of |main_control| that are not part of the inner loop@>@;
} /*of the big |case| statement*/
goto big_switch;
-main_loop: @<Append character |cur_chr| and the following characters (if~any) to the
-current hlist in the current font; |goto reswitch| when a non-character has been fetched@>;
-append_normal_space: @<Append a normal inter-word space to the current list, then
-|goto big_switch|@>;
+main_loop: @<Append character |cur_chr| and the following characters (if~any)
+to the current hlist in the current font; |goto reswitch| when a non-character
+has been fetched@>;
+append_normal_space: @<Append a normal inter-word space to the current list,
+then |goto big_switch|@>;
}
@ When a new token has just been fetched at |big_switch|, we have an
@@ -20644,15 +20768,15 @@ if (main_k==non_address) goto main_loop_move2; /*no left boundary processing*/
cur_r=cur_l;cur_l=non_char;
goto main_lig_loop1; /*begin with cursor after left boundary*/
@#
-main_loop_wrapup: @<Make a ligature node, if |ligature_present|; insert a null discretionary,
-if appropriate@>;
-main_loop_move: @<If the cursor is immediately followed by the right boundary, |goto
-reswitch|; if it's followed by an invalid character, |goto big_switch|; otherwise
-move the cursor one step to the right and |goto main_lig_loop|@>;
-main_loop_lookahead: @<Look ahead for another character, or leave |lig_stack| empty
-if there's none there@>;
-main_lig_loop: @<If there's a ligature/kern command relevant to |cur_l| and |cur_r|,
-adjust the text appropriately; exit to |main_loop_wrapup|@>;
+main_loop_wrapup: @<Make a ligature node, if |ligature_present|; insert a
+null discretionary, if appropriate@>;
+main_loop_move: @<If the cursor is immediately followed by the right boundary,
+|goto reswitch|; if it's followed by an invalid character, |goto big_switch|;
+otherwise move the cursor one step to the right and |goto main_lig_loop|@>;
+main_loop_lookahead: @<Look ahead for another character, or leave |lig_stack|
+empty if there's none there@>;
+main_lig_loop: @<If there's a ligature/kern command relevant to |cur_l| and
+|cur_r|, adjust the text appropriately; exit to |main_loop_wrapup|@>;
main_loop_move_lig: @<Move the cursor past a pseudo-ligature, then |goto main_loop_lookahead|
or |main_lig_loop|@>@;
@@ -20830,7 +20954,8 @@ is zero or~not.
@<Append a normal inter-word space...@>=
if (space_skip==zero_glue)
- {@+@<Find the glue specification, |main_p|, for text spaces in the current font@>;
+ {@+@<Find the glue specification, |main_p|, for text spaces in the current
+font@>;
temp_ptr=new_glue(main_p);
}
else temp_ptr=new_param_glue(space_skip_code);
@@ -20875,10 +21000,12 @@ shrink(main_p)=xn_over_d(shrink(main_p), 1000, space_factor)
@ Whew---that covers the main loop. We can now proceed at a leisurely
pace through the other combinations of possibilities.
-@d any_mode(A) case vmode+A: case hmode+A: case mmode+A /*for mode-independent commands*/
+@d any_mode(A) case vmode+A: case hmode+A:
+ case mmode+A /*for mode-independent commands*/
@<Cases of |main_control| that are not part of the inner loop@>=
-any_mode(relax): case vmode+spacer: case mmode+spacer: case mmode+no_boundary: do_nothing;
+any_mode(relax): case vmode+spacer: case mmode+spacer:
+ case mmode+no_boundary: do_nothing;
any_mode(ignore_spaces): {@+@<Get the next non-blank non-call...@>;
goto reswitch;
}
@@ -20902,7 +21029,8 @@ non_math(left_right): non_math(above): non_math(radical):
non_math(math_style): non_math(math_choice): non_math(vcenter):
non_math(non_script): non_math(mkern): non_math(limit_switch):
non_math(mskip): non_math(math_accent):
-case mmode+endv: case mmode+par_end: case mmode+stop: case mmode+vskip: case mmode+un_vbox:
+case mmode+endv: case mmode+par_end: case mmode+stop:
+ case mmode+vskip: case mmode+un_vbox:
case mmode+valign: case mmode+hrule
@ @<Declare action...@>=
@@ -21026,7 +21154,8 @@ it simply calls on the action routine |append_glue|. Similarly, \.{\\kern}
activates |append_kern|.
@<Cases of |main_control| that build...@>=
-case vmode+vskip: case hmode+hskip: case mmode+hskip: case mmode+mskip: append_glue();@+break;
+case vmode+vskip: case hmode+hskip: case mmode+hskip:
+ case mmode+mskip: append_glue();@+break;
any_mode(kern): case mmode+mkern: append_kern();@+break;
@ The |hskip| and |vskip| command codes are used for control sequences
@@ -21161,7 +21290,8 @@ if (cur_group==bottom_level)
@<Drop current token and complain that it was unmatched@>@;
else{@+back_input();p=get_avail();link(temp_head)=p;
print_err("Missing ");
- @<Prepare to insert a token that matches |cur_group|, and print what it is@>;
+ @<Prepare to insert a token that matches |cur_group|, and print what it
+is@>;
print(" inserted");ins_list(link(temp_head));
help5("I've inserted something that you may have forgotten.",@/
"(See the <inserted text> above.)",@/
@@ -21222,8 +21352,10 @@ case bottom_level: {@+print_err("Too many }'s");
help2("You've closed more groups than you opened.",@/
"Such booboos are generally harmless, so keep going.");error();
} @+break;
-case semi_simple_group: case math_shift_group: case math_left_group: extra_right_brace();@+break;
-@t\4@>@<Cases of |handle_right_brace| where a |right_brace| triggers a delayed action@>@;
+case semi_simple_group: case math_shift_group:
+ case math_left_group: extra_right_brace();@+break;
+@t\4@>@<Cases of |handle_right_brace| where a |right_brace| triggers a delayed
+action@>@;
default:confusion("rightbrace");
@:this can't happen rightbrace}{\quad rightbrace@>
}
@@ -21377,8 +21509,8 @@ static pointer @!cur_box; /*box to be placed into its context*/
static void box_end(int @!box_context)
{@+pointer p; /*|ord_noad| for new box in math mode*/
small_number @!a; /*global prefix*/
-if (box_context < box_flag) @<Append box |cur_box| to the current list, shifted by
-|box_context|@>@;
+if (box_context < box_flag) @<Append box |cur_box| to the current list, shifted
+by |box_context|@>@;
else if (box_context < ship_out_flag) @<Store \(c)|cur_box| in a box register@>@;
else if (cur_box!=null)
if (box_context > ship_out_flag) @<Append a new leader node that uses |cur_box|@>@;
@@ -21456,9 +21588,10 @@ case box_code: {@+scan_register_num();fetch_box(cur_box);
} @+break;
case copy_code: {@+scan_register_num();fetch_box(q);cur_box=copy_node_list(q);
} @+break;
-case last_box_code: @<If the current list ends with a box node, delete it from the
-list and make |cur_box| point to it; otherwise set |cur_box:=null|@>@;@+break;
-case vsplit_code: @<Split off part of a vertical box, make |cur_box| point to it@>@;@+break;
+case last_box_code: @<If the current list ends with a box node, delete it
+from the list and make |cur_box| point to it; otherwise set |cur_box:=null|@>@;@+break;
+case vsplit_code: @<Split off part of a vertical box, make |cur_box| point
+to it@>@;@+break;
default:@<Initiate the construction of an hbox or vbox, then |return|@>@;
} @/
box_end(box_context); /*in simple cases, we use the box immediately*/
@@ -21605,9 +21738,12 @@ case start_par: if (chr_code==0) print_esc("noindent");@+else print_esc("indent"
@ @<Cases of |main_control| that build...@>=
case vmode+start_par: new_graf(cur_chr > 0);@+break;
-case vmode+letter: case vmode+other_char: case vmode+char_num: case vmode+char_given:
- case vmode+math_shift: case vmode+un_hbox: case vmode+vrule:
- case vmode+accent: case vmode+discretionary: case vmode+hskip: case vmode+valign:
+case vmode+letter: case vmode+other_char:
+ case vmode+char_num: case vmode+char_given:
+ case vmode+math_shift: case vmode+un_hbox:
+ case vmode+vrule:
+ case vmode+accent: case vmode+discretionary:
+ case vmode+hskip: case vmode+valign:
case vmode+ex_space: case vmode+no_boundary: @t@>@;@/
{@+back_input();new_graf(true);
} @+break;
@@ -21661,7 +21797,8 @@ case hmode+par_end: {@+if (align_state < 0) off_save(); /*this tries to
end_graf(); /*this takes us to the enclosing mode, if |mode > 0|*/
if (mode==vmode) build_page();
} @+break;
-case hmode+stop: case hmode+vskip: case hmode+hrule: case hmode+un_vbox: case hmode+halign: head_for_vmode();@+break;
+case hmode+stop: case hmode+vskip: case hmode+hrule:
+ case hmode+un_vbox: case hmode+halign: head_for_vmode();@+break;
@ @<Declare act...@>=
static void head_for_vmode(void)
@@ -21692,7 +21829,8 @@ static void end_graf(void)
pieces of the program.
@<Cases of |main_control| that build...@>=
-any_mode(insert): case hmode+vadjust: case mmode+vadjust: begin_insert_or_adjust();@+break;
+any_mode(insert): case hmode+vadjust:
+ case mmode+vadjust: begin_insert_or_adjust();@+break;
any_mode(mark): make_mark();@+break;
@ @<Forbidden...@>=
@@ -21778,7 +21916,8 @@ static void delete_last(void)
pointer @!p, @!q; /*run through the current list*/
int @!m; /*the length of a replacement list*/
if ((mode==vmode)&&(tail==head))
- @<Apologize for inability to do the operation now, unless \.{\\unskip} follows non-glue@>@;
+ @<Apologize for inability to do the operation now, unless \.{\\unskip} follows
+non-glue@>@;
else{@+if (!is_char_node(tail)) if (type(tail)==cur_chr)
{@+q=head;
@/do@+{p=q;
@@ -21835,7 +21974,8 @@ case un_vbox: if (chr_code==copy_code) print_esc("unvcopy")
@ The |un_hbox| and |un_vbox| commands unwrap one of the 256 current boxes.
@<Cases of |main_control| that build...@>=
-case vmode+un_vbox: case hmode+un_hbox: case mmode+un_hbox: unpackage();@+break;
+case vmode+un_vbox: case hmode+un_hbox:
+ case mmode+un_hbox: unpackage();@+break;
@ @<Declare act...@>=
static void unpackage(void)
@@ -21937,15 +22077,15 @@ static void build_discretionary(void)
pointer p, @!q; /*for link manipulation*/
int @!n; /*length of discretionary list*/
unsave();
-@<Prune the current list, if necessary, until it contains only |char_node|, |kern_node|,
-|hlist_node|, |vlist_node|, |rule_node|, and |ligature_node| items; set |n| to the
-length of the list, and set |q| to the list's tail@>;
+@<Prune the current list, if necessary, until it contains only |char_node|,
+|kern_node|, |hlist_node|, |vlist_node|, |rule_node|, and |ligature_node|
+items; set |n| to the length of the list, and set |q| to the list's tail@>;
p=link(head);pop_nest();
switch (saved(-1)) {
case 0: pre_break(tail)=p;@+break;
case 1: post_break(tail)=p;@+break;
-case 2: @<Attach list |p| to the current list, and record its length; then finish
-up and |return|@>;
+case 2: @<Attach list |p| to the current list, and record its length; then
+finish up and |return|@>;
} /*there are no other cases*/
incr(saved(-1));new_save_level(disc_group);scan_left_brace();
push_nest();mode=-hmode;space_factor=1000;
@@ -22020,8 +22160,8 @@ if (p!=null)
@^real division@>
a=char_width(f, char_info(f, character(p)));@/
do_assignments();@/
- @<Create a character node |q| for the next character, but set |q:=null| if problems
-arise@>;
+ @<Create a character node |q| for the next character, but set |q:=null|
+if problems arise@>;
if (q!=null) @<Append the accent with appropriate kerns, then set |p:=q|@>;
link(tail)=p;tail=p;space_factor=1000;
}
@@ -22289,8 +22429,8 @@ if (every_display!=null) begin_token_list(every_display, every_display_text);
v=shift_amount(just_box)+2*quad(cur_font);w=-max_dimen;
p=list_ptr(just_box);
while (p!=null)
- {@+@<Let |d| be the natural width of node |p|; if the node is ``visible,'' |goto
-found|; if the node is glue that stretches or shrinks, set |v:=max_dimen|@>;
+ {@+@<Let |d| be the natural width of node |p|; if the node is ``visible,''
+|goto found|; if the node is glue that stretches or shrinks, set |v:=max_dimen|@>;
if (v < max_dimen) v=v+d;
goto not_found;
found: if (v < max_dimen)
@@ -22312,8 +22452,8 @@ case hlist_node: case vlist_node: case rule_node: {@+d=width(p);goto found;
}
case ligature_node: @<Make node |p| look like a |char_node|...@>@;
case kern_node: case math_node: d=width(p);@+break;
-case glue_node: @<Let |d| be the natural width of this glue; if stretching or shrinking,
-set |v:=max_dimen|; |goto found| in the case of leaders@>@;@+break;
+case glue_node: @<Let |d| be the natural width of this glue; if stretching
+or shrinking, set |v:=max_dimen|; |goto found| in the case of leaders@>@;@+break;
case whatsit_node: @<Let |d| be the width of the whatsit |p|@>;@+break;
default:d=0;
}
@@ -22437,7 +22577,8 @@ was first properly typeset by \TeX. The code in this section was used.
@^Knuth, Donald Ervin@>
@<Cases of |main_control| that build...@>=
-case mmode+letter: case mmode+other_char: case mmode+char_given:
+case mmode+letter: case mmode+other_char:
+ case mmode+char_given:
set_math_char(ho(math_code(cur_chr)));@+break;
case mmode+char_num: {@+scan_char_num();cur_chr=cur_val;
set_math_char(ho(math_code(cur_chr)));
@@ -22552,8 +22693,8 @@ else{@+@<Get the next non-blank non-relax...@>;
default:cur_val=-1;
}
}
-if (cur_val < 0) @<Report that an invalid delimiter code is being changed to null;
-set~|cur_val:=0|@>;
+if (cur_val < 0) @<Report that an invalid delimiter code is being changed
+to null; set~|cur_val:=0|@>;
small_fam(p)=(cur_val/04000000)%16;
small_char(p)=qi((cur_val/010000)%256);
large_fam(p)=(cur_val/256)%16;
@@ -22931,8 +23072,8 @@ int @!m; /*|mmode| or |-mmode|*/
pointer @!p; /*the formula*/
pointer @!a; /*box containing equation number*/
danger=false;
-@<Check that the necessary fonts for math symbols are present; if not, flush the current
-math lists and set |danger:=true|@>;
+@<Check that the necessary fonts for math symbols are present; if not, flush
+the current math lists and set |danger:=true|@>;
m=mode;l=false;p=fin_mlist(null); /*this pops the nest*/
if (mode==-m) /*end of equation number*/
{@+@<Check that another \.\$ follows@>;
@@ -22941,8 +23082,8 @@ if (mode==-m) /*end of equation number*/
unsave();decr(save_ptr); /*now |cur_group==math_shift_group|*/
if (saved(0)==1) l=true;
danger=false;
- @<Check that the necessary fonts for math symbols are present; if not, flush the
-current math lists and set |danger:=true|@>;
+ @<Check that the necessary fonts for math symbols are present; if not, flush
+the current math lists and set |danger:=true|@>;
m=mode;p=fin_mlist(null);
}
else a=null;
@@ -23507,8 +23648,8 @@ case toks_register: case assign_toks: {@+q=cur_cs;
p=cur_chr; /*|p==every_par_loc| or |output_routine_loc| or \dots*/
scan_optional_equals();
@<Get the next non-blank non-relax non-call token@>;
- if (cur_cmd!=left_brace) @<If the right-hand side is a token parameter or token
-register, finish the assignment and |goto done|@>;
+ if (cur_cmd!=left_brace) @<If the right-hand side is a token parameter or
+token register, finish the assignment and |goto done|@>;
back_input();cur_cs=q;q=scan_toks(false, false);
if (link(def_ref)==null) /*empty list: revert to the default*/
{@+sa_define(p, null, p, undefined_cs, null);free_avail(def_ref);
@@ -23637,7 +23778,8 @@ case def_family: {@+p=cur_chr;scan_four_bit_int();p=p+cur_val;
@ Next we consider changes to \TeX's numeric registers.
@<Assignments@>=
-case internal_register: case advance: case multiply: case divide: do_register_command(a);@+break;
+case internal_register: case advance:
+ case multiply: case divide: do_register_command(a);@+break;
@ We use the fact that |internal_register < advance < multiply < divide|.
@@ -23964,8 +24106,8 @@ else{@+old_setting=selector;selector=new_string;
}
define(u, set_font, null_font);scan_optional_equals();scan_file_name();
@<Scan the font size specification@>;
-@<If this font has already been loaded, set |f| to the internal font number and |goto
-common_ending|@>;
+@<If this font has already been loaded, set |f| to the internal font number
+and |goto common_ending|@>;
f=read_font_info(u, cur_name, cur_area, s);
common_ending: define(u, set_font, f);eqtb[font_id_base+f]=eqtb[u];font_id_text(f)=t;
}
@@ -24273,7 +24415,8 @@ case show_lists_code: {@+begin_diagnostic();show_activities();
case show_box_code: @<Show the current contents of a box@>@;@+break;
case show_code: @<Show the current meaning of a token, then |goto common_ending|@>@;
@<Cases for |show_whatever|@>@;@/
-default:@<Show the current value of some parameter or register, then |goto common_ending|@>@;
+default:@<Show the current value of some parameter or register, then |goto
+common_ending|@>@;
} @/
@<Complete a potentially long \.{\\show} command@>;
common_ending: if (interaction < error_stop_mode)
@@ -24307,7 +24450,8 @@ print_meaning();goto common_ending;
@ @<Cases of |print_cmd_chr|...@>=
case undefined_cs: print("undefined");@+break;
-case call: case long_call: case outer_call: case long_outer_call: {@+n=cmd-call;
+case call: case long_call: case outer_call:
+ case long_outer_call: {@+n=cmd-call;
if (info(link(chr_code))==protected_token) n=n+4;
if (odd(n/4)) print_esc("protected");
if (odd(n)) print_esc("long");
@@ -24373,8 +24517,8 @@ int @!p, @!q; /*all-purpose pointers*/
int @!x; /*something to dump*/
four_quarters @!w; /*four ASCII codes*/
@<If dumping is not allowed, abort@>;
-@<Create the |format_ident|, open the format file, and inform the user that dumping
-has begun@>;
+@<Create the |format_ident|, open the format file, and inform the user that
+dumping has begun@>;
eqtb[dimen_base+hsize_code].i=hhsize;
eqtb[dimen_base+vsize_code].i=hvsize;
@<Dump constants for consistency check@>;
@@ -25403,6 +25547,7 @@ primitive("special", extension, special_node);@/
@!@:special\_}{\.{\\special} primitive@>
primitive("immediate", extension, immediate_code);@/
@!@:immediate\_}{\.{\\immediate} primitive@>
+
primitive("setlanguage", extension, set_language_code);@/
@!@:set\_language\_}{\.{\\setlanguage} primitive@>
@@ -25421,22 +25566,22 @@ primitive("HINTendlink", extension, end_link_node);@/
primitive("HINToutline", extension, outline_node);@/
@!@:HINToutline\_}{\.{\\HINToutline} primitive@>
-primitive("image", extension, image_node);@/
+primitive("HINTimage", extension, image_node);@/
@!@:image\_}{\.{\\image} primitive@>
-primitive("setpage", extension, setpage_node);@/
+primitive("HINTsetpage", extension, setpage_node);@/
@!@:setpage\_}{\.{\\setpage} primitive@>
-primitive("stream", extension, stream_node);@/
+primitive("HINTstream", extension, stream_node);@/
@!@:stream\_}{\.{\\stream} primitive@>
-primitive("setstream", extension, setstream_node);@/
+primitive("HINTsetstream", extension, setstream_node);@/
@!@:setstream\_}{\.{\\setstream} primitive@>
-primitive("before", extension, stream_before_node);@/
+primitive("HINTbefore", extension, stream_before_node);@/
@!@:before\_}{\.{\\before} primitive@>
-primitive("after", extension, stream_after_node);@/
+primitive("HINTafter", extension, stream_after_node);@/
@!@:after\_}{\.{\\after} primitive@>
@@ -25460,15 +25605,15 @@ case extension: switch (chr_code) {
case vpack_node: print("vpack");@+break;
case hset_node: print("hset");@+break;
case vset_node: print("vset");@+break;
- case image_node: print("image");@+break;
- case start_link_node: print("startlink");@+break;
- case end_link_node: print("endlink");@+break;
- case label_node: print("dest");@+break;
- case outline_node: print("outline");@+break;
+ case image_node: print("HINTimage");@+break;
+ case start_link_node: print("HINTstartlink");@+break;
+ case end_link_node: print("HINTendlink");@+break;
+ case label_node: print("HINTdest");@+break;
+ case outline_node: print("HINToutline");@+break;
case align_node: print("align");@+break;
- case setpage_node: print("setpage");@+break;
- case setstream_node: print("setstream");@+break;
- case stream_node: print("stream");@+break;
+ case setpage_node: print("HINTsetpage");@+break;
+ case setstream_node: print("HINTsetstream");@+break;
+ case stream_node: print("HINTstream");@+break;
case xdimen_node: print("xdimen");@+break;
case ignore_node: print("ignore");@+break;
case immediate_code: print_esc("immediate");@+break;
@@ -25810,7 +25955,7 @@ case hpack_node: case vpack_node:
node_list_display(list_ptr(p));
break;
case image_node:
- print_esc("image(");
+ print_esc("HINTimage(");
print_char('(');print_scaled(image_height(p));
print_char('+'); print_scaled(image_depth(p));
print(")x"); print_scaled(image_width(p));
@@ -25828,7 +25973,7 @@ case align_node:
node_list_display(align_list(p));
break;
case setpage_node:
- print_esc("setpage");print_int(setpage_number(p));print_char(' '); printn(setpage_name(p));
+ print_esc("HINTsetpage");print_int(setpage_number(p));print_char(' '); printn(setpage_name(p));
print(" priority ");print_int(setpage_priority(p));
print(" width ");print_xdimen(setpage_width(p));
print(" height ");print_xdimen(setpage_height(p));
@@ -25838,7 +25983,7 @@ case setpage_node:
node_list_display(setpage_streams(p));
break;
case setstream_node:
- print_esc("setstream");print_int(setstream_insertion(p));
+ print_esc("HINTsetstream");print_int(setstream_insertion(p));
print_char('(');print_int(setstream_number(p));print_char(')');
if (setstream_prefered(p)!=255) { print(" prefered ");print_int(setstream_prefered(p)); }
if (setstream_ratio(p)>0) { print(" ratio ");print_int(setstream_ratio(p)); }
@@ -25852,8 +25997,8 @@ case setstream_node:
print_spec(setstream_height(p),0);
print_ln();print_current_string();print_esc("hsize=");print_xdimen(setstream_width(p));
print_ln();print_current_string();print_esc("topskip=");print_spec(setstream_topskip(p),0);
- if (setstream_before(p)!=null) { print_ln();print_current_string();print_esc("before");node_list_display(setstream_before(p));}
- if (setstream_after(p)!=null) { print_ln();print_current_string();print_esc("after");node_list_display(setstream_after(p));}
+ if (setstream_before(p)!=null) { print_ln();print_current_string();print_esc("HINTbefore");node_list_display(setstream_before(p));}
+ if (setstream_after(p)!=null) { print_ln();print_current_string();print_esc("HINTafter");node_list_display(setstream_after(p));}
flush_char;
break;
case ignore_node:
@@ -25861,14 +26006,14 @@ case ignore_node:
node_list_display(ignore_list(p));
break;
case start_link_node:
- print_esc("startlink ");
+ print_esc("HINTstartlink ");
print_label(p);
break;
case end_link_node:
- print_esc("endlink ");
+ print_esc("HINTendlink ");
break;
case label_node:
- print_esc("dest ");
+ print_esc("HINTdest ");
print_label(p);
if (label_where(p)==1) print("top");
else if (label_where(p)==2) print("bot");
@@ -25876,14 +26021,14 @@ case label_node:
else print("undefined");
break;
case outline_node:
- print_esc("outline");
+ print_esc("HINToutline");
print_label(p);
print(" depth "); print_int(outline_depth(p));
if (outline_ptr(p)==null) print("{}"); else
{ print_ln();print_current_string();node_list_display(outline_ptr(p));}
break;
case stream_node:
- print_esc("stream");print_int(stream_insertion(p));
+ print_esc("HINTstream");print_int(stream_insertion(p));
print_char('(');print_int(stream_number(p));print_char(')');
break;
case xdimen_node:
@@ -26210,8 +26355,8 @@ help2("On this page there's a \\write with fewer real {'s than }'s.",@/
static void out_what(pointer @!p)
{@+small_number j; /*write stream number*/
switch (subtype(p)) {
-case open_node: case write_node: case close_node: @<Do some work that has been queued
-up for \.{\\write}@>@;@+break;
+case open_node: case write_node: case close_node: @<Do some work that has
+been queued up for \.{\\write}@>@;@+break;
case special_node:
case language_node:
case save_pos_code: do_nothing;@+break;
@@ -26430,7 +26575,8 @@ case saving_vdiscards_code: print_esc("savingvdiscards");@+break;
boolean variables.
@<Glob...@>=
-static bool @!eof_seen0[max_in_open], *const @!eof_seen = @!eof_seen0-1; /*has eof been seen?*/
+static bool @!eof_seen0[max_in_open],
+ *const @!eof_seen = @!eof_seen0-1; /*has eof been seen?*/
@ The |print_group| procedure prints the current level of grouping and
the name corresponding to |cur_group|.
@@ -26459,7 +26605,8 @@ switch (cur_group) {
case disc_group: print("disc");@+break;
case insert_group: print("insert");@+break;
case vcenter_group: print("vcenter");@+break;
- case math_group: case math_choice_group: case math_shift_group: case math_left_group:
+ case math_group: case math_choice_group:
+ case math_shift_group: case math_left_group:
{@+print("math");
if (cur_group==math_choice_group) print(" choice");
else if (cur_group==math_shift_group) print(" shift");
@@ -27870,7 +28017,8 @@ be dumped and undumped; the last one is also known as |sa_mark|.
@d sa_mark sa_root[mark_val] /*root for mark classes*/
@<Glob...@>=
-static pointer @!sa_root0[mark_val-int_val+1], *const @!sa_root = @!sa_root0-int_val; /*roots of sparse arrays*/
+static pointer @!sa_root0[mark_val-int_val+1],
+ *const @!sa_root = @!sa_root0-int_val; /*roots of sparse arrays*/
static pointer @!cur_ptr; /*value returned by |new_index| and |find_sa_element|*/
static memory_word @!sa_null; /*two |null| pointers*/
@@ -28324,7 +28472,8 @@ vertical list are saved in special lists instead of being discarded.
@d split_disc disc_ptr[vsplit_code] /*first item removed by \.{\\vsplit}*/
@<Glob...@>=
-static pointer @!disc_ptr0[vsplit_code-copy_code+1], *const @!disc_ptr = @!disc_ptr0-copy_code; /*list pointers*/
+static pointer @!disc_ptr0[vsplit_code-copy_code+1],
+ *const @!disc_ptr = @!disc_ptr0-copy_code; /*list pointers*/
@ @<Set init...@>=
page_disc=null;split_disc=null;
@@ -28628,7 +28777,8 @@ too the maximal size of the date returned by \.{\\creationdate} or
\.{\\filemoddate} that is $23$ \.{text\_char}. So at least $64$ for now.
@<Global...@>=
-static eight_bits @!xchg_buffer0[xchg_buffer_size], *const @!xchg_buffer = @!xchg_buffer0-1;
+static eight_bits @!xchg_buffer0[xchg_buffer_size],
+ *const @!xchg_buffer = @!xchg_buffer0-1;
/*exchange buffer for interaction with system routines*/
static int @!xchg_buffer_length; /*last valid index in this buf; 0 means no data*/
@ @<Check \Prote\ ``constant'' values for consistency@>=
@@ -28794,7 +28944,8 @@ an |ROM_undefined_primitive| that will allow an easy test.
else p=ROM_undefined_primitive
@<Global...@>=
-static memory_word @!ROM0[ROM_size-ROM_base+1], *const @!ROM = @!ROM0-ROM_base;
+static memory_word @!ROM0[ROM_size-ROM_base+1],
+ *const @!ROM = @!ROM0-ROM_base;
@ Even if it will be unused in \TeX\ or \eTeX\ modes, we will initialize
it since we add code to the |primitive| procedure and we need \TeX\
@@ -29344,8 +29495,8 @@ else{@+y=1302456956+4-100; /*$14\times2^{27}\ln2\approx1302456956.421063$*/
and $2^{16}\times.74436163\approx 48782$*/
y=y+(z/unity);k=2;
while (x > mpfract_four+4)
- @<Increase |k| until |x| can be multiplied by a factor of $2^{-k}$, and adjust
-$y$ accordingly@>;
+ @<Increase |k| until |x| can be multiplied by a factor of $2^{-k}$, and
+adjust $y$ accordingly@>;
return y/8;
}
}
@@ -29874,7 +30025,36 @@ case save_pos_code: save_pos_out(p);@+break;
In the following we present macros, variables, and routines that
implement the various features that have been used above to replace
\TeX's native behaviour.
-The implementation reuses code that has been written as part of
+
+@ Following the implemenentation of other engines,
+the new engine returns a version number as an integer
+extending the cases for |last_item|. Since the additional
+primitives that we define are specific to the \HINT\ format,
+we return version and subversion of the \HINT\ file
+format that this program will generate.
+
+@d HINT_version_code (eTeX_last_last_item_cmd_mod+7) /* \.{\\HINTversion} */
+@d HINT_subversion_code (eTeX_last_last_item_cmd_mod+8) /* \.{\\HINTsubversion} */
+
+@<Generate all \Prote\ primitives@>=
+primitive("HINTversion", last_item, HINT_version_code);
+@!@:HINT\_version\_}{\.{\\HINTversion} primitive@>
+primitive("HINTsubversion", last_item, HINT_subversion_code);
+@!@:HINT\_subversion\_}{\.{\\HINTsubversion} primitive@>
+
+@ Now this new primitive needs its implementation
+
+@<Cases of |last_item| for |print_cmd_chr|@>=
+case HINT_version_code: print_esc("HINTversion");@+break;
+case HINT_subversion_code: print_esc("HINTsubversion");@+break;
+
+@ @<Cases for fetching a \Prote\ int value@>=
+case HINT_version_code: cur_val=HINT_VERSION;@+break;
+case HINT_subversion_code: cur_val=HINT_SUB_VERSION;@+break;
+
+
+
+@ The implementation reuses code that has been written as part of
the \HINT\ file format specification; therfore we start with three
include files containing the necessary declarations.
We end with a list of forward declarations for all the functions
@@ -30102,7 +30282,6 @@ static void hline_break(int final_widow_penalty)
pointer r, s ; /*miscellaneous nodes of temporary interest*/
pointer pp;
bool par_shape_fix=false;
- bool first_word=true;
if (DBGTEX&debugflags)
{ print_ln();print("Before hline_break:\n");
breadth_max=200;
@@ -30158,10 +30337,12 @@ static void hline_break(int final_widow_penalty)
show_node_list(link(temp_head));print_ln();
}
auto_breaking=true;
- cur_p=temp_head;
- if (option_hyphen_first && is_char_node(link(cur_p)))
- { hyphenate_word(); first_word=false; }
- cur_p=link(cur_p);
+ if (option_hyphen_first && is_char_node(link(temp_head)))
+ { cur_p = new_glue(zero_glue);
+ link(cur_p)=link(temp_head);
+ }
+ else
+ cur_p=link(temp_head);
while (cur_p!=null)
{ /*Call |try_break| if |cur_p| is a legal breakpoint...*/
if (is_char_node(cur_p))
@@ -30195,8 +30376,6 @@ static void hline_break(int final_widow_penalty)
default:
break;
}
- if (option_hyphen_first && first_word && is_char_node(link(cur_p)))
- { hyphenate_word(); first_word=false; }
cur_p=link(cur_p);
done5:;
}
@@ -33979,14 +34158,12 @@ static int argument_is(struct option *opt, char * s)
@ Now we can handle the first two options:
-@d HiTeX_version 1
-@d HiTeX_revision 0
-@d HiTeX_version_string "1.0"
-
@<handle the option at |option_index|@>=
if (ARGUMENT_IS("help")) usage_help();
else if (ARGUMENT_IS("version")){@+
- printf("Version " HiTeX_version_string "\n");
+ printf(banner "\n"
+ "eTeX version " eTeX_version_string "\n"
+ "Prote version " Prote_version_string "\n");
exit(0);@+
}
@@ -34764,31 +34941,6 @@ static int get_md5_sum(int s, int file)
}
-@ Following the implemenentation of other engines,
-the new engine returns a version number as an integer
-extending the cases for |last_item|.
-
-@d HiTeX_version_code (eTeX_last_last_item_cmd_mod+7) /* \.{\\HiTeXversion} */
-@d HiTeX_revision_code (eTeX_last_last_item_cmd_mod+8) /* \.{\\HiTeXrevision} */
-
-@<Generate all \Prote\ primitives@>=
-primitive("HiTeXversion", last_item, HiTeX_version_code);
-@!@:HiTeX\_version\_}{\.{\\HiTeXversion} primitive@>
-primitive("HiTeXrevision", last_item, HiTeX_revision_code);
-@!@:HiTeX\_revision\_}{\.{\\HiTeXrevision} primitive@>
-
-@ Now this new primitive needs its implementation
-
-@<Cases of |last_item| for |print_cmd_chr|@>=
-case HiTeX_version_code: print_esc("HiTeXversion");@+break;
-case HiTeX_revision_code: print_esc("HiTeXrevision");@+break;
-
-@ @<Cases for fetching a \Prote\ int value@>=
-case HiTeX_version_code: cur_val=HiTeX_version;@+break;
-case HiTeX_revision_code: cur_val=HiTeX_revision;@+break;
-
-
-
@* Index.
Here is where you can find all uses of each identifier in the program,
with underlined entries pointing to where the identifier was defined.