diff options
Diffstat (limited to 'Build/source/texk/web2c/hitexdir/hintview/src/hint.c')
-rw-r--r-- | Build/source/texk/web2c/hitexdir/hintview/src/hint.c | 671 |
1 files changed, 329 insertions, 342 deletions
diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/hint.c b/Build/source/texk/web2c/hitexdir/hintview/src/hint.c index 33f3de2b29a..5d71ec97bb2 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 @@ /*372:*/ -#line 7522 "hint.w" +#line 7524 "hint.w" #include "basetypes.h" #include <string.h> @@ -13,13 +13,13 @@ #include "hint.h" /*82:*/ -#line 1279 "hint.w" +#line 1283 "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 1291 "hint.w" +#line 1295 "hint.w" #define HGET_XDIMEN(I,X) \ { if((I)&b100) HGET32((X).w); else (X).w= 0;\ @@ -27,11 +27,11 @@ if((I)&b001) (X).v= hget_float32(); else (X).v= 0.0;\ } /*:83*//*87:*/ -#line 1394 "hint.w" +#line 1398 "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 1405 "hint.w" +#line 1409 "hint.w" #define HGET_GLYPH(I) \ {uint8_t f; uint32_t c;\ @@ -43,7 +43,7 @@ tail_append(new_character(f,c));\ } /*:89*//*97:*/ -#line 1487 "hint.w" +#line 1491 "hint.w" #define HGET_RULE(I)\ pointer p= new_rule();\ @@ -51,7 +51,7 @@ 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 1549 "hint.w" +#line 1553 "hint.w" #define HGET_GLUE(I) \ p= get_node(glue_spec_size); \ @@ -60,12 +60,12 @@ if ((I)&b001) HGET32(width(p)); else width(p)= null_flag; 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 1669 "hint.w" +#line 1673 "hint.w" #define IS_LIST(X) (KIND(X)==list_kind || \ KIND(X)==text_kind || KIND(X)==param_kind) /*:110*//*115:*/ -#line 1826 "hint.w" +#line 1830 "hint.w" #define HGET_BOX(I) \ p= new_null_box();\ @@ -78,7 +78,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 1950 "hint.w" +#line 1954 "hint.w" #define HGET_SET(I) \ scaled x, st, sh; uint8_t sto, sho; \ @@ -89,7 +89,7 @@ list_ptr(p)= hget_list_pointer(); if ((I)&b100) x= hget_xdimen_node(); else x= hget_xdimen_ref(HGET8);\ list_ptr(p)= hget_list_pointer(); /*:122*//*128:*/ -#line 2093 "hint.w" +#line 2097 "hint.w" #define HGET_PACK(K,I) \ { pointer p; scaled x, s= 0, d; uint8_t m; \ @@ -102,7 +102,7 @@ list_ptr(p)= hget_list_pointer(); shift_amount(p)= s;\ happend_to_vlist(p);} /*:128*//*132:*/ -#line 2160 "hint.w" +#line 2164 "hint.w" #define HGET_KERN(I) \ pointer p; scaled x; \ @@ -114,7 +114,7 @@ p= new_kern(x);\ if ((I)&b100) subtype(p)= explicit;\ tail_append(p); /*:132*//*136:*/ -#line 2211 "hint.w" +#line 2215 "hint.w" #define HGET_LEADERS(I) \ {pointer p;\ @@ -125,7 +125,7 @@ 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 2257 "hint.w" +#line 2261 "hint.w" #define HGET_BASELINE(I) \ cur_list.bs_pos= hpos-1; \ @@ -133,7 +133,7 @@ tail_append(p);} 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 2311 "hint.w" +#line 2315 "hint.w" #define HGET_LIG(I) \ {pointer p,q;uint8_t f;\ @@ -144,7 +144,7 @@ p= new_ligature(f, character(q), link(q)); tail_append(p);\ link(q)= null; flush_node_list(q);\ } /*:145*//*149:*/ -#line 2363 "hint.w" +#line 2367 "hint.w" #define HGET_DISC(I)\ pointer p= new_disc(); \ @@ -154,7 +154,7 @@ link(q)= null; flush_node_list(q);\ if ((I)&b010) pre_break(p)= hget_list_pointer(); \ if ((I)&b001) post_break(p)= hget_list_pointer(); /*:149*//*155:*/ -#line 2436 "hint.w" +#line 2440 "hint.w" #define HGET_PAR(I) \ { scaled x= 0;\ @@ -166,7 +166,7 @@ link(q)= null; flush_node_list(q);\ hget_paragraph(x,0,q);\ } /*:155*//*172:*/ -#line 2921 "hint.w" +#line 2925 "hint.w" #define HGET_MATH(I) \ { ParamDef *q; pointer p= null, a= null;\ @@ -177,7 +177,7 @@ if ((I)&b001) a= hget_hbox_node();\ hset_param_list(q); hdisplay(p,a,((I)&b010)!=0); hrestore_param_list();\ } /*:172*//*178:*/ -#line 2990 "hint.w" +#line 2994 "hint.w" #define HGET_ADJUST(I) \ { pointer p;\ @@ -186,7 +186,7 @@ hset_param_list(q); hdisplay(p,a,((I)&b010)!=0); hrestore_param_list();\ tail_append(p);\ } /*:178*//*180:*/ -#line 3006 "hint.w" +#line 3010 "hint.w" #define HGET_TABLE(I) \ if(I&b010) ; else ;\ @@ -195,7 +195,7 @@ if ((I)&b100) hget_xdimen_node(); else hget_xdimen_ref(HGET8);\ hget_list_pointer(); \ hget_list_pointer(); /*:180*//*185:*/ -#line 3102 "hint.w" +#line 3097 "hint.w" #define HGET_STREAM(I) \ { ParamDef *q; pointer p;\ @@ -203,10 +203,10 @@ hget_list_pointer(); subtype(p)= HGET8;RNG("Stream",subtype(p),1,254); \ if ((I)&b010) q= hget_param_list_node(); else q= hget_param_list_ref(HGET8); \ ins_ptr(p)= hget_list_pointer(); \ - if ((I)&b010) hset_stream_params(p,true,q); else hset_stream_params(p,false,q);\ + hset_stream_params(p,q); \ tail_append(p);} /*:185*//*189:*/ -#line 3134 "hint.w" +#line 3129 "hint.w" #define HGET_IMAGE(I) \ { pointer p;\ @@ -219,7 +219,7 @@ hget_list_pointer(); else { image_stretch(p)= image_shrink(p)= 0;image_stretch_order(p)= image_shrink_order(p)= normal;}\ tail_append(p);} /*:189*//*193:*/ -#line 3176 "hint.w" +#line 3171 "hint.w" #define HGET_LINK(I) \ { pointer p;\ @@ -230,21 +230,21 @@ hget_list_pointer(); label_has_name(p)= 0;\ tail_append(p);} /*:193*/ -#line 7534 "hint.w" +#line 7536 "hint.w" /*84:*/ -#line 1299 "hint.w" +#line 1303 "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 1397 "hint.w" +#line 1401 "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 1417 "hint.w" +#line 1421 "hint.w" #define HTEG_GLYPH(I) \ {uint8_t f; uint32_t c;\ @@ -256,7 +256,7 @@ hget_list_pointer(); tail_append(new_character(f,c));\ } /*:90*//*98:*/ -#line 1496 "hint.w" +#line 1500 "hint.w" #define HTEG_RULE(I)\ pointer p= new_rule();\ @@ -264,7 +264,7 @@ 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 1562 "hint.w" +#line 1566 "hint.w" #define HTEG_GLUE(I) \ p= get_node(glue_spec_size); \ @@ -273,12 +273,12 @@ if ((I)&b100) HTEG32(height(p)); else height(p)= null_flag; 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 1673 "hint.w" +#line 1677 "hint.w" #define IS_LIST(X) (KIND(X)==list_kind || \ KIND(X)==text_kind || KIND(X)==param_kind) /*:111*//*116:*/ -#line 1839 "hint.w" +#line 1843 "hint.w" #define HTEG_BOX(I) \ p= new_null_box();\ @@ -292,7 +292,7 @@ if ((I)&b001) HTEG32(depth(p));\ HTEG32(height(p));\ node_pos= hpos-hstart-1; /*:116*//*123:*/ -#line 1962 "hint.w" +#line 1966 "hint.w" #define HTEG_SET(I) \ scaled x, st, sh; uint8_t sto, sho; \ @@ -304,7 +304,7 @@ node_pos= hpos-hstart-1; HTEG32(width(p));if ((I)&b001) HTEG32(depth(p));HTEG32(height(p)); \ node_pos= hpos-hstart-1; /*:123*//*129:*/ -#line 2106 "hint.w" +#line 2110 "hint.w" #define HTEG_PACK(K,I) \ { pointer p; scaled x, s, d; uint8_t m; \ @@ -317,7 +317,7 @@ node_pos= hpos-hstart-1; if (K==vpack_kind) p= vpackage(p,x,m,d); else p= hpack(p,x,m);\ hprepend_to_vlist(p);} /*:129*//*133:*/ -#line 2173 "hint.w" +#line 2177 "hint.w" #define HTEG_KERN(I) \ pointer p; scaled x; \ @@ -329,7 +329,7 @@ p= new_kern(x);\ if ((I)&b100) subtype(p)= explicit;\ tail_append(p); /*:133*//*137:*/ -#line 2222 "hint.w" +#line 2226 "hint.w" #define HTEG_LEADERS(I) \ {pointer p,q;\ @@ -340,7 +340,7 @@ if ((I)&b100) p= hteg_glue_node(); else {p= spec2glue(zero_glue); incr(glue_ref_ leader_ptr(p)= q;subtype(p)= a_leaders+((I)&b011)-1;\ tail_append(p);} /*:137*//*141:*/ -#line 2265 "hint.w" +#line 2269 "hint.w" #define HTEG_BASELINE(I) \ if((I)&b010) cur_ls= hteg_glue_spec(); else cur_ls= zero_glue; \ @@ -348,7 +348,7 @@ tail_append(p);} if((I)&b001) HTEG32(cur_lsl); else cur_lsl= 0; \ cur_list.bs_pos= hpos-1; /*:141*//*146:*/ -#line 2322 "hint.w" +#line 2326 "hint.w" #define HTEG_LIG(I) \ {pointer p,q;\ @@ -360,7 +360,7 @@ link(q)= null; flush_node_list(q);\ font(lig_char(p))= HTEG8;\ } /*:146*//*150:*/ -#line 2373 "hint.w" +#line 2377 "hint.w" #define HTEG_DISC(I)\ pointer p= new_disc(); \ @@ -370,7 +370,7 @@ font(lig_char(p))= HTEG8;\ if ((r&0x80)==0) set_auto_disc(p); }\ else set_auto_disc(p); /*:150*//*173:*/ -#line 2932 "hint.w" +#line 2936 "hint.w" #define HTEG_MATH(I) \ { ParamDef *q; pointer p= null, a= null;\ @@ -381,7 +381,7 @@ 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 3015 "hint.w" +#line 3019 "hint.w" #define HTEG_TABLE(I) \ if(I&b010) ; else ;\ @@ -390,17 +390,17 @@ hteg_list_pointer(); \ hteg_list_pointer(); \ if ((I)&b100) hteg_xdimen_node(); else hget_xdimen_ref(HTEG8); /*:181*//*186:*/ -#line 3113 "hint.w" +#line 3108 "hint.w" #define HTEG_STREAM(I) \ {pointer p= get_node(ins_node_size); type(p)= ins_node;\ ins_ptr(p)= hteg_list_pointer();\ - if ((I)&b010) {ParamDef *q= hteg_param_list_node(); hset_stream_params(p,true,q);}\ - else {ParamDef *q= hget_param_list_ref(HTEG8); hset_stream_params(p,false,q);}\ + if ((I)&b010) {ParamDef *q= hteg_param_list_node(); hset_stream_params(p,q);}\ + 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 3147 "hint.w" +#line 3142 "hint.w" #define HTEG_IMAGE(I) \ { pointer p;\ @@ -413,7 +413,7 @@ if ((I)&b100) hteg_xdimen_node(); else hget_xdimen_ref(HTEG8); HTEG16(image_no(p));RNG("Section number",image_no(p),3,max_section_no); \ tail_append(p);} /*:190*//*194:*/ -#line 3187 "hint.w" +#line 3182 "hint.w" #define HTEG_LINK(I) \ { pointer p;\ @@ -424,7 +424,7 @@ if ((I)&b100) hteg_xdimen_node(); else hget_xdimen_ref(HTEG8); label_has_name(p)= 0;\ tail_append(p);} /*:194*/ -#line 7535 "hint.w" +#line 7537 "hint.w" /*21:*/ @@ -455,7 +455,7 @@ typedef struct ParamDef{ struct ParamDef*next; Param p;}ParamDef; /*:37*/ -#line 7537 "hint.w" +#line 7539 "hint.w" @@ -488,7 +488,7 @@ FontDef*font_def; ParamDef**param_def; /*:38*//*45:*/ -#line 733 "hint.w" +#line 746 "hint.w" typedef struct{ uint8_t pg; @@ -496,11 +496,11 @@ uint32_t f,t; }RangeDef; RangeDef*range_def; /*:45*//*50:*/ -#line 790 "hint.w" +#line 803 "hint.w" Stream*streams; /*:50*//*53:*/ -#line 804 "hint.w" +#line 817 "hint.w" typedef struct{ Xdimen x; @@ -512,7 +512,7 @@ pointer g; pointer h; }StreamDef; /*:53*//*57:*/ -#line 877 "hint.w" +#line 890 "hint.w" typedef struct{ char*n; @@ -526,25 +526,25 @@ StreamDef*s; PageDef*page_def; PageDef*cur_page; /*:57*//*65:*/ -#line 1021 "hint.w" +#line 1025 "hint.w" hint_Outline*hint_outlines= NULL; int outline_no= -1; /*:65*//*162:*/ -#line 2762 "hint.w" +#line 2766 "hint.w" static ParamDef*line_break_params= NULL; /*:162*//*205:*/ -#line 3487 "hint.w" +#line 3482 "hint.w" static scaled page_height; static scaled top_so_far[8]; /*:205*//*220:*/ -#line 3765 "hint.w" +#line 3760 "hint.w" static uint32_t map[0x10000]; /*:220*//*225:*/ -#line 3829 "hint.w" +#line 3824 "hint.w" #define MAX_PAGE_POS (1<<3) @@ -552,25 +552,25 @@ uint64_t page_loc[MAX_PAGE_POS]; int cur_loc; static int lo_loc,hi_loc; /*:225*//*242:*/ -#line 4221 "hint.w" +#line 4216 "hint.w" scaled hvsize,hhsize; /*:242*//*244:*/ -#line 4249 "hint.w" +#line 4244 "hint.w" int page_v,page_h,offset_v,offset_h; /*:244*//*301:*/ -#line 5523 "hint.w" +#line 5519 "hint.w" hint_Link*hint_links= NULL; int max_link= -1; /*:301*//*359:*/ -#line 7223 "hint.w" +#line 7219 "hint.w" jmp_buf error_exit; char herror_string[MAX_HERROR]; /*:359*/ -#line 7540 "hint.w" +#line 7542 "hint.w" /*3:*/ #line 196 "hint.w" @@ -596,20 +596,20 @@ static pointer hprepend_to_vlist(pointer b); static pointer hget_glue_spec(void); static pointer hget_disc_node(void); /*:36*//*104:*/ -#line 1558 "hint.w" +#line 1562 "hint.w" static scaled hget_xdimen_node(void); /*:104*//*117:*/ -#line 1855 "hint.w" +#line 1859 "hint.w" static pointer hget_list_pointer(void); static pointer hteg_list_pointer(void); /*:117*//*124:*/ -#line 1973 "hint.w" +#line 1977 "hint.w" static scaled hget_xdimen_node(void); /*:124*/ -#line 7541 "hint.w" +#line 7543 "hint.w" /*9:*/ #line 253 "hint.w" @@ -678,7 +678,7 @@ while(KIND(*hpos)!=font_kind) {Kind k; uint8_t n; /*74:*/ -#line 1161 "hint.w" +#line 1165 "hint.w" uint8_t a,z; HGETTAG(a); @@ -694,7 +694,7 @@ 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 1166 "hint.w" +#line 1170 "hint.w" HGETTAG(z); if(a!=z) @@ -747,7 +747,7 @@ QUIT("list end after before stream end\n"); while(hpos<list_end) {ParamDef*r;Param*q; /*74:*/ -#line 1161 "hint.w" +#line 1165 "hint.w" uint8_t a,z; HGETTAG(a); @@ -764,7 +764,7 @@ 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 1166 "hint.w" +#line 1170 "hint.w" HGETTAG(z); if(a!=z) @@ -788,7 +788,7 @@ ParamDef*hget_param_list_node(void) else {ParamDef*p; /*74:*/ -#line 1161 "hint.w" +#line 1165 "hint.w" uint8_t a,z; HGETTAG(a); @@ -797,7 +797,7 @@ HGETTAG(a); p= hget_param_list(a); /*75:*/ -#line 1166 "hint.w" +#line 1170 "hint.w" HGETTAG(z); if(a!=z) @@ -815,7 +815,7 @@ ParamDef*hget_param_list_ref(uint8_t n) return param_def[n]; } /*:42*//*43:*/ -#line 684 "hint.w" +#line 697 "hint.w" #define MAX_SAVE 100 #define SAVE_BOUNDARY 0xFF @@ -860,7 +860,7 @@ else if(q->k==glue_kind) QUIT("Parameter save stack flow"); } /*:43*//*48:*/ -#line 748 "hint.w" +#line 761 "hint.w" static void hget_range_def(uint8_t a,uint8_t pg) {static uint8_t n= 0; @@ -890,7 +890,7 @@ return 0; } #endif /*:48*//*54:*/ -#line 821 "hint.w" +#line 834 "hint.w" static void hget_xdimen_def_node(Xdimen*x); @@ -900,19 +900,19 @@ return false; else {uint8_t n; /*74:*/ -#line 1161 "hint.w" +#line 1165 "hint.w" uint8_t a,z; HGETTAG(a); /*:74*/ -#line 829 "hint.w" +#line 842 "hint.w" DBG(DBGDEF,"Defining stream %d at "SIZE_F"\n",*hpos,hpos-hstart-1); n= HGET8;REF_RNG(stream_kind,n); s= s+n; if(n> 0) {if(INFO(a)==b100)/*55:*/ -#line 852 "hint.w" +#line 865 "hint.w" {DBG(DBGDEF,"Defining normal stream %d at "SIZE_F"\n",*(hpos-1),hpos-hstart-2); hget_xdimen_def_node(&(s->x)); @@ -922,7 +922,7 @@ s->n= HGET8;if(s->n!=255)REF_RNG(stream_kind,s->n); HGET16(s->r);RNG("split ratio",s->r,0,1000); } /*:55*/ -#line 834 "hint.w" +#line 847 "hint.w" else if(INFO(a)==b101)QUIT("first stream not yet implemented"); else if(INFO(a)==b110)QUIT("last stream not yet implemented"); @@ -934,20 +934,20 @@ s->a= hget_list_pointer(); s->h= hget_glue_spec(); } /*75:*/ -#line 1166 "hint.w" +#line 1170 "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 844 "hint.w" +#line 857 "hint.w" return true; } } /*:54*//*61:*/ -#line 921 "hint.w" +#line 934 "hint.w" static void hset_cur_page(void) @@ -974,7 +974,7 @@ hskip_list(); while(hget_stream_def(cur_page->s))continue; } /*:61*//*72:*/ -#line 1097 "hint.w" +#line 1101 "hint.w" static pointer hget_ligature_ref(uint8_t n) {REF_RNG(ligature_kind,n); @@ -1005,7 +1005,7 @@ return copy_node_list(pointer_def[leaders_kind][n]); /*:72*//*85:*/ -#line 1306 "hint.w" +#line 1310 "hint.w" static void hget_xdimen_def(Info i,Xdimen*x) @@ -1039,58 +1039,58 @@ return xdimen(&x); static scaled hget_xdimen_node(void) {scaled x= 0; /*74:*/ -#line 1161 "hint.w" +#line 1165 "hint.w" uint8_t a,z; HGETTAG(a); /*:74*/ -#line 1338 "hint.w" +#line 1342 "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)); /*75:*/ -#line 1166 "hint.w" +#line 1170 "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 1343 "hint.w" +#line 1347 "hint.w" return x; } static void hget_xdimen_def_node(Xdimen*x) {/*74:*/ -#line 1161 "hint.w" +#line 1165 "hint.w" uint8_t a,z; HGETTAG(a); /*:74*/ -#line 1348 "hint.w" +#line 1352 "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)); /*75:*/ -#line 1166 "hint.w" +#line 1170 "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 1353 "hint.w" +#line 1357 "hint.w" } /*:85*//*86:*/ -#line 1359 "hint.w" +#line 1363 "hint.w" scaled hteg_xdimen(uint8_t a) {Xdimen x; @@ -1114,19 +1114,19 @@ return xdimen(&x); scaled hteg_xdimen_node(void) {scaled x= 0; /*78:*/ -#line 1222 "hint.w" +#line 1226 "hint.w" uint8_t a,z; z= HTEG8,DBGTAG(z,hpos); /*:78*/ -#line 1381 "hint.w" +#line 1385 "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 1227 "hint.w" +#line 1231 "hint.w" a= HTEG8,DBGTAG(a,hpos); if(z!=a) @@ -1134,27 +1134,27 @@ 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 1386 "hint.w" +#line 1390 "hint.w" return x; } /*:86*//*102:*/ -#line 1534 "hint.w" +#line 1538 "hint.w" static pointer hteg_rule_node(void) {pointer q= null; /*78:*/ -#line 1222 "hint.w" +#line 1226 "hint.w" uint8_t a,z; z= HTEG8,DBGTAG(z,hpos); /*:78*/ -#line 1537 "hint.w" +#line 1541 "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 1227 "hint.w" +#line 1231 "hint.w" a= HTEG8,DBGTAG(a,hpos); if(z!=a) @@ -1162,12 +1162,12 @@ 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 1540 "hint.w" +#line 1544 "hint.w" return q; } /*:102*//*108:*/ -#line 1603 "hint.w" +#line 1607 "hint.w" static pointer hget_glue_spec(void) {pointer p= null; @@ -1182,14 +1182,14 @@ if(INFO(a)==b000) else {HGET_GLUE(INFO(a));} /*75:*/ -#line 1166 "hint.w" +#line 1170 "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 1616 "hint.w" +#line 1620 "hint.w" } return p; @@ -1206,7 +1206,7 @@ static pointer hget_glue_node(void) {return spec2glue(hget_glue_spec()); } /*:108*//*109:*/ -#line 1633 "hint.w" +#line 1637 "hint.w" static pointer hteg_glue_spec(void) {pointer p= null; @@ -1218,7 +1218,7 @@ if(INFO(z)==b000)p= hget_glue_ref(HTEG8); else {HTEG_GLUE(INFO(z));} /*79:*/ -#line 1227 "hint.w" +#line 1231 "hint.w" a= HTEG8,DBGTAG(a,hpos); if(z!=a) @@ -1226,7 +1226,7 @@ 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 1643 "hint.w" +#line 1647 "hint.w" return p; } @@ -1238,7 +1238,7 @@ if(p!=null)return spec2glue(p); else return new_glue(zero_glue); } /*:109*//*112:*/ -#line 1678 "hint.w" +#line 1682 "hint.w" static pointer hget_node_list(uint32_t s) {uint8_t*list_end= hpos+s; @@ -1261,12 +1261,12 @@ else {pointer p= null; uint32_t s,t; /*74:*/ -#line 1161 "hint.w" +#line 1165 "hint.w" uint8_t a,z; HGETTAG(a); /*:74*/ -#line 1699 "hint.w" +#line 1703 "hint.w" s= hget_list_size(INFO(a)); hget_size_boundary(INFO(a)); @@ -1279,20 +1279,20 @@ 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 1166 "hint.w" +#line 1170 "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 1710 "hint.w" +#line 1714 "hint.w" return p; } } /*:112*//*113:*/ -#line 1720 "hint.w" +#line 1724 "hint.w" static void hskip_list() @@ -1330,7 +1330,7 @@ hpos= list_start; return p; } /*:113*//*114:*/ -#line 1765 "hint.w" +#line 1769 "hint.w" #if 0 static int32_t hteg_integer_def(uint8_t z) @@ -1354,12 +1354,12 @@ QUIT("list start before stream start\n"); while(list_start<hpos) {ParamDef*r;Param*q; /*78:*/ -#line 1222 "hint.w" +#line 1226 "hint.w" uint8_t a,z; z= HTEG8,DBGTAG(z,hpos); /*:78*/ -#line 1787 "hint.w" +#line 1791 "hint.w" ALLOCATE(r,1,ParamDef); q= &(r->p); @@ -1371,7 +1371,7 @@ else TAGERR(a); q->n= HTEG8; DBG(DBGTAGS,"Defining %s %d\n",definition_name[KIND(z)],q->n); /*79:*/ -#line 1227 "hint.w" +#line 1231 "hint.w" a= HTEG8,DBGTAG(a,hpos); if(z!=a) @@ -1379,7 +1379,7 @@ 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 1797 "hint.w" +#line 1801 "hint.w" r->next= p; p= r; @@ -1402,22 +1402,22 @@ hpos= list_start; return p; } /*:114*//*121:*/ -#line 1924 "hint.w" +#line 1928 "hint.w" static pointer hteg_hbox_node(void) {/*78:*/ -#line 1222 "hint.w" +#line 1226 "hint.w" uint8_t a,z; z= HTEG8,DBGTAG(z,hpos); /*:78*/ -#line 1926 "hint.w" +#line 1930 "hint.w" if(KIND(z)!=hbox_kind)QUIT("Hbox expected at 0x%x got %s",node_pos,NAME(z)); {pointer p; HTEG_BOX(INFO(z)); /*79:*/ -#line 1227 "hint.w" +#line 1231 "hint.w" a= HTEG8,DBGTAG(a,hpos); if(z!=a) @@ -1425,25 +1425,25 @@ 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 1930 "hint.w" +#line 1934 "hint.w" return p; } } static pointer hteg_vbox_node(void) {/*78:*/ -#line 1222 "hint.w" +#line 1226 "hint.w" uint8_t a,z; z= HTEG8,DBGTAG(z,hpos); /*:78*/ -#line 1935 "hint.w" +#line 1939 "hint.w" if(KIND(z)!=vbox_kind)QUIT("Vbox expected at 0x%x got %s",node_pos,NAME(z)); {pointer p; HTEG_BOX(INFO(z)); /*79:*/ -#line 1227 "hint.w" +#line 1231 "hint.w" a= HTEG8,DBGTAG(a,hpos); if(z!=a) @@ -1451,7 +1451,7 @@ 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 1939 "hint.w" +#line 1943 "hint.w" type(p)= vlist_node; return p; @@ -1459,7 +1459,7 @@ return p; } /*:121*//*127:*/ -#line 2021 "hint.w" +#line 2025 "hint.w" static void hset(pointer p, uint8_t sto,scaled st,uint8_t sho,scaled sh,scaled w) @@ -1528,7 +1528,7 @@ glue_set(p)= 0.0; } } /*:127*//*144:*/ -#line 2300 "hint.w" +#line 2304 "hint.w" static pointer hget_text_list(uint32_t s) {pointer p= null; @@ -1538,36 +1538,36 @@ while(hpos<t){*pp= new_character(0,hget_utf8());pp= &link(*pp);} return p; } /*:144*//*153:*/ -#line 2407 "hint.w" +#line 2411 "hint.w" static pointer hget_disc_node(void) {/*74:*/ -#line 1161 "hint.w" +#line 1165 "hint.w" uint8_t a,z; HGETTAG(a); /*:74*/ -#line 2409 "hint.w" +#line 2413 "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)); { HGET_DISC(INFO(a)); /*75:*/ -#line 1166 "hint.w" +#line 1170 "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 2414 "hint.w" +#line 2418 "hint.w" return p; } } /*:153*//*157:*/ -#line 2482 "hint.w" +#line 2486 "hint.w" static void transplant_post_break_list(void) {pointer r,q= link(head); @@ -1610,7 +1610,7 @@ link(head)= q; } } /*:157*//*158:*/ -#line 2549 "hint.w" +#line 2553 "hint.w" pointer hget_paragraph_all(scaled x) { @@ -1644,14 +1644,14 @@ 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 1166 "hint.w" +#line 1170 "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 2581 "hint.w" +#line 2585 "hint.w" #if 0 if(offset> 0&&link(head)!=null&&!is_char_node(link(head))) @@ -1679,7 +1679,7 @@ QUIT("Text in paragraph not yet implemented"); return null; } /*:158*//*159:*/ -#line 2612 "hint.w" +#line 2616 "hint.w" pointer hget_paragraph_final(scaled x,uint8_t*from) { @@ -1709,14 +1709,14 @@ 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 1166 "hint.w" +#line 1170 "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 2640 "hint.w" +#line 2644 "hint.w" if(link(head)!=null&&!is_char_node(link(head))) {if(type(link(head))==disc_node) @@ -1742,7 +1742,7 @@ QUIT("Text in paragraph not yet implemented"); return null; } /*:159*//*165:*/ -#line 2779 "hint.w" +#line 2783 "hint.w" pointer hget_paragraph(scaled x,uint32_t offset,ParamDef*q) { @@ -1768,12 +1768,12 @@ void hget_par_node(uint32_t offset) {scaled x= 0; ParamDef*q; /*74:*/ -#line 1161 "hint.w" +#line 1165 "hint.w" uint8_t a,z; HGETTAG(a); /*:74*/ -#line 2803 "hint.w" +#line 2807 "hint.w" if(KIND(a)!=par_kind) QUIT("Paragrap expected found tag [%s,%d] at "SIZE_F"\n",NAME(a),INFO(a),hpos-hstart); @@ -1783,18 +1783,18 @@ 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 1166 "hint.w" +#line 1170 "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 2811 "hint.w" +#line 2815 "hint.w" } /*:165*//*168:*/ -#line 2833 "hint.w" +#line 2837 "hint.w" void hteg_paragraph(Info i) {scaled x= 0; @@ -1815,7 +1815,7 @@ hpos= list_start; cur_list.bs_pos= NULL; par_head= hget_paragraph(x,0,q); /*169:*/ -#line 2865 "hint.w" +#line 2869 "hint.w" {pointer p,r,par_tail; p= null; @@ -1837,40 +1837,35 @@ if(type(tail)==hlist_node||type(tail)==vlist_node) prev_height= height(tail); } /*:169*/ -#line 2852 "hint.w" +#line 2856 "hint.w" hpos= par_start; } /*:168*//*184:*/ #line 3080 "hint.w" -static void hset_stream_params(pointer p,bool f,ParamDef*q) -{ParamDef*r; -pointer s; -while(q!=null) -{r= q; -if(q->p.k==int_kind&&q->p.n==floating_penalty_no)float_cost(p)= q->p.v; -else if(q->p.k==dimen_kind&&q->p.n==split_max_depth_no)depth(p)= (scaled)q->p.v; -else if(q->p.k==glue_kind&&q->p.n==split_top_skip_no) -{split_top_ptr(p)= (pointer)q->p.v;if(!f)add_glue_ref(split_top_ptr(p));} -else QUIT("Unexpected parameter in stream"); -q= q->next; -if(f)free(r); -} +static void hset_stream_params(pointer p,ParamDef*q) +{pointer s; +hset_param_list(q); +float_cost(p)= integer_def[floating_penalty_no]; +depth(p)= dimen_def[split_max_depth_no]; +split_top_ptr(p)= pointer_def[glue_kind][split_top_skip_no]; +add_glue_ref(split_top_ptr(p)); +hrestore_param_list(); s= vpack(ins_ptr(p),natural); height(p)= height(s)+depth(s); ins_ptr(p)= list_ptr(s); list_ptr(s)= null;flush_node_list(s); } /*:184*//*224:*/ -#line 3807 "hint.w" +#line 3802 "hint.w" uint64_t hlocation(pointer p) {return PAGE_LOC(map[p],map[p+1]); } /*:224*//*227:*/ -#line 3853 "hint.w" +#line 3848 "hint.w" #define NEXT_PAGE(X) (X= (X+1)&(MAX_PAGE_POS-1)) #define PREV_PAGE(X) (X= (X-1)&(MAX_PAGE_POS-1)) @@ -1903,7 +1898,7 @@ return true; /*:227*//*230:*/ -#line 3915 "hint.w" +#line 3910 "hint.w" void hloc_set(uint64_t h) @@ -1917,7 +1912,7 @@ hloc_clear(); DBG(DBGPAGE,"loc_set: %d < %d < %d\n",lo_loc,cur_loc,hi_loc); } /*:230*//*231:*/ -#line 3939 "hint.w" +#line 3934 "hint.w" void hloc_set_next(pointer p) @@ -1939,7 +1934,7 @@ hi_loc= i; DBG(DBGPAGE,"loc_set_next: %d < %d < %d\n",lo_loc,cur_loc,hi_loc); } /*:231*//*232:*/ -#line 3975 "hint.w" +#line 3970 "hint.w" void hloc_set_prev(pointer p) {int i= cur_loc; @@ -1962,7 +1957,7 @@ cur_loc= i; DBG(DBGPAGE,"loc_set_prev: %d < %d < %d\n",lo_loc,cur_loc,hi_loc); } /*:232*//*245:*/ -#line 4259 "hint.w" +#line 4254 "hint.w" static void hset_margins(void) {if(cur_page==&(page_def[0])){ @@ -1982,15 +1977,16 @@ else if(hhsize> page_h)hhsize= page_h; hvsize= round((double)(page_v-cur_page->v.w)/(double)cur_page->v.v); if(hvsize> page_v)hvsize= page_v; +offset_h= (page_h-hhsize)/2; +offset_v= (page_v-hvsize)/2; } } /*:245*//*247:*/ -#line 4289 "hint.w" +#line 4286 "hint.w" -static void houtput_template0(void) -{pointer p,q,r; -if(streams[0].p==null)return; -p= streams[0].p;streams[0].p= null; +static void houtput_template(pointer p) +{pointer q,r; +if(p==null)return; p= vpackage(p,hvsize,exactly,page_max_depth); r= new_kern(offset_v); link(r)= p; @@ -2003,7 +1999,7 @@ shift_amount(p)+= offset_h; streams[0].p= q; } /*:247*//*272:*/ -#line 4932 "hint.w" +#line 4928 "hint.w" static int trv_string_size= 0; static char trv_string[256]; @@ -2032,7 +2028,7 @@ trv_string[trv_string_size]= 0; return trv_string; } /*:272*//*369:*/ -#line 7451 "hint.w" +#line 7453 "hint.w" static pointer leaks[1<<16]= {0}; @@ -2073,7 +2069,7 @@ fprintf(stderr,"ERROR:leak final: p=%d, s=%d\n",i,leaks[i]); #endif } /*:369*/ -#line 7542 "hint.w" +#line 7544 "hint.w" /*1:*/ #line 111 "hint.w" @@ -2082,7 +2078,7 @@ void hget_def_node(void) {Kind k; int n; /*74:*/ -#line 1161 "hint.w" +#line 1165 "hint.w" uint8_t a,z; HGETTAG(a); @@ -2114,7 +2110,7 @@ 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 1166 "hint.w" +#line 1170 "hint.w" HGETTAG(z); if(a!=z) @@ -2190,15 +2186,15 @@ free_param_list(param_def[i]); } free(param_def);param_def= NULL; /*:40*//*47:*/ -#line 744 "hint.w" +#line 757 "hint.w" free(range_def);range_def= NULL; /*:47*//*52:*/ -#line 798 "hint.w" +#line 811 "hint.w" free(streams);streams= NULL; /*:52*//*60:*/ -#line 911 "hint.w" +#line 924 "hint.w" if(page_def!=NULL) {int k; @@ -2208,7 +2204,7 @@ for(k= 0;k<=max_ref[page_kind];k++) free(page_def);page_def= NULL;cur_page= NULL; } /*:60*//*67:*/ -#line 1033 "hint.w" +#line 1037 "hint.w" free(labels);labels= NULL; {int k; @@ -2271,19 +2267,19 @@ ALLOCATE(font_def,max_ref[font_kind]+1,FontDef); ALLOCATE(param_def,max_ref[param_kind]+1,ParamDef*); /*:39*//*46:*/ -#line 740 "hint.w" +#line 753 "hint.w" ALLOCATE(range_def,max_ref[range_kind]+1,RangeDef); /*:46*//*51:*/ -#line 794 "hint.w" +#line 807 "hint.w" ALLOCATE(streams,max_ref[stream_kind]+1,Stream); /*:51*//*58:*/ -#line 891 "hint.w" +#line 904 "hint.w" ALLOCATE(page_def,max_ref[page_kind]+1,PageDef); /*:58*//*66:*/ -#line 1026 "hint.w" +#line 1030 "hint.w" if(max_ref[label_kind]>=0) ALLOCATE(labels,max_ref[label_kind]+1,Label); @@ -2298,7 +2294,7 @@ while(hpos<hend) hget_def_node(); hget_font_metrics(); /*59:*/ -#line 895 "hint.w" +#line 908 "hint.w" page_def[0].d= max_depth; page_def[0].g= top_skip;add_glue_ref(top_skip); @@ -2388,12 +2384,12 @@ cur_list.bs_pos= NULL; return p; } /*:26*//*68:*/ -#line 1046 "hint.w" +#line 1050 "hint.w" void hget_outline_or_label_def(Info i,int n) {if(i&b100) /*70:*/ -#line 1067 "hint.w" +#line 1071 "hint.w" {hint_Outline*t; uint64_t pos; @@ -2405,7 +2401,7 @@ t->depth= HGET8; t->p= hget_list_pointer(); t->title= strdup(hlist_to_string(t->p)); /*71:*/ -#line 1083 "hint.w" +#line 1087 "hint.w" where= labels[n].where; #if 1 @@ -2414,17 +2410,17 @@ pos= ((uint64_t)labels[n].pos<<32)+(labels[n].pos-labels[n].pos0); pos= ((uint64_t)labels[n].pos0<<32); #endif /*:71*/ -#line 1077 "hint.w" +#line 1081 "hint.w" t->where= where; t->pos= pos; } /*:70*/ -#line 1049 "hint.w" +#line 1053 "hint.w" else /*69:*/ -#line 1055 "hint.w" +#line 1059 "hint.w" {Label*t= labels+n; HGET32(t->pos); @@ -2436,67 +2432,67 @@ else t->pos0= t->pos; DBG(DBGDEF,"Label 0x%x+0x%x where=%d font=%d\n",t->pos0,t->pos,t->where,t->f); } /*:69*/ -#line 1051 "hint.w" +#line 1055 "hint.w" } /*:68*//*73:*/ -#line 1147 "hint.w" +#line 1151 "hint.w" static void hget_content_section() {DBG(DBGDIR,"Reading Content Section\n"); hget_section(2); } /*:73*//*101:*/ -#line 1523 "hint.w" +#line 1527 "hint.w" pointer hget_rule_node(void) {pointer q= null; /*74:*/ -#line 1161 "hint.w" +#line 1165 "hint.w" uint8_t a,z; HGETTAG(a); /*:74*/ -#line 1526 "hint.w" +#line 1530 "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)); /*75:*/ -#line 1166 "hint.w" +#line 1170 "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 1529 "hint.w" +#line 1533 "hint.w" return q; } /*:101*//*120:*/ -#line 1899 "hint.w" +#line 1903 "hint.w" pointer hget_hbox_node(void) {/*74:*/ -#line 1161 "hint.w" +#line 1165 "hint.w" uint8_t a,z; HGETTAG(a); /*:74*/ -#line 1901 "hint.w" +#line 1905 "hint.w" if(KIND(a)!=hbox_kind)QUIT("Hbox expected at 0x%x got %s",node_pos,NAME(a)); {pointer p; HGET_BOX(INFO(a)); /*75:*/ -#line 1166 "hint.w" +#line 1170 "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 1905 "hint.w" +#line 1909 "hint.w" return p; } @@ -2506,32 +2502,32 @@ return p; pointer hget_vbox_node(void) { /*74:*/ -#line 1161 "hint.w" +#line 1165 "hint.w" uint8_t a,z; HGETTAG(a); /*:74*/ -#line 1913 "hint.w" +#line 1917 "hint.w" if(KIND(a)!=vbox_kind)QUIT("Vbox expected at 0x%x got %s",node_pos,NAME(a)); {pointer p; HGET_BOX(INFO(a)); /*75:*/ -#line 1166 "hint.w" +#line 1170 "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 1917 "hint.w" +#line 1921 "hint.w" type(p)= vlist_node; return p; } } /*:120*//*160:*/ -#line 2667 "hint.w" +#line 2671 "hint.w" pointer hget_paragraph_initial(scaled x,uint8_t*to) { @@ -2569,14 +2565,14 @@ 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 1166 "hint.w" +#line 1170 "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 2703 "hint.w" +#line 2707 "hint.w" if(needs_bs) QUIT("Unexpected trailing baseline node"); @@ -2587,7 +2583,7 @@ return null; else {pointer par_ptr= link(head); /*161:*/ -#line 2731 "hint.w" +#line 2735 "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)) @@ -2597,7 +2593,7 @@ flush_node_list(leader_ptr(tail));penalty(tail)= inf_penalty; } tail_append(new_glue(zero_glue)); /*:161*/ -#line 2712 "hint.w" +#line 2716 "hint.w" pop_nest(); store_map(par_ptr,node_pos,0); @@ -2609,29 +2605,29 @@ QUIT("Text in paragraph not yet implemented"); return null; } /*:160*/ -#line 7543 "hint.w" +#line 7545 "hint.w" /*80:*/ -#line 1241 "hint.w" +#line 1245 "hint.w" static void hteg_node(uint8_t z) {switch(z) { /*92:*/ -#line 1435 "hint.w" +#line 1439 "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 1450 "hint.w" +#line 1454 "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 1470 "hint.w" +#line 1474 "hint.w" case TAG(language_kind,b000):(void)HTEG8; case TAG(language_kind,1): @@ -2642,7 +2638,7 @@ case TAG(language_kind,5): case TAG(language_kind,6): case TAG(language_kind,7):break; /*:96*//*100:*/ -#line 1513 "hint.w" +#line 1517 "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; @@ -2651,7 +2647,7 @@ case TAG(rule_kind,b001):{HTEG_RULE(b001);tail_append(p);prev_height= ignore_dep 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 1584 "hint.w" +#line 1588 "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; @@ -2662,7 +2658,7 @@ case TAG(glue_kind,b101):{pointer p;HTEG_GLUE(b101);tail_append(spec2glue(p));}b 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 1880 "hint.w" +#line 1884 "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; @@ -2681,7 +2677,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 1998 "hint.w" +#line 2002 "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; @@ -2701,7 +2697,7 @@ case TAG(vset_kind,b101):{pointer p;HTEG_SET(b101);vset(p,sto,st,sho,sh,x);hprep 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 2138 "hint.w" +#line 2142 "hint.w" case TAG(hpack_kind,b000):HTEG_PACK(hpack_kind,b000);break; case TAG(hpack_kind,b010):HTEG_PACK(hpack_kind,b010);break; @@ -2721,7 +2717,7 @@ 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 2197 "hint.w" +#line 2201 "hint.w" case TAG(kern_kind,b000):{HTEG_KERN(b000);}break; case TAG(kern_kind,b001):{HTEG_KERN(b001);}break; @@ -2732,7 +2728,7 @@ 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 2244 "hint.w" +#line 2248 "hint.w" case TAG(leaders_kind,0):tail_append(hget_leaders_ref(HTEG8));break; case TAG(leaders_kind,1):HTEG_LEADERS(1);break; @@ -2742,7 +2738,7 @@ 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 2285 "hint.w" +#line 2289 "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; @@ -2752,7 +2748,7 @@ 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 2346 "hint.w" +#line 2350 "hint.w" case TAG(ligature_kind,0):tail_append(hget_ligature_ref(HTEG8));break; case TAG(ligature_kind,1):HTEG_LIG(1);break; @@ -2763,7 +2759,7 @@ 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 2395 "hint.w" +#line 2399 "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; @@ -2774,14 +2770,14 @@ 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 2820 "hint.w" +#line 2824 "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 2953 "hint.w" +#line 2957 "hint.w" case TAG(math_kind,b000):HTEG_MATH(b000);break; case TAG(math_kind,b001):HTEG_MATH(b001);break; @@ -2790,12 +2786,12 @@ 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 2977 "hint.w" +#line 2981 "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 3047 "hint.w" +#line 3051 "hint.w" case TAG(table_kind,b000):HTEG_TABLE(b000);break; case TAG(table_kind,b001):HTEG_TABLE(b001);break; @@ -2815,12 +2811,12 @@ 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 3128 "hint.w" +#line 3123 "hint.w" case TAG(stream_kind,b000):HTEG_STREAM(b000);break; case TAG(stream_kind,b010):HTEG_STREAM(b010);break; /*:188*//*192:*/ -#line 3167 "hint.w" +#line 3162 "hint.w" case TAG(image_kind,b000):hget_image_ref(HTEG8);break; case TAG(image_kind,b100):HTEG_IMAGE(b100);break; @@ -2828,14 +2824,14 @@ 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 3204 "hint.w" +#line 3199 "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 1245 "hint.w" +#line 1249 "hint.w" default: TAGERR(z); @@ -2844,17 +2840,17 @@ TAGERR(z); void hteg_content(void) {/*78:*/ -#line 1222 "hint.w" +#line 1226 "hint.w" uint8_t a,z; z= HTEG8,DBGTAG(z,hpos); /*:78*/ -#line 1252 "hint.w" +#line 1256 "hint.w" node_pos= hpos-hstart; hteg_node(z); /*79:*/ -#line 1227 "hint.w" +#line 1231 "hint.w" a= HTEG8,DBGTAG(a,hpos); if(z!=a) @@ -2862,7 +2858,7 @@ 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 1255 "hint.w" +#line 1259 "hint.w" node_pos= hpos-hstart; if(nest_ptr==0&&tail!=head @@ -2875,23 +2871,23 @@ if(nest_ptr==0&&tail!=head store_map(tail,node_pos,0); } /*:80*//*154:*/ -#line 2420 "hint.w" +#line 2424 "hint.w" pointer hteg_disc_node(void) {/*78:*/ -#line 1222 "hint.w" +#line 1226 "hint.w" uint8_t a,z; z= HTEG8,DBGTAG(z,hpos); /*:78*/ -#line 2422 "hint.w" +#line 2426 "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)); { HTEG_DISC(INFO(z)); /*79:*/ -#line 1227 "hint.w" +#line 1231 "hint.w" a= HTEG8,DBGTAG(a,hpos); if(z!=a) @@ -2899,13 +2895,13 @@ 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 2427 "hint.w" +#line 2431 "hint.w" return p; } } /*:154*//*170:*/ -#line 2889 "hint.w" +#line 2893 "hint.w" void hteg_par_node(uint32_t offset) {scaled x= 0; @@ -2915,12 +2911,12 @@ pointer par_head= tail; uint8_t*bs_pos= cur_list.bs_pos; scaled ph= prev_height; /*74:*/ -#line 1161 "hint.w" +#line 1165 "hint.w" uint8_t a,z; HGETTAG(a); /*:74*/ -#line 2897 "hint.w" +#line 2901 "hint.w" node_pos= (hpos-hstart)-1; if(INFO(a)&b100)x= hget_xdimen_node();else x= hget_xdimen_ref(HGET8); @@ -2928,21 +2924,21 @@ 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 1166 "hint.w" +#line 1170 "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 2903 "hint.w" +#line 2907 "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 2865 "hint.w" +#line 2869 "hint.w" {pointer p,r,par_tail; p= null; @@ -2964,14 +2960,14 @@ if(type(tail)==hlist_node||type(tail)==vlist_node) prev_height= height(tail); } /*:169*/ -#line 2908 "hint.w" +#line 2912 "hint.w" hpos= hstart+node_pos; line_break_params= save_lbp; } /*:170*/ -#line 7544 "hint.w" +#line 7546 "hint.w" /*18:*/ @@ -2990,7 +2986,7 @@ int32_t font_at_size(uint8_t f) {return font_def[f].s; } /*:34*//*62:*/ -#line 949 "hint.w" +#line 962 "hint.w" static void hinsert_stream(uint8_t n) {REF_RNG(stream_kind,n); @@ -3017,20 +3013,10 @@ DBG(DBGPAGE,"Filling in after list %d\n",n); } } /*:62*//*63:*/ -#line 979 "hint.w" +#line 992 "hint.w" void hfill_page_template(void) {pointer p; -#if 0 -print_str("\npage_head:\n"); -show_box(link(page_head)); -print_str("\nstream 0:\n"); -show_box(streams[0].p); -print_str("\nstream 1:\n"); -show_box(streams[1].p); -print_str("\ncontributions:\n"); -show_box(link(contrib_head)); -#endif if(cur_page->t!=0) { uint8_t*spos= hpos,*sstart= hstart,*send= hend; @@ -3039,39 +3025,40 @@ hpos= hpos+cur_page->t; p= hget_list_pointer(); hpos= spos,hstart= sstart,hend= send; if(streams[0].p!=null)flush_node_list(streams[0].p); -streams[0].p= streams[0].t= null; -streams[0].p= vpackage(p,page_v,exactly,page_max_depth); } else -houtput_template0(); +{p= streams[0].p; +} +streams[0].p= streams[0].t= null; +houtput_template(p); hmark_page(); } /*:63*//*76:*/ -#line 1181 "hint.w" +#line 1185 "hint.w" static void hget_node(uint8_t a) {switch(a) { /*56:*/ -#line 870 "hint.w" +#line 883 "hint.w" case TAG(stream_kind,b100):hinsert_stream(HGET8);break; /*:56*//*91:*/ -#line 1429 "hint.w" +#line 1433 "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 1444 "hint.w" +#line 1448 "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 1458 "hint.w" +#line 1462 "hint.w" case TAG(language_kind,b000):(void)HGET8; case TAG(language_kind,1): @@ -3082,7 +3069,7 @@ case TAG(language_kind,5): case TAG(language_kind,6): case TAG(language_kind,7):break; /*:95*//*99:*/ -#line 1504 "hint.w" +#line 1508 "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; @@ -3091,7 +3078,7 @@ case TAG(rule_kind,b001):{HGET_RULE(b001);tail_append(p);prev_depth= ignore_dept 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 1572 "hint.w" +#line 1576 "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; @@ -3102,7 +3089,7 @@ case TAG(glue_kind,b101):{pointer p;HGET_GLUE(b101);tail_append(spec2glue(p));}b 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 1861 "hint.w" +#line 1865 "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; @@ -3121,7 +3108,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 1977 "hint.w" +#line 1981 "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; @@ -3141,7 +3128,7 @@ case TAG(vset_kind,b101):{pointer p;HGET_SET(b101);vset(p,sto,st,sho,sh,x);happe 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 2119 "hint.w" +#line 2123 "hint.w" case TAG(hpack_kind,b000):HGET_PACK(hpack_kind,b000);break; case TAG(hpack_kind,b010):HGET_PACK(hpack_kind,b010);break; @@ -3161,7 +3148,7 @@ 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 2186 "hint.w" +#line 2190 "hint.w" case TAG(kern_kind,b000):{HGET_KERN(b000);}break; case TAG(kern_kind,b001):{HGET_KERN(b001);}break; @@ -3172,7 +3159,7 @@ 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 2235 "hint.w" +#line 2239 "hint.w" case TAG(leaders_kind,0):tail_append(hget_leaders_ref(HGET8));break; case TAG(leaders_kind,1):HGET_LEADERS(1);break; @@ -3182,7 +3169,7 @@ 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 2275 "hint.w" +#line 2279 "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; @@ -3192,7 +3179,7 @@ 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 2335 "hint.w" +#line 2339 "hint.w" case TAG(ligature_kind,0):tail_append(hget_ligature_ref(HGET8));break; case TAG(ligature_kind,1):HGET_LIG(1);break; @@ -3203,7 +3190,7 @@ 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 2385 "hint.w" +#line 2389 "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; @@ -3214,14 +3201,14 @@ 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 2448 "hint.w" +#line 2452 "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 2944 "hint.w" +#line 2948 "hint.w" case TAG(math_kind,b000):HGET_MATH(b000);break; case TAG(math_kind,b001):HGET_MATH(b001);break; @@ -3230,16 +3217,16 @@ 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 2973 "hint.w" +#line 2977 "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 2999 "hint.w" +#line 3003 "hint.w" case TAG(adjust_kind,1):HGET_ADJUST(1);break; /*:179*//*182:*/ -#line 3027 "hint.w" +#line 3031 "hint.w" case TAG(table_kind,b000):HGET_TABLE(b000);break; case TAG(table_kind,b001):HGET_TABLE(b001);break; @@ -3259,12 +3246,12 @@ 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 3123 "hint.w" +#line 3118 "hint.w" case TAG(stream_kind,b000):HGET_STREAM(b000);break; case TAG(stream_kind,b010):HGET_STREAM(b010);break; /*:187*//*191:*/ -#line 3160 "hint.w" +#line 3155 "hint.w" case TAG(image_kind,b000):hget_image_ref(HGET8);break; case TAG(image_kind,b100):HGET_IMAGE(b100);break; @@ -3272,14 +3259,14 @@ 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 3198 "hint.w" +#line 3193 "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 1186 "hint.w" +#line 1190 "hint.w" default: TAGERR(a); @@ -3288,24 +3275,24 @@ TAGERR(a); void hget_content(void) {/*74:*/ -#line 1161 "hint.w" +#line 1165 "hint.w" uint8_t a,z; HGETTAG(a); /*:74*/ -#line 1193 "hint.w" +#line 1197 "hint.w" node_pos= (hpos-hstart)-1; hget_node(a); /*75:*/ -#line 1166 "hint.w" +#line 1170 "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 1196 "hint.w" +#line 1200 "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); @@ -3322,13 +3309,13 @@ tail= head; return p; } /*:76*//*163:*/ -#line 2769 "hint.w" +#line 2773 "hint.w" void set_line_break_params(void) {hset_param_list(line_break_params); } /*:163*//*199:*/ -#line 3331 "hint.w" +#line 3326 "hint.w" pointer skip(uint8_t n) {return cur_page->s[n].g;} @@ -3340,7 +3327,7 @@ scaled dimen(uint8_t n) {return xdimen(&cur_page->s[n].x);} /*:199*//*200:*/ -#line 3356 "hint.w" +#line 3351 "hint.w" void hpage_init(void) {int i; @@ -3363,7 +3350,7 @@ add_glue_ref(top_skip); } } /*:200*//*202:*/ -#line 3387 "hint.w" +#line 3382 "hint.w" void hflush_contribution_list(void) {if(link(contrib_head)!=null) @@ -3372,7 +3359,7 @@ link(contrib_head)= null;tail= contrib_head; } } /*:202*//*204:*/ -#line 3431 "hint.w" +#line 3426 "hint.w" static bool hbuild_page_up(void) { @@ -3384,12 +3371,12 @@ int pi= 0; if(link(contrib_head)==null)return false; do{p= link(contrib_head); /*209:*/ -#line 3553 "hint.w" +#line 3548 "hint.w" switch(type(p)){ case hlist_node:case vlist_node:case rule_node: /*206:*/ -#line 3497 "hint.w" +#line 3492 "hint.w" if(page_contents<box_there) {if(page_contents==empty)freeze_page_specs(box_there); @@ -3398,17 +3385,17 @@ if(depth(p)> page_max_depth) page_total= depth(p)-page_max_depth; depth(p)= 0; /*207:*/ -#line 3523 "hint.w" +#line 3518 "hint.w" {page_top_height= width(top_skip); page_total= page_total+page_top_height; } /*:207*/ -#line 3504 "hint.w" +#line 3499 "hint.w" } /*208:*/ -#line 3532 "hint.w" +#line 3527 "hint.w" {int i; for(i= 1;i<=6;i++) @@ -3417,7 +3404,7 @@ top_so_far[i]= 0; } } /*:208*/ -#line 3506 "hint.w" +#line 3501 "hint.w" page_total+= page_height+depth(p); if(height(p)> page_top_height) @@ -3427,15 +3414,15 @@ page_height= page_top_height; else page_height= height(p); /*:206*/ -#line 3556 "hint.w" +#line 3551 "hint.w" goto contribute; case whatsit_node:goto contribute; case glue_node:/*212:*/ -#line 3591 "hint.w" +#line 3586 "hint.w" if(link(p)==null)return false; /*213:*/ -#line 3598 "hint.w" +#line 3593 "hint.w" #define top_shrink top_so_far[6] #define top_total top_so_far[1] @@ -3448,15 +3435,15 @@ top_shrink+= shrink(q); top_total+= width(q); } /*:213*/ -#line 3593 "hint.w" +#line 3588 "hint.w" if(page_contents==empty||!precedes_break(link(p)))goto contribute; pi= 0; /*:212*/ -#line 3558 "hint.w" +#line 3553 "hint.w" break; case kern_node:/*214:*/ -#line 3614 "hint.w" +#line 3609 "hint.w" top_total+= width(p); if(page_contents==empty|| @@ -3465,21 +3452,21 @@ type(link(page_head))!=glue_node) goto contribute; pi= 0; /*:214*/ -#line 3559 "hint.w" +#line 3554 "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 3648 "hint.w" +#line 3643 "hint.w" if(pi<inf_penalty) {/*215:*/ -#line 3628 "hint.w" +#line 3623 "hint.w" /*216:*/ -#line 3639 "hint.w" +#line 3634 "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; @@ -3488,7 +3475,7 @@ 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 3629 "hint.w" +#line 3624 "hint.w" ; if(b<awful_bad) {if(pi<=eject_penalty)c= pi; @@ -3498,7 +3485,7 @@ else c= deplorable; else c= b; if(insert_penalties>=10000)c= awful_bad; /*:215*/ -#line 3650 "hint.w" +#line 3645 "hint.w" if(c<=least_page_cost) {best_page_break= p;best_size= page_goal; @@ -3512,7 +3499,7 @@ r= link(r); if((c==awful_bad)||(pi<=eject_penalty)) { /*218:*/ -#line 3678 "hint.w" +#line 3673 "hint.w" if(p!=best_page_break) {while(link(page_head)!=best_page_break) @@ -3524,10 +3511,10 @@ link(head)= q; } } /*:218*/ -#line 3662 "hint.w" +#line 3657 "hint.w" /*219:*/ -#line 3696 "hint.w" +#line 3691 "hint.w" hloc_set_prev(link(page_head)); while(true){ @@ -3547,7 +3534,7 @@ link(q)= link(page_head); link(page_head)= q; best_page_break= null; /*:219*/ -#line 3663 "hint.w" +#line 3658 "hint.w" hpack_page(); hfill_page_template(); @@ -3555,11 +3542,11 @@ return true; } } /*:217*/ -#line 3564 "hint.w" +#line 3559 "hint.w" contribute: /*210:*/ -#line 3571 "hint.w" +#line 3566 "hint.w" link(contrib_head)= link(p); link(p)= link(page_head); @@ -3567,31 +3554,31 @@ if(link(page_head)==null)page_tail= p; link(page_head)= p; goto done; /*:210*/ -#line 3566 "hint.w" +#line 3561 "hint.w" done1:/*211:*/ -#line 3579 "hint.w" +#line 3574 "hint.w" link(contrib_head)= link(p);link(p)= null;flush_node_list(p); /*:211*/ -#line 3567 "hint.w" +#line 3562 "hint.w" done: /*:209*/ -#line 3441 "hint.w" +#line 3436 "hint.w" ; }while(link(contrib_head)!=null); tail= contrib_head; return false; } /*:204*//*221:*/ -#line 3772 "hint.w" +#line 3767 "hint.w" static void clear_map(void) {memset(map,0,sizeof(map)); } /*:221*//*222:*/ -#line 3785 "hint.w" +#line 3780 "hint.w" void store_map(pointer p,uint32_t pos0,uint32_t offset) {map[p]= pos0; @@ -3602,7 +3589,7 @@ uint32_t hposition(pointer p) {return map[p]; } /*:222*//*229:*/ -#line 3895 "hint.w" +#line 3890 "hint.w" void hloc_init(void) {cur_loc= 0; @@ -3611,7 +3598,7 @@ page_loc[cur_loc]= 0; DBG(DBGPAGE,"loc_init: %d < %d < %d\n",lo_loc,cur_loc,hi_loc); } /*:229*//*234:*/ -#line 4031 "hint.w" +#line 4026 "hint.w" int hint_begin(void) {if(!hint_map())return 0; @@ -3648,7 +3635,7 @@ list_leaks(); hclear_dir(); } /*:234*//*238:*/ -#line 4134 "hint.w" +#line 4129 "hint.w" bool hint_forward(void) {hpage_init(); @@ -3662,7 +3649,7 @@ if(hbuild_page())return true; return false; } /*:238*//*239:*/ -#line 4175 "hint.w" +#line 4170 "hint.w" bool hint_backward(void) {hpage_init(); @@ -3676,7 +3663,7 @@ if(hbuild_page_up())return true; return false; } /*:239*//*241:*/ -#line 4203 "hint.w" +#line 4198 "hint.w" bool flush_pages(uint32_t pos) {pointer p= link(head); @@ -3693,18 +3680,18 @@ store_map(tail,pos,0); return false; } /*:241*//*263:*/ -#line 4716 "hint.w" +#line 4712 "hint.w" int hint_get_outline_max(void) {return max_outline;} /*:263*//*268:*/ -#line 4796 "hint.w" +#line 4792 "hint.w" hint_Outline*hint_get_outlines(void) {return hint_outlines; } /*:268*//*270:*/ -#line 4855 "hint.w" +#line 4851 "hint.w" static bool trv_ignore= false; static bool trv_skip_space= false; @@ -3770,7 +3757,7 @@ p= link(p); } } /*:270*/ -#line 7546 "hint.w" +#line 7548 "hint.w" /*:372*/ |