diff options
author | Martin Ruckert <martin.ruckert@hm.edu> | 2023-02-14 12:28:51 +0000 |
---|---|---|
committer | Martin Ruckert <martin.ruckert@hm.edu> | 2023-02-14 12:28:51 +0000 |
commit | 06f03d33add65cbf5c61f0d4440b1b79f61051e1 (patch) | |
tree | 0a71063f328e9a72d545fe58a760a939fac6365b /Build/source | |
parent | 1449873055b5fc72de8445624a3c9fd0076a32b7 (diff) |
HiTeX
- New Version 2.0 HINT file format
- merging list and text tags
- eliminating 24 bit integers
- introcuding unknown nodes
- new defined type: Tag
- imlementing extended vtop boxes
- renaming some extern identifieres using a hint_ prefix
git-svn-id: svn://tug.org/texlive/trunk@65829 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source')
24 files changed, 4636 insertions, 4001 deletions
diff --git a/Build/source/texk/web2c/hitexdir/doc/hiformat.hnt b/Build/source/texk/web2c/hitexdir/doc/hiformat.hnt Binary files differindex f6d982d8461..44414a303c7 100644 --- a/Build/source/texk/web2c/hitexdir/doc/hiformat.hnt +++ b/Build/source/texk/web2c/hitexdir/doc/hiformat.hnt diff --git a/Build/source/texk/web2c/hitexdir/doc/hiformat.pdf b/Build/source/texk/web2c/hitexdir/doc/hiformat.pdf Binary files differindex 405fd81d504..2c952afbc46 100644 --- a/Build/source/texk/web2c/hitexdir/doc/hiformat.pdf +++ b/Build/source/texk/web2c/hitexdir/doc/hiformat.pdf diff --git a/Build/source/texk/web2c/hitexdir/hiformat.w b/Build/source/texk/web2c/hitexdir/hiformat.w index 24efd4398c4..809d1ef91d8 100644 --- a/Build/source/texk/web2c/hitexdir/hiformat.w +++ b/Build/source/texk/web2c/hitexdir/hiformat.w @@ -473,22 +473,25 @@ Now let's see how writing the short format works in detail. \subsection{Writing the Short Format} -A content node in short form begins with a start\index{start byte} byte. It tells us what kind of node it is. -To describe the content of a short \HINT\ file, 32 different kinds\index{kind} of nodes are defined. -Hence the kind of a node can be stored in 5 bits and the remaining bits of the start byte -can be used to contain a 3 bit ``info''\index{info} value. - -We define an enumeration type to give symbolic names to the kind-values. -The exact numerical values are of no specific importance; -we will see in section~\secref{text}, however, that the assignment chosen below, -has certain advantages. +A content node in short form begins with a start\index{start byte} +byte. It tells us what kind of node it is. To describe the content of +a short \HINT\ file, 32 different kinds\index{kind} of nodes are +defined. Hence the kind of a node can be stored in 5 bits and the +remaining bits of the start byte can be used to contain a 3 bit +``info''\index{info} value. + +We define an enumeration type to give symbolic names to the +kind-values. The exact numerical values are of no specific +importance; we will see in section~\secref{text}, however, that the +assignment chosen below, has certain advantages. -Because the usage of kind-values in content nodes is -slightly different from the usage in definition nodes, we define alternative names for some kind-values. -To display readable names instead of numerical values when debugging, -we define two arrays of strings as well. Keeping the definitions consistent -is achieved by creating all definitions from the same list -of identifiers using different definitions of the macro |DEF_KIND|. +Because the usage of kind-values in content nodes is slightly +different from the usage in definition nodes, we define alternative +names for some kind-values. To display readable names instead of +numerical values when debugging, we define two arrays of strings as +well. Keeping the definitions consistent is achieved by creating all +definitions from the same list of identifiers using different +definitions of the macro |DEF_KIND|. @<hint basic types@>= #define DEF_KIND(C,D,N) @[C##_kind=N@] @@ -556,13 +559,12 @@ printf("};\n\n"); \index{range kind+\\{range\_kind}} \index{adjust kind+\\{adjust\_kind}} \index{param kind+\\{param\_kind}} -\index{text kind+\\{text\_kind}} \index{list kind+\\{list\_kind}} \label{kinddef} @<kinds@>= -DEF_KIND(t@&ext,t@&ext,0),@/ -DEF_KIND(l@&ist,l@&ist,1),@/ -DEF_KIND(p@&aram,p@&aram,2),@/ +DEF_KIND(l@&ist,l@&ist,0),@/ +DEF_KIND(p@&aram,p@&aram,1),@/ +DEF_KIND(r@&ange,r@&ange,2),@/ DEF_KIND(x@&dimen,x@&dimen,3),@/ DEF_KIND(a@&djust,a@&djust,4),@/ DEF_KIND(g@&lyph, f@&ont,5),@/ @@ -587,8 +589,8 @@ DEF_KIND(h@&pack,h@&pack,23),@/ DEF_KIND(v@&pack,v@&pack,24),@/ DEF_KIND(s@&tream,s@&tream,25),@/ DEF_KIND(p@&age,p@&age,26),@/ -DEF_KIND(r@&ange,r@&ange,27),@/ -DEF_KIND(l@&ink,l@&abel,28),@/ +DEF_KIND(l@&ink,l@&abel,27),@/ +DEF_KIND(u@&ndefined1,u@&ndefined1,28),@/ DEF_KIND(u@&ndefined2,u@&ndefined2,29),@/ DEF_KIND(u@&ndefined3,u@&ndefined3,30),@/ DEF_KIND(p@&enalty, i@&nt,31) @@ -599,7 +601,7 @@ For a few kind-values we have alternative names; we will use them to express different intentions when using them. @<alternative kind names@>= -font_kind=glyph_kind,int_kind=penalty_kind, dimen_kind=kern_kind, label_kind=link_kind, outline_kind=link_kind@/@t{}@> +font_kind=glyph_kind,int_kind=penalty_kind, unknown_kind=penalty_kind, dimen_kind=kern_kind, label_kind=link_kind, outline_kind=link_kind@/@t{}@> @ The info\index{info value} values can be used to represent numbers in the range 0 to 7; for an example @@ -637,6 +639,10 @@ duplicated after the content as an end\index{end byte} byte. We store a kind and an info value in one byte and call this a tag. +@<hint basic types@>= +typedef uint8_t Tag; +@ + The following macros are used to assemble and disassemble tags:\index{TAG+\.{TAG}} @<hint macros@>= #define @[KIND(T)@] (((T)>>3)&0x1F) @@ -676,7 +682,7 @@ static uint8_t hput_n(uint32_t n) {@+HPUT32(n);@+ return 4;@+} } -uint8_t hput_glyph(Glyph *g) +Tag hput_glyph(Glyph *g) { Info info; info = hput_n(g->c); HPUT8(g->f);@/ @@ -687,7 +693,7 @@ The |hput_tags| function is called after the node content has been written to th stream. It gets a the position of the start byte and the tag. With this information it writes the start byte at the given position and the end byte at the current stream position. @<put functions@>= -void hput_tags(uint32_t pos, uint8_t tag) +void hput_tags(uint32_t pos, Tag tag) { DBGTAG(tag,hstart+pos);DBGTAG(tag,hpos); HPUTX(1); *(hstart+pos)=*(hpos++)=tag; @+ } @@ -716,7 +722,7 @@ The schema of {\it hget\_\kern 1pt\dots\/} functions reverse the schema of {\ Here is the code for the initial and final part of a get function: @<read the start byte |a|@>= -uint8_t a,z; /* the start and the end byte*/ +Tag a,z; /* the start and the end byte*/ uint32_t node_pos=hpos-hstart; if (hpos>=hend) QUIT("Attempt to read a start byte at the end of the section"); HGETTAG(a);@/@t{}@> @@ -756,22 +762,23 @@ reading routine (avoiding another switch statement). \codesection{\getsymbol}{Reading the Short Format}\getindex{1}{2}{Content Nodes} @<get functions@>= -void hget_content(uint8_t a); -uint8_t hget_content_node(void) +static void hget_content(Tag a); +Tag hget_content_node(void) { @<read the start byte |a|@>@;@+ hwrite_start(); - hwritef("%s",content_name[KIND(a)]); + if (content_known[KIND(a)]&(1<<INFO(a))) hwritef("%s",content_name[KIND(a)]); hget_content(a);@/ @<read and check the end byte |z|@>@; hwrite_end(); return a; } -void hget_content(uint8_t a) +static void hget_content(Tag a) {@+ switch (a)@/ {@+ @<cases to get content@>@;@t\1@>@/ default: - TAGERR(a); + if (!hget_unknown(a)) + TAGERR(a); break;@t\2@>@/ } } @@ -887,8 +894,8 @@ The two primitive operations to write the long format file are defined as macros: @<write macros@>= -#define @[hwritec(c)@] @[putc(c,hout)@] -#define @[hwritef(...)@] @[fprintf(hout,__VA_ARGS__)@] +#define @[hwritec(c)@] @[(hout?putc(c,hout):0)@] +#define @[hwritef(...)@] @[(hout?fprintf(hout,__VA_ARGS__):0)@] @ @@ -1035,7 +1042,8 @@ void hwrite_string(char *str) { hwritec('\''); while (*str!=0)@/ { @+if (*str=='\'') hwritec('\''); - hwritec(*str++); + hwritec(*str); + str++; } hwritec('\''); } @@ -1489,15 +1497,18 @@ The inverse function is |hwrite_float64|. It strives to print floating point num as readable as possible. So numbers without fractional part are written as integers. Numbers that can be represented exactly in decimal notation are represented in decimal notation. All other values are written as hexadecimal floating point numbers. -We avoid an exponent if it can be avoided by using up to |MAX_HEX_DIGITS| +We avoid an exponent if it can be avoided by using up to |MAX_HEX_DIGITS|. +For the use with extended dimensions, floating point numbers should be printed as a suffix: +without a leading space and with a mandatory sign. \writecode @<write functions@>= #define MAX_HEX_DIGITS 12 -void hwrite_float64(float64_t d) +void hwrite_float64(float64_t d, bool suffix) { uint64_t bits, mantissa; int exp, digits; - hwritec(' '); + if (!suffix) hwritec(' '); + else if (d>=0) hwritec('+'); if (floor(d)==d) { hwritef("%d",(int)d);@+ return;@+} if (floor(10000.0*d)==10000.0*d) @@ -1644,7 +1655,7 @@ typedef int32_t Scaled; \writecode @<write functions@>= void hwrite_scaled(Scaled x) -{ hwrite_float64(x/(float64_t)ONE); +{ hwrite_float64(x/(float64_t)ONE, false); } @ @@ -1712,7 +1723,7 @@ void hwrite_dimension(Dimen x) In the short format, dimensions are stored as 32 bit scaled point values without conversion. \getcode @<get functions@>= -void hget_dimen(uint8_t a) +void hget_dimen(Tag a) { if (INFO(a)==b000) {uint8_t r; r=HGET8; REF(dimen_kind,r); hwrite_ref(r);} else @@ -1723,7 +1734,7 @@ void hget_dimen(uint8_t a) \putcode @<put functions@>= -uint8_t hput_dimen(Dimen d) +Tag hput_dimen(Dimen d) { HPUT32(d); return TAG(dimen_kind, b001); } @@ -1786,8 +1797,8 @@ xdimen_node: start XDIMEN xdimen END { hput_tags($1,hput_xdimen(&($3))); }; @<write functions@>= void hwrite_xdimen(Xdimen *x) { hwrite_dimension(x->w); - if (x->h!=0.0) {hwrite_float64(x->h); @+hwritec('h');@+} - if (x->v!=0.0) {hwrite_float64(x->v); @+hwritec('v');@+} + if (x->h!=0.0) {hwrite_float64(x->h,true); @+hwritec('h');@+} + if (x->v!=0.0) {hwrite_float64(x->v,true); @+hwritec('v');@+} } void hwrite_xdimen_node(Xdimen *x) @@ -1804,7 +1815,7 @@ void hwrite_xdimen_node(Xdimen *x) @ @<get functions@>= -void hget_xdimen(uint8_t a, Xdimen *x) +void hget_xdimen(Tag a, Xdimen *x) { switch(a) { case TAG(xdimen_kind,b001): HGET_XDIMEN(b001,*x);@+break; @@ -1842,7 +1853,7 @@ void hget_xdimen_node(Xdimen *x) \putcode @<put functions@>= -uint8_t hput_xdimen(Xdimen *x) +Tag hput_xdimen(Xdimen *x) { Info info=b000; if (x->w==0 && x->h==0.0 && x->v==0.0){ HPUT32(0); @+info|=b100; @+} else @@ -1977,7 +1988,7 @@ void hwrite_order(Order o) } void hwrite_stretch(Stretch *s) -{ hwrite_float64(s->f); +{ hwrite_float64(s->f, false); hwrite_order(s->o); } @ @@ -1995,7 +2006,7 @@ The more general node is called an integer node; it shares the same kind-value |int_kind=penalty_kind| but allows the full range of values. The info value of a penalty node is 1 or 2 and indicates the number of bytes -used to store the integer. The info value 4 can be used for general +used to store the integer. The info value 3 can be used for general integers (see section~\secref{definitions}) that need four byte of storage. \readcode @@ -2022,28 +2033,30 @@ content_node: start PENALTY penalty END { hput_tags($1,hput_int($3));@+}; @<cases to get content@>= @t\1\kern1em@>case TAG(penalty_kind,1): @+{int32_t p;@+ HGET_PENALTY(1,p);@+} @+break; case TAG(penalty_kind,2): @+{int32_t p;@+ HGET_PENALTY(2,p);@+} @+break; +case TAG(penalty_kind,3): @+{int32_t p;@+ HGET_PENALTY(3,p);@+} @+break; @ @<get macros@>= #define @[HGET_PENALTY(I,P)@] \ if (I==1) {int8_t n=HGET8; @+P=n;@+ } \ -else {int16_t n;@+ HGET16(n);@+RNG("Penalty",n,-20000,+20000); @+ P=n; @+}\ +else if (I==2) {int16_t n;@+ HGET16(n);@+RNG("Penalty",n,-20000,+20000); @+ P=n; @+}\ +else if (I==3) {int32_t n;@+ HGET32(n);@+RNG("Penalty",n,-20000,+20000); @+ P=n; @+}\ hwrite_signed(P); @ \putcode @<put functions@>= -uint8_t hput_int(int32_t n) +Tag hput_int(int32_t n) { Info info; if (n>=0) @/ { @+if (n<0x80) { @+HPUT8(n); @+info=1;@+ } else if (n<0x8000) {@+ HPUT16(n);@+ info=2;@+ } - else {@+ HPUT32(n);@+ info=4;@+ } + else {@+ HPUT32(n);@+ info=3;@+ } } else@/ {@+ if (n>=-0x80) {@+ HPUT8(n);@+ info=1;@+ } else if (n>=-0x8000) {@+ HPUT16(n);@+ info=2;@+ } - else {@+ HPUT32(n);@+ info=4;@+ } + else {@+ HPUT32(n);@+ info=3;@+ } } return TAG(int_kind,info); } @@ -2108,7 +2121,7 @@ case TAG(language_kind,7): REF(language_kind,6); @+hwrite_ref(6); @+break; \putcode @<put functions@>= -uint8_t hput_language(uint8_t n) +Tag hput_language(uint8_t n) { if (n<7) return TAG(language_kind,n+1); HPUT8(n); return TAG(language_kind,0); } @@ -2244,7 +2257,7 @@ void hget_rule_node(void) \putcode @<put functions@>= -uint8_t hput_rule(Rule *r) +Tag hput_rule(Rule *r) { Info info=b000; if (r->h!=RUNNING_DIMEN) { HPUT32(r->h); @+info|=b100; @+} if (r->d!=RUNNING_DIMEN) { HPUT32(r->d); @+info|=b010; @+} @@ -2340,7 +2353,7 @@ hwrite_kern(&k); \putcode @<put functions@>= -uint8_t hput_kern(Kern *k) +Tag hput_kern(Kern *k) { Info info; if (k->x) info=b100; @+else info=b000; if (k->d.h==0.0 && k->d.v==0.0) @@ -2586,7 +2599,7 @@ void hget_glue_node(void) \putcode @<put functions@>= -uint8_t hput_glue(Glue *g) +Tag hput_glue(Glue *g) { Info info=b000; if (ZERO_GLUE(*g)) { HPUT8(zero_skip_no); @+ info=b000; } else if ( (g->w.w==0 && g->w.h==0.0 && g->w.v==0.0)) @@ -2613,7 +2626,8 @@ a list\index{list} node. It is important to note that list nodes never occur as individual nodes, they only occur as parts of other nodes. In total, we have three different types of lists: plain lists that use the kind-value |list_kind|, text\index{text} lists that use -the kind-value |text_kind|, and parameter\index{parameter} lists that use the +the kind-value |list_kind| together with the info bit |b100|, +and parameter\index{parameter} lists that use the kind-value |param_kind|. A description of the first two types of lists follows here. Parameter lists are described in section~\secref{paramlist}. @@ -2668,11 +2682,13 @@ in either direction until finding a matching tag will not answer the question. The situation is better if we specify a size: we can read the suspected size after or before the tag and check if we find a matching tag and size at the position indicated. -In the short format, we use the |info| value to indicate the number of -byte used to store the list size: A list with $0<|info|\le 5$ -uses $|info|-1$ byte to store the size. -The info value zero is reserved for references to predefined lists -(which are currently not implemented). + +In the short format, we use the two lower bits of the |info| value to indicate the number of +byte used to store the list size: A list with $\hbox{|info&0x3|}=1$ uses 1 byte, +with $\hbox{|info&0x3|}=2$ uses 2 byte, and with $\hbox{|info&0x3|}=3$ uses 4 byte. +The |info&0x3| value zero is reserved for references to predefined lists. +An empty list is always represented using zero as the reference number. +General predefined lists are currently implemented only for parameter lists. Storing the list size immediately preceding the end tag creates a new problem: If we try to recover from an error, we might not know the @@ -2683,15 +2699,14 @@ content backward, the problem is completely symmetric. To solve the problem, we insert an additional byte immediately before the final size and after the initial size marking the size boundary. -We choose the byte values |0xFF|, |0xFE|, |0xFD|, and |0xFC| which can +We choose the byte values |0xFF|, |0xFE|, and |0xFD| which can not be confused with valid tag bytes and indicate that the size is -stored using 1, 2, 3, or 4 byte respectively. Under regular +stored using 1, 2, or 4 byte respectively. Under regular circumstances, these bytes are simply skipped. When searching for the list end (or start) these bytes would correspond to -|TAG(penalty_kind,i)| with $7 \ge \hbox{|i|} \ge 4$ and can not be +|TAG(penalty_kind,i)| with $7 \ge \hbox{|i|} \ge 5$ and can not be confused with valid penalty nodes which use only the info values 0, 1, -and~2. An empty list uses the info value 1 and has neither a size bytes -nor boundary bytes; it consists only of the two tags. +and~2. An empty list always uses the info value 0 and the reference value 0. We are a bit lazy when it comes to the internal representation of a list. Since we need the representation as a short format byte sequence anyway, @@ -2701,7 +2716,7 @@ If the list is empty, |s| is zero. @<hint types@>= typedef struct {@+ -Kind k; @+ +Tag t;@+ uint32_t p;@+ uint32_t s;@+ } List; @@ -2775,11 +2790,8 @@ Hence as a default, we reserve two byte to store the size for texts. \subsection{Plain Lists}\label{plainlists} Plain list nodes start and end with a tag of kind |list_kind|. - -Not uncommon are empty\index{empty list} lists; these are the only lists that can be -stored using $|info|=1$; such a list has zero bytes of size -information, and no boundary bytes either; implicitly its size is zero. -The |info| value 0 is not used since we do not use predefined plain lists. +Not uncommon are empty\index{empty list} lists; these can be +stored using $|info|=0$ and a reference to the predefined empty list. Writing the long format uses the fact that the function |hget_content_node|, as implemented in the \.{stretch} program, will @@ -2803,7 +2815,7 @@ content_list: @+ position @+ estimate: {hpos+=2; } @+ | UNSIGNED {hpos+=hsize_bytes($1)+1; } ; list: start estimate content_list END @/ - {@+$$.k=list_kind;@+ $$.p=$3; @+ $$.s=(hpos-hstart)-$3; + {@+$$.t=TAG(list_kind,b010);@+ $$.p=$3; @+ $$.s=(hpos-hstart)-$3; hput_tags($1,hput_list($1+1, &($$)));@+}; @ @@ -2812,9 +2824,9 @@ list: start estimate content_list END @/ void hwrite_list(List *l) { uint32_t h=hpos-hstart, e=hend-hstart; /* save |hpos| and |hend| */ hpos=l->p+hstart;@+ hend=hpos+l->s; - if (l->k==list_kind ) @<write a list@>@; - else if (l->k==text_kind) @<write a text@>@; - else QUIT("List expected got %s", content_name[l->k]); + if (KIND(l->t)==list_kind) + { if (INFO(l->t)&b100) @<write a text@>@; else @<write a list@>@; } + else QUIT("List expected got %s", content_name[KIND(l->t)]); hpos=hstart+h;@+ hend=hstart+e; /* restore |hpos| and |hend| */ } @ @@ -2836,31 +2848,31 @@ void hwrite_list(List *l) @<shared get functions@>= void hget_size_boundary(Info info) { uint32_t n; - if (info<2) return; + info=info&0x3; + if (info==0) return; n=HGET8; - if (n-1!=0x100-info) QUIT(@["Size boundary byte 0x%x with info value %d at " SIZE_F@], - n, info,hpos-hstart-1); + if (n!=0x100-info) QUIT("Non matching boundary byte 0x%x with info value %d at 0x%x", + n, info,(uint32_t)(hpos-hstart-1)); } uint32_t hget_list_size(Info info) -{ uint32_t n=0; - if (info==1) return 0; - else if (info==2) n=HGET8; - else if (info==3) HGET16(n); - else if (info==4) HGET24(n); - else if (info==5) HGET32(n); - else QUIT("List info %d must be 1, 2, 3, 4, or 5",info); +{ uint32_t n=0; + info=info&0x3; + if (info==0) return 0; + else if (info==1) n=HGET8; + else if (info==2) HGET16(n); + else if (info==3) HGET32(n); + else QUIT("List info %d must be 0, 1, 2, or 3",info); return n; -} +} void hget_list(List *l) -{@+if (KIND(*hpos)!=list_kind && @/ - KIND(*hpos)!=text_kind &&@| KIND(*hpos)!=param_kind) @/ +{@+if (KIND(*hpos)!=list_kind && KIND(*hpos)!=param_kind) @/ QUIT("List expected at 0x%x", (uint32_t)(hpos-hstart)); else { @<read the start byte |a|@>@; - l->k=KIND(a); + l->t=a; HGET_LIST(INFO(a),*l); @<read and check the end byte |z|@>@; DBG(DBGNODE,"Get list at 0x%x size=%u\n", l->p, l->s); @@ -2868,14 +2880,18 @@ void hget_list(List *l) } @ +If a list has the info value zero, the list is the empty list. +Other list references are currently not implemented. + @<shared get macros@>= #define @[HGET_LIST(I,L)@] \ - (L).s=hget_list_size(I); hget_size_boundary(I);\ + if (((I)&0x3)==0) {uint8_t n=HGET8; @+REF_RNG(KIND((L).t),n);@+ (L).s=0;@+}\ + else { (L).s=hget_list_size(I); hget_size_boundary(I);\ (L).p=hpos-hstart; \ hpos=hpos+(L).s; hget_size_boundary(I);\ { uint32_t s=hget_list_size(I); \ 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);} + 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);}} @ \putcode @@ -2885,25 +2901,25 @@ uint8_t hsize_bytes(uint32_t n) { @+if (n==0) return 0; else if (n<0x100) return 1; else if (n<0x10000) return 2; - else if (n<0x1000000) return 3; else return 4; } void hput_list_size(uint32_t n, int i) -{ @+if (i==0) ; +{ @+if (i==0) return; else if (i==1) HPUT8(n); else if (i==2) HPUT16(n); - else if (i==3) HPUT24(n); else HPUT32(n); } -uint8_t hput_list(uint32_t start_pos, List *l) +Tag hput_list(uint32_t start_pos, List *l) { @+if (l->s==0) - { hpos=hstart+start_pos; return TAG(l->k,1);@+} + { hpos=hstart+start_pos; @+ HPUT8(0); @+return TAG(KIND(l->t),INFO(l->t)&b100);@+} else@/ { uint32_t list_end=hpos-hstart; int i=l->p -start_pos-1; /* number of byte allocated for size */ int j=hsize_bytes(l->s); /* number of byte needed for size */ + Info k; + if (j==4) k=3; else k=j; DBG(DBGNODE,"Put list at 0x%x size=%u\n", l->p, l->s); if (i>j && l->s> 0x100) j=i; /* avoid moving large lists */ if (i!=j)@/ @@ -2915,9 +2931,9 @@ uint8_t hput_list(uint32_t start_pos, List *l) l->p=l->p+d;@+ list_end=list_end+d; } - hpos=hstart+start_pos; @+ hput_list_size(l->s,j);@+ HPUT8(0x100-j); - hpos=hstart+list_end;@+ HPUT8(0x100-j);@+ hput_list_size(l->s,j); - return TAG(l->k,j+1); + hpos=hstart+start_pos; @+ hput_list_size(l->s,j);@+ HPUT8(0x100-k); + hpos=hstart+list_end;@+ HPUT8(0x100-k);@+ hput_list_size(l->s,j); + return TAG(KIND(l->t),k|(INFO(l->t)&b100)); } } @@ -2958,11 +2974,13 @@ Inside a text, character nodes start with a byte in the range |0x21|--|0xF7|. This is a wide range and it overlaps considerably with the range of valid tag bytes. It is however possible to choose the kind-values in such a way that the control codes do not overlap with -the valid tag bytes that start a node. For this reason, the values -|text_kind==0|, |list_kind==1|, |param_kind==2|, |xdimen_kind==3|, and -|adjust_kind==4| were chosen on page~\pageref{kinddef}. Texts, lists, -parameter lists, and extended dimensions occur only {\it inside} of -content nodes, but are not content nodes in their own right; so the +the valid tag bytes that start a node. +For this reason, the values +|list_kind==0|, |param_kind==1|, |range_kind==2|, |xdimen_kind==3|, and +|adjust_kind==4| were chosen on page~\pageref{kinddef}. Lists, +parameter lists, and extended dimensions occur only {\it inside} of +content nodes, but are not content nodes in their own right; +page ranges occur only in the definition section; so the values |0x00| to |0x1F| are not used as tag bytes of content nodes. The value |0x20| would, as a tag byte, indicate an adjust node (|adjust_kind==4|) with info value zero. Because there are no @@ -2973,9 +2991,9 @@ nodes because there are no predefined paragraphs.) The largest byte that starts an UTF8 code is |0xF7|; hence, there are eight possible control codes, from |0xF8| to |0xFF|, available. The first three values |0xF8|, |0xF9|, and |0xFA| are actually used for -penalty nodes with info values, 0, 1, and 2. The last four |0xFC|, +penalty nodes with info values, 0, 1, and 2. The last three |0xFD|, |0xFE|, and |0xFF| are used as boundary marks for the text -size and therefore we use only |0xFB| as control code. +size and therefore we can use only |0xFB| and \label{FC}|0xFC| as control codes. In the long format, we do not provide a syntax for specifying a size estimate\index{estimate} as we did for plain lists, because we expect @@ -2992,8 +3010,7 @@ Here are the details: \item In the long format, a text starts and ends with a double\index{double quote} quote character ``{\tt "}''. In the short -format, texts are encoded similar to lists using the kind-value -|text_kind|. +format, texts are encoded similar to lists setting the info bit |b100|. \item Arbitrary nodes can be embedded inside a text. In the long format, they are enclosed in pointed brackets \.{<} \dots \.{>} as @@ -3066,7 +3083,7 @@ sequence is written ``\.{\\F}$n$\.{\\}'' where $n$ is the decimal representation of the font number. -\item The control codes |0x09|, |0x0A|, |0x0B|, |0x0C|, |0x0E|, +\item The control codes |0x09|, |0x0A|, |0x0B|, |0x0C|, |0x0D|, |0x0E|, |0x0F|, and |0x10| are also followed by a second parameter byte. They are used to reference the global definitions of penalty\index{penalty}, kern\index{kern}, ligature\index{ligature}, @@ -3118,6 +3135,8 @@ character} ``\.{\ }'' as well. can be used in a link to specify a position between two characters. In the long format it is written as ``\.{\\@@}''. +\item The control code |0xFC| is currently unused. + \enditemize For the control codes, we define an enumeration type and for references, a reference type. @@ -3212,7 +3231,7 @@ static int scan_level=0; list: TXT_START position @| {hpos+=4; /* start byte, two size byte, and boundary byte */ } text TXT_END@| - { $$.k=text_kind;$$.p=$4; $$.s=(hpos-hstart)-$4; + { $$.t=TAG(list_kind,b110);$$.p=$4; $$.s=(hpos-hstart)-$4; hput_tags($2,hput_list($2+1, &($$)));@+}; text: position @+| text txt; @@ -3388,10 +3407,6 @@ void hput_txt_local(uint8_t n) @ -@<hint types@>= -typedef struct { @+Kind k; @+int n; @+} Ref; -@ - \section{Composite Nodes}\hascode \label{composite} @@ -3508,7 +3523,7 @@ void hwrite_box(Box *b) if (b->a!=0) { hwritef(" shifted"); @+hwrite_dimension(b->a); @+} if (b->r!=0.0 && b->s!=0 )@/ { @+if (b->s>0) @+hwritef(" plus"); @+else @+hwritef(" minus"); - @+hwrite_float64(b->r); @+hwrite_order(b->o); + @+hwrite_float64(b->r, false); @+hwrite_order(b->o); } hwrite_list(&(b->l)); } @@ -3635,11 +3650,24 @@ indicates a nonzero shift amount. For a box of type |hset_kind| or |vset_kind|, the info bit |b001| indicates, if set, a nonzero depth. For a box of type |hpack_kind| or |vpack_kind|, the info bit |b001| indicates, if set, an additional target size, and if unset, an exact -target size. For a box of type |vpack_kind| also the maximum depth is -given. +target size. For a box of type |vpack_kind| also the maximum depth +is given. If in the long format the maximum depth is omitted, the +value |MAX_DIMEN| is used. + +The reference point of a vertical box is usually the reference point of +the last box inside it and multiple vertical boxes are aligned +along this common baseline. Occasionaly, however, we want to align +vertical boxes using the baselines of their first box. +We indicate this alternative setting of the reference point +using the keyword {\tt top} in the long form. +In the short form, we use the fact the the absolut value of any dimension +is less or equal to |MAX_DIMEN| which is equal to |0x3fffffff|. This means +that the two most significant bits are always the same. So a vtop node +can be marked by toggling the second of these bits. \readcode -@s xbox symbol +@s box_options symbol +@s vbox_dimen symbol @s hpack symbol @s vpack symbol @s box_goal symbol @@ -3653,6 +3681,7 @@ given. @s vxbox_node symbol @s hxbox_node symbol @s DEPTH symbol +@s max_depth symbol @<symbols@>= %token HPACK "hpack" @@ -3662,7 +3691,8 @@ given. %token DEPTH "depth" %token ADD "add" %token TO "to" -%type <info> xbox box_goal hpack vpack +%type <info> box_options box_goal hpack vpack vbox_dimen +%type <d> max_depth @ @<scanning rules@>= @@ -3677,8 +3707,17 @@ given. @<parsing rules@>= box_flex: plus minus { hput_stretch(&($1));hput_stretch(&($2)); }; -xbox: box_dimen box_shift box_flex xdimen_ref list {$$=$1|$2;} - | box_dimen box_shift box_flex xdimen_node list {$$=$1|$2|b100;}; + +box_options: box_shift box_flex xdimen_ref list {$$=$1;} + | box_shift box_flex xdimen_node list {$$=$1|b100;}; + +hxbox_node: start HSET box_dimen box_options END { hput_tags($1, TAG(hset_kind,$3|$4)); }; + +vbox_dimen: box_dimen + | TOP dimension dimension dimension @/ + {$$= hput_box_dimen($2,$3^0x40000000,$4); }; + +vxbox_node: start VSET vbox_dimen box_options END { hput_tags($1, TAG(vset_kind,$3|$4)); }; box_goal: TO xdimen_ref {$$=b000;} | ADD xdimen_ref {$$=b001;} @@ -3686,14 +3725,15 @@ box_goal: TO xdimen_ref {$$=b000;} | ADD xdimen_node {$$=b101;}; hpack: box_shift box_goal list {$$=$2;}; -vpack: box_shift MAX DEPTH dimension {HPUT32($4);} @/ box_goal list {$$= $1|$6;}; -vxbox_node: start VSET xbox END { hput_tags($1, TAG(vset_kind,$3)); } - | start VPACK vpack END { hput_tags($1, TAG(vpack_kind,$3)); }; +hxbox_node: start HPACK hpack END { hput_tags($1, TAG(hpack_kind,$3)); }; + +max_depth: {$$=MAX_DIMEN;} | MAX DEPTH dimension { $$=$3; }; +vpack: max_depth {HPUT32($1);} box_shift box_goal list {$$= $3|$4;} + | TOP max_depth {HPUT32($2^0x40000000);} @/ box_shift box_goal list {$$= $4|$5;}; -hxbox_node: start HSET xbox END { hput_tags($1, TAG(hset_kind,$3)); } - | start HPACK hpack END { hput_tags($1, TAG(hpack_kind,$3)); }; +vxbox_node: start VPACK vpack END { hput_tags($1, TAG(vpack_kind,$3)); }; content_node: vxbox_node | hxbox_node; @ @@ -3701,23 +3741,23 @@ content_node: vxbox_node | hxbox_node; \getcode @<cases to get content@>= @t\1\kern1em@> -case TAG(hset_kind,b000): HGET_SET(b000); @+ break; -case TAG(hset_kind,b001): HGET_SET(b001); @+ break; -case TAG(hset_kind,b010): HGET_SET(b010); @+ break; -case TAG(hset_kind,b011): HGET_SET(b011); @+ break; -case TAG(hset_kind,b100): HGET_SET(b100); @+ break; -case TAG(hset_kind,b101): HGET_SET(b101); @+ break; -case TAG(hset_kind,b110): HGET_SET(b110); @+ break; -case TAG(hset_kind,b111): HGET_SET(b111); @+ break;@# - -case TAG(vset_kind,b000): HGET_SET(b000); @+ break; -case TAG(vset_kind,b001): HGET_SET(b001); @+ break; -case TAG(vset_kind,b010): HGET_SET(b010); @+ break; -case TAG(vset_kind,b011): HGET_SET(b011); @+ break; -case TAG(vset_kind,b100): HGET_SET(b100); @+ break; -case TAG(vset_kind,b101): HGET_SET(b101); @+ break; -case TAG(vset_kind,b110): HGET_SET(b110); @+ break; -case TAG(vset_kind,b111): HGET_SET(b111); @+ break;@# +case TAG(hset_kind,b000): HGET_SET(hset_kind,b000); @+ break; +case TAG(hset_kind,b001): HGET_SET(hset_kind,b001); @+ break; +case TAG(hset_kind,b010): HGET_SET(hset_kind,b010); @+ break; +case TAG(hset_kind,b011): HGET_SET(hset_kind,b011); @+ break; +case TAG(hset_kind,b100): HGET_SET(hset_kind,b100); @+ break; +case TAG(hset_kind,b101): HGET_SET(hset_kind,b101); @+ break; +case TAG(hset_kind,b110): HGET_SET(hset_kind,b110); @+ break; +case TAG(hset_kind,b111): HGET_SET(hset_kind,b111); @+ break;@# + +case TAG(vset_kind,b000): HGET_SET(vset_kind,b000); @+ break; +case TAG(vset_kind,b001): HGET_SET(vset_kind,b001); @+ break; +case TAG(vset_kind,b010): HGET_SET(vset_kind,b010); @+ break; +case TAG(vset_kind,b011): HGET_SET(vset_kind,b011); @+ break; +case TAG(vset_kind,b100): HGET_SET(vset_kind,b100); @+ break; +case TAG(vset_kind,b101): HGET_SET(vset_kind,b101); @+ break; +case TAG(vset_kind,b110): HGET_SET(vset_kind,b110); @+ break; +case TAG(vset_kind,b111): HGET_SET(vset_kind,b111); @+ break;@# case TAG(hpack_kind,b000): HGET_PACK(hpack_kind,b000); @+ break; case TAG(hpack_kind,b001): HGET_PACK(hpack_kind,b001); @+ break; @@ -3740,11 +3780,13 @@ case TAG(vpack_kind,b111): HGET_PACK(vpack_kind,b111); @+ break; @<get macros@>= -#define @[HGET_SET(I)@] @/\ - { Dimen h; @+HGET32(h); @+hwrite_dimension(h);@+}\ - { Dimen d; @+if ((I)&b001) HGET32(d); @+ else d=0;@+hwrite_dimension(d); @+}\ +#define @[HGET_SET(K,I)@] @/\ + { Dimen h,d; @+HGET32(h);\ + if ((I)&b001) HGET32(d); @+ else d=0;\ + if (K==vset_kind && (d>MAX_DIMEN || d<-MAX_DIMEN)) { hwritef(" top"); d^=0x40000000;}\ + hwrite_dimension(h); hwrite_dimension(d); @+}\ { Dimen w; @+HGET32(w); @+hwrite_dimension(w);@+} \ -if ((I)&b010) { Dimen a; @+HGET32(a); hwritef(" shifted"); @+hwrite_dimension(a);@+}\ + if ((I)&b010) { Dimen a; @+HGET32(a); hwritef(" shifted"); @+hwrite_dimension(a);@+}\ { Stretch p; @+HGET_STRETCH(p);@+hwrite_plus(&p);@+}\ { Stretch m; @+HGET_STRETCH(m);@+hwrite_minus(&m);@+}\ if ((I)&b100) {Xdimen x;@+ hget_xdimen_node(&x); @+hwrite_xdimen_node(&x);@+} else HGET_REF(xdimen_kind);\ @@ -3752,8 +3794,10 @@ if ((I)&b010) { Dimen a; @+HGET32(a); hwritef(" shifted"); @+hwrite_dimension(a @# #define @[HGET_PACK(K,I)@] @/\ - if ((I)&b010) { Dimen d; @+HGET32(d); hwritef(" shifted"); @+hwrite_dimension(d); @+ }\ - if (K==vpack_kind) { Dimen d; @+HGET32(d); hwritef(" max depth");@+hwrite_dimension(d); @+ }\ + if (K==vpack_kind) {@+Dimen d; HGET32(d); \ + if (d>MAX_DIMEN || d<-MAX_DIMEN) { hwritef(" top"); d^=0x40000000;}\ + if (d!=MAX_DIMEN) {hwritef(" max depth");@+hwrite_dimension(d);}} \ + if ((I)&b010)@+{@+Dimen s; HGET32(s); hwritef(" shifted"); @+hwrite_dimension(s); }\ if ((I)&b001) hwritef(" add");@+ else hwritef(" to");\ if ((I)&b100) {Xdimen x;@+ hget_xdimen_node(&x);@+hwrite_xdimen_node(&x);@+}\ else @+HGET_REF(xdimen_kind);\ @@ -3946,7 +3990,7 @@ case TAG(baseline_kind,b111): { Baseline b;@+ HGET_BASELINE(b111,b);@+ }@+break; \putcode @<put functions@>= -uint8_t hput_baseline(Baseline *b) +Tag hput_baseline(Baseline *b) { Info info=b000; if (!ZERO_GLUE(b->bs)) @+info|=b100; if (!ZERO_GLUE(b->ls)) @+ info|=b010; @@ -4048,7 +4092,7 @@ hwrite_ligature(&(L)); \putcode @<put functions@>= -uint8_t hput_ligature(Lig *l) +Tag hput_ligature(Lig *l) { @+if (l->l.s < 7) return TAG(ligature_kind,l->l.s); else@/ { uint32_t pos=l->l.p; @@ -4123,8 +4167,8 @@ replace_count: explicit {@+ if ($1) {$$=0x80; HPUT8(0x80);@+}@+ else $$=0x00;@+} | explicit UNSIGNED { RNG("Replace count",$2,0,31); $$=($2)|(($1)?0x80:0x00); @+ if ($$!=0) HPUT8($$);@+}; disc: replace_count list list { $$.r=$1;$$.p=$2; $$.q=$3; - if ($3.s==0) { hpos=hpos-2;@+ if ($2.s==0) hpos=hpos-2; @+}@+} - | replace_count list { $$.r=$1;$$.p=$2; if ($2.s==0) hpos=hpos-2;@+ $$.q.s=0; } + if ($3.s==0) { hpos=hpos-3;@+ if ($2.s==0) hpos=hpos-3; @+}@+} + | replace_count list { $$.r=$1;$$.p=$2; if ($2.s==0) hpos=hpos-3;@+ $$.q.s=0; } | replace_count { $$.r=$1;$$.p.s=0; $$.q.s=0; }; @@ -4162,8 +4206,8 @@ case TAG(disc_kind,b111): {Disc h; @+HGET_DISC(b111,h);@+ hwrite_disc(&h); @+} @ #define @[HGET_DISC(I,Y)@]\ if ((I)&b100) {uint8_t r=HGET8; (Y).r=r&0x7F; @+ RNG("Replace count",(Y).r,0,31); @+(Y).x=(r&0x80)!=0; @+}\ @+else { (Y).r=0; @+ (Y).x=false;@+}\ -if ((I)&b010) hget_list(&((Y).p)); else { (Y).p.p=hpos-hstart; @+(Y).p.s=0; @+(Y).p.k=list_kind; @+}\ -if ((I)&b001) hget_list(&((Y).q)); else { (Y).q.p=hpos-hstart; @+(Y).q.s=0; @+(Y).q.k=list_kind; @+} +if ((I)&b010) hget_list(&((Y).p)); else { (Y).p.p=hpos-hstart; @+(Y).p.s=0; @+(Y).p.t=TAG(list_kind,b000); @+}\ +if ((I)&b001) hget_list(&((Y).q)); else { (Y).q.p=hpos-hstart; @+(Y).q.s=0; @+(Y).q.t=TAG(list_kind,b000); @+} @ @<get functions@>= @@ -4182,7 +4226,7 @@ Because the info value |b000| is reserved for references, a zero reference count is written to avoid this case. \putcode @<put functions@>= -uint8_t hput_disc(Disc *h) +Tag hput_disc(Disc *h) { Info info=b000; if (h->r!=0) info|=b100; if (h->q.s!=0) info|=b011; @@ -4278,18 +4322,14 @@ layout of the short format nodes where all sub nodes are located at the end of a node. In this case, I want to put a |param_ref| before an |xdimen| node, but otherwise have the |xdimen_ref| before a |param_list|. The |par_dimen| rule is introduced only to avoid a -reduce/reduce conflict in the parser. The parsing of -|empty_param_list| and |non_empty_param_list| is explained in -section~\secref{paramlist}. +reduce/reduce conflict in the parser. @<parsing rules@>= par_dimen: xdimen { hput_xdimen_node(&($1)); }; par: xdimen_ref param_ref list {$$=b000;} - | xdimen_ref empty_param_list non_empty_param_list list { $$=b010;} - | xdimen_ref empty_param_list list { $$=b010;} + | xdimen_ref param_list list { $$=b010;} | xdimen param_ref { hput_xdimen_node(&($1)); } list { $$=b100;} - | par_dimen empty_param_list non_empty_param_list list { $$=b110;} - | par_dimen empty_param_list list { $$=b110;}; + | par_dimen param_list list { $$=b110;}; content_node: start PAR par END { hput_tags($1,TAG(par_kind,$3));}; @ @@ -4360,12 +4400,9 @@ placement of the equation number. math: param_ref list {$$=b000;} | param_ref list hbox_node {$$=b001;} | param_ref hbox_node list {$$=b010;} - | empty_param_list list {$$=b100;} - | empty_param_list list hbox_node {$$=b101;} - | empty_param_list hbox_node list {$$=b110;} - | empty_param_list non_empty_param_list list {$$=b100;} - | empty_param_list non_empty_param_list list hbox_node {$$=b101;} - | empty_param_list non_empty_param_list hbox_node list {$$=b110;}; + | param_list list {$$=b100;} + | param_list list hbox_node {$$=b101;} + | param_list hbox_node list {$$=b110;}; content_node: start MATH math END @/{ hput_tags($1,TAG(math_kind,$3));}; @ @@ -4601,7 +4638,7 @@ Info hput_span_count(uint32_t n) { HPUT8(n); return 7; } } @ -\section{Extensions to \TeX}\hascode +\section{Extensions}\hascode \subsection{Images} In the first implementation attempt, images behaved pretty much @@ -4714,7 +4751,7 @@ content_node: start IMAGE image END { hput_tags($1,TAG(image_kind,$3));}; @<write functions@>= void hwrite_image(Image *x) { RNG("Section number",x->n,3,max_section_no); hwritef(" %u",x->n); - if (x->a!=0.0) hwrite_float64(x->a); + if (x->a!=0.0) hwrite_float64(x->a, false); if (x->wr!=0) hwritef(" width *%u",x->wr); else if (x->w.w!=0 ||x->w.h!=0.0 || x->w.v!=0.0) { hwritef(" width"); hwrite_xdimen(&x->w); } @@ -5552,7 +5589,7 @@ The function |hput_label| is simply the reverse of the above code. \putcode @<put functions@>= -uint8_t hput_label(int n, Label *l) +Tag hput_label(int n, Label *l) { Info i=b000; HPUTX(13); if (n>0xFF) {i|=b001; HPUT16(n);@+}@+ else HPUT8(n); @@ -5577,7 +5614,7 @@ to the definition section. The outlines are stored after the labels because they reference the labels. @<put functions@>= extern void hput_definitions_end(void); -extern uint8_t hput_outline(Outline *t); +extern Tag hput_outline(Outline *t); void hput_label_defs(void) { int n; section_no=1; @@ -5638,7 +5675,7 @@ the appropriate tag. \putcode @<put functions@>= -uint8_t hput_link(int n, int on) +Tag hput_link(int n, int on) { Info i; REF_RNG(label_kind,n); labels[n].used=true; @@ -5831,7 +5868,7 @@ outline definitions. \putcode @<put functions@>= -uint8_t hput_outline(Outline *t) +Tag hput_outline(Outline *t) { Info i=b100; HPUTX(t->s+4); if (t->r>0xFF) {i|=b001; @+HPUT16(t->r);@+} @+else HPUT8(t->r); @@ -5880,6 +5917,169 @@ of overcome the problem. Background colors could be associated with boxes as an optional parameter. +\subsection{Unknown Extensions} +Starting with the inclusion in the \TeX\ Live 2022 distribution, the \HINT\ file format +became accessible to a wider audience which brought the constant rewrite and upgrade cycle +to a sudden halt. Except for bug fixes, pretty much nothing happened for a about a year. +When the \TeX\ Live 2023 distribution started to appear on the horizon, one extension +that I had on my wish-list already for a long time---the support of \TeX's +\\{vtop} boxes---was definitely due for implementation. +Adding new tag bytes to the specification of the short file format will, however, +invalidate all \HINT\ file viewers and requires everybody to upgrade the viewing +application. Because the \HINT\ file format is still in its infancy, more +such additions are to be expected and the new version 2.0 file format needs a way to handle +such yet unknown extensions gracefuly. For this purpose the definition section +now may specify additional entries for the |hnode_size| array. +All \HINT\ file viewers starting with version 2.0 will use these entries to skip +unknown nodes and display the remaining content of \HINT\ files. + +\readcode +In the long format, unknown nodes, whether in the definition or the content section, +start with the keyword \\{unknown}. + +@s UNKNOWN symbol + +@<symbols@>= +%token UNKNOWN "unknown" +@ + +@<scanning rules@>= +::@=unknown@> :< return UNKNOWN; >: +@ + +In the definition section, the keyword is followed by the tag and the length of the initial +part of the node (not counting the start byte), after which follows optionaly the number of trailing nodes embedded +in the unknown node. There is no need for a maximum value, because the information +is stored directly in the |hnode_size| array. + +@<parsing rules@>= +def_node: start UNKNOWN UNSIGNED UNSIGNED END { hput_tags($1,hput_unknown_def($3,$4,0));@+} + | start UNKNOWN UNSIGNED UNSIGNED UNSIGNED END { hput_tags($1,hput_unknown_def($3,$4,$5));@+}; +@ + +In the content section, the keyword is followed by the tag value, the remaining byte values +belonging to the initial part and the nodes belonging to the trailing part. +The end byte, which is equal to the start byte, is omited from the long format. + +@<symbols@>= +%type <u> unknown_bytes +%type <u> unknown_nodes +@ +@<parsing rules@>= +content_node: start UNKNOWN UNSIGNED unknown_bytes unknown_nodes END { hput_tags($1,hput_unknown($1,$3,$4,$5));@+} +unknown_bytes: {$$=0;} | unknown_bytes UNSIGNED { RNG("byte",$2,0,0xFF); HPUT8($2); $$=$1+1; }; +unknown_node: content_node | xdimen_node | list | named_param_list; +unknown_nodes: {$$=0;} | unknown_nodes unknown_node { RNG("unknown subnodes",$1,0,3); $$=$1+1; }; +@ + +\putcode +In the short format, definitions for unknown nodes are marked with |TAG(unknown_kind,b100)|. +This tag is not used elsewhere (see also page \pageref{FC}). +We do not check for multiple definitions of the same +tag. But only the first of them is considered valid. +After the start byte follows the unknown tag and the corresponding entry in the |hnode_size| array. + +@<put functions@>= +uint32_t hput_unknown_def(uint32_t t, uint32_t b, uint32_t n) +{ if (n==0) + { RNG("unknown tag",t,TAG(param_kind,7)+1,TAG(int_kind,0)-1); + RNG("unknown initial bytes",b,0,0x7F-2); + HPUT8(t); + HPUT8(b+2); /* adding start and end byte */ + if (hnode_size[t]==0) + { hnode_size[t]=NODE_SIZE(b,0); + DBG(DBGTAGS,"Defining unknown node size %d,%d for tag 0x%x\n",b,n,t); + } + } + else + { int i; + RNG("unknown tag",t,TAG(param_kind,7)+1,TAG(int_kind,0)-1); + RNG("unknown initial bytes",b,0,0x1F-1); + RNG("unknown trailing nodes",n,1,4); + HPUT8(t); + i=NODE_SIZE(b,n); + HPUT8(i); + if (hnode_size[t]==0) + { hnode_size[t]=i; + DBG(DBGTAGS,"Defining unknown node size %d,%d for tag 0x%x\n",b,n,t); + } + } + return TAG(unknown_kind,b100); +} +@ + +In the content section, the unknown nodes are of course marked with their unknown tag. +@<put functions@>= +Tag hput_unknown(uint32_t pos,uint32_t t, uint32_t b, uint32_t n) +{ int s; + RNG("unknown tag",t,TAG(param_kind,7)+1,TAG(int_kind,0)-1); + if (n==0) + { RNG("unknown initial bytes",b,0,0x7F-2); + s=NODE_SIZE(b,0); + } + else + { RNG("unknown initial bytes",b,0,0x1F-2); + RNG("unknown trailing nodes",n,1,4); + s=NODE_SIZE(b,n); + } + DBG(DBGTAGS,"Adding unknown node size %d,%d tag 0x%x at 0x%x\n",b,n,t,pos); + if (hnode_size[t]!=s) + QUIT(@["Size %d of unknown node [%s,%d] at " SIZE_F " does not match %d\n"@],s,NAME(t),INFO(t),hpos-hstart,hnode_size[t]); + return (Tag)t; +} +@ + +\goodbreak +\vbox{\getcode\vskip -\baselineskip\writecode} + +@<get functions@>= +void hget_unknown_def(void) +{ Tag t; signed char i, b=0, n=0; + t=HGET8; + i=HGET8; + if (i==0) + QUIT("Zero not allowed for unknown node size at 0x%x\n",(uint32_t)(hpos-hstart-2)); + hwrite_start(); @+hwritef("unknown"); + b=NODE_HEAD(i); n=NODE_TAIL(i); + if (n==0) + hwritef(" 0x%02X %d",t,b); + else + hwritef(" 0x%02X %d %d",t,b, n); + if (hnode_size[t]==0) + { hnode_size[t]=i; + DBG(DBGTAGS,"Defining node size %d,%d for tag 0x%x\n",b,n,t); + } + hwrite_end(); +} +@ + +The |hget_unknown| funktion tries to process a unknown node with the help of +an entry in the |hnode_size| array. The definition section can be used to provide +this extra information. If successful the function returns 1 else 0. + +@<get functions@>= +int hget_unknown(Tag a) +{ int b, n; + int8_t s; + s = hnode_size[a]; + DBG(DBGTAGS,"Trying unknown tag 0x%x at 0x%x\n",a,(uint32_t)(hpos-hstart-1)); + if (s==0) return 0; + b=NODE_HEAD(s); n=NODE_TAIL(s); + DBG(DBGTAGS,"Trying unknown node size %d %d\n",b,n); + hwritef("unknown 0x%02X", a); + while (b>0) { a=HGET8; hwritef(" 0x%02X",a); b--;} + while (n>0) { + a=*hpos; + if (KIND(a)==xdimen_kind) { Xdimen x; hget_xdimen_node(&x); @+hwrite_xdimen_node(&x); } + else if (KIND(a)==param_kind) { List l; @+hget_param_list(&l);@+ hwrite_named_param_list(&l); @+} + else if (KIND(a)<=list_kind) { List l; @+hget_list(&l);@+ hwrite_list(&l); @+} + else hget_content_node(); + n--; } + return 1; +} +@ + + \section{Replacing \TeX's Page Building Process} @@ -6310,8 +6510,7 @@ These types are currently not yet implemented. @ @<parsing rules@>= -stream: empty_param_list list {$$=b010;} - | empty_param_list non_empty_param_list list {$$=b010;} +stream: param_list list {$$=b010;} | param_ref list {$$=b000;}; content_node: start STREAM stream_ref stream END @/{@+hput_tags($1,TAG(stream_kind,$4)); @+}; @@ -6451,7 +6650,8 @@ the start position $p$ of the page is within that range: $a\le p < b$. If paging backward this definition might cause problems because the start position of the page is known only after the page has been build. In this case, the viewer might choose a page template based on -the position at the bottom of the page. If it turns out that this ``bottom template'' +the position at the bottom of the page. +If it turns out that this ``bottom template'' is no longer valid when the page builder has found the start of the page, the viewer might display the page anyway with the bottom template, it might just display the page with the new ``top @@ -6698,7 +6898,7 @@ int hbanner_size=0; bool hcheck_banner(char *magic) { - int v; + int v,s; char *t; t=hbanner; if (strncmp(magic,hbanner,4)!=0) @@ -6710,14 +6910,19 @@ bool hcheck_banner(char *magic) { MESSAGE("Space expected in banner after %s\n",magic); return false; } else t++; v=strtol(t,&t,10); - if (v!=HINT_VERSION) - { MESSAGE("Wrong HINT version: got %d, expected %d\n",v,HINT_VERSION); return false; } if (*t!='.') { MESSAGE("Dot expected in banner after HINT version number\n"); return false; } else t++; - v=strtol(t,&t,10); - if (v!=HINT_SUB_VERSION) - { MESSAGE("Wrong HINT subversion: got %d, expected %d\n",v,HINT_SUB_VERSION); return false; } + s=strtol(t,&t,10); + if (v!=HINT_VERSION) + { MESSAGE("Wrong HINT version: got %d.%d, expected %d.%d\n", + v,s,HINT_VERSION,HINT_SUB_VERSION); return false; } + if (s<HINT_SUB_VERSION) + { MESSAGE("Wrong HINT subversion: got %d.%d, expected %d.%d\n", + v,s,HINT_VERSION,HINT_SUB_VERSION); return false; } + else if (s>HINT_SUB_VERSION) + { MESSAGE("New HINT subversion: got %d.%d, expected %d.%d, update your application\n", + v,s,HINT_VERSION,HINT_SUB_VERSION); } if (*t!=' ' && *t!='\n') { MESSAGE("Space expected in banner after HINT subversion\n"); return false; } LOG("%s file version " HINT_VERSION_STRING ":%s", magic, t); @@ -7565,24 +7770,24 @@ Armed with these preparations, we can put the directory into the \HINT\ file. \putcode @<put functions@>= static void hput_entry(Entry *e) -{ uint8_t b; - if (e->size<0x100 && e->xsize<0x100) b=0; - else if (e->size<0x10000 &&e->xsize<0x10000) b=1; - else if (e->size<0x1000000 &&e->xsize<0x1000000) b=2; - else b=3; +{ Info b; + if (e->size<0x100 && e->xsize<0x100) b=b000; + else if (e->size<0x10000 &&e->xsize<0x10000) b=b001; + else if (e->size<0x1000000 &&e->xsize<0x1000000) b=b010; + else b=b011; if (e->xsize!=0) b =b|b100; DBG(DBGTAGS,"Directory entry no=%d size=0x%x xsize=0x%x\n",e->section_no, e->size, e->xsize); HPUTTAG(0,b);@/ HPUT16(e->section_no); switch (b) { - case 0: HPUT8(e->size);@+break; - case 1: HPUT16(e->size);@+break; - case 2: HPUT24(e->size);@+break; - case 3: HPUT32(e->size);@+break; - case b100|0: HPUT8(e->size);@+HPUT8(e->xsize);@+break; - case b100|1: HPUT16(e->size);@+HPUT16(e->xsize);@+break; - case b100|2: HPUT24(e->size);@+HPUT24(e->xsize);@+break; - case b100|3: HPUT32(e->size);@+HPUT32(e->xsize);@+break; + case b000: HPUT8(e->size);@+break; + case b001: HPUT16(e->size);@+break; + case b010: HPUT24(e->size);@+break; + case b011: HPUT32(e->size);@+break; + case b100: HPUT8(e->size);@+HPUT8(e->xsize);@+break; + case b101: HPUT16(e->size);@+HPUT16(e->xsize);@+break; + case b110: HPUT24(e->size);@+HPUT24(e->xsize);@+break; + case b111: HPUT32(e->size);@+HPUT32(e->xsize);@+break; default: QUIT("Can't happen");@+ break; } hput_string(e->file_name);@/ @@ -7974,6 +8179,7 @@ void hget_max_definitions(void) @<read and check the end byte |z|@>@; } if (INFO(a)!=0) QUIT("End of maximum list with info %d", INFO(a)); + DBG(DBGDEF,"Getting Max Definitions END\n"); } @ @@ -8087,6 +8293,8 @@ uint32_t definition_bits[0x100/32][32]={{0}}; @ @<initialize definitions@>= +definition_bits[0][list_kind]=(1<<(MAX_LIST_DEFAULT+1))-1; +definition_bits[0][param_kind]=(1<<(MAX_LIST_DEFAULT+1))-1; definition_bits[0][int_kind]=(1<<(MAX_INT_DEFAULT+1))-1; definition_bits[0][dimen_kind]=(1<<(MAX_DIMEN_DEFAULT+1))-1; definition_bits[0][xdimen_kind]=(1<<(MAX_XDIMEN_DEFAULT+1))-1; @@ -8153,7 +8361,7 @@ def_node: \vbox{\getcode\vskip -\baselineskip\writecode} @<get functions@>= -void hget_definition(int n, uint8_t a, uint32_t node_pos) +void hget_definition(int n, Tag a, uint32_t node_pos) {@+ switch(KIND(a)) { case font_kind: hget_font_def(n);@+ break; case param_kind: @@ -8179,7 +8387,9 @@ void hget_def_node() @<read the start byte |a|@>@; k=KIND(a); - if (k==label_kind) + if (k==unknown_kind && INFO(a)==b100) + hget_unknown_def(); + else if (k==label_kind) hget_outline_or_label_def(INFO(a),node_pos); else { int n; @@ -8196,9 +8406,9 @@ void hget_def_node() if(n>max_ref[k] || n <= max_fixed[k]) QUIT("Definition %d for %s out of range [%d - %d]",@| n, definition_name[k],max_fixed[k]+1,max_ref[k]); + if (max_fixed[k]>max_default[k]) + QUIT("Definitions for kind %s not supported", definition_name[k]); } - if (max_fixed[k]>max_default[k]) - QUIT("Definitions for kind %s not supported", definition_name[k]); @<read and check the end byte |z|@>@; } @ @@ -8243,8 +8453,8 @@ is omitted in the long format as well as in the short format. @s parameters_node symbol @s def_node symbol @s parameters symbol -@s empty_param_list symbol -@s non_empty_param_list symbol +@s named_param_list symbol +@s param_list symbol @<symbols@>= %token PARAM "param" @@ -8258,30 +8468,22 @@ is omitted in the long format as well as in the short format. @<parsing rules@>= def_list: position @+ | def_list def_node {check_param_def(&($2));}; -parameters: estimate def_list { $$.p=$2; $$.k=param_kind; $$.s=(hpos-hstart)-$2;}; +parameters: estimate def_list { $$.p=$2; $$.t=TAG(param_kind,b001); $$.s=(hpos-hstart)-$2;}; @ Using a parsing rule like ``\nts{param\_list}: \nts{start} \ts{PARAM} \nts{parameters} \ts{END}'', an empty parameter list will be written as ``\.{<param>}''. -This looks ugly and seems like unnecessary syntax. It would be nicer -if an empty parameter list could simply be omitted. -Generating an empty parameter list for an omitted parameter list -is however a bit tricky. -Consider the sequence ``\.{<param\dots>} \.{<hbox\dots>}'' versus -the sequence ``\.{<hbox\dots>}''. In the latter case, -the parser will notice the missing parameter list -when it encounters the \.{hbox} token. -Of course it is not a good idea to augment the rules for the \.{hbox} with -a special test for the missing empty parameter list. -It is better to insert an empty parameter list before parsing the first ``\.{<}'' token -and remove it again if a non-empty parameter list has been detected. -This can be accomplished by the following two rules. +This looks ugly and seems like unnecessary syntax because +the parser knows anyway that a parameter list will come next. +Therefore the keyword can be omited except in definitions and in unknown nodes. + @<parsing rules@>= -empty_param_list: position { HPUTX(2); hpos++; hput_tags($1,TAG(param_kind,1));}; -non_empty_param_list: start PARAM {hpos=hpos-2;} parameters END @/ - { @+ hput_tags($1-2,hput_list($1-1,&($4)));@+}; +named_param_list: start PARAM parameters END @/ + { @+ hput_tags($1,hput_list($1+1,&($3)));@+}; +param_list: named_param_list | start parameters END @/ + { @+ hput_tags($1,hput_list($1+1,&($2)));@+}; @ \writecode @@ -8294,12 +8496,16 @@ void hwrite_parameters(List *l) hpos=hstart+h;@+ hend=hstart+e; /* restore |hpos| and |hend| */ } void hwrite_param_list(List *l) -{ @+if (l->s!=0) @/ - { hwrite_start();@+ - hwritef("param"); - hwrite_parameters(l); - hwrite_end(); - } +{ hwrite_start();@+ + hwrite_parameters(l); + hwrite_end(); +} + +void hwrite_named_param_list(List *l) +{ hwrite_start();@+ + hwritef("param"); + hwrite_parameters(l); + hwrite_end(); } @ @@ -8483,7 +8689,7 @@ void hget_font_def(uint8_t f) \putcode @<put functions@>= -uint8_t hput_font_head(uint8_t f, char *n, Dimen s, @| uint16_t m, uint16_t y) +Tag hput_font_head(uint8_t f, char *n, Dimen s, @| uint16_t m, uint16_t y) { Info i=b000; DBG(DBGDEF,"Defining font %d (%s) size 0x%x\n", f, n, s); hput_string(n); @@ -8506,6 +8712,10 @@ written ``{\tt \.{<}penalty 50\.{>}}'', from a penalty referencing the integer definition number 50, written ``{\tt \.{<}penalty *50\.{>}}''. +@<hint types@>= +typedef struct { @+Kind k; @+int n; @+} Ref; +@ + \goodbreak \vbox{\readcode\vskip -\baselineskip\putcode} @@ -8936,6 +9146,22 @@ max_default[range_kind]=MAX_RANGE_DEFAULT; max_fixed[range_kind]=zero_range_no; @ +\subsection{List, Texts, and Parameters} +@<default names@>= +typedef enum {@+ +empty_list_no=0@+ +} List_no; +#define MAX_LIST_DEFAULT empty_list_no +@ + +@<define range defaults@>= +max_default[list_kind]=MAX_LIST_DEFAULT; +max_fixed[list_kind]=empty_list_no; +max_default[param_kind]=MAX_LIST_DEFAULT; +max_fixed[param_kind]=empty_list_no; +@ + + \section{Content Section} The content section\index{content section} is just a list of nodes. @@ -9383,6 +9609,16 @@ using negated values. What works for lists, of course, will work for other kinds of nodes as well. So we use the lowest two bits of the values in the size table to store the number of embedded nodes that follow after the initial part. +To combine the number of leading bytes and the number of trailing nodes +into a single number that encodes both values according to this formula +we use the macro |NODE_SIZE|. We can get back both values using the +macros |NODE_HEAD| and |NODE_TAIL|. + +@<hint macros@>= +#define @[NODE_SIZE(H,T)@] ((T)==0?(H)+2:-4*((H)+1)+((T)-1)) +#define @[NODE_HEAD(N)@] ((N)>0?(N)-2:-((N)>>2)-1) +#define @[NODE_TAIL(N)@] ((N)<0?((N)&0x3)+1:0) +@ For list nodes neither of these methods works and these nodes can be marked with a zero entry in the node size table. @@ -9392,22 +9628,22 @@ for |hpos|: @<shared skip functions@>= uint32_t hff_list_pos=0, hff_list_size=0; -uint8_t hff_tag; +Tag hff_tag; void hff_hpos(void) -{ signed char i,k; +{ signed char i,b,n; hff_tag=*hpos;@+ DBGTAG(hff_tag,hpos); i= hnode_size[hff_tag]; - if (i>0) {hpos=hpos+i; @+return;@+ } + if (i>0) {hpos=hpos+NODE_HEAD(i)+2; @+return;@+ } else if (i<0) - { k=1+(i&0x3);@+ i=i>>2; - hpos=hpos-i; /* skip initial part */ - while (k>0) - { hff_hpos(); @+k--; @+} /* skip trailing nodes */ + { n=NODE_TAIL(i);@+ b=NODE_HEAD(i); + hpos=hpos+1+b; /* skip initial part */ + while (n>0) + { hff_hpos(); @+n--; @+} /* skip trailing nodes */ hpos++;/* skip end byte */ return; } - else if (hff_tag <=TAG(param_kind,5)) + else if (hff_tag <=TAG(param_kind,7)) @<advance |hpos| over a list@>@; TAGERR(hff_tag); } @@ -9430,20 +9666,47 @@ readable. printf("\n\n"); @ +When dealing with unknown content nodes, it is convenient to know which +nodes are known and which are not. For this purpose the |content_known| +array contains one byte for each kind value and each such bytes will +indicate using the seven least significant bits for which info values +the corresponding nodes are known. + +@<print the |content_known| variable@>= + for (k=0;k<32;k++) + for(i=0;i<8;i++) + if (hnode_size[TAG(k,i)]!=0) + content_known[k]|=(1<<i); + printf("uint8_t content_known[32]= {\n"); + for (k=0; k<32; k++)@/ + { printf("0x%02X",content_known[k]); + if (k<31) printf(","); + else printf("};"); + printf(" /* %s */\n",content_name[k]); + } + printf("\n"); +@ + + + + + \subsection{Lists}\index{list}\index{text}\index{parameters} List don't follow the usual schema of nodes. They have a variable size that is stored in the node. We keep position and size in global variables so that the list that ends a node can be conveniently located. @<advance |hpos| over a list@>= -switch (INFO(hff_tag)){ -case 1: hff_list_pos=hpos-hstart+1;hff_list_size=0; hpos=hpos+2;@+ return; -case 2: hpos++;@+ hff_list_size=HGET8;@+ hff_list_pos=hpos-hstart+1; hpos=hpos+1+hff_list_size+1+1+1;@+ return; -case 3: hpos++;@+ HGET16(hff_list_size);@+hff_list_pos=hpos-hstart+1; hpos=hpos+1+hff_list_size+1+2+1;@+ return; -case 4: hpos++;@+ HGET24(hff_list_size);@+hff_list_pos=hpos-hstart+1; hpos=hpos+1+hff_list_size+1+3+1;@+ return; -case 5: hpos++;@+ HGET32(hff_list_size);@+hff_list_pos=hpos-hstart+1; hpos=hpos+1+hff_list_size+1+4+1;@+ return; +switch (INFO(hff_tag)&0x3){ +case 0: hff_list_pos=hpos-hstart+1;hff_list_size=0; hpos=hpos+3;@+ return; +case 1: hpos++;@+ hff_list_size=HGET8;@+ hff_list_pos=hpos-hstart+1; hpos=hpos+1+hff_list_size+1+1+1;@+ return; +case 2: hpos++;@+ HGET16(hff_list_size);@+hff_list_pos=hpos-hstart+1; hpos=hpos+1+hff_list_size+1+2+1;@+ return; +case 3: hpos++;@+ HGET32(hff_list_size);@+hff_list_pos=hpos-hstart+1; hpos=hpos+1+hff_list_size+1+4+1;@+ return; +default: QUIT(@["List with unknown info [%s,%d] at " SIZE_F "\n"@],NAME(hff_tag),INFO(hff_tag),hpos-hstart); } @ +Actually list nodes never occur as content nodes in their own right but only as subnodes of +content nodes. Now let's consider the different kinds of nodes. @@ -9453,68 +9716,66 @@ have a start and an end tag, one byte for the font, and depending on the info from 1 to 4 bytes for the character code. @<initialize the |hnode_size| array@>= -hnode_size[TAG(glyph_kind,1)] = 1+1+1+1; -hnode_size[TAG(glyph_kind,2)] = 1+1+2+1; -hnode_size[TAG(glyph_kind,3)] = 1+1+3+1; -hnode_size[TAG(glyph_kind,4)] = 1+1+4+1; +hnode_size[TAG(glyph_kind,1)] = NODE_SIZE(1+1,0); +hnode_size[TAG(glyph_kind,2)] = NODE_SIZE(1+2,0); +hnode_size[TAG(glyph_kind,3)] = NODE_SIZE(1+3,0); +hnode_size[TAG(glyph_kind,4)] = NODE_SIZE(1+4,0); @ + + + \subsection{Penalties}\index{penalty} Penalty nodes either contain a one byte reference, a one byte number, or a two byte number. @<initialize the |hnode_size| array@>= -hnode_size[TAG(penalty_kind,0)] = 1+1+1; -hnode_size[TAG(penalty_kind,1)] = 1+1+1; -hnode_size[TAG(penalty_kind,2)] = 1+2+1; +hnode_size[TAG(penalty_kind,0)] = NODE_SIZE(1,0); +hnode_size[TAG(penalty_kind,1)] = NODE_SIZE(1,0); +hnode_size[TAG(penalty_kind,2)] = NODE_SIZE(2,0); +hnode_size[TAG(penalty_kind,3)] = NODE_SIZE(4,0); @ \subsection{Kerns}\index{kern} Kern nodes can contain a reference (either to a dimension or an extended dimension) -a dimension, or an extended dimension node. +followed by either a dimension or an extended dimension node. @<initialize the |hnode_size| array@>= -hnode_size[TAG(kern_kind,b000)] = 1+1+1; -hnode_size[TAG(kern_kind,b001)] = 1+1+1; -hnode_size[TAG(kern_kind,b010)] = 1+4+1; -hnode_size[TAG(kern_kind,b011)] = I_T(1,1); -hnode_size[TAG(kern_kind,b100)] = 1+1+1; -hnode_size[TAG(kern_kind,b101)] = 1+1+1; -hnode_size[TAG(kern_kind,b110)] = 1+4+1; -hnode_size[TAG(kern_kind,b111)] = I_T(1,1); -@ - -For the two cases where a kern node contains an extended dimension, -we use the following macro to combine the size of the initial part -with the number of trailing nodes: -@<skip macros@>= -#define @[I_T(I,T)@] (((-(I))<<2)|((T)-1)) +hnode_size[TAG(kern_kind,b000)] = NODE_SIZE(1,0); +hnode_size[TAG(kern_kind,b001)] = NODE_SIZE(1,0); +hnode_size[TAG(kern_kind,b010)] = NODE_SIZE(4,0); +hnode_size[TAG(kern_kind,b011)] = NODE_SIZE(0,1); +hnode_size[TAG(kern_kind,b100)] = NODE_SIZE(1,0); +hnode_size[TAG(kern_kind,b101)] = NODE_SIZE(1,0); +hnode_size[TAG(kern_kind,b110)] = NODE_SIZE(4,0); +hnode_size[TAG(kern_kind,b111)] = NODE_SIZE(0,1); @ + \subsection{Extended Dimensions}\index{extended dimension} Extended dimensions contain either one two or three 4 byte values depending on the info bits. @<initialize the |hnode_size| array@>= -hnode_size[TAG(xdimen_kind,b100)] = 1+4+1; -hnode_size[TAG(xdimen_kind,b010)] = 1+4+1; -hnode_size[TAG(xdimen_kind,b001)] = 1+4+1; -hnode_size[TAG(xdimen_kind,b110)] = 1+4+4+1; -hnode_size[TAG(xdimen_kind,b101)] = 1+4+4+1; -hnode_size[TAG(xdimen_kind,b011)] = 1+4+4+1; -hnode_size[TAG(xdimen_kind,b111)] = 1+4+4+4+1; +hnode_size[TAG(xdimen_kind,b100)] = NODE_SIZE(4,0); +hnode_size[TAG(xdimen_kind,b010)] = NODE_SIZE(4,0); +hnode_size[TAG(xdimen_kind,b001)] = NODE_SIZE(4,0); +hnode_size[TAG(xdimen_kind,b110)] = NODE_SIZE(4+4,0); +hnode_size[TAG(xdimen_kind,b101)] = NODE_SIZE(4+4,0); +hnode_size[TAG(xdimen_kind,b011)] = NODE_SIZE(4+4,0); +hnode_size[TAG(xdimen_kind,b111)] = NODE_SIZE(4+4+4,0); @ \subsection{Language}\index{language} Language nodes either code the language in the info value or they contain a reference byte. @<initialize the |hnode_size| array@>= -hnode_size[TAG(language_kind,b000)] = 1+1+1; -hnode_size[TAG(language_kind,1)] = 1+1; -hnode_size[TAG(language_kind,2)] = 1+1; -hnode_size[TAG(language_kind,3)] = 1+1; -hnode_size[TAG(language_kind,4)] = 1+1; -hnode_size[TAG(language_kind,5)] = 1+1; -hnode_size[TAG(language_kind,6)] = 1+1; -hnode_size[TAG(language_kind,7)] = 1+1; +hnode_size[TAG(language_kind,b000)] = NODE_SIZE(1,0); +hnode_size[TAG(language_kind,1)] = NODE_SIZE(0,0); +hnode_size[TAG(language_kind,2)] = NODE_SIZE(0,0); +hnode_size[TAG(language_kind,3)] = NODE_SIZE(0,0); +hnode_size[TAG(language_kind,4)] = NODE_SIZE(0,0); +hnode_size[TAG(language_kind,5)] = NODE_SIZE(0,0); +hnode_size[TAG(language_kind,6)] = NODE_SIZE(0,0); +hnode_size[TAG(language_kind,7)] = NODE_SIZE(0,0); @ \subsection{Rules}\index{rule} @@ -9522,14 +9783,14 @@ Rules usually contain a reference, otherwise they contain either one, two, or three 4 byte values depending on the info bits. @<initialize the |hnode_size| array@>= -hnode_size[TAG(rule_kind,b000)] = 1+1+1; -hnode_size[TAG(rule_kind,b100)] = 1+4+1; -hnode_size[TAG(rule_kind,b010)] = 1+4+1; -hnode_size[TAG(rule_kind,b001)] = 1+4+1; -hnode_size[TAG(rule_kind,b110)] = 1+4+4+1; -hnode_size[TAG(rule_kind,b101)] = 1+4+4+1; -hnode_size[TAG(rule_kind,b011)] = 1+4+4+1; -hnode_size[TAG(rule_kind,b111)] = 1+4+4+4+1; +hnode_size[TAG(rule_kind,b000)] = NODE_SIZE(1,0); +hnode_size[TAG(rule_kind,b100)] = NODE_SIZE(4,0); +hnode_size[TAG(rule_kind,b010)] = NODE_SIZE(4,0); +hnode_size[TAG(rule_kind,b001)] = NODE_SIZE(4,0); +hnode_size[TAG(rule_kind,b110)] = NODE_SIZE(4+4,0); +hnode_size[TAG(rule_kind,b101)] = NODE_SIZE(4+4,0); +hnode_size[TAG(rule_kind,b011)] = NODE_SIZE(4+4,0); +hnode_size[TAG(rule_kind,b111)] = NODE_SIZE(4+4+4,0); @ \subsection{Glue}\index{glue} @@ -9538,14 +9799,14 @@ they contain either one two or three 4 byte values depending on the info bits, and possibly even an extended dimension node followed by two 4 byte values. @<initialize the |hnode_size| array@>= -hnode_size[TAG(glue_kind,b000)] = 1+1+1; -hnode_size[TAG(glue_kind,b100)] = 1+4+1; -hnode_size[TAG(glue_kind,b010)] = 1+4+1; -hnode_size[TAG(glue_kind,b001)] = 1+4+1; -hnode_size[TAG(glue_kind,b110)] = 1+4+4+1; -hnode_size[TAG(glue_kind,b101)] = 1+4+4+1; -hnode_size[TAG(glue_kind,b011)] = 1+4+4+1; -hnode_size[TAG(glue_kind,b111)] = I_T(1+4+4,1); +hnode_size[TAG(glue_kind,b000)] = NODE_SIZE(1,0); +hnode_size[TAG(glue_kind,b100)] = NODE_SIZE(4,0); +hnode_size[TAG(glue_kind,b010)] = NODE_SIZE(4,0); +hnode_size[TAG(glue_kind,b001)] = NODE_SIZE(4,0); +hnode_size[TAG(glue_kind,b110)] = NODE_SIZE(4+4,0); +hnode_size[TAG(glue_kind,b101)] = NODE_SIZE(4+4,0); +hnode_size[TAG(glue_kind,b011)] = NODE_SIZE(4+4,0); +hnode_size[TAG(glue_kind,b111)] = NODE_SIZE(4+4,1); @ @@ -9556,22 +9817,22 @@ and some a glue setting together with glue sign and glue order. The last item in a box is a node list. @<initialize the |hnode_size| array@>= -hnode_size[TAG(hbox_kind,b000)] = I_T(1+4+4,1); /* tag, height, width*/ -hnode_size[TAG(hbox_kind,b001)] = I_T(1+4+4+4,1); /* and depth */ -hnode_size[TAG(hbox_kind,b010)] = I_T(1+4+4+4,1); /* or shift */ -hnode_size[TAG(hbox_kind,b011)] = I_T(1+4+4+4+4,1); /* or both */ -hnode_size[TAG(hbox_kind,b100)] = I_T(1+4+4+5,1); /* and glue setting*/ -hnode_size[TAG(hbox_kind,b101)] = I_T(1+4+4+4+5,1); /* and depth */ -hnode_size[TAG(hbox_kind,b110)] = I_T(1+4+4+4+5,1); /* or shift */ -hnode_size[TAG(hbox_kind,b111)] = I_T(1+4+4+4+4+5,1); /*or both */ -hnode_size[TAG(vbox_kind,b000)] = I_T(1+4+4,1); /* same for vbox*/ -hnode_size[TAG(vbox_kind,b001)] = I_T(1+4+4+4,1); -hnode_size[TAG(vbox_kind,b010)] = I_T(1+4+4+4,1); -hnode_size[TAG(vbox_kind,b011)] = I_T(1+4+4+4+4,1); -hnode_size[TAG(vbox_kind,b100)] = I_T(1+4+4+5,1); -hnode_size[TAG(vbox_kind,b101)] = I_T(1+4+4+4+5,1); -hnode_size[TAG(vbox_kind,b110)] = I_T(1+4+4+4+5,1); -hnode_size[TAG(vbox_kind,b111)] = I_T(1+4+4+4+4+5,1); +hnode_size[TAG(hbox_kind,b000)] = NODE_SIZE(4+4,1); /* tag, height, width*/ +hnode_size[TAG(hbox_kind,b001)] = NODE_SIZE(4+4+4,1); /* and depth */ +hnode_size[TAG(hbox_kind,b010)] = NODE_SIZE(4+4+4,1); /* or shift */ +hnode_size[TAG(hbox_kind,b011)] = NODE_SIZE(4+4+4+4,1); /* or both */ +hnode_size[TAG(hbox_kind,b100)] = NODE_SIZE(4+4+5,1); /* and glue setting*/ +hnode_size[TAG(hbox_kind,b101)] = NODE_SIZE(4+4+4+5,1); /* and depth */ +hnode_size[TAG(hbox_kind,b110)] = NODE_SIZE(4+4+4+5,1); /* or shift */ +hnode_size[TAG(hbox_kind,b111)] = NODE_SIZE(4+4+4+4+5,1); /*or both */ +hnode_size[TAG(vbox_kind,b000)] = NODE_SIZE(4+4,1); /* same for vbox*/ +hnode_size[TAG(vbox_kind,b001)] = NODE_SIZE(4+4+4,1); +hnode_size[TAG(vbox_kind,b010)] = NODE_SIZE(4+4+4,1); +hnode_size[TAG(vbox_kind,b011)] = NODE_SIZE(4+4+4+4,1); +hnode_size[TAG(vbox_kind,b100)] = NODE_SIZE(4+4+5,1); +hnode_size[TAG(vbox_kind,b101)] = NODE_SIZE(4+4+4+5,1); +hnode_size[TAG(vbox_kind,b110)] = NODE_SIZE(4+4+4+5,1); +hnode_size[TAG(vbox_kind,b111)] = NODE_SIZE(4+4+4+4+5,1); @ \subsection{Extended Boxes}\index{extended box} @@ -9579,72 +9840,72 @@ Extended boxes start with height, width, depth, stretch, or shrink components. Then follows an extended dimension either as a reference or a node. The node ends with a list. @<initialize the |hnode_size| array@>= -hnode_size[TAG(hset_kind,b000)] = I_T(1+4+4+4+4+1,1); -hnode_size[TAG(hset_kind,b001)] = I_T(1+4+4+4+4+4+1,1); -hnode_size[TAG(hset_kind,b010)] = I_T(1+4+4+4+4+4+1,1); -hnode_size[TAG(hset_kind,b011)] = I_T(1+4+4+4+4+4+4+1,1); -hnode_size[TAG(vset_kind,b000)] = I_T(1+4+4+4+4+1,1); -hnode_size[TAG(vset_kind,b001)] = I_T(1+4+4+4+4+4+1,1); -hnode_size[TAG(vset_kind,b010)] = I_T(1+4+4+4+4+4+1,1); -hnode_size[TAG(vset_kind,b011)] = I_T(1+4+4+4+4+4+4+1,1); - -hnode_size[TAG(hset_kind,b100)] = I_T(1+4+4+4+4,2); -hnode_size[TAG(hset_kind,b101)] = I_T(1+4+4+4+4+4,2); -hnode_size[TAG(hset_kind,b110)] = I_T(1+4+4+4+4+4,2); -hnode_size[TAG(hset_kind,b111)] = I_T(1+4+4+4+4+4+4,2); -hnode_size[TAG(vset_kind,b100)] = I_T(1+4+4+4+4,2); -hnode_size[TAG(vset_kind,b101)] = I_T(1+4+4+4+4+4,2); -hnode_size[TAG(vset_kind,b110)] = I_T(1+4+4+4+4+4,2); -hnode_size[TAG(vset_kind,b111)] = I_T(1+4+4+4+4+4+4,2); +hnode_size[TAG(hset_kind,b000)] = NODE_SIZE(4+4+4+4+1,1); +hnode_size[TAG(hset_kind,b001)] = NODE_SIZE(4+4+4+4+4+1,1); +hnode_size[TAG(hset_kind,b010)] = NODE_SIZE(4+4+4+4+4+1,1); +hnode_size[TAG(hset_kind,b011)] = NODE_SIZE(4+4+4+4+4+4+1,1); +hnode_size[TAG(vset_kind,b000)] = NODE_SIZE(4+4+4+4+1,1); +hnode_size[TAG(vset_kind,b001)] = NODE_SIZE(4+4+4+4+4+1,1); +hnode_size[TAG(vset_kind,b010)] = NODE_SIZE(4+4+4+4+4+1,1); +hnode_size[TAG(vset_kind,b011)] = NODE_SIZE(4+4+4+4+4+4+1,1); + +hnode_size[TAG(hset_kind,b100)] = NODE_SIZE(4+4+4+4,2); +hnode_size[TAG(hset_kind,b101)] = NODE_SIZE(4+4+4+4+4,2); +hnode_size[TAG(hset_kind,b110)] = NODE_SIZE(4+4+4+4+4,2); +hnode_size[TAG(hset_kind,b111)] = NODE_SIZE(4+4+4+4+4+4,2); +hnode_size[TAG(vset_kind,b100)] = NODE_SIZE(4+4+4+4,2); +hnode_size[TAG(vset_kind,b101)] = NODE_SIZE(4+4+4+4+4,2); +hnode_size[TAG(vset_kind,b110)] = NODE_SIZE(4+4+4+4+4,2); +hnode_size[TAG(vset_kind,b111)] = NODE_SIZE(4+4+4+4+4+4,2); @ The hpack and vpack nodes start with a shift amount and in case of vpack a depth. Then again an extended dimension and a list. @<initialize the |hnode_size| array@>= -hnode_size[TAG(hpack_kind,b000)] = I_T(1+1,1); -hnode_size[TAG(hpack_kind,b001)] = I_T(1+1,1); -hnode_size[TAG(hpack_kind,b010)] = I_T(1+4+1,1); -hnode_size[TAG(hpack_kind,b011)] = I_T(1+4+1,1); -hnode_size[TAG(vpack_kind,b000)] = I_T(1+4+1,1); -hnode_size[TAG(vpack_kind,b001)] = I_T(1+4+1,1); -hnode_size[TAG(vpack_kind,b010)] = I_T(1+4+4+1,1); -hnode_size[TAG(vpack_kind,b011)] = I_T(1+4+4+1,1); - -hnode_size[TAG(hpack_kind,b100)] = I_T(1,2); -hnode_size[TAG(hpack_kind,b101)] = I_T(1,2); -hnode_size[TAG(hpack_kind,b110)] = I_T(1+4,2); -hnode_size[TAG(hpack_kind,b111)] = I_T(1+4,2); -hnode_size[TAG(vpack_kind,b100)] = I_T(1+4,2); -hnode_size[TAG(vpack_kind,b101)] = I_T(1+4,2); -hnode_size[TAG(vpack_kind,b110)] = I_T(1+4+4,2); -hnode_size[TAG(vpack_kind,b111)] = I_T(1+4+4,2); +hnode_size[TAG(hpack_kind,b000)] = NODE_SIZE(1,1); +hnode_size[TAG(hpack_kind,b001)] = NODE_SIZE(1,1); +hnode_size[TAG(hpack_kind,b010)] = NODE_SIZE(4+1,1); +hnode_size[TAG(hpack_kind,b011)] = NODE_SIZE(4+1,1); +hnode_size[TAG(vpack_kind,b000)] = NODE_SIZE(4+1,1); +hnode_size[TAG(vpack_kind,b001)] = NODE_SIZE(4+1,1); +hnode_size[TAG(vpack_kind,b010)] = NODE_SIZE(4+4+1,1); +hnode_size[TAG(vpack_kind,b011)] = NODE_SIZE(4+4+1,1); + +hnode_size[TAG(hpack_kind,b100)] = NODE_SIZE(0,2); +hnode_size[TAG(hpack_kind,b101)] = NODE_SIZE(0,2); +hnode_size[TAG(hpack_kind,b110)] = NODE_SIZE(4,2); +hnode_size[TAG(hpack_kind,b111)] = NODE_SIZE(4,2); +hnode_size[TAG(vpack_kind,b100)] = NODE_SIZE(4,2); +hnode_size[TAG(vpack_kind,b101)] = NODE_SIZE(4,2); +hnode_size[TAG(vpack_kind,b110)] = NODE_SIZE(4+4,2); +hnode_size[TAG(vpack_kind,b111)] = NODE_SIZE(4+4,2); @ \subsection{Leaders}\index{leaders} Most leader nodes will use a reference. Otherwise they contain a glue node followed by a box or rule node. @<initialize the |hnode_size| array@>= -hnode_size[TAG(leaders_kind,b000)] = 1+1+1; -hnode_size[TAG(leaders_kind,1)] = I_T(1,1); -hnode_size[TAG(leaders_kind,2)] = I_T(1,1); -hnode_size[TAG(leaders_kind,3)] = I_T(1,1); -hnode_size[TAG(leaders_kind,b100|1)] = I_T(1,2); -hnode_size[TAG(leaders_kind,b100|2)] = I_T(1,2); -hnode_size[TAG(leaders_kind,b100|3)] = I_T(1,2); +hnode_size[TAG(leaders_kind,b000)] = NODE_SIZE(1,0); +hnode_size[TAG(leaders_kind,1)] = NODE_SIZE(0,1); +hnode_size[TAG(leaders_kind,2)] = NODE_SIZE(0,1); +hnode_size[TAG(leaders_kind,3)] = NODE_SIZE(0,1); +hnode_size[TAG(leaders_kind,b100|1)] = NODE_SIZE(0,2); +hnode_size[TAG(leaders_kind,b100|2)] = NODE_SIZE(0,2); +hnode_size[TAG(leaders_kind,b100|3)] = NODE_SIZE(0,2); @ \subsection{Baseline Skips}\index{baseline skip} Here we expect either a reference or two optional glue nodes followed by an optional dimension. @<initialize the |hnode_size| array@>= -hnode_size[TAG(baseline_kind,b000)] = 1+1+1; -hnode_size[TAG(baseline_kind,b001)] = 1+4+1; -hnode_size[TAG(baseline_kind,b010)] = I_T(1,1); -hnode_size[TAG(baseline_kind,b100)] = I_T(1,1); -hnode_size[TAG(baseline_kind,b110)] = I_T(1,2); +hnode_size[TAG(baseline_kind,b000)] = NODE_SIZE(1,0); +hnode_size[TAG(baseline_kind,b001)] = NODE_SIZE(4,0); +hnode_size[TAG(baseline_kind,b010)] = NODE_SIZE(0,1); +hnode_size[TAG(baseline_kind,b100)] = NODE_SIZE(0,1); +hnode_size[TAG(baseline_kind,b110)] = NODE_SIZE(0,2); -hnode_size[TAG(baseline_kind,b011)] = I_T(1+4,1); -hnode_size[TAG(baseline_kind,b101)] = I_T(1+4,1); -hnode_size[TAG(baseline_kind,b111)] = I_T(1+4,2); +hnode_size[TAG(baseline_kind,b011)] = NODE_SIZE(4,1); +hnode_size[TAG(baseline_kind,b101)] = NODE_SIZE(4,1); +hnode_size[TAG(baseline_kind,b111)] = NODE_SIZE(4,2); @ @@ -9653,14 +9914,14 @@ As usual a reference is possible, otherwise the font is followed by character by as given by the info. Only if the info value is 7, the number of character bytes is stored separately. @<initialize the |hnode_size| array@>= -hnode_size[TAG(ligature_kind,b000)] = 1+1+1; -hnode_size[TAG(ligature_kind,1)] = 1+1+1+1; -hnode_size[TAG(ligature_kind,2)] = 1+1+2+1; -hnode_size[TAG(ligature_kind,3)] = 1+1+3+1; -hnode_size[TAG(ligature_kind,4)] = 1+1+4+1; -hnode_size[TAG(ligature_kind,5)] = 1+1+5+1; -hnode_size[TAG(ligature_kind,6)] = 1+1+6+1; -hnode_size[TAG(ligature_kind,7)] = I_T(1+1,1); +hnode_size[TAG(ligature_kind,b000)] = NODE_SIZE(1,0); +hnode_size[TAG(ligature_kind,1)] = NODE_SIZE(1+1,0); +hnode_size[TAG(ligature_kind,2)] = NODE_SIZE(1+2,0); +hnode_size[TAG(ligature_kind,3)] = NODE_SIZE(1+3,0); +hnode_size[TAG(ligature_kind,4)] = NODE_SIZE(1+4,0); +hnode_size[TAG(ligature_kind,5)] = NODE_SIZE(1+5,0); +hnode_size[TAG(ligature_kind,6)] = NODE_SIZE(1+6,0); +hnode_size[TAG(ligature_kind,7)] = NODE_SIZE(1,1); @ \subsection{Discretionary breaks}\index{discretionary break} @@ -9669,22 +9930,22 @@ with empty pre- and post-list, or with a zero line skip limit Otherwise one or two lists are followed by an optional replace count. @<initialize the |hnode_size| array@>= -hnode_size[TAG(disc_kind,b000)] = 1+1+1; -hnode_size[TAG(disc_kind,b010)] = I_T(1,1); -hnode_size[TAG(disc_kind,b011)] = I_T(1,2); -hnode_size[TAG(disc_kind,b100)] = 1+1+1; -hnode_size[TAG(disc_kind,b110)] = I_T(1+1,1); -hnode_size[TAG(disc_kind,b111)] = I_T(1+1,2); +hnode_size[TAG(disc_kind,b000)] = NODE_SIZE(1,0); +hnode_size[TAG(disc_kind,b010)] = NODE_SIZE(0,1); +hnode_size[TAG(disc_kind,b011)] = NODE_SIZE(0,2); +hnode_size[TAG(disc_kind,b100)] = NODE_SIZE(1,0); +hnode_size[TAG(disc_kind,b110)] = NODE_SIZE(1,1); +hnode_size[TAG(disc_kind,b111)] = NODE_SIZE(1,2); @ \subsection{Paragraphs}\index{paragraph} Paragraph nodes contain an extended dimension, an parameter list and a list. The first two can be given as a reference. @<initialize the |hnode_size| array@>= -hnode_size[TAG(par_kind,b000)] = I_T(1+1+1,1); -hnode_size[TAG(par_kind,b010)] = I_T(1+1,2); -hnode_size[TAG(par_kind,b110)] = I_T(1,3); -hnode_size[TAG(par_kind,b100)] = I_T(1+1,2); +hnode_size[TAG(par_kind,b000)] = NODE_SIZE(1+1,1); +hnode_size[TAG(par_kind,b010)] = NODE_SIZE(1,2); +hnode_size[TAG(par_kind,b110)] = NODE_SIZE(0,3); +hnode_size[TAG(par_kind,b100)] = NODE_SIZE(1,2); @ \subsection{Mathematics}\index{mathematics}\index{displayed formula} @@ -9692,75 +9953,76 @@ Displayed math needs a parameter list, either as list or as reference followed by an optional left or right equation number and a list. Text math is simpler: the only information is in the info value. @<initialize the |hnode_size| array@>= -hnode_size[TAG(math_kind,b000)] = I_T(1+1,1); -hnode_size[TAG(math_kind,b001)] = I_T(1+1,2); -hnode_size[TAG(math_kind,b010)] = I_T(1+1,2); -hnode_size[TAG(math_kind,b100)] = I_T(1,2); -hnode_size[TAG(math_kind,b101)] = I_T(1,3); -hnode_size[TAG(math_kind,b110)] = I_T(1,3); -hnode_size[TAG(math_kind,b111)] = 1+1; -hnode_size[TAG(math_kind,b011)] = 1+1; +hnode_size[TAG(math_kind,b000)] = NODE_SIZE(1,1); +hnode_size[TAG(math_kind,b001)] = NODE_SIZE(1,2); +hnode_size[TAG(math_kind,b010)] = NODE_SIZE(1,2); +hnode_size[TAG(math_kind,b100)] = NODE_SIZE(0,2); +hnode_size[TAG(math_kind,b101)] = NODE_SIZE(0,3); +hnode_size[TAG(math_kind,b110)] = NODE_SIZE(0,3); +hnode_size[TAG(math_kind,b111)] = NODE_SIZE(0,0); +hnode_size[TAG(math_kind,b011)] = NODE_SIZE(0,0); @ \subsection{Adjustments}\index{adjustment} @<initialize the |hnode_size| array@>= -hnode_size[TAG(adjust_kind,1)] = I_T(1,1); +hnode_size[TAG(adjust_kind,1)] = NODE_SIZE(0,1); @ \subsection{Tables}\index{alignment} Tables have an extended dimension either as a node or as a reference followed by two lists. @<initialize the |hnode_size| array@>= -hnode_size[TAG(table_kind,b000)] = I_T(1+1,2); -hnode_size[TAG(table_kind,b001)] = I_T(1+1,2); -hnode_size[TAG(table_kind,b010)] = I_T(1+1,2); -hnode_size[TAG(table_kind,b011)] = I_T(1+1,2); -hnode_size[TAG(table_kind,b100)] = I_T(1,3); -hnode_size[TAG(table_kind,b101)] = I_T(1,3); -hnode_size[TAG(table_kind,b110)] = I_T(1,3); -hnode_size[TAG(table_kind,b111)] = I_T(1,3); +hnode_size[TAG(table_kind,b000)] = NODE_SIZE(1,2); +hnode_size[TAG(table_kind,b001)] = NODE_SIZE(1,2); +hnode_size[TAG(table_kind,b010)] = NODE_SIZE(1,2); +hnode_size[TAG(table_kind,b011)] = NODE_SIZE(1,2); +hnode_size[TAG(table_kind,b100)] = NODE_SIZE(0,3); +hnode_size[TAG(table_kind,b101)] = NODE_SIZE(0,3); +hnode_size[TAG(table_kind,b110)] = NODE_SIZE(0,3); +hnode_size[TAG(table_kind,b111)] = NODE_SIZE(0,3); @ Outer item nodes are lists of inner item nodes, inner item nodes are box nodes followed by an optional span count. @<initialize the |hnode_size| array@>= -hnode_size[TAG(item_kind,b000)] = I_T(1,1); /* outer */ -hnode_size[TAG(item_kind,1)] = I_T(1,1); /* inner */ -hnode_size[TAG(item_kind,2)] = I_T(1,1); -hnode_size[TAG(item_kind,3)] = I_T(1,1); -hnode_size[TAG(item_kind,4)] = I_T(1,1); -hnode_size[TAG(item_kind,5)] = I_T(1,1); -hnode_size[TAG(item_kind,6)] = I_T(1,1); -hnode_size[TAG(item_kind,6)] = I_T(2,1); +hnode_size[TAG(item_kind,b000)] = NODE_SIZE(0,1); /* outer */ +hnode_size[TAG(item_kind,1)] = NODE_SIZE(0,1); /* inner */ +hnode_size[TAG(item_kind,2)] = NODE_SIZE(0,1); +hnode_size[TAG(item_kind,3)] = NODE_SIZE(0,1); +hnode_size[TAG(item_kind,4)] = NODE_SIZE(0,1); +hnode_size[TAG(item_kind,5)] = NODE_SIZE(0,1); +hnode_size[TAG(item_kind,6)] = NODE_SIZE(0,1); +hnode_size[TAG(item_kind,7)] = NODE_SIZE(1,1); @ \subsection{Images}\index{image} If not given by a reference, images contain a section reference and optional dimensions and a descriptive list. @<initialize the |hnode_size| array@>= -hnode_size[TAG(image_kind,b000)] = 1+1+1; -hnode_size[TAG(image_kind,b001)] = I_T(1+2+4+4,1); -hnode_size[TAG(image_kind,b010)] = I_T(1+2+4+4,1); -hnode_size[TAG(image_kind,b011)] = I_T(1+2+4+4,1); -hnode_size[TAG(image_kind,b100)] = I_T(1+2+4+1+1,1); -hnode_size[TAG(image_kind,b101)] = I_T(1+2+4+1,2); -hnode_size[TAG(image_kind,b110)] = I_T(1+2+4+1,2); -hnode_size[TAG(image_kind,b111)] = I_T(1+2+4,3); +hnode_size[TAG(image_kind,b000)] = NODE_SIZE(1,0); +hnode_size[TAG(image_kind,b001)] = NODE_SIZE(2+4+4,1); +hnode_size[TAG(image_kind,b010)] = NODE_SIZE(2+4+4,1); +hnode_size[TAG(image_kind,b011)] = NODE_SIZE(2+4+4,1); +hnode_size[TAG(image_kind,b100)] = NODE_SIZE(2+4+1+1,1); +hnode_size[TAG(image_kind,b101)] = NODE_SIZE(2+4+1,2); +hnode_size[TAG(image_kind,b110)] = NODE_SIZE(2+4+1,2); +hnode_size[TAG(image_kind,b111)] = NODE_SIZE(2+4,3); @ \subsection{Links}\index{link} Links contain either a 2 byte or a 1 byte reference. @<initialize the |hnode_size| array@>= -hnode_size[TAG(link_kind,b000)] = 1+1+1; -hnode_size[TAG(link_kind,b001)] = 1+2+1; -hnode_size[TAG(link_kind,b010)] = 1+1+1; -hnode_size[TAG(link_kind,b011)] = 1+2+1; +hnode_size[TAG(link_kind,b000)] = NODE_SIZE(1,0); +hnode_size[TAG(link_kind,b001)] = NODE_SIZE(2,0); +hnode_size[TAG(link_kind,b010)] = NODE_SIZE(1,0); +hnode_size[TAG(link_kind,b011)] = NODE_SIZE(2,0); @ \subsection{Stream Nodes}\index{stream} After the stream reference follows a parameter list, either as reference or as a list, and then a content list. @<initialize the |hnode_size| array@>= -hnode_size[TAG(stream_kind,b000)] = I_T(1+1+1,1); -hnode_size[TAG(stream_kind,b010)] = I_T(1+1,2); +hnode_size[TAG(stream_kind,b000)] = NODE_SIZE(1+1,1); +hnode_size[TAG(stream_kind,b010)] = NODE_SIZE(1,2); +hnode_size[TAG(stream_kind,b100)] = NODE_SIZE(1,0); @ @@ -9805,12 +10067,13 @@ static void hteg_content_node(void) @<skip and check the start byte |a|@>@; } -static void hteg_content(uint8_t z) +static void hteg_content(Tag z) {@+ switch (z)@/ { @<cases to skip content@>@;@t\1@>@/ default: - TAGERR(z); + if (!hteg_unknown(z)) + TAGERR(z); break;@t\2@>@/ } } @@ -9819,7 +10082,7 @@ static void hteg_content(uint8_t z) The code to skip the end\index{end byte} byte |z| and to check the start\index{start byte} byte |a| is used repeatedly. @<skip the end byte |z|@>= - uint8_t a,z; /* the start and the end byte*/ + Tag a,z; /* the start and the end byte*/ uint32_t node_pos=hpos-hstart; if (hpos<=hstart) return; HTEGTAG(z); @@ -9919,12 +10182,14 @@ case TAG(glyph_kind,4): @+{@+Glyph g;@+ HTEG_GLYPH(4,g);@+}@+break; @<skip macros@>= #define @[HTEG_PENALTY(I,P)@] \ if (I==1) {int8_t n; @+n=HTEG8; @+P=n;@+ } \ -else {int16_t n;@+ HTEG16(n); @+ P=n; @+}\ +else if (I==2) {int16_t n;@+ HTEG16(n); @+ P=n; @+}\ +else if (I==3) {int32_t n;@+ HTEG32(n); @+ P=n; @+} @ @<cases to skip content@>= @t\1\kern1em@>case TAG(penalty_kind,1): @+{int32_t p;@+ HTEG_PENALTY(1,p);@+} @+break; case TAG(penalty_kind,2): @+{int32_t p;@+ HTEG_PENALTY(2,p);@+} @+break; +case TAG(penalty_kind,3): @+{int32_t p;@+ HTEG_PENALTY(2,p);@+} @+break; @ @@ -10078,9 +10343,9 @@ if ((I)&b010) { Dimen a; @+HTEG32(a);@+} \ #define @[HTEG_PACK(K,I)@] @/\ { List l; @+hteg_list(&l); @+} \ if ((I)&b100) {Xdimen x; hteg_xdimen_node(&x);@+} @+ else HTEG_REF(xdimen_kind);\ - if (K==vpack_kind) { Dimen d; @+HTEG32(d); @+ }\ - if ((I)&b010) { Dimen d; @+HTEG32(d); @+ } -@ + if ((I)&b010) { Dimen d; @+HTEG32(d); @+ }\ + if (K==vpack_kind) { Dimen d; @+HTEG32(d); @+ } + @ @<cases to skip content@>= @t\1\kern1em@>case TAG(hset_kind,b000): HTEG_SET(b000); @+ break; @@ -10184,8 +10449,8 @@ case TAG(ligature_kind,7):@+ {Lig l; @+HTEG_LIG(7,l);@+} @+break; \noindent @<skip macros@>= #define @[HTEG_DISC(I,H)@]\ -if ((I)&b001) hteg_list(&((H).q)); else { (H).q.p=hpos-hstart; @+(H).q.s=0; @+(H).q.k=list_kind; @+}\ -if ((I)&b010) hteg_list(&((H).p)); else { (H).p.p=hpos-hstart; @+(H).p.s=0; @+(H).p.k=list_kind; @+} \ +if ((I)&b001) hteg_list(&((H).q)); else { (H).q.p=hpos-hstart; @+(H).q.s=0; @+(H).q.t=TAG(list_kind,b000); @+}\ +if ((I)&b010) hteg_list(&((H).p)); else { (H).p.p=hpos-hstart; @+(H).p.s=0; @+(H).p.t=TAG(list_kind,b000); @+} \ if ((I)&b100) (H).r=HTEG8; @+else (H).r=0; @ @<cases to skip content@>= @@ -10287,30 +10552,32 @@ case TAG(link_kind,b011): @+ HTEG_LINK(b011); @+break; @<shared skip functions@>= void hteg_size_boundary(Info info) { uint32_t n; - if (info<2) return; + info=info&0x3; + if (info==0) return; n=HTEG8; - if (n-1!=0x100-info) QUIT(@["List size boundary byte 0x%x does not match info value %d at " SIZE_F@], + if (n!=0x100-info) QUIT(@["List size boundary byte 0x%x does not match info value %d at " SIZE_F@], n, info,hpos-hstart); } uint32_t hteg_list_size(Info info) -{ uint32_t n; - if (info==1) return 0; - else if (info==2) n=HTEG8; - else if (info==3) HTEG16(n); - else if (info==4) HTEG24(n); - else if (info==5) HTEG32(n); - else QUIT("List info %d must be 1, 2, 3, 4, or 5",info); +{ uint32_t n=0; + info=info&0x3; + if (info==0) return 0; + else if (info==1) n=HTEG8; + else if (info==2) HTEG16(n); + else if (info==3) HTEG32(n); + else QUIT("List info %d must be 0, 1, 2, or 3",info); return n; } void hteg_list(List *l) { @<skip the end byte |z|@>@, - @+if (KIND(z)!=list_kind && KIND(z)!=text_kind &&@| KIND(z)!=param_kind) @/ + @+if (KIND(z)!=list_kind && KIND(z)!=param_kind) @/ QUIT("List expected at 0x%x", (uint32_t)(hpos-hstart)); - else + else if ((INFO(z)&0x3)==0) {HBACK(1); l->s=0;@+} + else { uint32_t s; - l->k=KIND(z); + l->t=z; l->s=hteg_list_size(INFO(z)); hteg_size_boundary(INFO(z)); hpos=hpos-l->s; @@ -10319,8 +10586,8 @@ void hteg_list(List *l) 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); - @<skip and check the start byte |a|@>@; } + @<skip and check the start byte |a|@>@; } void hteg_param_list(List *l) @@ -10405,6 +10672,29 @@ case TAG(leaders_kind,0): HTEG_REF(leaders_kind); @+break; case TAG(baseline_kind,0): HTEG_REF(baseline_kind); @+break; @ +\subsection{Unknown nodes} +@<skip functions@>= +static int hteg_unknown(Tag z) +{ int b, n; + int8_t s; + s = hnode_size[z]; + DBG(DBGTAGS,"Trying unknown tag 0x%x at 0x%x\n",z,(uint32_t)(hpos-hstart-1)); + if (s==0) return 0; + b=NODE_HEAD(s); n=NODE_TAIL(s); + DBG(DBGTAGS,"Trying unknown node size %d %d\n",b,n); + + while (n>0) { + z=*(hpos-1); + if (KIND(z)==xdimen_kind) { Xdimen x; hteg_xdimen_node(&x); } + else if (KIND(z)==param_kind) { List l; @+hteg_param_list(&l); @+} + else if (KIND(z)<=list_kind) { List l; @+hteg_list(&l); @+} + else hteg_content_node(); + n--; } + while (b>0) { z=HTEG8; b--;} + return 1; +} +@ + \section{Code and Header Files}\index{code file}\index{header file} @@ -10454,8 +10744,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 4 +#define HINT_VERSION 2 +#define HINT_SUB_VERSION 0 #define AS_STR(X) #X #define VERSION_AS_STR(X,Y) AS_STR(X) "." AS_STR(Y) #define HINT_VERSION_STRING VERSION_AS_STR(HINT_VERSION, HINT_SUB_VERSION) @@ -10487,6 +10777,7 @@ extern Glue glue_defaults[MAX_GLUE_DEFAULT+1]; extern Baseline baseline_defaults[MAX_BASELINE_DEFAULT+1]; extern Label label_defaults[MAX_LABEL_DEFAULT+1]; extern signed char hnode_size[0x100]; +extern uint8_t content_known[32]; #endif @ @@ -10509,6 +10800,7 @@ Glue glue_defaults[MAX_GLUE_DEFAULT+1]={{{0}}}; Baseline baseline_defaults[MAX_BASELINE_DEFAULT+1]={{{{0}}}}; signed char hnode_size[0x100]={0}; +uint8_t content_known[32]={0}; @<define |content_name| and |definition_name|@>@; int main(void) { Kind k; @@ -10536,6 +10828,7 @@ int main(void) @<initialize the |hnode_size| array@>@; @<print the |hnode_size| variable@>@; + @<print the |content_known| variable@>@; return 0; } @ @@ -10599,15 +10892,21 @@ extern uint32_t hget_utf8(void); extern void hget_size_boundary(Info info); extern uint32_t hget_list_size(Info info); extern void hget_list(List *l); -extern uint32_t hget_utf8(void); extern float32_t hget_float32(void); +extern void hff_hpos(void); +extern uint32_t hff_list_pos, hff_list_size; +extern Tag hff_tag; extern float32_t hteg_float32(void); -extern void hteg_size_boundary(Info info); extern uint32_t hteg_list_size(Info info); + +/* seems like these are declared static */ +#if 0 extern void hteg_list(List *l); -extern void hff_hpos(void); -extern uint32_t hff_list_pos, hff_list_size; -extern uint8_t hff_tag; + +extern void hteg_size_boundary(Info info); + +#endif + @ @@ -10670,18 +10969,18 @@ extern void hput_content_start(void); extern void hput_content_end(void); extern void hset_label(int n,int w); -extern uint8_t hput_link(int n, int on); +extern Tag hput_link(int n, int on); extern void hset_outline(int m, int r, int d, uint32_t p); extern void hput_label_defs(void); -extern void hput_tags(uint32_t pos, uint8_t tag); -extern uint8_t hput_glyph(Glyph *g); -extern uint8_t hput_xdimen(Xdimen *x); -extern uint8_t hput_int(int32_t p); -extern uint8_t hput_language(uint8_t n); -extern uint8_t hput_rule(Rule *r); -extern uint8_t hput_glue(Glue *g); -extern uint8_t hput_list(uint32_t size_pos, List *y); +extern void hput_tags(uint32_t pos, Tag tag); +extern Tag hput_glyph(Glyph *g); +extern Tag hput_xdimen(Xdimen *x); +extern Tag hput_int(int32_t p); +extern Tag hput_language(uint8_t n); +extern Tag hput_rule(Rule *r); +extern Tag hput_glue(Glue *g); +extern Tag hput_list(uint32_t size_pos, List *y); extern uint8_t hsize_bytes(uint32_t n); extern void hput_txt_cc(uint32_t c); extern void hput_txt_font(uint8_t f); @@ -10691,22 +10990,24 @@ extern Info hput_box_dimen(Dimen h, Dimen d, Dimen w); extern Info hput_box_shift(Dimen a); extern Info hput_box_glue_set(int8_t s, float32_t r, Order o); extern void hput_stretch(Stretch *s); -extern uint8_t hput_kern(Kern *k); +extern Tag hput_kern(Kern *k); extern void hput_utf8(uint32_t c); -extern uint8_t hput_ligature(Lig *l); -extern uint8_t hput_disc(Disc *h); +extern Tag hput_ligature(Lig *l); +extern Tag hput_disc(Disc *h); extern Info hput_span_count(uint32_t n); extern Info hput_image_spec(uint32_t n, float32_t a, uint32_t wr, Xdimen *w, uint32_t hr, Xdimen *h); extern void hput_string(char *str); extern void hput_range(uint8_t pg, bool on); extern void hput_max_definitions(void); -extern uint8_t hput_dimen(Dimen d); -extern uint8_t hput_font_head(uint8_t f, char *n, Dimen s,@| uint16_t m, uint16_t y); +extern Tag hput_dimen(Dimen d); +extern Tag hput_font_head(uint8_t f, char *n, Dimen s,@| uint16_t m, uint16_t y); extern void hput_range_defs(void); extern void hput_xdimen_node(Xdimen *x); extern void hput_directory(void); extern size_t hput_hint(char * str); extern void hput_list_size(uint32_t n, int i); +extern uint32_t hput_unknown_def(uint32_t t, uint32_t b, uint32_t n); +extern Tag hput_unknown(uint32_t pos,uint32_t t, uint32_t b, uint32_t n); extern int hcompress_depth(int n, int c); @ @@ -10974,13 +11275,14 @@ extern void hget_xdimen_node(Xdimen *x); extern void hget_def_node(void); extern void hget_font_def(uint8_t f); extern void hget_content_section(void); -extern uint8_t hget_content_node(void); +extern Tag hget_content_node(void); extern void hget_glue_node(void); extern void hget_rule_node(void); extern void hget_hbox_node(void); extern void hget_vbox_node(void); extern void hget_param_list(List *l); extern int hget_txt(void); +extern int hget_unknown(Tag a); @ @@ -10990,20 +11292,30 @@ backwards. @(hiskip.c@>= #include "hibasetypes.h" +#include <math.h> #include <string.h> +#include <ctype.h> #include <zlib.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include "hierror.h" #include "hiformat.h" +#if 1 +#include "higet.h" +#else @<hint types@>@; +@<directory entry type@>@; +@<shared get macros@>@; +#endif -@<common variables@>@; +@<get macros@>@; +@<write macros@>@; +@<common variables@>@; +@<shared put variables@>@; @<map functions@>@; @<function to check the banner@>@; -@<directory entry type@>@; @<directory functions@>@; @<shared get macros@>@; @<get file functions@>@; @@ -11013,6 +11325,14 @@ backwards. @<shared skip functions@>@; @<skip functions@>@; +@<definition checks@>@; +@<get function declarations@>@; +@<write functions@>@; +@<shared get functions@>@; +@<get functions@>@; + + + #define SKIP #define DESCRIPTION "\n This program tests parsing a binary HINT file in reverse direction.\n" @@ -11023,26 +11343,30 @@ int main(int argc, char *argv[]) @<process the command line@>@; @<open the log file@>@; + hout=NULL; if (!hget_map()) QUIT("Unable to map the input file"); hpos=hstart=hin_addr; hend=hstart+hin_size; hget_banner(); if (!hcheck_banner("hint")) QUIT("Invalid banner"); hget_directory(); + hget_definition_section(); DBG(DBGBASIC,"Skipping Content Section\n"); hteg_content_section(); DBG(DBGBASIC,"Fast forward Content Section\n"); hpos=hstart; while(hpos<hend) { hff_hpos(); - if (KIND(*(hpos-1))==par_kind && KIND(hff_tag)==list_kind && hff_list_size>0) + if (KIND(*(hpos-1))==par_kind && KIND(hff_tag)==list_kind && hff_list_size>0 && !(INFO(hff_tag)&b100)) { uint8_t *p=hpos,*q; - DBG(DBGTAGS,"Fast forward list at 0x%x, size %d",hff_list_pos,hff_list_size); + DBG(DBGTAGS,"Fast forward list at 0x%x, size %d\n",hff_list_pos,hff_list_size); hpos=hstart+hff_list_pos; q=hpos+hff_list_size; while (hpos<q) hff_hpos(); + DBG(DBGTAGS,"Fast forward list end at 0x%x\n",(uint32_t)(hpos-hstart)); hpos=p; + DBG(DBGTAGS,"Continue at 0x%x\n",(uint32_t)(hpos-hstart-1)); } } hget_unmap(); @@ -11057,15 +11381,15 @@ use requirement of \CEE. @<skip function declarations@>= static void hteg_content_node(void); -static void hteg_content(uint8_t z); +static void hteg_content(Tag z); static void hteg_xdimen_node(Xdimen *x); static void hteg_list(List *l); static void hteg_param_list(List *l); -static float32_t hteg_float32(void); static void hteg_rule_node(void); static void hteg_hbox_node(void); static void hteg_vbox_node(void); static void hteg_glue_node(void); +static int hteg_unknown(Tag z); @ \thecodeindex diff --git a/Build/source/texk/web2c/hitexdir/hilexer.c b/Build/source/texk/web2c/hitexdir/hilexer.c index 0170ea5bf80..b0b68275110 100644 --- a/Build/source/texk/web2c/hitexdir/hilexer.c +++ b/Build/source/texk/web2c/hitexdir/hilexer.c @@ -457,8 +457,8 @@ static void yy_fatal_error (yyconst char msg[] ); (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 128 -#define YY_END_OF_BUFFER 129 +#define YY_NUM_RULES 129 +#define YY_END_OF_BUFFER 130 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -466,49 +466,50 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static yyconst flex_int16_t yy_accept[381] = +static yyconst flex_int16_t yy_accept[388] = { 0, - 0, 0, 0, 0, 0, 0, 129, 127, 6, 6, - 43, 47, 10, 127, 116, 127, 4, 4, 1, 2, - 41, 126, 126, 126, 126, 126, 126, 126, 31, 126, - 126, 126, 126, 126, 126, 126, 126, 126, 126, 32, - 126, 126, 40, 14, 15, 13, 11, 74, 74, 58, - 72, 48, 73, 49, 50, 74, 128, 128, 128, 128, - 0, 0, 0, 0, 0, 0, 0, 7, 5, 5, - 9, 9, 0, 0, 0, 4, 126, 126, 126, 126, - 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, - 126, 126, 126, 126, 29, 126, 126, 126, 126, 126, - - 126, 126, 28, 126, 97, 126, 126, 126, 126, 27, - 126, 126, 126, 126, 126, 126, 126, 86, 126, 126, - 126, 126, 126, 12, 0, 58, 58, 0, 59, 55, - 52, 56, 60, 53, 54, 57, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 51, 71, 75, 0, - 0, 20, 20, 16, 0, 0, 0, 5, 0, 9, - 24, 8, 85, 126, 126, 126, 108, 126, 126, 126, - 126, 126, 126, 126, 126, 126, 33, 126, 126, 126, - 126, 126, 126, 126, 126, 126, 37, 126, 126, 126, - 126, 126, 126, 126, 126, 126, 122, 109, 126, 98, - - 126, 126, 95, 126, 126, 126, 102, 126, 126, 126, - 126, 126, 115, 126, 126, 126, 126, 126, 59, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 76, - 0, 18, 17, 21, 0, 0, 0, 0, 0, 126, - 126, 126, 126, 126, 126, 126, 126, 126, 126, 94, - 126, 34, 126, 124, 44, 126, 78, 126, 126, 82, - 126, 101, 42, 126, 126, 114, 126, 126, 110, 96, - 126, 126, 117, 126, 126, 45, 126, 39, 126, 126, - 126, 126, 79, 126, 84, 126, 126, 70, 65, 61, - 66, 69, 63, 64, 62, 68, 67, 77, 19, 22, - - 0, 0, 24, 25, 126, 89, 126, 126, 126, 126, - 126, 87, 26, 126, 126, 35, 113, 3, 126, 81, - 104, 107, 126, 126, 126, 46, 126, 123, 126, 118, - 126, 126, 126, 100, 83, 105, 126, 23, 0, 99, - 126, 90, 103, 126, 126, 126, 91, 106, 126, 126, - 126, 126, 126, 126, 126, 112, 30, 0, 25, 126, - 125, 126, 126, 126, 88, 126, 111, 36, 120, 80, - 92, 126, 126, 38, 93, 126, 119, 126, 121, 0 + 0, 0, 0, 0, 0, 0, 130, 128, 6, 6, + 43, 47, 10, 128, 117, 128, 4, 4, 1, 2, + 41, 127, 127, 127, 127, 127, 127, 127, 31, 127, + 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, + 32, 127, 127, 40, 14, 15, 13, 11, 74, 74, + 58, 72, 48, 73, 49, 50, 74, 129, 129, 129, + 129, 0, 0, 0, 0, 0, 0, 0, 7, 5, + 5, 9, 9, 0, 0, 0, 4, 127, 127, 127, + 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, + 127, 127, 127, 127, 127, 29, 127, 127, 127, 127, + + 127, 127, 127, 28, 127, 97, 127, 127, 127, 127, + 27, 127, 127, 127, 127, 127, 127, 127, 86, 127, + 127, 127, 127, 127, 127, 12, 0, 58, 58, 0, + 59, 55, 52, 56, 60, 53, 54, 57, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 51, 71, + 75, 0, 0, 20, 20, 16, 0, 0, 0, 5, + 0, 9, 24, 8, 85, 127, 127, 127, 108, 127, + 127, 127, 127, 127, 127, 127, 127, 127, 33, 127, + 127, 127, 127, 127, 127, 127, 127, 127, 37, 127, + 127, 127, 127, 127, 127, 127, 127, 127, 123, 109, + + 127, 98, 127, 127, 95, 127, 127, 127, 102, 127, + 127, 127, 127, 127, 116, 127, 127, 127, 127, 127, + 127, 59, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 76, 0, 18, 17, 21, 0, 0, 0, + 0, 0, 127, 127, 127, 127, 127, 127, 127, 127, + 127, 127, 94, 127, 34, 127, 125, 44, 127, 78, + 127, 127, 82, 127, 101, 42, 127, 127, 115, 127, + 127, 110, 96, 127, 127, 118, 127, 127, 45, 127, + 39, 127, 127, 127, 127, 127, 79, 127, 84, 127, + 127, 70, 65, 61, 66, 69, 63, 64, 62, 68, + + 67, 77, 19, 22, 0, 0, 24, 25, 127, 89, + 127, 127, 127, 127, 127, 87, 26, 127, 127, 35, + 114, 3, 127, 81, 104, 107, 127, 127, 127, 46, + 127, 124, 127, 119, 127, 127, 127, 100, 127, 83, + 105, 127, 23, 0, 99, 127, 90, 103, 127, 127, + 127, 91, 106, 127, 127, 127, 127, 127, 127, 127, + 113, 127, 30, 0, 25, 127, 126, 127, 127, 127, + 88, 127, 111, 36, 121, 80, 112, 92, 127, 127, + 38, 93, 127, 120, 127, 122, 0 } ; static yyconst flex_int32_t yy_ec[256] = @@ -554,181 +555,185 @@ static yyconst flex_int32_t yy_meta[66] = 4, 1, 1, 1, 4 } ; -static yyconst flex_int16_t yy_base[386] = +static yyconst flex_int16_t yy_base[393] = { 0, - 0, 0, 65, 130, 194, 258, 638, 639, 639, 639, - 639, 639, 74, 68, 64, 68, 77, 72, 639, 639, - 639, 53, 61, 58, 59, 579, 57, 590, 65, 65, - 0, 596, 81, 74, 100, 106, 107, 69, 108, 108, - 591, 595, 639, 639, 639, 639, 623, 639, 144, 148, - 161, 639, 639, 639, 639, 322, 639, 570, 569, 568, - 619, 618, 617, 564, 563, 562, 111, 639, 639, 151, - 157, 161, 164, 168, 187, 172, 0, 121, 579, 568, - 566, 571, 24, 166, 170, 568, 172, 569, 143, 567, - 572, 579, 574, 577, 557, 571, 557, 183, 573, 159, - - 167, 182, 0, 567, 0, 552, 185, 557, 549, 0, - 555, 545, 555, 563, 556, 546, 561, 546, 546, 559, - 554, 554, 548, 639, 230, 236, 240, 244, 246, 264, - 639, 639, 639, 639, 639, 639, 236, 257, 263, 266, - 269, 272, 276, 279, 282, 285, 639, 639, 639, 529, - 528, 639, 579, 578, 577, 524, 523, 288, 291, 315, - 353, 357, 0, 528, 541, 542, 0, 526, 524, 524, - 534, 522, 536, 535, 536, 537, 525, 517, 515, 529, - 517, 508, 524, 527, 509, 521, 0, 514, 512, 520, - 517, 503, 518, 520, 509, 511, 0, 0, 497, 0, - - 505, 511, 514, 513, 494, 505, 0, 506, 490, 503, - 503, 495, 0, 482, 502, 484, 483, 489, 266, 360, - 367, 370, 373, 378, 381, 391, 399, 402, 405, 639, - 474, 639, 525, 639, 524, 471, 424, 412, 434, 478, - 482, 483, 489, 480, 487, 477, 482, 475, 485, 0, - 471, 455, 446, 0, 0, 454, 0, 453, 449, 0, - 454, 0, 0, 442, 432, 0, 447, 424, 0, 0, - 424, 433, 0, 425, 419, 0, 425, 0, 420, 401, - 419, 414, 0, 400, 0, 402, 404, 639, 639, 639, - 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, - - 428, 294, 639, 444, 382, 0, 391, 381, 383, 379, - 370, 0, 0, 358, 372, 0, 0, 0, 351, 0, - 0, 0, 369, 350, 346, 0, 308, 0, 290, 0, - 291, 298, 288, 0, 0, 0, 286, 639, 457, 0, - 280, 0, 0, 272, 264, 268, 0, 0, 235, 217, - 212, 223, 191, 196, 202, 0, 0, 467, 481, 195, - 0, 186, 176, 132, 0, 131, 0, 0, 0, 0, - 0, 105, 66, 0, 0, 57, 0, 50, 0, 639, - 506, 510, 514, 517, 70 + 0, 0, 65, 130, 194, 258, 644, 645, 645, 645, + 645, 645, 74, 68, 64, 68, 77, 72, 645, 645, + 645, 53, 61, 58, 59, 585, 57, 596, 65, 65, + 0, 602, 81, 74, 100, 106, 107, 69, 108, 592, + 108, 596, 600, 645, 645, 645, 645, 628, 645, 144, + 148, 161, 645, 645, 645, 645, 322, 645, 575, 574, + 573, 624, 623, 622, 569, 568, 567, 111, 645, 645, + 151, 157, 161, 164, 168, 187, 172, 0, 121, 584, + 573, 571, 576, 24, 166, 170, 573, 172, 574, 143, + 572, 577, 584, 579, 582, 562, 576, 562, 183, 578, + + 159, 167, 182, 0, 572, 0, 557, 185, 562, 554, + 0, 560, 550, 560, 568, 561, 551, 566, 551, 555, + 550, 563, 558, 558, 552, 645, 230, 236, 240, 244, + 246, 264, 645, 645, 645, 645, 645, 645, 236, 257, + 263, 266, 269, 272, 276, 279, 282, 285, 645, 645, + 645, 533, 532, 645, 583, 582, 581, 528, 527, 288, + 291, 315, 353, 357, 0, 532, 545, 546, 0, 530, + 528, 528, 538, 526, 540, 539, 540, 541, 529, 521, + 519, 533, 521, 512, 528, 531, 513, 525, 0, 518, + 516, 524, 521, 507, 522, 524, 513, 515, 0, 0, + + 501, 0, 509, 515, 518, 517, 498, 509, 0, 510, + 494, 507, 507, 499, 0, 496, 485, 505, 487, 486, + 492, 266, 360, 367, 370, 373, 378, 381, 391, 399, + 402, 405, 645, 477, 645, 528, 645, 527, 474, 424, + 412, 434, 481, 485, 486, 492, 483, 490, 480, 485, + 478, 488, 0, 476, 477, 468, 0, 0, 477, 0, + 459, 455, 0, 457, 0, 0, 449, 439, 0, 454, + 434, 0, 0, 434, 443, 0, 431, 431, 0, 437, + 0, 429, 411, 429, 424, 406, 0, 409, 0, 411, + 406, 645, 645, 645, 645, 645, 645, 645, 645, 645, + + 645, 645, 645, 645, 435, 294, 645, 444, 389, 0, + 394, 384, 386, 385, 388, 0, 0, 373, 375, 0, + 0, 0, 358, 0, 0, 0, 375, 353, 349, 0, + 354, 0, 347, 0, 307, 305, 293, 0, 280, 0, + 0, 287, 645, 457, 0, 286, 0, 0, 274, 272, + 269, 0, 0, 276, 223, 218, 225, 203, 202, 206, + 0, 192, 0, 467, 481, 195, 0, 186, 176, 132, + 0, 131, 0, 0, 0, 0, 0, 0, 105, 66, + 0, 0, 57, 0, 50, 0, 645, 506, 510, 514, + 517, 70 + } ; -static yyconst flex_int16_t yy_def[386] = +static yyconst flex_int16_t yy_def[393] = { 0, - 380, 1, 381, 381, 382, 382, 380, 380, 380, 380, - 380, 380, 383, 384, 380, 380, 380, 380, 380, 380, - 380, 385, 385, 385, 385, 385, 385, 385, 385, 385, - 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, - 385, 385, 380, 380, 380, 380, 380, 380, 380, 380, - 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, - 380, 380, 380, 380, 380, 380, 384, 380, 380, 380, - 380, 380, 380, 380, 380, 380, 385, 385, 385, 385, - 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, - 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, - - 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, - 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, - 385, 385, 385, 380, 380, 380, 380, 380, 380, 380, - 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, - 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, - 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, - 380, 380, 385, 385, 385, 385, 385, 385, 385, 385, - 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, - 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, - 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, - - 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, - 385, 385, 385, 385, 385, 385, 385, 385, 380, 380, - 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, - 380, 380, 380, 380, 380, 380, 380, 380, 380, 385, - 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, - 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, - 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, - 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, - 385, 385, 385, 385, 385, 385, 385, 380, 380, 380, - 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, - - 380, 380, 380, 380, 385, 385, 385, 385, 385, 385, - 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, - 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, - 385, 385, 385, 385, 385, 385, 385, 380, 380, 385, - 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, - 385, 385, 385, 385, 385, 385, 385, 380, 380, 385, - 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, - 385, 385, 385, 385, 385, 385, 385, 385, 385, 0, - 380, 380, 380, 380, 380 + 387, 1, 388, 388, 389, 389, 387, 387, 387, 387, + 387, 387, 390, 391, 387, 387, 387, 387, 387, 387, + 387, 392, 392, 392, 392, 392, 392, 392, 392, 392, + 392, 392, 392, 392, 392, 392, 392, 392, 392, 392, + 392, 392, 392, 387, 387, 387, 387, 387, 387, 387, + 387, 387, 387, 387, 387, 387, 387, 387, 387, 387, + 387, 387, 387, 387, 387, 387, 387, 391, 387, 387, + 387, 387, 387, 387, 387, 387, 387, 392, 392, 392, + 392, 392, 392, 392, 392, 392, 392, 392, 392, 392, + 392, 392, 392, 392, 392, 392, 392, 392, 392, 392, + + 392, 392, 392, 392, 392, 392, 392, 392, 392, 392, + 392, 392, 392, 392, 392, 392, 392, 392, 392, 392, + 392, 392, 392, 392, 392, 387, 387, 387, 387, 387, + 387, 387, 387, 387, 387, 387, 387, 387, 387, 387, + 387, 387, 387, 387, 387, 387, 387, 387, 387, 387, + 387, 387, 387, 387, 387, 387, 387, 387, 387, 387, + 387, 387, 387, 387, 392, 392, 392, 392, 392, 392, + 392, 392, 392, 392, 392, 392, 392, 392, 392, 392, + 392, 392, 392, 392, 392, 392, 392, 392, 392, 392, + 392, 392, 392, 392, 392, 392, 392, 392, 392, 392, + + 392, 392, 392, 392, 392, 392, 392, 392, 392, 392, + 392, 392, 392, 392, 392, 392, 392, 392, 392, 392, + 392, 387, 387, 387, 387, 387, 387, 387, 387, 387, + 387, 387, 387, 387, 387, 387, 387, 387, 387, 387, + 387, 387, 392, 392, 392, 392, 392, 392, 392, 392, + 392, 392, 392, 392, 392, 392, 392, 392, 392, 392, + 392, 392, 392, 392, 392, 392, 392, 392, 392, 392, + 392, 392, 392, 392, 392, 392, 392, 392, 392, 392, + 392, 392, 392, 392, 392, 392, 392, 392, 392, 392, + 392, 387, 387, 387, 387, 387, 387, 387, 387, 387, + + 387, 387, 387, 387, 387, 387, 387, 387, 392, 392, + 392, 392, 392, 392, 392, 392, 392, 392, 392, 392, + 392, 392, 392, 392, 392, 392, 392, 392, 392, 392, + 392, 392, 392, 392, 392, 392, 392, 392, 392, 392, + 392, 392, 387, 387, 392, 392, 392, 392, 392, 392, + 392, 392, 392, 392, 392, 392, 392, 392, 392, 392, + 392, 392, 392, 387, 387, 392, 392, 392, 392, 392, + 392, 392, 392, 392, 392, 392, 392, 392, 392, 392, + 392, 392, 392, 392, 392, 392, 0, 387, 387, 387, + 387, 387 + } ; -static yyconst flex_int16_t yy_nxt[705] = +static yyconst flex_int16_t yy_nxt[711] = { 0, 8, 9, 10, 9, 9, 11, 12, 8, 13, 14, 8, 15, 16, 16, 8, 17, 18, 18, 19, 20, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 31, 35, 36, - 31, 37, 38, 39, 31, 40, 41, 42, 31, 43, - 8, 8, 8, 8, 8, 44, 44, 45, 44, 169, - 68, 170, 77, 47, 61, 61, 61, 61, 68, 69, - 70, 70, 63, 71, 72, 72, 73, 76, 76, 76, - 78, 73, 74, 74, 74, 80, 82, 84, 79, 87, - - 90, 85, 379, 91, 378, 88, 83, 114, 101, 81, - 115, 94, 95, 68, 92, 98, 102, 93, 96, 99, - 103, 68, 116, 100, 377, 44, 44, 44, 44, 44, - 44, 44, 45, 44, 75, 64, 65, 66, 47, 104, - 107, 111, 117, 119, 108, 125, 126, 105, 125, 127, - 126, 109, 127, 376, 106, 112, 118, 120, 163, 110, - 121, 113, 125, 126, 164, 125, 158, 158, 158, 375, - 374, 73, 74, 74, 74, 73, 160, 160, 160, 161, - 161, 161, 73, 74, 74, 74, 73, 76, 76, 76, - 44, 44, 44, 44, 44, 49, 50, 180, 51, 194, - - 52, 181, 162, 162, 162, 171, 195, 53, 162, 162, - 162, 162, 54, 55, 159, 172, 173, 177, 190, 198, - 196, 174, 175, 178, 197, 202, 56, 373, 372, 199, - 191, 125, 126, 371, 125, 192, 203, 127, 126, 370, - 127, 127, 126, 369, 127, 128, 129, 219, 128, 368, - 219, 220, 220, 220, 57, 58, 59, 60, 57, 49, - 50, 367, 51, 366, 52, 128, 129, 219, 128, 365, - 219, 53, 221, 221, 221, 364, 54, 55, 222, 222, - 222, 223, 223, 223, 224, 224, 224, 225, 225, 225, - 56, 226, 226, 226, 227, 227, 227, 228, 228, 228, - - 229, 229, 229, 158, 158, 158, 237, 237, 237, 303, - 303, 303, 237, 237, 237, 237, 363, 362, 57, 58, - 59, 60, 57, 128, 129, 361, 130, 360, 131, 73, - 160, 160, 160, 357, 356, 132, 355, 133, 133, 354, - 134, 135, 136, 353, 137, 138, 139, 140, 141, 142, - 143, 144, 145, 146, 147, 352, 148, 148, 148, 148, - 148, 148, 148, 148, 148, 148, 148, 148, 161, 161, - 161, 239, 162, 162, 162, 220, 220, 220, 162, 162, - 162, 162, 221, 221, 221, 222, 222, 222, 223, 223, - 223, 238, 288, 224, 224, 224, 225, 225, 225, 289, - - 351, 350, 290, 349, 348, 291, 226, 226, 226, 347, - 292, 346, 345, 293, 227, 227, 227, 228, 228, 228, - 229, 229, 229, 294, 302, 302, 344, 303, 303, 303, - 343, 295, 342, 341, 296, 340, 338, 297, 239, 237, - 237, 237, 337, 336, 335, 237, 237, 237, 237, 304, - 304, 304, 334, 333, 332, 304, 304, 304, 304, 304, - 304, 304, 331, 330, 329, 304, 304, 304, 304, 358, - 358, 328, 359, 359, 359, 327, 326, 325, 359, 359, - 359, 359, 359, 359, 359, 324, 323, 322, 359, 359, - 359, 359, 321, 320, 319, 318, 359, 359, 359, 317, - - 316, 339, 359, 359, 359, 359, 46, 46, 46, 46, - 48, 48, 48, 48, 62, 62, 62, 67, 315, 67, - 67, 314, 313, 312, 311, 310, 309, 308, 307, 306, - 305, 301, 300, 299, 298, 287, 286, 285, 284, 283, - 282, 281, 280, 279, 278, 277, 276, 275, 274, 273, - 272, 271, 270, 269, 268, 267, 266, 265, 264, 263, - 262, 261, 260, 259, 258, 257, 256, 255, 254, 253, - 252, 251, 250, 249, 248, 247, 246, 245, 244, 243, - 242, 241, 240, 236, 235, 234, 233, 232, 231, 230, - 218, 217, 216, 215, 214, 213, 212, 211, 210, 209, - - 208, 207, 206, 205, 204, 201, 200, 193, 189, 188, - 187, 186, 185, 184, 183, 182, 179, 176, 168, 167, - 166, 165, 157, 156, 155, 154, 153, 152, 151, 150, - 149, 124, 123, 122, 97, 89, 86, 380, 7, 380, - 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, - 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, - 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, - 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, - 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, - 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, - - 380, 380, 380, 380 + 31, 37, 38, 39, 40, 41, 42, 43, 31, 44, + 8, 8, 8, 8, 8, 45, 45, 46, 45, 171, + 69, 172, 78, 48, 62, 62, 62, 62, 69, 70, + 71, 71, 64, 72, 73, 73, 74, 77, 77, 77, + 79, 74, 75, 75, 75, 81, 83, 85, 80, 88, + + 91, 86, 386, 92, 385, 89, 84, 115, 102, 82, + 116, 95, 96, 69, 93, 99, 103, 94, 97, 100, + 104, 69, 117, 101, 384, 45, 45, 45, 45, 45, + 45, 45, 46, 45, 76, 65, 66, 67, 48, 105, + 108, 112, 118, 121, 109, 127, 128, 106, 127, 129, + 128, 110, 129, 383, 107, 113, 119, 122, 165, 111, + 123, 114, 127, 128, 166, 127, 160, 160, 160, 382, + 381, 74, 75, 75, 75, 74, 162, 162, 162, 163, + 163, 163, 74, 75, 75, 75, 74, 77, 77, 77, + 45, 45, 45, 45, 45, 50, 51, 182, 52, 196, + + 53, 183, 164, 164, 164, 173, 197, 54, 164, 164, + 164, 164, 55, 56, 161, 174, 175, 179, 192, 200, + 198, 176, 177, 180, 199, 204, 57, 380, 379, 201, + 193, 127, 128, 378, 127, 194, 205, 129, 128, 377, + 129, 129, 128, 376, 129, 130, 131, 222, 130, 375, + 222, 223, 223, 223, 58, 59, 60, 61, 58, 50, + 51, 374, 52, 373, 53, 130, 131, 222, 130, 372, + 222, 54, 224, 224, 224, 371, 55, 56, 225, 225, + 225, 226, 226, 226, 227, 227, 227, 228, 228, 228, + 57, 229, 229, 229, 230, 230, 230, 231, 231, 231, + + 232, 232, 232, 160, 160, 160, 240, 240, 240, 307, + 307, 307, 240, 240, 240, 240, 370, 369, 58, 59, + 60, 61, 58, 130, 131, 368, 132, 367, 133, 74, + 162, 162, 162, 366, 363, 134, 362, 135, 135, 361, + 136, 137, 138, 360, 139, 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, 359, 150, 150, 150, 150, + 150, 150, 150, 150, 150, 150, 150, 150, 163, 163, + 163, 242, 164, 164, 164, 223, 223, 223, 164, 164, + 164, 164, 224, 224, 224, 225, 225, 225, 226, 226, + 226, 241, 292, 227, 227, 227, 228, 228, 228, 293, + + 358, 357, 294, 356, 355, 295, 229, 229, 229, 354, + 296, 353, 352, 297, 230, 230, 230, 231, 231, 231, + 232, 232, 232, 298, 306, 306, 351, 307, 307, 307, + 350, 299, 349, 348, 300, 347, 346, 301, 242, 240, + 240, 240, 345, 343, 342, 240, 240, 240, 240, 308, + 308, 308, 341, 340, 339, 308, 308, 308, 308, 308, + 308, 308, 338, 337, 336, 308, 308, 308, 308, 364, + 364, 335, 365, 365, 365, 334, 333, 332, 365, 365, + 365, 365, 365, 365, 365, 331, 330, 329, 365, 365, + 365, 365, 328, 327, 326, 325, 365, 365, 365, 324, + + 323, 344, 365, 365, 365, 365, 47, 47, 47, 47, + 49, 49, 49, 49, 63, 63, 63, 68, 322, 68, + 68, 321, 320, 319, 318, 317, 316, 315, 314, 313, + 312, 311, 310, 309, 305, 304, 303, 302, 291, 290, + 289, 288, 287, 286, 285, 284, 283, 282, 281, 280, + 279, 278, 277, 276, 275, 274, 273, 272, 271, 270, + 269, 268, 267, 266, 265, 264, 263, 262, 261, 260, + 259, 258, 257, 256, 255, 254, 253, 252, 251, 250, + 249, 248, 247, 246, 245, 244, 243, 239, 238, 237, + 236, 235, 234, 233, 221, 220, 219, 218, 217, 216, + + 215, 214, 213, 212, 211, 210, 209, 208, 207, 206, + 203, 202, 195, 191, 190, 189, 188, 187, 186, 185, + 184, 181, 178, 170, 169, 168, 167, 159, 158, 157, + 156, 155, 154, 153, 152, 151, 126, 125, 124, 120, + 98, 90, 87, 387, 7, 387, 387, 387, 387, 387, + 387, 387, 387, 387, 387, 387, 387, 387, 387, 387, + 387, 387, 387, 387, 387, 387, 387, 387, 387, 387, + 387, 387, 387, 387, 387, 387, 387, 387, 387, 387, + 387, 387, 387, 387, 387, 387, 387, 387, 387, 387, + 387, 387, 387, 387, 387, 387, 387, 387, 387, 387, + + 387, 387, 387, 387, 387, 387, 387, 387, 387, 387 } ; -static yyconst flex_int16_t yy_chk[705] = +static yyconst flex_int16_t yy_chk[711] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -736,82 +741,82 @@ static yyconst flex_int16_t yy_chk[705] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 3, 3, 3, 3, 83, - 14, 83, 385, 3, 13, 13, 13, 13, 14, 15, + 1, 1, 1, 1, 1, 3, 3, 3, 3, 84, + 14, 84, 392, 3, 13, 13, 13, 13, 14, 15, 15, 15, 13, 16, 16, 16, 18, 18, 18, 18, 22, 17, 17, 17, 17, 23, 24, 25, 22, 27, - 29, 25, 378, 29, 376, 27, 24, 38, 34, 23, - 38, 30, 30, 67, 29, 33, 34, 29, 30, 33, - 34, 67, 38, 33, 373, 3, 3, 3, 3, 3, + 29, 25, 385, 29, 383, 27, 24, 38, 34, 23, + 38, 30, 30, 68, 29, 33, 34, 29, 30, 33, + 34, 68, 38, 33, 380, 3, 3, 3, 3, 3, 4, 4, 4, 4, 17, 13, 13, 13, 4, 35, - 36, 37, 39, 40, 36, 49, 49, 35, 49, 50, - 50, 36, 50, 372, 35, 37, 39, 40, 78, 36, - 40, 37, 51, 51, 78, 51, 70, 70, 70, 366, - 364, 71, 71, 71, 71, 72, 72, 72, 72, 73, - 73, 73, 74, 74, 74, 74, 76, 76, 76, 76, - 4, 4, 4, 4, 4, 5, 5, 89, 5, 100, - - 5, 89, 75, 75, 75, 84, 100, 5, 75, 75, - 75, 75, 5, 5, 71, 84, 85, 87, 98, 102, - 101, 85, 85, 87, 101, 107, 5, 363, 362, 102, - 98, 125, 125, 360, 125, 98, 107, 126, 126, 355, - 126, 127, 127, 354, 127, 128, 128, 129, 128, 353, - 129, 137, 137, 137, 5, 5, 5, 5, 5, 6, - 6, 352, 6, 351, 6, 130, 130, 219, 130, 350, - 219, 6, 138, 138, 138, 349, 6, 6, 139, 139, - 139, 140, 140, 140, 141, 141, 141, 142, 142, 142, - 6, 143, 143, 143, 144, 144, 144, 145, 145, 145, - - 146, 146, 146, 158, 158, 158, 159, 159, 159, 302, - 302, 302, 159, 159, 159, 159, 346, 345, 6, 6, - 6, 6, 6, 56, 56, 344, 56, 341, 56, 160, - 160, 160, 160, 337, 333, 56, 332, 56, 56, 331, - 56, 56, 56, 329, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 327, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, 161, 161, - 161, 162, 162, 162, 162, 220, 220, 220, 162, 162, - 162, 162, 221, 221, 221, 222, 222, 222, 223, 223, - 223, 161, 220, 224, 224, 224, 225, 225, 225, 221, - - 325, 324, 222, 323, 319, 223, 226, 226, 226, 315, - 224, 314, 311, 225, 227, 227, 227, 228, 228, 228, - 229, 229, 229, 226, 238, 238, 310, 238, 238, 238, - 309, 227, 308, 307, 228, 305, 301, 229, 237, 237, - 237, 237, 287, 286, 284, 237, 237, 237, 237, 239, - 239, 239, 282, 281, 280, 239, 239, 239, 239, 304, - 304, 304, 279, 277, 275, 304, 304, 304, 304, 339, - 339, 274, 339, 339, 339, 272, 271, 268, 339, 339, - 339, 339, 358, 358, 358, 267, 265, 264, 358, 358, - 358, 358, 261, 259, 258, 256, 359, 359, 359, 253, - - 252, 304, 359, 359, 359, 359, 381, 381, 381, 381, - 382, 382, 382, 382, 383, 383, 383, 384, 251, 384, - 384, 249, 248, 247, 246, 245, 244, 243, 242, 241, - 240, 236, 235, 233, 231, 218, 217, 216, 215, 214, - 212, 211, 210, 209, 208, 206, 205, 204, 203, 202, - 201, 199, 196, 195, 194, 193, 192, 191, 190, 189, - 188, 186, 185, 184, 183, 182, 181, 180, 179, 178, - 177, 176, 175, 174, 173, 172, 171, 170, 169, 168, - 166, 165, 164, 157, 156, 155, 154, 153, 151, 150, - 123, 122, 121, 120, 119, 118, 117, 116, 115, 114, - - 113, 112, 111, 109, 108, 106, 104, 99, 97, 96, - 95, 94, 93, 92, 91, 90, 88, 86, 82, 81, - 80, 79, 66, 65, 64, 63, 62, 61, 60, 59, - 58, 47, 42, 41, 32, 28, 26, 7, 380, 380, - 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, - 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, - 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, - 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, - 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, - 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, - - 380, 380, 380, 380 + 36, 37, 39, 41, 36, 50, 50, 35, 50, 51, + 51, 36, 51, 379, 35, 37, 39, 41, 79, 36, + 41, 37, 52, 52, 79, 52, 71, 71, 71, 372, + 370, 72, 72, 72, 72, 73, 73, 73, 73, 74, + 74, 74, 75, 75, 75, 75, 77, 77, 77, 77, + 4, 4, 4, 4, 4, 5, 5, 90, 5, 101, + + 5, 90, 76, 76, 76, 85, 101, 5, 76, 76, + 76, 76, 5, 5, 72, 85, 86, 88, 99, 103, + 102, 86, 86, 88, 102, 108, 5, 369, 368, 103, + 99, 127, 127, 366, 127, 99, 108, 128, 128, 362, + 128, 129, 129, 360, 129, 130, 130, 131, 130, 359, + 131, 139, 139, 139, 5, 5, 5, 5, 5, 6, + 6, 358, 6, 357, 6, 132, 132, 222, 132, 356, + 222, 6, 140, 140, 140, 355, 6, 6, 141, 141, + 141, 142, 142, 142, 143, 143, 143, 144, 144, 144, + 6, 145, 145, 145, 146, 146, 146, 147, 147, 147, + + 148, 148, 148, 160, 160, 160, 161, 161, 161, 306, + 306, 306, 161, 161, 161, 161, 354, 351, 6, 6, + 6, 6, 6, 57, 57, 350, 57, 349, 57, 162, + 162, 162, 162, 346, 342, 57, 339, 57, 57, 337, + 57, 57, 57, 336, 57, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 335, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, 163, 163, + 163, 164, 164, 164, 164, 223, 223, 223, 164, 164, + 164, 164, 224, 224, 224, 225, 225, 225, 226, 226, + 226, 163, 223, 227, 227, 227, 228, 228, 228, 224, + + 333, 331, 225, 329, 328, 226, 229, 229, 229, 327, + 227, 323, 319, 228, 230, 230, 230, 231, 231, 231, + 232, 232, 232, 229, 241, 241, 318, 241, 241, 241, + 315, 230, 314, 313, 231, 312, 311, 232, 240, 240, + 240, 240, 309, 305, 291, 240, 240, 240, 240, 242, + 242, 242, 290, 288, 286, 242, 242, 242, 242, 308, + 308, 308, 285, 284, 283, 308, 308, 308, 308, 344, + 344, 282, 344, 344, 344, 280, 278, 277, 344, 344, + 344, 344, 364, 364, 364, 275, 274, 271, 364, 364, + 364, 364, 270, 268, 267, 264, 365, 365, 365, 262, + + 261, 308, 365, 365, 365, 365, 388, 388, 388, 388, + 389, 389, 389, 389, 390, 390, 390, 391, 259, 391, + 391, 256, 255, 254, 252, 251, 250, 249, 248, 247, + 246, 245, 244, 243, 239, 238, 236, 234, 221, 220, + 219, 218, 217, 216, 214, 213, 212, 211, 210, 208, + 207, 206, 205, 204, 203, 201, 198, 197, 196, 195, + 194, 193, 192, 191, 190, 188, 187, 186, 185, 184, + 183, 182, 181, 180, 179, 178, 177, 176, 175, 174, + 173, 172, 171, 170, 168, 167, 166, 159, 158, 157, + 156, 155, 153, 152, 125, 124, 123, 122, 121, 120, + + 119, 118, 117, 116, 115, 114, 113, 112, 110, 109, + 107, 105, 100, 98, 97, 96, 95, 94, 93, 92, + 91, 89, 87, 83, 82, 81, 80, 67, 66, 65, + 64, 63, 62, 61, 60, 59, 48, 43, 42, 40, + 32, 28, 26, 7, 387, 387, 387, 387, 387, 387, + 387, 387, 387, 387, 387, 387, 387, 387, 387, 387, + 387, 387, 387, 387, 387, 387, 387, 387, 387, 387, + 387, 387, 387, 387, 387, 387, 387, 387, 387, 387, + 387, 387, 387, 387, 387, 387, 387, 387, 387, 387, + 387, 387, 387, 387, 387, 387, 387, 387, 387, 387, + + 387, 387, 387, 387, 387, 387, 387, 387, 387, 387 } ; /* Table of booleans, true if rule could match eol. */ -static yyconst flex_int32_t yy_rule_can_match_eol[129] = +static yyconst flex_int32_t yy_rule_can_match_eol[130] = { 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, @@ -819,7 +824,7 @@ static yyconst flex_int32_t yy_rule_can_match_eol[129] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, }; + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; static yy_state_type yy_last_accepting_state; static char *yy_last_accepting_cpos; @@ -827,7 +832,7 @@ static char *yy_last_accepting_cpos; extern int yy_flex_debug; int yy_flex_debug = 1; -static yyconst flex_int16_t yy_rule_linenum[128] = +static yyconst flex_int16_t yy_rule_linenum[129] = { 0, 170, 171, 172, 173, 174, 175, 176, 178, 180, 182, 184, 185, 186, 187, 188, 193, 194, 195, 196, 197, @@ -841,8 +846,8 @@ static yyconst flex_int16_t yy_rule_linenum[128] = 294, 296, 298, 300, 302, 304, 306, 307, 309, 311, 312, 313, 314, 316, 317, 318, 320, 321, 322, 324, - 326, 328, 329, 330, 331, 332, 334, 336, 338, 339, - 341, 343, 345, 347, 349, 351, 352 + 326, 328, 330, 331, 332, 333, 334, 336, 338, 340, + 341, 343, 345, 347, 349, 351, 353, 354 } ; /* The intent behind this definition is that it'll catch @@ -854,32 +859,32 @@ static yyconst flex_int16_t yy_rule_linenum[128] = #define YY_RESTORE_YY_MORE_OFFSET char *yytext; #line 1 "lexer.l" -/*519:*/ +/*533:*/ #line 3 "lexer.l" - #line 10739 "format.w" + #line 11040 "format.w" #include "hibasetypes.h" #include "hierror.h" #include "hiformat.h" #include "hiput.h" - /*433:*/ + /*445:*/ #ifdef DEBUG #define YYDEBUG 1 extern int yydebug; #else #define YYDEBUG 0 #endif - /*:433*/ + /*:445*/ #include "hiparser.h" - /*22:*/ + /*23:*/ #define SCAN_UDEC(S) yylval.u= strtoul(S,NULL,10) - /*:22*/ /*25:*/ + /*:23*/ /*26:*/ #define SCAN_HEX(S) yylval.u= strtoul(S,NULL,16) - /*:25*/ /*28:*/ + /*:26*/ /*29:*/ #define SCAN_DEC(S) yylval.i= strtol(S,NULL,10) - /*:28*/ /*31:*/ + /*:29*/ /*32:*/ #define MAX_STR (1<<10) static char str_buffer[MAX_STR]; static int str_length; @@ -888,42 +893,42 @@ static int str_length; #define STR_ADD(C) STR_PUT(C);RNG("String length",str_length,0,MAX_STR-1) #define STR_END str_buffer[str_length]= 0 #define SCAN_STR yylval.s= str_buffer - /*:31*/ /*40:*/ + /*:32*/ /*41:*/ #define SCAN_UTF8_1(S) yylval.u= ((S)[0]&0x7F) - /*:40*/ /*42:*/ + /*:41*/ /*43:*/ #define SCAN_UTF8_2(S) yylval.u= (((S)[0]&0x1F)<<6)+((S)[1]&0x3F) - /*:42*/ /*44:*/ + /*:43*/ /*45:*/ #define SCAN_UTF8_3(S) yylval.u= (((S)[0]&0x0F)<<12)+(((S)[1]&0x3F)<<6)+((S)[2]&0x3F) - /*:44*/ /*46:*/ + /*:45*/ /*47:*/ #define SCAN_UTF8_4(S) yylval.u= (((S)[0]&0x03)<<18)+(((S)[1]&0x3F)<<12)+(((S)[2]&0x3F)<<6)+((S)[3]&0x3F) - /*:46*/ /*57:*/ + /*:47*/ /*58:*/ #define SCAN_DECFLOAT yylval.f= atof(yytext) - /*:57*/ /*60:*/ + /*:58*/ /*61:*/ #define SCAN_HEXFLOAT yylval.f= xtof(yytext) - /*:60*/ /*152:*/ + /*:61*/ /*153:*/ #define SCAN_REF(K) yylval.rf.k= K; yylval.rf.n= atoi(yytext+2) static int scan_level= 0; #define SCAN_START yy_push_state(INITIAL);if (1==scan_level++) hpos0= hpos; #define SCAN_END if (scan_level--) yy_pop_state(); else QUIT("Too many '>' in line %d",yylineno) #define SCAN_TXT_START BEGIN(TXT) #define SCAN_TXT_END BEGIN(INITIAL) - /*:152*/ - /*61:*/ + /*:153*/ + /*62:*/ float64_t xtof(char*x) { - #line 1380 "format.w" + #line 1388 "format.w" int sign,digits,exp; uint64_t mantissa= 0; DBG(DBGFLOAT,"converting %s:\n",x); - /*62:*/ + /*63:*/ if(*x=='-'){sign= -1;x++;} else if(*x=='+'){sign= +1;x++;} else sign= +1; DBG(DBGFLOAT,"\tsign=%d\n",sign); - /*:62*/ + /*:63*/ x= x+2; - /*63:*/ + /*64:*/ digits= 0; while(*x=='0')x++; while(*x!='.') @@ -944,8 +949,8 @@ float64_t xtof(char*x) digits++; } DBG(DBGFLOAT,"\tdigits=%d mantissa=0x%"PRIx64", exp=%d\n",digits,mantissa,exp); - /*:63*/ - /*64:*/ + /*:64*/ + /*65:*/ if(mantissa==0)return 0.0; {int s; s= digits-DBL_M_BITS/4; @@ -960,8 +965,8 @@ float64_t xtof(char*x) mantissa= mantissa&~((uint64_t)1<<DBL_M_BITS); DBG(DBGFLOAT,"\tdigits=%d mantissa=0x%"PRIx64", exp=%d\n",digits,mantissa,exp); } - /*:64*/ - /*65:*/ + /*:65*/ + /*66:*/ if(*x=='x') {int s; x++; @@ -978,8 +983,8 @@ float64_t xtof(char*x) } } RNG("Floating point exponent",exp,-DBL_EXCESS,DBL_EXCESS); - /*:65*/ - /*66:*/ + /*:66*/ + /*67:*/ {union{float64_t d;uint64_t bits;}u; if(sign<0)sign= 1;else sign= 0; exp= exp+DBL_EXCESS; @@ -988,11 +993,11 @@ float64_t xtof(char*x) DBG(DBGFLOAT," return %f\n",u.d); return u.d; } - /*:66*/ + /*:67*/ } - /*:61*/ + /*:62*/ int yywrap(void){ - #line 10750 "format.w" + #line 11051 "format.w" return 1;} #ifdef _MSC_VER #pragma warning( disable : 4267) @@ -1000,17 +1005,17 @@ int yywrap(void){ #define YY_NO_UNISTD_H 1 #define YY_NO_INPUT 1 -/*23:*/ -/*:23*/ /*32:*/ +/*24:*/ +/*:24*/ /*33:*/ -/*:32*/ /*39:*/ -/*:39*/ /*41:*/ -/*:41*/ /*43:*/ -/*:43*/ /*45:*/ -/*:45*/ /*149:*/ +/*:33*/ /*40:*/ +/*:40*/ /*42:*/ +/*:42*/ /*44:*/ +/*:44*/ /*46:*/ +/*:46*/ /*150:*/ -/*:149*/ -#line 1014 "lexer.c" +/*:150*/ +#line 1019 "lexer.c" #define INITIAL 0 #define STR 1 @@ -1264,7 +1269,7 @@ YY_DECL /*3:*/ -#line 1268 "lexer.c" +#line 1273 "lexer.c" if ( !(yy_init) ) { @@ -1327,13 +1332,13 @@ yy_match: while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 381 ) + if ( yy_current_state >= 388 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } - while ( yy_current_state != 380 ); + while ( yy_current_state != 387 ); yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); @@ -1362,13 +1367,13 @@ do_action: /* This label is used only to access EOF actions. */ { if ( yy_act == 0 ) fprintf( stderr, "--scanner backing up\n" ); - else if ( yy_act < 128 ) + else if ( yy_act < 129 ) fprintf( stderr, "--accepting rule at line %ld (\"%s\")\n", (long)yy_rule_linenum[yy_act], yytext ); - else if ( yy_act == 128 ) + else if ( yy_act == 129 ) fprintf( stderr, "--accepting default rule (\"%s\")\n", yytext ); - else if ( yy_act == 129 ) + else if ( yy_act == 130 ) fprintf( stderr, "--(end of buffer or a NUL)\n" ); else fprintf( stderr, "--EOF (start condition %d)\n", YY_START ); @@ -1421,19 +1426,19 @@ YY_RULE_SETUP #line 176 "lexer.l" ; YY_BREAK -/*:3*/ /*24:*/ +/*:3*/ /*25:*/ case 8: YY_RULE_SETUP #line 178 "lexer.l" SCAN_HEX(yytext+2);return UNSIGNED; YY_BREAK -/*:24*/ /*27:*/ +/*:25*/ /*28:*/ case 9: YY_RULE_SETUP #line 180 "lexer.l" SCAN_DEC(yytext);return SIGNED; YY_BREAK -/*:27*/ /*34:*/ +/*:28*/ /*35:*/ case 10: YY_RULE_SETUP #line 182 "lexer.l" @@ -1467,7 +1472,7 @@ YY_RULE_SETUP QUIT("Unterminated String in line %d",yylineno); YY_BREAK -/*:34*/ /*48:*/ +/*:35*/ /*49:*/ case 16: YY_RULE_SETUP #line 193 "lexer.l" @@ -1509,19 +1514,19 @@ YY_RULE_SETUP #line 200 "lexer.l" SCAN_UTF8_4(yytext+1);return CHARCODE; YY_BREAK -/*:48*/ /*55:*/ +/*:49*/ /*56:*/ case 24: YY_RULE_SETUP #line 202 "lexer.l" SCAN_DECFLOAT;return FPNUM; YY_BREAK -/*:55*/ /*59:*/ +/*:56*/ /*60:*/ case 25: YY_RULE_SETUP #line 204 "lexer.l" SCAN_HEXFLOAT;return FPNUM; YY_BREAK -/*:59*/ /*80:*/ +/*:60*/ /*81:*/ case 26: YY_RULE_SETUP #line 206 "lexer.l" @@ -1542,7 +1547,7 @@ YY_RULE_SETUP #line 209 "lexer.l" return INCH; YY_BREAK -/*:80*/ /*88:*/ +/*:81*/ /*89:*/ case 30: YY_RULE_SETUP #line 211 "lexer.l" @@ -1558,7 +1563,7 @@ YY_RULE_SETUP #line 213 "lexer.l" return V; YY_BREAK -/*:88*/ /*99:*/ +/*:89*/ /*100:*/ case 33: YY_RULE_SETUP #line 215 "lexer.l" @@ -1574,7 +1579,7 @@ YY_RULE_SETUP #line 217 "lexer.l" return FILLL; YY_BREAK -/*:99*/ /*103:*/ +/*:100*/ /*104:*/ case 36: YY_RULE_SETUP #line 219 "lexer.l" @@ -1585,13 +1590,13 @@ YY_RULE_SETUP #line 220 "lexer.l" return INTEGER; YY_BREAK -/*:103*/ /*109:*/ +/*:104*/ /*110:*/ case 38: YY_RULE_SETUP #line 222 "lexer.l" return LANGUAGE; YY_BREAK -/*:109*/ /*115:*/ +/*:110*/ /*116:*/ case 39: YY_RULE_SETUP #line 224 "lexer.l" @@ -1607,7 +1612,7 @@ YY_RULE_SETUP #line 226 "lexer.l" return RUNNING; YY_BREAK -/*:115*/ /*124:*/ +/*:116*/ /*125:*/ case 42: YY_RULE_SETUP #line 228 "lexer.l" @@ -1618,7 +1623,7 @@ YY_RULE_SETUP #line 229 "lexer.l" return EXPLICIT; YY_BREAK -/*:124*/ /*133:*/ +/*:125*/ /*134:*/ case 44: YY_RULE_SETUP #line 231 "lexer.l" @@ -1634,7 +1639,7 @@ YY_RULE_SETUP #line 233 "lexer.l" return MINUS; YY_BREAK -/*:133*/ /*151:*/ +/*:134*/ /*152:*/ case 47: YY_RULE_SETUP #line 235 "lexer.l" @@ -1795,7 +1800,7 @@ YY_RULE_SETUP SCAN_UTF8_4(yytext);return TXT_CC; YY_BREAK -/*:151*/ /*162:*/ +/*:152*/ /*162:*/ case 78: YY_RULE_SETUP #line 279 "lexer.l" @@ -1984,98 +1989,104 @@ return OUTLINE; case 112: YY_RULE_SETUP #line 328 "lexer.l" -if(section_no==1)return STREAMDEF;else return STREAM; +return UNKNOWN; YY_BREAK +/*:286*/ /*295:*/ case 113: YY_RULE_SETUP -#line 329 "lexer.l" -return FIRST; +#line 330 "lexer.l" +if(section_no==1)return STREAMDEF;else return STREAM; YY_BREAK case 114: YY_RULE_SETUP -#line 330 "lexer.l" -return LAST; +#line 331 "lexer.l" +return FIRST; YY_BREAK case 115: YY_RULE_SETUP -#line 331 "lexer.l" -return TOP; +#line 332 "lexer.l" +return LAST; YY_BREAK case 116: YY_RULE_SETUP -#line 332 "lexer.l" -return NOREFERENCE; +#line 333 "lexer.l" +return TOP; YY_BREAK -/*:286*/ /*296:*/ case 117: YY_RULE_SETUP #line 334 "lexer.l" -return PAGE; +return NOREFERENCE; YY_BREAK -/*:296*/ /*304:*/ +/*:295*/ /*305:*/ case 118: YY_RULE_SETUP #line 336 "lexer.l" -return RANGE; +return PAGE; YY_BREAK -/*:304*/ /*331:*/ +/*:305*/ /*313:*/ case 119: YY_RULE_SETUP #line 338 "lexer.l" -return DIRECTORY; +return RANGE; YY_BREAK +/*:313*/ /*340:*/ case 120: YY_RULE_SETUP -#line 339 "lexer.l" -return SECTION; +#line 340 "lexer.l" +return DIRECTORY; YY_BREAK -/*:331*/ /*352:*/ case 121: YY_RULE_SETUP #line 341 "lexer.l" -return DEFINITIONS; +return SECTION; YY_BREAK -/*:352*/ /*360:*/ +/*:340*/ /*361:*/ case 122: YY_RULE_SETUP #line 343 "lexer.l" -return MAX; +return DEFINITIONS; YY_BREAK -/*:360*/ /*375:*/ +/*:361*/ /*369:*/ case 123: YY_RULE_SETUP #line 345 "lexer.l" -return PARAM; +return MAX; YY_BREAK -/*:375*/ /*384:*/ +/*:369*/ /*384:*/ case 124: YY_RULE_SETUP #line 347 "lexer.l" -return FONT; +return PARAM; YY_BREAK -/*:384*/ /*412:*/ +/*:384*/ /*393:*/ case 125: YY_RULE_SETUP #line 349 "lexer.l" -return CONTENT; +return FONT; YY_BREAK -/*:412*/ +/*:393*/ /*424:*/ case 126: YY_RULE_SETUP #line 351 "lexer.l" -QUIT("Unexpected keyword '%s' in line %d",yytext,yylineno); +return CONTENT; YY_BREAK +/*:424*/ case 127: YY_RULE_SETUP -#line 352 "lexer.l" -QUIT("Unexpected character '%c' (0x%02X) in line %d",yytext[0]>' '?yytext[0]:' ',yytext[0],yylineno); +#line 353 "lexer.l" +QUIT("Unexpected keyword '%s' in line %d",yytext,yylineno); YY_BREAK case 128: YY_RULE_SETUP #line 354 "lexer.l" +QUIT("Unexpected character '%c' (0x%02X) in line %d",yytext[0]>' '?yytext[0]:' ',yytext[0],yylineno); + YY_BREAK +case 129: +YY_RULE_SETUP +#line 356 "lexer.l" ECHO; YY_BREAK -#line 2079 "lexer.c" +#line 2090 "lexer.c" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(STR): case YY_STATE_EOF(TXT): @@ -2391,7 +2402,7 @@ static int yy_get_next_buffer (void) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 381 ) + if ( yy_current_state >= 388 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; @@ -2424,11 +2435,11 @@ static int yy_get_next_buffer (void) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 381 ) + if ( yy_current_state >= 388 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 380); + yy_is_jam = (yy_current_state == 387); return yy_is_jam ? 0 : yy_current_state; } @@ -3214,8 +3225,8 @@ void yyfree (void * ptr ) /* %ok-for-header */ -#line 354 "lexer.l" +#line 356 "lexer.l" - /*:519*/ + /*:533*/ diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/basetypes.h b/Build/source/texk/web2c/hitexdir/hintview/src/basetypes.h index aa68595b616..e097d2515e0 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 @@ - /*511:*/ - #line 10416 "format.w" + /*525:*/ + #line 10706 "format.w" #ifndef __BASETYPES_H__ #define __BASETYPES_H__ @@ -41,7 +41,10 @@ typedef double float64_t; #if __SIZEOF_DOUBLE__!=8 #error float64 type must have size 8 #endif -#define HINT_VERSION 1 -#define HINT_SUB_VERSION 4 +#define HINT_VERSION 2 +#define HINT_SUB_VERSION 0 +#define AS_STR(X) #X +#define VERSION_AS_STR(X,Y) AS_STR(X) "." AS_STR(Y) +#define HINT_VERSION_STRING VERSION_AS_STR(HINT_VERSION, HINT_SUB_VERSION) #endif - /*:511*/ + /*:525*/ diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/error.h b/Build/source/texk/web2c/hitexdir/hintview/src/error.h index 54ef0070091..dbbd7a1f069 100644 --- a/Build/source/texk/web2c/hitexdir/hintview/src/error.h +++ b/Build/source/texk/web2c/hitexdir/hintview/src/error.h @@ -1,26 +1,26 @@ -/*359:*/ -#line 7180 "hint.w" +/*368:*/ +#line 7247 "hint.w" #ifndef _ERROR_H #define _ERROR_H #include <stdlib.h> #include <stdio.h> #include <setjmp.h> -#define MAX_HERROR 1024 -extern char herror_string[MAX_HERROR]; +#define MAX_HINT_ERROR 1024 +extern char hint_error_string[MAX_HINT_ERROR]; extern FILE*hlog; extern void hint_end(void); -extern jmp_buf error_exit; +extern jmp_buf hint_error_exit; #ifdef _MSC_VER #define snprintf(S,N,F,...) _snprintf(S,N,F,__VA_ARGS__) #ifndef _CONSOLE #pragma warning(disable : 4996) -extern void hmessage(char*title,char*format,...); -#define MESSAGE(...) hmessage("HINT",__VA_ARGS__) +extern void hint_message(char*title,char*format,...); +#define MESSAGE(...) hint_message("HINT",__VA_ARGS__) -extern int herror(char*title,char*msg); -#define ERROR_MESSAGE herror("HINT ERROR",herror_string) +extern int hint_error(char*title,char*msg); +#define ERROR_MESSAGE hint_error("HINT ERROR",hint_error_string) #endif #endif @@ -29,7 +29,7 @@ extern int herror(char*title,char*msg); #define LOG(...) __android_log_print(ANDROID_LOG_DEBUG,__FILE__,__VA_ARGS__) #define MESSAGE(...) __android_log_print(ANDROID_LOG_INFO,__FILE__, __VA_ARGS__) -#define ERROR_MESSAGE __android_log_print(ANDROID_LOG_ERROR,__FILE__,"ERROR: %s\n", herror_string) +#define ERROR_MESSAGE __android_log_print(ANDROID_LOG_ERROR,__FILE__,"ERROR: %s\n", hint_error_string) #endif @@ -42,18 +42,18 @@ extern int herror(char*title,char*msg); #endif #ifndef ERROR_MESSAGE -#define ERROR_MESSAGE fprintf(stderr,"ERROR: %s\n",herror_string) +#define ERROR_MESSAGE fprintf(stderr,"ERROR: %s\n",hint_error_string) #endif #ifndef QUIT -#define QUIT(...) (snprintf(herror_string,MAX_HERROR-1,__VA_ARGS__),\ - ERROR_MESSAGE,hint_end(),longjmp(error_exit,1)) +#define QUIT(...) (snprintf(hint_error_string,MAX_HINT_ERROR-1,__VA_ARGS__),\ + ERROR_MESSAGE,hint_end(),longjmp(hint_error_exit,1)) #endif #ifndef HINT_TRY -#define HINT_TRY if ((herror_string[0]= 0,setjmp(error_exit)==0)) +#define HINT_TRY if ((hint_error_string[0]= 0,setjmp(hint_error_exit)==0)) #endif #endif -/*:359*/ +/*:368*/ diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/format.h b/Build/source/texk/web2c/hitexdir/hintview/src/format.h index f2c3a8e83c8..9d4386edd7c 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 @@ - /*512:*/ - #line 10466 "format.w" + /*526:*/ + #line 10759 "format.w" #ifndef _HFORMAT_H_ #define _HFORMAT_H_ - /*357:*/ - #line 7858 "format.w" + /*366:*/ + #line 8063 "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]) - /*:357*/ /*358:*/ - #line 7872 "format.w" + /*:366*/ /*367:*/ + #line 8077 "format.w" #define MAX_REF(K) ((K)==label_kind?0xFFFF:0xFF) - /*:358*/ /*431:*/ - #line 9326 "format.w" + /*:367*/ /*443:*/ + #line 9552 "format.w" #ifdef WIN32 #define SIZE_F "0x%x" @@ -31,11 +31,11 @@ if ((int)(N)<(int)(A)||(int)(N)>(int)(Z)) QUIT(S " %d out of range [%d - %d]",N,A,Z) #define TAGERR(A) QUIT("Unknown tag [%s,%d] at " SIZE_F "\n",NAME(A),INFO(A),hpos-hstart) - /*:431*/ - #line 10469 "format.w" + /*:443*/ + #line 10762 "format.w" - /*418:*/ - #line 9065 "format.w" + /*430:*/ + #line 9291 "format.w" #define DBGNONE 0x0 #define DBGBASIC 0x1 @@ -54,67 +54,73 @@ #define DBGFONT 0x2000 #define DBGRENDER 0x4000 #define DBGLABEL 0x8000 - /*:418*/ - #line 10470 "format.w" + /*:430*/ + #line 10763 "format.w" - /*12:*/ - #line 641 "format.w" + /*13:*/ + #line 647 "format.w" #define KIND(T) (((T)>>3)&0x1F) #define NAME(T) content_name[KIND(T)] #define INFO(T) ((T)&0x7) #define TAG(K,I) (((K)<<3)|(I)) - /*:12*/ /*77:*/ - #line 1640 "format.w" + /*:13*/ /*78:*/ + #line 1651 "format.w" #define ROUND(X) ((int)((X)>=0.0?floor((X)+0.5):ceil((X)-0.5))) - /*:77*/ /*112:*/ - #line 2140 "format.w" + /*:78*/ /*113:*/ + #line 2153 "format.w" #define RUNNING_DIMEN 0xC0000000 - /*:112*/ /*131:*/ - #line 2482 "format.w" + /*:113*/ /*132:*/ + #line 2495 "format.w" #define ZERO_GLUE(G) ((G).w.w==0 && (G).w.h==0.0 && (G).w.v==0.0 && (G).p.f==0.0 && (G).m.f==0.0) - /*:131*/ /*244:*/ - #line 5140 "format.w" + /*:132*/ /*244:*/ + #line 5177 "format.w" #define HINT_NO_POS 0xFFFFFFFF /*:244*/ /*251:*/ - #line 5338 "format.w" + #line 5375 "format.w" #define LABEL_UNDEF 0 #define LABEL_TOP 1 #define LABEL_BOT 2 #define LABEL_MID 3 - /*:251*/ /*302:*/ - #line 6519 "format.w" + /*:251*/ /*311:*/ + #line 6719 "format.w" #define ALLOCATE(R,S,T) ((R)= (T *)calloc((S),sizeof(T)),\ (((R)==NULL)?QUIT("Out of memory for " #R):0)) #define REALLOCATE(R,S,T) ((R)= (T *)realloc((R),(S)*sizeof(T)),\ (((R)==NULL)?QUIT("Out of memory for " #R):0)) - /*:302*/ /*310:*/ - #line 6684 "format.w" + /*:311*/ /*319:*/ + #line 6884 "format.w" #define MAX_BANNER 256 - /*:310*/ /*323:*/ - #line 6890 "format.w" + /*:319*/ /*332:*/ + #line 7095 "format.w" #define MAX_TAG_DISTANCE 32 - /*:323*/ - #line 10471 "format.w" + /*:332*/ /*446:*/ + #line 9617 "format.w" + +#define NODE_SIZE(H,T) ((T)==0?(H)+2:-4*((H)+1)+((T)-1)) +#define NODE_HEAD(N) ((N)>0?(N)-2:-((N)>>2)-1) +#define NODE_TAIL(N) ((N)<0?((N)&0x3)+1:0) + /*:446*/ + #line 10764 "format.w" /*6:*/ - #line 493 "format.w" + #line 496 "format.w" #define DEF_KIND(C,D,N) C##_kind= N typedef enum{ /*9:*/ - #line 562 "format.w" + #line 564 "format.w" -DEF_KIND(text,text,0), -DEF_KIND(list,list,1), -DEF_KIND(param,param,2), +DEF_KIND(list,list,0), +DEF_KIND(param,param,1), +DEF_KIND(range,range,2), DEF_KIND(xdimen,xdimen,3), DEF_KIND(adjust,adjust,4), DEF_KIND(glyph,font,5), @@ -139,28 +145,32 @@ DEF_KIND(hpack,hpack,23), DEF_KIND(vpack,vpack,24), DEF_KIND(stream,stream,25), DEF_KIND(page,page,26), -DEF_KIND(range,range,27), -DEF_KIND(link,label,28), +DEF_KIND(link,label,27), +DEF_KIND(undefined1,undefined1,28), DEF_KIND(undefined2,undefined2,29), DEF_KIND(undefined3,undefined3,30), DEF_KIND(penalty,int,31) /*:9*/ - #line 495 "format.w" + #line 498 "format.w" , /*10:*/ - #line 601 "format.w" + #line 603 "format.w" -font_kind= glyph_kind,int_kind= penalty_kind,dimen_kind= kern_kind,label_kind= link_kind,outline_kind= link_kind +font_kind= glyph_kind,int_kind= penalty_kind,unknown_kind= penalty_kind,dimen_kind= kern_kind,label_kind= link_kind,outline_kind= link_kind /*:10*/ - #line 495 "format.w" + #line 498 "format.w" }Kind; #undef DEF_KIND /*:6*/ /*11:*/ - #line 627 "format.w" + #line 629 "format.w" typedef enum{b000= 0,b001= 1,b010= 2,b011= 3,b100= 4,b101= 5,b110= 6,b111= 7}Info; - /*:11*/ /*56:*/ - #line 1302 "format.w" + /*:11*/ /*12:*/ + #line 642 "format.w" + +typedef uint8_t Tag; + /*:12*/ /*57:*/ + #line 1310 "format.w" #define FLT_M_BITS 23 @@ -171,44 +181,44 @@ typedef enum{b000= 0,b001= 1,b010= 2,b011= 3,b100= 4,b101= 5,b110= 6,b111= 7}Inf #define DBL_E_BITS 11 #define DBL_EXCESS 1023 - /*:56*/ /*76:*/ - #line 1635 "format.w" + /*:57*/ /*77:*/ + #line 1646 "format.w" typedef int32_t Scaled; #define ONE ((Scaled)(1<<16)) - /*:76*/ /*81:*/ - #line 1691 "format.w" + /*:77*/ /*82:*/ + #line 1702 "format.w" typedef Scaled Dimen; #define MAX_DIMEN ((Dimen)(0x3FFFFFFF)) - /*:81*/ /*86:*/ - #line 1747 "format.w" + /*:82*/ /*87:*/ + #line 1758 "format.w" typedef struct{ Dimen w;float32_t h,v; }Xdimen; - /*:86*/ /*95:*/ - #line 1891 "format.w" + /*:87*/ /*96:*/ + #line 1902 "format.w" typedef enum{normal_o= 0,fil_o= 1,fill_o= 2,filll_o= 3}Order; typedef struct{float64_t f;Order o;}Stretch; typedef union{float32_t f;uint32_t u;}Stch; - /*:95*/ /*130:*/ - #line 2472 "format.w" + /*:96*/ /*131:*/ + #line 2485 "format.w" typedef struct{ Xdimen w; Stretch p,m; }Glue; - /*:130*/ /*180:*/ - #line 3895 "format.w" + /*:131*/ /*180:*/ + #line 3939 "format.w" typedef struct{ Glue bs,ls; Dimen lsl; }Baseline; /*:180*/ /*250:*/ - #line 5323 "format.w" + #line 5360 "format.w" typedef struct {uint32_t pos; @@ -217,15 +227,15 @@ bool used; int next; uint32_t pos0;uint8_t f; }Label; - /*:250*/ /*381:*/ - #line 8392 "format.w" + /*:250*/ /*390:*/ + #line 8598 "format.w" #define MAX_FONT_PARAMS 11 - /*:381*/ - #line 10472 "format.w" + /*:390*/ + #line 10765 "format.w" - /*393:*/ - #line 8627 "format.w" + /*403:*/ + #line 8837 "format.w" typedef enum{ zero_int_no= 0, @@ -253,8 +263,8 @@ hang_after_no= 21, floating_penalty_no= 22 }Int_no; #define MAX_INT_DEFAULT floating_penalty_no - /*:393*/ /*395:*/ - #line 8700 "format.w" + /*:403*/ /*405:*/ + #line 8910 "format.w" typedef enum{ zero_dimen_no= 0, @@ -269,8 +279,8 @@ quad_no= 8, math_quad_no= 9 }Dimen_no; #define MAX_DIMEN_DEFAULT math_quad_no - /*:395*/ /*397:*/ - #line 8745 "format.w" + /*:405*/ /*407:*/ + #line 8955 "format.w" typedef enum{ zero_xdimen_no= 0, @@ -278,8 +288,8 @@ hsize_xdimen_no= 1, vsize_xdimen_no= 2 }Xdimen_no; #define MAX_XDIMEN_DEFAULT vsize_xdimen_no - /*:397*/ /*399:*/ - #line 8769 "format.w" + /*:407*/ /*409:*/ + #line 8979 "format.w" typedef enum{ zero_skip_no= 0, @@ -299,43 +309,50 @@ tab_skip_no= 13, par_fill_skip_no= 14 }Glue_no; #define MAX_GLUE_DEFAULT par_fill_skip_no - /*:399*/ /*401:*/ - #line 8855 "format.w" + /*:409*/ /*411:*/ + #line 9065 "format.w" typedef enum{ zero_baseline_no= 0 }Baseline_no; #define MAX_BASELINE_DEFAULT zero_baseline_no - /*:401*/ /*403:*/ - #line 8880 "format.w" + /*:411*/ /*413:*/ + #line 9090 "format.w" typedef enum{ zero_label_no= 0 }Label_no; #define MAX_LABEL_DEFAULT zero_label_no - /*:403*/ /*405:*/ - #line 8894 "format.w" + /*:413*/ /*415:*/ + #line 9104 "format.w" typedef enum{ zero_stream_no= 0 }Stream_no; #define MAX_STREAM_DEFAULT zero_stream_no - /*:405*/ /*407:*/ - #line 8910 "format.w" + /*:415*/ /*417:*/ + #line 9120 "format.w" typedef enum{ zero_page_no= 0 }Page_no; #define MAX_PAGE_DEFAULT zero_page_no - /*:407*/ /*409:*/ - #line 8927 "format.w" + /*:417*/ /*419:*/ + #line 9137 "format.w" typedef enum{ zero_range_no= 0 }Range_no; #define MAX_RANGE_DEFAULT zero_range_no - /*:409*/ - #line 10473 "format.w" + /*:419*/ /*421:*/ + #line 9150 "format.w" + +typedef enum{ +empty_list_no= 0 +}List_no; +#define MAX_LIST_DEFAULT empty_list_no + /*:421*/ + #line 10766 "format.w" extern const char*content_name[32]; @@ -350,6 +367,7 @@ extern Glue glue_defaults[MAX_GLUE_DEFAULT+1]; extern Baseline baseline_defaults[MAX_BASELINE_DEFAULT+1]; extern Label label_defaults[MAX_LABEL_DEFAULT+1]; extern signed char hnode_size[0x100]; +extern uint8_t content_known[32]; #endif - /*:512*/ + /*:526*/ diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/get.c b/Build/source/texk/web2c/hitexdir/hintview/src/get.c index 4682ba4624b..3bc35045995 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 @@ - /*516:*/ - #line 10613 "format.w" + /*530:*/ + #line 10915 "format.w" #include "basetypes.h" #include <string.h> @@ -14,38 +14,38 @@ #include "get.h" /*252:*/ - #line 5345 "format.w" + #line 5382 "format.w" -Label*labels; +Label*labels= NULL; int first_label= -1; - /*:252*/ /*300:*/ - #line 6508 "format.w" + /*:252*/ /*309:*/ + #line 6708 "format.w" RangePos*range_pos; int next_range= 1,max_range; int*page_on; - /*:300*/ /*311:*/ - #line 6692 "format.w" + /*:309*/ /*320:*/ + #line 6892 "format.w" char hbanner[MAX_BANNER+1]; int hbanner_size= 0; - /*:311*/ /*318:*/ - #line 6835 "format.w" + /*:320*/ /*327:*/ + #line 7040 "format.w" uint8_t*hpos= NULL,*hstart= NULL,*hend= NULL,*hpos0= NULL; - /*:318*/ /*324:*/ - #line 6916 "format.w" + /*:327*/ /*333:*/ + #line 7121 "format.w" char*hin_name= NULL; uint64_t hin_size= 0; uint8_t*hin_addr= NULL; uint64_t hin_time= 0; - /*:324*/ /*380:*/ - #line 8388 "format.w" + /*:333*/ /*389:*/ + #line 8594 "format.w" char**hfont_name; - /*:380*/ /*419:*/ - #line 9088 "format.w" + /*:389*/ /*431:*/ + #line 9314 "format.w" unsigned int debugflags= DBGNONE; int option_utf8= false; @@ -56,16 +56,16 @@ int option_aux= false; int option_compress= false; char*stem_name= NULL; int stem_length= 0; - /*:419*/ /*422:*/ - #line 9222 "format.w" + /*:431*/ /*434:*/ + #line 9448 "format.w" FILE*hin= NULL,*hout= NULL,*hlog= NULL; - /*:422*/ - #line 10626 "format.w" + /*:434*/ + #line 10928 "format.w" - /*325:*/ - #line 6923 "format.w" + /*334:*/ + #line 7128 "format.w" #ifndef USE_MMAP void hget_unmap(void) @@ -158,16 +158,16 @@ return hin_size; } #endif - /*:325*/ - #line 10628 "format.w" + /*:334*/ + #line 10930 "format.w" - /*312:*/ - #line 6697 "format.w" + /*321:*/ + #line 6897 "format.w" bool hcheck_banner(char*magic) { -int v; +int v,s; char*t; t= hbanner; if(strncmp(magic,hbanner,4)!=0) @@ -179,25 +179,30 @@ if(*t!=' ') {MESSAGE("Space expected in banner after %s\n",magic);return false;} else t++; v= strtol(t,&t,10); -if(v!=HINT_VERSION) -{MESSAGE("Wrong HINT version: got %d, expected %d\n",v,HINT_VERSION);return false;} if(*t!='.') {MESSAGE("Dot expected in banner after HINT version number\n");return false;} else t++; -v= strtol(t,&t,10); -if(v!=HINT_SUB_VERSION) -{MESSAGE("Wrong HINT subversion: got %d, expected %d\n",v,HINT_SUB_VERSION);return false;} +s= strtol(t,&t,10); +if(v!=HINT_VERSION) +{MESSAGE("Wrong HINT version: got %d.%d, expected %d.%d\n", +v,s,HINT_VERSION,HINT_SUB_VERSION);return false;} +if(s<HINT_SUB_VERSION) +{MESSAGE("Wrong HINT subversion: got %d.%d, expected %d.%d\n", +v,s,HINT_VERSION,HINT_SUB_VERSION);return false;} +else if(s>HINT_SUB_VERSION) +{MESSAGE("New HINT subversion: got %d.%d, expected %d.%d, update your application\n", +v,s,HINT_VERSION,HINT_SUB_VERSION);} if(*t!=' '&&*t!='\n') {MESSAGE("Space expected in banner after HINT subversion\n");return false;} -LOG("%s file version %d.%d:%s",magic,HINT_VERSION,HINT_SUB_VERSION,t); +LOG("%s file version "HINT_VERSION_STRING":%s",magic,t); DBG(DBGDIR,"banner size=0x%x\n",hbanner_size); return true; } - /*:312*/ - #line 10629 "format.w" + /*:321*/ + #line 10931 "format.w" - /*334:*/ - #line 7256 "format.w" + /*343:*/ + #line 7461 "format.w" Entry*dir= NULL; uint16_t section_no,max_section_no; @@ -208,8 +213,8 @@ max_section_no= entries-1; ALLOCATE(dir,entries,Entry); dir[0].section_no= 0;dir[1].section_no= 1;dir[2].section_no= 2; } - /*:334*/ /*335:*/ - #line 7269 "format.w" + /*:343*/ /*344:*/ + #line 7474 "format.w" void hset_entry(Entry*e,uint16_t i,uint32_t size,uint32_t xsize,char*file_name) {e->section_no= i; @@ -220,12 +225,12 @@ else e->file_name= strdup(file_name); DBG(DBGDIR,"Creating entry %d: \"%s\" size=0x%x xsize=0x%x\n",i,file_name,size,xsize); } - /*:335*/ - #line 10630 "format.w" + /*:344*/ + #line 10932 "format.w" - /*313:*/ - #line 6736 "format.w" + /*322:*/ + #line 6941 "format.w" void hget_banner(void) {hbanner_size= 0; @@ -236,8 +241,8 @@ if(c=='\n')break; } hbanner[hbanner_size]= 0; } - /*:313*/ /*326:*/ - #line 7028 "format.w" + /*:322*/ /*335:*/ + #line 7233 "format.w" static void hdecompress(uint16_t n) @@ -273,8 +278,8 @@ dir[n].bsize= dir[n].xsize; hpos0= hpos= hstart= buffer; hend= hstart+dir[n].xsize; } - /*:326*/ /*328:*/ - #line 7116 "format.w" + /*:335*/ /*337:*/ + #line 7321 "format.w" void hget_section(uint16_t n) {DBG(DBGDIR,"Reading section %d\n",n); @@ -289,19 +294,19 @@ hend= hstart+dir[n].size; if(dir[n].xsize>0)hdecompress(n); } } - /*:328*/ /*345:*/ - #line 7494 "format.w" + /*:337*/ /*354:*/ + #line 7699 "format.w" void hget_entry(Entry*e) -{ /*15:*/ - #line 718 "format.w" +{ /*16:*/ + #line 724 "format.w" -uint8_t a,z; +Tag a,z; 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 7496 "format.w" + /*:16*/ + #line 7701 "format.w" DBG(DBGDIR,"Reading directory entry\n"); switch(a) @@ -315,19 +320,19 @@ case TAG(0,b100+2):HGET_ENTRY(b100+2,*e);break; case TAG(0,b100+3):HGET_ENTRY(b100+3,*e);break; default:TAGERR(a);break; } - /*16:*/ - #line 725 "format.w" + /*17:*/ + #line 731 "format.w" HGETTAG(z); 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 7509 "format.w" + /*:17*/ + #line 7714 "format.w" } - /*:345*/ /*346:*/ - #line 7526 "format.w" + /*:354*/ /*355:*/ + #line 7731 "format.w" static void hget_root(Entry*root) {DBG(DBGDIR,"Root entry at "SIZE_F"\n",hpos-hstart); @@ -362,20 +367,20 @@ if(dir[i].xsize>0&&dir[i].buffer!=NULL)free(dir[i].buffer); free(dir);dir= NULL; } - /*:346*/ /*364:*/ - #line 7950 "format.w" + /*:355*/ /*373:*/ + #line 8155 "format.w" void hget_max_definitions(void) {Kind k; - /*15:*/ - #line 718 "format.w" + /*16:*/ + #line 724 "format.w" -uint8_t a,z; +Tag a,z; 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 7953 "format.w" + /*:16*/ + #line 8158 "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; @@ -389,14 +394,14 @@ if(k==list_kind)break; if(INFO(a)&b001)HGET16(n);else n= HGET8; switch(a) { /*246:*/ - #line 5275 "format.w" + #line 5312 "format.w" case TAG(outline_kind,b100): case TAG(outline_kind,b101):max_outline= n; DBG(DBGDEF|DBGLABEL,"max(outline) = %d\n",max_outline);break; /*:246*/ - #line 7965 "format.w" + #line 8170 "format.w" default: if(max_fixed[k]>max_default[k]) @@ -406,24 +411,25 @@ max_ref[k]= n; DBG(DBGDEF,"max(%s) = %d\n",definition_name[k],max_ref[k]); break; } - /*16:*/ - #line 725 "format.w" + /*17:*/ + #line 731 "format.w" HGETTAG(z); 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 7974 "format.w" + /*:17*/ + #line 8179 "format.w" } if(INFO(a)!=0)QUIT("End of maximum list with info %d",INFO(a)); +DBG(DBGDEF,"Getting Max Definitions END\n"); } - /*:364*/ - #line 10632 "format.w" + /*:373*/ + #line 10934 "format.w" - /*52:*/ - #line 1234 "format.w" + /*53:*/ + #line 1242 "format.w" #define HGET_UTF8C(X) (X)= HGET8; if ((X&0xC0)!=0x80) \ QUIT("UTF8 continuation byte expected at " SIZE_F " got 0x%02X\n",hpos-hstart-1,X) @@ -448,151 +454,153 @@ return((a&~0xF8)<<18)+((b&~0xC0)<<12)+((c&~0xC0)<<6)+(d&~0xC0); else QUIT("UTF8 byte sequence expected"); } } - /*:52*/ /*75:*/ - #line 1614 "format.w" + /*:53*/ /*76:*/ + #line 1625 "format.w" float32_t hget_float32(void) {union{float32_t d;uint32_t bits;}u; HGET32(u.bits); return u.d; } - /*:75*/ /*145:*/ - #line 2836 "format.w" + /*:76*/ /*146:*/ + #line 2848 "format.w" void hget_size_boundary(Info info) {uint32_t n; -if(info<2)return; +info= info&0x3; +if(info==0)return; n= HGET8; -if(n-1!=0x100-info)QUIT("Size boundary byte 0x%x with info value %d at "SIZE_F, -n,info,hpos-hstart-1); +if(n!=0x100-info)QUIT("Non matching boundary byte 0x%x with info value %d at 0x%x", +n,info,(uint32_t)(hpos-hstart-1)); } uint32_t hget_list_size(Info info) {uint32_t n= 0; -if(info==1)return 0; -else if(info==2)n= HGET8; -else if(info==3)HGET16(n); -else if(info==4)HGET24(n); -else if(info==5)HGET32(n); -else QUIT("List info %d must be 1, 2, 3, 4, or 5",info); +info= info&0x3; +if(info==0)return 0; +else if(info==1)n= HGET8; +else if(info==2)HGET16(n); +else if(info==3)HGET32(n); +else QUIT("List info %d must be 0, 1, 2, or 3",info); return n; } void hget_list(List*l) -{if(KIND(*hpos)!=list_kind&& -KIND(*hpos)!=text_kind&&KIND(*hpos)!=param_kind) +{if(KIND(*hpos)!=list_kind&&KIND(*hpos)!=param_kind) QUIT("List expected at 0x%x",(uint32_t)(hpos-hstart)); else { - /*15:*/ - #line 718 "format.w" + /*16:*/ + #line 724 "format.w" -uint8_t a,z; +Tag a,z; 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 2862 "format.w" + /*:16*/ + #line 2874 "format.w" -l->k= KIND(a); +l->t= a; HGET_LIST(INFO(a),*l); - /*16:*/ - #line 725 "format.w" + /*17:*/ + #line 731 "format.w" HGETTAG(z); 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 2865 "format.w" + /*:17*/ + #line 2877 "format.w" DBG(DBGNODE,"Get list at 0x%x size=%u\n",l->p,l->s); } } - /*:145*/ - #line 10633 "format.w" + /*:146*/ + #line 10935 "format.w" - /*434:*/ - #line 9393 "format.w" + /*447:*/ + #line 9629 "format.w" uint32_t hff_list_pos= 0,hff_list_size= 0; -uint8_t hff_tag; +Tag hff_tag; void hff_hpos(void) -{signed char i,k; +{signed char i,b,n; hff_tag= *hpos; DBGTAG(hff_tag,hpos); i= hnode_size[hff_tag]; -if(i>0){hpos= hpos+i;return;} +if(i>0){hpos= hpos+NODE_HEAD(i)+2;return;} else if(i<0) -{k= 1+(i&0x3);i= i>>2; -hpos= hpos-i; -while(k>0) -{hff_hpos();k--;} +{n= NODE_TAIL(i);b= NODE_HEAD(i); +hpos= hpos+1+b; +while(n>0) +{hff_hpos();n--;} hpos++; return; } -else if(hff_tag<=TAG(param_kind,5)) - /*436:*/ - #line 9438 "format.w" +else if(hff_tag<=TAG(param_kind,7)) + /*450:*/ + #line 9699 "format.w" -switch(INFO(hff_tag)){ -case 1:hff_list_pos= hpos-hstart+1;hff_list_size= 0;hpos= hpos+2;return; -case 2:hpos++;hff_list_size= HGET8;hff_list_pos= hpos-hstart+1;hpos= hpos+1+hff_list_size+1+1+1;return; -case 3:hpos++;HGET16(hff_list_size);hff_list_pos= hpos-hstart+1;hpos= hpos+1+hff_list_size+1+2+1;return; -case 4:hpos++;HGET24(hff_list_size);hff_list_pos= hpos-hstart+1;hpos= hpos+1+hff_list_size+1+3+1;return; -case 5:hpos++;HGET32(hff_list_size);hff_list_pos= hpos-hstart+1;hpos= hpos+1+hff_list_size+1+4+1;return; +switch(INFO(hff_tag)&0x3){ +case 0:hff_list_pos= hpos-hstart+1;hff_list_size= 0;hpos= hpos+3;return; +case 1:hpos++;hff_list_size= HGET8;hff_list_pos= hpos-hstart+1;hpos= hpos+1+hff_list_size+1+1+1;return; +case 2:hpos++;HGET16(hff_list_size);hff_list_pos= hpos-hstart+1;hpos= hpos+1+hff_list_size+1+2+1;return; +case 3:hpos++;HGET32(hff_list_size);hff_list_pos= hpos-hstart+1;hpos= hpos+1+hff_list_size+1+4+1;return; +default:QUIT("List with unknown info [%s,%d] at "SIZE_F"\n",NAME(hff_tag),INFO(hff_tag),hpos-hstart); } - /*:436*/ - #line 9411 "format.w" + /*:450*/ + #line 9647 "format.w" TAGERR(hff_tag); } - /*:434*/ /*465:*/ - #line 9849 "format.w" + /*:447*/ /*478:*/ + #line 10112 "format.w" float32_t hteg_float32(void) {union{float32_t d;uint32_t bits;}u; HTEG32(u.bits); return u.d; } - /*:465*/ /*503:*/ - #line 10287 "format.w" + /*:478*/ /*516:*/ + #line 10552 "format.w" void hteg_size_boundary(Info info) {uint32_t n; -if(info<2)return; +info= info&0x3; +if(info==0)return; n= HTEG8; -if(n-1!=0x100-info)QUIT("List size boundary byte 0x%x does not match info value %d at "SIZE_F, +if(n!=0x100-info)QUIT("List size boundary byte 0x%x does not match info value %d at "SIZE_F, n,info,hpos-hstart); } uint32_t hteg_list_size(Info info) -{uint32_t n; -if(info==1)return 0; -else if(info==2)n= HTEG8; -else if(info==3)HTEG16(n); -else if(info==4)HTEG24(n); -else if(info==5)HTEG32(n); -else QUIT("List info %d must be 1, 2, 3, 4, or 5",info); +{uint32_t n= 0; +info= info&0x3; +if(info==0)return 0; +else if(info==1)n= HTEG8; +else if(info==2)HTEG16(n); +else if(info==3)HTEG32(n); +else QUIT("List info %d must be 0, 1, 2, or 3",info); return n; } void hteg_list(List*l) -{ /*462:*/ - #line 9821 "format.w" +{ /*475:*/ + #line 10084 "format.w" -uint8_t a,z; +Tag a,z; uint32_t node_pos= hpos-hstart; if(hpos<=hstart)return; HTEGTAG(z); - /*:462*/ - #line 10308 "format.w" + /*:475*/ + #line 10574 "format.w" -if(KIND(z)!=list_kind&&KIND(z)!=text_kind&&KIND(z)!=param_kind) +if(KIND(z)!=list_kind&&KIND(z)!=param_kind) QUIT("List expected at 0x%x",(uint32_t)(hpos-hstart)); +else if((INFO(z)&0x3)==0){HBACK(1);l->s= 0;} else {uint32_t s; -l->k= KIND(z); +l->t= z; l->s= hteg_list_size(INFO(z)); hteg_size_boundary(INFO(z)); hpos= hpos-l->s; @@ -601,17 +609,17 @@ hteg_size_boundary(INFO(z)); 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); - /*463:*/ - #line 9828 "format.w" +} + /*476:*/ + #line 10091 "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); - /*:463*/ - #line 10322 "format.w" + /*:476*/ + #line 10590 "format.w" } -} void hteg_param_list(List*l) {if(KIND(*(hpos-1))!=param_kind)return; @@ -619,7 +627,7 @@ hteg_list(l); } - /*:503*/ - #line 10634 "format.w" - /*:516*/ + #line 10936 "format.w" + + /*:530*/ diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/get.h b/Build/source/texk/web2c/hitexdir/hintview/src/get.h index 84625af919f..7c053f7940d 100644 --- a/Build/source/texk/web2c/hitexdir/hintview/src/get.h +++ b/Build/source/texk/web2c/hitexdir/hintview/src/get.h @@ -1,55 +1,51 @@ - /*515:*/ - #line 10568 "format.w" + /*529:*/ + #line 10864 "format.w" /*1:*/ #line 329 "format.w" typedef struct{uint32_t c;uint8_t f;}Glyph; - /*:1*/ /*113:*/ - #line 2167 "format.w" + /*:1*/ /*114:*/ + #line 2180 "format.w" typedef struct{ Dimen h,d,w; }Rule; - /*:113*/ /*122:*/ - #line 2281 "format.w" + /*:114*/ /*123:*/ + #line 2294 "format.w" typedef struct{ bool x; Xdimen d; }Kern; - /*:122*/ /*140:*/ - #line 2702 "format.w" + /*:123*/ /*141:*/ + #line 2717 "format.w" typedef struct{ -Kind k; +Tag t; uint32_t p; uint32_t s; }List; - /*:140*/ /*148:*/ - #line 3124 "format.w" + /*:141*/ /*149:*/ + #line 3143 "format.w" typedef enum{txt_font= 0x00,txt_global= 0x08,txt_local= 0x11, txt_cc= 0x1D,txt_node= 0x1E,txt_hyphen= 0x1F, txt_glue= 0x20,txt_ignore= 0xFB}Txt; - /*:148*/ /*159:*/ - #line 3391 "format.w" - -typedef struct{Kind k;int n;}Ref; - /*:159*/ /*160:*/ - #line 3428 "format.w" + /*:149*/ /*160:*/ + #line 3443 "format.w" typedef struct{Dimen h,d,w,a;float32_t r;int8_t s,o;List l;}Box; /*:160*/ /*187:*/ - #line 3984 "format.w" + #line 4028 "format.w" typedef struct{uint8_t f;List l;}Lig; /*:187*/ /*195:*/ - #line 4101 "format.w" + #line 4145 "format.w" typedef struct{bool x;List p,q;uint8_t r;}Disc; /*:195*/ /*228:*/ - #line 4659 "format.w" + #line 4696 "format.w" typedef struct{ uint16_t n; @@ -58,7 +54,7 @@ Xdimen w,h; uint8_t wr,hr; }Image; /*:228*/ /*272:*/ - #line 5687 "format.w" + #line 5724 "format.w" typedef struct{ uint8_t*t; @@ -66,16 +62,20 @@ int s; int d; uint16_t r; }Outline; - /*:272*/ /*299:*/ - #line 6503 "format.w" + /*:272*/ /*308:*/ + #line 6703 "format.w" typedef struct{uint8_t pg;uint32_t pos;bool on;int link;}RangePos; - /*:299*/ - #line 10569 "format.w" + /*:308*/ /*397:*/ + #line 8715 "format.w" + +typedef struct{Kind k;int n;}Ref; + /*:397*/ + #line 10865 "format.w" - /*333:*/ - #line 7242 "format.w" + /*342:*/ + #line 7447 "format.w" typedef struct{ uint64_t pos; @@ -85,27 +85,28 @@ char*file_name; uint8_t*buffer; uint32_t bsize; }Entry; - /*:333*/ - #line 10570 "format.w" + /*:342*/ + #line 10866 "format.w" - /*37:*/ - #line 1068 "format.w" + /*38:*/ + #line 1076 "format.w" #define HGET_STRING(S) S= (char*)hpos;\ while(hpos<hend && *hpos!=0) { RNG("String character",*hpos,0x20,0x7E); hpos++;}\ hpos++; - /*:37*/ /*146:*/ - #line 2871 "format.w" + /*:38*/ /*147:*/ + #line 2886 "format.w" #define HGET_LIST(I,L) \ - (L).s= hget_list_size(I); hget_size_boundary(I);\ + if (((I)&0x3)==0) {uint8_t n= HGET8; REF_RNG(KIND((L).t),n); (L).s= 0;}\ + else { (L).s= hget_list_size(I); hget_size_boundary(I);\ (L).p= hpos-hstart; \ hpos= hpos+(L).s; hget_size_boundary(I);\ { uint32_t s= hget_list_size(I); \ 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*/ /*319:*/ - #line 6843 "format.w" + 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);}} + /*:147*/ /*328:*/ + #line 7048 "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,8 +116,8 @@ uint32_t bsize; #define HGET24(X) ((X)= (hpos[0]<<16)+(hpos[1]<<8)+hpos[2],hpos+= 3,HEND) #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) - /*:319*/ /*344:*/ - #line 7470 "format.w" + /*:328*/ /*353:*/ + #line 7675 "format.w" #define HGET_SIZE(I) \ if ((I)&b100) { \ @@ -139,8 +140,8 @@ uint32_t bsize; HGET16(i); HGET_SIZE(I); HGET_STRING(file_name); \ hset_entry(&(E),i,s,xs,file_name); \ } - /*:344*/ /*464:*/ - #line 9836 "format.w" + /*:353*/ /*477:*/ + #line 10099 "format.w" #define HBACK(X) ((hpos-(X)<hstart)?(QUIT("HTEG underflow\n"),NULL):(hpos-= (X))) @@ -149,8 +150,8 @@ uint32_t bsize; #define HTEG24(X) (HBACK(3),(X)= (hpos[0]<<16)+(hpos[1]<<8)+hpos[2]) #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) - /*:464*/ - #line 10571 "format.w" + /*:477*/ + #line 10867 "format.w" extern Entry*dir; @@ -179,13 +180,19 @@ extern uint32_t hget_utf8(void); extern void hget_size_boundary(Info info); extern uint32_t hget_list_size(Info info); extern void hget_list(List*l); -extern uint32_t hget_utf8(void); extern float32_t hget_float32(void); +extern void hff_hpos(void); +extern uint32_t hff_list_pos,hff_list_size; +extern Tag hff_tag; extern float32_t hteg_float32(void); -extern void hteg_size_boundary(Info info); extern uint32_t hteg_list_size(Info info); + + +#if 0 extern void hteg_list(List*l); -extern void hff_hpos(void); -extern uint32_t hff_list_pos,hff_list_size; -extern uint8_t hff_tag; - /*:515*/ + +extern void hteg_size_boundary(Info info); + +#endif + + /*:529*/ diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/hfonts.c b/Build/source/texk/web2c/hitexdir/hintview/src/hfonts.c index 6ab1efe3dcb..7744ad2dfc9 100644 --- a/Build/source/texk/web2c/hitexdir/hintview/src/hfonts.c +++ b/Build/source/texk/web2c/hitexdir/hintview/src/hfonts.c @@ -1,5 +1,5 @@ -/*377:*/ -#line 7640 "hint.w" +/*386:*/ +#line 7708 "hint.w" #include "basetypes.h" #include "error.h" @@ -12,20 +12,20 @@ #include "hrender.h" #include "rendernative.h" -/*309:*/ -#line 5768 "hint.w" +/*317:*/ +#line 5795 "hint.w" static Font*fonts[0x100]= {NULL}; -/*:309*//*316:*/ -#line 5904 "hint.w" +/*:317*//*324:*/ +#line 5931 "hint.w" static Gcache g_undefined= {0}; -/*:316*//*350:*/ -#line 7024 "hint.w" +/*:324*//*359:*/ +#line 7091 "hint.w" static FT_Library ft_library= NULL; -/*:350*/ -#line 7652 "hint.w" +/*:359*/ +#line 7720 "hint.w" /*35:*/ #line 577 "hint.w" @@ -33,10 +33,10 @@ static FT_Library ft_library= NULL; extern uint16_t hglyph_section(uint8_t f); extern int32_t font_at_size(uint8_t f); /*:35*/ -#line 7653 "hint.w" +#line 7721 "hint.w" -/*315:*/ -#line 5861 "hint.w" +/*323:*/ +#line 5888 "hint.w" #define G0_BITS 7 #define G0_SIZE (1<<G0_BITS) @@ -70,8 +70,8 @@ else if(f->g0) return f->g0[cc]; return NULL; } -/*:315*//*317:*/ -#line 5908 "hint.w" +/*:323*//*325:*/ +#line 5935 "hint.w" static Gcache*hnew_g(Gcache**g) {if(*g==NULL) @@ -125,41 +125,41 @@ else if(cc<G123_SIZE*G123_SIZE*G0_SIZE)return hnew_g2(&(f->g2),cc); else if(cc<G123_SIZE*G123_SIZE*G123_SIZE*G0_SIZE)return hnew_g3(&(f->g3),cc); else return&g_undefined; } -/*:317*/ -#line 7654 "hint.w" +/*:325*/ +#line 7722 "hint.w" -/*354:*/ -#line 7058 "hint.w" +/*363:*/ +#line 7125 "hint.w" int unpack_ft_file(Font*f) {int e; -/*351:*/ -#line 7028 "hint.w" +/*360:*/ +#line 7095 "hint.w" if(ft_library==NULL) {int e= FT_Init_FreeType(&ft_library); if(e)QUIT("Unable to initialize the FreeType library"); } -/*:351*/ -#line 7062 "hint.w" +/*:360*/ +#line 7129 "hint.w" f->hpxs= 72.27/xdpi; f->vpxs= 72.27/ydpi; e= FT_New_Memory_Face(ft_library, f->font_data,f->data_size,0,&(f->tt.face)); if(e)return 0; -/*355:*/ -#line 7083 "hint.w" +/*364:*/ +#line 7150 "hint.w" e= FT_Select_Charmap(f->tt.face,FT_ENCODING_ADOBE_CUSTOM); if(e)LOG("Unable to select custom encoding for font %d\n",f->n); -/*:355*/ -#line 7068 "hint.w" +/*:364*/ +#line 7135 "hint.w" -/*356:*/ -#line 7091 "hint.w" +/*365:*/ +#line 7158 "hint.w" e= FT_Set_Char_Size( f->tt.face, @@ -169,14 +169,14 @@ f->tt.face, 72.27/f->vpxs); if(e)QUIT("Unable to set FreeType glyph size"); FT_Set_Transform(f->tt.face,0,0); -/*:356*/ -#line 7069 "hint.w" +/*:365*/ +#line 7136 "hint.w" f->ff= ft_format; return 1; } -/*:354*//*357:*/ -#line 7114 "hint.w" +/*:363*//*366:*/ +#line 7181 "hint.w" static void ft_unpack_glyph(Font*f,Gcache*g,uint32_t cc) {int e,i; @@ -200,23 +200,23 @@ g->ff= ft_format; nativeSetFreeType(g); } -/*:357*/ -#line 7656 "hint.w" +/*:366*/ +#line 7724 "hint.w" -/*342:*/ -#line 6729 "hint.w" +/*351:*/ +#line 6796 "hint.w" #define PK_READ_1_BYTE() (data[i++]) #define PK_READ_2_BYTE() (k= PK_READ_1_BYTE(),k= k<<8,k= k+data[i++],k) #define PK_READ_3_BYTE() (k= PK_READ_2_BYTE(),k= k<<8,k= k+data[i++],k) #define PK_READ_4_BYTE() (k= PK_READ_3_BYTE(),k= k<<8,k= k+data[i++],k) -/*:342*//*344:*/ -#line 6756 "hint.w" +/*:351*//*353:*/ +#line 6823 "hint.w" #define read_nybble(P) ((P).j&1?((P).data[(P).j++>>1]&0xF):(((P).data[(P).j++>>1]>>4)&0xF)) -/*:344*//*345:*/ -#line 6782 "hint.w" +/*:353*//*354:*/ +#line 6849 "hint.w" static int packed_number(PKparse*p) {int i,k; @@ -234,8 +234,8 @@ else p->r= 1; return packed_number(p); } } -/*:345*//*346:*/ -#line 6811 "hint.w" +/*:354*//*355:*/ +#line 6878 "hint.w" static void pk_runlength(Gcache*g,unsigned char*data){ PKparse p; @@ -276,8 +276,8 @@ y++; } } } -/*:346*//*347:*/ -#line 6863 "hint.w" +/*:355*//*356:*/ +#line 6930 "hint.w" static void pk_bitmap(Gcache*g,unsigned char*data){ unsigned char*bits; @@ -297,8 +297,8 @@ mask= mask>>1; if(mask==0){data++;mask= 0x80;} } } -/*:347*//*348:*/ -#line 6886 "hint.w" +/*:356*//*357:*/ +#line 6953 "hint.w" static void pkunpack_glyph(Gcache*g) @@ -340,8 +340,8 @@ if((g->pk.flag>>4)==14)pk_bitmap(g,data+i); else pk_runlength(g,data+i); nativeSetPK(g); } -/*:348*//*349:*/ -#line 6931 "hint.w" +/*:357*//*358:*/ +#line 6998 "hint.w" static Gcache*hnew_glyph(Font*pk,unsigned int cc); @@ -426,12 +426,12 @@ break; return 1; } -/*:349*/ -#line 7658 "hint.w" +/*:358*/ +#line 7726 "hint.w" -/*310:*/ -#line 5774 "hint.w" +/*318:*/ +#line 5801 "hint.w" struct font_s*hget_font(unsigned char f) {Font*fp; @@ -452,15 +452,15 @@ fp->data_size= hend-hstart; hpos= spos;hstart= sstart;hend= send; } fp->s= font_at_size(f)/(double)(1<<16); -/*339:*/ -#line 6666 "hint.w" +/*348:*/ +#line 6733 "hint.w" if(fp->font_data[0]==0xF7&&fp->font_data[1]==0x59) {fp->ff= pk_format; if(!unpack_pk_file(fp)){free(fp);fp= NULL;} } -/*:339*//*358:*/ -#line 7141 "hint.w" +/*:348*//*367:*/ +#line 7208 "hint.w" else if(unpack_ft_file(fp)) fp->ff= ft_format; @@ -468,14 +468,14 @@ else {QUIT("Font format not supported for font %d\n",fp->n); free(fp);fp= NULL; } -/*:358*/ -#line 5794 "hint.w" +/*:367*/ +#line 5821 "hint.w" fonts[f]= fp; return fonts[f]; } -/*:310*//*312:*/ -#line 5812 "hint.w" +/*:318*//*320:*/ +#line 5839 "hint.w" static void hfree_glyph_cache(Font*f,bool rm); @@ -488,8 +488,8 @@ if(fonts[f]!=NULL) if(rm){free(fonts[f]);fonts[f]= NULL;} } } -/*:312*//*318:*/ -#line 5972 "hint.w" +/*:320*//*326:*/ +#line 5999 "hint.w" static void hfree_g0(struct gcache_s**g,bool rm) {int i; @@ -553,8 +553,8 @@ if(f->g3!=NULL) if(rm){free(f->g3);f->g3= NULL;} } } -/*:318*//*320:*/ -#line 6098 "hint.w" +/*:326*//*328:*/ +#line 6125 "hint.w" Gcache*hget_glyph(Font*f,unsigned int cc) { @@ -573,8 +573,8 @@ else QUIT("Font format not supported"); } return g; } -/*:320*//*322:*/ -#line 6130 "hint.w" +/*:328*//*330:*/ +#line 6157 "hint.w" void render_char(int x,int y,struct font_s*f,uint32_t cc,uint8_t s) @@ -589,8 +589,8 @@ h= (double)g->h*f->vpxs; nativeGlyph(SP2PT(x),dx,SP2PT(y),dy,w,h,g,s); } -/*:322*/ -#line 7660 "hint.w" +/*:330*/ +#line 7728 "hint.w" -/*:377*/ +/*:386*/ diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/hfonts.h b/Build/source/texk/web2c/hitexdir/hintview/src/hfonts.h index fbd5893385f..4af895a7b26 100644 --- a/Build/source/texk/web2c/hitexdir/hintview/src/hfonts.h +++ b/Build/source/texk/web2c/hitexdir/hintview/src/hfonts.h @@ -1,18 +1,18 @@ -/*376:*/ -#line 7629 "hint.w" +/*385:*/ +#line 7697 "hint.w" #ifndef _HFONTS_H #define _HFONTS_H -/*307:*/ -#line 5740 "hint.w" +/*315:*/ +#line 5767 "hint.w" typedef enum{no_format,pk_format,ft_format}FontFormat; -/*:307*//*308:*/ -#line 5752 "hint.w" +/*:315*//*316:*/ +#line 5779 "hint.w" -/*340:*/ -#line 6705 "hint.w" +/*349:*/ +#line 6772 "hint.w" typedef struct @@ -21,20 +21,20 @@ unsigned int cs; double ds; unsigned char id; }PKfont; -/*:340*//*352:*/ -#line 7036 "hint.w" +/*:349*//*361:*/ +#line 7103 "hint.w" typedef struct {FT_Face face; }FTfont; -/*:352*//*353:*/ -#line 7043 "hint.w" +/*:361*//*362:*/ +#line 7110 "hint.w" typedef struct {int dummy; }FTglyph; -/*:353*/ -#line 5753 "hint.w" +/*:362*/ +#line 5780 "hint.w" typedef struct font_s{ @@ -43,32 +43,32 @@ unsigned char*font_data; int data_size; double s; double hpxs,vpxs; -/*314:*/ -#line 5847 "hint.w" +/*322:*/ +#line 5874 "hint.w" struct gcache_s**g0; struct gcache_s***g1; struct gcache_s****g2; struct gcache_s*****g3; -/*:314*/ -#line 5761 "hint.w" +/*:322*/ +#line 5788 "hint.w" FontFormat ff; union{PKfont pk;FTfont tt;}; }Font; -/*:308*//*319:*/ -#line 6059 "hint.w" +/*:316*//*327:*/ +#line 6086 "hint.w" -/*341:*/ -#line 6718 "hint.w" +/*350:*/ +#line 6785 "hint.w" typedef struct {unsigned char flag; unsigned char*encoding; }PKglyph; -/*:341*//*343:*/ -#line 6745 "hint.w" +/*:350*//*352:*/ +#line 6812 "hint.w" typedef struct{ int j; @@ -76,8 +76,8 @@ int r; int f; unsigned char*data; }PKparse; -/*:343*/ -#line 6060 "hint.w" +/*:352*/ +#line 6087 "hint.w" struct gcache_s{ @@ -92,10 +92,10 @@ FTglyph tt; }; }; typedef struct gcache_s Gcache; -/*:319*/ -#line 7633 "hint.w" +/*:327*/ +#line 7701 "hint.w" #endif -/*:376*/ +/*:385*/ diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/hint.c b/Build/source/texk/web2c/hitexdir/hintview/src/hint.c index 504dca00c9f..aca2f30edbc 100644 --- a/Build/source/texk/web2c/hitexdir/hintview/src/hint.c +++ b/Build/source/texk/web2c/hitexdir/hintview/src/hint.c @@ -1,5 +1,5 @@ -/*373:*/ -#line 7545 "hint.w" +/*382:*/ +#line 7612 "hint.w" #include "basetypes.h" #include <string.h> @@ -12,26 +12,26 @@ #include "htex.h" #include "hint.h" -/*82:*/ -#line 1298 "hint.w" +/*84:*/ +#line 1311 "hint.w" #define HGET_STRING(S) S= (char*)hpos;\ while(hpos<hend && *hpos!=0) { RNG("String character",*hpos,0x20,0x7E); hpos++;}\ hpos++; -/*:82*//*83:*/ -#line 1310 "hint.w" +/*:84*//*85:*/ +#line 1323 "hint.w" #define HGET_XDIMEN(I,X) \ { if((I)&b100) HGET32((X).w); else (X).w= 0;\ if((I)&b010) (X).h= hget_float32(); else (X).h= 0.0;\ if((I)&b001) (X).v= hget_float32(); else (X).v= 0.0;\ } -/*:83*//*87:*/ -#line 1413 "hint.w" +/*:85*//*89:*/ +#line 1426 "hint.w" #define HGET_STRETCH(F,O) { Stch _st; HGET32(_st.u); (O)= _st.u&3; _st.u&= ~3; (F)= (scaled)(_st.f*ONE); } -/*:87*//*89:*/ -#line 1424 "hint.w" +/*:89*//*91:*/ +#line 1437 "hint.w" #define HGET_GLYPH(I) \ {uint8_t f; uint32_t c;\ @@ -42,16 +42,16 @@ f= HGET8; REF_RNG(font_kind,f);\ tail_append(new_character(f,c));\ } -/*:89*//*97:*/ -#line 1506 "hint.w" +/*:91*//*99:*/ +#line 1519 "hint.w" #define HGET_RULE(I)\ pointer p= new_rule();\ if ((I)&b100) HGET32(height(p)); else height(p)= null_flag;\ if ((I)&b010) HGET32(depth(p)); else depth(p)= null_flag;\ if ((I)&b001) HGET32(width(p)); else width(p)= null_flag; -/*:97*//*103:*/ -#line 1568 "hint.w" +/*:99*//*105:*/ +#line 1581 "hint.w" #define HGET_GLUE(I) \ p= get_node(glue_spec_size); \ @@ -59,13 +59,8 @@ if ((I)&b001) HGET32(width(p)); else width(p)= null_flag; if((I)&b010) HGET_STRETCH(stretch(p),stretch_order(p)) else stretch(p)= 0, stretch_order(p)= normal;\ if((I)&b001) HGET_STRETCH(shrink(p),shrink_order(p)) else shrink(p)= 0, shrink_order(p)= normal;\ if(I==b111) width(p)= hget_xdimen_node(); -/*:103*//*110:*/ -#line 1688 "hint.w" - -#define IS_LIST(X) (KIND(X)==list_kind || \ - KIND(X)==text_kind || KIND(X)==param_kind) -/*:110*//*115:*/ -#line 1845 "hint.w" +/*:105*//*115:*/ +#line 1858 "hint.w" #define HGET_BOX(I) \ p= new_null_box();\ @@ -78,7 +73,7 @@ if ((I)&b100) {int8_t x; glue_set(p)= hget_float32();\ x= x>>4; glue_sign(p)= (x<0?shrinking:(x> 0?stretching:normal));}\ list_ptr(p)= hget_list_pointer(); /*:115*//*122:*/ -#line 1969 "hint.w" +#line 1982 "hint.w" #define HGET_SET(I) \ scaled x, st, sh; uint8_t sto, sho; \ @@ -88,8 +83,8 @@ list_ptr(p)= hget_list_pointer(); HGET_STRETCH(st,sto); HGET_STRETCH(sh,sho);\ if ((I)&b100) x= hget_xdimen_node(); else x= hget_xdimen_ref(HGET8);\ list_ptr(p)= hget_list_pointer(); -/*:122*//*128:*/ -#line 2112 "hint.w" +/*:122*//*129:*/ +#line 2142 "hint.w" #define HGET_PACK(K,I) \ { pointer p; scaled x, s= 0, d; uint8_t m; \ @@ -98,11 +93,12 @@ list_ptr(p)= hget_list_pointer(); if (K==vpack_kind) HGET32(d); \ if ((I)&b100) x= hget_xdimen_node(); else x= hget_xdimen_ref(HGET8);\ p= hget_list_pointer(); \ - if (K==vpack_kind) p= vpackage(p,x,m,d); else p= hpack(p,x,m);\ + if (K==vpack_kind) { if (d<=MAX_DIMEN && d>=-MAX_DIMEN) p= vpackage(p,x,m,d); else p= vtop(p,x,m,d); } \ + else p= hpack(p,x,m);\ shift_amount(p)= s;\ happend_to_vlist(p);} -/*:128*//*132:*/ -#line 2179 "hint.w" +/*:129*//*134:*/ +#line 2227 "hint.w" #define HGET_KERN(I) \ pointer p; scaled x; \ @@ -113,8 +109,8 @@ else if (((I)&b011)==3) x= hget_xdimen_node();\ p= new_kern(x);\ if ((I)&b100) subtype(p)= explicit;\ tail_append(p); -/*:132*//*136:*/ -#line 2230 "hint.w" +/*:134*//*138:*/ +#line 2278 "hint.w" #define HGET_LEADERS(I) \ {pointer p;\ @@ -124,16 +120,16 @@ if (KIND(*hpos)==rule_kind) leader_ptr(p)= hget_rule_node(); \ else if (KIND(*hpos)==hbox_kind) leader_ptr(p)= hget_hbox_node(); \ else leader_ptr(p)= hget_vbox_node();\ tail_append(p);} -/*:136*//*140:*/ -#line 2276 "hint.w" +/*:138*//*142:*/ +#line 2324 "hint.w" #define HGET_BASELINE(I) \ cur_list.bs_pos= hpos-1; \ if((I)&b001) HGET32(cur_lsl); else cur_lsl= 0; \ if((I)&b100) cur_bs= hget_glue_spec(); else cur_bs= zero_glue; \ if((I)&b010) cur_ls= hget_glue_spec(); else cur_ls= zero_glue; -/*:140*//*145:*/ -#line 2330 "hint.w" +/*:142*//*147:*/ +#line 2378 "hint.w" #define HGET_LIG(I) \ {pointer p,q;uint8_t f;\ @@ -143,8 +139,8 @@ if (q==null) QUIT("Ligature with empty list");\ p= new_ligature(f, character(q), link(q)); tail_append(p);\ link(q)= null; flush_node_list(q);\ } -/*:145*//*149:*/ -#line 2382 "hint.w" +/*:147*//*151:*/ +#line 2430 "hint.w" #define HGET_DISC(I)\ pointer p= new_disc(); \ @@ -153,8 +149,8 @@ link(q)= null; flush_node_list(q);\ else set_auto_disc(p); \ if ((I)&b010) pre_break(p)= hget_list_pointer(); \ if ((I)&b001) post_break(p)= hget_list_pointer(); -/*:149*//*155:*/ -#line 2455 "hint.w" +/*:151*//*157:*/ +#line 2503 "hint.w" #define HGET_PAR(I) \ { scaled x= 0;\ @@ -165,8 +161,8 @@ link(q)= null; flush_node_list(q);\ else if ((I)!=b100) q= hget_param_list_ref(HGET8);\ hget_paragraph(x,0,q);\ } -/*:155*//*172:*/ -#line 2940 "hint.w" +/*:157*//*178:*/ +#line 2935 "hint.w" #define HGET_MATH(I) \ { ParamDef *q; pointer p= null, a= null;\ @@ -176,8 +172,8 @@ p= hget_list_pointer(); \ if ((I)&b001) a= hget_hbox_node();\ hset_param_list(q); hdisplay(p,a,((I)&b010)!=0); hrestore_param_list();\ } -/*:172*//*178:*/ -#line 3009 "hint.w" +/*:178*//*184:*/ +#line 3004 "hint.w" #define HGET_ADJUST(I) \ { pointer p;\ @@ -185,8 +181,8 @@ hset_param_list(q); hdisplay(p,a,((I)&b010)!=0); hrestore_param_list();\ adjust_ptr(p)= hget_list_pointer(); \ tail_append(p);\ } -/*:178*//*180:*/ -#line 3025 "hint.w" +/*:184*//*186:*/ +#line 3020 "hint.w" #define HGET_TABLE(I) \ if(I&b010) ; else ;\ @@ -194,8 +190,8 @@ if ((I)&b001) ; else ;\ if ((I)&b100) hget_xdimen_node(); else hget_xdimen_ref(HGET8);\ hget_list_pointer(); \ hget_list_pointer(); -/*:180*//*185:*/ -#line 3112 "hint.w" +/*:186*//*191:*/ +#line 3107 "hint.w" #define HGET_STREAM(I) \ { ParamDef *q; pointer p;\ @@ -205,8 +201,8 @@ hget_list_pointer(); ins_ptr(p)= hget_list_pointer(); \ hset_stream_params(p,q); \ tail_append(p);} -/*:185*//*189:*/ -#line 3144 "hint.w" +/*:191*//*195:*/ +#line 3139 "hint.w" #define HGET_IMAGE(I) \ {pointer p; float32_t a= 0.0; scaled w,h;\ @@ -226,8 +222,8 @@ if (w==0 || h==0) QUIT("Incomplete dimensions in image %d",image_no(p));\ image_width(p)= w; image_height(p)= h;\ image_alt(p)= hget_list_pointer();\ tail_append(p);} -/*:189*//*193:*/ -#line 3209 "hint.w" +/*:195*//*199:*/ +#line 3204 "hint.w" #define HGET_LINK(I) \ { pointer p;\ @@ -237,22 +233,22 @@ tail_append(p);} RNG("label",label_ref(p),0,max_ref[label_kind]);\ label_has_name(p)= 0;\ tail_append(p);} -/*:193*/ -#line 7557 "hint.w" +/*:199*/ +#line 7624 "hint.w" -/*84:*/ -#line 1318 "hint.w" +/*86:*/ +#line 1331 "hint.w" #define HTEG_XDIMEN(I,X) \ if((I)&b001) (X).v= hteg_float32(); else (X).v= 0.0;\ if((I)&b010) (X).h= hteg_float32(); else (X).h= 0.0;\ if((I)&b100) HTEG32((X).w); else (X).w= 0;\ -/*:84*//*88:*/ -#line 1416 "hint.w" +/*:86*//*90:*/ +#line 1429 "hint.w" #define HTEG_STRETCH(F,O) { Stch _st; HTEG32(_st.u); (O)= _st.u&3; _st.u&= ~3; (F)= (scaled)(_st.f*ONE); } -/*:88*//*90:*/ -#line 1436 "hint.w" +/*:90*//*92:*/ +#line 1449 "hint.w" #define HTEG_GLYPH(I) \ {uint8_t f; uint32_t c;\ @@ -263,16 +259,16 @@ tail_append(p);} else if (I==4) HTEG32(c);\ tail_append(new_character(f,c));\ } -/*:90*//*98:*/ -#line 1515 "hint.w" +/*:92*//*100:*/ +#line 1528 "hint.w" #define HTEG_RULE(I)\ pointer p= new_rule();\ if ((I)&b001) HTEG32(width(p)); else width(p)= null_flag;\ if ((I)&b010) HTEG32(depth(p)); else depth(p)= null_flag;\ if ((I)&b100) HTEG32(height(p)); else height(p)= null_flag; -/*:98*//*105:*/ -#line 1581 "hint.w" +/*:100*//*107:*/ +#line 1594 "hint.w" #define HTEG_GLUE(I) \ p= get_node(glue_spec_size); \ @@ -280,13 +276,8 @@ if ((I)&b100) HTEG32(height(p)); else height(p)= null_flag; if((I)&b001) HTEG_STRETCH(shrink(p),shrink_order(p)) else shrink(p)= 0, shrink_order(p)= normal;\ if((I)&b010) HTEG_STRETCH(stretch(p),stretch_order(p)) else stretch(p)= 0, stretch_order(p)= normal;\ if((I)!=b111) { if ((I)&b100) HGET32(width(p)); else width(p)= 0; } -/*:105*//*111:*/ -#line 1692 "hint.w" - -#define IS_LIST(X) (KIND(X)==list_kind || \ - KIND(X)==text_kind || KIND(X)==param_kind) -/*:111*//*116:*/ -#line 1858 "hint.w" +/*:107*//*116:*/ +#line 1871 "hint.w" #define HTEG_BOX(I) \ p= new_null_box();\ @@ -300,7 +291,7 @@ if ((I)&b001) HTEG32(depth(p));\ HTEG32(height(p));\ node_pos= hpos-hstart-1; /*:116*//*123:*/ -#line 1981 "hint.w" +#line 1994 "hint.w" #define HTEG_SET(I) \ scaled x, st, sh; uint8_t sto, sho; \ @@ -311,8 +302,8 @@ node_pos= hpos-hstart-1; if ((I)&b010) HTEG32(shift_amount(p)); \ HTEG32(width(p));if ((I)&b001) HTEG32(depth(p));HTEG32(height(p)); \ node_pos= hpos-hstart-1; -/*:123*//*129:*/ -#line 2125 "hint.w" +/*:123*//*130:*/ +#line 2156 "hint.w" #define HTEG_PACK(K,I) \ { pointer p; scaled x, s, d; uint8_t m; \ @@ -322,10 +313,11 @@ node_pos= hpos-hstart-1; if ((I)&b010) HTEG32(s);\ if ((I)&b001) m= additional; else m= exactly; \ node_pos= hpos-hstart-1;\ - if (K==vpack_kind) p= vpackage(p,x,m,d); else p= hpack(p,x,m);\ + if (K==vpack_kind) { if (d<=MAX_DIMEN && d>=-MAX_DIMEN) p= vpackage(p,x,m,d); else p= vtop(p,x,m,d); } \ + else p= hpack(p,x,m);\ hprepend_to_vlist(p);} -/*:129*//*133:*/ -#line 2192 "hint.w" +/*:130*//*135:*/ +#line 2240 "hint.w" #define HTEG_KERN(I) \ pointer p; scaled x; \ @@ -336,8 +328,8 @@ else if (((I)&b011)==3) x= hteg_xdimen_node();\ p= new_kern(x);\ if ((I)&b100) subtype(p)= explicit;\ tail_append(p); -/*:133*//*137:*/ -#line 2241 "hint.w" +/*:135*//*139:*/ +#line 2289 "hint.w" #define HTEG_LEADERS(I) \ {pointer p,q;\ @@ -347,16 +339,16 @@ else q= hteg_vbox_node();\ if ((I)&b100) p= hteg_glue_node(); else {p= spec2glue(zero_glue); incr(glue_ref_count(zero_glue));} \ leader_ptr(p)= q;subtype(p)= a_leaders+((I)&b011)-1;\ tail_append(p);} -/*:137*//*141:*/ -#line 2284 "hint.w" +/*:139*//*143:*/ +#line 2332 "hint.w" #define HTEG_BASELINE(I) \ if((I)&b010) cur_ls= hteg_glue_spec(); else cur_ls= zero_glue; \ if((I)&b100) cur_bs= hteg_glue_spec(); else cur_bs= zero_glue; \ if((I)&b001) HTEG32(cur_lsl); else cur_lsl= 0; \ cur_list.bs_pos= hpos-1; -/*:141*//*146:*/ -#line 2341 "hint.w" +/*:143*//*148:*/ +#line 2389 "hint.w" #define HTEG_LIG(I) \ {pointer p,q;\ @@ -367,8 +359,8 @@ p= new_ligature(0, character(q), link(q)); tail_append(p);\ link(q)= null; flush_node_list(q);\ font(lig_char(p))= HTEG8;\ } -/*:146*//*150:*/ -#line 2392 "hint.w" +/*:148*//*152:*/ +#line 2440 "hint.w" #define HTEG_DISC(I)\ pointer p= new_disc(); \ @@ -377,8 +369,8 @@ font(lig_char(p))= HTEG8;\ if ((I)&b100) {uint8_t r; r= HTEG8; set_replace_count(p,r); \ if ((r&0x80)==0) set_auto_disc(p); }\ else set_auto_disc(p); -/*:150*//*173:*/ -#line 2951 "hint.w" +/*:152*//*179:*/ +#line 2946 "hint.w" #define HTEG_MATH(I) \ { ParamDef *q; pointer p= null, a= null;\ @@ -388,8 +380,8 @@ if ((I)&b010) a= hteg_hbox_node(); \ if ((I)&b100) q= hteg_param_list_node(); else q= hget_param_list_ref(HTEG8);\ hset_param_list(q); hdisplay(p,a,((I)&b010)!=0); hrestore_param_list();\ } -/*:173*//*181:*/ -#line 3034 "hint.w" +/*:179*//*187:*/ +#line 3029 "hint.w" #define HTEG_TABLE(I) \ if(I&b010) ; else ;\ @@ -397,8 +389,8 @@ if ((I)&b001) ; else ;\ hteg_list_pointer(); \ hteg_list_pointer(); \ if ((I)&b100) hteg_xdimen_node(); else hget_xdimen_ref(HTEG8); -/*:181*//*186:*/ -#line 3123 "hint.w" +/*:187*//*192:*/ +#line 3118 "hint.w" #define HTEG_STREAM(I) \ {pointer p= get_node(ins_node_size); type(p)= ins_node;\ @@ -407,8 +399,8 @@ if ((I)&b100) hteg_xdimen_node(); else hget_xdimen_ref(HTEG8); else {ParamDef *q= hget_param_list_ref(HTEG8); hset_stream_params(p,q);}\ subtype(p)= HTEG8;RNG("Stream",subtype(p),1,254);\ tail_append(p);} -/*:186*//*190:*/ -#line 3165 "hint.w" +/*:192*//*196:*/ +#line 3160 "hint.w" #define HTEG_IMAGE(I) \ { pointer p; float32_t a= 0.0; scaled w,h;\ @@ -429,8 +421,8 @@ HTEG16(image_no(p));RNG("Section number",image_no(p),3,max_section_no); \ if (w==0 || h==0) QUIT("Incomplete dimensions in image %d",image_no(p));\ image_width(p)= w; image_height(p)= h;\ tail_append(p);} -/*:190*//*194:*/ -#line 3220 "hint.w" +/*:196*//*200:*/ +#line 3215 "hint.w" #define HTEG_LINK(I) \ { pointer p;\ @@ -440,8 +432,8 @@ tail_append(p);} RNG("label",label_ref(p),0,max_ref[label_kind]);\ label_has_name(p)= 0;\ tail_append(p);} -/*:194*/ -#line 7558 "hint.w" +/*:200*/ +#line 7625 "hint.w" /*21:*/ @@ -472,7 +464,7 @@ typedef struct ParamDef{ struct ParamDef*next; Param p;}ParamDef; /*:37*/ -#line 7560 "hint.w" +#line 7627 "hint.w" @@ -547,47 +539,47 @@ PageDef*cur_page; hint_Outline*hint_outlines= NULL; int outline_no= -1; -/*:65*//*162:*/ -#line 2781 "hint.w" +/*:65*//*168:*/ +#line 2775 "hint.w" static ParamDef*line_break_params= NULL; -/*:162*//*205:*/ -#line 3520 "hint.w" +/*:168*//*211:*/ +#line 3515 "hint.w" static scaled page_height; static scaled top_so_far[8]; -/*:205*//*220:*/ -#line 3798 "hint.w" +/*:211*//*226:*/ +#line 3793 "hint.w" static uint32_t map[0x10000]; -/*:220*//*225:*/ -#line 3862 "hint.w" +/*:226*//*231:*/ +#line 3857 "hint.w" #define MAX_PAGE_POS (1<<3) uint64_t page_loc[MAX_PAGE_POS]; int cur_loc; static int lo_loc,hi_loc; -/*:225*//*242:*/ -#line 4257 "hint.w" +/*:231*//*248:*/ +#line 4254 "hint.w" scaled hvsize,hhsize; -/*:242*//*244:*/ -#line 4285 "hint.w" +/*:248*//*250:*/ +#line 4282 "hint.w" int page_v,page_h,offset_v,offset_h; -/*:244*//*299:*/ -#line 5496 "hint.w" +/*:250*//*308:*/ +#line 5552 "hint.w" hint_Link*hint_links= NULL; int max_link= -1; -/*:299*//*360:*/ -#line 7240 "hint.w" +/*:308*//*369:*/ +#line 7307 "hint.w" -jmp_buf error_exit; -char herror_string[MAX_HERROR]; -/*:360*/ -#line 7563 "hint.w" +jmp_buf hint_error_exit; +char hint_error_string[MAX_HINT_ERROR]; +/*:369*/ +#line 7630 "hint.w" /*3:*/ #line 211 "hint.w" @@ -612,21 +604,25 @@ static pointer hprepend_to_vlist(pointer b); static pointer hget_glue_spec(void); static pointer hget_disc_node(void); -/*:36*//*104:*/ -#line 1577 "hint.w" +/*:36*//*77:*/ +#line 1206 "hint.w" + +static void tag_mismatch(uint8_t a,uint8_t z,uint32_t a_pos,uint32_t z_pos); +/*:77*//*106:*/ +#line 1590 "hint.w" static scaled hget_xdimen_node(void); -/*:104*//*117:*/ -#line 1874 "hint.w" +/*:106*//*117:*/ +#line 1887 "hint.w" static pointer hget_list_pointer(void); static pointer hteg_list_pointer(void); /*:117*//*124:*/ -#line 1992 "hint.w" +#line 2005 "hint.w" static scaled hget_xdimen_node(void); /*:124*/ -#line 7564 "hint.w" +#line 7631 "hint.w" /*9:*/ #line 268 "hint.w" @@ -695,7 +691,7 @@ while(KIND(*hpos)!=font_kind) {Kind k; uint8_t n; /*74:*/ -#line 1180 "hint.w" +#line 1184 "hint.w" uint8_t a,z; HGETTAG(a); @@ -711,12 +707,10 @@ QUIT("Font parameter %d has invalid type %s",n,content_name[n]); RNG("Font parameter",n,0,MAX_FONT_PARAMS); f->p[n]= hget_definition(a); /*75:*/ -#line 1185 "hint.w" +#line 1189 "hint.w" HGETTAG(z); -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); +if(a!=z)tag_mismatch(a,z,node_pos,hpos-hstart-1); /*:75*/ #line 540 "hint.w" @@ -764,7 +758,7 @@ QUIT("list end after before stream end\n"); while(hpos<list_end) {ParamDef*r;Param*q; /*74:*/ -#line 1180 "hint.w" +#line 1184 "hint.w" uint8_t a,z; HGETTAG(a); @@ -781,12 +775,10 @@ else if(KIND(a)==dimen_kind)q->v= hget_dimen_def(a); else if(KIND(a)==glue_kind)q->v= hget_glue_def(a); else TAGERR(a); /*75:*/ -#line 1185 "hint.w" +#line 1189 "hint.w" HGETTAG(z); -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); +if(a!=z)tag_mismatch(a,z,node_pos,hpos-hstart-1); /*:75*/ #line 660 "hint.w" @@ -805,7 +797,7 @@ ParamDef*hget_param_list_node(void) else {ParamDef*p; /*74:*/ -#line 1180 "hint.w" +#line 1184 "hint.w" uint8_t a,z; HGETTAG(a); @@ -814,12 +806,10 @@ HGETTAG(a); p= hget_param_list(a); /*75:*/ -#line 1185 "hint.w" +#line 1189 "hint.w" HGETTAG(z); -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); +if(a!=z)tag_mismatch(a,z,node_pos,hpos-hstart-1); /*:75*/ #line 677 "hint.w" @@ -917,7 +907,7 @@ return false; else {uint8_t n; /*74:*/ -#line 1180 "hint.w" +#line 1184 "hint.w" uint8_t a,z; HGETTAG(a); @@ -951,12 +941,10 @@ s->a= hget_list_pointer(); s->h= hget_glue_spec(); } /*75:*/ -#line 1185 "hint.w" +#line 1189 "hint.w" HGETTAG(z); -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); +if(a!=z)tag_mismatch(a,z,node_pos,hpos-hstart-1); /*:75*/ #line 872 "hint.w" @@ -991,7 +979,7 @@ hskip_list(); while(hget_stream_def(cur_page->s))continue; } /*:61*//*72:*/ -#line 1116 "hint.w" +#line 1120 "hint.w" static pointer hget_ligature_ref(uint8_t n) {REF_RNG(ligature_kind,n); @@ -1021,8 +1009,15 @@ return copy_node_list(pointer_def[leaders_kind][n]); -/*:72*//*85:*/ -#line 1325 "hint.w" +/*:72*//*76:*/ +#line 1199 "hint.w" + +static void tag_mismatch(uint8_t a,uint8_t z,uint32_t a_pos,uint32_t z_pos) +{QUIT("Tag mismatch [%s,%d]!=[%s,%d] at 0x%x to 0x%x\n", +NAME(a),INFO(a),NAME(z),INFO(z),a_pos,z_pos); +} +/*:76*//*87:*/ +#line 1338 "hint.w" static void hget_xdimen_def(Info i,Xdimen*x) @@ -1053,61 +1048,57 @@ hget_xdimen_def(i,&x); return xdimen(&x); } +static void tag_expected(uint8_t b,uint8_t a,uint32_t a_pos) +{QUIT("%s expected at 0x%x got [%s,%d]",NAME(b),a_pos,NAME(a),INFO(a)); +} + static scaled hget_xdimen_node(void) {scaled x= 0; /*74:*/ -#line 1180 "hint.w" +#line 1184 "hint.w" uint8_t a,z; HGETTAG(a); /*:74*/ -#line 1357 "hint.w" +#line 1374 "hint.w" if(KIND(a)==xdimen_kind) x= hget_xdimen(INFO(a)); -else -QUIT("Extent expected at 0x%x got %s",node_pos,NAME(a)); +else tag_expected(TAG(xdimen_kind,0),a,node_pos); /*75:*/ -#line 1185 "hint.w" +#line 1189 "hint.w" HGETTAG(z); -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); +if(a!=z)tag_mismatch(a,z,node_pos,hpos-hstart-1); /*:75*/ -#line 1362 "hint.w" +#line 1378 "hint.w" return x; } static void hget_xdimen_def_node(Xdimen*x) {/*74:*/ -#line 1180 "hint.w" +#line 1184 "hint.w" uint8_t a,z; HGETTAG(a); /*:74*/ -#line 1367 "hint.w" +#line 1383 "hint.w" if(KIND(a)==xdimen_kind) hget_xdimen_def(INFO(a),x); -else -QUIT("Extent expected at 0x%x got %s",node_pos,NAME(a)); +else tag_expected(TAG(xdimen_kind,0),a,node_pos); /*75:*/ -#line 1185 "hint.w" +#line 1189 "hint.w" HGETTAG(z); -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); +if(a!=z)tag_mismatch(a,z,node_pos,hpos-hstart-1); /*:75*/ -#line 1372 "hint.w" +#line 1387 "hint.w" } - - -/*:85*//*86:*/ -#line 1378 "hint.w" +/*:87*//*88:*/ +#line 1391 "hint.w" scaled hteg_xdimen(uint8_t a) {Xdimen x; @@ -1123,68 +1114,62 @@ case TAG(xdimen_kind,b110):HTEG_XDIMEN(b110,x);break; case TAG(xdimen_kind,b111):HTEG_XDIMEN(b111,x);break; default: x.w= 0;x.h= x.v= 0.0; -QUIT("Extent expected got [%s,%d]",NAME(a),INFO(a)); +tag_expected(TAG(xdimen_kind,0),a,node_pos); } return xdimen(&x); } scaled hteg_xdimen_node(void) {scaled x= 0; -/*78:*/ -#line 1241 "hint.w" +/*80:*/ +#line 1257 "hint.w" uint8_t a,z; z= HTEG8,DBGTAG(z,hpos); -/*:78*/ -#line 1400 "hint.w" +/*:80*/ +#line 1413 "hint.w" if(KIND(z)==xdimen_kind) x= hteg_xdimen(z); else -QUIT("Extent expected at 0x%x got %s",node_pos,NAME(z)); -/*79:*/ -#line 1246 "hint.w" +tag_expected(TAG(xdimen_kind,0),z,node_pos); +/*81:*/ +#line 1262 "hint.w" a= HTEG8,DBGTAG(a,hpos); -if(z!=a) -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); - -/*:79*/ -#line 1405 "hint.w" +if(z!=a)tag_mismatch(a,z,hpos-hstart,node_pos); +/*:81*/ +#line 1418 "hint.w" return x; } -/*:86*//*102:*/ -#line 1553 "hint.w" +/*:88*//*104:*/ +#line 1566 "hint.w" static pointer hteg_rule_node(void) {pointer q= null; -/*78:*/ -#line 1241 "hint.w" +/*80:*/ +#line 1257 "hint.w" uint8_t a,z; z= HTEG8,DBGTAG(z,hpos); -/*:78*/ -#line 1556 "hint.w" +/*:80*/ +#line 1569 "hint.w" if(KIND(z)==rule_kind){HTEG_RULE(INFO(z));q= p;} -else QUIT("Rule expected at 0x%x got %s",node_pos,NAME(z)); -/*79:*/ -#line 1246 "hint.w" +else tag_expected(TAG(rule_kind,0),z,node_pos); +/*81:*/ +#line 1262 "hint.w" a= HTEG8,DBGTAG(a,hpos); -if(z!=a) -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); - -/*:79*/ -#line 1559 "hint.w" +if(z!=a)tag_mismatch(a,z,hpos-hstart,node_pos); +/*:81*/ +#line 1572 "hint.w" return q; } -/*:102*//*108:*/ -#line 1622 "hint.w" +/*:104*//*110:*/ +#line 1635 "hint.w" static pointer hget_glue_spec(void) {pointer p= null; @@ -1199,14 +1184,12 @@ if(INFO(a)==b000) else {HGET_GLUE(INFO(a));} /*75:*/ -#line 1185 "hint.w" +#line 1189 "hint.w" HGETTAG(z); -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); +if(a!=z)tag_mismatch(a,z,node_pos,hpos-hstart-1); /*:75*/ -#line 1635 "hint.w" +#line 1648 "hint.w" } return p; @@ -1222,8 +1205,8 @@ return p; static pointer hget_glue_node(void) {return spec2glue(hget_glue_spec()); } -/*:108*//*109:*/ -#line 1652 "hint.w" +/*:110*//*111:*/ +#line 1665 "hint.w" static pointer hteg_glue_spec(void) {pointer p= null; @@ -1234,16 +1217,13 @@ z= HTEG8,DBGTAG(z,hpos); if(INFO(z)==b000)p= hget_glue_ref(HTEG8); else {HTEG_GLUE(INFO(z));} -/*79:*/ -#line 1246 "hint.w" +/*81:*/ +#line 1262 "hint.w" a= HTEG8,DBGTAG(a,hpos); -if(z!=a) -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); - -/*:79*/ -#line 1662 "hint.w" +if(z!=a)tag_mismatch(a,z,hpos-hstart,node_pos); +/*:81*/ +#line 1675 "hint.w" return p; } @@ -1254,8 +1234,8 @@ static pointer hteg_glue_node(void) if(p!=null)return spec2glue(p); else return new_glue(zero_glue); } -/*:109*//*112:*/ -#line 1697 "hint.w" +/*:111*//*112:*/ +#line 1700 "hint.w" static pointer hget_node_list(uint32_t s) {uint8_t*list_end= hpos+s; @@ -1273,68 +1253,75 @@ return p; static pointer hget_text_list(uint32_t s); static pointer hget_list_pointer(void) -{if(!IS_LIST(*hpos))return null; -else {pointer p= null; uint32_t s,t; -/*74:*/ -#line 1180 "hint.w" +if(KIND(*hpos)==list_kind) +{/*74:*/ +#line 1184 "hint.w" uint8_t a,z; HGETTAG(a); /*:74*/ -#line 1718 "hint.w" +#line 1720 "hint.w" -s= hget_list_size(INFO(a)); +if((INFO(a)&b011)==0) +HGET8; +else +{s= hget_list_size(INFO(a)); hget_size_boundary(INFO(a)); -if(KIND(a)==list_kind) +if((INFO(a)&b100)==0) p= hget_node_list(s); -else if(KIND(a)==text_kind) +else p= hget_text_list(s); hget_size_boundary(INFO(a)); t= hget_list_size(INFO(a)); if(t!=s) -QUIT("List sizes at 0x%x and "SIZE_F" do not match 0x%x != 0x%x",node_pos+1,hpos-hstart-s-1,s,t); +QUIT("List sizes at 0x%x and "SIZE_F" do not match 0x%x != 0x%x", +node_pos+1,hpos-hstart-s-1,s,t); +} /*75:*/ -#line 1185 "hint.w" +#line 1189 "hint.w" HGETTAG(z); -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); +if(a!=z)tag_mismatch(a,z,node_pos,hpos-hstart-1); /*:75*/ -#line 1729 "hint.w" +#line 1736 "hint.w" -return p; } +return p; } /*:112*//*113:*/ -#line 1739 "hint.w" +#line 1747 "hint.w" -static void hskip_list() -{if(IS_LIST(*hpos)) -{uint32_t s; +static void hskip_list(void) +{if(KIND(*hpos)==list_kind||KIND(*hpos)==param_kind) +{Info i; uint8_t a; HGETTAG(a); -s= hget_list_size(INFO(a)); -if(s> 0) -hpos= hpos+(1+s+1+(INFO(a)-1)+1); +i= INFO(a)&0x3; +if(i==0)hpos= hpos+2; else -hpos= hpos+1; +{uint32_t s= hget_list_size(INFO(a)); +if(i==3)i= 4; +hpos= hpos+(1+s+1+i+1); +} } } -static void hskip_list_back() -{uint8_t z; -uint32_t s; -if(!IS_LIST(*(hpos-1)))return; +static void hskip_list_back(void) +{if(KIND(*(hpos-1))==list_kind||KIND(*(hpos-1))==param_kind) +{Info i; +uint8_t z; z= HTEG8; -s= hteg_list_size(INFO(z)); -if(s> 0) -hpos= hpos-(1+s+1+(INFO(z)-1)+1); +i= INFO(z)&0x3; +if(i==0)hpos= hpos-2; else -hpos= hpos-1; +{uint32_t s= hteg_list_size(INFO(z)); +if(i==3)i= 4; +hpos= hpos-(1+s+1+i+1); +} +} } pointer hteg_list_pointer(void) @@ -1347,7 +1334,7 @@ hpos= list_start; return p; } /*:113*//*114:*/ -#line 1784 "hint.w" +#line 1797 "hint.w" #if 0 static int32_t hteg_integer_def(uint8_t z) @@ -1370,13 +1357,13 @@ if(list_start<=hstart) QUIT("list start before stream start\n"); while(list_start<hpos) {ParamDef*r;Param*q; -/*78:*/ -#line 1241 "hint.w" +/*80:*/ +#line 1257 "hint.w" uint8_t a,z; z= HTEG8,DBGTAG(z,hpos); -/*:78*/ -#line 1806 "hint.w" +/*:80*/ +#line 1819 "hint.w" ALLOCATE(r,1,ParamDef); q= &(r->p); @@ -1387,16 +1374,13 @@ else if(KIND(a)==glue_kind){pointer p;HTEG_GLUE(INFO(z));q->g= p;} else TAGERR(a); q->n= HTEG8; DBG(DBGTAGS,"Defining %s %d\n",definition_name[KIND(z)],q->n); -/*79:*/ -#line 1246 "hint.w" +/*81:*/ +#line 1262 "hint.w" a= HTEG8,DBGTAG(a,hpos); -if(z!=a) -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); - -/*:79*/ -#line 1816 "hint.w" +if(z!=a)tag_mismatch(a,z,hpos-hstart,node_pos); +/*:81*/ +#line 1829 "hint.w" r->next= p; p= r; @@ -1419,56 +1403,50 @@ hpos= list_start; return p; } /*:114*//*121:*/ -#line 1943 "hint.w" +#line 1956 "hint.w" static pointer hteg_hbox_node(void) -{/*78:*/ -#line 1241 "hint.w" +{/*80:*/ +#line 1257 "hint.w" uint8_t a,z; z= HTEG8,DBGTAG(z,hpos); -/*:78*/ -#line 1945 "hint.w" +/*:80*/ +#line 1958 "hint.w" -if(KIND(z)!=hbox_kind)QUIT("Hbox expected at 0x%x got %s",node_pos,NAME(z)); +if(KIND(z)!=hbox_kind)tag_expected(TAG(hbox_kind,0),z,node_pos); {pointer p; HTEG_BOX(INFO(z)); -/*79:*/ -#line 1246 "hint.w" +/*81:*/ +#line 1262 "hint.w" a= HTEG8,DBGTAG(a,hpos); -if(z!=a) -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); - -/*:79*/ -#line 1949 "hint.w" +if(z!=a)tag_mismatch(a,z,hpos-hstart,node_pos); +/*:81*/ +#line 1962 "hint.w" return p; } } static pointer hteg_vbox_node(void) -{/*78:*/ -#line 1241 "hint.w" +{/*80:*/ +#line 1257 "hint.w" uint8_t a,z; z= HTEG8,DBGTAG(z,hpos); -/*:78*/ -#line 1954 "hint.w" +/*:80*/ +#line 1967 "hint.w" -if(KIND(z)!=vbox_kind)QUIT("Vbox expected at 0x%x got %s",node_pos,NAME(z)); +if(KIND(z)!=vbox_kind)tag_expected(TAG(vbox_kind,0),z,node_pos); {pointer p; HTEG_BOX(INFO(z)); -/*79:*/ -#line 1246 "hint.w" +/*81:*/ +#line 1262 "hint.w" a= HTEG8,DBGTAG(a,hpos); -if(z!=a) -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); - -/*:79*/ -#line 1958 "hint.w" +if(z!=a)tag_mismatch(a,z,hpos-hstart,node_pos); +/*:81*/ +#line 1971 "hint.w" type(p)= vlist_node; return p; @@ -1476,7 +1454,7 @@ return p; } /*:121*//*127:*/ -#line 2040 "hint.w" +#line 2052 "hint.w" static void hset(pointer p, uint8_t sto,scaled st,uint8_t sho,scaled sh,scaled w) @@ -1510,8 +1488,8 @@ if((sh<-x)&&(sho==normal)&&(list_ptr(p)!=null)) glue_set(p)= 1.0; } } - - +/*:127*//*128:*/ +#line 2095 "hint.w" void vset(pointer p,uint8_t sto,scaled st, @@ -1543,9 +1521,35 @@ else glue_set(p)= 0.0; } } +if(depth(p)==MAX_DIMEN+1) +{if(list_ptr(p)!=null&&(type(list_ptr(p))==hlist_node||type(list_ptr(p))==vlist_node||type(list_ptr(p))==rule_node)) +{h= height(list_ptr(p)); +depth(p)= height(p)-h; +height(p)= h; } -/*:127*//*144:*/ -#line 2319 "hint.w" +else +{depth(p)= depth(p)+height(p);height(p)= 0;} +DBG(DBGTEX,"vset top node adjusted height=%f depth=%f\n",height(p)/(double)ONE,depth(p)/(double)ONE); +} +} +/*:128*//*133:*/ +#line 2209 "hint.w" + +static pointer vtop(pointer p,scaled h,small_number m,scaled d) +{d= d^0x40000000; +p= vpackage(p,h,m,d); +if(list_ptr(p)!=null&&(type(list_ptr(p))==hlist_node||type(list_ptr(p))==vlist_node||type(list_ptr(p))==rule_node)) +{h= height(list_ptr(p)); +depth(p)= depth(p)+height(p)-h; +height(p)= h; +} +else +{depth(p)= depth(p)+height(p);height(p)= 0;} +DBG(DBGTEX,"vpack top node adjusted height=%f depth=%f\n",height(p)/(double)ONE,depth(p)/(double)ONE); +return p; +} +/*:133*//*146:*/ +#line 2367 "hint.w" static pointer hget_text_list(uint32_t s) {pointer p= null; @@ -1554,37 +1558,35 @@ uint8_t*t= hpos+s; while(hpos<t){*pp= new_character(0,hget_utf8());pp= &link(*pp);} return p; } -/*:144*//*153:*/ -#line 2426 "hint.w" +/*:146*//*155:*/ +#line 2474 "hint.w" static pointer hget_disc_node(void) {/*74:*/ -#line 1180 "hint.w" +#line 1184 "hint.w" uint8_t a,z; HGETTAG(a); /*:74*/ -#line 2428 "hint.w" +#line 2476 "hint.w" if(KIND(a)!=disc_kind||INFO(a)==b000) -QUIT("Hyphen expected at 0x%x got %s,%d",node_pos,NAME(a),INFO(a)); +tag_expected(TAG(disc_kind,1),a,node_pos); { HGET_DISC(INFO(a)); /*75:*/ -#line 1185 "hint.w" +#line 1189 "hint.w" HGETTAG(z); -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); +if(a!=z)tag_mismatch(a,z,node_pos,hpos-hstart-1); /*:75*/ -#line 2433 "hint.w" +#line 2481 "hint.w" return p; } } -/*:153*//*157:*/ -#line 2501 "hint.w" +/*:155*//*159:*/ +#line 2549 "hint.w" static void transplant_post_break_list(void) {pointer r,q= link(head); @@ -1612,7 +1614,7 @@ tail= q; } -static void hprune_unwanted_nodes(void) +void hprune_unwanted_nodes(void) {pointer q,r= head; while(true){q= link(r); if(q==null)goto done; @@ -1626,26 +1628,46 @@ done:if(r!=head) link(head)= q; } } -/*:157*//*158:*/ -#line 2568 "hint.w" +/*:159*//*161:*/ +#line 2622 "hint.w" pointer hget_paragraph_all(scaled x) -{ -uint32_t s,t; +{uint8_t*to; +/*162:*/ +#line 2636 "hint.w" + +pointer par_ptr= null; +if(KIND(*hpos)==list_kind) +{uint32_t s,t; +/*74:*/ +#line 1184 "hint.w" + uint8_t a,z; -if(!IS_LIST(*hpos))return null; HGETTAG(a); +/*:74*/ +#line 2640 "hint.w" + +if((INFO(a)&b011)==0) +HGET8; +else if(INFO(a)&b100) +QUIT("Text in paragraph not yet implemented"); +else +{uint8_t*list_end; s= hget_list_size(INFO(a)); hget_size_boundary(INFO(a)); -if(KIND(a)==list_kind) -{uint8_t*list_end= hpos+s; +list_end= hpos+s; cur_list.hs_field= x; push_nest(); cur_list.bs_pos= NULL; -#if 0 -if(offset> 0)hpos= hstart+node_pos1+offset; -#endif -while(hpos<list_end) + +/*:162*/ +#line 2625 "hint.w" + +to= list_end; +/*163:*/ +#line 2656 "hint.w" + +while(hpos<to) {hget_content(); if(nest_ptr==1) {pointer p= tail; @@ -1653,87 +1675,98 @@ if(p!=head&&!is_char_node(p)&& (type(p)==glue_node||type(p)==kern_node||type(p)==penalty_node ||type(p)==disc_node||type(p)==math_node)) store_map(p,node_pos,0); +} +} + +/*:163*/ +#line 2627 "hint.w" + +/*164:*/ +#line 2670 "hint.w" +if(head!=tail) +{par_ptr= link(head); +store_map(par_ptr,node_pos,0); +if(needs_bs) +QUIT("Unexpected trailing baseline node"); } +pop_nest(); } hget_size_boundary(INFO(a)); t= hget_list_size(INFO(a)); if(t!=s) -QUIT("List sizes at 0x%x and "SIZE_F" do not match 0x%x != 0x%x",node_pos+1,hpos-hstart-s-1,s,t); +QUIT("List sizes at 0x%x and "SIZE_F" do not match 0x%x != 0x%x", +node_pos+1,hpos-hstart-s-1,s,t); /*75:*/ -#line 1185 "hint.w" +#line 1189 "hint.w" HGETTAG(z); -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); +if(a!=z)tag_mismatch(a,z,node_pos,hpos-hstart-1); /*:75*/ -#line 2600 "hint.w" +#line 2684 "hint.w" -#if 0 -if(offset> 0&&link(head)!=null&&!is_char_node(link(head))) -{if(type(link(head))==disc_node) -transplant_post_break_list(); -else -hprune_unwanted_nodes(); } -#endif -if(needs_bs) -QUIT("Unexpected trailing baseline node"); -if(head==tail) -{pop_nest(); -return null; -} -else -{pointer par_ptr= link(head); -pop_nest(); -store_map(par_ptr,node_pos,0); + + + +/*:164*/ +#line 2628 "hint.w" + return par_ptr; } -} -else -QUIT("Text in paragraph not yet implemented"); -return null; -} -/*:158*//*159:*/ -#line 2631 "hint.w" + +/*:161*//*165:*/ +#line 2695 "hint.w" pointer hget_paragraph_final(scaled x,uint8_t*from) -{ -uint32_t s,t; +{uint8_t*to; +/*162:*/ +#line 2636 "hint.w" + +pointer par_ptr= null; +if(KIND(*hpos)==list_kind) +{uint32_t s,t; +/*74:*/ +#line 1184 "hint.w" + uint8_t a,z; -if(!IS_LIST(*hpos))return null; HGETTAG(a); +/*:74*/ +#line 2640 "hint.w" + +if((INFO(a)&b011)==0) +HGET8; +else if(INFO(a)&b100) +QUIT("Text in paragraph not yet implemented"); +else +{uint8_t*list_end; s= hget_list_size(INFO(a)); hget_size_boundary(INFO(a)); -if(KIND(a)==list_kind) -{uint8_t*list_end= hpos+s; +list_end= hpos+s; cur_list.hs_field= x; push_nest(); cur_list.bs_pos= NULL; -hpos= from; -while(hpos<list_end) + +/*:162*/ +#line 2698 "hint.w" + +hpos= from;to= list_end; +/*163:*/ +#line 2656 "hint.w" + +while(hpos<to) {hget_content(); if(nest_ptr==1) {pointer p= tail; if(p!=head&&!is_char_node(p)&& -(type(p)==glue_node||type(p)==kern_node||type(p)==penalty_node||type(p)==disc_node||type(p)==math_node)) +(type(p)==glue_node||type(p)==kern_node||type(p)==penalty_node +||type(p)==disc_node||type(p)==math_node)) store_map(p,node_pos,0); } } -hget_size_boundary(INFO(a)); -t= hget_list_size(INFO(a)); -if(t!=s) -QUIT("List sizes at 0x%x and "SIZE_F" do not match 0x%x != 0x%x",node_pos+1,hpos-hstart-s-1,s,t); -/*75:*/ -#line 1185 "hint.w" -HGETTAG(z); -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); -/*:75*/ -#line 2659 "hint.w" +/*:163*/ +#line 2700 "hint.w" if(link(head)!=null&&!is_char_node(link(head))) {if(type(link(head))==disc_node) @@ -1741,25 +1774,41 @@ transplant_post_break_list(); else hprune_unwanted_nodes(); } +/*164:*/ +#line 2670 "hint.w" + +if(head!=tail) +{par_ptr= link(head); +store_map(par_ptr,node_pos,0); if(needs_bs) QUIT("Unexpected trailing baseline node"); -if(head==tail) -{pop_nest(); -return null; } -else -{pointer par_ptr= link(head); pop_nest(); -store_map(par_ptr,node_pos,0); -return par_ptr; } +hget_size_boundary(INFO(a)); +t= hget_list_size(INFO(a)); +if(t!=s) +QUIT("List sizes at 0x%x and "SIZE_F" do not match 0x%x != 0x%x", +node_pos+1,hpos-hstart-s-1,s,t); +/*75:*/ +#line 1189 "hint.w" + +HGETTAG(z); +if(a!=z)tag_mismatch(a,z,node_pos,hpos-hstart-1); +/*:75*/ +#line 2684 "hint.w" + } -else -QUIT("Text in paragraph not yet implemented"); -return null; + + + +/*:164*/ +#line 2707 "hint.w" + +return par_ptr; } -/*:159*//*165:*/ -#line 2798 "hint.w" +/*:165*//*171:*/ +#line 2792 "hint.w" pointer hget_paragraph(scaled x,uint32_t offset,ParamDef*q) { @@ -1785,33 +1834,32 @@ void hget_par_node(uint32_t offset) {scaled x= 0; ParamDef*q; /*74:*/ -#line 1180 "hint.w" +#line 1184 "hint.w" uint8_t a,z; HGETTAG(a); /*:74*/ -#line 2822 "hint.w" +#line 2816 "hint.w" +node_pos= (hpos-hstart)-1; if(KIND(a)!=par_kind) -QUIT("Paragrap expected found tag [%s,%d] at "SIZE_F"\n",NAME(a),INFO(a),hpos-hstart); +tag_expected(TAG(par_kind,0),a,node_pos); node_pos= (hpos-hstart)-1; if(INFO(a)==b100)q= hget_param_list_ref(HGET8); if(INFO(a)&b100)x= hget_xdimen_node();else x= hget_xdimen_ref(HGET8); if(INFO(a)&b010)q= hget_param_list_node();else q= hget_param_list_ref(HGET8); hget_paragraph(x,offset,q); /*75:*/ -#line 1185 "hint.w" +#line 1189 "hint.w" HGETTAG(z); -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); +if(a!=z)tag_mismatch(a,z,node_pos,hpos-hstart-1); /*:75*/ -#line 2830 "hint.w" +#line 2825 "hint.w" } -/*:165*//*168:*/ -#line 2852 "hint.w" +/*:171*//*174:*/ +#line 2847 "hint.w" void hteg_paragraph(Info i) {scaled x= 0; @@ -1831,8 +1879,8 @@ node_pos= par_start-hstart-1; hpos= list_start; cur_list.bs_pos= NULL; par_head= hget_paragraph(x,0,q); -/*169:*/ -#line 2884 "hint.w" +/*175:*/ +#line 2879 "hint.w" {pointer p,r,par_tail; p= null; @@ -1853,13 +1901,13 @@ tail= par_tail; if(type(tail)==hlist_node||type(tail)==vlist_node) prev_height= height(tail); } -/*:169*/ -#line 2871 "hint.w" +/*:175*/ +#line 2866 "hint.w" hpos= par_start; } -/*:168*//*184:*/ -#line 3095 "hint.w" +/*:174*//*190:*/ +#line 3090 "hint.w" static void hset_stream_params(pointer p,ParamDef*q) {pointer s; @@ -1874,15 +1922,15 @@ height(p)= height(s)+depth(s); ins_ptr(p)= list_ptr(s); list_ptr(s)= null;flush_node_list(s); } -/*:184*//*224:*/ -#line 3840 "hint.w" +/*:190*//*230:*/ +#line 3835 "hint.w" uint64_t hlocation(pointer p) {return PAGE_LOC(map[p],map[p+1]); } -/*:224*//*227:*/ -#line 3886 "hint.w" +/*:230*//*233:*/ +#line 3881 "hint.w" #define NEXT_PAGE(X) (X= (X+1)&(MAX_PAGE_POS-1)) #define PREV_PAGE(X) (X= (X-1)&(MAX_PAGE_POS-1)) @@ -1914,8 +1962,8 @@ return true; } -/*:227*//*230:*/ -#line 3948 "hint.w" +/*:233*//*236:*/ +#line 3943 "hint.w" void hloc_set(uint64_t h) @@ -1923,13 +1971,15 @@ void hloc_set(uint64_t h) if(page_loc[cur_loc]==h)return; for(i= lo_loc,NEXT_PAGE(i);i!=hi_loc;NEXT_PAGE(i)) if(page_loc[i]==h) -{cur_loc= i;return;} +{cur_loc= i; +DBG(DBGPAGE,"loc_set: %d < %d < %d\n",lo_loc,cur_loc,hi_loc); +return;} page_loc[cur_loc]= h; hloc_clear(); DBG(DBGPAGE,"loc_set: %d < %d < %d\n",lo_loc,cur_loc,hi_loc); } -/*:230*//*231:*/ -#line 3972 "hint.w" +/*:236*//*237:*/ +#line 3969 "hint.w" void hloc_set_next(pointer p) @@ -1951,8 +2001,8 @@ hi_loc= i; } DBG(DBGPAGE,"loc_set_next: %d < %d < %d\n",lo_loc,cur_loc,hi_loc); } -/*:231*//*232:*/ -#line 4009 "hint.w" +/*:237*//*238:*/ +#line 4006 "hint.w" void hloc_set_prev(pointer p) {int i= cur_loc; @@ -1974,8 +2024,8 @@ NEXT_PAGE(hi_loc); cur_loc= i; DBG(DBGPAGE,"loc_set_prev: %d < %d < %d\n",lo_loc,cur_loc,hi_loc); } -/*:232*//*245:*/ -#line 4295 "hint.w" +/*:238*//*251:*/ +#line 4292 "hint.w" static void hset_margins(void) {if(cur_page==&(page_def[0])){ @@ -1999,8 +2049,8 @@ offset_h= (page_h-hhsize)/2; offset_v= (page_v-hvsize)/2; } } -/*:245*//*247:*/ -#line 4327 "hint.w" +/*:251*//*253:*/ +#line 4324 "hint.w" static void houtput_template(pointer p) {pointer q,r; @@ -2020,8 +2070,8 @@ list_ptr(q)= r; shift_amount(p)+= offset_h; streams[0].p= q; } -/*:247*//*272:*/ -#line 4974 "hint.w" +/*:253*//*280:*/ +#line 5018 "hint.w" static int trv_string_size= 0; static char trv_string[256]; @@ -2049,8 +2099,8 @@ trv_hlist(p); trv_string[trv_string_size]= 0; return trv_string; } -/*:272*//*370:*/ -#line 7474 "hint.w" +/*:280*//*379:*/ +#line 7541 "hint.w" static pointer leaks[1<<16]= {0}; @@ -2090,8 +2140,8 @@ if(leaks[i]!=0) fprintf(stderr,"ERROR:leak final: p=%d, s=%d\n",i,leaks[i]); #endif } -/*:370*/ -#line 7565 "hint.w" +/*:379*/ +#line 7632 "hint.w" /*1:*/ #line 126 "hint.w" @@ -2100,7 +2150,7 @@ void hget_def_node(void) {Kind k; int n; /*74:*/ -#line 1180 "hint.w" +#line 1184 "hint.w" uint8_t a,z; HGETTAG(a); @@ -2132,12 +2182,10 @@ if(n> max_ref[k]||n<=max_fixed[k]) QUIT("Definition %d for %s out of range [%d - %d]", n,definition_name[k],max_fixed[k]+1,max_ref[k]); /*75:*/ -#line 1185 "hint.w" +#line 1189 "hint.w" HGETTAG(z); -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); +if(a!=z)tag_mismatch(a,z,node_pos,hpos-hstart-1); /*:75*/ #line 155 "hint.w" @@ -2425,12 +2473,16 @@ t->title= strdup(hlist_to_string(t->p)); /*71:*/ #line 1102 "hint.w" -where= labels[n].where; +if(labels==NULL||n> max_ref[label_kind]) +{where= LABEL_TOP;pos= 0;} +else +{where= labels[n].where; #if 1 pos= ((uint64_t)labels[n].pos<<32)+(labels[n].pos-labels[n].pos0); #else pos= ((uint64_t)labels[n].pos0<<32); #endif +} /*:71*/ #line 1096 "hint.w" @@ -2458,63 +2510,59 @@ DBG(DBGDEF,"Label 0x%x+0x%x where=%d font=%d\n",t->pos0,t->pos,t->where,t->f); } /*:68*//*73:*/ -#line 1166 "hint.w" +#line 1170 "hint.w" static void hget_content_section() {DBG(DBGDIR,"Reading Content Section\n"); hget_section(2); } -/*:73*//*101:*/ -#line 1542 "hint.w" +/*:73*//*103:*/ +#line 1555 "hint.w" pointer hget_rule_node(void) {pointer q= null; /*74:*/ -#line 1180 "hint.w" +#line 1184 "hint.w" uint8_t a,z; HGETTAG(a); /*:74*/ -#line 1545 "hint.w" +#line 1558 "hint.w" if(KIND(a)==rule_kind){HGET_RULE(INFO(a));q= p;} -else QUIT("Rule expected at 0x%x got %s",node_pos,NAME(a)); +else tag_expected(TAG(rule_kind,0),a,node_pos); /*75:*/ -#line 1185 "hint.w" +#line 1189 "hint.w" HGETTAG(z); -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); +if(a!=z)tag_mismatch(a,z,node_pos,hpos-hstart-1); /*:75*/ -#line 1548 "hint.w" +#line 1561 "hint.w" return q; } -/*:101*//*120:*/ -#line 1918 "hint.w" +/*:103*//*120:*/ +#line 1931 "hint.w" pointer hget_hbox_node(void) {/*74:*/ -#line 1180 "hint.w" +#line 1184 "hint.w" uint8_t a,z; HGETTAG(a); /*:74*/ -#line 1920 "hint.w" +#line 1933 "hint.w" -if(KIND(a)!=hbox_kind)QUIT("Hbox expected at 0x%x got %s",node_pos,NAME(a)); +if(KIND(a)!=hbox_kind)tag_expected(TAG(hbox_kind,0),a,node_pos); {pointer p; HGET_BOX(INFO(a)); /*75:*/ -#line 1185 "hint.w" +#line 1189 "hint.w" HGETTAG(z); -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); +if(a!=z)tag_mismatch(a,z,node_pos,hpos-hstart-1); /*:75*/ -#line 1924 "hint.w" +#line 1937 "hint.w" return p; } @@ -2524,132 +2572,161 @@ return p; pointer hget_vbox_node(void) { /*74:*/ -#line 1180 "hint.w" +#line 1184 "hint.w" uint8_t a,z; HGETTAG(a); /*:74*/ -#line 1932 "hint.w" +#line 1945 "hint.w" -if(KIND(a)!=vbox_kind)QUIT("Vbox expected at 0x%x got %s",node_pos,NAME(a)); +if(KIND(a)!=vbox_kind)tag_expected(TAG(vbox_kind,0),a,node_pos); {pointer p; HGET_BOX(INFO(a)); /*75:*/ -#line 1185 "hint.w" +#line 1189 "hint.w" HGETTAG(z); -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); +if(a!=z)tag_mismatch(a,z,node_pos,hpos-hstart-1); /*:75*/ -#line 1936 "hint.w" +#line 1949 "hint.w" type(p)= vlist_node; return p; } } -/*:120*//*160:*/ -#line 2686 "hint.w" +/*:120*//*166:*/ +#line 2715 "hint.w" pointer hget_paragraph_initial(scaled x,uint8_t*to) -{ -uint8_t*node_start; -uint32_t s,t; +{/*162:*/ +#line 2636 "hint.w" + +pointer par_ptr= null; +if(KIND(*hpos)==list_kind) +{uint32_t s,t; +/*74:*/ +#line 1184 "hint.w" + uint8_t a,z; -node_start= hpos; HGETTAG(a); -if(!IS_LIST(a)) -{hpos= node_start;return null;} +/*:74*/ +#line 2640 "hint.w" + +if((INFO(a)&b011)==0) +HGET8; +else if(INFO(a)&b100) +QUIT("Text in paragraph not yet implemented"); +else +{uint8_t*list_end; s= hget_list_size(INFO(a)); hget_size_boundary(INFO(a)); -if(KIND(a)==list_kind) -{uint8_t*list_end= hpos+s;if(to> list_end){LOG("Value of to greater than list_end");to= list_end;} +list_end= hpos+s; cur_list.hs_field= x; push_nest(); cur_list.bs_pos= NULL; + +/*:162*/ +#line 2717 "hint.w" + +if(to> list_end) +{LOG("Value of to greater than list_end"); +to= list_end; +} +/*163:*/ +#line 2656 "hint.w" + while(hpos<to) {hget_content(); if(nest_ptr==1) {pointer p= tail; if(p!=head&&!is_char_node(p)&& -(type(p)==glue_node||type(p)==kern_node||type(p)==penalty_node||type(p)==disc_node||type(p)==math_node)) +(type(p)==glue_node||type(p)==kern_node||type(p)==penalty_node +||type(p)==disc_node||type(p)==math_node)) store_map(p,node_pos,0); } } + +/*:163*/ +#line 2722 "hint.w" + if(KIND(*to)==disc_kind) {hget_content(); store_map(tail,node_pos,0); transplant_pre_break_list(); } +if(head!=tail) +/*167:*/ +#line 2743 "hint.w" + +{if(is_char_node(tail))tail_append(new_penalty(inf_penalty)) +else if(type(tail)!=glue_node)tail_append(new_penalty(inf_penalty)) +else +{type(tail)= penalty_node;delete_glue_ref(glue_ptr(tail)); +flush_node_list(leader_ptr(tail));penalty(tail)= inf_penalty; +} +tail_append(new_glue(zero_glue)); +} +/*:167*/ +#line 2729 "hint.w" + hpos= list_end; +/*164:*/ +#line 2670 "hint.w" + +if(head!=tail) +{par_ptr= link(head); +store_map(par_ptr,node_pos,0); +if(needs_bs) +QUIT("Unexpected trailing baseline node"); +} +pop_nest(); +} hget_size_boundary(INFO(a)); t= hget_list_size(INFO(a)); if(t!=s) -QUIT("List sizes at 0x%x and "SIZE_F" do not match 0x%x != 0x%x",node_pos+1,hpos-hstart-s-1,s,t); +QUIT("List sizes at 0x%x and "SIZE_F" do not match 0x%x != 0x%x", +node_pos+1,hpos-hstart-s-1,s,t); /*75:*/ -#line 1185 "hint.w" +#line 1189 "hint.w" HGETTAG(z); -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); +if(a!=z)tag_mismatch(a,z,node_pos,hpos-hstart-1); /*:75*/ -#line 2722 "hint.w" +#line 2684 "hint.w" -if(needs_bs) -QUIT("Unexpected trailing baseline node"); -if(head==tail) -{pop_nest(); -return null; } -else -{pointer par_ptr= link(head); -/*161:*/ -#line 2750 "hint.w" -if(is_char_node(tail))tail_append(new_penalty(inf_penalty)) -else if(type(tail)!=glue_node)tail_append(new_penalty(inf_penalty)) -else -{type(tail)= penalty_node;delete_glue_ref(glue_ptr(tail)); -flush_node_list(leader_ptr(tail));penalty(tail)= inf_penalty; -} -tail_append(new_glue(zero_glue)); -/*:161*/ + + +/*:164*/ #line 2731 "hint.w" -pop_nest(); -store_map(par_ptr,node_pos,0); return par_ptr; } -} -else -QUIT("Text in paragraph not yet implemented"); -return null; -} -/*:160*/ -#line 7566 "hint.w" +/*:166*/ +#line 7633 "hint.w" -/*80:*/ -#line 1260 "hint.w" +/*82:*/ +#line 1273 "hint.w" static void hteg_node(uint8_t z) {switch(z) { -/*92:*/ -#line 1454 "hint.w" +/*94:*/ +#line 1467 "hint.w" case TAG(glyph_kind,1):HTEG_GLYPH(1);break; case TAG(glyph_kind,2):HTEG_GLYPH(2);break; case TAG(glyph_kind,3):HTEG_GLYPH(3);break; case TAG(glyph_kind,4):HTEG_GLYPH(4);break; -/*:92*//*94:*/ -#line 1469 "hint.w" +/*:94*//*96:*/ +#line 1482 "hint.w" case TAG(penalty_kind,0):tail_append(new_penalty(hget_integer_ref(HTEG8)));break; case TAG(penalty_kind,1):{tail_append(new_penalty(HTEG8));}break; case TAG(penalty_kind,2):{int16_t n;HTEG16(n);RNG("Penalty",n,-20000,+20000);tail_append(new_penalty(n));}break; -/*:94*//*96:*/ -#line 1489 "hint.w" +/*:96*//*98:*/ +#line 1502 "hint.w" case TAG(language_kind,b000):(void)HTEG8; case TAG(language_kind,1): @@ -2659,8 +2736,8 @@ case TAG(language_kind,4): case TAG(language_kind,5): case TAG(language_kind,6): case TAG(language_kind,7):break; -/*:96*//*100:*/ -#line 1532 "hint.w" +/*:98*//*102:*/ +#line 1545 "hint.w" case TAG(rule_kind,b000):tail_append(hget_rule_ref(HTEG8));prev_height= ignore_depth;break; case TAG(rule_kind,b011):{HTEG_RULE(b011);tail_append(p);prev_height= ignore_depth;}break; @@ -2668,8 +2745,8 @@ case TAG(rule_kind,b101):{HTEG_RULE(b101);tail_append(p);prev_height= ignore_dep case TAG(rule_kind,b001):{HTEG_RULE(b001);tail_append(p);prev_height= ignore_depth;}break; case TAG(rule_kind,b110):{HTEG_RULE(b110);tail_append(p);prev_height= ignore_depth;}break; case TAG(rule_kind,b111):{HTEG_RULE(b111);tail_append(p);prev_height= ignore_depth;}break; -/*:100*//*107:*/ -#line 1603 "hint.w" +/*:102*//*109:*/ +#line 1616 "hint.w" case TAG(glue_kind,b000):tail_append(new_glue(hget_glue_ref(HTEG8)));break; case TAG(glue_kind,b001):{pointer p;HTEG_GLUE(b001);tail_append(spec2glue(p));}break; @@ -2679,8 +2756,8 @@ case TAG(glue_kind,b100):{pointer p;HTEG_GLUE(b100);tail_append(spec2glue(p));}b case TAG(glue_kind,b101):{pointer p;HTEG_GLUE(b101);tail_append(spec2glue(p));}break; case TAG(glue_kind,b110):{pointer p;HTEG_GLUE(b110);tail_append(spec2glue(p));}break; case TAG(glue_kind,b111):{pointer p;HTEG_GLUE(b111);tail_append(spec2glue(p));}break; -/*:107*//*119:*/ -#line 1899 "hint.w" +/*:109*//*119:*/ +#line 1912 "hint.w" case TAG(hbox_kind,b000):{pointer p;HTEG_BOX(b000);hprepend_to_vlist(p);}break; case TAG(hbox_kind,b001):{pointer p;HTEG_BOX(b001);hprepend_to_vlist(p);}break; @@ -2699,7 +2776,7 @@ case TAG(vbox_kind,b101):{pointer p;HTEG_BOX(b101);type(p)= vlist_node;hprepend_ case TAG(vbox_kind,b110):{pointer p;HTEG_BOX(b110);type(p)= vlist_node;hprepend_to_vlist(p);}break; case TAG(vbox_kind,b111):{pointer p;HTEG_BOX(b111);type(p)= vlist_node;hprepend_to_vlist(p);}break; /*:119*//*126:*/ -#line 2017 "hint.w" +#line 2030 "hint.w" case TAG(hset_kind,b000):{pointer p;HTEG_SET(b000);hset(p,sto,st,sho,sh,x);hprepend_to_vlist(p);}break; case TAG(hset_kind,b001):{pointer p;HTEG_SET(b001);hset(p,sto,st,sho,sh,x);hprepend_to_vlist(p);}break; @@ -2718,8 +2795,8 @@ case TAG(vset_kind,b100):{pointer p;HTEG_SET(b100);vset(p,sto,st,sho,sh,x);hprep case TAG(vset_kind,b101):{pointer p;HTEG_SET(b101);vset(p,sto,st,sho,sh,x);hprepend_to_vlist(p);}break; case TAG(vset_kind,b110):{pointer p;HTEG_SET(b110);vset(p,sto,st,sho,sh,x);hprepend_to_vlist(p);}break; case TAG(vset_kind,b111):{pointer p;HTEG_SET(b111);vset(p,sto,st,sho,sh,x);hprepend_to_vlist(p);}break; -/*:126*//*131:*/ -#line 2157 "hint.w" +/*:126*//*132:*/ +#line 2189 "hint.w" case TAG(hpack_kind,b000):HTEG_PACK(hpack_kind,b000);break; case TAG(hpack_kind,b010):HTEG_PACK(hpack_kind,b010);break; @@ -2738,8 +2815,8 @@ case TAG(vpack_kind,b001):HTEG_PACK(vpack_kind,b001);break; case TAG(vpack_kind,b011):HTEG_PACK(vpack_kind,b011);break; case TAG(vpack_kind,b101):HTEG_PACK(vpack_kind,b101);break; case TAG(vpack_kind,b111):HTEG_PACK(vpack_kind,b111);break; -/*:131*//*135:*/ -#line 2216 "hint.w" +/*:132*//*137:*/ +#line 2264 "hint.w" case TAG(kern_kind,b000):{HTEG_KERN(b000);}break; case TAG(kern_kind,b001):{HTEG_KERN(b001);}break; @@ -2749,8 +2826,8 @@ case TAG(kern_kind,b100):{HTEG_KERN(b100);}break; case TAG(kern_kind,b101):{HTEG_KERN(b101);}break; case TAG(kern_kind,b110):{HTEG_KERN(b110);}break; case TAG(kern_kind,b111):{HTEG_KERN(b111);}break; -/*:135*//*139:*/ -#line 2263 "hint.w" +/*:137*//*141:*/ +#line 2311 "hint.w" case TAG(leaders_kind,0):tail_append(hget_leaders_ref(HTEG8));break; case TAG(leaders_kind,1):HTEG_LEADERS(1);break; @@ -2759,8 +2836,8 @@ case TAG(leaders_kind,3):HTEG_LEADERS(3);break; case TAG(leaders_kind,b100|1):HTEG_LEADERS(b100|1);break; case TAG(leaders_kind,b100|2):HTEG_LEADERS(b100|2);break; case TAG(leaders_kind,b100|3):HTEG_LEADERS(b100|3);break; -/*:139*//*143:*/ -#line 2304 "hint.w" +/*:141*//*145:*/ +#line 2352 "hint.w" case TAG(baseline_kind,b000):{hget_baseline_ref(HTEG8);cur_list.bs_pos= hpos-1;}break; case TAG(baseline_kind,b010):{HTEG_BASELINE(b010);}break; @@ -2769,8 +2846,8 @@ case TAG(baseline_kind,b100):{HTEG_BASELINE(b100);}break; case TAG(baseline_kind,b101):{HTEG_BASELINE(b101);}break; case TAG(baseline_kind,b110):{HTEG_BASELINE(b110);}break; case TAG(baseline_kind,b111):{HTEG_BASELINE(b111);}break; -/*:143*//*148:*/ -#line 2365 "hint.w" +/*:145*//*150:*/ +#line 2413 "hint.w" case TAG(ligature_kind,0):tail_append(hget_ligature_ref(HTEG8));break; case TAG(ligature_kind,1):HTEG_LIG(1);break; @@ -2780,8 +2857,8 @@ case TAG(ligature_kind,4):HTEG_LIG(4);break; case TAG(ligature_kind,5):HTEG_LIG(5);break; case TAG(ligature_kind,6):HTEG_LIG(6);break; case TAG(ligature_kind,7):HTEG_LIG(7);break; -/*:148*//*152:*/ -#line 2414 "hint.w" +/*:150*//*154:*/ +#line 2462 "hint.w" case TAG(disc_kind,b000):tail_append(hget_hyphen_ref(HTEG8));break; case TAG(disc_kind,b001):{HTEG_DISC(b001);tail_append(p);}break; @@ -2791,15 +2868,15 @@ case TAG(disc_kind,b100):{HTEG_DISC(b100);tail_append(p);}break; case TAG(disc_kind,b101):{HTEG_DISC(b101);tail_append(p);}break; case TAG(disc_kind,b110):{HTEG_DISC(b110);tail_append(p);}break; case TAG(disc_kind,b111):{HTEG_DISC(b111);tail_append(p);}break; -/*:152*//*167:*/ -#line 2839 "hint.w" +/*:154*//*173:*/ +#line 2834 "hint.w" case TAG(par_kind,b000):hteg_paragraph(b000);break; case TAG(par_kind,b010):hteg_paragraph(b010);break; case TAG(par_kind,b100):hteg_paragraph(b100);break; case TAG(par_kind,b110):hteg_paragraph(b110);break; -/*:167*//*175:*/ -#line 2972 "hint.w" +/*:173*//*181:*/ +#line 2967 "hint.w" case TAG(math_kind,b000):HTEG_MATH(b000);break; case TAG(math_kind,b001):HTEG_MATH(b001);break; @@ -2807,13 +2884,13 @@ case TAG(math_kind,b010):HTEG_MATH(b010);break; case TAG(math_kind,b100):HTEG_MATH(b100);break; case TAG(math_kind,b101):HTEG_MATH(b101);break; case TAG(math_kind,b110):HTEG_MATH(b110);break; -/*:175*//*177:*/ -#line 2996 "hint.w" +/*:181*//*183:*/ +#line 2991 "hint.w" case TAG(math_kind,b111):tail_append(new_math(0,before));break; case TAG(math_kind,b011):tail_append(new_math(0,after));break; -/*:177*//*183:*/ -#line 3066 "hint.w" +/*:183*//*189:*/ +#line 3061 "hint.w" case TAG(table_kind,b000):HTEG_TABLE(b000);break; case TAG(table_kind,b001):HTEG_TABLE(b001);break; @@ -2832,13 +2909,13 @@ case TAG(item_kind,b100):hteg_content();break; case TAG(item_kind,b101):hteg_content();break; case TAG(item_kind,b110):hteg_content();break; case TAG(item_kind,b111):hteg_content();(void)HTEG8;break; -/*:183*//*188:*/ -#line 3138 "hint.w" +/*:189*//*194:*/ +#line 3133 "hint.w" case TAG(stream_kind,b000):HTEG_STREAM(b000);break; case TAG(stream_kind,b010):HTEG_STREAM(b010);break; -/*:188*//*192:*/ -#line 3197 "hint.w" +/*:194*//*198:*/ +#line 3192 "hint.w" case TAG(image_kind,b000):hget_image_ref(HTEG8);break; case TAG(image_kind,b001):HTEG_IMAGE(b001);break; @@ -2848,15 +2925,15 @@ case TAG(image_kind,b100):HTEG_IMAGE(b100);break; case TAG(image_kind,b101):HTEG_IMAGE(b101);break; case TAG(image_kind,b110):HTEG_IMAGE(b110);break; case TAG(image_kind,b111):HTEG_IMAGE(b111);break; -/*:192*//*196:*/ -#line 3237 "hint.w" +/*:198*//*202:*/ +#line 3232 "hint.w" case TAG(link_kind,b000):HTEG_LINK(b000);break; case TAG(link_kind,b001):HTEG_LINK(b001);break; case TAG(link_kind,b010):HTEG_LINK(b010);break; case TAG(link_kind,b011):HTEG_LINK(b011);break; -/*:196*/ -#line 1264 "hint.w" +/*:202*/ +#line 1277 "hint.w" default: TAGERR(z); @@ -2864,26 +2941,23 @@ TAGERR(z); } void hteg_content(void) -{/*78:*/ -#line 1241 "hint.w" +{/*80:*/ +#line 1257 "hint.w" uint8_t a,z; z= HTEG8,DBGTAG(z,hpos); -/*:78*/ -#line 1271 "hint.w" +/*:80*/ +#line 1284 "hint.w" node_pos= hpos-hstart; hteg_node(z); -/*79:*/ -#line 1246 "hint.w" +/*81:*/ +#line 1262 "hint.w" a= HTEG8,DBGTAG(a,hpos); -if(z!=a) -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); - -/*:79*/ -#line 1274 "hint.w" +if(z!=a)tag_mismatch(a,z,hpos-hstart,node_pos); +/*:81*/ +#line 1287 "hint.w" node_pos= hpos-hstart; if(nest_ptr==0&&tail!=head @@ -2895,38 +2969,35 @@ if(nest_ptr==0&&tail!=head ) store_map(tail,node_pos,0); } -/*:80*//*154:*/ -#line 2439 "hint.w" +/*:82*//*156:*/ +#line 2487 "hint.w" pointer hteg_disc_node(void) -{/*78:*/ -#line 1241 "hint.w" +{/*80:*/ +#line 1257 "hint.w" uint8_t a,z; z= HTEG8,DBGTAG(z,hpos); -/*:78*/ -#line 2441 "hint.w" +/*:80*/ +#line 2489 "hint.w" if(KIND(z)!=disc_kind||INFO(z)==b000) -QUIT("Hyphen expected at 0x%x got %s,%d",node_pos,NAME(z),INFO(z)); +tag_expected(TAG(disc_kind,1),z,node_pos); { HTEG_DISC(INFO(z)); -/*79:*/ -#line 1246 "hint.w" +/*81:*/ +#line 1262 "hint.w" a= HTEG8,DBGTAG(a,hpos); -if(z!=a) -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); - -/*:79*/ -#line 2446 "hint.w" +if(z!=a)tag_mismatch(a,z,hpos-hstart,node_pos); +/*:81*/ +#line 2494 "hint.w" return p; } } -/*:154*//*170:*/ -#line 2908 "hint.w" +/*:156*//*176:*/ +#line 2903 "hint.w" void hteg_par_node(uint32_t offset) {scaled x= 0; @@ -2936,12 +3007,12 @@ pointer par_head= tail; uint8_t*bs_pos= cur_list.bs_pos; scaled ph= prev_height; /*74:*/ -#line 1180 "hint.w" +#line 1184 "hint.w" uint8_t a,z; HGETTAG(a); /*:74*/ -#line 2916 "hint.w" +#line 2911 "hint.w" node_pos= (hpos-hstart)-1; if(INFO(a)&b100)x= hget_xdimen_node();else x= hget_xdimen_ref(HGET8); @@ -2949,21 +3020,19 @@ if(INFO(a)&b010)line_break_params= hget_param_list_node();else line_break_params prev_graf= 0; p= hget_paragraph_initial(x,hstart+node_pos+offset); /*75:*/ -#line 1185 "hint.w" +#line 1189 "hint.w" HGETTAG(z); -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); +if(a!=z)tag_mismatch(a,z,node_pos,hpos-hstart-1); /*:75*/ -#line 2922 "hint.w" +#line 2917 "hint.w" cur_list.bs_pos= NULL; if(p!=null) line_break(hget_integer_ref(widow_penalty_no),p); if(par_head!=tail) -/*169:*/ -#line 2884 "hint.w" +/*175:*/ +#line 2879 "hint.w" {pointer p,r,par_tail; p= null; @@ -2984,15 +3053,15 @@ tail= par_tail; if(type(tail)==hlist_node||type(tail)==vlist_node) prev_height= height(tail); } -/*:169*/ -#line 2927 "hint.w" +/*:175*/ +#line 2922 "hint.w" hpos= hstart+node_pos; line_break_params= save_lbp; } -/*:170*/ -#line 7567 "hint.w" +/*:176*/ +#line 7634 "hint.w" /*18:*/ @@ -3058,8 +3127,8 @@ streams[0].p= streams[0].t= null; houtput_template(p); hmark_page(); } -/*:63*//*76:*/ -#line 1200 "hint.w" +/*:63*//*78:*/ +#line 1216 "hint.w" static void hget_node(uint8_t a) @@ -3069,21 +3138,21 @@ static void hget_node(uint8_t a) #line 898 "hint.w" case TAG(stream_kind,b100):hinsert_stream(HGET8);break; -/*:56*//*91:*/ -#line 1448 "hint.w" +/*:56*//*93:*/ +#line 1461 "hint.w" case TAG(glyph_kind,1):HGET_GLYPH(1);break; case TAG(glyph_kind,2):HGET_GLYPH(2);break; case TAG(glyph_kind,3):HGET_GLYPH(3);break; case TAG(glyph_kind,4):HGET_GLYPH(4);break; -/*:91*//*93:*/ -#line 1463 "hint.w" +/*:93*//*95:*/ +#line 1476 "hint.w" case TAG(penalty_kind,0):tail_append(new_penalty(hget_integer_ref(HGET8)));break; case TAG(penalty_kind,1):{tail_append(new_penalty(HGET8));}break; case TAG(penalty_kind,2):{int16_t n;HGET16(n);RNG("Penalty",n,-20000,+20000);tail_append(new_penalty(n));}break; -/*:93*//*95:*/ -#line 1477 "hint.w" +/*:95*//*97:*/ +#line 1490 "hint.w" case TAG(language_kind,b000):(void)HGET8; case TAG(language_kind,1): @@ -3093,8 +3162,8 @@ case TAG(language_kind,4): case TAG(language_kind,5): case TAG(language_kind,6): case TAG(language_kind,7):break; -/*:95*//*99:*/ -#line 1523 "hint.w" +/*:97*//*101:*/ +#line 1536 "hint.w" case TAG(rule_kind,b000):tail_append(hget_rule_ref(HGET8));prev_depth= ignore_depth;break; case TAG(rule_kind,b011):{HGET_RULE(b011);tail_append(p);prev_depth= ignore_depth;}break; @@ -3102,8 +3171,8 @@ case TAG(rule_kind,b101):{HGET_RULE(b101);tail_append(p);prev_depth= ignore_dept case TAG(rule_kind,b001):{HGET_RULE(b001);tail_append(p);prev_depth= ignore_depth;}break; case TAG(rule_kind,b110):{HGET_RULE(b110);tail_append(p);prev_depth= ignore_depth;}break; case TAG(rule_kind,b111):{HGET_RULE(b111);tail_append(p);prev_depth= ignore_depth;}break; -/*:99*//*106:*/ -#line 1591 "hint.w" +/*:101*//*108:*/ +#line 1604 "hint.w" case TAG(glue_kind,b000):tail_append(new_glue(hget_glue_ref(HGET8)));break; case TAG(glue_kind,b001):{pointer p;HGET_GLUE(b001);tail_append(spec2glue(p));}break; @@ -3113,8 +3182,8 @@ case TAG(glue_kind,b100):{pointer p;HGET_GLUE(b100);tail_append(spec2glue(p));}b case TAG(glue_kind,b101):{pointer p;HGET_GLUE(b101);tail_append(spec2glue(p));}break; case TAG(glue_kind,b110):{pointer p;HGET_GLUE(b110);tail_append(spec2glue(p));}break; case TAG(glue_kind,b111):{pointer p;HGET_GLUE(b111);tail_append(spec2glue(p));}break; -/*:106*//*118:*/ -#line 1880 "hint.w" +/*:108*//*118:*/ +#line 1893 "hint.w" case TAG(hbox_kind,b000):{pointer p;HGET_BOX(b000);happend_to_vlist(p);}break; case TAG(hbox_kind,b001):{pointer p;HGET_BOX(b001);happend_to_vlist(p);}break; @@ -3133,7 +3202,7 @@ case TAG(vbox_kind,b101):{pointer p;HGET_BOX(b101);type(p)= vlist_node;happend_t case TAG(vbox_kind,b110):{pointer p;HGET_BOX(b110);type(p)= vlist_node;happend_to_vlist(p);}break; case TAG(vbox_kind,b111):{pointer p;HGET_BOX(b111);type(p)= vlist_node;happend_to_vlist(p);}break; /*:118*//*125:*/ -#line 1996 "hint.w" +#line 2009 "hint.w" case TAG(hset_kind,b000):{pointer p;HGET_SET(b000);hset(p,sto,st,sho,sh,x);happend_to_vlist(p);}break; case TAG(hset_kind,b001):{pointer p;HGET_SET(b001);hset(p,sto,st,sho,sh,x);happend_to_vlist(p);}break; @@ -3152,8 +3221,8 @@ case TAG(vset_kind,b100):{pointer p;HGET_SET(b100);vset(p,sto,st,sho,sh,x);happe case TAG(vset_kind,b101):{pointer p;HGET_SET(b101);vset(p,sto,st,sho,sh,x);happend_to_vlist(p);}break; case TAG(vset_kind,b110):{pointer p;HGET_SET(b110);vset(p,sto,st,sho,sh,x);happend_to_vlist(p);}break; case TAG(vset_kind,b111):{pointer p;HGET_SET(b111);vset(p,sto,st,sho,sh,x);happend_to_vlist(p);}break; -/*:125*//*130:*/ -#line 2138 "hint.w" +/*:125*//*131:*/ +#line 2170 "hint.w" case TAG(hpack_kind,b000):HGET_PACK(hpack_kind,b000);break; case TAG(hpack_kind,b010):HGET_PACK(hpack_kind,b010);break; @@ -3172,8 +3241,8 @@ case TAG(vpack_kind,b001):HGET_PACK(vpack_kind,b001);break; case TAG(vpack_kind,b011):HGET_PACK(vpack_kind,b011);break; case TAG(vpack_kind,b101):HGET_PACK(vpack_kind,b101);break; case TAG(vpack_kind,b111):HGET_PACK(vpack_kind,b111);break; -/*:130*//*134:*/ -#line 2205 "hint.w" +/*:131*//*136:*/ +#line 2253 "hint.w" case TAG(kern_kind,b000):{HGET_KERN(b000);}break; case TAG(kern_kind,b001):{HGET_KERN(b001);}break; @@ -3183,8 +3252,8 @@ case TAG(kern_kind,b100):{HGET_KERN(b100);}break; case TAG(kern_kind,b101):{HGET_KERN(b101);}break; case TAG(kern_kind,b110):{HGET_KERN(b110);}break; case TAG(kern_kind,b111):{HGET_KERN(b111);}break; -/*:134*//*138:*/ -#line 2254 "hint.w" +/*:136*//*140:*/ +#line 2302 "hint.w" case TAG(leaders_kind,0):tail_append(hget_leaders_ref(HGET8));break; case TAG(leaders_kind,1):HGET_LEADERS(1);break; @@ -3193,8 +3262,8 @@ case TAG(leaders_kind,3):HGET_LEADERS(3);break; case TAG(leaders_kind,b100|1):HGET_LEADERS(b100|1);break; case TAG(leaders_kind,b100|2):HGET_LEADERS(b100|2);break; case TAG(leaders_kind,b100|3):HGET_LEADERS(b100|3);break; -/*:138*//*142:*/ -#line 2294 "hint.w" +/*:140*//*144:*/ +#line 2342 "hint.w" case TAG(baseline_kind,b000):{cur_list.bs_pos= hpos-1;hget_baseline_ref(HGET8);}break; case TAG(baseline_kind,b010):{HGET_BASELINE(b010);}break; @@ -3203,8 +3272,8 @@ case TAG(baseline_kind,b100):{HGET_BASELINE(b100);}break; case TAG(baseline_kind,b101):{HGET_BASELINE(b101);}break; case TAG(baseline_kind,b110):{HGET_BASELINE(b110);}break; case TAG(baseline_kind,b111):{HGET_BASELINE(b111);}break; -/*:142*//*147:*/ -#line 2354 "hint.w" +/*:144*//*149:*/ +#line 2402 "hint.w" case TAG(ligature_kind,0):tail_append(hget_ligature_ref(HGET8));break; case TAG(ligature_kind,1):HGET_LIG(1);break; @@ -3214,8 +3283,8 @@ case TAG(ligature_kind,4):HGET_LIG(4);break; case TAG(ligature_kind,5):HGET_LIG(5);break; case TAG(ligature_kind,6):HGET_LIG(6);break; case TAG(ligature_kind,7):HGET_LIG(7);break; -/*:147*//*151:*/ -#line 2404 "hint.w" +/*:149*//*153:*/ +#line 2452 "hint.w" case TAG(disc_kind,b000):tail_append(hget_hyphen_ref(HGET8));break; case TAG(disc_kind,b001):{HGET_DISC(b001);tail_append(p);}break; @@ -3225,15 +3294,15 @@ case TAG(disc_kind,b100):{HGET_DISC(b100);tail_append(p);}break; case TAG(disc_kind,b101):{HGET_DISC(b101);tail_append(p);}break; case TAG(disc_kind,b110):{HGET_DISC(b110);tail_append(p);}break; case TAG(disc_kind,b111):{HGET_DISC(b111);tail_append(p);}break; -/*:151*//*156:*/ -#line 2467 "hint.w" +/*:153*//*158:*/ +#line 2515 "hint.w" case TAG(par_kind,b000):HGET_PAR(b000);break; case TAG(par_kind,b010):HGET_PAR(b010);break; case TAG(par_kind,b100):HGET_PAR(b100);break; case TAG(par_kind,b110):HGET_PAR(b110);break; -/*:156*//*174:*/ -#line 2963 "hint.w" +/*:158*//*180:*/ +#line 2958 "hint.w" case TAG(math_kind,b000):HGET_MATH(b000);break; case TAG(math_kind,b001):HGET_MATH(b001);break; @@ -3241,17 +3310,17 @@ case TAG(math_kind,b010):HGET_MATH(b010);break; case TAG(math_kind,b100):HGET_MATH(b100);break; case TAG(math_kind,b101):HGET_MATH(b101);break; case TAG(math_kind,b110):HGET_MATH(b110);break; -/*:174*//*176:*/ -#line 2992 "hint.w" +/*:180*//*182:*/ +#line 2987 "hint.w" case TAG(math_kind,b111):tail_append(new_math(0,before));break; case TAG(math_kind,b011):tail_append(new_math(0,after));break; -/*:176*//*179:*/ -#line 3018 "hint.w" +/*:182*//*185:*/ +#line 3013 "hint.w" case TAG(adjust_kind,1):HGET_ADJUST(1);break; -/*:179*//*182:*/ -#line 3046 "hint.w" +/*:185*//*188:*/ +#line 3041 "hint.w" case TAG(table_kind,b000):HGET_TABLE(b000);break; case TAG(table_kind,b001):HGET_TABLE(b001);break; @@ -3270,13 +3339,13 @@ case TAG(item_kind,b100):hget_content();break; case TAG(item_kind,b101):hget_content();break; case TAG(item_kind,b110):hget_content();break; case TAG(item_kind,b111):(void)HGET8;hget_content();break; -/*:182*//*187:*/ -#line 3133 "hint.w" +/*:188*//*193:*/ +#line 3128 "hint.w" case TAG(stream_kind,b000):HGET_STREAM(b000);break; case TAG(stream_kind,b010):HGET_STREAM(b010);break; -/*:187*//*191:*/ -#line 3187 "hint.w" +/*:193*//*197:*/ +#line 3182 "hint.w" case TAG(image_kind,b000):hget_image_ref(HGET8);break; case TAG(image_kind,b001):HGET_IMAGE(b001);break; @@ -3286,15 +3355,15 @@ case TAG(image_kind,b100):HGET_IMAGE(b100);break; case TAG(image_kind,b101):HGET_IMAGE(b101);break; case TAG(image_kind,b110):HGET_IMAGE(b110);break; case TAG(image_kind,b111):HGET_IMAGE(b111);break; -/*:191*//*195:*/ -#line 3231 "hint.w" +/*:197*//*201:*/ +#line 3226 "hint.w" case TAG(link_kind,b000):HGET_LINK(b000);break; case TAG(link_kind,b001):HGET_LINK(b001);break; case TAG(link_kind,b010):HGET_LINK(b010);break; case TAG(link_kind,b011):HGET_LINK(b011);break; -/*:195*/ -#line 1205 "hint.w" +/*:201*/ +#line 1221 "hint.w" default: TAGERR(a); @@ -3303,24 +3372,22 @@ TAGERR(a); void hget_content(void) {/*74:*/ -#line 1180 "hint.w" +#line 1184 "hint.w" uint8_t a,z; HGETTAG(a); /*:74*/ -#line 1212 "hint.w" +#line 1228 "hint.w" node_pos= (hpos-hstart)-1; hget_node(a); /*75:*/ -#line 1185 "hint.w" +#line 1189 "hint.w" HGETTAG(z); -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); +if(a!=z)tag_mismatch(a,z,node_pos,hpos-hstart-1); /*:75*/ -#line 1215 "hint.w" +#line 1231 "hint.w" if(nest_ptr==0&&tail!=head&&(type(tail)==penalty_node||type(tail)==glue_node||type(tail)==kern_node)) store_map(tail,node_pos,0); @@ -3336,14 +3403,14 @@ link(head)= null; tail= head; return p; } -/*:76*//*163:*/ -#line 2788 "hint.w" +/*:78*//*169:*/ +#line 2782 "hint.w" void set_line_break_params(void) {hset_param_list(line_break_params); } -/*:163*//*199:*/ -#line 3364 "hint.w" +/*:169*//*205:*/ +#line 3359 "hint.w" pointer skip(uint8_t n) {return cur_page->s[n].g;} @@ -3354,8 +3421,8 @@ int count(uint8_t n) scaled dimen(uint8_t n) {return xdimen(&cur_page->s[n].x);} -/*:199*//*200:*/ -#line 3389 "hint.w" +/*:205*//*206:*/ +#line 3384 "hint.w" void hpage_init(void) {int i; @@ -3377,8 +3444,8 @@ top_skip= cur_page->g; add_glue_ref(top_skip); } } -/*:200*//*202:*/ -#line 3420 "hint.w" +/*:206*//*208:*/ +#line 3415 "hint.w" void hflush_contribution_list(void) {if(link(contrib_head)!=null) @@ -3386,8 +3453,8 @@ void hflush_contribution_list(void) link(contrib_head)= null;tail= contrib_head; } } -/*:202*//*204:*/ -#line 3464 "hint.w" +/*:208*//*210:*/ +#line 3459 "hint.w" static bool hbuild_page_up(void) { @@ -3398,13 +3465,13 @@ int b,c; int pi= 0; if(link(contrib_head)==null)return false; do{p= link(contrib_head); -/*209:*/ -#line 3586 "hint.w" +/*215:*/ +#line 3581 "hint.w" switch(type(p)){ case hlist_node:case vlist_node:case rule_node: -/*206:*/ -#line 3530 "hint.w" +/*212:*/ +#line 3525 "hint.w" if(page_contents<box_there) {if(page_contents==empty)freeze_page_specs(box_there); @@ -3412,18 +3479,18 @@ else page_contents= box_there; if(depth(p)> page_max_depth) page_total= depth(p)-page_max_depth; depth(p)= 0; -/*207:*/ -#line 3556 "hint.w" +/*213:*/ +#line 3551 "hint.w" {page_top_height= width(top_skip); page_total= page_total+page_top_height; } -/*:207*/ -#line 3537 "hint.w" +/*:213*/ +#line 3532 "hint.w" } -/*208:*/ -#line 3565 "hint.w" +/*214:*/ +#line 3560 "hint.w" {int i; for(i= 1;i<=6;i++) @@ -3431,8 +3498,8 @@ for(i= 1;i<=6;i++) top_so_far[i]= 0; } } -/*:208*/ -#line 3539 "hint.w" +/*:214*/ +#line 3534 "hint.w" page_total+= page_height+depth(p); if(height(p)> page_top_height) @@ -3441,16 +3508,16 @@ page_height= page_top_height; } else page_height= height(p); -/*:206*/ -#line 3589 "hint.w" +/*:212*/ +#line 3584 "hint.w" goto contribute; case whatsit_node:goto contribute; -case glue_node:/*212:*/ -#line 3624 "hint.w" +case glue_node:/*218:*/ +#line 3619 "hint.w" if(link(p)==null)return false; -/*213:*/ -#line 3631 "hint.w" +/*219:*/ +#line 3626 "hint.w" #define top_shrink top_so_far[6] #define top_total top_so_far[1] @@ -3462,16 +3529,16 @@ DBG(DBGTEX,"Infinite glue shrinkage found on current page"); top_shrink+= shrink(q); top_total+= width(q); } -/*:213*/ -#line 3626 "hint.w" +/*:219*/ +#line 3621 "hint.w" if(page_contents==empty||!precedes_break(link(p)))goto contribute; pi= 0; -/*:212*/ -#line 3591 "hint.w" +/*:218*/ +#line 3586 "hint.w" break; -case kern_node:/*214:*/ -#line 3647 "hint.w" +case kern_node:/*220:*/ +#line 3642 "hint.w" top_total+= width(p); if(page_contents==empty|| @@ -3479,22 +3546,22 @@ link(page_head)==null|| type(link(page_head))!=glue_node) goto contribute; pi= 0; -/*:214*/ -#line 3592 "hint.w" +/*:220*/ +#line 3587 "hint.w" break; case penalty_node:if(page_contents==empty)goto done1;else pi= penalty(p);break; case ins_node:happend_insertion(p);goto contribute; default:DBG(DBGTEX,"Unexpected node type %d in build_page_up ignored\n",type(p)); } -/*217:*/ -#line 3681 "hint.w" +/*223:*/ +#line 3676 "hint.w" if(pi<inf_penalty) -{/*215:*/ -#line 3661 "hint.w" +{/*221:*/ +#line 3656 "hint.w" -/*216:*/ -#line 3672 "hint.w" +/*222:*/ +#line 3667 "hint.w" if(page_total<page_goal) {if((page_so_far[3]!=0)||(page_so_far[4]!=0)||(page_so_far[5]!=0))b= 0; @@ -3502,8 +3569,8 @@ else b= badness(page_goal-page_total,page_so_far[2]); } else if(page_total-page_goal> page_shrink)b= awful_bad; else b= badness(page_total-page_goal,page_shrink) -/*:216*/ -#line 3662 "hint.w" +/*:222*/ +#line 3657 "hint.w" ; if(b<awful_bad) {if(pi<=eject_penalty)c= pi; @@ -3512,8 +3579,8 @@ else c= deplorable; } else c= b; if(insert_penalties>=10000)c= awful_bad; -/*:215*/ -#line 3683 "hint.w" +/*:221*/ +#line 3678 "hint.w" if(c<=least_page_cost) {best_page_break= p;best_size= page_goal; @@ -3526,8 +3593,8 @@ r= link(r); } if((c==awful_bad)||(pi<=eject_penalty)) { -/*218:*/ -#line 3711 "hint.w" +/*224:*/ +#line 3706 "hint.w" if(p!=best_page_break) {while(link(page_head)!=best_page_break) @@ -3538,11 +3605,11 @@ link(q)= link(head); link(head)= q; } } -/*:218*/ -#line 3695 "hint.w" +/*:224*/ +#line 3690 "hint.w" -/*219:*/ -#line 3729 "hint.w" +/*225:*/ +#line 3724 "hint.w" hloc_set_prev(link(page_head)); while(true){ @@ -3561,52 +3628,52 @@ else width(temp_ptr)= 0; link(q)= link(page_head); link(page_head)= q; best_page_break= null; -/*:219*/ -#line 3696 "hint.w" +/*:225*/ +#line 3691 "hint.w" hpack_page(); hfill_page_template(); return true; } } -/*:217*/ -#line 3597 "hint.w" +/*:223*/ +#line 3592 "hint.w" contribute: -/*210:*/ -#line 3604 "hint.w" +/*216:*/ +#line 3599 "hint.w" link(contrib_head)= link(p); link(p)= link(page_head); if(link(page_head)==null)page_tail= p; link(page_head)= p; goto done; -/*:210*/ -#line 3599 "hint.w" +/*:216*/ +#line 3594 "hint.w" -done1:/*211:*/ -#line 3612 "hint.w" +done1:/*217:*/ +#line 3607 "hint.w" link(contrib_head)= link(p);link(p)= null;flush_node_list(p); -/*:211*/ -#line 3600 "hint.w" +/*:217*/ +#line 3595 "hint.w" done: -/*:209*/ -#line 3474 "hint.w" +/*:215*/ +#line 3469 "hint.w" ; }while(link(contrib_head)!=null); tail= contrib_head; return false; } -/*:204*//*221:*/ -#line 3805 "hint.w" +/*:210*//*227:*/ +#line 3800 "hint.w" static void clear_map(void) {memset(map,0,sizeof(map)); } -/*:221*//*222:*/ -#line 3818 "hint.w" +/*:227*//*228:*/ +#line 3813 "hint.w" void store_map(pointer p,uint32_t pos0,uint32_t offset) {map[p]= pos0; @@ -3616,8 +3683,8 @@ map[p+1]= offset; uint32_t hposition(pointer p) {return map[p]; } -/*:222*//*229:*/ -#line 3928 "hint.w" +/*:228*//*235:*/ +#line 3923 "hint.w" void hloc_init(void) {cur_loc= 0; @@ -3625,8 +3692,8 @@ hloc_clear(); page_loc[cur_loc]= 0; DBG(DBGPAGE,"loc_init: %d < %d < %d\n",lo_loc,cur_loc,hi_loc); } -/*:229*//*234:*/ -#line 4065 "hint.w" +/*:235*//*240:*/ +#line 4062 "hint.w" int hint_begin(void) {if(!hint_map())return 0; @@ -3664,8 +3731,8 @@ free_definitions(); list_leaks(); hclear_dir(); } -/*:234*//*238:*/ -#line 4170 "hint.w" +/*:240*//*244:*/ +#line 4167 "hint.w" bool hint_forward(void) {hpage_init(); @@ -3678,8 +3745,8 @@ while(!flush_pages(hend-hstart)) if(hbuild_page())return true; return false; } -/*:238*//*239:*/ -#line 4211 "hint.w" +/*:244*//*245:*/ +#line 4208 "hint.w" bool hint_backward(void) {hpage_init(); @@ -3692,8 +3759,8 @@ while(!flush_pages(0x0)) if(hbuild_page_up())return true; return false; } -/*:239*//*241:*/ -#line 4239 "hint.w" +/*:245*//*247:*/ +#line 4236 "hint.w" bool flush_pages(uint32_t pos) {pointer p= link(head); @@ -3709,19 +3776,19 @@ tail_append(new_penalty(-010000000000)); store_map(tail,pos,0); return false; } -/*:241*//*263:*/ -#line 4758 "hint.w" +/*:247*//*271:*/ +#line 4802 "hint.w" int hint_get_outline_max(void) {return max_outline;} -/*:263*//*268:*/ -#line 4838 "hint.w" +/*:271*//*276:*/ +#line 4882 "hint.w" hint_Outline*hint_get_outlines(void) {return hint_outlines; } -/*:268*//*270:*/ -#line 4897 "hint.w" +/*:276*//*278:*/ +#line 4941 "hint.w" static bool trv_ignore= false; static bool trv_skip_space= false; @@ -3786,8 +3853,8 @@ default:break; p= link(p); } } -/*:270*/ -#line 7569 "hint.w" +/*:278*/ +#line 7636 "hint.w" -/*:373*/ +/*:382*/ diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/hint.h b/Build/source/texk/web2c/hitexdir/hintview/src/hint.h index 789bafe0c97..b536d58f49c 100644 --- a/Build/source/texk/web2c/hitexdir/hintview/src/hint.h +++ b/Build/source/texk/web2c/hitexdir/hintview/src/hint.h @@ -1,5 +1,5 @@ -/*372:*/ -#line 7532 "hint.w" +/*381:*/ +#line 7599 "hint.w" #ifndef _HINT_H_ #define _HINT_H_ @@ -22,34 +22,38 @@ extern Stream*streams; #line 1028 "hint.w" extern void hfill_page_template(void); -/*:64*//*77:*/ -#line 1232 "hint.w" +/*:64*//*79:*/ +#line 1248 "hint.w" void hget_content(void); -/*:77*//*81:*/ -#line 1287 "hint.w" +/*:79*//*83:*/ +#line 1300 "hint.w" extern void hteg_content(void); -/*:81*//*164:*/ -#line 2793 "hint.w" +/*:83*//*160:*/ +#line 2591 "hint.w" + +extern void hprune_unwanted_nodes(void); +/*:160*//*170:*/ +#line 2787 "hint.w" extern void set_line_break_params(void); -/*:164*//*166:*/ -#line 2833 "hint.w" +/*:170*//*172:*/ +#line 2828 "hint.w" extern void hget_par_node(uint32_t offset); -/*:166*//*171:*/ -#line 2933 "hint.w" +/*:172*//*177:*/ +#line 2928 "hint.w" extern void hteg_par_node(uint32_t offset); -/*:171*//*197:*/ -#line 3300 "hint.w" +/*:177*//*203:*/ +#line 3295 "hint.w" extern pointer*pointer_def[32]; extern scaled*dimen_def; extern int32_t*integer_def; -/*:197*//*198:*/ -#line 3355 "hint.w" +/*:203*//*204:*/ +#line 3350 "hint.w" extern Stream*streams; extern bool flush_pages(uint32_t pos); @@ -57,60 +61,60 @@ extern pointer skip(uint8_t n); extern pointer*box_ptr(uint8_t n); extern int count(uint8_t n); extern scaled dimen(uint8_t n); -/*:198*//*201:*/ -#line 3412 "hint.w" +/*:204*//*207:*/ +#line 3407 "hint.w" extern void hpage_init(void); -/*:201*//*203:*/ -#line 3429 "hint.w" +/*:207*//*209:*/ +#line 3424 "hint.w" extern void hflush_contribution_list(void); -/*:203*//*223:*/ -#line 3832 "hint.w" +/*:209*//*229:*/ +#line 3827 "hint.w" #define HINT_NO_LOC 0xFFFFFFFFFFFFFFFF #define PAGE_LOC(POS0,OFF) (((uint64_t)((POS0)+(OFF))<<32) + (uint64_t)(OFF)) #define LOC_POS(P) ((P)>>32) #define LOC_OFF(P) ((P)&0xFFFFFFFF) #define LOC_POS0(P) (LOC_POS(P)-LOC_OFF(P)) -/*:223*//*226:*/ -#line 3869 "hint.w" +/*:229*//*232:*/ +#line 3864 "hint.w" extern uint64_t page_loc[]; extern int cur_loc; -/*:226*//*228:*/ -#line 3918 "hint.w" +/*:232*//*234:*/ +#line 3913 "hint.w" extern void hloc_clear(void); extern bool hloc_next(void); extern bool hloc_prev(void); extern uint64_t hlocation(pointer p); -/*:228*//*233:*/ -#line 4034 "hint.w" +/*:234*//*239:*/ +#line 4031 "hint.w" extern void hloc_init(void); extern void store_map(pointer p,uint32_t pos,uint32_t offset); extern uint32_t hposition(pointer p); extern void hloc_set(uint64_t h); extern void hloc_set_next(pointer p); -/*:233*//*235:*/ -#line 4105 "hint.w" +/*:239*//*241:*/ +#line 4102 "hint.w" extern int hint_begin(void); extern void hint_end(void); extern bool hint_map(void); extern void hint_unmap(void); -/*:235*//*240:*/ -#line 4229 "hint.w" +/*:241*//*246:*/ +#line 4226 "hint.w" extern bool hint_forward(void); extern bool hint_backward(void); -/*:240*//*243:*/ -#line 4260 "hint.w" +/*:246*//*249:*/ +#line 4257 "hint.w" extern scaled hvsize,hhsize; -/*:243*//*264:*/ -#line 4771 "hint.w" +/*:249*//*272:*/ +#line 4815 "hint.w" typedef struct{ uint64_t pos; @@ -120,27 +124,27 @@ int p; char*title; }hint_Outline; extern hint_Outline*hint_outlines; -/*:264*//*265:*/ -#line 4789 "hint.w" +/*:272*//*273:*/ +#line 4833 "hint.w" #define LABEL_UNDEF 0 #define LABEL_TOP 1 #define LABEL_BOT 2 #define LABEL_MID 3 -/*:265*//*269:*/ -#line 4848 "hint.w" +/*:273*//*277:*/ +#line 4892 "hint.w" extern int hint_get_outline_max(void); extern hint_Outline*hint_get_outlines(void); extern uint64_t hint_outline_page(int i); -/*:269*//*271:*/ -#line 4963 "hint.w" +/*:277*//*279:*/ +#line 5007 "hint.w" extern void trv_init(void(*f)(uint32_t c)); extern void trv_vlist(pointer p); extern void trv_hlist(pointer p); -/*:271*//*298:*/ -#line 5486 "hint.w" +/*:279*//*307:*/ +#line 5542 "hint.w" typedef struct{ uint64_t pos; @@ -149,19 +153,19 @@ scaled top,bottom,left,right; }hint_Link; extern hint_Link*hint_links; extern int max_link; -/*:298*//*303:*/ -#line 5649 "hint.w" +/*:307*//*312:*/ +#line 5705 "hint.w" extern int hint_find_link(scaled x,scaled y,scaled precission); extern uint64_t hint_link_page(int i); -/*:303*//*371:*/ -#line 7515 "hint.w" +/*:312*//*380:*/ +#line 7582 "hint.w" extern void leak_in(pointer p,int s); extern void leak_out(pointer p,int s); -/*:371*/ -#line 7539 "hint.w" +/*:380*/ +#line 7606 "hint.w" #endif -/*:372*/ +/*:381*/ diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/hrender.c b/Build/source/texk/web2c/hitexdir/hintview/src/hrender.c index a4c8285a7bb..498b59c7e42 100644 --- a/Build/source/texk/web2c/hitexdir/hintview/src/hrender.c +++ b/Build/source/texk/web2c/hitexdir/hintview/src/hrender.c @@ -1,5 +1,5 @@ -/*375:*/ -#line 7609 "hint.w" +/*384:*/ +#line 7677 "hint.w" #include "basetypes.h" #include "error.h" @@ -12,69 +12,73 @@ #include "htex.h" #include "hint.h" -/*311:*/ -#line 5801 "hint.w" +/*319:*/ +#line 5828 "hint.w" extern struct font_s*hget_font(unsigned char f); -/*:311*//*323:*/ -#line 6146 "hint.w" +/*:319*//*331:*/ +#line 6173 "hint.w" extern void render_char(int x,int y,struct font_s*f,uint32_t cc,uint8_t s); -/*:323*/ -#line 7621 "hint.w" +/*:331*/ +#line 7689 "hint.w" -/*236:*/ -#line 4134 "hint.w" +/*242:*/ +#line 4131 "hint.w" double xdpi= 600.0,ydpi= 600.0; -/*:236*//*254:*/ -#line 4498 "hint.w" +/*:242*//*260:*/ +#line 4495 "hint.w" static bool forward_mode= false,backward_mode= false; -/*:254*//*273:*/ -#line 5010 "hint.w" +/*:260*//*281:*/ +#line 5056 "hint.w" static char*m_str; static int m_length,m_chars; -/*:273*//*277:*/ -#line 5081 "hint.w" +/*:281*//*285:*/ +#line 5130 "hint.w" #define MAX_M_DIST 512 static uint8_t m_dist[MAX_M_DIST+5]; static int m_ptr,m_max; -/*:277*//*280:*/ -#line 5183 "hint.w" +/*:285*//*286:*/ +#line 5168 "hint.w" + +static int m_ptr,m_max; +/*:286*//*289:*/ +#line 5239 "hint.w" static int m_state,m_spaces; static uint32_t m_d; -/*:280*//*283:*/ -#line 5236 "hint.w" +/*:289*//*292:*/ +#line 5292 "hint.w" static int m_focus; static uint64_t m_page; -/*:283*//*286:*/ -#line 5271 "hint.w" +/*:292*//*295:*/ +#line 5327 "hint.w" static bool c_ignore; static int m_style; -/*:286*//*294:*/ -#line 5440 "hint.w" +/*:295*//*303:*/ +#line 5496 "hint.w" static int cur_link= -1; -/*:294*//*326:*/ -#line 6189 "hint.w" +/*:303*//*335:*/ +#line 6227 "hint.w" static scaled cur_h,cur_v; static scaled rule_ht,rule_dp,rule_wd; static int cur_f; static struct font_s*cur_fp; static uint8_t cur_style= 0; -/*:326*/ -#line 7623 "hint.w" +/*:335*/ +#line 7691 "hint.w" -/*237:*/ -#line 4138 "hint.w" +/*243:*/ +#line 4135 "hint.w" void hint_resize(int px_h,int px_v,double x_dpi,double y_dpi) { @@ -95,8 +99,8 @@ hflush_contribution_list();hpage_init(); forward_mode= false; backward_mode= false; } -/*:237*//*248:*/ -#line 4362 "hint.w" +/*:243*//*254:*/ +#line 4359 "hint.w" uint64_t hint_page_top(uint64_t h) @@ -116,8 +120,8 @@ forward_mode= true; backward_mode= false; return h; } -/*:248*//*249:*/ -#line 4385 "hint.w" +/*:254*//*255:*/ +#line 4382 "hint.w" uint64_t hint_page_get(void) { @@ -126,8 +130,8 @@ DBG(DBGPAGE,"page_get: %d : 0x%"PRIx64"\n",cur_loc,page_loc[cur_loc]); if(hin_addr==NULL)return 0; return page_loc[cur_loc]; } -/*:249*//*250:*/ -#line 4401 "hint.w" +/*:255*//*256:*/ +#line 4398 "hint.w" uint64_t hint_page(void) {uint64_t i; @@ -138,8 +142,8 @@ return i; else return hint_page_top(i); } -/*:250*//*251:*/ -#line 4417 "hint.w" +/*:256*//*257:*/ +#line 4414 "hint.w" uint64_t hint_page_home(void) {uint64_t pos; @@ -149,28 +153,32 @@ if(hin_addr==NULL)return 0; /*71:*/ #line 1102 "hint.w" -where= labels[n].where; +if(labels==NULL||n> max_ref[label_kind]) +{where= LABEL_TOP;pos= 0;} +else +{where= labels[n].where; #if 1 pos= ((uint64_t)labels[n].pos<<32)+(labels[n].pos-labels[n].pos0); #else pos= ((uint64_t)labels[n].pos0<<32); #endif +} /*:71*/ -#line 4423 "hint.w" +#line 4420 "hint.w" -/*267:*/ -#line 4811 "hint.w" +/*275:*/ +#line 4855 "hint.w" if(where==LABEL_TOP)return hint_page_top(pos); else if(where==LABEL_BOT)return hint_page_bottom(pos); else if(where==LABEL_MID)return hint_page_middle(pos); else return hint_page_get(); -/*:267*/ -#line 4424 "hint.w" +/*:275*/ +#line 4421 "hint.w" } -/*:251*//*252:*/ -#line 4445 "hint.w" +/*:257*//*258:*/ +#line 4442 "hint.w" double hint_get_fpos(void) { @@ -179,8 +187,8 @@ DBG(DBGPAGE,"get_fpos: %d : 0x%"PRIx64"\n",cur_loc,page_loc[cur_loc]); if(hin_addr==NULL)return 0.0; return(double)LOC_POS(page_loc[cur_loc])/(double)(hend-hstart); } -/*:252*//*253:*/ -#line 4459 "hint.w" +/*:258*//*259:*/ +#line 4456 "hint.w" uint64_t hint_set_fpos(double fpos) {uint32_t pos,pos0; @@ -214,8 +222,8 @@ else pos= pos0= hpos-hstart; return hint_page_top(PAGE_LOC(pos0,pos-pos0)); } -/*:253*//*255:*/ -#line 4503 "hint.w" +/*:259*//*261:*/ +#line 4500 "hint.w" uint64_t hint_page_next(void) {if(hin_addr==NULL)return 0; @@ -231,8 +239,8 @@ else return hint_page(); } } -/*:255*//*256:*/ -#line 4528 "hint.w" +/*:261*//*262:*/ +#line 4525 "hint.w" uint64_t hint_page_prev(void) {if(hin_addr==NULL)return 0; @@ -249,8 +257,8 @@ return hint_page_get(); else return hint_page_bottom(hint_page_get()); } -/*:256*//*257:*/ -#line 4554 "hint.w" +/*:262*//*263:*/ +#line 4551 "hint.w" uint64_t hint_page_bottom(uint64_t h) {if(hin_addr==NULL)return 0; @@ -264,16 +272,16 @@ backward_mode= true; forward_mode= false; return hint_page_get(); } -/*:257*//*258:*/ -#line 4579 "hint.w" +/*:263*//*264:*/ +#line 4582 "hint.w" uint64_t hint_page_middle(uint64_t l) -{uint32_t pos,pos0,offset; -pointer p,tp= null; -scaled h= 0,d= 0,ht= 0,hp,dp; +{uint32_t target_pos,pos0,offset; +pointer p; +scaled h= 0,d= 0,hp,dp,target_dist= 0,break_dist= 0; int pi= 0; if(hin_addr==NULL)return 0; -pos= LOC_POS(l); +target_pos= LOC_POS(l); offset= LOC_OFF(l); pos0= LOC_POS0(l); if(hstart+pos0+offset>=hend) @@ -281,14 +289,22 @@ return hint_page_bottom(hend-hstart); hflush_contribution_list(); hpos= hstart+pos0; hget_content(); -p= link(contrib_head); + if(offset> 0) -{/*259:*/ -#line 4618 "hint.w" +/*265:*/ +#line 4624 "hint.w" -{while(p!=null) -{/*260:*/ -#line 4645 "hint.w" +{pointer q,target_q; +/*266:*/ +#line 4641 "hint.w" + +target_q= null; +q= contrib_head;p= link(q); +h= d= target_dist= break_dist= 0; +while(p!=null) +{pointer qq; +/*268:*/ +#line 4685 "hint.w" switch(type(p)) {case hlist_node:case vlist_node:case rule_node: @@ -310,32 +326,50 @@ break; default: pi= hp= dp= 0; } -/*:260*/ -#line 4620 "hint.w" +/*:268*/ +#line 4647 "hint.w" -h+= d+hp; -d= dp; -if(pi<=0&&tp==null) -{uint32_t t= LOC_POS(hlocation(p)); -if(t> pos) -{tp= p;ht= h; +qq= q; +q= p; +p= link(p); +if(target_q!=null) +{if(pi<=0) break; } +else if(p==null||LOC_POS(hlocation(p))> target_pos) +{target_q= qq; +target_dist= h+d; +h= d= 0; } -p= link(p); +h+= d+hp; +d= dp; } -if(tp==null)ht= h; -if(ht>=hvsize) -{/*261:*/ -#line 4672 "hint.w" +if(target_q==null) +{target_dist= h;break_dist= 0;} +else +break_dist= h; +/*:266*/ +#line 4626 "hint.w" -pointer q= contrib_head; -scaled dh= ht-hvsize/2; -p= link(contrib_head); -h= d= 0; -while(p!=null) -{/*260:*/ -#line 4645 "hint.w" +if(target_dist+break_dist<=hvsize) +offset= 0; +else +{if(break_dist>=hvsize) +q= target_q; +else +/*269:*/ +#line 4714 "hint.w" + +{scaled dh; +dh= target_dist+break_dist-hvsize; +if(target_dist-dh> hvsize/2) +dh= target_dist-hvsize/2; +q= contrib_head; +p= link(q); +d= 0; +while(p!=null&&q!=target_q&&dh> 0) +{/*268:*/ +#line 4685 "hint.w" switch(type(p)) {case hlist_node:case vlist_node:case rule_node: @@ -357,53 +391,56 @@ break; default: pi= hp= dp= 0; } -/*:260*/ -#line 4678 "hint.w" +/*:268*/ +#line 4723 "hint.w" -h= h+d+hp; +dh= dh-hp-d; d= dp; -if(pi<=0&&h>=dh)break; q= p; p= link(p); } -if(p!=null) -{offset= LOC_OFF(hlocation(p)); +} +/*:269*/ +#line 4634 "hint.w" + +/*267:*/ +#line 4670 "hint.w" + +{p= link(q); +offset= LOC_OFF(hlocation(p)); link(q)= null; flush_node_list(link(contrib_head)); link(contrib_head)= p; } -/*:261*/ -#line 4634 "hint.w" +/*:267*/ +#line 4635 "hint.w" goto found; } } -/*:259*/ -#line 4596 "hint.w" +/*:265*/ +#line 4599 "hint.w" -} -else if(p!=null&&type(p)==penalty_node) -pi= penalty(p); -/*262:*/ -#line 4697 "hint.w" +/*270:*/ +#line 4737 "hint.w" {pointer h_save= link(contrib_head); pointer t_save= tail; uint8_t*hpos_save= hpos; pointer best_p= null; -int best_pi= pi; -link(contrib_head)= null;p= tail= contrib_head; +int best_pi= 0; +link(contrib_head)= null;tail= contrib_head; hpos= hstart+pos0; -h= ht; -while(h<(hvsize/4*3)) -{while(link(p)==null&&hpos> 0) +h= target_dist+break_dist; +d= 0; +p= tail; +while(h<hvsize) +{while(link(p)==null&&hpos> hstart) hteg_content(); -if(link(p)==null) -break; -else +if(link(p)==null)break; p= link(p); -/*260:*/ -#line 4645 "hint.w" +/*268:*/ +#line 4685 "hint.w" switch(type(p)) {case hlist_node:case vlist_node:case rule_node: @@ -425,10 +462,13 @@ break; default: pi= hp= dp= 0; } -/*:260*/ -#line 4713 "hint.w" +/*:268*/ +#line 4753 "hint.w" -h= h+dp+hp; +if(hpos==hstart)pi= eject_penalty; +if(h+hp+d> hvsize) +break; +h= h+d+hp;d= dp; if(pi<best_pi) {best_pi= pi; best_p= p; @@ -438,6 +478,7 @@ if(best_pi<=eject_penalty)break; if(best_p==null) {flush_node_list(link(contrib_head)); hpos= hstart+pos0; +offset= 0; } else {p= link(contrib_head); @@ -456,7 +497,7 @@ if(t_save!=contrib_head) tail= t_save; hpos= hpos_save; } -/*:262*/ +/*:270*/ #line 4600 "hint.w" found: @@ -466,34 +507,34 @@ forward_mode= true; backward_mode= false; return hint_page_get(); } -/*:258*//*266:*/ -#line 4800 "hint.w" +/*:264*//*274:*/ +#line 4844 "hint.w" uint64_t hint_outline_page(int i) {uint64_t pos; uint8_t where; -if(i<0||i> max_outline)return hint_page_get(); +if(i<0||i> max_outline||hint_outlines==NULL)return hint_page_get(); pos= hint_outlines[i].pos; where= hint_outlines[i].where; -/*267:*/ -#line 4811 "hint.w" +/*275:*/ +#line 4855 "hint.w" if(where==LABEL_TOP)return hint_page_top(pos); else if(where==LABEL_BOT)return hint_page_bottom(pos); else if(where==LABEL_MID)return hint_page_middle(pos); else return hint_page_get(); -/*:267*/ -#line 4807 "hint.w" +/*:275*/ +#line 4851 "hint.w" } -/*:266*//*274:*/ -#line 5015 "hint.w" +/*:274*//*282:*/ +#line 5061 "hint.w" void hint_set_mark(char*m,int s) {m_str= m; m_length= s; -/*275:*/ -#line 5026 "hint.w" +/*283:*/ +#line 5072 "hint.w" if(m_length> 0) {int i,j,k; @@ -508,17 +549,17 @@ m_str[k]= 0; m_length= k; m_chars= m_length-j; } -/*:275*/ -#line 5019 "hint.w" +/*:283*/ +#line 5065 "hint.w" hmark_page(); } -/*:274*//*278:*/ -#line 5116 "hint.w" +/*:282*//*287:*/ +#line 5172 "hint.w" static void m_put(uint32_t d) {if(m_ptr<MAX_M_DIST) -{if(d==0xFF) +{if(d==HINT_NO_POS) m_dist[m_max= m_ptr]= 0xFF; else if(d<0x7F) m_dist[m_ptr++]= 0x80+d; @@ -550,8 +591,8 @@ if(y&0x80)return(x<<7)+(y&0x7F); x= (x<<7)+y; } } -/*:278*//*279:*/ -#line 5157 "hint.w" +/*:287*//*288:*/ +#line 5213 "hint.w" static int m_next(int i) {while((0x80&m_dist[i])==0)i++; @@ -565,8 +606,8 @@ i--; while(i> 0&&(0x80&m_dist[i-1])==0)i--; return i; } -/*:279*//*281:*/ -#line 5188 "hint.w" +/*:288*//*290:*/ +#line 5244 "hint.w" static void next_m_char(uint32_t c) { @@ -585,8 +626,8 @@ m_state= 0; } } else -/*282:*/ -#line 5222 "hint.w" +/*291:*/ +#line 5278 "hint.w" {int i= 0,j= 0; do{ @@ -597,14 +638,14 @@ m_d= m_d+i-j; m_state= m_state-i; goto reconsider; } -/*:282*/ -#line 5206 "hint.w" +/*:291*/ +#line 5262 "hint.w" } -/*:281*//*284:*/ -#line 5241 "hint.w" +/*:290*//*293:*/ +#line 5297 "hint.w" void hmark_page(void) {if(streams==NULL||streams[0].p==null)return; @@ -622,17 +663,17 @@ trv_vlist(list_ptr(streams[0].p)); else trv_hlist(list_ptr(streams[0].p)); } -m_put(0xFF); +m_put(HINT_NO_POS); if(m_focus>=m_max)m_focus= 0; } -/*:284*//*291:*/ -#line 5356 "hint.w" +/*:293*//*300:*/ +#line 5412 "hint.w" void c_ignore_list(pointer p) {while(p!=null) {if(is_char_node(p)) -{/*288:*/ -#line 5296 "hint.w" +{/*297:*/ +#line 5352 "hint.w" {while(m_d==0) {m_style^= MARK_BIT; @@ -647,8 +688,8 @@ m_d= m_get(); } m_d--; } -/*:288*/ -#line 5360 "hint.w" +/*:297*/ +#line 5416 "hint.w" cur_style|= m_style; } @@ -659,8 +700,8 @@ case vlist_node:c_ignore_list(list_ptr(p));break; case ligature_node: {pointer q= lig_ptr(p); while(q!=null) -{/*288:*/ -#line 5296 "hint.w" +{/*297:*/ +#line 5352 "hint.w" {while(m_d==0) {m_style^= MARK_BIT; @@ -675,8 +716,8 @@ m_d= m_get(); } m_d--; } -/*:288*/ -#line 5370 "hint.w" +/*:297*/ +#line 5426 "hint.w" cur_style|= m_style; q= link(q); @@ -688,8 +729,8 @@ break; p= link(p); } } -/*:291*//*292:*/ -#line 5403 "hint.w" +/*:300*//*301:*/ +#line 5459 "hint.w" bool hint_prev_mark(void) {m_focus= m_prev(m_focus); @@ -709,8 +750,8 @@ m_focus= m_next(0); } return(m_focus!=0); } -/*:292*//*300:*/ -#line 5504 "hint.w" +/*:301*//*309:*/ +#line 5560 "hint.w" static int links_allocated= 0; void add_new_link(int n,pointer p,scaled h,scaled v) @@ -733,14 +774,18 @@ REF_RNG(label_kind,n); /*71:*/ #line 1102 "hint.w" -where= labels[n].where; +if(labels==NULL||n> max_ref[label_kind]) +{where= LABEL_TOP;pos= 0;} +else +{where= labels[n].where; #if 1 pos= ((uint64_t)labels[n].pos<<32)+(labels[n].pos-labels[n].pos0); #else pos= ((uint64_t)labels[n].pos0<<32); #endif +} /*:71*/ -#line 5523 "hint.w" +#line 5579 "hint.w" t->where= where; t->pos= pos; @@ -767,8 +812,8 @@ t->right= h; else t->bottom= v; } -/*:300*//*301:*/ -#line 5573 "hint.w" +/*:309*//*310:*/ +#line 5629 "hint.w" static scaled hlink_distance(scaled x,scaled y,hint_Link*t) {scaled d,dx= 0,dy= 0; @@ -824,8 +869,8 @@ last_hit= min_i; return last_hit; } } -/*:301*//*302:*/ -#line 5634 "hint.w" +/*:310*//*311:*/ +#line 5690 "hint.w" uint64_t hint_link_page(int i) {uint64_t h; @@ -838,8 +883,8 @@ else if(w==LABEL_BOT)return hint_page_bottom(h); else if(w==LABEL_MID)return hint_page_middle(h); else return hint_page_get(); } -/*:302*//*304:*/ -#line 5668 "hint.w" +/*:311*//*313:*/ +#line 5724 "hint.w" void hint_render_on(void) {nativeInit(); @@ -848,35 +893,24 @@ void hint_render_on(void) void hint_render_off(void) {nativeClear(); } -/*:304*//*305:*/ -#line 5680 "hint.w" +/*:313*//*314:*/ +#line 5737 "hint.w" void hint_dark(int dark) {nativeSetDark(dark); } -/*:305*//*306:*/ -#line 5717 "hint.w" - -int hint_print_on(int w,int h,unsigned char*bits) -{return nativePrintStart(w,h,bits); -} - -int hint_print_off(void) -{return nativePrintEnd(); -} - -int hint_print(unsigned char*bits) -{return nativePrint(bits); +void hint_gamma(double gamma) +{nativeSetGamma(gamma); } -/*:306*//*324:*/ -#line 6153 "hint.w" +/*:314*//*332:*/ +#line 6180 "hint.w" static void render_rule(int x,int y,int w,int h) {if(w> 0&&h> 0) nativeRule(SP2PT(x),SP2PT(y),SP2PT(w),SP2PT(h)); } -/*:324*//*325:*/ -#line 6165 "hint.w" +/*:332*//*333:*/ +#line 6192 "hint.w" void render_image(int x,int y,int w,int h,uint32_t n) { @@ -886,8 +920,15 @@ hget_section(n); nativeImage(SP2PT(x),SP2PT(y),SP2PT(w),SP2PT(h),hstart,hend); hpos= spos;hstart= sstart;hend= send; } -/*:325*//*327:*/ -#line 6197 "hint.w" +/*:333*//*334:*/ +#line 6210 "hint.w" + +uint64_t hint_blank(void) +{nativeBlank(); +return 0; +} +/*:334*//*336:*/ +#line 6235 "hint.w" static void vlist_render(pointer this_box); @@ -921,16 +962,16 @@ this_box,mem[this_box].i,p); #endif base_line= cur_v; left_edge= cur_h; -/*297:*/ -#line 5470 "hint.w" +/*306:*/ +#line 5526 "hint.w" if(cur_link>=0) {add_new_link(cur_link,this_box,cur_h,cur_v); local_link= cur_link; cur_link= -1; } -/*:297*/ -#line 6230 "hint.w" +/*:306*/ +#line 6268 "hint.w" while(p!=null) { @@ -946,8 +987,8 @@ if(is_char_node(p)) c= character(p); if(!c_ignore&&c!=' ') {cur_style= cur_style&~(MARK_BIT|FOCUS_BIT); -/*288:*/ -#line 5296 "hint.w" +/*297:*/ +#line 5352 "hint.w" {while(m_d==0) {m_style^= MARK_BIT; @@ -962,8 +1003,8 @@ m_d= m_get(); } m_d--; } -/*:288*/ -#line 6245 "hint.w" +/*:297*/ +#line 6283 "hint.w" cur_style|= m_style; } @@ -1012,8 +1053,8 @@ case rule_node: rule_ht= height(p);rule_dp= depth(p);rule_wd= width(p); goto fin_rule; case whatsit_node: -/*290:*/ -#line 5333 "hint.w" +/*299:*/ +#line 5389 "hint.w" if(subtype(p)==ignore_node) {if(ignore_info(p)==1) @@ -1024,11 +1065,11 @@ c_ignore= true; else c_ignore= false; } -/*:290*/ -#line 6293 "hint.w" +/*:299*/ +#line 6331 "hint.w" -else/*295:*/ -#line 5444 "hint.w" +else/*304:*/ +#line 5500 "hint.w" if(subtype(p)==start_link_node) {cur_style|= LINK_BIT; @@ -1040,8 +1081,8 @@ else if(subtype(p)==end_link_node) end_new_link(local_link,this_box,cur_h,cur_v); local_link= -1; } -/*:295*/ -#line 6294 "hint.w" +/*:304*/ +#line 6332 "hint.w" else if(subtype(p)==image_node) {scaled h,w; @@ -1118,16 +1159,16 @@ break; case ligature_node: f= font(lig_char(p)); c= character(lig_char(p)); -/*289:*/ -#line 5315 "hint.w" +/*298:*/ +#line 5371 "hint.w" if(!c_ignore) {pointer q; cur_style= cur_style&~(MARK_BIT|FOCUS_BIT); q= lig_ptr(p); while(q!=null) -{/*288:*/ -#line 5296 "hint.w" +{/*297:*/ +#line 5352 "hint.w" {while(m_d==0) {m_style^= MARK_BIT; @@ -1142,15 +1183,15 @@ m_d= m_get(); } m_d--; } -/*:288*/ -#line 5321 "hint.w" +/*:297*/ +#line 5377 "hint.w" cur_style|= m_style; q= link(q); } } -/*:289*/ -#line 6370 "hint.w" +/*:298*/ +#line 6408 "hint.w" goto render_c; default:; @@ -1176,15 +1217,15 @@ QUIT("Undefined link in hlist mem[0x%x]=0x%x\n",p,mem[p].i); p= link(p); } } -/*296:*/ -#line 5460 "hint.w" +/*305:*/ +#line 5516 "hint.w" if(local_link>=0) {end_new_link(local_link,this_box,cur_h,cur_v); cur_link= local_link; } -/*:296*/ -#line 6395 "hint.w" +/*:305*/ +#line 6433 "hint.w" } @@ -1336,15 +1377,8 @@ p= link(p); } } -/*:327*//*328:*/ -#line 6553 "hint.w" - -uint64_t hint_blank(void) -{nativeBlank(); -return 0; -} -/*:328*//*329:*/ -#line 6562 "hint.w" +/*:336*//*337:*/ +#line 6589 "hint.w" void hint_render(void) @@ -1354,19 +1388,33 @@ cur_h= 0; cur_v= height(streams[0].p); cur_f= -1;cur_fp= NULL; cur_link= -1;max_link= -1; -/*287:*/ -#line 5289 "hint.w" +/*296:*/ +#line 5345 "hint.w" m_ptr= 0;m_d= 0;m_style= MARK_BIT;c_ignore= false;cur_style= 0; -/*:287*/ -#line 6571 "hint.w" +/*:296*/ +#line 6598 "hint.w" if(type(streams[0].p)==vlist_node) vlist_render(streams[0].p); else hlist_render(streams[0].p); } -/*:329*/ -#line 7624 "hint.w" +/*:337*//*338:*/ +#line 6626 "hint.w" + +int hint_print_on(int w,int h,int bpr,int bpp,unsigned char*bits) +{return nativePrintStart(w,h,bpr,bpp,bits); +} + +int hint_print_off(void) +{return nativePrintEnd(); +} + +int hint_print(unsigned char*bits) +{return nativePrint(bits); +} +/*:338*/ +#line 7692 "hint.w" -/*:375*/ +/*:384*/ diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/hrender.h b/Build/source/texk/web2c/hitexdir/hintview/src/hrender.h index be903480c2c..3544a4caffd 100644 --- a/Build/source/texk/web2c/hitexdir/hintview/src/hrender.h +++ b/Build/source/texk/web2c/hitexdir/hintview/src/hrender.h @@ -1,23 +1,23 @@ -/*374:*/ -#line 7574 "hint.w" +/*383:*/ +#line 7641 "hint.w" #ifndef _HRENDER_H #define _HRENDER_H -/*276:*/ -#line 5048 "hint.w" +/*284:*/ +#line 5094 "hint.w" #define MARK_BIT 0x1 #define FOCUS_BIT 0x2 -/*:276*//*293:*/ -#line 5429 "hint.w" +/*:284*//*302:*/ +#line 5485 "hint.w" #define LINK_BIT 0x4 -/*:293*//*321:*/ -#line 6127 "hint.w" +/*:302*//*329:*/ +#line 6154 "hint.w" #define SP2PT(X) ((X)/(double)(1<<16)) -/*:321*/ -#line 7577 "hint.w" +/*:329*/ +#line 7644 "hint.w" extern int page_h,page_v; @@ -43,8 +43,9 @@ extern uint64_t hint_set_fpos(double fpos); extern void hint_render_on(void); extern void hint_render_off(void); extern void hint_dark(int dark); -extern int hint_print_on(int w,int h,unsigned char*bits); +extern void hint_gamma(double gamma); +extern int hint_print_on(int w,int h,int bpr,int bpp,unsigned char*bits); extern int hint_print_off(void); extern int hint_print(unsigned char*bits); #endif -/*:374*/ +/*:383*/ diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/htex.c b/Build/source/texk/web2c/hitexdir/hintview/src/htex.c index 63d4db0b146..3b6aad2d9a2 100644 --- a/Build/source/texk/web2c/hitexdir/hintview/src/htex.c +++ b/Build/source/texk/web2c/hitexdir/hintview/src/htex.c @@ -142,13 +142,13 @@ static int line_diff; /*:895*//*996:*/ -#line 19162 "htex.w" +#line 19165 "htex.w" scaled best_height_plus_depth; /*:996*//*1005:*/ -#line 19364 "htex.w" +#line 19367 "htex.w" pointer page_tail; int page_contents; @@ -158,7 +158,7 @@ int least_page_cost; scaled best_size; /*:1005*//*1007:*/ -#line 19446 "htex.w" +#line 19449 "htex.w" scaled page_so_far[8]; int insert_penalties; @@ -541,13 +541,13 @@ type(last_active)= hyphenated;line_number(last_active)= max_halfword; subtype(last_active)= 0; /*:835*//*1006:*/ -#line 19417 "htex.w" +#line 19420 "htex.w" subtype(page_ins_head)= qi(255); type(page_ins_head)= split_up;link(page_ins_head)= page_ins_head; /*:1006*//*1013:*/ -#line 19573 "htex.w" +#line 19576 "htex.w" type(page_head)= glue_node;subtype(page_head)= normal; @@ -606,7 +606,7 @@ delete_glue_ref(split_top_ptr(p)); free_node(p,ins_node_size);goto done; } case whatsit_node:/*1387:*/ -#line 25395 "htex.w" +#line 25400 "htex.w" {switch(subtype(p)){ case close_node:case language_node:free_node(p,small_node_size);break; @@ -735,7 +735,7 @@ ins_ptr(r)= copy_node_list(ins_ptr(p)); words= ins_node_size-1; }break; case whatsit_node:/*1386:*/ -#line 25277 "htex.w" +#line 25282 "htex.w" switch(subtype(p)){ case open_node:{r= get_node(open_node_size);words= open_node_size; @@ -1360,7 +1360,7 @@ link(q)= p;p= q; #line 13133 "htex.w" break; case whatsit_node:/*1389:*/ -#line 25475 "htex.w" +#line 25480 "htex.w" if(subtype(p)==image_node) {if(image_height(p)> h)h= image_height(p); @@ -1525,7 +1525,7 @@ if(width(p)+s> w)w= width(p)+s; #line 13360 "htex.w" break; case whatsit_node:/*1388:*/ -#line 25469 "htex.w" +#line 25474 "htex.w" if(subtype(p)==image_node) {if(image_width(p)> w)w= image_width(p); @@ -2173,7 +2173,7 @@ do{ line_offset= next_offset; {pointer q= cur_break(cur_p); if(q==null) -next_offset= (hstart-hpos); +next_offset= (hpos-hstart); else next_offset= hposition(q); if(next_offset> node_pos) @@ -2286,7 +2286,7 @@ link(r)= q;q= r; #line 17520 "htex.w" ; /*912:*/ -#line 17629 "htex.w" +#line 17632 "htex.w" if(cur_line> last_special_line) {cur_width= second_width;cur_indent= second_indent; @@ -2308,12 +2308,15 @@ shift_amount(just_box)= cur_indent if(first_line) {pointer p= happend_to_vlist(just_box); -uint32_t pos= hposition(p); -store_map(p,pos,line_offset); +if(p!=null) +store_map(p,node_pos,line_offset); +store_map(just_box,node_pos,line_offset); first_line= false; } else -append_to_vlist(just_box,line_offset); +{append_to_vlist(just_box,line_offset); +store_map(just_box,node_pos,line_offset); +} if(adjust_head!=adjust_tail) {link(tail)= link(adjust_head);tail= adjust_tail; } @@ -2323,7 +2326,7 @@ adjust_tail= null #line 17523 "htex.w" ; /*913:*/ -#line 17649 "htex.w" +#line 17652 "htex.w" if(cur_line+1!=best_line) {pen= inter_line_penalty; @@ -2375,10 +2378,10 @@ prev_graf= best_line-1; } /*:900*//*918:*/ -#line 17761 "htex.w" +#line 17764 "htex.w" /*:918*//*966:*/ -#line 18584 "htex.w" +#line 18587 "htex.w" #ifdef INIT #endif @@ -2398,7 +2401,7 @@ pointer q,r,s; internal_font_number f; /*:884*//*916:*/ -#line 17744 "htex.w" +#line 17747 "htex.w" /*:916*/ @@ -2521,7 +2524,7 @@ cur_p= link(cur_p); switch(type(cur_p)){ case hlist_node:case vlist_node:case rule_node:act_width= act_width+width(cur_p);break; case whatsit_node:/*1391:*/ -#line 25485 "htex.w" +#line 25490 "htex.w" adv_past(cur_p) @@ -2758,7 +2761,7 @@ hrestore_param_list(); } /*:830*//*992:*/ -#line 19086 "htex.w" +#line 19089 "htex.w" #define ensure_vbox(N) @@ -2770,7 +2773,7 @@ prev_p= temp_head;link(temp_head)= p; while(p!=null) switch(type(p)){ case hlist_node:case vlist_node:case rule_node:/*993:*/ -#line 19109 "htex.w" +#line 19112 "htex.w" {temp_ptr= new_spec(pointer_def[glue_kind][split_top_skip_no]); q= new_glue(temp_ptr);glue_ref_count(temp_ptr)= null;link(prev_p)= q;link(q)= p; @@ -2781,7 +2784,7 @@ p= null; } /*:993*/ -#line 19097 "htex.w" +#line 19100 "htex.w" break; case whatsit_node:case mark_node:case ins_node:{prev_p= p;p= link(prev_p); }break; @@ -2795,7 +2798,7 @@ return link(temp_head); } /*:992*//*994:*/ -#line 19134 "htex.w" +#line 19137 "htex.w" static pointer vert_break(pointer p,scaled h,scaled d) @@ -2812,11 +2815,11 @@ small_number t; prev_p= p; least_cost= awful_bad;do_all_six(set_height_zero);prev_dp= 0; loop{/*997:*/ -#line 19170 "htex.w" +#line 19173 "htex.w" if(p==null)pi= eject_penalty; else/*998:*/ -#line 19185 "htex.w" +#line 19188 "htex.w" switch(type(p)){ case hlist_node:case vlist_node:case rule_node:{ @@ -2824,12 +2827,12 @@ cur_height= cur_height+prev_dp+height(p);prev_dp= depth(p); goto not_found; } case whatsit_node:/*1394:*/ -#line 25494 "htex.w" +#line 25499 "htex.w" goto not_found /*:1394*/ -#line 19191 "htex.w" +#line 19194 "htex.w" ; case glue_node:if(precedes_break(prev_p))pi= 0; else goto update_heights;break; @@ -2844,14 +2847,14 @@ default:confusion("vertbreak"); } /*:998*/ -#line 19174 "htex.w" +#line 19177 "htex.w" ; /*999:*/ -#line 19206 "htex.w" +#line 19209 "htex.w" if(pi<inf_penalty) {/*1000:*/ -#line 19220 "htex.w" +#line 19223 "htex.w" if(cur_height<h) if((active_height[3]!=0)||(active_height[4]!=0)|| @@ -2861,7 +2864,7 @@ else if(cur_height-h> active_height[6])b= awful_bad; else b= badness(cur_height-h,active_height[6]) /*:1000*/ -#line 19208 "htex.w" +#line 19211 "htex.w" ; if(b<awful_bad) if(pi<=eject_penalty)b= pi; @@ -2875,11 +2878,11 @@ if((b==awful_bad)||(pi<=eject_penalty))goto done; } /*:999*/ -#line 19176 "htex.w" +#line 19179 "htex.w" ; if((type(p)<glue_node)||(type(p)> kern_node))goto not_found; update_heights:/*1001:*/ -#line 19232 "htex.w" +#line 19235 "htex.w" if(type(p)==kern_node)q= p; else{q= glue_ptr(p); @@ -2896,7 +2899,7 @@ glue_ptr(p)= r;q= r; cur_height= cur_height+prev_dp+width(q);prev_dp= 0 /*:1001*/ -#line 19179 "htex.w" +#line 19182 "htex.w" ; not_found:if(prev_dp> d) {cur_height= cur_height+prev_dp-d; @@ -2904,7 +2907,7 @@ prev_dp= d; } /*:997*/ -#line 19151 "htex.w" +#line 19154 "htex.w" ; prev_p= p;p= link(prev_p); } @@ -2912,7 +2915,7 @@ done:return best_place; } /*:994*//*1012:*/ -#line 19531 "htex.w" +#line 19534 "htex.w" void freeze_page_specs(small_number s) {page_contents= s; @@ -2932,7 +2935,7 @@ end_diagnostic(false); } /*:1012*//*1020:*/ -#line 19629 "htex.w" +#line 19632 "htex.w" bool hbuild_page(void) { @@ -2943,15 +2946,15 @@ int pi; if(link(contrib_head)==null)return false; do{resume:p= link(contrib_head); /*1023:*/ -#line 19669 "htex.w" +#line 19672 "htex.w" /*1026:*/ -#line 19698 "htex.w" +#line 19701 "htex.w" switch(type(p)){ case hlist_node:case vlist_node:case rule_node:if(page_contents<box_there) /*1027:*/ -#line 19721 "htex.w" +#line 19724 "htex.w" {if(page_contents==empty)freeze_page_specs(box_there); else page_contents= box_there; @@ -2964,10 +2967,10 @@ link(q)= p;link(contrib_head)= q;goto resume; } /*:1027*/ -#line 19702 "htex.w" +#line 19705 "htex.w" else/*1028:*/ -#line 19732 "htex.w" +#line 19735 "htex.w" {page_total= page_total+page_depth+height(p); page_depth= depth(p); @@ -2975,15 +2978,15 @@ goto contribute; } /*:1028*/ -#line 19704 "htex.w" +#line 19707 "htex.w" break; case whatsit_node:/*1393:*/ -#line 25491 "htex.w" +#line 25496 "htex.w" goto contribute /*:1393*/ -#line 19706 "htex.w" +#line 19709 "htex.w" ; case glue_node:if(page_contents<box_there)goto done1; else if(precedes_break(page_tail))pi= 0; @@ -3000,14 +3003,14 @@ default:confusion("page"); } /*:1026*/ -#line 19674 "htex.w" +#line 19677 "htex.w" ; /*1031:*/ -#line 19760 "htex.w" +#line 19763 "htex.w" if(pi<inf_penalty) {/*1033:*/ -#line 19806 "htex.w" +#line 19809 "htex.w" if(page_total<page_goal) if((page_so_far[3]!=0)||(page_so_far[4]!=0)|| @@ -3017,7 +3020,7 @@ else if(page_total-page_goal> page_shrink)b= awful_bad; else b= badness(page_total-page_goal,page_shrink) /*:1033*/ -#line 19763 "htex.w" +#line 19766 "htex.w" ; if(b<awful_bad) if(pi<=eject_penalty)c= pi; @@ -3027,7 +3030,7 @@ else c= b; if(insert_penalties>=10000)c= awful_bad; #ifdef STAT if(tracing_pages> 0)/*1032:*/ -#line 19792 "htex.w" +#line 19795 "htex.w" {begin_diagnostic();print_nl("%"); print(" t=");print_totals(); @@ -3043,7 +3046,7 @@ end_diagnostic(false); } /*:1032*/ -#line 19771 "htex.w" +#line 19774 "htex.w" ; #endif @@ -3066,11 +3069,11 @@ return true; } /*:1031*/ -#line 19677 "htex.w" +#line 19680 "htex.w" ; if((type(p)<glue_node)||(type(p)> kern_node))goto contribute; update_heights:/*1030:*/ -#line 19745 "htex.w" +#line 19748 "htex.w" if(type(p)==kern_node)q= p; else{q= glue_ptr(p); @@ -3087,10 +3090,10 @@ glue_ptr(p)= r;q= r; page_total= page_total+page_depth+width(q);page_depth= 0 /*:1030*/ -#line 19680 "htex.w" +#line 19683 "htex.w" ; contribute:/*1029:*/ -#line 19738 "htex.w" +#line 19741 "htex.w" if(page_depth> page_max_depth) {page_total= @@ -3099,45 +3102,45 @@ page_depth= page_max_depth; } /*:1029*/ -#line 19681 "htex.w" +#line 19684 "htex.w" ; /*1024:*/ -#line 19686 "htex.w" +#line 19689 "htex.w" link(page_tail)= p;page_tail= p; link(contrib_head)= link(p);link(p)= null;goto done /*:1024*/ -#line 19682 "htex.w" +#line 19685 "htex.w" ; done1:/*1025:*/ -#line 19690 "htex.w" +#line 19693 "htex.w" link(contrib_head)= link(p);link(p)= null;flush_node_list(p) /*:1025*/ -#line 19683 "htex.w" +#line 19686 "htex.w" ; done: /*:1023*/ -#line 19640 "htex.w" +#line 19643 "htex.w" ; }while(!(link(contrib_head)==null)); /*1021:*/ -#line 19648 "htex.w" +#line 19651 "htex.w" if(nest_ptr==0)tail= contrib_head; else contrib_tail= contrib_head /*:1021*/ -#line 19642 "htex.w" +#line 19645 "htex.w" ; return false; } /*:1020*//*1034:*/ -#line 19814 "htex.w" +#line 19817 "htex.w" void happend_insertion(pointer p) {uint8_t n; @@ -3149,7 +3152,7 @@ while(n>=subtype(link(r)))r= link(r); n= qo(n); if(subtype(r)!=qi(n)) /*1035:*/ -#line 19846 "htex.w" +#line 19849 "htex.w" {q= get_node(page_ins_node_size);link(q)= link(r);link(r)= q;r= q; subtype(r)= qi(n);type(r)= inserting;ensure_vbox(n); @@ -3167,7 +3170,7 @@ DBG(DBGTEX,"Infinite glue shrinkage inserted from stream %d",n); } /*:1035*/ -#line 19825 "htex.w" +#line 19828 "htex.w" ; if(type(r)==split_up)insert_penalties= insert_penalties+float_cost(p); else{last_ins_ptr(r)= p; @@ -3179,7 +3182,7 @@ if(((h<=0)||(h<=delta))&&(height(p)+height(r)<=dimen(n))) {page_goal= page_goal-h;height(r)= height(r)+height(p); } else/*1036:*/ -#line 19872 "htex.w" +#line 19875 "htex.w" {if(count(n)<=0)w= max_dimen; else{w= page_goal-page_total-page_depth; @@ -3190,7 +3193,7 @@ q= vert_break(ins_ptr(p),w,depth(p)); height(r)= height(r)+best_height_plus_depth; #ifdef STAT if(tracing_pages> 0)/*1037:*/ -#line 19892 "htex.w" +#line 19895 "htex.w" {begin_diagnostic();print_nl("% split");print_int(n); @@ -3204,7 +3207,7 @@ end_diagnostic(false); } /*:1037*/ -#line 19881 "htex.w" +#line 19884 "htex.w" ; #endif @@ -3217,13 +3220,13 @@ else if(type(q)==penalty_node)insert_penalties= insert_penalties+penalty(q); } /*:1036*/ -#line 19836 "htex.w" +#line 19839 "htex.w" ; } } /*:1034*//*1041:*/ -#line 19964 "htex.w" +#line 19967 "htex.w" void hpack_page(void) { @@ -3245,7 +3248,7 @@ if(box(0)!=null) insert_penalties= 0; save_split_top_skip= split_top_skip; /*1045:*/ -#line 20050 "htex.w" +#line 20053 "htex.w" {r= link(page_ins_head); while(r!=page_ins_head) @@ -3261,13 +3264,13 @@ r= link(r); } /*:1045*/ -#line 19984 "htex.w" +#line 19987 "htex.w" ; q= hold_head;link(q)= null;prev_p= page_head;p= link(prev_p); while(p!=best_page_break) {if(type(p)==ins_node) {/*1047:*/ -#line 20076 "htex.w" +#line 20079 "htex.w" {r= link(page_ins_head); while(subtype(r)!=subtype(p))r= link(r); @@ -3275,7 +3278,7 @@ 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) /*1048:*/ -#line 20092 "htex.w" +#line 20095 "htex.w" {if(type(r)==split_up) if((broken_ins(r)==p)&&(broken_ptr(r)!=null)) @@ -3299,14 +3302,14 @@ streams[n].t= s; } /*:1048*/ -#line 20083 "htex.w" +#line 20086 "htex.w" else{while(link(s)!=null)s= link(s); last_ins_ptr(r)= s; } } /*1049:*/ -#line 20114 "htex.w" +#line 20117 "htex.w" link(prev_p)= link(p);link(p)= null; if(wait) @@ -3318,19 +3321,19 @@ free_node(p,ins_node_size); p= prev_p /*:1049*/ -#line 20089 "htex.w" +#line 20092 "htex.w" ; } /*:1047*/ -#line 19989 "htex.w" +#line 19992 "htex.w" ; } prev_p= p;p= link(prev_p); } split_top_skip= save_split_top_skip; /*1044:*/ -#line 20028 "htex.w" +#line 20031 "htex.w" if(p!=null) {if(link(contrib_head)==null) @@ -3348,10 +3351,10 @@ link(contrib_head)= link(hold_head); } /*:1044*/ -#line 19995 "htex.w" +#line 19998 "htex.w" ; /*1046:*/ -#line 20064 "htex.w" +#line 20067 "htex.w" r= link(page_ins_head); while(r!=page_ins_head) @@ -3360,12 +3363,12 @@ while(r!=page_ins_head) link(page_ins_head)= page_ins_head /*:1046*/ -#line 19996 "htex.w" +#line 19999 "htex.w" ; } /*:1041*//*1173:*/ -#line 21986 "htex.w" +#line 21989 "htex.w" void hdisplay(pointer p,pointer a,bool l) { @@ -3384,19 +3387,21 @@ scaled d; if(head==tail) {pop_nest();w= -max_dimen;x= cur_list.hs_field;offset= 0; } -else{pointer par_ptr= link(head); +else{pointer par_ptr; +hprune_unwanted_nodes(); +par_ptr= link(head); pop_nest(); store_map(par_ptr,node_pos,0); line_break(display_widow_penalty,par_ptr); x= cur_list.hs_field; /*1174:*/ -#line 22018 "htex.w" +#line 22023 "htex.w" v= shift_amount(just_box)+2*dimen_def[quad_no];w= -max_dimen; p= list_ptr(just_box); while(p!=null) {/*1175:*/ -#line 22035 "htex.w" +#line 22040 "htex.w" reswitch:if(is_char_node(p)) {f= font(p);d= char_width(f,char_info(f,character(p))); @@ -3413,11 +3418,11 @@ p= lig_trick;goto reswitch; } /*:665*/ -#line 22043 "htex.w" +#line 22048 "htex.w" case kern_node:case math_node:d= width(p);break; case glue_node:/*1176:*/ -#line 22057 "htex.w" +#line 22062 "htex.w" {q= glue_ptr(p);d= width(q); if(glue_sign(just_box)==stretching) @@ -3434,20 +3439,20 @@ if(subtype(p)>=a_leaders)goto found; } /*:1176*/ -#line 22046 "htex.w" +#line 22051 "htex.w" break; case whatsit_node:/*1390:*/ -#line 25481 "htex.w" +#line 25486 "htex.w" d= 0 /*:1390*/ -#line 22047 "htex.w" +#line 22052 "htex.w" ;break; default:d= 0; } /*:1175*/ -#line 22023 "htex.w" +#line 22028 "htex.w" ; if(v<max_dimen)v= v+d; goto not_found; @@ -3461,12 +3466,12 @@ not_found:p= link(p); done: /*:1174*/ -#line 22011 "htex.w" +#line 22016 "htex.w" ; } /*1177:*/ -#line 22075 "htex.w" +#line 22080 "htex.w" if(par_shape_ptr==null) if((hang_indent!=0)&& @@ -3484,16 +3489,16 @@ s= mem[p-1].sc;l= mem[p].sc; } /*:1177*/ -#line 22014 "htex.w" +#line 22019 "htex.w" ; pre_display_size= w;display_width= l;display_indent= s; } /*:1173*//*1228:*/ -#line 22742 "htex.w" +#line 22747 "htex.w" {/*1226:*/ -#line 22725 "htex.w" +#line 22730 "htex.w" pointer b; scaled w; @@ -3507,7 +3512,7 @@ pointer r; pointer t; /*:1226*/ -#line 22743 "htex.w" +#line 22748 "htex.w" adjust_tail= adjust_head;b= hpack(p,natural);p= list_ptr(b); t= adjust_tail;adjust_tail= null; @@ -3519,7 +3524,7 @@ else{e= width(a);q= e+math_quad; } if(w+q> z) /*1230:*/ -#line 22781 "htex.w" +#line 22786 "htex.w" {if((e!=0)&&((w-total_shrink[normal]+q<=z)|| (total_shrink[fil]!=0)||(total_shrink[fill]!=0)|| @@ -3537,10 +3542,10 @@ w= width(b); } /*:1230*/ -#line 22754 "htex.w" +#line 22759 "htex.w" ; /*1231:*/ -#line 22805 "htex.w" +#line 22810 "htex.w" d= half(z-w); if((e> 0)&&(d<2*e)) @@ -3549,10 +3554,10 @@ if(p!=null)if(!is_char_node(p))if(type(p)==glue_node)d= 0; } /*:1231*/ -#line 22756 "htex.w" +#line 22761 "htex.w" ; /*1232:*/ -#line 22818 "htex.w" +#line 22823 "htex.w" tail_append(new_penalty(pre_display_penalty)); store_map(tail,node_pos,offset); @@ -3569,10 +3574,10 @@ tail_append(new_penalty(inf_penalty));store_map(tail,node_pos,offset); else{tail_append(new_glue(pointer_def[glue_kind][g1]));store_map(tail,node_pos,offset);} /*:1232*/ -#line 22757 "htex.w" +#line 22762 "htex.w" ; /*1233:*/ -#line 22833 "htex.w" +#line 22838 "htex.w" if(e!=0) {r= new_kern(z-w-e-d); @@ -3586,10 +3591,10 @@ b= hpack(b,natural); shift_amount(b)= s+d;append_to_vlist(b,offset) /*:1233*/ -#line 22758 "htex.w" +#line 22763 "htex.w" ; /*1234:*/ -#line 22845 "htex.w" +#line 22850 "htex.w" if((a!=null)&&(e==0)&&!l) {tail_append(new_penalty(inf_penalty)); @@ -3606,7 +3611,7 @@ store_map(tail,node_pos,offset); if(g2> 0){tail_append(new_glue(pointer_def[glue_kind][g2]));store_map(tail,node_pos,offset);} /*:1234*/ -#line 22759 "htex.w" +#line 22764 "htex.w" ; prev_graf= prev_graf+3; cur_list.bs_pos= hpos+node_pos; diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/htex.h b/Build/source/texk/web2c/hitexdir/hintview/src/htex.h index edca0a9f035..260ceb5918d 100644 --- a/Build/source/texk/web2c/hitexdir/hintview/src/htex.h +++ b/Build/source/texk/web2c/hitexdir/hintview/src/htex.h @@ -1,5 +1,5 @@ /*1410:*/ -#line 25704 "htex.w" +#line 25709 "htex.w" #define banner "This is TeX, Version 3.141592653 (HINT)" \ @@ -1669,7 +1669,7 @@ str_pool[k+2]= si(qo(w.b2) ) ;str_pool[k+3]= si(qo(w.b3) ) \ #define setstream_number(A) type(A+1) #define setstream_insertion(A) subtype(A+1) #define setstream_mag(A) link(A+1) -#define setstream_prefered(A) type(A+2) +#define setstream_preferred(A) type(A+2) #define setstream_next(A) subtype(A+2) #define setstream_ratio(A) link(A+2) #define setstream_max(A) info(A+3) @@ -1724,7 +1724,7 @@ str_pool[k+2]= si(qo(w.b2) ) ;str_pool[k+3]= si(qo(w.b3) ) \ #define end_write_token cs_token_flag+end_write \ -#line 25705 "htex.w" +#line 25710 "htex.w" enum{/*11:*/ #line 374 "htex.w" @@ -1768,7 +1768,7 @@ file_name_size= 1024, empty_string= 256 /*:11*/ -#line 25706 "htex.w" +#line 25711 "htex.w" }; /*18:*/ #line 514 "htex.w" @@ -1880,17 +1880,17 @@ typedef uint16_t font_index; typedef int8_t dvi_index; /*:605*//*944:*/ -#line 18328 "htex.w" +#line 18331 "htex.w" typedef uint16_t trie_pointer; /*:944*//*949:*/ -#line 18397 "htex.w" +#line 18400 "htex.w" typedef int16_t hyph_pointer; /*:949*/ -#line 25707 "htex.w" +#line 25712 "htex.w" extern void list_init(void); extern void hpack_page(void); diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/main.c b/Build/source/texk/web2c/hitexdir/hintview/src/main.c index 4087db610fe..4b997020c9d 100644 --- a/Build/source/texk/web2c/hitexdir/hintview/src/main.c +++ b/Build/source/texk/web2c/hitexdir/hintview/src/main.c @@ -48,9 +48,10 @@ #include "get.h" #include "hint.h" #include "hrender.h" +#include "rendernative.h" /* Error Handling */ -int herror(const char *title, const char *message) +int hint_error(const char *title, const char *message) { fprintf(stderr,"ERROR %s: %s\n",title,message); return 0; } @@ -63,8 +64,8 @@ int hmessage(char *title, char *format, ...) } void error_callback(int error, const char* description) -{ herror("OpenGL",description); - longjmp(error_exit,1); +{ hint_error("OpenGL",description); + longjmp(hint_error_exit,1); } GLFWwindow* window; @@ -184,7 +185,7 @@ int px_h=1024, px_v=768; // size in pixel double x_dpi, y_dpi; void set_dpi(GLFWwindow* window, int px, int py) -{ int wx, wy, ww, wh, i; +{ int wx, wy, ww, wh; glfwGetWindowPos(window, &wx, &wy); glfwGetWindowSize(window, &ww, &wh); find_monitor(wx,wy); @@ -258,14 +259,14 @@ static int set_hin_name(char *fn) if (hin_name!=NULL) { free(hin_name); hin_name=NULL; } { hin_name=malloc(strlen(fn)+1); if (hin_name==NULL) - { herror("Out of memory for file name", fn); + { hint_error("Out of memory for file name", fn); return 0; } strcpy(hin_name,fn); } sl=strlen(hin_name); if (sl>4 && strncmp(hin_name+sl-4,".hnt",4)!=0) - { herror("Unknown File Type,I dont know how to open this file", hin_name); + { hint_error("Unknown File Type,I dont know how to open this file", hin_name); return 0; } return 1; @@ -326,7 +327,7 @@ static int set_input_file(char *fn) int dark = 0, loading=0, autoreload=0, home=0; int usage(void) -{ return herror("Usage:", "hintview [options] file\n" +{ return hint_error("Usage:", "hintview [options] file\n" "Call 'hintview --help' for details.\n"); } @@ -362,6 +363,10 @@ int command_line(int argc, char *argv[]) else return usage(); case 'a': autoreload=1; break; + case 'd': + i++; if (argv[i]==NULL) debugflags = -1; + else debugflags=strtol(argv[i],NULL,16); + break; case 'n': dark=1; break; case 'o': break; case 'z': scale=SCALE_NORMAL; break; @@ -531,7 +536,7 @@ void cursor_enter_callback(GLFWwindow* window, int entered) int create_window(void) { if( !glfwInit() ) { - herror("GLFW", "Failed to initialize GLFW\n" ); + hint_error("GLFW", "Failed to initialize GLFW\n" ); getchar(); return 0; } @@ -545,7 +550,7 @@ int create_window(void) /* Open a window and create its OpenGL context */ window = glfwCreateWindow( px_h, px_v, "HintView", NULL, NULL); if( window == NULL ){ - herror("GLFW","Failed to open GLFW window.\n" + hint_error("GLFW","Failed to open GLFW window.\n" "If you have an Intel GPU, they are not 3.3 compatible.\n" "Try the 2.1 version of the tutorials.\n" ); glfwTerminate(); @@ -577,7 +582,7 @@ int create_window(void) int main(int argc, char *argv[]) { hlog=stderr; - if (setjmp(error_exit)!=0) return 1; + if (setjmp(hint_error_exit)!=0) return 1; if (!command_line(argc,argv)) return 1; if (!create_window()) @@ -586,7 +591,7 @@ int main(int argc, char *argv[]) hint_resize(px_h,px_v,scale*x_dpi,scale*y_dpi); if (!open_file(home)) return 1; - if (setjmp(error_exit)==0) + if (setjmp(hint_error_exit)==0) do { hint_render(); glfwSwapBuffers(window); diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/renderOGL.c b/Build/source/texk/web2c/hitexdir/hintview/src/renderOGL.c index dc3cc659cde..4ed424e7073 100644 --- a/Build/source/texk/web2c/hitexdir/hintview/src/renderOGL.c +++ b/Build/source/texk/web2c/hitexdir/hintview/src/renderOGL.c @@ -43,7 +43,7 @@ #ifdef DEBUG static void printGLString(const char *name, GLenum s) { const char *v = (const char *) glGetString(s); - LOGI("GL %s = %s\n", name, v); + LOG("GL %s = %s\n", name, v); } static void checkGlError(const char *op) @@ -94,7 +94,7 @@ static const char FragmentShader[]= "uniform int IsImage;\n" "void main()\n" - "{ vec4 texColor = texture( theTexture, UV );\n" + "{ vec4 texColor = texture2D( theTexture, UV );\n" "if (IsImage==1) color = texColor;\n" "else\n" "{ color.a = pow(texColor.r,Gamma);\n" @@ -149,7 +149,7 @@ static void createProgram(void) if (!vertexID || !fragmentID) return; - /* Create, linking, and check the program */ + /* Create, linking, and check the program */ ProgramID = glCreateProgram(); glAttachShader(ProgramID, vertexID); glAttachShader(ProgramID, fragmentID); @@ -307,13 +307,13 @@ void nativeInit(void) glEnable(GL_FRAMEBUFFER_SRGB); checkGlError("GL_FRAMEBUFFER_SRGB"); - hint_clear_fonts(false); + hint_clear_fonts(true); mkRuleTexture(); ImageID=0; //LOG("nativeInit Done\n"); } -// Unused ? + void nativeClear(void) { glDeleteBuffers(1, &xybuffer); glDeleteBuffers(1, &uvbuffer); @@ -440,7 +440,6 @@ void nativeImage(double x, double y, double w, double h, unsigned char *b, unsig format = GL_RG; else format = GL_RED; - glGenTextures(1, &ImageID); glBindTexture(GL_TEXTURE_2D, ImageID); checkGlError("glBindTexture ImageID"); @@ -504,8 +503,8 @@ static void GLtexture(Gcache *g) { glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); g->GLtexture = texID; //MESSAGE("Generated GL texture %d",g->GLtexture); @@ -526,7 +525,7 @@ void nativeSetFreeType(struct gcache_s *g) {GLtexture(g);} int round_to_pixel=1; /* makes sense only if using the native dpi, if using a multiple its of not much use*/ -double pixel_size_threshold= 72.27/150; /*round to pixel only if pixel size in pt is below threshold*/ +double pixel_size_threshold= 72.27/200; /*round to pixel only if pixel size in pt is above threshold*/ void nativeGlyph(double x, double dx, double y, double dy, double w, double h, struct gcache_s *g, uint8_t s) /* given glyph g, display g at position x,y in size w,h. x, y, w, h are given in point */ { @@ -584,16 +583,17 @@ void nativeFreeGlyph(struct gcache_s*g) } } + /* no printing support so far, just placeholders */ -int nativePrintStart(int w,int h,unsigned char*bits) +int nativePrintStart(int w, int h, int bpr, int bpp, unsigned char *bits) { return 0; } -int nativePrintEnd(void) +int nativePrint(unsigned char *bits) { return 0; } -int nativePrint(unsigned char*bits) +int nativePrintEnd(void) { return 0; } diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/rendernative.h b/Build/source/texk/web2c/hitexdir/hintview/src/rendernative.h index 56f482a5b7e..67de223bb52 100644 --- a/Build/source/texk/web2c/hitexdir/hintview/src/rendernative.h +++ b/Build/source/texk/web2c/hitexdir/hintview/src/rendernative.h @@ -1,55 +1,56 @@ -/*378:*/ -#line 7668 "hint.w" +/*387:*/ +#line 7736 "hint.w" #ifndef _RENDERNATIVE_H #define _RENDERNATIVE_H -/*330:*/ -#line 6586 "hint.w" +/*339:*/ +#line 6651 "hint.w" extern void nativeInit(void); extern void nativeClear(void); -extern int nativePrintStart(int w,int h,unsigned char*bits); +extern int nativePrintStart(int w,int h,int bpr,int bpp,unsigned char*bits); extern int nativePrintEnd(void); extern int nativePrint(unsigned char*bits); -/*:330*//*331:*/ -#line 6596 "hint.w" +/*:339*//*340:*/ +#line 6661 "hint.w" extern void nativeSetSize(int px_h,int px_v,double xdpi,double ydpi); -/*:331*//*332:*/ -#line 6601 "hint.w" +/*:340*//*341:*/ +#line 6667 "hint.w" extern void nativeSetDark(int dark); -/*:332*//*333:*/ -#line 6606 "hint.w" +extern void nativeSetGamma(double gamma); +/*:341*//*342:*/ +#line 6673 "hint.w" extern void nativeBlank(void); -/*:333*//*334:*/ -#line 6616 "hint.w" +/*:342*//*343:*/ +#line 6683 "hint.w" typedef struct gcache_s*gcache_s_ptr; extern void nativeGlyph(double x,double dx,double y,double dy,double w,double h,struct gcache_s*g,uint8_t s); -/*:334*//*335:*/ -#line 6627 "hint.w" +/*:343*//*344:*/ +#line 6694 "hint.w" void nativeRule(double x,double y,double w,double h); -/*:335*//*336:*/ -#line 6633 "hint.w" +/*:344*//*345:*/ +#line 6700 "hint.w" void nativeImage(double x,double y,double w,double h,unsigned char*istart,unsigned char*iend); -/*:336*//*337:*/ -#line 6639 "hint.w" +/*:345*//*346:*/ +#line 6706 "hint.w" extern void nativeSetPK(struct gcache_s*g); extern void nativeSetFreeType(struct gcache_s*g); -/*:337*//*338:*/ -#line 6646 "hint.w" +/*:346*//*347:*/ +#line 6713 "hint.w" void nativeFreeGlyph(struct gcache_s*g); -/*:338*/ -#line 7672 "hint.w" +/*:347*/ +#line 7740 "hint.w" #endif -/*:378*/ +/*:387*/ diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/tables.c b/Build/source/texk/web2c/hitexdir/hintview/src/tables.c index 2680d20dca9..b4a474b99af 100644 --- a/Build/source/texk/web2c/hitexdir/hintview/src/tables.c +++ b/Build/source/texk/web2c/hitexdir/hintview/src/tables.c @@ -1,9 +1,9 @@ #include "basetypes.h" #include "format.h" -const char *content_name[32]={"text", "list", "param", "xdimen", "adjust", "glyph", "kern", "glue", "ligature", "disc", "language", "rule", "image", "leaders", "baseline", "hbox", "vbox", "par", "math", "table", "item", "hset", "vset", "hpack", "vpack", "stream", "page", "range", "link", "undefined2", "undefined3", "penalty"}; +const char *content_name[32]={"list", "param", "range", "xdimen", "adjust", "glyph", "kern", "glue", "ligature", "disc", "language", "rule", "image", "leaders", "baseline", "hbox", "vbox", "par", "math", "table", "item", "hset", "vset", "hpack", "vpack", "stream", "page", "link", "undefined1", "undefined2", "undefined3", "penalty"}; -const char *definition_name[32]={"text", "list", "param", "xdimen", "adjust", "font", "dimen", "glue", "ligature", "disc", "language", "rule", "image", "leaders", "baseline", "hbox", "vbox", "par", "math", "table", "item", "hset", "vset", "hpack", "vpack", "stream", "page", "range", "label", "undefined2", "undefined3", "int"}; +const char *definition_name[32]={"list", "param", "range", "xdimen", "adjust", "font", "dimen", "glue", "ligature", "disc", "language", "rule", "image", "leaders", "baseline", "hbox", "vbox", "par", "math", "table", "item", "hset", "vset", "hpack", "vpack", "stream", "page", "label", "undefined1", "undefined2", "undefined3", "int"}; int max_outline=-1; @@ -35,16 +35,16 @@ Baseline baseline_defaults[MAX_BASELINE_DEFAULT+1]={{{{0x0, 0.000000, 0.000000}, Label label_defaults[MAX_LABEL_DEFAULT+1]={{0,LABEL_TOP,true,0,0,0}}; -int max_fixed[32]= {65536, 65536, -1, 2, 65536, -1, 0, 2, -1, -1, -1, -1, -1, -1, 0, 65536, 65536, 65536, 65536, 65536, 65536, 65536, 65536, 65536, 65536, 0, 0, 0, -1, 65536, 65536, 0}; +int max_fixed[32]= {0, 0, 0, 2, 65536, -1, 0, 2, -1, -1, -1, -1, -1, -1, 0, 65536, 65536, 65536, 65536, 65536, 65536, 65536, 65536, 65536, 65536, 0, 0, -1, 65536, 65536, 65536, 0}; -int max_default[32]= {-1, -1, -1, 2, -1, -1, 9, 14, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, -1, -1, 22}; +int max_default[32]= {0, 0, 0, 2, -1, -1, 9, 14, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, -1, -1, -1, 22}; -int max_ref[32]= {-1, -1, -1, 2, -1, -1, 9, 14, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, -1, -1, 22}; +int max_ref[32]= {0, 0, 0, 2, -1, -1, 9, 14, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, -1, -1, -1, 22}; signed char hnode_size[0x100]= { -0,0,0,0,0,0,0,0, /* text */ 0,0,0,0,0,0,0,0, /* list */ 0,0,0,0,0,0,0,0, /* param */ +0,0,0,0,0,0,0,0, /* range */ 0,6,6,10,6,10,10,14, /* xdimen */ 0,-4*1+0,0,0,0,0,0,0, /* adjust */ 0,4,5,6,7,0,0,0, /* glyph */ @@ -62,17 +62,51 @@ signed char hnode_size[0x100]= { -4*3+0,0,-4*2+1,0,-4*2+1,0,-4*1+2,0, /* par */ -4*2+0,-4*2+1,-4*2+1,2,-4*1+1,-4*1+2,-4*1+2,2, /* math */ -4*2+1,-4*2+1,-4*2+1,-4*2+1,-4*1+2,-4*1+2,-4*1+2,-4*1+2, /* table */ --4*1+0,-4*1+0,-4*1+0,-4*1+0,-4*1+0,-4*1+0,-4*2+0,0, /* item */ +-4*1+0,-4*1+0,-4*1+0,-4*1+0,-4*1+0,-4*1+0,-4*1+0,-4*2+0, /* item */ -4*18+0,-4*22+0,-4*22+0,-4*26+0,-4*17+1,-4*21+1,-4*21+1,-4*25+1, /* hset */ -4*18+0,-4*22+0,-4*22+0,-4*26+0,-4*17+1,-4*21+1,-4*21+1,-4*25+1, /* vset */ -4*2+0,-4*2+0,-4*6+0,-4*6+0,-4*1+1,-4*1+1,-4*5+1,-4*5+1, /* hpack */ -4*6+0,-4*6+0,-4*10+0,-4*10+0,-4*5+1,-4*5+1,-4*9+1,-4*9+1, /* vpack */ --4*3+0,0,-4*2+1,0,0,0,0,0, /* stream */ +-4*3+0,0,-4*2+1,0,3,0,0,0, /* stream */ 0,0,0,0,0,0,0,0, /* page */ -0,0,0,0,0,0,0,0, /* range */ 3,4,3,4,0,0,0,0, /* link */ +0,0,0,0,0,0,0,0, /* undefined1 */ 0,0,0,0,0,0,0,0, /* undefined2 */ 0,0,0,0,0,0,0,0, /* undefined3 */ -3,3,4,0,0,0,0,0}; /* penalty */ +3,3,4,6,0,0,0,0}; /* penalty */ + +uint8_t content_known[32]= { +0x00, /* list */ +0x00, /* param */ +0x00, /* range */ +0xFE, /* xdimen */ +0x02, /* adjust */ +0x1E, /* glyph */ +0xFF, /* kern */ +0xFF, /* glue */ +0xFF, /* ligature */ +0xDD, /* disc */ +0xFF, /* language */ +0xFF, /* rule */ +0xFF, /* image */ +0xEF, /* leaders */ +0xFF, /* baseline */ +0xFF, /* hbox */ +0xFF, /* vbox */ +0x55, /* par */ +0xFF, /* math */ +0xFF, /* table */ +0xFF, /* item */ +0xFF, /* hset */ +0xFF, /* vset */ +0xFF, /* hpack */ +0xFF, /* vpack */ +0x15, /* stream */ +0x00, /* page */ +0x0F, /* link */ +0x00, /* undefined1 */ +0x00, /* undefined2 */ +0x00, /* undefined3 */ +0x0F}; /* penalty */ diff --git a/Build/source/texk/web2c/hitexdir/hiparser.c b/Build/source/texk/web2c/hitexdir/hiparser.c index bd18ec32c92..75fa0a92ab5 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 10780 "format.w" + #line 11081 "format.w" #include "hibasetypes.h" #include <string.h> @@ -79,9 +79,9 @@ #include "hiput.h" extern char**hfont_name; - /*366:*/ + /*375:*/ uint32_t definition_bits[0x100/32][32]= { - #line 8078 "format.w" + #line 8284 "format.w" {0}}; #define SET_DBIT(N,K) ((N)>0xFF?1:(definition_bits[N/32][K] |= (1<<((N)&(32-1))))) @@ -91,52 +91,52 @@ uint32_t definition_bits[0x100/32][32]= { RNG("Definition",(D).n,max_fixed[(D).k]+1,max_ref[(D).k]); #define REF(K,N) REF_RNG(K,N);if(!GET_DBIT(N,K)) \ QUIT("Reference %d to %s before definition",(N),definition_name[K]) - /*:366*/ /*370:*/ + /*:375*/ /*379:*/ #define DEF_REF(D,K,M,N) DEF(D,K,M);\ if ((int)(M)>max_default[K]) QUIT("Defining non default reference %d for %s",M,definition_name[K]); \ if ((int)(N)>max_fixed[K]) QUIT("Defining reference %d for %s by non fixed reference %d",M,definition_name[K],N); - /*:370*/ + /*:379*/ extern void hset_entry(Entry*e,uint16_t i,uint32_t size, uint32_t xsize,char*file_name); - /*433:*/ + /*445:*/ #ifdef DEBUG #define YYDEBUG 1 extern int yydebug; #else #define YYDEBUG 0 #endif - /*:433*/ + /*:445*/ extern int yylex(void); - /*362:*/ + /*371:*/ void hset_max(Kind k,int n) { - #line 7921 "format.w" + #line 8126 "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]) max_ref[k]= n; } - /*:362*/ /*373:*/ + /*:371*/ /*382:*/ void check_param_def(Ref*df) { - #line 8227 "format.w" + #line 8437 "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) QUIT("Parameter %d for %s not allowed in parameter list",df->n,definition_name[df->k]); } - /*:373*/ /*432:*/ + /*:382*/ /*444:*/ extern int yylineno; int yyerror(const char*msg) { - #line 9351 "format.w" + #line 9577 "format.w" QUIT(" in line %d %s",yylineno,msg); return 0; } - /*:432*/ + /*:444*/ @@ -241,130 +241,136 @@ enum yysymbol_kind_t YYSYMBOL_MID = 70, /* "mid" */ YYSYMBOL_LINK = 71, /* "link" */ YYSYMBOL_OUTLINE = 72, /* "outline" */ - YYSYMBOL_STREAM = 73, /* "stream" */ - YYSYMBOL_STREAMDEF = 74, /* "stream (definition)" */ - YYSYMBOL_FIRST = 75, /* "first" */ - YYSYMBOL_LAST = 76, /* "last" */ - YYSYMBOL_TOP = 77, /* "top" */ - YYSYMBOL_NOREFERENCE = 78, /* "*" */ - YYSYMBOL_PAGE = 79, /* "page" */ - YYSYMBOL_RANGE = 80, /* "range" */ - YYSYMBOL_DIRECTORY = 81, /* "directory" */ - YYSYMBOL_SECTION = 82, /* "entry" */ - YYSYMBOL_DEFINITIONS = 83, /* "definitions" */ - YYSYMBOL_MAX = 84, /* "max" */ - YYSYMBOL_PARAM = 85, /* "param" */ - YYSYMBOL_FONT = 86, /* "font" */ - YYSYMBOL_CONTENT = 87, /* "content" */ - YYSYMBOL_YYACCEPT = 88, /* $accept */ - YYSYMBOL_glyph = 89, /* glyph */ - YYSYMBOL_content_node = 90, /* content_node */ - YYSYMBOL_start = 91, /* start */ - YYSYMBOL_integer = 92, /* integer */ - YYSYMBOL_string = 93, /* string */ - YYSYMBOL_number = 94, /* number */ - YYSYMBOL_dimension = 95, /* dimension */ - YYSYMBOL_xdimen = 96, /* xdimen */ - YYSYMBOL_xdimen_node = 97, /* xdimen_node */ - YYSYMBOL_order = 98, /* order */ - YYSYMBOL_stretch = 99, /* stretch */ - YYSYMBOL_penalty = 100, /* penalty */ - YYSYMBOL_rule_dimension = 101, /* rule_dimension */ - YYSYMBOL_rule = 102, /* rule */ - YYSYMBOL_rule_node = 103, /* rule_node */ - YYSYMBOL_explicit = 104, /* explicit */ - YYSYMBOL_kern = 105, /* kern */ - YYSYMBOL_plus = 106, /* plus */ - YYSYMBOL_minus = 107, /* minus */ - YYSYMBOL_glue = 108, /* glue */ - YYSYMBOL_glue_node = 109, /* glue_node */ - YYSYMBOL_position = 110, /* position */ - YYSYMBOL_content_list = 111, /* content_list */ - YYSYMBOL_estimate = 112, /* estimate */ - YYSYMBOL_list = 113, /* list */ - YYSYMBOL_114_1 = 114, /* $@1 */ - YYSYMBOL_text = 115, /* text */ - YYSYMBOL_txt = 116, /* txt */ - YYSYMBOL_117_2 = 117, /* $@2 */ - YYSYMBOL_box_dimen = 118, /* box_dimen */ - YYSYMBOL_box_shift = 119, /* box_shift */ - YYSYMBOL_box_glue_set = 120, /* box_glue_set */ - YYSYMBOL_box = 121, /* box */ - YYSYMBOL_hbox_node = 122, /* hbox_node */ - YYSYMBOL_vbox_node = 123, /* vbox_node */ - YYSYMBOL_box_flex = 124, /* box_flex */ - YYSYMBOL_xbox = 125, /* xbox */ - YYSYMBOL_box_goal = 126, /* box_goal */ - YYSYMBOL_hpack = 127, /* hpack */ - YYSYMBOL_vpack = 128, /* vpack */ - YYSYMBOL_129_3 = 129, /* $@3 */ - YYSYMBOL_vxbox_node = 130, /* vxbox_node */ - YYSYMBOL_hxbox_node = 131, /* hxbox_node */ - YYSYMBOL_ltype = 132, /* ltype */ - YYSYMBOL_leaders = 133, /* leaders */ - YYSYMBOL_baseline = 134, /* baseline */ + YYSYMBOL_UNKNOWN = 73, /* "unknown" */ + YYSYMBOL_STREAM = 74, /* "stream" */ + YYSYMBOL_STREAMDEF = 75, /* "stream (definition)" */ + YYSYMBOL_FIRST = 76, /* "first" */ + YYSYMBOL_LAST = 77, /* "last" */ + YYSYMBOL_TOP = 78, /* "top" */ + YYSYMBOL_NOREFERENCE = 79, /* "*" */ + YYSYMBOL_PAGE = 80, /* "page" */ + YYSYMBOL_RANGE = 81, /* "range" */ + YYSYMBOL_DIRECTORY = 82, /* "directory" */ + YYSYMBOL_SECTION = 83, /* "entry" */ + YYSYMBOL_DEFINITIONS = 84, /* "definitions" */ + YYSYMBOL_MAX = 85, /* "max" */ + YYSYMBOL_PARAM = 86, /* "param" */ + YYSYMBOL_FONT = 87, /* "font" */ + YYSYMBOL_CONTENT = 88, /* "content" */ + YYSYMBOL_YYACCEPT = 89, /* $accept */ + YYSYMBOL_glyph = 90, /* glyph */ + YYSYMBOL_content_node = 91, /* content_node */ + YYSYMBOL_start = 92, /* start */ + YYSYMBOL_integer = 93, /* integer */ + YYSYMBOL_string = 94, /* string */ + YYSYMBOL_number = 95, /* number */ + YYSYMBOL_dimension = 96, /* dimension */ + YYSYMBOL_xdimen = 97, /* xdimen */ + YYSYMBOL_xdimen_node = 98, /* xdimen_node */ + YYSYMBOL_order = 99, /* order */ + YYSYMBOL_stretch = 100, /* stretch */ + YYSYMBOL_penalty = 101, /* penalty */ + YYSYMBOL_rule_dimension = 102, /* rule_dimension */ + YYSYMBOL_rule = 103, /* rule */ + YYSYMBOL_rule_node = 104, /* rule_node */ + YYSYMBOL_explicit = 105, /* explicit */ + YYSYMBOL_kern = 106, /* kern */ + YYSYMBOL_plus = 107, /* plus */ + YYSYMBOL_minus = 108, /* minus */ + YYSYMBOL_glue = 109, /* glue */ + YYSYMBOL_glue_node = 110, /* glue_node */ + YYSYMBOL_position = 111, /* position */ + YYSYMBOL_content_list = 112, /* content_list */ + YYSYMBOL_estimate = 113, /* estimate */ + YYSYMBOL_list = 114, /* list */ + YYSYMBOL_115_1 = 115, /* $@1 */ + YYSYMBOL_text = 116, /* text */ + YYSYMBOL_txt = 117, /* txt */ + YYSYMBOL_118_2 = 118, /* $@2 */ + YYSYMBOL_box_dimen = 119, /* box_dimen */ + YYSYMBOL_box_shift = 120, /* box_shift */ + YYSYMBOL_box_glue_set = 121, /* box_glue_set */ + YYSYMBOL_box = 122, /* box */ + YYSYMBOL_hbox_node = 123, /* hbox_node */ + YYSYMBOL_vbox_node = 124, /* vbox_node */ + YYSYMBOL_box_flex = 125, /* box_flex */ + YYSYMBOL_box_options = 126, /* box_options */ + YYSYMBOL_hxbox_node = 127, /* hxbox_node */ + YYSYMBOL_vbox_dimen = 128, /* vbox_dimen */ + YYSYMBOL_vxbox_node = 129, /* vxbox_node */ + YYSYMBOL_box_goal = 130, /* box_goal */ + YYSYMBOL_hpack = 131, /* hpack */ + YYSYMBOL_max_depth = 132, /* max_depth */ + YYSYMBOL_vpack = 133, /* vpack */ + YYSYMBOL_134_3 = 134, /* $@3 */ YYSYMBOL_135_4 = 135, /* $@4 */ - YYSYMBOL_cc_list = 136, /* cc_list */ - YYSYMBOL_lig_cc = 137, /* lig_cc */ - YYSYMBOL_ref = 138, /* ref */ - YYSYMBOL_ligature = 139, /* ligature */ - YYSYMBOL_140_5 = 140, /* $@5 */ - YYSYMBOL_replace_count = 141, /* replace_count */ - YYSYMBOL_disc = 142, /* disc */ - YYSYMBOL_disc_node = 143, /* disc_node */ - YYSYMBOL_par_dimen = 144, /* par_dimen */ - YYSYMBOL_par = 145, /* par */ - YYSYMBOL_146_6 = 146, /* $@6 */ - YYSYMBOL_math = 147, /* math */ - YYSYMBOL_on_off = 148, /* on_off */ - YYSYMBOL_span_count = 149, /* span_count */ - YYSYMBOL_table = 150, /* table */ - YYSYMBOL_image_aspect = 151, /* image_aspect */ - YYSYMBOL_image_width = 152, /* image_width */ - YYSYMBOL_image_height = 153, /* image_height */ - YYSYMBOL_image_spec = 154, /* image_spec */ - YYSYMBOL_image = 155, /* image */ - YYSYMBOL_max_value = 156, /* max_value */ - YYSYMBOL_placement = 157, /* placement */ - YYSYMBOL_def_node = 158, /* def_node */ - YYSYMBOL_stream_link = 159, /* stream_link */ - YYSYMBOL_stream_split = 160, /* stream_split */ - YYSYMBOL_stream_info = 161, /* stream_info */ - YYSYMBOL_162_7 = 162, /* $@7 */ - YYSYMBOL_stream_type = 163, /* stream_type */ - YYSYMBOL_stream_def_node = 164, /* stream_def_node */ - YYSYMBOL_stream_ins_node = 165, /* stream_ins_node */ - YYSYMBOL_stream = 166, /* stream */ - YYSYMBOL_page_priority = 167, /* page_priority */ - YYSYMBOL_stream_def_list = 168, /* stream_def_list */ - YYSYMBOL_page = 169, /* page */ - YYSYMBOL_170_8 = 170, /* $@8 */ - YYSYMBOL_171_9 = 171, /* $@9 */ - YYSYMBOL_hint = 172, /* hint */ - YYSYMBOL_directory_section = 173, /* directory_section */ - YYSYMBOL_174_10 = 174, /* $@10 */ - YYSYMBOL_entry_list = 175, /* entry_list */ - YYSYMBOL_entry = 176, /* entry */ - YYSYMBOL_definition_section = 177, /* definition_section */ - YYSYMBOL_178_11 = 178, /* $@11 */ - YYSYMBOL_definition_list = 179, /* definition_list */ - YYSYMBOL_max_definitions = 180, /* max_definitions */ - YYSYMBOL_max_list = 181, /* max_list */ - YYSYMBOL_def_list = 182, /* def_list */ - YYSYMBOL_parameters = 183, /* parameters */ - YYSYMBOL_empty_param_list = 184, /* empty_param_list */ - YYSYMBOL_non_empty_param_list = 185, /* non_empty_param_list */ - YYSYMBOL_186_12 = 186, /* $@12 */ - YYSYMBOL_font = 187, /* font */ - YYSYMBOL_font_head = 188, /* font_head */ - YYSYMBOL_font_param_list = 189, /* font_param_list */ - YYSYMBOL_font_param = 190, /* font_param */ - YYSYMBOL_fref = 191, /* fref */ - YYSYMBOL_xdimen_ref = 192, /* xdimen_ref */ - YYSYMBOL_param_ref = 193, /* param_ref */ - YYSYMBOL_stream_ref = 194, /* stream_ref */ - YYSYMBOL_content_section = 195, /* content_section */ - YYSYMBOL_196_13 = 196 /* $@13 */ + YYSYMBOL_ltype = 136, /* ltype */ + YYSYMBOL_leaders = 137, /* leaders */ + YYSYMBOL_baseline = 138, /* baseline */ + YYSYMBOL_139_5 = 139, /* $@5 */ + YYSYMBOL_cc_list = 140, /* cc_list */ + YYSYMBOL_lig_cc = 141, /* lig_cc */ + YYSYMBOL_ref = 142, /* ref */ + YYSYMBOL_ligature = 143, /* ligature */ + YYSYMBOL_144_6 = 144, /* $@6 */ + YYSYMBOL_replace_count = 145, /* replace_count */ + YYSYMBOL_disc = 146, /* disc */ + YYSYMBOL_disc_node = 147, /* disc_node */ + YYSYMBOL_par_dimen = 148, /* par_dimen */ + YYSYMBOL_par = 149, /* par */ + YYSYMBOL_150_7 = 150, /* $@7 */ + YYSYMBOL_math = 151, /* math */ + YYSYMBOL_on_off = 152, /* on_off */ + YYSYMBOL_span_count = 153, /* span_count */ + YYSYMBOL_table = 154, /* table */ + YYSYMBOL_image_aspect = 155, /* image_aspect */ + YYSYMBOL_image_width = 156, /* image_width */ + YYSYMBOL_image_height = 157, /* image_height */ + YYSYMBOL_image_spec = 158, /* image_spec */ + YYSYMBOL_image = 159, /* image */ + YYSYMBOL_max_value = 160, /* max_value */ + YYSYMBOL_placement = 161, /* placement */ + YYSYMBOL_def_node = 162, /* def_node */ + YYSYMBOL_unknown_bytes = 163, /* unknown_bytes */ + YYSYMBOL_unknown_node = 164, /* unknown_node */ + YYSYMBOL_unknown_nodes = 165, /* unknown_nodes */ + YYSYMBOL_stream_link = 166, /* stream_link */ + YYSYMBOL_stream_split = 167, /* stream_split */ + YYSYMBOL_stream_info = 168, /* stream_info */ + YYSYMBOL_169_8 = 169, /* $@8 */ + YYSYMBOL_stream_type = 170, /* stream_type */ + YYSYMBOL_stream_def_node = 171, /* stream_def_node */ + YYSYMBOL_stream_ins_node = 172, /* stream_ins_node */ + YYSYMBOL_stream = 173, /* stream */ + YYSYMBOL_page_priority = 174, /* page_priority */ + YYSYMBOL_stream_def_list = 175, /* stream_def_list */ + YYSYMBOL_page = 176, /* page */ + YYSYMBOL_177_9 = 177, /* $@9 */ + YYSYMBOL_178_10 = 178, /* $@10 */ + YYSYMBOL_hint = 179, /* hint */ + YYSYMBOL_directory_section = 180, /* directory_section */ + YYSYMBOL_181_11 = 181, /* $@11 */ + YYSYMBOL_entry_list = 182, /* entry_list */ + YYSYMBOL_entry = 183, /* entry */ + YYSYMBOL_definition_section = 184, /* definition_section */ + YYSYMBOL_185_12 = 185, /* $@12 */ + YYSYMBOL_definition_list = 186, /* definition_list */ + YYSYMBOL_max_definitions = 187, /* max_definitions */ + YYSYMBOL_max_list = 188, /* max_list */ + YYSYMBOL_def_list = 189, /* def_list */ + YYSYMBOL_parameters = 190, /* parameters */ + YYSYMBOL_named_param_list = 191, /* named_param_list */ + YYSYMBOL_param_list = 192, /* param_list */ + YYSYMBOL_font = 193, /* font */ + YYSYMBOL_font_head = 194, /* font_head */ + YYSYMBOL_font_param_list = 195, /* font_param_list */ + YYSYMBOL_font_param = 196, /* font_param */ + YYSYMBOL_fref = 197, /* fref */ + YYSYMBOL_xdimen_ref = 198, /* xdimen_ref */ + YYSYMBOL_param_ref = 199, /* param_ref */ + YYSYMBOL_stream_ref = 200, /* stream_ref */ + YYSYMBOL_content_section = 201, /* content_section */ + YYSYMBOL_202_13 = 202 /* $@13 */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; @@ -692,19 +698,19 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 5 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 642 +#define YYLAST 720 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 88 +#define YYNTOKENS 89 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 109 +#define YYNNTS 114 /* YYNRULES -- Number of rules. */ -#define YYNRULES 274 +#define YYNRULES 285 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 576 +#define YYNSTATES 596 /* YYMAXUTOK -- Last valid token kind. */ -#define YYMAXUTOK 342 +#define YYMAXUTOK 343 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM @@ -752,41 +758,42 @@ static const yytype_int8 yytranslate[] = 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, - 85, 86, 87 + 85, 86, 87, 88 }; #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = { - 0, 268, 268, 271, 274, 278, 278, 282, 286, 286, - 292, 294, 296, 298, 301, 304, 308, 311, 314, 317, - 321, 326, 328, 330, 332, 336, 340, 343, 347, 347, - 350, 356, 359, 361, 363, 366, 369, 373, 375, 378, - 380, 383, 386, 390, 396, 399, 400, 401, 404, 407, - 414, 413, 422, 422, 424, 427, 430, 433, 436, 439, - 442, 445, 445, 450, 454, 457, 461, 464, 467, 472, - 476, 479, 482, 482, 484, 487, 490, 494, 497, 500, - 503, 507, 510, 510, 516, 519, 524, 527, 531, 531, - 533, 535, 537, 539, 542, 545, 548, 551, 555, 555, - 564, 569, 569, 572, 575, 578, 581, 581, 588, 592, - 595, 599, 603, 606, 611, 616, 618, 621, 624, 627, - 630, 630, 635, 638, 642, 646, 649, 652, 655, 658, - 661, 664, 667, 670, 674, 678, 680, 683, 687, 691, - 694, 697, 700, 704, 707, 711, 715, 717, 720, 723, - 726, 729, 733, 737, 741, 745, 750, 754, 758, 765, - 767, 769, 771, 774, 779, 784, 794, 796, 799, 802, - 802, 806, 808, 810, 812, 816, 822, 827, 827, 829, - 832, 835, 838, 843, 846, 850, 850, 852, 854, 852, - 861, 864, 868, 870, 870, 873, 873, 874, 879, 879, - 886, 886, 888, 913, 913, 915, 918, 921, 924, 927, - 930, 933, 936, 939, 942, 945, 948, 951, 954, 957, - 960, 963, 969, 972, 975, 978, 981, 984, 987, 990, - 993, 996, 999, 1002, 1005, 1008, 1013, 1016, 1019, 1023, - 1024, 1027, 1031, 1034, 1034, 1042, 1044, 1049, 1049, 1052, - 1055, 1058, 1061, 1064, 1067, 1070, 1073, 1077, 1081, 1084, - 1087, 1093, 1096, 1100, 1104, 1107, 1110, 1113, 1116, 1119, - 1122, 1125, 1129, 1136, 1136 + 0, 274, 274, 277, 280, 284, 284, 288, 292, 292, + 298, 300, 302, 304, 307, 310, 314, 317, 320, 323, + 327, 332, 334, 336, 338, 342, 346, 349, 353, 353, + 356, 362, 365, 367, 369, 372, 375, 379, 381, 384, + 386, 389, 392, 396, 402, 405, 406, 407, 410, 413, + 420, 419, 428, 428, 430, 433, 436, 439, 442, 445, + 448, 451, 451, 456, 460, 463, 467, 470, 473, 478, + 482, 485, 488, 488, 490, 494, 497, 501, 505, 506, + 511, 515, 518, 521, 524, 528, 532, 536, 538, 542, + 542, 547, 547, 553, 557, 557, 559, 561, 563, 565, + 568, 571, 574, 577, 581, 581, 590, 595, 595, 598, + 601, 604, 607, 607, 614, 618, 621, 625, 629, 632, + 637, 642, 644, 647, 650, 653, 653, 658, 662, 666, + 669, 672, 675, 678, 681, 685, 689, 691, 694, 698, + 702, 705, 708, 711, 715, 718, 722, 726, 728, 731, + 734, 737, 740, 744, 748, 752, 756, 761, 765, 769, + 776, 778, 780, 782, 785, 790, 795, 805, 808, 812, + 815, 817, 820, 820, 820, 820, 821, 823, 827, 829, + 832, 835, 835, 839, 841, 843, 845, 849, 855, 860, + 860, 862, 865, 868, 873, 876, 880, 880, 882, 884, + 882, 891, 894, 898, 900, 900, 903, 903, 904, 909, + 909, 916, 916, 918, 945, 945, 947, 950, 953, 956, + 959, 962, 965, 968, 971, 974, 977, 980, 983, 986, + 989, 992, 995, 1001, 1004, 1007, 1010, 1013, 1016, 1019, + 1022, 1025, 1028, 1031, 1034, 1037, 1040, 1045, 1048, 1051, + 1055, 1056, 1059, 1063, 1067, 1067, 1073, 1075, 1080, 1080, + 1083, 1086, 1089, 1092, 1095, 1098, 1101, 1104, 1108, 1112, + 1115, 1118, 1124, 1127, 1131, 1135, 1138, 1141, 1144, 1147, + 1150, 1153, 1156, 1160, 1167, 1167 }; #endif @@ -815,29 +822,31 @@ static const char *const yytname[] = "\"center\"", "\"expand\"", "\"baseline\"", "\"ligature\"", "\"disc\"", "\"par\"", "\"math\"", "\"on\"", "\"off\"", "\"adjust\"", "\"table\"", "\"item\"", "\"image\"", "\"width\"", "\"height\"", "\"label\"", - "\"bot\"", "\"mid\"", "\"link\"", "\"outline\"", "\"stream\"", - "\"stream (definition)\"", "\"first\"", "\"last\"", "\"top\"", "\"*\"", - "\"page\"", "\"range\"", "\"directory\"", "\"entry\"", "\"definitions\"", - "\"max\"", "\"param\"", "\"font\"", "\"content\"", "$accept", "glyph", - "content_node", "start", "integer", "string", "number", "dimension", - "xdimen", "xdimen_node", "order", "stretch", "penalty", "rule_dimension", - "rule", "rule_node", "explicit", "kern", "plus", "minus", "glue", - "glue_node", "position", "content_list", "estimate", "list", "$@1", - "text", "txt", "$@2", "box_dimen", "box_shift", "box_glue_set", "box", - "hbox_node", "vbox_node", "box_flex", "xbox", "box_goal", "hpack", - "vpack", "$@3", "vxbox_node", "hxbox_node", "ltype", "leaders", - "baseline", "$@4", "cc_list", "lig_cc", "ref", "ligature", "$@5", - "replace_count", "disc", "disc_node", "par_dimen", "par", "$@6", "math", + "\"bot\"", "\"mid\"", "\"link\"", "\"outline\"", "\"unknown\"", + "\"stream\"", "\"stream (definition)\"", "\"first\"", "\"last\"", + "\"top\"", "\"*\"", "\"page\"", "\"range\"", "\"directory\"", + "\"entry\"", "\"definitions\"", "\"max\"", "\"param\"", "\"font\"", + "\"content\"", "$accept", "glyph", "content_node", "start", "integer", + "string", "number", "dimension", "xdimen", "xdimen_node", "order", + "stretch", "penalty", "rule_dimension", "rule", "rule_node", "explicit", + "kern", "plus", "minus", "glue", "glue_node", "position", "content_list", + "estimate", "list", "$@1", "text", "txt", "$@2", "box_dimen", + "box_shift", "box_glue_set", "box", "hbox_node", "vbox_node", "box_flex", + "box_options", "hxbox_node", "vbox_dimen", "vxbox_node", "box_goal", + "hpack", "max_depth", "vpack", "$@3", "$@4", "ltype", "leaders", + "baseline", "$@5", "cc_list", "lig_cc", "ref", "ligature", "$@6", + "replace_count", "disc", "disc_node", "par_dimen", "par", "$@7", "math", "on_off", "span_count", "table", "image_aspect", "image_width", "image_height", "image_spec", "image", "max_value", "placement", - "def_node", "stream_link", "stream_split", "stream_info", "$@7", - "stream_type", "stream_def_node", "stream_ins_node", "stream", - "page_priority", "stream_def_list", "page", "$@8", "$@9", "hint", - "directory_section", "$@10", "entry_list", "entry", "definition_section", - "$@11", "definition_list", "max_definitions", "max_list", "def_list", - "parameters", "empty_param_list", "non_empty_param_list", "$@12", "font", - "font_head", "font_param_list", "font_param", "fref", "xdimen_ref", - "param_ref", "stream_ref", "content_section", "$@13", YY_NULLPTR + "def_node", "unknown_bytes", "unknown_node", "unknown_nodes", + "stream_link", "stream_split", "stream_info", "$@8", "stream_type", + "stream_def_node", "stream_ins_node", "stream", "page_priority", + "stream_def_list", "page", "$@9", "$@10", "hint", "directory_section", + "$@11", "entry_list", "entry", "definition_section", "$@12", + "definition_list", "max_definitions", "max_list", "def_list", + "parameters", "named_param_list", "param_list", "font", "font_head", + "font_param_list", "font_param", "fref", "xdimen_ref", "param_ref", + "stream_ref", "content_section", "$@13", YY_NULLPTR }; static const char * @@ -847,7 +856,7 @@ yysymbol_name (yysymbol_kind_t yysymbol) } #endif -#define YYPACT_NINF (-242) +#define YYPACT_NINF (-275) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) @@ -861,64 +870,66 @@ yysymbol_name (yysymbol_kind_t yysymbol) STATE-NUM. */ static const yytype_int16 yypact[] = { - 55, 10, 108, 129, 135, -242, 81, 170, -242, -242, - 104, -242, -242, 191, -242, 209, 113, -242, -242, 140, - -242, -242, -242, 216, -242, 227, 220, 238, 177, -242, - 59, -242, -2, -242, -242, 568, -242, -242, -242, -242, - -242, -242, -242, -242, 280, 391, -242, 252, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 257, 260, 75, 278, 264, 175, 246, 217, - 164, 164, 256, 164, 256, 164, 110, 217, 255, 70, - 217, 88, 94, 167, 87, 300, 286, 255, 255, -242, - -242, 299, 310, 313, 321, 339, 341, 343, 344, 345, - 349, 352, 353, 354, 355, 356, 357, 358, 359, 360, - 342, 115, -242, 217, 164, 278, 280, 181, 217, 364, - 164, 255, 246, 362, 280, 363, 280, 90, 254, 365, - 366, 367, -242, -242, -242, 370, 371, 377, -242, -242, - -242, -242, 297, -242, 181, 379, 382, -242, 198, 383, - 164, 361, 384, 386, 164, 256, 389, 392, 164, 275, - 393, 256, 394, 315, 397, 400, -242, 380, 269, 402, - 404, -242, 406, 407, 408, 409, 411, 415, 94, 418, - 255, -242, -242, 419, 255, -242, -242, -242, -242, 420, - -242, 94, 94, -242, 363, 421, 275, 275, 422, -242, - 423, 513, 427, 430, 164, 434, 94, 436, 277, -242, - 255, 76, -242, -242, -242, -242, -242, -242, -242, -242, - -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, - -242, -242, -242, 437, 441, 445, 446, 447, 448, 449, - 450, 453, 454, 457, -242, 458, 463, 464, -242, 465, - -242, -242, 468, 164, 469, 364, -242, -242, -242, 470, - 471, 474, -242, -242, -242, -242, -242, -242, -242, -242, - -242, 181, -242, -242, 255, -242, 475, -242, 322, 164, - 455, -242, -242, 164, 311, -242, -242, -242, 110, 110, - 94, -242, 361, -242, 433, -242, -242, 217, -242, -242, - -242, 364, -242, -242, 364, -242, -242, -242, 193, -242, - -242, -242, 94, -242, -242, 94, -242, 94, 94, -242, - 45, 364, 94, 94, 51, 364, 94, -242, -242, -242, - 94, 94, -242, -242, -242, 480, -242, 304, -242, -242, - -242, 481, 483, 94, 94, -242, -242, -242, -242, 472, - 485, -242, 94, 94, -242, -242, -242, -242, -242, -242, - -242, -242, -242, -242, -242, -242, -242, -242, 487, -242, - -242, 486, -242, 489, -242, 364, 364, -242, -242, -242, - -242, 493, -242, 164, -242, 197, -242, 164, -242, -242, - 164, 164, 94, -242, -242, -242, -242, -242, 455, 110, - 164, 494, 495, 154, -242, -242, -242, 364, -242, -242, - 473, -242, 94, 46, -242, 94, -242, 94, -242, -242, - 459, -242, -242, 364, 94, -242, -242, -242, 340, 94, - 94, -242, 240, 435, -242, -242, -242, 94, -242, 164, - -242, 364, 497, -242, 364, -242, 498, 451, -242, 77, - -242, -242, 488, -242, -242, -242, -242, -242, -242, -242, - -242, -242, -242, 94, 94, -242, -242, -242, 181, -242, - -242, -242, -242, -242, 363, -242, -242, -242, 200, -242, - -242, -242, 440, -242, 250, -242, -242, 505, 47, 364, - -242, 164, -242, 246, 255, 255, 255, 255, 255, 255, - 255, 255, -242, -242, -242, 275, 107, 506, -242, -242, - -242, -242, -242, -242, -242, -242, -242, 430, 262, -242, - -242, -242, -242, -242, -242, 47, -242, 94, -242, -242, - 115, 280, 181, 246, 164, 255, 246, 362, 94, -242, - -242, -242, -242, -242, 507, 364, 364, 508, 510, 511, - 164, 512, 516, 517, 521, 522, -242, -242, 523, 364, - -242, -242, -242, -242, -242, -242, -242, -242, -242, 94, - -242, 364, 443, -242, 255, 86 + 101, 25, 127, 133, 163, -275, 94, 139, -275, -275, + 93, -275, -275, 214, -275, 47, 151, -275, -275, 165, + -275, -275, -275, 114, -275, 159, 249, 259, 178, -275, + 174, -275, 9, -275, -275, 645, -275, -275, -275, -275, + -275, -275, -275, -275, 271, 320, -275, 252, 269, 269, + 269, 269, 269, 269, 269, 269, 269, 269, 269, 260, + 269, 269, 269, 275, 282, 103, 198, 287, 108, 250, + 213, 261, 261, 268, 261, 59, 57, 219, 213, 269, + 60, 213, 90, 78, 270, 63, 295, 316, 325, 269, + 269, -275, -275, 336, 352, 353, 354, 355, 356, 358, + 359, 360, 364, 366, 368, 372, 373, 374, 376, 377, + 378, 384, 338, 183, -275, 213, 261, 198, 271, 153, + 213, 394, 261, 269, 250, 392, 393, 271, 396, 271, + 131, 244, 398, 401, 399, -275, -275, -275, 412, 413, + 414, -275, -275, -275, -275, 220, -275, 153, 415, 416, + -275, 177, 420, 261, 397, 422, 424, 261, 268, 427, + 428, 261, 267, 430, 268, 351, 389, -275, 434, 261, + -275, 268, -275, 411, 192, 437, 438, -275, 439, 440, + 441, 442, 443, 444, 78, 446, 269, -275, 394, 447, + 219, -275, -275, 34, -275, 448, -275, -275, 78, 78, + -275, 396, 452, 267, 267, 455, -275, 456, 590, 457, + 459, 261, 462, 78, 463, 265, -275, -275, 219, 70, + -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, + -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, + -275, 465, 466, 467, 468, 470, 471, 472, 473, 474, + 475, 476, -275, 478, 479, 480, 210, -275, 481, -275, + -275, 482, 261, 485, 394, -275, -275, -275, 487, 488, + 489, -275, -275, -275, -275, -275, -275, -275, -275, -275, + 153, -275, -275, 269, -275, 490, -275, 329, 261, 432, + -275, -275, 261, 304, -275, -275, -275, 219, 219, 78, + -275, 397, 491, -275, 261, 268, -275, 261, 492, 213, + -275, -275, -275, 394, -275, -275, 394, -275, -275, -275, + 217, -275, -275, -275, 78, -275, -275, 78, -275, 78, + 78, 396, 493, -275, 58, 394, 78, 394, 78, -275, + -275, -275, 78, 78, -275, -275, -275, 494, -275, 381, + -275, -275, -275, 496, 495, 499, 78, 78, -275, -275, + -275, -275, 497, 500, -275, 78, 78, -275, -275, -275, + -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, + -275, -275, 501, 502, -275, -275, 504, -275, 503, -275, + 394, 394, -275, -275, -275, -275, 506, -275, 261, -275, + 136, -275, 261, -275, -275, 261, 261, 78, -275, -275, + -275, -275, -275, 432, 219, -275, 268, -275, 267, 261, + -275, 507, 510, 61, -275, -275, -275, 394, -275, -275, + 483, -275, 78, -275, -275, -275, 513, -275, 477, -275, + -275, -275, -275, -275, 334, 78, 78, -275, 302, 453, + -275, -275, 97, -275, -275, -275, 261, -275, 394, 515, + -275, -275, 394, -275, 516, 464, -275, 186, -275, -275, + 505, -275, -275, -275, -275, -275, -275, -275, -275, -275, + -275, 78, 78, 267, 78, -275, -275, -275, 153, -275, + -275, -275, -275, -275, 317, -275, -275, -275, 458, -275, + 313, -275, -275, -275, 535, -275, -275, -275, -275, 522, + 64, 394, -275, 261, -275, 250, 269, 269, 269, 269, + 269, 269, 269, 269, -275, -275, -275, 78, -275, 120, + -275, -275, -275, -275, -275, -275, -275, -275, -275, 459, + 322, -275, -275, -275, -275, -275, -275, 64, -275, 78, + -275, -275, 183, 271, 153, 250, 261, 269, 250, 392, + -275, -275, -275, -275, -275, 521, 394, 394, 524, 525, + 527, 261, 528, 529, 530, 531, 532, -275, 533, 394, + -275, -275, -275, -275, -275, -275, -275, -275, -275, 78, + -275, 394, 486, -275, 269, 45 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -926,96 +937,100 @@ static const yytype_int16 yypact[] = means the default is an error. */ static const yytype_int16 yydefact[] = { - 0, 0, 0, 0, 0, 1, 0, 0, 193, 198, - 0, 192, 195, 0, 273, 0, 0, 200, 44, 0, - 194, 196, 203, 0, 45, 0, 0, 0, 4, 199, - 0, 201, 4, 274, 46, 0, 32, 72, 73, 88, - 89, 115, 177, 178, 0, 0, 202, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 0, 0, 204, 209, + 0, 203, 206, 0, 284, 0, 0, 211, 44, 0, + 205, 207, 214, 0, 45, 0, 0, 0, 4, 210, + 0, 212, 4, 285, 46, 0, 32, 72, 73, 95, + 94, 121, 189, 190, 0, 0, 213, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 33, 0, - 0, 0, 64, 0, 64, 0, 0, 0, 0, 33, - 0, 44, 0, 0, 0, 0, 0, 0, 0, 8, - 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, + 0, 0, 0, 64, 0, 87, 0, 0, 0, 0, + 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 8, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 105, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 33, 0, 0, 47, 0, 162, 0, 0, - 0, 0, 6, 5, 26, 0, 0, 0, 10, 11, - 12, 29, 0, 28, 0, 0, 0, 34, 0, 0, - 19, 37, 0, 0, 0, 64, 0, 0, 0, 0, - 0, 64, 0, 0, 0, 0, 4, 0, 90, 0, - 0, 98, 0, 0, 106, 0, 109, 0, 113, 0, - 116, 258, 44, 0, 44, 135, 136, 242, 259, 0, - 137, 0, 0, 44, 47, 0, 0, 0, 0, 139, - 0, 47, 0, 0, 147, 0, 0, 0, 0, 260, - 44, 0, 197, 207, 216, 206, 211, 212, 210, 214, - 215, 208, 209, 213, 221, 158, 218, 219, 220, 217, - 205, 204, 44, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 106, 0, 0, 0, 187, 0, - 48, 44, 0, 0, 0, 0, 160, 161, 159, 0, - 0, 0, 2, 7, 3, 27, 261, 271, 13, 15, - 14, 0, 31, 267, 0, 35, 0, 36, 0, 0, - 39, 42, 264, 0, 66, 70, 71, 65, 0, 0, - 0, 87, 37, 86, 0, 85, 84, 0, 91, 92, - 93, 0, 97, 269, 0, 100, 270, 265, 0, 108, - 110, 266, 112, 114, 120, 0, 124, 0, 0, 134, - 47, 128, 0, 0, 47, 125, 0, 50, 44, 138, - 0, 0, 145, 140, 142, 0, 146, 149, 268, 156, - 157, 0, 0, 0, 0, 176, 172, 173, 174, 0, - 0, 171, 0, 0, 224, 237, 227, 223, 236, 225, - 228, 226, 238, 229, 230, 231, 232, 233, 183, 235, - 239, 241, 234, 0, 222, 0, 245, 163, 190, 191, - 30, 0, 262, 17, 18, 0, 38, 0, 41, 63, - 0, 0, 0, 80, 78, 79, 77, 81, 39, 0, - 0, 0, 0, 0, 94, 95, 96, 0, 103, 104, - 0, 111, 0, 47, 123, 0, 119, 0, 117, 243, - 0, 129, 130, 131, 0, 126, 127, 44, 0, 0, - 0, 141, 0, 151, 164, 182, 179, 0, 181, 0, - 169, 0, 0, 184, 0, 240, 0, 0, 247, 0, - 248, 263, 0, 21, 22, 23, 24, 25, 40, 67, - 68, 69, 74, 0, 0, 82, 43, 272, 0, 99, - 101, 121, 122, 118, 47, 132, 133, 52, 61, 49, - 143, 144, 151, 148, 0, 152, 180, 0, 0, 0, - 165, 0, 246, 33, 0, 0, 0, 0, 0, 0, - 0, 0, 16, 76, 75, 0, 0, 0, 51, 60, - 58, 59, 55, 57, 56, 54, 53, 0, 0, 153, - 154, 150, 20, 167, 166, 0, 170, 0, 188, 257, - 0, 0, 0, 33, 0, 0, 33, 0, 0, 107, - 102, 244, 62, 155, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 83, 168, 0, 0, - 249, 254, 255, 250, 253, 251, 252, 256, 175, 0, - 185, 189, 0, 186, 0, 0 + 0, 0, 0, 0, 111, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 33, 0, 0, 0, 47, 0, + 163, 0, 0, 0, 0, 6, 5, 26, 0, 0, + 0, 10, 11, 12, 29, 0, 28, 0, 0, 0, + 34, 0, 0, 19, 37, 0, 0, 0, 64, 0, + 0, 0, 0, 0, 64, 87, 0, 89, 0, 0, + 78, 64, 4, 0, 96, 0, 0, 104, 0, 0, + 112, 0, 115, 0, 119, 0, 122, 269, 0, 0, + 0, 136, 137, 47, 270, 0, 138, 254, 0, 0, + 44, 47, 0, 0, 0, 0, 140, 0, 47, 0, + 0, 148, 0, 0, 0, 0, 170, 271, 0, 0, + 208, 218, 227, 217, 222, 223, 221, 225, 226, 219, + 220, 224, 232, 159, 229, 230, 231, 228, 216, 215, + 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 112, 0, 0, 0, 0, 198, 0, 48, + 44, 0, 0, 0, 0, 161, 162, 160, 0, 0, + 0, 2, 7, 3, 27, 272, 282, 13, 15, 14, + 0, 31, 278, 0, 35, 0, 36, 0, 0, 39, + 42, 275, 0, 66, 70, 71, 65, 0, 0, 0, + 86, 37, 0, 91, 0, 64, 93, 0, 0, 0, + 97, 98, 99, 0, 103, 280, 0, 106, 281, 276, + 0, 114, 116, 277, 118, 120, 125, 0, 128, 0, + 0, 47, 0, 135, 47, 132, 0, 129, 0, 50, + 44, 139, 0, 0, 146, 141, 143, 0, 147, 150, + 279, 157, 158, 0, 176, 0, 0, 0, 188, 184, + 185, 186, 0, 0, 183, 0, 0, 235, 248, 238, + 234, 247, 236, 239, 237, 249, 240, 241, 242, 243, + 244, 167, 0, 194, 246, 250, 252, 245, 0, 233, + 0, 256, 164, 201, 202, 30, 0, 273, 17, 18, + 0, 38, 0, 41, 63, 0, 0, 0, 84, 82, + 83, 81, 85, 39, 0, 77, 64, 88, 0, 0, + 80, 0, 0, 0, 100, 101, 102, 0, 109, 110, + 0, 117, 0, 127, 124, 123, 0, 255, 0, 133, + 134, 130, 131, 44, 0, 0, 0, 142, 0, 152, + 165, 171, 0, 193, 191, 192, 0, 181, 0, 0, + 168, 195, 0, 251, 0, 0, 258, 0, 259, 274, + 0, 21, 22, 23, 24, 25, 40, 67, 68, 69, + 74, 0, 0, 0, 0, 79, 43, 283, 0, 105, + 107, 126, 253, 52, 61, 49, 144, 145, 152, 149, + 0, 153, 169, 172, 47, 173, 174, 177, 175, 0, + 0, 0, 166, 0, 257, 33, 0, 0, 0, 0, + 0, 0, 0, 0, 16, 76, 75, 0, 90, 0, + 51, 60, 58, 59, 55, 57, 56, 54, 53, 0, + 0, 154, 155, 151, 20, 179, 178, 0, 182, 0, + 199, 268, 0, 0, 0, 33, 0, 0, 33, 0, + 92, 113, 108, 62, 156, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 180, 0, 0, + 260, 265, 266, 261, 264, 262, 263, 267, 187, 0, + 196, 200, 0, 197, 0, 0 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -242, -242, -83, -23, 100, -87, -86, -8, -54, -233, - -242, -137, -19, -94, -96, 229, -51, -5, 239, 134, - -99, -217, 28, 205, -95, -35, -242, -242, -242, -242, - 127, -33, -242, 476, -147, 242, -242, 466, -169, -242, - -242, -242, -242, -242, -242, 425, 426, -242, -242, -242, - -45, -103, -242, -242, -97, 174, -242, -242, -242, -242, - 331, -242, -242, -242, -242, 63, -242, -100, -242, -242, - 179, 26, -242, -242, -242, -242, -18, -242, -242, -242, - -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, - -242, -242, -242, -242, -242, 82, -110, -188, -242, -242, - -242, -242, -242, -166, -241, -73, -242, -242, -242 + -275, -275, -58, -23, 115, -98, -106, 11, -67, -240, + -275, -274, -14, -109, -97, 226, -68, -13, 245, 132, + -102, -225, -148, 207, -82, -59, -275, -275, -275, -275, + 182, -20, -275, 498, -143, 235, -275, 379, -275, -275, + -275, -161, -275, 387, -275, -275, -275, -275, 433, 431, + -275, -275, -275, -45, -104, -275, -275, -100, 168, -275, + -275, -275, -275, 340, -275, -275, -275, -275, 65, -275, + -95, -275, -275, 180, -275, -275, -275, 20, -275, -275, + -275, -275, -22, -275, -275, -275, -275, -275, -275, -275, + -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, + -275, -165, 119, -94, -275, -275, -275, -275, -108, -237, + -110, -275, -275, -275 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - 0, 131, 34, 194, 134, 91, 142, 150, 151, 350, - 457, 386, 135, 144, 145, 36, 176, 149, 280, 388, - 152, 168, 187, 25, 328, 195, 427, 478, 516, 517, - 155, 159, 392, 156, 37, 38, 399, 162, 290, 160, - 164, 505, 39, 40, 301, 169, 172, 304, 506, 410, - 529, 175, 308, 178, 179, 41, 182, 183, 412, 189, - 190, 203, 198, 337, 433, 485, 206, 207, 110, 259, - 31, 525, 526, 351, 488, 352, 42, 43, 342, 444, - 571, 249, 368, 546, 2, 3, 12, 15, 21, 7, - 13, 23, 17, 27, 371, 252, 191, 323, 474, 254, - 255, 376, 450, 530, 184, 192, 210, 11, 18 + 0, 134, 34, 201, 137, 93, 145, 153, 154, 363, + 475, 401, 138, 147, 148, 36, 182, 152, 289, 403, + 155, 174, 24, 25, 340, 202, 443, 494, 538, 539, + 158, 301, 407, 159, 37, 38, 414, 302, 39, 171, + 40, 299, 163, 167, 168, 305, 416, 313, 175, 178, + 316, 529, 430, 551, 181, 320, 184, 185, 41, 188, + 189, 432, 195, 196, 210, 205, 349, 449, 501, 213, + 214, 112, 268, 31, 354, 507, 452, 547, 548, 364, + 510, 365, 42, 43, 355, 462, 591, 258, 383, 567, + 2, 3, 12, 15, 21, 7, 13, 23, 17, 27, + 386, 261, 197, 198, 263, 264, 391, 468, 552, 190, + 199, 218, 11, 18 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -1023,237 +1038,256 @@ static const yytype_int16 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { - 30, 200, 35, 113, 114, 115, 116, 117, 118, 119, - 120, 121, 122, 123, 124, 125, 126, 148, 245, 240, - 136, 239, 146, 247, 153, 246, 180, 330, 331, 238, - 251, 170, 173, 174, 177, 181, 188, 248, 375, 253, - 205, 163, 209, 211, 322, 326, 24, 394, 396, 202, - 271, 250, 250, 167, 112, 393, 395, 250, 1, 143, - 235, 201, 154, 154, 278, 154, 62, 154, 234, 171, - 237, 48, 315, 241, 317, 49, 244, 112, 63, 166, - 345, 129, 50, 51, 52, 130, 70, 407, 53, 166, - 32, 4, 70, 199, 275, 112, 167, 166, 147, 494, - 343, 495, 496, 276, 497, 233, 498, 314, 5, 143, - 54, 318, 171, 166, 55, 56, 57, 112, 336, 193, - 335, 132, 284, 133, 58, 523, 193, 415, 292, 417, - 419, 419, 6, 499, 500, 188, 143, 344, 59, 188, - 539, 8, 501, 312, 60, 61, 283, 540, 185, 186, - 287, 346, 347, 348, 405, 437, 321, 325, 464, 256, - 257, 346, 347, 348, 9, 188, 463, 258, 320, 324, - 138, 339, 139, 10, 421, 140, 424, 380, 425, 468, - 35, 138, 112, 139, 196, 197, 140, 138, 349, 139, - 469, 14, 140, 385, 16, 70, 71, 22, 401, 408, - 161, 141, 161, 409, 138, 112, 139, 141, 489, 140, - 453, 232, 19, 20, 274, 236, 454, 455, 456, 28, - 29, 327, 26, 138, 112, 139, 44, 491, 140, 381, - 32, 33, 167, 508, 509, 510, 511, 512, 513, 514, - 515, 45, 46, 181, 181, 373, 138, 482, 139, 47, - 458, 140, 402, 459, 460, 397, 138, 520, 139, 111, - 353, 140, 112, 143, 127, 349, 349, 128, 138, 543, - 139, 137, 527, 140, 147, 389, 475, 411, 403, 370, - 414, 167, 416, 418, 132, 112, 133, 422, 423, 89, - 90, 426, 413, 208, 413, 429, 430, 452, 420, 158, - 324, 385, 420, 212, 385, 385, 204, 112, 436, 438, - 268, 269, 270, 559, 260, 261, 213, 441, 442, 214, - 413, 298, 299, 300, 288, 289, 569, 215, 558, 531, - 532, 533, 534, 535, 536, 537, 538, 185, 186, 383, - 384, 390, 391, 32, 479, 216, 231, 217, 30, 218, - 219, 220, 447, 449, 181, 221, 24, 461, 222, 223, - 224, 225, 226, 227, 228, 229, 230, 166, 204, 250, - 432, 264, 262, 263, 265, 266, 349, 471, 483, 251, - 472, 267, 473, 272, 167, 487, 273, 277, 281, 476, - 282, 279, 465, 285, 480, 481, 286, 291, 293, 294, - 420, 295, 486, 92, 296, 35, 302, 93, 303, 297, - 305, 306, 307, 309, 94, 95, 96, 310, 349, 311, - 97, 167, 313, 316, 319, 329, 332, 333, 503, 504, - 521, 334, 553, 32, 542, 552, 549, 555, 338, 554, - 340, 354, 98, 524, 548, 355, 99, 100, 101, 356, - 357, 358, 359, 360, 361, 477, 102, 362, 363, 103, - 143, 364, 365, 104, 521, 105, 167, 366, 367, 369, - 106, 107, 372, 374, 377, 378, 108, 109, 379, 382, - 524, 400, 550, 528, 431, 434, 387, 435, 439, 28, - 244, 440, 545, 443, 35, 446, 275, 451, 466, 467, - 70, 490, 484, 556, 492, 470, 502, 518, 493, 522, - 541, 547, 560, 557, 561, 562, 563, 574, 64, 250, - 564, 565, 167, 349, 143, 566, 567, 568, 551, 575, - 404, 398, 462, 428, 570, 65, 349, 66, 67, 341, - 68, 165, 69, 406, 242, 519, 243, 157, 572, 448, - 445, 544, 349, 573, 70, 71, 507, 72, 73, 74, - 75, 0, 0, 0, 76, 0, 0, 0, 77, 78, - 79, 80, 81, 64, 0, 82, 83, 84, 85, 0, - 0, 0, 0, 0, 86, 0, 87, 88, 0, 0, - 65, 0, 66, 67, 0, 68, 0, 69, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 70, - 71, 0, 72, 73, 74, 75, 0, 0, 0, 76, - 0, 0, 0, 77, 78, 79, 80, 81, 0, 0, - 82, 83, 84, 85, 0, 0, 0, 0, 0, 86, - 0, 87, 88 + 30, 151, 35, 115, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 186, 127, 128, 129, 248, 253, + 246, 139, 247, 149, 254, 156, 209, 207, 332, 257, + 255, 262, 176, 179, 180, 183, 187, 194, 280, 390, + 259, 212, 342, 343, 217, 219, 260, 287, 172, 243, + 19, 20, 339, 162, 173, 336, 338, 408, 410, 193, + 409, 411, 208, 141, 259, 142, 32, 114, 143, 206, + 242, 114, 245, 172, 358, 249, 326, 63, 252, 146, + 330, 172, 157, 157, 284, 157, 488, 157, 150, 177, + 64, 427, 366, 172, 327, 200, 329, 114, 173, 71, + 32, 502, 71, 72, 1, 348, 285, 4, 357, 132, + 200, 260, 385, 133, 141, 114, 142, 28, 29, 143, + 331, 359, 360, 361, 356, 324, 241, 5, 476, 200, + 146, 477, 478, 177, 144, 169, 6, 165, 293, 335, + 337, 194, 10, 545, 166, 194, 359, 360, 361, 471, + 191, 192, 347, 561, 351, 472, 473, 474, 146, 141, + 562, 142, 32, 33, 143, 193, 436, 193, 292, 8, + 425, 395, 296, 194, 481, 334, 334, 482, 9, 144, + 307, 14, 400, 141, 114, 142, 48, 35, 143, 135, + 49, 136, 439, 283, 441, 193, 362, 50, 51, 52, + 265, 266, 489, 53, 135, 114, 136, 421, 516, 267, + 517, 518, 505, 519, 381, 520, 382, 16, 511, 141, + 114, 142, 172, 428, 143, 54, 114, 429, 240, 55, + 56, 57, 244, 277, 278, 279, 22, 513, 396, 58, + 412, 173, 521, 522, 310, 311, 312, 59, 26, 260, + 47, 523, 187, 187, 60, 44, 164, 484, 170, 113, + 61, 62, 45, 46, 422, 431, 126, 141, 433, 142, + 434, 435, 143, 388, 362, 362, 114, 440, 150, 442, + 91, 92, 130, 445, 446, 418, 549, 203, 204, 131, + 423, 146, 470, 173, 140, 493, 400, 454, 455, 400, + 400, 211, 114, 404, 269, 270, 458, 459, 141, 498, + 142, 161, 438, 143, 438, 417, 297, 298, 419, 141, + 542, 142, 527, 215, 143, 191, 192, 579, 141, 564, + 142, 216, 94, 143, 405, 406, 95, 32, 495, 589, + 220, 578, 239, 96, 97, 98, 398, 399, 479, 99, + 530, 531, 532, 533, 534, 535, 536, 537, 221, 222, + 223, 224, 225, 30, 226, 227, 228, 465, 467, 187, + 229, 100, 230, 491, 231, 101, 102, 103, 232, 233, + 234, 499, 235, 236, 237, 104, 496, 497, 105, 509, + 238, 362, 106, 506, 503, 107, 483, 172, 211, 256, + 108, 109, 259, 273, 173, 271, 110, 111, 272, 553, + 554, 555, 556, 557, 558, 559, 274, 275, 276, 281, + 282, 35, 525, 526, 286, 528, 290, 288, 291, 504, + 485, 294, 295, 543, 300, 362, 166, 304, 306, 173, + 309, 314, 315, 317, 318, 319, 321, 448, 323, 322, + 325, 328, 333, 574, 573, 569, 341, 570, 575, 344, + 345, 346, 32, 402, 576, 546, 350, 352, 560, 367, + 368, 369, 370, 543, 371, 372, 373, 374, 375, 376, + 377, 563, 378, 379, 380, 384, 387, 571, 173, 389, + 566, 392, 393, 394, 397, 415, 420, 437, 447, 146, + 450, 451, 546, 453, 284, 460, 457, 28, 461, 464, + 469, 486, 252, 456, 487, 490, 35, 492, 71, 512, + 500, 515, 514, 524, 550, 540, 544, 577, 580, 581, + 590, 582, 583, 584, 585, 586, 587, 588, 568, 424, + 65, 259, 572, 173, 362, 480, 413, 444, 426, 595, + 308, 456, 303, 251, 250, 353, 362, 66, 466, 67, + 68, 594, 69, 541, 70, 146, 463, 565, 592, 593, + 160, 508, 362, 0, 0, 0, 71, 72, 0, 73, + 74, 75, 76, 0, 0, 0, 77, 0, 0, 0, + 78, 79, 80, 81, 82, 65, 259, 83, 84, 85, + 86, 0, 0, 0, 0, 0, 87, 0, 88, 89, + 90, 0, 66, 0, 67, 68, 0, 69, 0, 70, + 0, 331, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 71, 72, 0, 73, 74, 75, 76, 0, 0, + 0, 77, 0, 0, 0, 78, 79, 80, 81, 82, + 65, 0, 83, 84, 85, 86, 0, 0, 0, 0, + 0, 87, 0, 88, 89, 90, 0, 66, 0, 67, + 68, 0, 69, 0, 70, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 71, 72, 0, 73, + 74, 75, 76, 0, 0, 0, 77, 0, 0, 0, + 78, 79, 80, 81, 82, 0, 0, 83, 84, 85, + 86, 0, 0, 0, 0, 0, 87, 0, 88, 89, + 90 }; static const yytype_int16 yycheck[] = { - 23, 84, 25, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 68, 121, 118, - 65, 117, 67, 123, 69, 122, 80, 196, 197, 116, - 125, 76, 77, 78, 79, 80, 81, 124, 255, 126, - 85, 74, 87, 88, 191, 192, 18, 288, 289, 84, - 144, 6, 6, 76, 7, 288, 289, 6, 3, 67, - 114, 84, 70, 71, 150, 73, 68, 75, 113, 77, - 115, 12, 182, 118, 184, 16, 121, 7, 80, 3, - 4, 6, 23, 24, 25, 10, 41, 304, 29, 3, - 3, 81, 41, 6, 148, 7, 119, 3, 28, 22, - 210, 24, 25, 148, 27, 113, 29, 180, 0, 117, - 51, 184, 120, 3, 55, 56, 57, 7, 204, 32, - 203, 6, 155, 8, 65, 78, 32, 315, 161, 317, - 85, 85, 3, 56, 57, 180, 144, 210, 79, 184, - 33, 6, 65, 178, 85, 86, 154, 40, 60, 61, - 158, 75, 76, 77, 301, 343, 191, 192, 399, 69, - 70, 75, 76, 77, 83, 210, 399, 77, 191, 192, - 6, 206, 8, 3, 321, 11, 323, 271, 325, 25, - 203, 6, 7, 8, 17, 18, 11, 6, 211, 8, - 407, 87, 11, 279, 3, 41, 42, 84, 297, 6, - 73, 26, 75, 10, 6, 7, 8, 26, 441, 11, - 13, 111, 3, 4, 16, 115, 19, 20, 21, 3, - 4, 193, 82, 6, 7, 8, 6, 444, 11, 274, - 3, 4, 255, 33, 34, 35, 36, 37, 38, 39, - 40, 3, 4, 288, 289, 253, 6, 7, 8, 72, - 387, 11, 297, 390, 391, 290, 6, 7, 8, 7, - 232, 11, 7, 271, 7, 288, 289, 7, 6, 7, - 8, 7, 489, 11, 28, 283, 423, 312, 301, 251, - 315, 304, 317, 318, 6, 7, 8, 322, 323, 9, - 10, 326, 315, 7, 317, 330, 331, 383, 321, 43, - 323, 387, 325, 4, 390, 391, 6, 7, 343, 344, - 13, 14, 15, 546, 60, 61, 6, 352, 353, 6, - 343, 52, 53, 54, 49, 50, 559, 6, 545, 495, - 496, 497, 498, 499, 500, 501, 505, 60, 61, 17, - 18, 30, 31, 3, 4, 6, 4, 6, 371, 6, - 6, 6, 375, 376, 399, 6, 328, 392, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 3, 6, 6, - 66, 4, 7, 7, 4, 4, 399, 412, 432, 474, - 415, 4, 417, 4, 407, 439, 4, 4, 4, 424, - 4, 30, 400, 4, 429, 430, 4, 4, 4, 84, - 423, 4, 437, 12, 4, 428, 4, 16, 4, 29, - 4, 4, 4, 4, 23, 24, 25, 6, 441, 4, - 29, 444, 4, 4, 4, 4, 4, 4, 463, 464, - 484, 4, 535, 3, 517, 534, 532, 537, 4, 536, - 4, 4, 51, 488, 531, 4, 55, 56, 57, 4, - 4, 4, 4, 4, 4, 427, 65, 4, 4, 68, - 468, 4, 4, 72, 518, 74, 489, 4, 4, 4, - 79, 80, 4, 4, 4, 4, 85, 86, 4, 4, - 525, 48, 533, 491, 4, 4, 31, 4, 16, 3, - 535, 6, 527, 6, 517, 6, 550, 4, 4, 4, - 41, 4, 67, 538, 6, 32, 18, 67, 57, 4, - 4, 530, 4, 6, 4, 4, 4, 74, 5, 6, - 4, 4, 545, 546, 532, 4, 4, 4, 533, 574, - 301, 292, 398, 328, 569, 22, 559, 24, 25, 208, - 27, 75, 29, 301, 119, 482, 120, 71, 571, 375, - 371, 525, 575, 571, 41, 42, 474, 44, 45, 46, - 47, -1, -1, -1, 51, -1, -1, -1, 55, 56, - 57, 58, 59, 5, -1, 62, 63, 64, 65, -1, - -1, -1, -1, -1, 71, -1, 73, 74, -1, -1, - 22, -1, 24, 25, -1, 27, -1, 29, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 41, - 42, -1, 44, 45, 46, 47, -1, -1, -1, 51, - -1, -1, -1, 55, 56, 57, 58, 59, -1, -1, - 62, 63, 64, 65, -1, -1, -1, -1, -1, 71, - -1, 73, 74 + 23, 69, 25, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 81, 60, 61, 62, 120, 123, + 118, 66, 119, 68, 124, 70, 85, 85, 193, 127, + 125, 129, 77, 78, 79, 80, 81, 82, 147, 264, + 6, 86, 203, 204, 89, 90, 128, 153, 3, 116, + 3, 4, 200, 73, 77, 198, 199, 297, 298, 82, + 297, 298, 85, 6, 6, 8, 3, 7, 11, 6, + 115, 7, 117, 3, 4, 120, 186, 68, 123, 68, + 190, 3, 71, 72, 151, 74, 25, 76, 28, 78, + 81, 316, 240, 3, 188, 32, 190, 7, 121, 41, + 3, 4, 41, 42, 3, 211, 151, 82, 218, 6, + 32, 193, 260, 10, 6, 7, 8, 3, 4, 11, + 86, 76, 77, 78, 218, 184, 115, 0, 402, 32, + 119, 405, 406, 122, 26, 78, 3, 78, 158, 198, + 199, 186, 3, 79, 85, 190, 76, 77, 78, 13, + 60, 61, 210, 33, 213, 19, 20, 21, 147, 6, + 40, 8, 3, 4, 11, 188, 331, 190, 157, 6, + 313, 280, 161, 218, 414, 198, 199, 414, 84, 26, + 169, 88, 288, 6, 7, 8, 12, 210, 11, 6, + 16, 8, 335, 16, 337, 218, 219, 23, 24, 25, + 69, 70, 427, 29, 6, 7, 8, 309, 22, 78, + 24, 25, 452, 27, 4, 29, 6, 3, 458, 6, + 7, 8, 3, 6, 11, 51, 7, 10, 113, 55, + 56, 57, 117, 13, 14, 15, 85, 462, 283, 65, + 299, 264, 56, 57, 52, 53, 54, 73, 83, 331, + 72, 65, 297, 298, 80, 6, 74, 418, 76, 7, + 86, 87, 3, 4, 309, 324, 6, 6, 327, 8, + 329, 330, 11, 262, 297, 298, 7, 336, 28, 338, + 9, 10, 7, 342, 343, 305, 511, 17, 18, 7, + 313, 280, 398, 316, 7, 443, 402, 356, 357, 405, + 406, 6, 7, 292, 60, 61, 365, 366, 6, 7, + 8, 43, 335, 11, 337, 304, 49, 50, 307, 6, + 7, 8, 483, 7, 11, 60, 61, 567, 6, 7, + 8, 6, 12, 11, 30, 31, 16, 3, 4, 579, + 4, 566, 4, 23, 24, 25, 17, 18, 407, 29, + 33, 34, 35, 36, 37, 38, 39, 40, 6, 6, + 6, 6, 6, 386, 6, 6, 6, 390, 391, 414, + 6, 51, 6, 432, 6, 55, 56, 57, 6, 6, + 6, 448, 6, 6, 6, 65, 445, 446, 68, 456, + 6, 414, 72, 452, 452, 75, 416, 3, 6, 6, + 80, 81, 6, 4, 427, 7, 86, 87, 7, 517, + 518, 519, 520, 521, 522, 523, 4, 4, 4, 4, + 4, 444, 481, 482, 4, 484, 4, 30, 4, 452, + 419, 4, 4, 500, 4, 458, 85, 48, 4, 462, + 29, 4, 4, 4, 4, 4, 4, 66, 4, 6, + 4, 4, 4, 557, 556, 553, 4, 554, 558, 4, + 4, 4, 3, 31, 559, 510, 4, 4, 527, 4, + 4, 4, 4, 540, 4, 4, 4, 4, 4, 4, + 4, 539, 4, 4, 4, 4, 4, 555, 511, 4, + 549, 4, 4, 4, 4, 4, 4, 4, 4, 488, + 4, 6, 547, 4, 571, 4, 6, 3, 6, 6, + 4, 4, 557, 16, 4, 32, 539, 4, 41, 4, + 67, 57, 6, 18, 513, 67, 4, 6, 4, 4, + 589, 4, 4, 4, 4, 4, 4, 4, 552, 313, + 5, 6, 555, 566, 567, 413, 301, 340, 313, 594, + 171, 16, 165, 122, 121, 215, 579, 22, 390, 24, + 25, 75, 27, 498, 29, 554, 386, 547, 591, 591, + 72, 452, 595, -1, -1, -1, 41, 42, -1, 44, + 45, 46, 47, -1, -1, -1, 51, -1, -1, -1, + 55, 56, 57, 58, 59, 5, 6, 62, 63, 64, + 65, -1, -1, -1, -1, -1, 71, -1, 73, 74, + 75, -1, 22, -1, 24, 25, -1, 27, -1, 29, + -1, 86, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 41, 42, -1, 44, 45, 46, 47, -1, -1, + -1, 51, -1, -1, -1, 55, 56, 57, 58, 59, + 5, -1, 62, 63, 64, 65, -1, -1, -1, -1, + -1, 71, -1, 73, 74, 75, -1, 22, -1, 24, + 25, -1, 27, -1, 29, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 41, 42, -1, 44, + 45, 46, 47, -1, -1, -1, 51, -1, -1, -1, + 55, 56, 57, 58, 59, -1, -1, 62, 63, 64, + 65, -1, -1, -1, -1, -1, 71, -1, 73, 74, + 75 }; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { - 0, 3, 172, 173, 81, 0, 3, 177, 6, 83, - 3, 195, 174, 178, 87, 175, 3, 180, 196, 3, - 4, 176, 84, 179, 110, 111, 82, 181, 3, 4, - 91, 158, 3, 4, 90, 91, 103, 122, 123, 130, - 131, 143, 164, 165, 6, 3, 4, 72, 12, 16, - 23, 24, 25, 29, 51, 55, 56, 57, 65, 79, - 85, 86, 68, 80, 5, 22, 24, 25, 27, 29, - 41, 42, 44, 45, 46, 47, 51, 55, 56, 57, - 58, 59, 62, 63, 64, 65, 71, 73, 74, 9, - 10, 93, 12, 16, 23, 24, 25, 29, 51, 55, - 56, 57, 65, 68, 72, 74, 79, 80, 85, 86, - 156, 7, 7, 138, 138, 138, 138, 138, 138, 138, - 138, 138, 138, 138, 138, 138, 138, 7, 7, 6, - 10, 89, 6, 8, 92, 100, 138, 7, 6, 8, - 11, 26, 94, 95, 101, 102, 138, 28, 104, 105, - 95, 96, 108, 138, 95, 118, 121, 121, 43, 119, - 127, 118, 125, 119, 128, 125, 3, 91, 109, 133, - 138, 95, 134, 138, 138, 139, 104, 138, 141, 142, - 96, 138, 144, 145, 192, 60, 61, 110, 138, 147, - 148, 184, 193, 32, 91, 113, 17, 18, 150, 6, - 90, 91, 113, 149, 6, 138, 154, 155, 7, 138, - 194, 138, 4, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 4, 92, 95, 138, 96, 92, 138, 93, 102, - 108, 138, 133, 134, 138, 139, 142, 155, 93, 169, - 6, 112, 183, 93, 187, 188, 69, 70, 77, 157, - 60, 61, 7, 7, 4, 4, 4, 4, 13, 14, - 15, 101, 4, 4, 16, 96, 138, 4, 94, 30, - 106, 4, 4, 95, 119, 4, 4, 95, 49, 50, - 126, 4, 119, 4, 84, 4, 4, 29, 52, 53, - 54, 132, 4, 4, 135, 4, 4, 4, 140, 4, - 6, 4, 113, 4, 193, 184, 4, 184, 193, 4, - 91, 113, 122, 185, 91, 113, 122, 110, 112, 4, - 126, 126, 4, 4, 4, 90, 94, 151, 4, 113, - 4, 148, 166, 184, 193, 4, 75, 76, 77, 91, - 97, 161, 163, 110, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 170, 4, - 110, 182, 4, 95, 4, 109, 189, 4, 4, 4, - 101, 138, 4, 17, 18, 94, 99, 31, 107, 95, - 30, 31, 120, 97, 192, 97, 192, 113, 106, 124, - 48, 108, 138, 91, 103, 122, 123, 109, 6, 10, - 137, 113, 146, 91, 113, 185, 113, 185, 113, 85, - 91, 122, 113, 113, 122, 122, 113, 114, 111, 113, - 113, 4, 66, 152, 4, 4, 113, 185, 113, 16, - 6, 113, 113, 6, 167, 158, 6, 91, 143, 91, - 190, 4, 94, 13, 19, 20, 21, 98, 99, 99, - 99, 113, 107, 97, 192, 95, 4, 4, 25, 109, - 32, 113, 113, 113, 186, 122, 113, 110, 115, 4, - 113, 113, 7, 96, 67, 153, 113, 96, 162, 97, - 4, 109, 6, 57, 22, 24, 25, 27, 29, 56, - 57, 65, 18, 113, 113, 129, 136, 183, 33, 34, - 35, 36, 37, 38, 39, 40, 116, 117, 67, 153, - 7, 96, 4, 78, 138, 159, 160, 109, 95, 138, - 191, 191, 191, 191, 191, 191, 191, 191, 126, 33, - 40, 4, 90, 7, 159, 113, 171, 100, 93, 102, - 104, 105, 108, 139, 142, 155, 113, 6, 109, 97, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 97, - 113, 168, 91, 164, 74, 138 + 0, 3, 179, 180, 82, 0, 3, 184, 6, 84, + 3, 201, 181, 185, 88, 182, 3, 187, 202, 3, + 4, 183, 85, 186, 111, 112, 83, 188, 3, 4, + 92, 162, 3, 4, 91, 92, 104, 123, 124, 127, + 129, 147, 171, 172, 6, 3, 4, 72, 12, 16, + 23, 24, 25, 29, 51, 55, 56, 57, 65, 73, + 80, 86, 87, 68, 81, 5, 22, 24, 25, 27, + 29, 41, 42, 44, 45, 46, 47, 51, 55, 56, + 57, 58, 59, 62, 63, 64, 65, 71, 73, 74, + 75, 9, 10, 94, 12, 16, 23, 24, 25, 29, + 51, 55, 56, 57, 65, 68, 72, 75, 80, 81, + 86, 87, 160, 7, 7, 142, 142, 142, 142, 142, + 142, 142, 142, 142, 142, 142, 6, 142, 142, 142, + 7, 7, 6, 10, 90, 6, 8, 93, 101, 142, + 7, 6, 8, 11, 26, 95, 96, 102, 103, 142, + 28, 105, 106, 96, 97, 109, 142, 96, 119, 122, + 122, 43, 120, 131, 119, 78, 85, 132, 133, 78, + 119, 128, 3, 92, 110, 137, 142, 96, 138, 142, + 142, 143, 105, 142, 145, 146, 97, 142, 148, 149, + 198, 60, 61, 92, 142, 151, 152, 191, 192, 199, + 32, 92, 114, 17, 18, 154, 6, 91, 92, 114, + 153, 6, 142, 158, 159, 7, 6, 142, 200, 142, + 4, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 4, + 93, 96, 142, 97, 93, 142, 94, 103, 109, 142, + 137, 138, 142, 143, 146, 159, 6, 94, 176, 6, + 113, 190, 94, 193, 194, 69, 70, 78, 161, 60, + 61, 7, 7, 4, 4, 4, 4, 13, 14, 15, + 102, 4, 4, 16, 97, 142, 4, 95, 30, 107, + 4, 4, 96, 120, 4, 4, 96, 49, 50, 130, + 4, 120, 126, 132, 48, 134, 4, 96, 126, 29, + 52, 53, 54, 136, 4, 4, 139, 4, 4, 4, + 144, 4, 6, 4, 114, 4, 199, 192, 4, 192, + 199, 86, 190, 4, 92, 114, 123, 114, 123, 111, + 113, 4, 130, 130, 4, 4, 4, 91, 95, 155, + 4, 114, 4, 152, 163, 173, 192, 199, 4, 76, + 77, 78, 92, 98, 168, 170, 111, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 6, 177, 4, 111, 189, 4, 96, 4, + 110, 195, 4, 4, 4, 102, 142, 4, 17, 18, + 95, 100, 31, 108, 96, 30, 31, 121, 98, 198, + 98, 198, 114, 107, 125, 4, 135, 96, 120, 96, + 4, 109, 142, 92, 104, 123, 124, 110, 6, 10, + 141, 114, 150, 114, 114, 114, 190, 4, 92, 123, + 114, 123, 114, 115, 112, 114, 114, 4, 66, 156, + 4, 6, 165, 4, 114, 114, 16, 6, 114, 114, + 4, 6, 174, 162, 6, 92, 147, 92, 196, 4, + 95, 13, 19, 20, 21, 99, 100, 100, 100, 114, + 108, 98, 198, 120, 130, 96, 4, 4, 25, 110, + 32, 114, 4, 111, 116, 4, 114, 114, 7, 97, + 67, 157, 4, 91, 92, 98, 114, 164, 191, 97, + 169, 98, 4, 110, 6, 57, 22, 24, 25, 27, + 29, 56, 57, 65, 18, 114, 114, 130, 114, 140, + 33, 34, 35, 36, 37, 38, 39, 40, 117, 118, + 67, 157, 7, 97, 4, 79, 142, 166, 167, 110, + 96, 142, 197, 197, 197, 197, 197, 197, 197, 197, + 114, 33, 40, 91, 7, 166, 114, 178, 101, 94, + 103, 105, 106, 109, 143, 146, 159, 6, 110, 98, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 98, + 114, 175, 92, 171, 75, 142 }; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ static const yytype_uint8 yyr1[] = { - 0, 88, 89, 90, 91, 92, 92, 89, 93, 93, - 94, 94, 94, 95, 95, 95, 96, 96, 96, 96, - 97, 98, 98, 98, 98, 99, 100, 90, 101, 101, - 102, 103, 90, 104, 104, 105, 90, 106, 106, 107, - 107, 108, 90, 109, 110, 111, 111, 112, 112, 113, - 114, 113, 115, 115, 116, 116, 116, 116, 116, 116, - 116, 117, 116, 118, 119, 119, 120, 120, 120, 121, - 122, 123, 90, 90, 124, 125, 125, 126, 126, 126, - 126, 127, 129, 128, 130, 130, 131, 131, 90, 90, - 132, 132, 132, 132, 133, 133, 133, 90, 135, 134, - 90, 136, 136, 137, 137, 138, 140, 139, 90, 141, - 141, 142, 142, 142, 143, 90, 144, 145, 145, 145, - 146, 145, 145, 145, 90, 147, 147, 147, 147, 147, - 147, 147, 147, 147, 90, 148, 148, 147, 90, 149, - 90, 90, 90, 150, 150, 90, 151, 151, 152, 152, - 153, 153, 154, 154, 154, 154, 155, 90, 156, 157, - 157, 157, 157, 90, 90, 158, 159, 159, 160, 162, - 161, 163, 163, 163, 163, 164, 165, 90, 90, 166, - 166, 166, 90, 167, 167, 168, 168, 170, 171, 169, - 90, 90, 172, 174, 173, 175, 175, 176, 178, 177, - 179, 179, 180, 181, 181, 156, 156, 156, 156, 156, - 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, - 156, 156, 158, 158, 158, 158, 158, 158, 158, 158, - 158, 158, 158, 158, 158, 158, 158, 158, 158, 182, - 182, 183, 184, 186, 185, 187, 188, 189, 189, 190, - 190, 190, 190, 190, 190, 190, 190, 191, 192, 193, - 194, 90, 90, 90, 90, 90, 90, 90, 90, 90, - 90, 90, 109, 196, 195 + 0, 89, 90, 91, 92, 93, 93, 90, 94, 94, + 95, 95, 95, 96, 96, 96, 97, 97, 97, 97, + 98, 99, 99, 99, 99, 100, 101, 91, 102, 102, + 103, 104, 91, 105, 105, 106, 91, 107, 107, 108, + 108, 109, 91, 110, 111, 112, 112, 113, 113, 114, + 115, 114, 116, 116, 117, 117, 117, 117, 117, 117, + 117, 118, 117, 119, 120, 120, 121, 121, 121, 122, + 123, 124, 91, 91, 125, 126, 126, 127, 128, 128, + 129, 130, 130, 130, 130, 131, 127, 132, 132, 134, + 133, 135, 133, 129, 91, 91, 136, 136, 136, 136, + 137, 137, 137, 91, 139, 138, 91, 140, 140, 141, + 141, 142, 144, 143, 91, 145, 145, 146, 146, 146, + 147, 91, 148, 149, 149, 150, 149, 149, 91, 151, + 151, 151, 151, 151, 151, 91, 152, 152, 151, 91, + 153, 91, 91, 91, 154, 154, 91, 155, 155, 156, + 156, 157, 157, 158, 158, 158, 158, 159, 91, 160, + 161, 161, 161, 161, 91, 91, 162, 162, 162, 91, + 163, 163, 164, 164, 164, 164, 165, 165, 166, 166, + 167, 169, 168, 170, 170, 170, 170, 171, 172, 91, + 91, 173, 173, 91, 174, 174, 175, 175, 177, 178, + 176, 91, 91, 179, 181, 180, 182, 182, 183, 185, + 184, 186, 186, 187, 188, 188, 160, 160, 160, 160, + 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, + 160, 160, 160, 162, 162, 162, 162, 162, 162, 162, + 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, + 189, 189, 190, 191, 192, 192, 193, 194, 195, 195, + 196, 196, 196, 196, 196, 196, 196, 196, 197, 198, + 199, 200, 91, 91, 91, 91, 91, 91, 91, 91, + 91, 91, 91, 110, 202, 201 }; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ @@ -1266,27 +1300,28 @@ static const yytype_int8 yyr2[] = 2, 3, 4, 4, 0, 1, 2, 0, 1, 4, 0, 5, 1, 2, 1, 1, 1, 1, 1, 1, 1, 0, 2, 3, 0, 2, 0, 2, 2, 4, - 4, 4, 1, 1, 2, 5, 5, 2, 2, 2, - 2, 3, 0, 7, 4, 4, 4, 4, 1, 1, - 0, 1, 1, 1, 3, 3, 3, 4, 0, 4, - 4, 0, 2, 1, 1, 1, 0, 6, 4, 1, - 2, 3, 2, 1, 4, 1, 1, 3, 4, 3, - 0, 4, 4, 3, 4, 2, 3, 3, 2, 3, - 3, 3, 4, 4, 4, 1, 1, 1, 4, 1, - 4, 5, 4, 4, 4, 4, 1, 0, 2, 0, - 2, 0, 4, 5, 5, 6, 2, 4, 2, 1, - 1, 1, 0, 5, 5, 7, 1, 1, 3, 0, - 4, 1, 1, 1, 1, 10, 4, 1, 1, 2, - 3, 2, 5, 0, 1, 0, 2, 0, 0, 10, - 5, 5, 3, 0, 6, 0, 2, 5, 0, 6, - 0, 2, 4, 0, 4, 2, 2, 2, 2, 2, + 4, 4, 1, 1, 2, 4, 4, 5, 1, 4, + 5, 2, 2, 2, 2, 3, 4, 0, 3, 0, + 5, 0, 6, 4, 1, 1, 0, 1, 1, 1, + 3, 3, 3, 4, 0, 4, 4, 0, 2, 1, + 1, 1, 0, 6, 4, 1, 2, 3, 2, 1, + 4, 1, 1, 3, 3, 0, 4, 3, 4, 2, + 3, 3, 2, 3, 3, 4, 1, 1, 1, 4, + 1, 4, 5, 4, 4, 4, 4, 1, 0, 2, + 0, 2, 0, 4, 5, 5, 6, 2, 4, 2, + 1, 1, 1, 0, 5, 5, 7, 5, 6, 6, + 0, 2, 1, 1, 1, 1, 0, 2, 1, 1, + 3, 0, 4, 1, 1, 1, 1, 10, 4, 1, + 1, 2, 2, 5, 0, 1, 0, 2, 0, 0, + 10, 5, 5, 3, 0, 6, 0, 2, 5, 0, + 6, 0, 2, 4, 0, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 1, - 2, 2, 1, 0, 5, 2, 4, 2, 2, 5, - 5, 5, 5, 5, 5, 5, 5, 1, 1, 1, - 1, 4, 5, 6, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 0, 5 + 2, 2, 2, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 1, 2, 2, 4, 1, 3, 2, 4, 2, 2, + 5, 5, 5, 5, 5, 5, 5, 5, 1, 1, + 1, 1, 4, 5, 6, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 0, 5 }; @@ -2020,1202 +2055,1202 @@ yyreduce: switch (yyn) { case 2: /* glyph: UNSIGNED REFERENCE */ -#line 268 "parser.y" +#line 274 "parser.y" { #line 424 "format.w" (yyval.c).c= (yyvsp[-1].u);REF(font_kind,(yyvsp[0].u));(yyval.c).f= (yyvsp[0].u);} -#line 2028 "parser.c" +#line 2063 "parser.c" break; case 3: /* content_node: start "glyph" glyph ">" */ -#line 271 "parser.y" +#line 277 "parser.y" { #line 425 "format.w" hput_tags((yyvsp[-3].u),hput_glyph(&((yyvsp[-1].c))));} -#line 2036 "parser.c" +#line 2071 "parser.c" break; case 4: /* start: "<" */ -#line 274 "parser.y" +#line 280 "parser.y" { #line 426 "format.w" HPUTNODE;(yyval.u)= (uint32_t)(hpos++-hstart);} -#line 2044 "parser.c" +#line 2079 "parser.c" break; case 6: /* integer: UNSIGNED */ -#line 278 "parser.y" +#line 284 "parser.y" { - #line 947 "format.w" + #line 954 "format.w" RNG("number",(yyvsp[0].u),0,0x7FFFFFFF);} -#line 2052 "parser.c" +#line 2087 "parser.c" break; case 7: /* glyph: CHARCODE REFERENCE */ -#line 282 "parser.y" +#line 288 "parser.y" { - #line 1088 "format.w" + #line 1096 "format.w" (yyval.c).c= (yyvsp[-1].u);REF(font_kind,(yyvsp[0].u));(yyval.c).f= (yyvsp[0].u);} -#line 2060 "parser.c" +#line 2095 "parser.c" break; case 9: /* string: CHARCODE */ -#line 286 "parser.y" +#line 292 "parser.y" { - #line 1193 "format.w" + #line 1201 "format.w" static char s[2]; RNG("String element",(yyvsp[0].u),0x20,0x7E); s[0]= (yyvsp[0].u);s[1]= 0;(yyval.s)= s;} -#line 2070 "parser.c" +#line 2105 "parser.c" break; case 10: /* number: UNSIGNED */ -#line 292 "parser.y" +#line 298 "parser.y" { - #line 1346 "format.w" + #line 1354 "format.w" (yyval.f)= (float64_t)(yyvsp[0].u);} -#line 2078 "parser.c" +#line 2113 "parser.c" break; case 11: /* number: SIGNED */ -#line 294 "parser.y" +#line 300 "parser.y" { - #line 1346 "format.w" + #line 1354 "format.w" (yyval.f)= (float64_t)(yyvsp[0].i);} -#line 2086 "parser.c" +#line 2121 "parser.c" break; case 13: /* dimension: number "pt" */ -#line 298 "parser.y" +#line 304 "parser.y" { - #line 1697 "format.w" + #line 1708 "format.w" (yyval.d)= ROUND((yyvsp[-1].f)*ONE);RNG("Dimension",(yyval.d),-MAX_DIMEN,MAX_DIMEN);} -#line 2094 "parser.c" +#line 2129 "parser.c" break; case 14: /* dimension: number "in" */ -#line 301 "parser.y" +#line 307 "parser.y" { - #line 1698 "format.w" + #line 1709 "format.w" (yyval.d)= ROUND((yyvsp[-1].f)*ONE*72.27);RNG("Dimension",(yyval.d),-MAX_DIMEN,MAX_DIMEN);} -#line 2102 "parser.c" +#line 2137 "parser.c" break; case 15: /* dimension: number "mm" */ -#line 304 "parser.y" +#line 310 "parser.y" { - #line 1699 "format.w" + #line 1710 "format.w" (yyval.d)= ROUND((yyvsp[-1].f)*ONE*(72.27/25.4));RNG("Dimension",(yyval.d),-MAX_DIMEN,MAX_DIMEN);} -#line 2110 "parser.c" +#line 2145 "parser.c" break; case 16: /* xdimen: dimension number "h" number "v" */ -#line 308 "parser.y" +#line 314 "parser.y" { - #line 1777 "format.w" + #line 1788 "format.w" (yyval.xd).w= (yyvsp[-4].d);(yyval.xd).h= (yyvsp[-3].f);(yyval.xd).v= (yyvsp[-1].f);} -#line 2118 "parser.c" +#line 2153 "parser.c" break; case 17: /* xdimen: dimension number "h" */ -#line 311 "parser.y" +#line 317 "parser.y" { - #line 1778 "format.w" + #line 1789 "format.w" (yyval.xd).w= (yyvsp[-2].d);(yyval.xd).h= (yyvsp[-1].f);(yyval.xd).v= 0.0;} -#line 2126 "parser.c" +#line 2161 "parser.c" break; case 18: /* xdimen: dimension number "v" */ -#line 314 "parser.y" +#line 320 "parser.y" { - #line 1779 "format.w" + #line 1790 "format.w" (yyval.xd).w= (yyvsp[-2].d);(yyval.xd).h= 0.0;(yyval.xd).v= (yyvsp[-1].f);} -#line 2134 "parser.c" +#line 2169 "parser.c" break; case 19: /* xdimen: dimension */ -#line 317 "parser.y" +#line 323 "parser.y" { - #line 1780 "format.w" + #line 1791 "format.w" (yyval.xd).w= (yyvsp[0].d);(yyval.xd).h= 0.0;(yyval.xd).v= 0.0;} -#line 2142 "parser.c" +#line 2177 "parser.c" break; case 20: /* xdimen_node: start "xdimen" xdimen ">" */ -#line 321 "parser.y" +#line 327 "parser.y" { - #line 1782 "format.w" + #line 1793 "format.w" hput_tags((yyvsp[-3].u),hput_xdimen(&((yyvsp[-1].xd))));} -#line 2150 "parser.c" +#line 2185 "parser.c" break; case 21: /* order: "pt" */ -#line 326 "parser.y" +#line 332 "parser.y" { - #line 1961 "format.w" + #line 1972 "format.w" (yyval.o)= normal_o;} -#line 2158 "parser.c" +#line 2193 "parser.c" break; case 22: /* order: "fil" */ -#line 328 "parser.y" +#line 334 "parser.y" { - #line 1961 "format.w" + #line 1972 "format.w" (yyval.o)= fil_o;} -#line 2166 "parser.c" +#line 2201 "parser.c" break; case 23: /* order: "fill" */ -#line 330 "parser.y" +#line 336 "parser.y" { - #line 1961 "format.w" + #line 1972 "format.w" (yyval.o)= fill_o;} -#line 2174 "parser.c" +#line 2209 "parser.c" break; case 24: /* order: "filll" */ -#line 332 "parser.y" +#line 338 "parser.y" { - #line 1961 "format.w" + #line 1972 "format.w" (yyval.o)= filll_o;} -#line 2182 "parser.c" +#line 2217 "parser.c" break; case 25: /* stretch: number order */ -#line 336 "parser.y" +#line 342 "parser.y" { - #line 1963 "format.w" + #line 1974 "format.w" (yyval.st).f= (yyvsp[-1].f);(yyval.st).o= (yyvsp[0].o);} -#line 2190 "parser.c" +#line 2225 "parser.c" break; case 26: /* penalty: integer */ -#line 340 "parser.y" +#line 346 "parser.y" { - #line 2017 "format.w" + #line 2028 "format.w" RNG("Penalty",(yyvsp[0].i),-20000,+20000);(yyval.i)= (yyvsp[0].i);} -#line 2198 "parser.c" +#line 2233 "parser.c" break; case 27: /* content_node: start "penalty" penalty ">" */ -#line 343 "parser.y" +#line 349 "parser.y" { - #line 2018 "format.w" + #line 2029 "format.w" hput_tags((yyvsp[-3].u),hput_int((yyvsp[-1].i)));} -#line 2206 "parser.c" +#line 2241 "parser.c" break; case 29: /* rule_dimension: "|" */ -#line 347 "parser.y" +#line 353 "parser.y" { - #line 2193 "format.w" + #line 2206 "format.w" (yyval.d)= RUNNING_DIMEN;} -#line 2214 "parser.c" +#line 2249 "parser.c" break; case 30: /* rule: rule_dimension rule_dimension rule_dimension */ -#line 351 "parser.y" +#line 357 "parser.y" { - #line 2195 "format.w" + #line 2208 "format.w" (yyval.r).h= (yyvsp[-2].d);(yyval.r).d= (yyvsp[-1].d);(yyval.r).w= (yyvsp[0].d); if((yyvsp[0].d)==RUNNING_DIMEN&&((yyvsp[-2].d)==RUNNING_DIMEN||(yyvsp[-1].d)==RUNNING_DIMEN)) QUIT("Incompatible running dimensions 0x%x 0x%x 0x%x",(yyvsp[-2].d),(yyvsp[-1].d),(yyvsp[0].d));} -#line 2224 "parser.c" +#line 2259 "parser.c" break; case 31: /* rule_node: start "rule" rule ">" */ -#line 356 "parser.y" +#line 362 "parser.y" { - #line 2198 "format.w" + #line 2211 "format.w" hput_tags((yyvsp[-3].u),hput_rule(&((yyvsp[-1].r))));} -#line 2232 "parser.c" +#line 2267 "parser.c" break; case 33: /* explicit: %empty */ -#line 361 "parser.y" +#line 367 "parser.y" { - #line 2306 "format.w" + #line 2319 "format.w" (yyval.b)= false;} -#line 2240 "parser.c" +#line 2275 "parser.c" break; case 34: /* explicit: "!" */ -#line 363 "parser.y" +#line 369 "parser.y" { - #line 2306 "format.w" + #line 2319 "format.w" (yyval.b)= true;} -#line 2248 "parser.c" +#line 2283 "parser.c" break; case 35: /* kern: explicit xdimen */ -#line 366 "parser.y" +#line 372 "parser.y" { - #line 2307 "format.w" + #line 2320 "format.w" (yyval.kt).x= (yyvsp[-1].b);(yyval.kt).d= (yyvsp[0].xd);} -#line 2256 "parser.c" +#line 2291 "parser.c" break; case 36: /* content_node: start "kern" kern ">" */ -#line 369 "parser.y" +#line 375 "parser.y" { - #line 2308 "format.w" + #line 2321 "format.w" hput_tags((yyvsp[-3].u),hput_kern(&((yyvsp[-1].kt))));} -#line 2264 "parser.c" +#line 2299 "parser.c" break; case 37: /* plus: %empty */ -#line 373 "parser.y" +#line 379 "parser.y" { - #line 2518 "format.w" + #line 2531 "format.w" (yyval.st).f= 0.0;(yyval.st).o= 0;} -#line 2272 "parser.c" +#line 2307 "parser.c" break; case 38: /* plus: "plus" stretch */ -#line 375 "parser.y" +#line 381 "parser.y" { - #line 2518 "format.w" + #line 2531 "format.w" (yyval.st)= (yyvsp[0].st);} -#line 2280 "parser.c" +#line 2315 "parser.c" break; case 39: /* minus: %empty */ -#line 378 "parser.y" +#line 384 "parser.y" { - #line 2519 "format.w" + #line 2532 "format.w" (yyval.st).f= 0.0;(yyval.st).o= 0;} -#line 2288 "parser.c" +#line 2323 "parser.c" break; case 40: /* minus: "minus" stretch */ -#line 380 "parser.y" +#line 386 "parser.y" { - #line 2519 "format.w" + #line 2532 "format.w" (yyval.st)= (yyvsp[0].st);} -#line 2296 "parser.c" +#line 2331 "parser.c" break; case 41: /* glue: xdimen plus minus */ -#line 383 "parser.y" +#line 389 "parser.y" { - #line 2520 "format.w" + #line 2533 "format.w" (yyval.g).w= (yyvsp[-2].xd);(yyval.g).p= (yyvsp[-1].st);(yyval.g).m= (yyvsp[0].st);} -#line 2304 "parser.c" +#line 2339 "parser.c" break; case 42: /* content_node: start "glue" glue ">" */ -#line 386 "parser.y" +#line 392 "parser.y" { - #line 2521 "format.w" + #line 2534 "format.w" if(ZERO_GLUE((yyvsp[-1].g))){HPUT8(zero_skip_no); hput_tags((yyvsp[-3].u),TAG(glue_kind,0));}else hput_tags((yyvsp[-3].u),hput_glue(&((yyvsp[-1].g))));} -#line 2313 "parser.c" +#line 2348 "parser.c" break; case 43: /* glue_node: start "glue" glue ">" */ -#line 391 "parser.y" +#line 397 "parser.y" { - #line 2524 "format.w" + #line 2537 "format.w" if(ZERO_GLUE((yyvsp[-1].g))){hpos--;(yyval.b)= false;} else{hput_tags((yyvsp[-3].u),hput_glue(&((yyvsp[-1].g))));(yyval.b)= true;}} -#line 2322 "parser.c" +#line 2357 "parser.c" break; case 44: /* position: %empty */ -#line 396 "parser.y" +#line 402 "parser.y" { - #line 2800 "format.w" + #line 2812 "format.w" (yyval.u)= hpos-hstart;} -#line 2330 "parser.c" +#line 2365 "parser.c" break; case 47: /* estimate: %empty */ -#line 401 "parser.y" +#line 407 "parser.y" { - #line 2803 "format.w" + #line 2815 "format.w" hpos+= 2;} -#line 2338 "parser.c" +#line 2373 "parser.c" break; case 48: /* estimate: UNSIGNED */ -#line 404 "parser.y" +#line 410 "parser.y" { - #line 2804 "format.w" + #line 2816 "format.w" hpos+= hsize_bytes((yyvsp[0].u))+1;} -#line 2346 "parser.c" +#line 2381 "parser.c" break; case 49: /* list: start estimate content_list ">" */ -#line 408 "parser.y" +#line 414 "parser.y" { - #line 2806 "format.w" - (yyval.l).k= list_kind;(yyval.l).p= (yyvsp[-1].u);(yyval.l).s= (hpos-hstart)-(yyvsp[-1].u); + #line 2818 "format.w" + (yyval.l).t= TAG(list_kind,b010);(yyval.l).p= (yyvsp[-1].u);(yyval.l).s= (hpos-hstart)-(yyvsp[-1].u); hput_tags((yyvsp[-3].u),hput_list((yyvsp[-3].u)+1,&((yyval.l))));} -#line 2355 "parser.c" +#line 2390 "parser.c" break; case 50: /* $@1: %empty */ -#line 414 "parser.y" +#line 420 "parser.y" { - #line 3213 "format.w" + #line 3232 "format.w" hpos+= 4;} -#line 2363 "parser.c" +#line 2398 "parser.c" break; case 51: /* list: TXT_START position $@1 text TXT_END */ -#line 418 "parser.y" +#line 424 "parser.y" { - #line 3215 "format.w" - (yyval.l).k= text_kind;(yyval.l).p= (yyvsp[-1].u);(yyval.l).s= (hpos-hstart)-(yyvsp[-1].u); + #line 3234 "format.w" + (yyval.l).t= TAG(list_kind,b110);(yyval.l).p= (yyvsp[-1].u);(yyval.l).s= (hpos-hstart)-(yyvsp[-1].u); hput_tags((yyvsp[-3].u),hput_list((yyvsp[-3].u)+1,&((yyval.l))));} -#line 2372 "parser.c" +#line 2407 "parser.c" break; case 54: /* txt: TXT_CC */ -#line 424 "parser.y" +#line 430 "parser.y" { - #line 3219 "format.w" + #line 3238 "format.w" hput_txt_cc((yyvsp[0].u));} -#line 2380 "parser.c" +#line 2415 "parser.c" break; case 55: /* txt: TXT_FONT */ -#line 427 "parser.y" +#line 433 "parser.y" { - #line 3220 "format.w" + #line 3239 "format.w" REF(font_kind,(yyvsp[0].u));hput_txt_font((yyvsp[0].u));} -#line 2388 "parser.c" +#line 2423 "parser.c" break; case 56: /* txt: TXT_GLOBAL */ -#line 430 "parser.y" +#line 436 "parser.y" { - #line 3221 "format.w" + #line 3240 "format.w" REF((yyvsp[0].rf).k,(yyvsp[0].rf).n);hput_txt_global(&((yyvsp[0].rf)));} -#line 2396 "parser.c" +#line 2431 "parser.c" break; case 57: /* txt: TXT_LOCAL */ -#line 433 "parser.y" +#line 439 "parser.y" { - #line 3222 "format.w" + #line 3241 "format.w" RNG("Font parameter",(yyvsp[0].u),0,11);hput_txt_local((yyvsp[0].u));} -#line 2404 "parser.c" +#line 2439 "parser.c" break; case 58: /* txt: TXT_FONT_GLUE */ -#line 436 "parser.y" +#line 442 "parser.y" { - #line 3223 "format.w" + #line 3242 "format.w" HPUTX(1);HPUT8(txt_glue);} -#line 2412 "parser.c" +#line 2447 "parser.c" break; case 59: /* txt: TXT_FONT_HYPHEN */ -#line 439 "parser.y" +#line 445 "parser.y" { - #line 3224 "format.w" + #line 3243 "format.w" HPUTX(1);HPUT8(txt_hyphen);} -#line 2420 "parser.c" +#line 2455 "parser.c" break; case 60: /* txt: TXT_IGNORE */ -#line 442 "parser.y" +#line 448 "parser.y" { - #line 3225 "format.w" + #line 3244 "format.w" HPUTX(1);HPUT8(txt_ignore);} -#line 2428 "parser.c" +#line 2463 "parser.c" break; case 61: /* $@2: %empty */ -#line 445 "parser.y" +#line 451 "parser.y" { - #line 3226 "format.w" + #line 3245 "format.w" HPUTX(1);HPUT8(txt_node);} -#line 2436 "parser.c" +#line 2471 "parser.c" break; case 63: /* box_dimen: dimension dimension dimension */ -#line 451 "parser.y" +#line 457 "parser.y" { - #line 3486 "format.w" + #line 3501 "format.w" (yyval.info)= hput_box_dimen((yyvsp[-2].d),(yyvsp[-1].d),(yyvsp[0].d));} -#line 2444 "parser.c" +#line 2479 "parser.c" break; case 64: /* box_shift: %empty */ -#line 454 "parser.y" +#line 460 "parser.y" { - #line 3487 "format.w" + #line 3502 "format.w" (yyval.info)= b000;} -#line 2452 "parser.c" +#line 2487 "parser.c" break; case 65: /* box_shift: "shifted" dimension */ -#line 457 "parser.y" +#line 463 "parser.y" { - #line 3488 "format.w" + #line 3503 "format.w" (yyval.info)= hput_box_shift((yyvsp[0].d));} -#line 2460 "parser.c" +#line 2495 "parser.c" break; case 66: /* box_glue_set: %empty */ -#line 461 "parser.y" +#line 467 "parser.y" { - #line 3490 "format.w" + #line 3505 "format.w" (yyval.info)= b000;} -#line 2468 "parser.c" +#line 2503 "parser.c" break; case 67: /* box_glue_set: "plus" stretch */ -#line 464 "parser.y" +#line 470 "parser.y" { - #line 3491 "format.w" + #line 3506 "format.w" (yyval.info)= hput_box_glue_set(+1,(yyvsp[0].st).f,(yyvsp[0].st).o);} -#line 2476 "parser.c" +#line 2511 "parser.c" break; case 68: /* box_glue_set: "minus" stretch */ -#line 467 "parser.y" +#line 473 "parser.y" { - #line 3492 "format.w" + #line 3507 "format.w" (yyval.info)= hput_box_glue_set(-1,(yyvsp[0].st).f,(yyvsp[0].st).o);} -#line 2484 "parser.c" +#line 2519 "parser.c" break; case 69: /* box: box_dimen box_shift box_glue_set list */ -#line 472 "parser.y" +#line 478 "parser.y" { - #line 3495 "format.w" + #line 3510 "format.w" (yyval.info)= (yyvsp[-3].info) |(yyvsp[-2].info) |(yyvsp[-1].info);} -#line 2492 "parser.c" +#line 2527 "parser.c" break; case 70: /* hbox_node: start "hbox" box ">" */ -#line 476 "parser.y" +#line 482 "parser.y" { - #line 3497 "format.w" + #line 3512 "format.w" hput_tags((yyvsp[-3].u),TAG(hbox_kind,(yyvsp[-1].info)));} -#line 2500 "parser.c" +#line 2535 "parser.c" break; case 71: /* vbox_node: start "vbox" box ">" */ -#line 479 "parser.y" +#line 485 "parser.y" { - #line 3498 "format.w" + #line 3513 "format.w" hput_tags((yyvsp[-3].u),TAG(vbox_kind,(yyvsp[-1].info)));} -#line 2508 "parser.c" +#line 2543 "parser.c" break; case 74: /* box_flex: plus minus */ -#line 484 "parser.y" +#line 490 "parser.y" { - #line 3679 "format.w" + #line 3709 "format.w" hput_stretch(&((yyvsp[-1].st)));hput_stretch(&((yyvsp[0].st)));} -#line 2516 "parser.c" +#line 2551 "parser.c" break; - case 75: /* xbox: box_dimen box_shift box_flex xdimen_ref list */ -#line 487 "parser.y" - { - #line 3680 "format.w" - (yyval.info)= (yyvsp[-4].info) |(yyvsp[-3].info);} -#line 2524 "parser.c" + case 75: /* box_options: box_shift box_flex xdimen_ref list */ +#line 494 "parser.y" + { + #line 3711 "format.w" + (yyval.info)= (yyvsp[-3].info);} +#line 2559 "parser.c" break; - case 76: /* xbox: box_dimen box_shift box_flex xdimen_node list */ -#line 490 "parser.y" - { - #line 3681 "format.w" - (yyval.info)= (yyvsp[-4].info) |(yyvsp[-3].info) |b100;} -#line 2532 "parser.c" + case 76: /* box_options: box_shift box_flex xdimen_node list */ +#line 497 "parser.y" + { + #line 3712 "format.w" + (yyval.info)= (yyvsp[-3].info) |b100;} +#line 2567 "parser.c" break; - case 77: /* box_goal: "to" xdimen_ref */ -#line 494 "parser.y" + case 77: /* hxbox_node: start "hset" box_dimen box_options ">" */ +#line 501 "parser.y" + { + #line 3714 "format.w" + hput_tags((yyvsp[-4].u),TAG(hset_kind,(yyvsp[-2].info) |(yyvsp[-1].info)));} +#line 2575 "parser.c" + break; + + case 79: /* vbox_dimen: "top" dimension dimension dimension */ +#line 507 "parser.y" +{ + #line 3718 "format.w" + (yyval.info)= hput_box_dimen((yyvsp[-2].d),(yyvsp[-1].d)^0x40000000,(yyvsp[0].d));} +#line 2583 "parser.c" + break; + + case 80: /* vxbox_node: start "vset" vbox_dimen box_options ">" */ +#line 511 "parser.y" + { + #line 3720 "format.w" + hput_tags((yyvsp[-4].u),TAG(vset_kind,(yyvsp[-2].info) |(yyvsp[-1].info)));} +#line 2591 "parser.c" + break; + + case 81: /* box_goal: "to" xdimen_ref */ +#line 515 "parser.y" { - #line 3683 "format.w" + #line 3722 "format.w" (yyval.info)= b000;} -#line 2540 "parser.c" +#line 2599 "parser.c" break; - case 78: /* box_goal: "add" xdimen_ref */ -#line 497 "parser.y" + case 82: /* box_goal: "add" xdimen_ref */ +#line 518 "parser.y" { - #line 3684 "format.w" + #line 3723 "format.w" (yyval.info)= b001;} -#line 2548 "parser.c" +#line 2607 "parser.c" break; - case 79: /* box_goal: "to" xdimen_node */ -#line 500 "parser.y" + case 83: /* box_goal: "to" xdimen_node */ +#line 521 "parser.y" { - #line 3685 "format.w" + #line 3724 "format.w" (yyval.info)= b100;} -#line 2556 "parser.c" +#line 2615 "parser.c" break; - case 80: /* box_goal: "add" xdimen_node */ -#line 503 "parser.y" + case 84: /* box_goal: "add" xdimen_node */ +#line 524 "parser.y" { - #line 3686 "format.w" + #line 3725 "format.w" (yyval.info)= b101;} -#line 2564 "parser.c" +#line 2623 "parser.c" break; - case 81: /* hpack: box_shift box_goal list */ -#line 507 "parser.y" + case 85: /* hpack: box_shift box_goal list */ +#line 528 "parser.y" { - #line 3688 "format.w" + #line 3727 "format.w" (yyval.info)= (yyvsp[-1].info);} -#line 2572 "parser.c" +#line 2631 "parser.c" break; - case 82: /* $@3: %empty */ -#line 510 "parser.y" - { - #line 3689 "format.w" - HPUT32((yyvsp[0].d));} -#line 2580 "parser.c" + case 86: /* hxbox_node: start "hpack" hpack ">" */ +#line 532 "parser.y" + { + #line 3729 "format.w" + hput_tags((yyvsp[-3].u),TAG(hpack_kind,(yyvsp[-1].info)));} +#line 2639 "parser.c" break; - case 83: /* vpack: box_shift "max" "depth" dimension $@3 box_goal list */ -#line 512 "parser.y" - { - #line 3689 "format.w" - (yyval.info)= (yyvsp[-6].info) |(yyvsp[-1].info);} -#line 2588 "parser.c" + case 87: /* max_depth: %empty */ +#line 536 "parser.y" + { + #line 3731 "format.w" + (yyval.d)= MAX_DIMEN;} +#line 2647 "parser.c" break; - case 84: /* vxbox_node: start "vset" xbox ">" */ -#line 516 "parser.y" - { - #line 3691 "format.w" - hput_tags((yyvsp[-3].u),TAG(vset_kind,(yyvsp[-1].info)));} -#line 2596 "parser.c" + case 88: /* max_depth: "max" "depth" dimension */ +#line 538 "parser.y" + { + #line 3731 "format.w" + (yyval.d)= (yyvsp[0].d);} +#line 2655 "parser.c" break; - case 85: /* vxbox_node: start "vpack" vpack ">" */ -#line 519 "parser.y" - { - #line 3692 "format.w" - hput_tags((yyvsp[-3].u),TAG(vpack_kind,(yyvsp[-1].info)));} -#line 2604 "parser.c" + case 89: /* $@3: %empty */ +#line 542 "parser.y" + { + #line 3733 "format.w" + HPUT32((yyvsp[0].d));} +#line 2663 "parser.c" break; - case 86: /* hxbox_node: start "hset" xbox ">" */ -#line 524 "parser.y" - { - #line 3695 "format.w" - hput_tags((yyvsp[-3].u),TAG(hset_kind,(yyvsp[-1].info)));} -#line 2612 "parser.c" + case 90: /* vpack: max_depth $@3 box_shift box_goal list */ +#line 544 "parser.y" + { + #line 3733 "format.w" + (yyval.info)= (yyvsp[-2].info) |(yyvsp[-1].info);} +#line 2671 "parser.c" break; - case 87: /* hxbox_node: start "hpack" hpack ">" */ -#line 527 "parser.y" - { - #line 3696 "format.w" - hput_tags((yyvsp[-3].u),TAG(hpack_kind,(yyvsp[-1].info)));} -#line 2620 "parser.c" + case 91: /* $@4: %empty */ +#line 547 "parser.y" + { + #line 3734 "format.w" + HPUT32((yyvsp[0].d)^0x40000000);} +#line 2679 "parser.c" + break; + + case 92: /* vpack: "top" max_depth $@4 box_shift box_goal list */ +#line 549 "parser.y" + { + #line 3734 "format.w" + (yyval.info)= (yyvsp[-2].info) |(yyvsp[-1].info);} +#line 2687 "parser.c" + break; + + case 93: /* vxbox_node: start "vpack" vpack ">" */ +#line 553 "parser.y" + { + #line 3736 "format.w" + hput_tags((yyvsp[-3].u),TAG(vpack_kind,(yyvsp[-1].info)));} +#line 2695 "parser.c" break; - case 90: /* ltype: %empty */ -#line 533 "parser.y" + case 96: /* ltype: %empty */ +#line 559 "parser.y" { - #line 3806 "format.w" + #line 3850 "format.w" (yyval.info)= 1;} -#line 2628 "parser.c" +#line 2703 "parser.c" break; - case 91: /* ltype: "align" */ -#line 535 "parser.y" + case 97: /* ltype: "align" */ +#line 561 "parser.y" { - #line 3806 "format.w" + #line 3850 "format.w" (yyval.info)= 1;} -#line 2636 "parser.c" +#line 2711 "parser.c" break; - case 92: /* ltype: "center" */ -#line 537 "parser.y" + case 98: /* ltype: "center" */ +#line 563 "parser.y" { - #line 3806 "format.w" + #line 3850 "format.w" (yyval.info)= 2;} -#line 2644 "parser.c" +#line 2719 "parser.c" break; - case 93: /* ltype: "expand" */ -#line 539 "parser.y" + case 99: /* ltype: "expand" */ +#line 565 "parser.y" { - #line 3806 "format.w" + #line 3850 "format.w" (yyval.info)= 3;} -#line 2652 "parser.c" +#line 2727 "parser.c" break; - case 94: /* leaders: glue_node ltype rule_node */ -#line 542 "parser.y" + case 100: /* leaders: glue_node ltype rule_node */ +#line 568 "parser.y" { - #line 3807 "format.w" + #line 3851 "format.w" if((yyvsp[-2].b))(yyval.info)= (yyvsp[-1].info) |b100;else (yyval.info)= (yyvsp[-1].info);} -#line 2660 "parser.c" +#line 2735 "parser.c" break; - case 95: /* leaders: glue_node ltype hbox_node */ -#line 545 "parser.y" + case 101: /* leaders: glue_node ltype hbox_node */ +#line 571 "parser.y" { - #line 3808 "format.w" + #line 3852 "format.w" if((yyvsp[-2].b))(yyval.info)= (yyvsp[-1].info) |b100;else (yyval.info)= (yyvsp[-1].info);} -#line 2668 "parser.c" +#line 2743 "parser.c" break; - case 96: /* leaders: glue_node ltype vbox_node */ -#line 548 "parser.y" + case 102: /* leaders: glue_node ltype vbox_node */ +#line 574 "parser.y" { - #line 3809 "format.w" + #line 3853 "format.w" if((yyvsp[-2].b))(yyval.info)= (yyvsp[-1].info) |b100;else (yyval.info)= (yyvsp[-1].info);} -#line 2676 "parser.c" +#line 2751 "parser.c" break; - case 97: /* content_node: start "leaders" leaders ">" */ -#line 551 "parser.y" + case 103: /* content_node: start "leaders" leaders ">" */ +#line 577 "parser.y" { - #line 3810 "format.w" + #line 3854 "format.w" hput_tags((yyvsp[-3].u),TAG(leaders_kind,(yyvsp[-1].info)));} -#line 2684 "parser.c" +#line 2759 "parser.c" break; - case 98: /* $@4: %empty */ -#line 555 "parser.y" + case 104: /* $@5: %empty */ +#line 581 "parser.y" { - #line 3916 "format.w" + #line 3960 "format.w" if((yyvsp[0].d)!=0)HPUT32((yyvsp[0].d));} -#line 2692 "parser.c" +#line 2767 "parser.c" break; - case 99: /* baseline: dimension $@4 glue_node glue_node */ -#line 558 "parser.y" + case 105: /* baseline: dimension $@5 glue_node glue_node */ +#line 584 "parser.y" { - #line 3917 "format.w" + #line 3961 "format.w" (yyval.info)= b000;if((yyvsp[-3].d)!=0)(yyval.info) |= b001; if((yyvsp[-1].b))(yyval.info) |= b100; if((yyvsp[0].b))(yyval.info) |= b010; } -#line 2703 "parser.c" +#line 2778 "parser.c" break; - case 100: /* content_node: start "baseline" baseline ">" */ -#line 565 "parser.y" + case 106: /* content_node: start "baseline" baseline ">" */ +#line 591 "parser.y" { - #line 3922 "format.w" + #line 3966 "format.w" if((yyvsp[-1].info)==b000)HPUT8(0);hput_tags((yyvsp[-3].u),TAG(baseline_kind,(yyvsp[-1].info)));} -#line 2711 "parser.c" +#line 2786 "parser.c" break; - case 102: /* cc_list: cc_list TXT_CC */ -#line 569 "parser.y" + case 108: /* cc_list: cc_list TXT_CC */ +#line 595 "parser.y" { - #line 4005 "format.w" + #line 4049 "format.w" hput_utf8((yyvsp[0].u));} -#line 2719 "parser.c" +#line 2794 "parser.c" break; - case 103: /* lig_cc: UNSIGNED */ -#line 572 "parser.y" + case 109: /* lig_cc: UNSIGNED */ +#line 598 "parser.y" { - #line 4006 "format.w" + #line 4050 "format.w" RNG("UTF-8 code",(yyvsp[0].u),0,0x1FFFFF);(yyval.u)= hpos-hstart;hput_utf8((yyvsp[0].u));} -#line 2727 "parser.c" +#line 2802 "parser.c" break; - case 104: /* lig_cc: CHARCODE */ -#line 575 "parser.y" + case 110: /* lig_cc: CHARCODE */ +#line 601 "parser.y" { - #line 4007 "format.w" + #line 4051 "format.w" (yyval.u)= hpos-hstart;hput_utf8((yyvsp[0].u));} -#line 2735 "parser.c" +#line 2810 "parser.c" break; - case 105: /* ref: REFERENCE */ -#line 578 "parser.y" + case 111: /* ref: REFERENCE */ +#line 604 "parser.y" { - #line 4008 "format.w" + #line 4052 "format.w" HPUT8((yyvsp[0].u));(yyval.u)= (yyvsp[0].u);} -#line 2743 "parser.c" +#line 2818 "parser.c" break; - case 106: /* $@5: %empty */ -#line 581 "parser.y" + case 112: /* $@6: %empty */ +#line 607 "parser.y" { - #line 4009 "format.w" + #line 4053 "format.w" REF(font_kind,(yyvsp[0].u));} -#line 2751 "parser.c" +#line 2826 "parser.c" break; - case 107: /* ligature: ref $@5 lig_cc TXT_START cc_list TXT_END */ -#line 584 "parser.y" + case 113: /* ligature: ref $@6 lig_cc TXT_START cc_list TXT_END */ +#line 610 "parser.y" { - #line 4010 "format.w" + #line 4054 "format.w" (yyval.lg).f= (yyvsp[-5].u);(yyval.lg).l.p= (yyvsp[-3].u);(yyval.lg).l.s= (hpos-hstart)-(yyvsp[-3].u); RNG("Ligature size",(yyval.lg).l.s,0,255);} -#line 2760 "parser.c" +#line 2835 "parser.c" break; - case 108: /* content_node: start "ligature" ligature ">" */ -#line 588 "parser.y" + case 114: /* content_node: start "ligature" ligature ">" */ +#line 614 "parser.y" { - #line 4012 "format.w" + #line 4056 "format.w" hput_tags((yyvsp[-3].u),hput_ligature(&((yyvsp[-1].lg))));} -#line 2768 "parser.c" +#line 2843 "parser.c" break; - case 109: /* replace_count: explicit */ -#line 592 "parser.y" + case 115: /* replace_count: explicit */ +#line 618 "parser.y" { - #line 4122 "format.w" + #line 4166 "format.w" if((yyvsp[0].b)){(yyval.u)= 0x80;HPUT8(0x80);}else (yyval.u)= 0x00;} -#line 2776 "parser.c" +#line 2851 "parser.c" break; - case 110: /* replace_count: explicit UNSIGNED */ -#line 595 "parser.y" + case 116: /* replace_count: explicit UNSIGNED */ +#line 621 "parser.y" { - #line 4123 "format.w" + #line 4167 "format.w" RNG("Replace count",(yyvsp[0].u),0,31); (yyval.u)= ((yyvsp[0].u)) |(((yyvsp[-1].b))?0x80:0x00);if((yyval.u)!=0)HPUT8((yyval.u));} -#line 2785 "parser.c" +#line 2860 "parser.c" break; - case 111: /* disc: replace_count list list */ -#line 599 "parser.y" + case 117: /* disc: replace_count list list */ +#line 625 "parser.y" { - #line 4125 "format.w" + #line 4169 "format.w" (yyval.dc).r= (yyvsp[-2].u);(yyval.dc).p= (yyvsp[-1].l);(yyval.dc).q= (yyvsp[0].l); - if((yyvsp[0].l).s==0){hpos= hpos-2;if((yyvsp[-1].l).s==0)hpos= hpos-2;}} -#line 2794 "parser.c" + if((yyvsp[0].l).s==0){hpos= hpos-3;if((yyvsp[-1].l).s==0)hpos= hpos-3;}} +#line 2869 "parser.c" break; - case 112: /* disc: replace_count list */ -#line 603 "parser.y" + case 118: /* disc: replace_count list */ +#line 629 "parser.y" { - #line 4127 "format.w" - (yyval.dc).r= (yyvsp[-1].u);(yyval.dc).p= (yyvsp[0].l);if((yyvsp[0].l).s==0)hpos= hpos-2;(yyval.dc).q.s= 0;} -#line 2802 "parser.c" + #line 4171 "format.w" + (yyval.dc).r= (yyvsp[-1].u);(yyval.dc).p= (yyvsp[0].l);if((yyvsp[0].l).s==0)hpos= hpos-3;(yyval.dc).q.s= 0;} +#line 2877 "parser.c" break; - case 113: /* disc: replace_count */ -#line 606 "parser.y" + case 119: /* disc: replace_count */ +#line 632 "parser.y" { - #line 4128 "format.w" + #line 4172 "format.w" (yyval.dc).r= (yyvsp[0].u);(yyval.dc).p.s= 0;(yyval.dc).q.s= 0;} -#line 2810 "parser.c" +#line 2885 "parser.c" break; - case 114: /* disc_node: start "disc" disc ">" */ -#line 612 "parser.y" + case 120: /* disc_node: start "disc" disc ">" */ +#line 638 "parser.y" { - #line 4132 "format.w" + #line 4176 "format.w" hput_tags((yyvsp[-3].u),hput_disc(&((yyvsp[-1].dc))));} -#line 2818 "parser.c" +#line 2893 "parser.c" break; - case 116: /* par_dimen: xdimen */ -#line 618 "parser.y" + case 122: /* par_dimen: xdimen */ +#line 644 "parser.y" { - #line 4286 "format.w" + #line 4328 "format.w" hput_xdimen_node(&((yyvsp[0].xd)));} -#line 2826 "parser.c" +#line 2901 "parser.c" break; - case 117: /* par: xdimen_ref param_ref list */ -#line 621 "parser.y" + case 123: /* par: xdimen_ref param_ref list */ +#line 647 "parser.y" { - #line 4287 "format.w" + #line 4329 "format.w" (yyval.info)= b000;} -#line 2834 "parser.c" +#line 2909 "parser.c" break; - case 118: /* par: xdimen_ref empty_param_list non_empty_param_list list */ -#line 624 "parser.y" - { - #line 4288 "format.w" - (yyval.info)= b010;} -#line 2842 "parser.c" - break; - - case 119: /* par: xdimen_ref empty_param_list list */ -#line 627 "parser.y" - { - #line 4289 "format.w" + case 124: /* par: xdimen_ref param_list list */ +#line 650 "parser.y" + { + #line 4330 "format.w" (yyval.info)= b010;} -#line 2850 "parser.c" +#line 2917 "parser.c" break; - case 120: /* $@6: %empty */ -#line 630 "parser.y" + case 125: /* $@7: %empty */ +#line 653 "parser.y" { - #line 4290 "format.w" + #line 4331 "format.w" hput_xdimen_node(&((yyvsp[-1].xd)));} -#line 2858 "parser.c" +#line 2925 "parser.c" break; - case 121: /* par: xdimen param_ref $@6 list */ -#line 632 "parser.y" + case 126: /* par: xdimen param_ref $@7 list */ +#line 655 "parser.y" { - #line 4290 "format.w" + #line 4331 "format.w" (yyval.info)= b100;} -#line 2866 "parser.c" +#line 2933 "parser.c" break; - case 122: /* par: par_dimen empty_param_list non_empty_param_list list */ -#line 635 "parser.y" - { - #line 4291 "format.w" - (yyval.info)= b110;} -#line 2874 "parser.c" - break; - - case 123: /* par: par_dimen empty_param_list list */ -#line 638 "parser.y" - { - #line 4292 "format.w" + case 127: /* par: par_dimen param_list list */ +#line 658 "parser.y" + { + #line 4332 "format.w" (yyval.info)= b110;} -#line 2882 "parser.c" +#line 2941 "parser.c" break; - case 124: /* content_node: start "par" par ">" */ -#line 642 "parser.y" + case 128: /* content_node: start "par" par ">" */ +#line 662 "parser.y" { - #line 4294 "format.w" + #line 4334 "format.w" hput_tags((yyvsp[-3].u),TAG(par_kind,(yyvsp[-1].info)));} -#line 2890 "parser.c" +#line 2949 "parser.c" break; - case 125: /* math: param_ref list */ -#line 646 "parser.y" + case 129: /* math: param_ref list */ +#line 666 "parser.y" { - #line 4360 "format.w" + #line 4400 "format.w" (yyval.info)= b000;} -#line 2898 "parser.c" +#line 2957 "parser.c" break; - case 126: /* math: param_ref list hbox_node */ -#line 649 "parser.y" + case 130: /* math: param_ref list hbox_node */ +#line 669 "parser.y" { - #line 4361 "format.w" + #line 4401 "format.w" (yyval.info)= b001;} -#line 2906 "parser.c" +#line 2965 "parser.c" break; - case 127: /* math: param_ref hbox_node list */ -#line 652 "parser.y" + case 131: /* math: param_ref hbox_node list */ +#line 672 "parser.y" { - #line 4362 "format.w" + #line 4402 "format.w" (yyval.info)= b010;} -#line 2914 "parser.c" - break; - - case 128: /* math: empty_param_list list */ -#line 655 "parser.y" - { - #line 4363 "format.w" - (yyval.info)= b100;} -#line 2922 "parser.c" - break; - - case 129: /* math: empty_param_list list hbox_node */ -#line 658 "parser.y" - { - #line 4364 "format.w" - (yyval.info)= b101;} -#line 2930 "parser.c" - break; - - case 130: /* math: empty_param_list hbox_node list */ -#line 661 "parser.y" - { - #line 4365 "format.w" - (yyval.info)= b110;} -#line 2938 "parser.c" +#line 2973 "parser.c" break; - case 131: /* math: empty_param_list non_empty_param_list list */ -#line 664 "parser.y" - { - #line 4366 "format.w" + case 132: /* math: param_list list */ +#line 675 "parser.y" + { + #line 4403 "format.w" (yyval.info)= b100;} -#line 2946 "parser.c" +#line 2981 "parser.c" break; - case 132: /* math: empty_param_list non_empty_param_list list hbox_node */ -#line 667 "parser.y" - { - #line 4367 "format.w" + case 133: /* math: param_list list hbox_node */ +#line 678 "parser.y" + { + #line 4404 "format.w" (yyval.info)= b101;} -#line 2954 "parser.c" +#line 2989 "parser.c" break; - case 133: /* math: empty_param_list non_empty_param_list hbox_node list */ -#line 670 "parser.y" - { - #line 4368 "format.w" + case 134: /* math: param_list hbox_node list */ +#line 681 "parser.y" + { + #line 4405 "format.w" (yyval.info)= b110;} -#line 2962 "parser.c" +#line 2997 "parser.c" break; - case 134: /* content_node: start "math" math ">" */ -#line 674 "parser.y" + case 135: /* content_node: start "math" math ">" */ +#line 685 "parser.y" { - #line 4370 "format.w" + #line 4407 "format.w" hput_tags((yyvsp[-3].u),TAG(math_kind,(yyvsp[-1].info)));} -#line 2970 "parser.c" +#line 3005 "parser.c" break; - case 135: /* on_off: "on" */ -#line 678 "parser.y" + case 136: /* on_off: "on" */ +#line 689 "parser.y" { - #line 4420 "format.w" + #line 4457 "format.w" (yyval.i)= 1;} -#line 2978 "parser.c" +#line 3013 "parser.c" break; - case 136: /* on_off: "off" */ -#line 680 "parser.y" + case 137: /* on_off: "off" */ +#line 691 "parser.y" { - #line 4420 "format.w" + #line 4457 "format.w" (yyval.i)= 0;} -#line 2986 "parser.c" +#line 3021 "parser.c" break; - case 137: /* math: on_off */ -#line 683 "parser.y" + case 138: /* math: on_off */ +#line 694 "parser.y" { - #line 4421 "format.w" + #line 4458 "format.w" (yyval.info)= b011 |((yyvsp[0].i)<<2);} -#line 2994 "parser.c" +#line 3029 "parser.c" break; - case 138: /* content_node: start "adjust" list ">" */ -#line 687 "parser.y" + case 139: /* content_node: start "adjust" list ">" */ +#line 698 "parser.y" { - #line 4452 "format.w" + #line 4489 "format.w" hput_tags((yyvsp[-3].u),TAG(adjust_kind,1));} -#line 3002 "parser.c" +#line 3037 "parser.c" break; - case 139: /* span_count: UNSIGNED */ -#line 691 "parser.y" + case 140: /* span_count: UNSIGNED */ +#line 702 "parser.y" { - #line 4551 "format.w" + #line 4588 "format.w" (yyval.info)= hput_span_count((yyvsp[0].u));} -#line 3010 "parser.c" +#line 3045 "parser.c" break; - case 140: /* content_node: start "item" content_node ">" */ -#line 694 "parser.y" + case 141: /* content_node: start "item" content_node ">" */ +#line 705 "parser.y" { - #line 4552 "format.w" + #line 4589 "format.w" hput_tags((yyvsp[-3].u),TAG(item_kind,1));} -#line 3018 "parser.c" +#line 3053 "parser.c" break; - case 141: /* content_node: start "item" span_count content_node ">" */ -#line 697 "parser.y" + case 142: /* content_node: start "item" span_count content_node ">" */ +#line 708 "parser.y" { - #line 4553 "format.w" + #line 4590 "format.w" hput_tags((yyvsp[-4].u),TAG(item_kind,(yyvsp[-2].info)));} -#line 3026 "parser.c" +#line 3061 "parser.c" break; - case 142: /* content_node: start "item" list ">" */ -#line 700 "parser.y" + case 143: /* content_node: start "item" list ">" */ +#line 711 "parser.y" { - #line 4554 "format.w" + #line 4591 "format.w" hput_tags((yyvsp[-3].u),TAG(item_kind,b000));} -#line 3034 "parser.c" +#line 3069 "parser.c" break; - case 143: /* table: "h" box_goal list list */ -#line 704 "parser.y" + case 144: /* table: "h" box_goal list list */ +#line 715 "parser.y" { - #line 4556 "format.w" + #line 4593 "format.w" (yyval.info)= (yyvsp[-2].info);} -#line 3042 "parser.c" +#line 3077 "parser.c" break; - case 144: /* table: "v" box_goal list list */ -#line 707 "parser.y" + case 145: /* table: "v" box_goal list list */ +#line 718 "parser.y" { - #line 4557 "format.w" + #line 4594 "format.w" (yyval.info)= (yyvsp[-2].info) |b010;} -#line 3050 "parser.c" +#line 3085 "parser.c" break; - case 145: /* content_node: start "table" table ">" */ -#line 711 "parser.y" + case 146: /* content_node: start "table" table ">" */ +#line 722 "parser.y" { - #line 4559 "format.w" + #line 4596 "format.w" hput_tags((yyvsp[-3].u),TAG(table_kind,(yyvsp[-1].info)));} -#line 3058 "parser.c" +#line 3093 "parser.c" break; - case 146: /* image_aspect: number */ -#line 715 "parser.y" + case 147: /* image_aspect: number */ +#line 726 "parser.y" { - #line 4693 "format.w" + #line 4730 "format.w" (yyval.f)= (yyvsp[0].f);} -#line 3066 "parser.c" +#line 3101 "parser.c" break; - case 147: /* image_aspect: %empty */ -#line 717 "parser.y" + case 148: /* image_aspect: %empty */ +#line 728 "parser.y" { - #line 4693 "format.w" + #line 4730 "format.w" (yyval.f)= 0.0;} -#line 3074 "parser.c" +#line 3109 "parser.c" break; - case 148: /* image_width: "width" xdimen */ -#line 720 "parser.y" + case 149: /* image_width: "width" xdimen */ +#line 731 "parser.y" { - #line 4694 "format.w" + #line 4731 "format.w" (yyval.xd)= (yyvsp[0].xd);} -#line 3082 "parser.c" +#line 3117 "parser.c" break; - case 149: /* image_width: %empty */ -#line 723 "parser.y" + case 150: /* image_width: %empty */ +#line 734 "parser.y" { - #line 4695 "format.w" + #line 4732 "format.w" (yyval.xd)= xdimen_defaults[zero_xdimen_no];} -#line 3090 "parser.c" +#line 3125 "parser.c" break; - case 150: /* image_height: "height" xdimen */ -#line 726 "parser.y" + case 151: /* image_height: "height" xdimen */ +#line 737 "parser.y" { - #line 4696 "format.w" + #line 4733 "format.w" (yyval.xd)= (yyvsp[0].xd);} -#line 3098 "parser.c" +#line 3133 "parser.c" break; - case 151: /* image_height: %empty */ -#line 729 "parser.y" + case 152: /* image_height: %empty */ +#line 740 "parser.y" { - #line 4697 "format.w" + #line 4734 "format.w" (yyval.xd)= xdimen_defaults[zero_xdimen_no];} -#line 3106 "parser.c" +#line 3141 "parser.c" break; - case 152: /* image_spec: UNSIGNED image_aspect image_width image_height */ -#line 734 "parser.y" + case 153: /* image_spec: UNSIGNED image_aspect image_width image_height */ +#line 745 "parser.y" { - #line 4700 "format.w" + #line 4737 "format.w" (yyval.info)= hput_image_spec((yyvsp[-3].u),(yyvsp[-2].f),0,&((yyvsp[-1].xd)),0,&((yyvsp[0].xd)));} -#line 3114 "parser.c" +#line 3149 "parser.c" break; - case 153: /* image_spec: UNSIGNED image_aspect "width" REFERENCE image_height */ -#line 738 "parser.y" + case 154: /* image_spec: UNSIGNED image_aspect "width" REFERENCE image_height */ +#line 749 "parser.y" { - #line 4702 "format.w" + #line 4739 "format.w" (yyval.info)= hput_image_spec((yyvsp[-4].u),(yyvsp[-3].f),(yyvsp[-1].u),NULL,0,&((yyvsp[0].xd)));} -#line 3122 "parser.c" +#line 3157 "parser.c" break; - case 154: /* image_spec: UNSIGNED image_aspect image_width "height" REFERENCE */ -#line 742 "parser.y" + case 155: /* image_spec: UNSIGNED image_aspect image_width "height" REFERENCE */ +#line 753 "parser.y" { - #line 4704 "format.w" + #line 4741 "format.w" (yyval.info)= hput_image_spec((yyvsp[-4].u),(yyvsp[-3].f),0,&((yyvsp[-2].xd)),(yyvsp[0].u),NULL);} -#line 3130 "parser.c" +#line 3165 "parser.c" break; - case 155: /* image_spec: UNSIGNED image_aspect "width" REFERENCE "height" REFERENCE */ -#line 746 "parser.y" + case 156: /* image_spec: UNSIGNED image_aspect "width" REFERENCE "height" REFERENCE */ +#line 757 "parser.y" { - #line 4706 "format.w" + #line 4743 "format.w" (yyval.info)= hput_image_spec((yyvsp[-5].u),(yyvsp[-4].f),(yyvsp[-2].u),NULL,(yyvsp[0].u),NULL);} -#line 3138 "parser.c" +#line 3173 "parser.c" break; - case 156: /* image: image_spec list */ -#line 750 "parser.y" + case 157: /* image: image_spec list */ +#line 761 "parser.y" { - #line 4708 "format.w" + #line 4745 "format.w" (yyval.info)= (yyvsp[-1].info);} -#line 3146 "parser.c" +#line 3181 "parser.c" break; - case 157: /* content_node: start "image" image ">" */ -#line 754 "parser.y" + case 158: /* content_node: start "image" image ">" */ +#line 765 "parser.y" { - #line 4710 "format.w" + #line 4747 "format.w" hput_tags((yyvsp[-3].u),TAG(image_kind,(yyvsp[-1].info)));} -#line 3154 "parser.c" +#line 3189 "parser.c" break; - case 158: /* max_value: "outline" UNSIGNED */ -#line 758 "parser.y" + case 159: /* max_value: "outline" UNSIGNED */ +#line 769 "parser.y" { - #line 5310 "format.w" + #line 5347 "format.w" max_outline= (yyvsp[0].u); RNG("max outline",max_outline,0,0xFFFF); DBG(DBGDEF |DBGLABEL,"Setting max outline to %d\n",max_outline); } -#line 3165 "parser.c" +#line 3200 "parser.c" break; - case 159: /* placement: "top" */ -#line 765 "parser.y" + case 160: /* placement: "top" */ +#line 776 "parser.y" { - #line 5402 "format.w" + #line 5439 "format.w" (yyval.i)= LABEL_TOP;} -#line 3173 "parser.c" +#line 3208 "parser.c" break; - case 160: /* placement: "bot" */ -#line 767 "parser.y" + case 161: /* placement: "bot" */ +#line 778 "parser.y" { - #line 5402 "format.w" + #line 5439 "format.w" (yyval.i)= LABEL_BOT;} -#line 3181 "parser.c" +#line 3216 "parser.c" break; - case 161: /* placement: "mid" */ -#line 769 "parser.y" + case 162: /* placement: "mid" */ +#line 780 "parser.y" { - #line 5402 "format.w" + #line 5439 "format.w" (yyval.i)= LABEL_MID;} -#line 3189 "parser.c" +#line 3224 "parser.c" break; - case 162: /* placement: %empty */ -#line 771 "parser.y" + case 163: /* placement: %empty */ +#line 782 "parser.y" { - #line 5402 "format.w" + #line 5439 "format.w" (yyval.i)= LABEL_MID;} -#line 3197 "parser.c" +#line 3232 "parser.c" break; - case 163: /* content_node: "<" "label" REFERENCE placement ">" */ -#line 775 "parser.y" + case 164: /* content_node: "<" "label" REFERENCE placement ">" */ +#line 786 "parser.y" { - #line 5404 "format.w" + #line 5441 "format.w" hset_label((yyvsp[-2].u),(yyvsp[-1].i));} -#line 3205 "parser.c" +#line 3240 "parser.c" break; - case 164: /* content_node: start "link" REFERENCE on_off ">" */ -#line 780 "parser.y" + case 165: /* content_node: start "link" REFERENCE on_off ">" */ +#line 791 "parser.y" { - #line 5662 "format.w" + #line 5699 "format.w" hput_tags((yyvsp[-4].u),hput_link((yyvsp[-2].u),(yyvsp[-1].i)));} -#line 3213 "parser.c" +#line 3248 "parser.c" break; - case 165: /* def_node: "<" "outline" REFERENCE integer position list ">" */ -#line 784 "parser.y" + case 166: /* def_node: "<" "outline" REFERENCE integer position list ">" */ +#line 795 "parser.y" { - #line 5792 "format.w" + #line 5829 "format.w" static int outline_no= -1; (yyval.rf).k= outline_kind;(yyval.rf).n= (yyvsp[-4].u); @@ -3223,215 +3258,265 @@ yyreduce: outline_no++; hset_outline(outline_no,(yyvsp[-4].u),(yyvsp[-3].i),(yyvsp[-2].u)); } -#line 3227 "parser.c" +#line 3262 "parser.c" + break; + + case 167: /* def_node: start "unknown" UNSIGNED UNSIGNED ">" */ +#line 805 "parser.y" + { + #line 5956 "format.w" + hput_tags((yyvsp[-4].u),hput_unknown_def((yyvsp[-2].u),(yyvsp[-1].u),0));} +#line 3270 "parser.c" + break; + + case 168: /* def_node: start "unknown" UNSIGNED UNSIGNED UNSIGNED ">" */ +#line 808 "parser.y" + { + #line 5957 "format.w" + hput_tags((yyvsp[-5].u),hput_unknown_def((yyvsp[-3].u),(yyvsp[-2].u),(yyvsp[-1].u)));} +#line 3278 "parser.c" + break; + + case 169: /* content_node: start "unknown" UNSIGNED unknown_bytes unknown_nodes ">" */ +#line 812 "parser.y" + { + #line 5969 "format.w" + hput_tags((yyvsp[-5].u),hput_unknown((yyvsp[-5].u),(yyvsp[-3].u),(yyvsp[-2].u),(yyvsp[-1].u)));} +#line 3286 "parser.c" + break; + + case 170: /* unknown_bytes: %empty */ +#line 815 "parser.y" + { + #line 5970 "format.w" + (yyval.u)= 0;} +#line 3294 "parser.c" + break; + + case 171: /* unknown_bytes: unknown_bytes UNSIGNED */ +#line 817 "parser.y" + { + #line 5970 "format.w" + RNG("byte",(yyvsp[0].u),0,0xFF);HPUT8((yyvsp[0].u));(yyval.u)= (yyvsp[-1].u)+1;} +#line 3302 "parser.c" + break; + + case 176: /* unknown_nodes: %empty */ +#line 821 "parser.y" + { + #line 5972 "format.w" + (yyval.u)= 0;} +#line 3310 "parser.c" break; - case 166: /* stream_link: ref */ -#line 794 "parser.y" + case 177: /* unknown_nodes: unknown_nodes unknown_node */ +#line 823 "parser.y" + { + #line 5972 "format.w" + RNG("unknown subnodes",(yyvsp[-1].u),0,3);(yyval.u)= (yyvsp[-1].u)+1;} +#line 3318 "parser.c" + break; + + case 178: /* stream_link: ref */ +#line 827 "parser.y" { - #line 6207 "format.w" + #line 6407 "format.w" REF_RNG(stream_kind,(yyvsp[0].u));} -#line 3235 "parser.c" +#line 3326 "parser.c" break; - case 167: /* stream_link: "*" */ -#line 796 "parser.y" + case 179: /* stream_link: "*" */ +#line 829 "parser.y" { - #line 6207 "format.w" + #line 6407 "format.w" HPUT8(255);} -#line 3243 "parser.c" +#line 3334 "parser.c" break; - case 168: /* stream_split: stream_link stream_link UNSIGNED */ -#line 799 "parser.y" + case 180: /* stream_split: stream_link stream_link UNSIGNED */ +#line 832 "parser.y" { - #line 6208 "format.w" + #line 6408 "format.w" RNG("split ratio",(yyvsp[0].u),0,1000);HPUT16((yyvsp[0].u));} -#line 3251 "parser.c" +#line 3342 "parser.c" break; - case 169: /* $@7: %empty */ -#line 802 "parser.y" + case 181: /* $@8: %empty */ +#line 835 "parser.y" { - #line 6209 "format.w" + #line 6409 "format.w" RNG("magnification factor",(yyvsp[0].u),0,1000);HPUT16((yyvsp[0].u));} -#line 3259 "parser.c" +#line 3350 "parser.c" break; - case 171: /* stream_type: stream_info */ -#line 806 "parser.y" + case 183: /* stream_type: stream_info */ +#line 839 "parser.y" { - #line 6211 "format.w" + #line 6411 "format.w" (yyval.info)= 0;} -#line 3267 "parser.c" +#line 3358 "parser.c" break; - case 172: /* stream_type: "first" */ -#line 808 "parser.y" + case 184: /* stream_type: "first" */ +#line 841 "parser.y" { - #line 6211 "format.w" + #line 6411 "format.w" (yyval.info)= 1;} -#line 3275 "parser.c" +#line 3366 "parser.c" break; - case 173: /* stream_type: "last" */ -#line 810 "parser.y" + case 185: /* stream_type: "last" */ +#line 843 "parser.y" { - #line 6211 "format.w" + #line 6411 "format.w" (yyval.info)= 2;} -#line 3283 "parser.c" +#line 3374 "parser.c" break; - case 174: /* stream_type: "top" */ -#line 812 "parser.y" + case 186: /* stream_type: "top" */ +#line 845 "parser.y" { - #line 6211 "format.w" + #line 6411 "format.w" (yyval.info)= 3;} -#line 3291 "parser.c" +#line 3382 "parser.c" break; - case 175: /* stream_def_node: start "stream (definition)" ref stream_type list xdimen_node glue_node list glue_node ">" */ -#line 818 "parser.y" + case 187: /* stream_def_node: start "stream (definition)" ref stream_type list xdimen_node glue_node list glue_node ">" */ +#line 851 "parser.y" { - #line 6215 "format.w" + #line 6415 "format.w" DEF((yyval.rf),stream_kind,(yyvsp[-7].u));hput_tags((yyvsp[-9].u),TAG(stream_kind,(yyvsp[-6].info) |b100));} -#line 3299 "parser.c" +#line 3390 "parser.c" break; - case 176: /* stream_ins_node: start "stream (definition)" ref ">" */ -#line 823 "parser.y" + case 188: /* stream_ins_node: start "stream (definition)" ref ">" */ +#line 856 "parser.y" { - #line 6218 "format.w" + #line 6418 "format.w" RNG("Stream insertion",(yyvsp[-1].u),0,max_ref[stream_kind]);hput_tags((yyvsp[-3].u),TAG(stream_kind,b100));} -#line 3307 "parser.c" - break; - - case 179: /* stream: empty_param_list list */ -#line 829 "parser.y" - { - #line 6313 "format.w" - (yyval.info)= b010;} -#line 3315 "parser.c" +#line 3398 "parser.c" break; - case 180: /* stream: empty_param_list non_empty_param_list list */ -#line 832 "parser.y" - { - #line 6314 "format.w" + case 191: /* stream: param_list list */ +#line 862 "parser.y" + { + #line 6513 "format.w" (yyval.info)= b010;} -#line 3323 "parser.c" +#line 3406 "parser.c" break; - case 181: /* stream: param_ref list */ -#line 835 "parser.y" + case 192: /* stream: param_ref list */ +#line 865 "parser.y" { - #line 6315 "format.w" + #line 6514 "format.w" (yyval.info)= b000;} -#line 3331 "parser.c" +#line 3414 "parser.c" break; - case 182: /* content_node: start "stream" stream_ref stream ">" */ -#line 839 "parser.y" + case 193: /* content_node: start "stream" stream_ref stream ">" */ +#line 869 "parser.y" { - #line 6317 "format.w" + #line 6516 "format.w" hput_tags((yyvsp[-4].u),TAG(stream_kind,(yyvsp[-1].info)));} -#line 3339 "parser.c" +#line 3422 "parser.c" break; - case 183: /* page_priority: %empty */ -#line 843 "parser.y" + case 194: /* page_priority: %empty */ +#line 873 "parser.y" { - #line 6420 "format.w" + #line 6619 "format.w" HPUT8(1);} -#line 3347 "parser.c" +#line 3430 "parser.c" break; - case 184: /* page_priority: UNSIGNED */ -#line 846 "parser.y" + case 195: /* page_priority: UNSIGNED */ +#line 876 "parser.y" { - #line 6421 "format.w" + #line 6620 "format.w" RNG("page priority",(yyvsp[0].u),0,255);HPUT8((yyvsp[0].u));} -#line 3355 "parser.c" +#line 3438 "parser.c" break; - case 187: /* $@8: %empty */ -#line 852 "parser.y" + case 198: /* $@9: %empty */ +#line 882 "parser.y" { - #line 6425 "format.w" + #line 6624 "format.w" hput_string((yyvsp[0].s));} -#line 3363 "parser.c" +#line 3446 "parser.c" break; - case 188: /* $@9: %empty */ -#line 854 "parser.y" + case 199: /* $@10: %empty */ +#line 884 "parser.y" { - #line 6425 "format.w" + #line 6624 "format.w" HPUT32((yyvsp[0].d));} -#line 3371 "parser.c" +#line 3454 "parser.c" break; - case 190: /* content_node: "<" "range" REFERENCE "on" ">" */ -#line 861 "parser.y" + case 201: /* content_node: "<" "range" REFERENCE "on" ">" */ +#line 891 "parser.y" { - #line 6537 "format.w" + #line 6737 "format.w" REF(page_kind,(yyvsp[-2].u));hput_range((yyvsp[-2].u),true);} -#line 3379 "parser.c" +#line 3462 "parser.c" break; - case 191: /* content_node: "<" "range" REFERENCE "off" ">" */ -#line 864 "parser.y" + case 202: /* content_node: "<" "range" REFERENCE "off" ">" */ +#line 894 "parser.y" { - #line 6538 "format.w" + #line 6738 "format.w" REF(page_kind,(yyvsp[-2].u));hput_range((yyvsp[-2].u),false);} -#line 3387 "parser.c" +#line 3470 "parser.c" break; - case 193: /* $@10: %empty */ -#line 870 "parser.y" + case 204: /* $@11: %empty */ +#line 900 "parser.y" { - #line 7231 "format.w" + #line 7436 "format.w" new_directory((yyvsp[0].u)+1);new_output_buffers();} -#line 3395 "parser.c" +#line 3478 "parser.c" break; - case 197: /* entry: "<" "entry" UNSIGNED string ">" */ -#line 875 "parser.y" + case 208: /* entry: "<" "entry" UNSIGNED string ">" */ +#line 905 "parser.y" { - #line 7234 "format.w" + #line 7439 "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 3403 "parser.c" +#line 3486 "parser.c" break; - case 198: /* $@11: %empty */ -#line 879 "parser.y" + case 209: /* $@12: %empty */ +#line 909 "parser.y" { - #line 7777 "format.w" + #line 7982 "format.w" hput_definitions_start();} -#line 3411 "parser.c" +#line 3494 "parser.c" break; - case 199: /* definition_section: "<" "definitions" $@11 max_definitions definition_list ">" */ -#line 883 "parser.y" + case 210: /* definition_section: "<" "definitions" $@12 max_definitions definition_list ">" */ +#line 913 "parser.y" { - #line 7779 "format.w" + #line 7984 "format.w" hput_definitions_end();} -#line 3419 "parser.c" +#line 3502 "parser.c" break; - case 202: /* max_definitions: "<" "max" max_list ">" */ -#line 889 "parser.y" + case 213: /* max_definitions: "<" "max" max_list ">" */ +#line 919 "parser.y" { - #line 7895 "format.w" + #line 8100 "format.w" /*253:*/ if(max_ref[label_kind]>=0) ALLOCATE(labels,max_ref[label_kind]+1,Label); /*:253*/ /*274:*/ if(max_outline>=0) ALLOCATE(outlines,max_outline+1,Outline); - /*:274*/ /*301:*/ + /*:274*/ /*310:*/ ALLOCATE(page_on,max_ref[page_kind]+1,int); ALLOCATE(range_pos,2*(max_ref[range_kind]+1),RangePos); - /*:301*/ /*367:*/ + /*:310*/ /*376:*/ + definition_bits[0][list_kind]= (1<<(MAX_LIST_DEFAULT+1))-1; + definition_bits[0][param_kind]= (1<<(MAX_LIST_DEFAULT+1))-1; definition_bits[0][int_kind]= (1<<(MAX_INT_DEFAULT+1))-1; definition_bits[0][dimen_kind]= (1<<(MAX_DIMEN_DEFAULT+1))-1; definition_bits[0][xdimen_kind]= (1<<(MAX_XDIMEN_DEFAULT+1))-1; @@ -3440,544 +3525,536 @@ yyreduce: definition_bits[0][page_kind]= (1<<(MAX_PAGE_DEFAULT+1))-1; definition_bits[0][stream_kind]= (1<<(MAX_STREAM_DEFAULT+1))-1; definition_bits[0][range_kind]= (1<<(MAX_RANGE_DEFAULT+1))-1; - /*:367*/ /*382:*/ + /*:376*/ /*391:*/ ALLOCATE(hfont_name,max_ref[font_kind]+1,char*); - /*:382*/hput_max_definitions();} -#line 3447 "parser.c" + /*:391*/hput_max_definitions();} +#line 3532 "parser.c" break; - case 205: /* max_value: "font" UNSIGNED */ -#line 915 "parser.y" + case 216: /* max_value: "font" UNSIGNED */ +#line 947 "parser.y" { - #line 7899 "format.w" + #line 8104 "format.w" hset_max(font_kind,(yyvsp[0].u));} -#line 3455 "parser.c" +#line 3540 "parser.c" break; - case 206: /* max_value: "int" UNSIGNED */ -#line 918 "parser.y" + case 217: /* max_value: "int" UNSIGNED */ +#line 950 "parser.y" { - #line 7900 "format.w" + #line 8105 "format.w" hset_max(int_kind,(yyvsp[0].u));} -#line 3463 "parser.c" +#line 3548 "parser.c" break; - case 207: /* max_value: "dimen" UNSIGNED */ -#line 921 "parser.y" + case 218: /* max_value: "dimen" UNSIGNED */ +#line 953 "parser.y" { - #line 7901 "format.w" + #line 8106 "format.w" hset_max(dimen_kind,(yyvsp[0].u));} -#line 3471 "parser.c" +#line 3556 "parser.c" break; - case 208: /* max_value: "ligature" UNSIGNED */ -#line 924 "parser.y" + case 219: /* max_value: "ligature" UNSIGNED */ +#line 956 "parser.y" { - #line 7902 "format.w" + #line 8107 "format.w" hset_max(ligature_kind,(yyvsp[0].u));} -#line 3479 "parser.c" +#line 3564 "parser.c" break; - case 209: /* max_value: "disc" UNSIGNED */ -#line 927 "parser.y" + case 220: /* max_value: "disc" UNSIGNED */ +#line 959 "parser.y" { - #line 7903 "format.w" + #line 8108 "format.w" hset_max(disc_kind,(yyvsp[0].u));} -#line 3487 "parser.c" +#line 3572 "parser.c" break; - case 210: /* max_value: "glue" UNSIGNED */ -#line 930 "parser.y" + case 221: /* max_value: "glue" UNSIGNED */ +#line 962 "parser.y" { - #line 7904 "format.w" + #line 8109 "format.w" hset_max(glue_kind,(yyvsp[0].u));} -#line 3495 "parser.c" +#line 3580 "parser.c" break; - case 211: /* max_value: "language" UNSIGNED */ -#line 933 "parser.y" + case 222: /* max_value: "language" UNSIGNED */ +#line 965 "parser.y" { - #line 7905 "format.w" + #line 8110 "format.w" hset_max(language_kind,(yyvsp[0].u));} -#line 3503 "parser.c" +#line 3588 "parser.c" break; - case 212: /* max_value: "rule" UNSIGNED */ -#line 936 "parser.y" + case 223: /* max_value: "rule" UNSIGNED */ +#line 968 "parser.y" { - #line 7906 "format.w" + #line 8111 "format.w" hset_max(rule_kind,(yyvsp[0].u));} -#line 3511 "parser.c" +#line 3596 "parser.c" break; - case 213: /* max_value: "image" UNSIGNED */ -#line 939 "parser.y" + case 224: /* max_value: "image" UNSIGNED */ +#line 971 "parser.y" { - #line 7907 "format.w" + #line 8112 "format.w" hset_max(image_kind,(yyvsp[0].u));} -#line 3519 "parser.c" +#line 3604 "parser.c" break; - case 214: /* max_value: "leaders" UNSIGNED */ -#line 942 "parser.y" + case 225: /* max_value: "leaders" UNSIGNED */ +#line 974 "parser.y" { - #line 7908 "format.w" + #line 8113 "format.w" hset_max(leaders_kind,(yyvsp[0].u));} -#line 3527 "parser.c" +#line 3612 "parser.c" break; - case 215: /* max_value: "baseline" UNSIGNED */ -#line 945 "parser.y" + case 226: /* max_value: "baseline" UNSIGNED */ +#line 977 "parser.y" { - #line 7909 "format.w" + #line 8114 "format.w" hset_max(baseline_kind,(yyvsp[0].u));} -#line 3535 "parser.c" +#line 3620 "parser.c" break; - case 216: /* max_value: "xdimen" UNSIGNED */ -#line 948 "parser.y" + case 227: /* max_value: "xdimen" UNSIGNED */ +#line 980 "parser.y" { - #line 7910 "format.w" + #line 8115 "format.w" hset_max(xdimen_kind,(yyvsp[0].u));} -#line 3543 "parser.c" +#line 3628 "parser.c" break; - case 217: /* max_value: "param" UNSIGNED */ -#line 951 "parser.y" + case 228: /* max_value: "param" UNSIGNED */ +#line 983 "parser.y" { - #line 7911 "format.w" + #line 8116 "format.w" hset_max(param_kind,(yyvsp[0].u));} -#line 3551 "parser.c" +#line 3636 "parser.c" break; - case 218: /* max_value: "stream (definition)" UNSIGNED */ -#line 954 "parser.y" + case 229: /* max_value: "stream (definition)" UNSIGNED */ +#line 986 "parser.y" { - #line 7912 "format.w" + #line 8117 "format.w" hset_max(stream_kind,(yyvsp[0].u));} -#line 3559 "parser.c" +#line 3644 "parser.c" break; - case 219: /* max_value: "page" UNSIGNED */ -#line 957 "parser.y" + case 230: /* max_value: "page" UNSIGNED */ +#line 989 "parser.y" { - #line 7913 "format.w" + #line 8118 "format.w" hset_max(page_kind,(yyvsp[0].u));} -#line 3567 "parser.c" +#line 3652 "parser.c" break; - case 220: /* max_value: "range" UNSIGNED */ -#line 960 "parser.y" + case 231: /* max_value: "range" UNSIGNED */ +#line 992 "parser.y" { - #line 7914 "format.w" + #line 8119 "format.w" hset_max(range_kind,(yyvsp[0].u));} -#line 3575 "parser.c" +#line 3660 "parser.c" break; - case 221: /* max_value: "label" UNSIGNED */ -#line 963 "parser.y" + case 232: /* max_value: "label" UNSIGNED */ +#line 995 "parser.y" { - #line 7915 "format.w" + #line 8120 "format.w" hset_max(label_kind,(yyvsp[0].u));} -#line 3583 "parser.c" +#line 3668 "parser.c" break; - case 222: /* def_node: start "font" ref font ">" */ -#line 969 "parser.y" + case 233: /* def_node: start "font" ref font ">" */ +#line 1001 "parser.y" { - #line 8112 "format.w" + #line 8320 "format.w" DEF((yyval.rf),font_kind,(yyvsp[-2].u));hput_tags((yyvsp[-4].u),(yyvsp[-1].info));} -#line 3591 "parser.c" +#line 3676 "parser.c" break; - case 223: /* def_node: start "int" ref integer ">" */ -#line 972 "parser.y" + case 234: /* def_node: start "int" ref integer ">" */ +#line 1004 "parser.y" { - #line 8113 "format.w" + #line 8321 "format.w" DEF((yyval.rf),int_kind,(yyvsp[-2].u));hput_tags((yyvsp[-4].u),hput_int((yyvsp[-1].i)));} -#line 3599 "parser.c" +#line 3684 "parser.c" break; - case 224: /* def_node: start "dimen" ref dimension ">" */ -#line 975 "parser.y" + case 235: /* def_node: start "dimen" ref dimension ">" */ +#line 1007 "parser.y" { - #line 8114 "format.w" + #line 8322 "format.w" DEF((yyval.rf),dimen_kind,(yyvsp[-2].u));hput_tags((yyvsp[-4].u),hput_dimen((yyvsp[-1].d)));} -#line 3607 "parser.c" +#line 3692 "parser.c" break; - case 225: /* def_node: start "language" ref string ">" */ -#line 978 "parser.y" + case 236: /* def_node: start "language" ref string ">" */ +#line 1010 "parser.y" { - #line 8115 "format.w" + #line 8323 "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 3615 "parser.c" +#line 3700 "parser.c" break; - case 226: /* def_node: start "glue" ref glue ">" */ -#line 981 "parser.y" + case 237: /* def_node: start "glue" ref glue ">" */ +#line 1013 "parser.y" { - #line 8116 "format.w" + #line 8324 "format.w" DEF((yyval.rf),glue_kind,(yyvsp[-2].u));hput_tags((yyvsp[-4].u),hput_glue(&((yyvsp[-1].g))));} -#line 3623 "parser.c" +#line 3708 "parser.c" break; - case 227: /* def_node: start "xdimen" ref xdimen ">" */ -#line 984 "parser.y" + case 238: /* def_node: start "xdimen" ref xdimen ">" */ +#line 1016 "parser.y" { - #line 8117 "format.w" + #line 8325 "format.w" DEF((yyval.rf),xdimen_kind,(yyvsp[-2].u));hput_tags((yyvsp[-4].u),hput_xdimen(&((yyvsp[-1].xd))));} -#line 3631 "parser.c" +#line 3716 "parser.c" break; - case 228: /* def_node: start "rule" ref rule ">" */ -#line 987 "parser.y" + case 239: /* def_node: start "rule" ref rule ">" */ +#line 1019 "parser.y" { - #line 8118 "format.w" + #line 8326 "format.w" DEF((yyval.rf),rule_kind,(yyvsp[-2].u));hput_tags((yyvsp[-4].u),hput_rule(&((yyvsp[-1].r))));} -#line 3639 "parser.c" +#line 3724 "parser.c" break; - case 229: /* def_node: start "leaders" ref leaders ">" */ -#line 990 "parser.y" + case 240: /* def_node: start "leaders" ref leaders ">" */ +#line 1022 "parser.y" { - #line 8119 "format.w" + #line 8327 "format.w" DEF((yyval.rf),leaders_kind,(yyvsp[-2].u));hput_tags((yyvsp[-4].u),TAG(leaders_kind,(yyvsp[-1].info)));} -#line 3647 "parser.c" +#line 3732 "parser.c" break; - case 230: /* def_node: start "baseline" ref baseline ">" */ -#line 993 "parser.y" + case 241: /* def_node: start "baseline" ref baseline ">" */ +#line 1025 "parser.y" { - #line 8120 "format.w" + #line 8328 "format.w" DEF((yyval.rf),baseline_kind,(yyvsp[-2].u));hput_tags((yyvsp[-4].u),TAG(baseline_kind,(yyvsp[-1].info)));} -#line 3655 "parser.c" +#line 3740 "parser.c" break; - case 231: /* def_node: start "ligature" ref ligature ">" */ -#line 996 "parser.y" + case 242: /* def_node: start "ligature" ref ligature ">" */ +#line 1028 "parser.y" { - #line 8121 "format.w" + #line 8329 "format.w" DEF((yyval.rf),ligature_kind,(yyvsp[-2].u));hput_tags((yyvsp[-4].u),hput_ligature(&((yyvsp[-1].lg))));} -#line 3663 "parser.c" +#line 3748 "parser.c" break; - case 232: /* def_node: start "disc" ref disc ">" */ -#line 999 "parser.y" + case 243: /* def_node: start "disc" ref disc ">" */ +#line 1031 "parser.y" { - #line 8122 "format.w" + #line 8330 "format.w" DEF((yyval.rf),disc_kind,(yyvsp[-2].u));hput_tags((yyvsp[-4].u),hput_disc(&((yyvsp[-1].dc))));} -#line 3671 "parser.c" +#line 3756 "parser.c" break; - case 233: /* def_node: start "image" ref image ">" */ -#line 1002 "parser.y" + case 244: /* def_node: start "image" ref image ">" */ +#line 1034 "parser.y" { - #line 8123 "format.w" + #line 8331 "format.w" DEF((yyval.rf),image_kind,(yyvsp[-2].u));hput_tags((yyvsp[-4].u),TAG(image_kind,(yyvsp[-1].info)));} -#line 3679 "parser.c" +#line 3764 "parser.c" break; - case 234: /* def_node: start "param" ref parameters ">" */ -#line 1005 "parser.y" + case 245: /* def_node: start "param" ref parameters ">" */ +#line 1037 "parser.y" { - #line 8124 "format.w" + #line 8332 "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 3687 "parser.c" +#line 3772 "parser.c" break; - case 235: /* def_node: start "page" ref page ">" */ -#line 1008 "parser.y" + case 246: /* def_node: start "page" ref page ">" */ +#line 1040 "parser.y" { - #line 8125 "format.w" + #line 8333 "format.w" DEF((yyval.rf),page_kind,(yyvsp[-2].u));hput_tags((yyvsp[-4].u),TAG(page_kind,0));} -#line 3695 "parser.c" +#line 3780 "parser.c" break; - case 236: /* def_node: start "int" ref ref ">" */ -#line 1013 "parser.y" + case 247: /* def_node: start "int" ref ref ">" */ +#line 1045 "parser.y" { - #line 8144 "format.w" + #line 8352 "format.w" DEF_REF((yyval.rf),int_kind,(yyvsp[-2].u),(yyvsp[-1].u));hput_tags((yyvsp[-4].u),TAG(int_kind,0));} -#line 3703 "parser.c" +#line 3788 "parser.c" break; - case 237: /* def_node: start "dimen" ref ref ">" */ -#line 1016 "parser.y" + case 248: /* def_node: start "dimen" ref ref ">" */ +#line 1048 "parser.y" { - #line 8145 "format.w" + #line 8353 "format.w" DEF_REF((yyval.rf),dimen_kind,(yyvsp[-2].u),(yyvsp[-1].u));hput_tags((yyvsp[-4].u),TAG(dimen_kind,0));} -#line 3711 "parser.c" +#line 3796 "parser.c" break; - case 238: /* def_node: start "glue" ref ref ">" */ -#line 1019 "parser.y" + case 249: /* def_node: start "glue" ref ref ">" */ +#line 1051 "parser.y" { - #line 8146 "format.w" + #line 8354 "format.w" DEF_REF((yyval.rf),glue_kind,(yyvsp[-2].u),(yyvsp[-1].u));hput_tags((yyvsp[-4].u),TAG(glue_kind,0));} -#line 3719 "parser.c" +#line 3804 "parser.c" break; - case 240: /* def_list: def_list def_node */ -#line 1024 "parser.y" + case 251: /* def_list: def_list def_node */ +#line 1056 "parser.y" { - #line 8260 "format.w" + #line 8470 "format.w" check_param_def(&((yyvsp[0].rf)));} -#line 3727 "parser.c" +#line 3812 "parser.c" break; - case 241: /* parameters: estimate def_list */ -#line 1027 "parser.y" + case 252: /* parameters: estimate def_list */ +#line 1059 "parser.y" { - #line 8261 "format.w" - (yyval.l).p= (yyvsp[0].u);(yyval.l).k= param_kind;(yyval.l).s= (hpos-hstart)-(yyvsp[0].u);} -#line 3735 "parser.c" + #line 8471 "format.w" + (yyval.l).p= (yyvsp[0].u);(yyval.l).t= TAG(param_kind,b001);(yyval.l).s= (hpos-hstart)-(yyvsp[0].u);} +#line 3820 "parser.c" break; - case 242: /* empty_param_list: position */ -#line 1031 "parser.y" - { - #line 8282 "format.w" - HPUTX(2);hpos++;hput_tags((yyvsp[0].u),TAG(param_kind,1));} -#line 3743 "parser.c" - break; - - case 243: /* $@12: %empty */ -#line 1034 "parser.y" - { - #line 8283 "format.w" - hpos= hpos-2;} -#line 3751 "parser.c" + case 253: /* named_param_list: start "param" parameters ">" */ +#line 1064 "parser.y" +{ + #line 8484 "format.w" + hput_tags((yyvsp[-3].u),hput_list((yyvsp[-3].u)+1,&((yyvsp[-1].l))));} +#line 3828 "parser.c" break; - case 244: /* non_empty_param_list: start "param" $@12 parameters ">" */ -#line 1037 "parser.y" + case 255: /* param_list: start parameters ">" */ +#line 1068 "parser.y" { - #line 8284 "format.w" - hput_tags((yyvsp[-4].u)-2,hput_list((yyvsp[-4].u)-1,&((yyvsp[-1].l))));} -#line 3759 "parser.c" + #line 8486 "format.w" + hput_tags((yyvsp[-2].u),hput_list((yyvsp[-2].u)+1,&((yyvsp[-1].l))));} +#line 3836 "parser.c" break; - case 246: /* font_head: string dimension UNSIGNED UNSIGNED */ -#line 1045 "parser.y" + case 257: /* font_head: string dimension UNSIGNED UNSIGNED */ +#line 1076 "parser.y" { - #line 8426 "format.w" + #line 8632 "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 3767 "parser.c" +#line 3844 "parser.c" break; - case 249: /* font_param: start "penalty" fref penalty ">" */ -#line 1052 "parser.y" + case 260: /* font_param: start "penalty" fref penalty ">" */ +#line 1083 "parser.y" { - #line 8431 "format.w" + #line 8637 "format.w" hput_tags((yyvsp[-4].u),hput_int((yyvsp[-1].i)));} -#line 3775 "parser.c" +#line 3852 "parser.c" break; - case 250: /* font_param: start "kern" fref kern ">" */ -#line 1055 "parser.y" + case 261: /* font_param: start "kern" fref kern ">" */ +#line 1086 "parser.y" { - #line 8432 "format.w" + #line 8638 "format.w" hput_tags((yyvsp[-4].u),hput_kern(&((yyvsp[-1].kt))));} -#line 3783 "parser.c" +#line 3860 "parser.c" break; - case 251: /* font_param: start "ligature" fref ligature ">" */ -#line 1058 "parser.y" + case 262: /* font_param: start "ligature" fref ligature ">" */ +#line 1089 "parser.y" { - #line 8433 "format.w" + #line 8639 "format.w" hput_tags((yyvsp[-4].u),hput_ligature(&((yyvsp[-1].lg))));} -#line 3791 "parser.c" +#line 3868 "parser.c" break; - case 252: /* font_param: start "disc" fref disc ">" */ -#line 1061 "parser.y" + case 263: /* font_param: start "disc" fref disc ">" */ +#line 1092 "parser.y" { - #line 8434 "format.w" + #line 8640 "format.w" hput_tags((yyvsp[-4].u),hput_disc(&((yyvsp[-1].dc))));} -#line 3799 "parser.c" +#line 3876 "parser.c" break; - case 253: /* font_param: start "glue" fref glue ">" */ -#line 1064 "parser.y" + case 264: /* font_param: start "glue" fref glue ">" */ +#line 1095 "parser.y" { - #line 8435 "format.w" + #line 8641 "format.w" hput_tags((yyvsp[-4].u),hput_glue(&((yyvsp[-1].g))));} -#line 3807 "parser.c" +#line 3884 "parser.c" break; - case 254: /* font_param: start "language" fref string ">" */ -#line 1067 "parser.y" + case 265: /* font_param: start "language" fref string ">" */ +#line 1098 "parser.y" { - #line 8436 "format.w" + #line 8642 "format.w" hput_string((yyvsp[-1].s));hput_tags((yyvsp[-4].u),TAG(language_kind,0));} -#line 3815 "parser.c" +#line 3892 "parser.c" break; - case 255: /* font_param: start "rule" fref rule ">" */ -#line 1070 "parser.y" + case 266: /* font_param: start "rule" fref rule ">" */ +#line 1101 "parser.y" { - #line 8437 "format.w" + #line 8643 "format.w" hput_tags((yyvsp[-4].u),hput_rule(&((yyvsp[-1].r))));} -#line 3823 "parser.c" +#line 3900 "parser.c" break; - case 256: /* font_param: start "image" fref image ">" */ -#line 1073 "parser.y" + case 267: /* font_param: start "image" fref image ">" */ +#line 1104 "parser.y" { - #line 8438 "format.w" + #line 8644 "format.w" hput_tags((yyvsp[-4].u),TAG(image_kind,(yyvsp[-1].info)));} -#line 3831 "parser.c" +#line 3908 "parser.c" break; - case 257: /* fref: ref */ -#line 1077 "parser.y" + case 268: /* fref: ref */ +#line 1108 "parser.y" { - #line 8440 "format.w" + #line 8646 "format.w" RNG("Font parameter",(yyvsp[0].u),0,MAX_FONT_PARAMS);} -#line 3839 "parser.c" +#line 3916 "parser.c" break; - case 258: /* xdimen_ref: ref */ -#line 1081 "parser.y" + case 269: /* xdimen_ref: ref */ +#line 1112 "parser.y" { - #line 8513 "format.w" + #line 8723 "format.w" REF(xdimen_kind,(yyvsp[0].u));} -#line 3847 "parser.c" +#line 3924 "parser.c" break; - case 259: /* param_ref: ref */ -#line 1084 "parser.y" + case 270: /* param_ref: ref */ +#line 1115 "parser.y" { - #line 8514 "format.w" + #line 8724 "format.w" REF(param_kind,(yyvsp[0].u));} -#line 3855 "parser.c" +#line 3932 "parser.c" break; - case 260: /* stream_ref: ref */ -#line 1087 "parser.y" + case 271: /* stream_ref: ref */ +#line 1118 "parser.y" { - #line 8515 "format.w" + #line 8725 "format.w" REF_RNG(stream_kind,(yyvsp[0].u));} -#line 3863 "parser.c" +#line 3940 "parser.c" break; - case 261: /* content_node: start "penalty" ref ">" */ -#line 1093 "parser.y" + case 272: /* content_node: start "penalty" ref ">" */ +#line 1124 "parser.y" { - #line 8519 "format.w" + #line 8729 "format.w" REF(penalty_kind,(yyvsp[-1].u));hput_tags((yyvsp[-3].u),TAG(penalty_kind,0));} -#line 3871 "parser.c" +#line 3948 "parser.c" break; - case 262: /* content_node: start "kern" explicit ref ">" */ -#line 1097 "parser.y" + case 273: /* content_node: start "kern" explicit ref ">" */ +#line 1128 "parser.y" { - #line 8521 "format.w" + #line 8731 "format.w" REF(dimen_kind,(yyvsp[-1].u));hput_tags((yyvsp[-4].u),TAG(kern_kind,((yyvsp[-2].b))?b100:b000));} -#line 3879 "parser.c" +#line 3956 "parser.c" break; - case 263: /* content_node: start "kern" explicit "xdimen" ref ">" */ -#line 1101 "parser.y" + case 274: /* content_node: start "kern" explicit "xdimen" ref ">" */ +#line 1132 "parser.y" { - #line 8523 "format.w" + #line 8733 "format.w" REF(xdimen_kind,(yyvsp[-1].u));hput_tags((yyvsp[-5].u),TAG(kern_kind,((yyvsp[-3].b))?b101:b001));} -#line 3887 "parser.c" +#line 3964 "parser.c" break; - case 264: /* content_node: start "glue" ref ">" */ -#line 1104 "parser.y" + case 275: /* content_node: start "glue" ref ">" */ +#line 1135 "parser.y" { - #line 8524 "format.w" + #line 8734 "format.w" REF(glue_kind,(yyvsp[-1].u));hput_tags((yyvsp[-3].u),TAG(glue_kind,0));} -#line 3895 "parser.c" +#line 3972 "parser.c" break; - case 265: /* content_node: start "ligature" ref ">" */ -#line 1107 "parser.y" + case 276: /* content_node: start "ligature" ref ">" */ +#line 1138 "parser.y" { - #line 8525 "format.w" + #line 8735 "format.w" REF(ligature_kind,(yyvsp[-1].u));hput_tags((yyvsp[-3].u),TAG(ligature_kind,0));} -#line 3903 "parser.c" +#line 3980 "parser.c" break; - case 266: /* content_node: start "disc" ref ">" */ -#line 1110 "parser.y" + case 277: /* content_node: start "disc" ref ">" */ +#line 1141 "parser.y" { - #line 8526 "format.w" + #line 8736 "format.w" REF(disc_kind,(yyvsp[-1].u));hput_tags((yyvsp[-3].u),TAG(disc_kind,0));} -#line 3911 "parser.c" +#line 3988 "parser.c" break; - case 267: /* content_node: start "rule" ref ">" */ -#line 1113 "parser.y" + case 278: /* content_node: start "rule" ref ">" */ +#line 1144 "parser.y" { - #line 8527 "format.w" + #line 8737 "format.w" REF(rule_kind,(yyvsp[-1].u));hput_tags((yyvsp[-3].u),TAG(rule_kind,0));} -#line 3919 "parser.c" +#line 3996 "parser.c" break; - case 268: /* content_node: start "image" ref ">" */ -#line 1116 "parser.y" + case 279: /* content_node: start "image" ref ">" */ +#line 1147 "parser.y" { - #line 8528 "format.w" + #line 8738 "format.w" REF(image_kind,(yyvsp[-1].u));hput_tags((yyvsp[-3].u),TAG(image_kind,0));} -#line 3927 "parser.c" +#line 4004 "parser.c" break; - case 269: /* content_node: start "leaders" ref ">" */ -#line 1119 "parser.y" + case 280: /* content_node: start "leaders" ref ">" */ +#line 1150 "parser.y" { - #line 8529 "format.w" + #line 8739 "format.w" REF(leaders_kind,(yyvsp[-1].u));hput_tags((yyvsp[-3].u),TAG(leaders_kind,0));} -#line 3935 "parser.c" +#line 4012 "parser.c" break; - case 270: /* content_node: start "baseline" ref ">" */ -#line 1122 "parser.y" + case 281: /* content_node: start "baseline" ref ">" */ +#line 1153 "parser.y" { - #line 8530 "format.w" + #line 8740 "format.w" REF(baseline_kind,(yyvsp[-1].u));hput_tags((yyvsp[-3].u),TAG(baseline_kind,0));} -#line 3943 "parser.c" +#line 4020 "parser.c" break; - case 271: /* content_node: start "language" REFERENCE ">" */ -#line 1125 "parser.y" + case 282: /* content_node: start "language" REFERENCE ">" */ +#line 1156 "parser.y" { - #line 8531 "format.w" + #line 8741 "format.w" REF(language_kind,(yyvsp[-1].u));hput_tags((yyvsp[-3].u),hput_language((yyvsp[-1].u)));} -#line 3951 "parser.c" +#line 4028 "parser.c" break; - case 272: /* glue_node: start "glue" ref ">" */ -#line 1129 "parser.y" + case 283: /* glue_node: start "glue" ref ">" */ +#line 1160 "parser.y" { - #line 8533 "format.w" + #line 8743 "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;}} -#line 3961 "parser.c" +#line 4038 "parser.c" break; - case 273: /* $@13: %empty */ -#line 1136 "parser.y" + case 284: /* $@13: %empty */ +#line 1167 "parser.y" { - #line 8964 "format.w" + #line 9190 "format.w" hput_content_start();} -#line 3969 "parser.c" +#line 4046 "parser.c" break; - case 274: /* content_section: "<" "content" $@13 content_list ">" */ -#line 1139 "parser.y" + case 285: /* content_section: "<" "content" $@13 content_list ">" */ +#line 1170 "parser.y" { - #line 8965 "format.w" + #line 9191 "format.w" hput_content_end();hput_range_defs();hput_label_defs();} -#line 3977 "parser.c" +#line 4054 "parser.c" break; -#line 3981 "parser.c" +#line 4058 "parser.c" default: break; } @@ -4201,6 +4278,6 @@ yyreturnlab: return yyresult; } -#line 1143 "parser.y" +#line 1174 "parser.y" - /*:520*/ + /*:534*/ diff --git a/Build/source/texk/web2c/hitexdir/hiparser.h b/Build/source/texk/web2c/hitexdir/hiparser.h index 145751dbb6e..79c52a85c6a 100644 --- a/Build/source/texk/web2c/hitexdir/hiparser.h +++ b/Build/source/texk/web2c/hitexdir/hiparser.h @@ -124,21 +124,22 @@ extern int yydebug; MID = 325, /* "mid" */ LINK = 326, /* "link" */ OUTLINE = 327, /* "outline" */ - STREAM = 328, /* "stream" */ - STREAMDEF = 329, /* "stream (definition)" */ - FIRST = 330, /* "first" */ - LAST = 331, /* "last" */ - TOP = 332, /* "top" */ - NOREFERENCE = 333, /* "*" */ - PAGE = 334, /* "page" */ - RANGE = 335, /* "range" */ - DIRECTORY = 336, /* "directory" */ - SECTION = 337, /* "entry" */ - DEFINITIONS = 338, /* "definitions" */ - MAX = 339, /* "max" */ - PARAM = 340, /* "param" */ - FONT = 341, /* "font" */ - CONTENT = 342 /* "content" */ + UNKNOWN = 328, /* "unknown" */ + STREAM = 329, /* "stream" */ + STREAMDEF = 330, /* "stream (definition)" */ + FIRST = 331, /* "first" */ + LAST = 332, /* "last" */ + TOP = 333, /* "top" */ + NOREFERENCE = 334, /* "*" */ + PAGE = 335, /* "page" */ + RANGE = 336, /* "range" */ + DIRECTORY = 337, /* "directory" */ + SECTION = 338, /* "entry" */ + DEFINITIONS = 339, /* "definitions" */ + MAX = 340, /* "max" */ + PARAM = 341, /* "param" */ + FONT = 342, /* "font" */ + CONTENT = 343 /* "content" */ }; typedef enum yytokentype yytoken_kind_t; #endif @@ -149,7 +150,7 @@ union YYSTYPE { #line 79 "parser.y" - #line 10805 "format.w" + #line 11106 "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; @@ -157,7 +158,7 @@ union YYSTYPE Ref rf;Info info;Order o;bool b; -#line 161 "hiparser.h" +#line 162 "hiparser.h" }; typedef union YYSTYPE YYSTYPE; diff --git a/Build/source/texk/web2c/hitexdir/hitex.w b/Build/source/texk/web2c/hitexdir/hitex.w index b020140b51f..e1f034e3465 100644 --- a/Build/source/texk/web2c/hitexdir/hitex.w +++ b/Build/source/texk/web2c/hitexdir/hitex.w @@ -21795,9 +21795,19 @@ the \.{\\vtop} height is zero. @<Readjust the height...@>= -{@+h=0;p=list_ptr(cur_box); -if (p!=null) if (type(p) <= rule_node) h=height(p); -depth(cur_box)=depth(cur_box)-h+height(cur_box);height(cur_box)=h; +{@+if (type(cur_box)==vlist_node) + {@+h=0;p=list_ptr(cur_box); + if (p!=null && type(p) <= rule_node) h=height(p); + depth(cur_box)=depth(cur_box)-h+height(cur_box);height(cur_box)=h; + } + else if (type(cur_box) == whatsit_node) + { if (subtype(cur_box)==vpack_node) + pack_limit(cur_box)^=MAX_DIMEN+1; + else if(subtype(cur_box)==vset_node) + { height(cur_box)=height(cur_box)+depth(cur_box); + depth(cur_box)^=MAX_DIMEN+1; + } + } } @ A paragraph begins when horizontal-mode material occurs in vertical mode, @@ -30938,7 +30948,7 @@ static void new_outline(pointer p) List l; uint32_t pos; pos=hpos-hstart; - l.k=list_kind; /* this eventually should be |text_kind| */ + l.t=TAG(list_kind,b001); /* this eventually should be a text */ hout_list_node(outline_ptr(p),pos,&l); hset_outline(m,r,outline_depth(p),pos); DBG(DBGLABEL,"New outline for label *%d\n",r); @@ -31179,8 +31189,8 @@ For example \LaTeX\ redefines \.{\\protect} to be \.{\\noexpand}. As a consequence we have to implement a simplified version of \TeX's usual process to fire up the output routine. -The |collect_output| routine takes a node list |p|, -removes the output nodes and appends them to |q|, with |q| +The |collect_output| routine takes a node list |*p|, +removes the output nodes and appends them to |*q|, with |q| always pointing to the tail pointer. @<Hi\TeX\ auxiliary routines@>= @@ -31199,7 +31209,16 @@ discretionary breaks. if (!is_char_node(*p)) { pointer r=*p; switch (type(r)) - { case whatsit_node: + { +#if 0 + case glue_node: /* possibly the output routine might like these */ + case penalty_node: + { *p=link(r); link(r)=null; *q=r; q=&(link(r)); + if (*p==null) return q; + } + break; +#endif + case whatsit_node: switch (subtype(r)) { case open_node: case write_node: case close_node: { *p=link(r); link(r)=null; *q=r; q=&(link(r)); @@ -31239,7 +31258,7 @@ if (!is_char_node(*p)) @ @<Fire up the output routine for |q|@>= { pointer r=new_null_box();type(r)=vlist_node; subtype(r)=0;shift_amount(r)=0;height(r)=hvsize; - if (t==NULL) list_ptr(r)=null; + if (t==NULL) list_ptr(r)=null; /* or |new_glue(fill_glue);| ? */ else { list_ptr(r)=q; *t=new_glue(fill_glue); } flush_node_list(box(255)); /* just in case \dots */ box(255)=r; @@ -32743,6 +32762,7 @@ ensure_font_no(post_break(p)); DBG(DBGDEF,"Maximum disc reference: %d\n",max_ref[disc_kind]); for (i=0;i<=max_ref[disc_kind]; i++) HPUTDEF(hout_disc(dc_defined[i]),i); + @*1 Parameter Lists. We store predefined parameter lists in a hash table in order to speed up finding existing parameter lists. The parameter list itself is stored as @@ -32759,7 +32779,8 @@ static struct {int l; /* link */ uint32_t n; /* number */ uint32_t s; /* size */ uint8_t *p; /* pointer */} pl_defined[PLH_SIZE]={{0}}; -static int pl_head=-1, *pl_tail=&pl_head; +static int pl_head=0, *pl_tail=&pl_head; + @ Next we define three short auxiliary routines and the |hget_param_list_no| function. @<Hi\TeX\ routines@>= @@ -32769,7 +32790,7 @@ static uint32_t hparam_list_hash(List *l) uint32_t i; for (i=0;i<l->s;i++) h=3*h+hstart[l->p+i]; - return i; + return h; } static bool pl_equal(List *l, uint8_t *p) @@ -32788,7 +32809,7 @@ static void pl_copy(List *l, uint8_t *p) static int hget_param_list_no(List *l) { uint32_t h; int i; - if (l->s<=0) return -1; + if (l->s<=0) return 0; h= hparam_list_hash(l); i = h%PLH_SIZE; while (pl_defined[i].p!=NULL) @@ -32800,7 +32821,7 @@ static int hget_param_list_no(List *l) if (max_ref[param_kind]>=0xFF || section_no!=2) return -1; pl_defined[i].n=++max_ref[param_kind]; *pl_tail=i; pl_tail=&(pl_defined[i].l); - pl_defined[i].l=-1; + pl_defined[i].l=0; pl_defined[i].h=h; pl_defined[i].s=l->s; ALLOCATE(pl_defined[i].p,l->s,uint8_t); @@ -32830,21 +32851,22 @@ static void hdef_param_node(int ptype, int pnumber,int pvalue) parameter lists sorted by their reference number. @<Output parameter list definitions@>= - DBG(DBGDEF,"Defining %d parameter lists\n",max_ref[param_kind]+1); - for (i=pl_head;i>=0;i=pl_defined[i].l) - { int j; + DBG(DBGDEF,"Defining %d parameter lists\n",max_ref[param_kind]); + for (i=pl_head;i>0;i=pl_defined[i].l) + { int j,k; DBG(DBGDEF,"Defining parameter list %d, size 0x%x\n",i,pl_defined[i].s); j=hsize_bytes(pl_defined[i].s); HPUTX(1+1+j+1+pl_defined[i].s+1+j+1); - HPUTTAG(param_kind,j+1); + if (j==4) k=3; else k=j; + HPUTTAG(param_kind,k); HPUT8(pl_defined[i].n); hput_list_size(pl_defined[i].s,j); - HPUT8(0x100-j); + HPUT8(0x100-k); memcpy(hpos,pl_defined[i].p,pl_defined[i].s); hpos=hpos+pl_defined[i].s; - HPUT8(0x100-j); + HPUT8(0x100-k); hput_list_size(pl_defined[i].s,j); - HPUTTAG(param_kind,j+1); + HPUTTAG(param_kind,k); } @*1 Fonts. To store a font definition, we define the data type |Font| @@ -33414,14 +33436,14 @@ static uint8_t hout_disc(pointer p) else { uint32_t lpos; lpos=hpos-hstart; - h.p.k=list_kind; + h.p.t=TAG(list_kind,b001); hout_list_node(pre_break(p),lpos,&(h.p)); if (post_break(p)==null) h.q.s=0; else { uint32_t lpos; lpos=hpos-hstart; - h.q.k=list_kind; + h.q.t=TAG(list_kind,b001); hout_list_node(post_break(p),lpos,&(h.q)); } } @@ -33520,7 +33542,7 @@ signal ``use the defaults''. new_param_node(dimen_type,split_max_depth_code,depth(p)); new_param_node(glue_type,split_top_skip_code,split_top_ptr(p)); pos=hpos-hstart; - l.k=param_kind; + l.t=TAG(param_kind,b001); n=hout_param_list(link(temp_head),pos,&l); flush_node_list(link(temp_head));@+ link(temp_head)=null; if (n>=0) HPUT8(n); else i=b010; @@ -33585,7 +33607,7 @@ case par_node: else { xpos=hpos-hstart; hout_xdimen_node(p); xsize=(hpos-hstart)-xpos; i|=b100; } pos=hpos-hstart; - l.k=param_kind; + l.t=TAG(param_kind,b001); m=hout_param_list(par_params(p),pos,&l); if (m>=0) { if (i&b100) @@ -33622,7 +33644,7 @@ case par_node: int n; Info i=b000; pos=hpos-hstart; - l.k=param_kind; + l.t=TAG(param_kind,b001); n=hout_param_list(display_params(p),pos,&l); if (n>=0) HPUT8(n); else i|=b100; if (display_eqno(p)!=null && display_left(p)) @@ -33732,7 +33754,7 @@ static void hout_item_list(pointer p, bool v) { List l; uint32_t pos; DBG(DBGBASIC,"Writing Item List\n"); - l.k=list_kind; + l.t=TAG(list_kind,b001); HPUTTAG(item_kind,b000); pos=hpos-hstart; HPUTX(2); @@ -33757,7 +33779,7 @@ static void hout_align_list(pointer p, bool v) { List l; uint32_t pos; DBG(DBGBASIC,"Writing Align List\n"); - l.k=list_kind; + l.t=TAG(list_kind,b001); pos=hpos-hstart; HPUTX(2); HPUT8(0); /* space for the tag */ @@ -33825,7 +33847,7 @@ static void hout_list_node2(pointer p) { List l; uint32_t pos; pos=hpos-hstart; - l.k=list_kind; + l.t=TAG(list_kind,b001); hout_list_node(p,pos,&l); } @ @<Hi\TeX\ function declarations@>= @@ -33838,15 +33860,14 @@ The next function is like |hout_list_node| but restricted to parameter nodes. The parameter |p| is a pointer to a param node list. The function either finds a reference number to a predefined parameter list and returns the reference number, - or it outputs the node list at position pos (that's where the tag goes), - sets |l->k|, |l->p| and |l->s|, and returns $-1$. +or it outputs the node list at position pos (that's where the tag goes), + sets |l->t|, |l->p| and |l->s|, and returns $-1$. @<Hi\TeX\ routines@>= static int hout_param_list(pointer p, uint32_t pos, List *l) { int n; hpos=hstart+pos; - if (p==null) - {HPUTX(2); hpos++;hput_tags(pos,TAG(param_kind,1)); l->s=0; return -1;} + if (p==null) return 0; HPUTX(3); HPUT8(0); /* space for the tag */ HPUT8(0); /* space for the list size */ @@ -34046,7 +34067,7 @@ static void hprint_text(pointer p) \item Tables where the width of a column depends on \.{\\hsize} or \.{\\vsize} are not tested and probably not yet supported. -\item \.{\\vtop} and \.{\\vcenter} will not work if any dimension of the +\item \.{\\vcenter} will not work if any dimension of the vertical list depends on \.{\\hsize} or \.{\\vsize}. \item The encoding of horizontal lists as texts is not yet supported, |