diff options
10 files changed, 1331 insertions, 1525 deletions
diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/error.h b/Build/source/texk/web2c/hitexdir/hintview/src/error.h index 53401a44e05..e952878199c 100644 --- a/Build/source/texk/web2c/hitexdir/hintview/src/error.h +++ b/Build/source/texk/web2c/hitexdir/hintview/src/error.h @@ -1,5 +1,5 @@ /*358:*/ -#line 7163 "hint.w" +#line 7159 "hint.w" #ifndef _ERROR_H #define _ERROR_H diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/hfonts.c b/Build/source/texk/web2c/hitexdir/hintview/src/hfonts.c index 8f4ff366883..a9713118b0a 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 @@ /*376:*/ -#line 7612 "hint.w" +#line 7614 "hint.w" #include "basetypes.h" #include "error.h" @@ -13,19 +13,19 @@ #include "rendernative.h" /*308:*/ -#line 5724 "hint.w" +#line 5720 "hint.w" static Font*fonts[0x100]= {NULL}; /*:308*//*315:*/ -#line 5860 "hint.w" +#line 5856 "hint.w" static Gcache g_undefined= {0}; /*:315*//*349:*/ -#line 7007 "hint.w" +#line 7003 "hint.w" static FT_Library ft_library= NULL; /*:349*/ -#line 7624 "hint.w" +#line 7626 "hint.w" /*35:*/ #line 562 "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 7625 "hint.w" +#line 7627 "hint.w" /*314:*/ -#line 5817 "hint.w" +#line 5813 "hint.w" #define G0_BITS 7 #define G0_SIZE (1<<G0_BITS) @@ -71,7 +71,7 @@ return f->g0[cc]; return NULL; } /*:314*//*316:*/ -#line 5864 "hint.w" +#line 5860 "hint.w" static Gcache*hnew_g(Gcache**g) {if(*g==NULL) @@ -126,24 +126,24 @@ else if(cc<G123_SIZE*G123_SIZE*G123_SIZE*G0_SIZE)return hnew_g3(&(f->g3),cc); else return&g_undefined; } /*:316*/ -#line 7626 "hint.w" +#line 7628 "hint.w" /*353:*/ -#line 7041 "hint.w" +#line 7037 "hint.w" int unpack_ft_file(Font*f) {int e; /*350:*/ -#line 7011 "hint.w" +#line 7007 "hint.w" if(ft_library==NULL) {int e= FT_Init_FreeType(&ft_library); if(e)QUIT("Unable to initialize the FreeType library"); } /*:350*/ -#line 7045 "hint.w" +#line 7041 "hint.w" f->hpxs= 72.27/xdpi; f->vpxs= 72.27/ydpi; @@ -151,15 +151,15 @@ e= FT_New_Memory_Face(ft_library, f->font_data,f->data_size,0,&(f->tt.face)); if(e)return 0; /*354:*/ -#line 7066 "hint.w" +#line 7062 "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); /*:354*/ -#line 7051 "hint.w" +#line 7047 "hint.w" /*355:*/ -#line 7074 "hint.w" +#line 7070 "hint.w" e= FT_Set_Char_Size( f->tt.face, @@ -170,13 +170,13 @@ f->tt.face, if(e)QUIT("Unable to set FreeType glyph size"); FT_Set_Transform(f->tt.face,0,0); /*:355*/ -#line 7052 "hint.w" +#line 7048 "hint.w" f->ff= ft_format; return 1; } /*:353*//*356:*/ -#line 7097 "hint.w" +#line 7093 "hint.w" static void ft_unpack_glyph(Font*f,Gcache*g,uint32_t cc) {int e,i; @@ -201,22 +201,22 @@ nativeSetFreeType(g); } /*:356*/ -#line 7628 "hint.w" +#line 7630 "hint.w" /*341:*/ -#line 6712 "hint.w" +#line 6708 "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) /*:341*//*343:*/ -#line 6739 "hint.w" +#line 6735 "hint.w" #define read_nybble(P) ((P).j&1?((P).data[(P).j++>>1]&0xF):(((P).data[(P).j++>>1]>>4)&0xF)) /*:343*//*344:*/ -#line 6765 "hint.w" +#line 6761 "hint.w" static int packed_number(PKparse*p) {int i,k; @@ -235,7 +235,7 @@ return packed_number(p); } } /*:344*//*345:*/ -#line 6794 "hint.w" +#line 6790 "hint.w" static void pk_runlength(Gcache*g,unsigned char*data){ PKparse p; @@ -277,7 +277,7 @@ y++; } } /*:345*//*346:*/ -#line 6846 "hint.w" +#line 6842 "hint.w" static void pk_bitmap(Gcache*g,unsigned char*data){ unsigned char*bits; @@ -298,7 +298,7 @@ if(mask==0){data++;mask= 0x80;} } } /*:346*//*347:*/ -#line 6869 "hint.w" +#line 6865 "hint.w" static void pkunpack_glyph(Gcache*g) @@ -341,7 +341,7 @@ else pk_runlength(g,data+i); nativeSetPK(g); } /*:347*//*348:*/ -#line 6914 "hint.w" +#line 6910 "hint.w" static Gcache*hnew_glyph(Font*pk,unsigned int cc); @@ -427,11 +427,11 @@ return 1; } /*:348*/ -#line 7630 "hint.w" +#line 7632 "hint.w" /*309:*/ -#line 5730 "hint.w" +#line 5726 "hint.w" struct font_s*hget_font(unsigned char f) {Font*fp; @@ -453,14 +453,14 @@ hpos= spos;hstart= sstart;hend= send; } fp->s= font_at_size(f)/(double)(1<<16); /*338:*/ -#line 6649 "hint.w" +#line 6645 "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;} } /*:338*//*357:*/ -#line 7124 "hint.w" +#line 7120 "hint.w" else if(unpack_ft_file(fp)) fp->ff= ft_format; @@ -469,13 +469,13 @@ else free(fp);fp= NULL; } /*:357*/ -#line 5750 "hint.w" +#line 5746 "hint.w" fonts[f]= fp; return fonts[f]; } /*:309*//*311:*/ -#line 5768 "hint.w" +#line 5764 "hint.w" static void hfree_glyph_cache(Font*f,bool rm); @@ -489,7 +489,7 @@ if(rm){free(fonts[f]);fonts[f]= NULL;} } } /*:311*//*317:*/ -#line 5928 "hint.w" +#line 5924 "hint.w" static void hfree_g0(struct gcache_s**g,bool rm) {int i; @@ -554,7 +554,7 @@ if(rm){free(f->g3);f->g3= NULL;} } } /*:317*//*319:*/ -#line 6054 "hint.w" +#line 6050 "hint.w" Gcache*hget_glyph(Font*f,unsigned int cc) { @@ -574,7 +574,7 @@ else QUIT("Font format not supported"); return g; } /*:319*//*321:*/ -#line 6086 "hint.w" +#line 6082 "hint.w" void render_char(int x,int y,struct font_s*f,uint32_t cc,uint8_t s) @@ -590,7 +590,7 @@ nativeGlyph(SP2PT(x),dx,SP2PT(y),dy,w,h,g,s); } /*:321*/ -#line 7632 "hint.w" +#line 7634 "hint.w" /*:376*/ diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/hfonts.h b/Build/source/texk/web2c/hitexdir/hintview/src/hfonts.h index ad96ffa63b3..63166cef1b0 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 @@ /*375:*/ -#line 7601 "hint.w" +#line 7603 "hint.w" #ifndef _HFONTS_H #define _HFONTS_H /*306:*/ -#line 5696 "hint.w" +#line 5692 "hint.w" typedef enum{no_format,pk_format,ft_format}FontFormat; /*:306*//*307:*/ -#line 5708 "hint.w" +#line 5704 "hint.w" /*339:*/ -#line 6688 "hint.w" +#line 6684 "hint.w" typedef struct @@ -22,19 +22,19 @@ double ds; unsigned char id; }PKfont; /*:339*//*351:*/ -#line 7019 "hint.w" +#line 7015 "hint.w" typedef struct {FT_Face face; }FTfont; /*:351*//*352:*/ -#line 7026 "hint.w" +#line 7022 "hint.w" typedef struct {int dummy; }FTglyph; /*:352*/ -#line 5709 "hint.w" +#line 5705 "hint.w" typedef struct font_s{ @@ -44,7 +44,7 @@ int data_size; double s; double hpxs,vpxs; /*313:*/ -#line 5803 "hint.w" +#line 5799 "hint.w" struct gcache_s**g0; struct gcache_s***g1; @@ -52,23 +52,23 @@ struct gcache_s****g2; struct gcache_s*****g3; /*:313*/ -#line 5717 "hint.w" +#line 5713 "hint.w" FontFormat ff; union{PKfont pk;FTfont tt;}; }Font; /*:307*//*318:*/ -#line 6015 "hint.w" +#line 6011 "hint.w" /*340:*/ -#line 6701 "hint.w" +#line 6697 "hint.w" typedef struct {unsigned char flag; unsigned char*encoding; }PKglyph; /*:340*//*342:*/ -#line 6728 "hint.w" +#line 6724 "hint.w" typedef struct{ int j; @@ -77,7 +77,7 @@ int f; unsigned char*data; }PKparse; /*:342*/ -#line 6016 "hint.w" +#line 6012 "hint.w" struct gcache_s{ @@ -93,7 +93,7 @@ FTglyph tt; }; typedef struct gcache_s Gcache; /*:318*/ -#line 7605 "hint.w" +#line 7607 "hint.w" 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*/ diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/hint.h b/Build/source/texk/web2c/hitexdir/hintview/src/hint.h index c0d0a62f263..87cb3e016a1 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 @@ /*371:*/ -#line 7509 "hint.w" +#line 7511 "hint.w" #ifndef _HINT_H_ #define _HINT_H_ @@ -8,48 +8,48 @@ typedef uint16_t pointer; typedef int scaled; /*44:*/ -#line 728 "hint.w" +#line 741 "hint.w" extern void hrestore_param_list(void); /*:44*//*49:*/ -#line 783 "hint.w" +#line 796 "hint.w" typedef struct{ pointer p,t; }Stream; extern Stream*streams; /*:49*//*64:*/ -#line 1009 "hint.w" +#line 1013 "hint.w" extern void hfill_page_template(void); /*:64*//*77:*/ -#line 1213 "hint.w" +#line 1217 "hint.w" void hget_content(void); /*:77*//*81:*/ -#line 1268 "hint.w" +#line 1272 "hint.w" extern void hteg_content(void); /*:81*//*164:*/ -#line 2774 "hint.w" +#line 2778 "hint.w" extern void set_line_break_params(void); /*:164*//*166:*/ -#line 2814 "hint.w" +#line 2818 "hint.w" extern void hget_par_node(uint32_t offset); /*:166*//*171:*/ -#line 2914 "hint.w" +#line 2918 "hint.w" extern void hteg_par_node(uint32_t offset); /*:171*//*197:*/ -#line 3267 "hint.w" +#line 3262 "hint.w" extern pointer*pointer_def[32]; extern scaled*dimen_def; extern int32_t*integer_def; /*:197*//*198:*/ -#line 3322 "hint.w" +#line 3317 "hint.w" extern Stream*streams; extern bool flush_pages(uint32_t pos); @@ -58,15 +58,15 @@ extern pointer*box_ptr(uint8_t n); extern int count(uint8_t n); extern scaled dimen(uint8_t n); /*:198*//*201:*/ -#line 3379 "hint.w" +#line 3374 "hint.w" extern void hpage_init(void); /*:201*//*203:*/ -#line 3396 "hint.w" +#line 3391 "hint.w" extern void hflush_contribution_list(void); /*:203*//*223:*/ -#line 3799 "hint.w" +#line 3794 "hint.w" #define HINT_NO_LOC 0xFFFFFFFFFFFFFFFF #define PAGE_LOC(POS0,OFF) (((uint64_t)((POS0)+(OFF))<<32) + (uint64_t)(OFF)) @@ -74,19 +74,19 @@ extern void hflush_contribution_list(void); #define LOC_OFF(P) ((P)&0xFFFFFFFF) #define LOC_POS0(P) (LOC_POS(P)-LOC_OFF(P)) /*:223*//*226:*/ -#line 3836 "hint.w" +#line 3831 "hint.w" extern uint64_t page_loc[]; extern int cur_loc; /*:226*//*228:*/ -#line 3885 "hint.w" +#line 3880 "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 4000 "hint.w" +#line 3995 "hint.w" extern void hloc_init(void); extern void store_map(pointer p,uint32_t pos,uint32_t offset); @@ -94,23 +94,23 @@ extern uint32_t hposition(pointer p); extern void hloc_set(uint64_t h); extern void hloc_set_next(pointer p); /*:233*//*235:*/ -#line 4069 "hint.w" +#line 4064 "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 4193 "hint.w" +#line 4188 "hint.w" extern bool hint_forward(void); extern bool hint_backward(void); /*:240*//*243:*/ -#line 4224 "hint.w" +#line 4219 "hint.w" extern scaled hvsize,hhsize; /*:243*//*264:*/ -#line 4729 "hint.w" +#line 4725 "hint.w" typedef struct{ uint64_t pos; @@ -121,26 +121,26 @@ char*title; }hint_Outline; extern hint_Outline*hint_outlines; /*:264*//*265:*/ -#line 4747 "hint.w" +#line 4743 "hint.w" #define LABEL_UNDEF 0 #define LABEL_TOP 1 #define LABEL_BOT 2 #define LABEL_MID 3 /*:265*//*269:*/ -#line 4806 "hint.w" +#line 4802 "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 4921 "hint.w" +#line 4917 "hint.w" extern void trv_init(void(*f)(uint32_t c)); extern void trv_vlist(pointer p); extern void trv_hlist(pointer p); /*:271*//*300:*/ -#line 5513 "hint.w" +#line 5509 "hint.w" typedef struct{ uint64_t pos; @@ -150,17 +150,17 @@ int top,bottom,left,right; extern hint_Link*hint_links; extern int max_link; /*:300*//*305:*/ -#line 5675 "hint.w" +#line 5671 "hint.w" extern int hint_find_link(scaled x,scaled y,scaled precission); extern uint64_t hint_link_page(int i); /*:305*//*370:*/ -#line 7492 "hint.w" +#line 7494 "hint.w" extern void leak_in(pointer p,int s); extern void leak_out(pointer p,int s); /*:370*/ -#line 7516 "hint.w" +#line 7518 "hint.w" #endif diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/hrender.c b/Build/source/texk/web2c/hitexdir/hintview/src/hrender.c index ec38f3f3990..ddd7f66579a 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 @@ /*374:*/ -#line 7581 "hint.w" +#line 7583 "hint.w" #include "basetypes.h" #include "error.h" @@ -13,57 +13,57 @@ #include "hint.h" /*310:*/ -#line 5757 "hint.w" +#line 5753 "hint.w" extern struct font_s*hget_font(unsigned char f); /*:310*//*322:*/ -#line 6102 "hint.w" +#line 6098 "hint.w" extern void render_char(int x,int y,struct font_s*f,uint32_t cc,uint8_t s); /*:322*/ -#line 7593 "hint.w" +#line 7595 "hint.w" /*236:*/ -#line 4098 "hint.w" +#line 4093 "hint.w" double xdpi= 600.0,ydpi= 600.0; /*:236*//*254:*/ -#line 4456 "hint.w" +#line 4452 "hint.w" static bool forward_mode= false,backward_mode= false; /*:254*//*273:*/ -#line 4968 "hint.w" +#line 4964 "hint.w" static char*m_str; static int m_length,m_chars; /*:273*//*277:*/ -#line 5039 "hint.w" +#line 5035 "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 5140 "hint.w" +#line 5136 "hint.w" static int m_state,m_spaces; static uint32_t m_d; /*:280*//*285:*/ -#line 5262 "hint.w" +#line 5258 "hint.w" static int m_focus; static uint64_t m_page; /*:285*//*288:*/ -#line 5298 "hint.w" +#line 5294 "hint.w" static bool c_ignore; static int m_style; /*:288*//*296:*/ -#line 5467 "hint.w" +#line 5463 "hint.w" static int cur_link= -1; /*:296*//*325:*/ -#line 6144 "hint.w" +#line 6140 "hint.w" static scaled cur_h,cur_v; static scaled rule_ht,rule_dp,rule_wd; @@ -71,10 +71,10 @@ static int cur_f; static struct font_s*cur_fp; static uint8_t cur_style= 0; /*:325*/ -#line 7595 "hint.w" +#line 7597 "hint.w" /*237:*/ -#line 4102 "hint.w" +#line 4097 "hint.w" void hint_resize(int px_h,int px_v,double x_dpi,double y_dpi) { @@ -96,7 +96,7 @@ forward_mode= false; backward_mode= false; } /*:237*//*248:*/ -#line 4321 "hint.w" +#line 4317 "hint.w" uint64_t hint_page_top(uint64_t h) @@ -117,7 +117,7 @@ backward_mode= false; return h; } /*:248*//*249:*/ -#line 4344 "hint.w" +#line 4340 "hint.w" uint64_t hint_page_get(void) { @@ -127,7 +127,7 @@ if(hin_addr==NULL)return 0; return page_loc[cur_loc]; } /*:249*//*250:*/ -#line 4360 "hint.w" +#line 4356 "hint.w" uint64_t hint_page(void) {uint64_t i; @@ -139,14 +139,14 @@ else return hint_page_top(i); } /*:250*//*251:*/ -#line 4376 "hint.w" +#line 4372 "hint.w" uint64_t hint_page_home(void) {uint64_t pos; uint8_t where; int n= zero_label_no; /*71:*/ -#line 1083 "hint.w" +#line 1087 "hint.w" where= labels[n].where; #if 1 @@ -155,21 +155,21 @@ pos= ((uint64_t)labels[n].pos<<32)+(labels[n].pos-labels[n].pos0); pos= ((uint64_t)labels[n].pos0<<32); #endif /*:71*/ -#line 4381 "hint.w" +#line 4377 "hint.w" /*267:*/ -#line 4769 "hint.w" +#line 4765 "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 4382 "hint.w" +#line 4378 "hint.w" } /*:251*//*252:*/ -#line 4403 "hint.w" +#line 4399 "hint.w" double hint_get_fpos(void) { @@ -179,7 +179,7 @@ if(hin_addr==NULL)return 0.0; return(double)LOC_POS(page_loc[cur_loc])/(double)(hend-hstart); } /*:252*//*253:*/ -#line 4417 "hint.w" +#line 4413 "hint.w" uint64_t hint_set_fpos(double fpos) {uint32_t pos,pos0; @@ -214,7 +214,7 @@ pos= pos0= hpos-hstart; return hint_page_top(PAGE_LOC(pos0,pos-pos0)); } /*:253*//*255:*/ -#line 4461 "hint.w" +#line 4457 "hint.w" uint64_t hint_page_next(void) {if(hin_addr==NULL)return 0; @@ -231,7 +231,7 @@ return hint_page(); } } /*:255*//*256:*/ -#line 4486 "hint.w" +#line 4482 "hint.w" uint64_t hint_page_prev(void) {if(hin_addr==NULL)return 0; @@ -249,7 +249,7 @@ else return hint_page_bottom(hint_page_get()); } /*:256*//*257:*/ -#line 4512 "hint.w" +#line 4508 "hint.w" uint64_t hint_page_bottom(uint64_t h) {if(hin_addr==NULL)return 0; @@ -264,7 +264,7 @@ forward_mode= false; return hint_page_get(); } /*:257*//*258:*/ -#line 4537 "hint.w" +#line 4533 "hint.w" uint64_t hint_page_middle(uint64_t l) {uint32_t pos,pos0,offset; @@ -283,11 +283,11 @@ hget_content(); p= link(contrib_head); if(offset> 0) {/*259:*/ -#line 4576 "hint.w" +#line 4572 "hint.w" {while(p!=null) {/*260:*/ -#line 4603 "hint.w" +#line 4599 "hint.w" switch(type(p)) {case hlist_node:case vlist_node:case rule_node: @@ -310,7 +310,7 @@ default: pi= hp= dp= 0; } /*:260*/ -#line 4578 "hint.w" +#line 4574 "hint.w" h+= d+hp; d= dp; @@ -326,7 +326,7 @@ p= link(p); if(tp==null)ht= h; if(ht>=hvsize) {/*261:*/ -#line 4630 "hint.w" +#line 4626 "hint.w" pointer q= contrib_head; scaled dh= ht-hvsize/2; @@ -334,7 +334,7 @@ p= link(contrib_head); h= d= 0; while(p!=null) {/*260:*/ -#line 4603 "hint.w" +#line 4599 "hint.w" switch(type(p)) {case hlist_node:case vlist_node:case rule_node: @@ -357,7 +357,7 @@ default: pi= hp= dp= 0; } /*:260*/ -#line 4636 "hint.w" +#line 4632 "hint.w" h= h+d+hp; d= dp; @@ -372,19 +372,19 @@ flush_node_list(link(contrib_head)); link(contrib_head)= p; } /*:261*/ -#line 4592 "hint.w" +#line 4588 "hint.w" goto found; } } /*:259*/ -#line 4554 "hint.w" +#line 4550 "hint.w" } else if(p!=null&&type(p)==penalty_node) pi= penalty(p); /*262:*/ -#line 4655 "hint.w" +#line 4651 "hint.w" {pointer h_save= link(contrib_head); pointer t_save= tail; @@ -402,7 +402,7 @@ break; else p= link(p); /*260:*/ -#line 4603 "hint.w" +#line 4599 "hint.w" switch(type(p)) {case hlist_node:case vlist_node:case rule_node: @@ -425,7 +425,7 @@ default: pi= hp= dp= 0; } /*:260*/ -#line 4671 "hint.w" +#line 4667 "hint.w" h= h+dp+hp; if(pi<best_pi) @@ -456,7 +456,7 @@ tail= t_save; hpos= hpos_save; } /*:262*/ -#line 4558 "hint.w" +#line 4554 "hint.w" found: hloc_set(PAGE_LOC(pos0,offset)); @@ -466,7 +466,7 @@ backward_mode= false; return hint_page_get(); } /*:258*//*266:*/ -#line 4758 "hint.w" +#line 4754 "hint.w" uint64_t hint_outline_page(int i) {uint64_t pos; @@ -475,24 +475,24 @@ if(i<0||i> max_outline)return hint_page_get(); pos= hint_outlines[i].pos; where= hint_outlines[i].where; /*267:*/ -#line 4769 "hint.w" +#line 4765 "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 4765 "hint.w" +#line 4761 "hint.w" } /*:266*//*274:*/ -#line 4973 "hint.w" +#line 4969 "hint.w" void hint_set_mark(char*m,int s) {m_str= m; m_length= s; /*275:*/ -#line 4984 "hint.w" +#line 4980 "hint.w" if(m_length> 0) {int i,j,k; @@ -508,12 +508,12 @@ m_length= k; m_chars= m_length-j; } /*:275*/ -#line 4977 "hint.w" +#line 4973 "hint.w" hmark_page(); } /*:274*//*278:*/ -#line 5073 "hint.w" +#line 5069 "hint.w" static void m_put(uint32_t d) {if(m_ptr<MAX_M_DIST) @@ -550,7 +550,7 @@ x= (x<<7)+y; } } /*:278*//*279:*/ -#line 5114 "hint.w" +#line 5110 "hint.w" static int m_next(int i) {while((0x80&m_dist[i])==0)i++; @@ -565,7 +565,7 @@ while(i> 0&&(0x80&m_dist[i-1])==0)i--; return i; } /*:279*//*281:*/ -#line 5145 "hint.w" +#line 5141 "hint.w" static void next_m_char(uint32_t c) { @@ -586,7 +586,7 @@ m_state= 0; } else /*282:*/ -#line 5179 "hint.w" +#line 5175 "hint.w" {int i= 0,j= 0; do{ @@ -598,13 +598,13 @@ m_state= m_state-i; goto reconsider; } /*:282*/ -#line 5164 "hint.w" +#line 5160 "hint.w" } /*:281*//*283:*/ -#line 5192 "hint.w" +#line 5188 "hint.w" #if 0 static void next_m_space(void) @@ -626,7 +626,7 @@ else if(m_state> 0) } #endif /*:283*//*284:*/ -#line 5215 "hint.w" +#line 5211 "hint.w" #if 0 static void vlist_mark(pointer p); @@ -673,7 +673,7 @@ p= link(p); } #endif /*:284*//*286:*/ -#line 5268 "hint.w" +#line 5264 "hint.w" void hmark_page(void) {if(streams==NULL||streams[0].p==null)return; @@ -695,13 +695,13 @@ m_put(0xFF); if(m_focus>=m_max)m_focus= 0; } /*:286*//*293:*/ -#line 5383 "hint.w" +#line 5379 "hint.w" void c_ignore_list(pointer p) {while(p!=null) {if(is_char_node(p)) {/*290:*/ -#line 5323 "hint.w" +#line 5319 "hint.w" {while(m_d==0) {m_style^= MARK_BIT; @@ -717,7 +717,7 @@ m_d= m_get(); m_d--; } /*:290*/ -#line 5387 "hint.w" +#line 5383 "hint.w" cur_style|= m_style; } @@ -729,7 +729,7 @@ case ligature_node: {pointer q= lig_ptr(p); while(q!=null) {/*290:*/ -#line 5323 "hint.w" +#line 5319 "hint.w" {while(m_d==0) {m_style^= MARK_BIT; @@ -745,7 +745,7 @@ m_d= m_get(); m_d--; } /*:290*/ -#line 5397 "hint.w" +#line 5393 "hint.w" cur_style|= m_style; q= link(q); @@ -758,7 +758,7 @@ p= link(p); } } /*:293*//*294:*/ -#line 5430 "hint.w" +#line 5426 "hint.w" bool hint_prev_mark(void) {m_focus= m_prev(m_focus); @@ -779,7 +779,7 @@ m_focus= m_next(0); return(m_focus!=0); } /*:294*//*302:*/ -#line 5531 "hint.w" +#line 5527 "hint.w" static int links_allocated= 0; void add_new_link(int n,pointer p,scaled h,scaled v) @@ -800,7 +800,7 @@ REALLOCATE(hint_links,links_allocated,hint_Link); t= hint_links+max_link; REF_RNG(label_kind,n); /*71:*/ -#line 1083 "hint.w" +#line 1087 "hint.w" where= labels[n].where; #if 1 @@ -809,7 +809,7 @@ pos= ((uint64_t)labels[n].pos<<32)+(labels[n].pos-labels[n].pos0); pos= ((uint64_t)labels[n].pos0<<32); #endif /*:71*/ -#line 5550 "hint.w" +#line 5546 "hint.w" t->where= where; t->pos= pos; @@ -837,7 +837,7 @@ else t->bottom= v; } /*:302*//*303:*/ -#line 5600 "hint.w" +#line 5596 "hint.w" static scaled hlink_distance(scaled x,scaled y,hint_Link*t) {scaled d,dx= 0,dy= 0; @@ -893,7 +893,7 @@ return last_hit; } } /*:303*//*304:*/ -#line 5660 "hint.w" +#line 5656 "hint.w" uint64_t hint_link_page(int i) {uint64_t h; @@ -907,14 +907,14 @@ else if(w==LABEL_MID)return hint_page_middle(h); else return hint_page_get(); } /*:304*//*323:*/ -#line 6109 "hint.w" +#line 6105 "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)); } /*:323*//*324:*/ -#line 6120 "hint.w" +#line 6116 "hint.w" void render_image(int x,int y,int w,int h,uint32_t n) { @@ -925,7 +925,7 @@ nativeImage(SP2PT(x),SP2PT(y),SP2PT(w),SP2PT(h),hstart,hend); hpos= spos;hstart= sstart;hend= send; } /*:324*//*326:*/ -#line 6152 "hint.w" +#line 6148 "hint.w" static void vlist_render(pointer this_box); @@ -960,7 +960,7 @@ this_box,mem[this_box].i,p); base_line= cur_v; left_edge= cur_h; /*299:*/ -#line 5497 "hint.w" +#line 5493 "hint.w" if(cur_link>=0) {add_new_link(cur_link,this_box,cur_h,cur_v); @@ -968,7 +968,7 @@ local_link= cur_link; cur_link= -1; } /*:299*/ -#line 6185 "hint.w" +#line 6181 "hint.w" while(p!=null) { @@ -985,7 +985,7 @@ c= character(p); if(!c_ignore&&c!=' ') {cur_style= cur_style&~(MARK_BIT|FOCUS_BIT); /*290:*/ -#line 5323 "hint.w" +#line 5319 "hint.w" {while(m_d==0) {m_style^= MARK_BIT; @@ -1001,7 +1001,7 @@ m_d= m_get(); m_d--; } /*:290*/ -#line 6200 "hint.w" +#line 6196 "hint.w" cur_style|= m_style; } @@ -1051,7 +1051,7 @@ rule_ht= height(p);rule_dp= depth(p);rule_wd= width(p); goto fin_rule; case whatsit_node: /*292:*/ -#line 5360 "hint.w" +#line 5356 "hint.w" if(subtype(p)==ignore_node) {if(ignore_info(p)==1) @@ -1063,10 +1063,10 @@ else c_ignore= false; } /*:292*/ -#line 6248 "hint.w" +#line 6244 "hint.w" else/*297:*/ -#line 5471 "hint.w" +#line 5467 "hint.w" if(subtype(p)==start_link_node) {cur_style|= LINK_BIT; @@ -1079,7 +1079,7 @@ end_new_link(local_link,this_box,cur_h,cur_v); local_link= -1; } /*:297*/ -#line 6249 "hint.w" +#line 6245 "hint.w" else if(subtype(p)==image_node) {scaled h,w; @@ -1174,7 +1174,7 @@ case ligature_node: f= font(lig_char(p)); c= character(lig_char(p)); /*291:*/ -#line 5342 "hint.w" +#line 5338 "hint.w" if(!c_ignore) {pointer q; @@ -1182,7 +1182,7 @@ cur_style= cur_style&~(MARK_BIT|FOCUS_BIT); q= lig_ptr(p); while(q!=null) {/*290:*/ -#line 5323 "hint.w" +#line 5319 "hint.w" {while(m_d==0) {m_style^= MARK_BIT; @@ -1198,14 +1198,14 @@ m_d= m_get(); m_d--; } /*:290*/ -#line 5348 "hint.w" +#line 5344 "hint.w" cur_style|= m_style; q= link(q); } } /*:291*/ -#line 6342 "hint.w" +#line 6338 "hint.w" goto render_c; default:; @@ -1232,14 +1232,14 @@ p= link(p); } } /*298:*/ -#line 5487 "hint.w" +#line 5483 "hint.w" if(local_link>=0) {end_new_link(local_link,this_box,cur_h,cur_v); cur_link= local_link; } /*:298*/ -#line 6367 "hint.w" +#line 6363 "hint.w" } @@ -1409,14 +1409,14 @@ p= link(p); } /*:326*//*327:*/ -#line 6542 "hint.w" +#line 6538 "hint.w" uint64_t hint_blank(void) {nativeBlank(); return 0; } /*:327*//*328:*/ -#line 6551 "hint.w" +#line 6547 "hint.w" void hint_render(void) @@ -1427,11 +1427,11 @@ cur_v= height(streams[0].p); cur_f= -1;cur_fp= NULL; cur_link= -1;max_link= -1; /*289:*/ -#line 5316 "hint.w" +#line 5312 "hint.w" m_ptr= 0;m_d= 0;m_style= MARK_BIT;c_ignore= false;cur_style= 0; /*:289*/ -#line 6560 "hint.w" +#line 6556 "hint.w" if(type(streams[0].p)==vlist_node) vlist_render(streams[0].p); @@ -1439,6 +1439,6 @@ else hlist_render(streams[0].p); } /*:328*/ -#line 7596 "hint.w" +#line 7598 "hint.w" /*:374*/ diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/hrender.h b/Build/source/texk/web2c/hitexdir/hintview/src/hrender.h index f71feaa0d2e..c7e1f5e13e3 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 @@ /*373:*/ -#line 7551 "hint.w" +#line 7553 "hint.w" #ifndef _HRENDER_H #define _HRENDER_H /*276:*/ -#line 5006 "hint.w" +#line 5002 "hint.w" #define MARK_BIT 0x1 #define FOCUS_BIT 0x2 /*:276*//*295:*/ -#line 5456 "hint.w" +#line 5452 "hint.w" #define LINK_BIT 0x4 /*:295*//*320:*/ -#line 6083 "hint.w" +#line 6079 "hint.w" #define SP2PT(X) ((X)/(double)(1<<16)) /*:320*/ -#line 7554 "hint.w" +#line 7556 "hint.w" extern int page_h,page_v; diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/htex.c b/Build/source/texk/web2c/hitexdir/hintview/src/htex.c index c191e47cdbb..6bbde3f5ee7 100644 --- a/Build/source/texk/web2c/hitexdir/hintview/src/htex.c +++ b/Build/source/texk/web2c/hitexdir/hintview/src/htex.c @@ -1,5 +1,5 @@ /*4:*/ -#line 16 "htex.ch" +#line 255 "htex.w" #ifndef _HETX_H_ #define _HTEX_H_ @@ -13,25 +13,25 @@ #include "get.h" #include "htex.h" #include "hint.h" -/*120:*/ -#line 262 "htex.ch" +#ifdef STAT +#include "hprint.h" +#endif +/*121:*/ +#line 2578 "htex.w" pointer temp_ptr; -#line 2496 "btex.w" -/*:120*//*121:*/ -#line 273 "htex.ch" +/*:121*//*122:*/ +#line 2610 "htex.w" memory_word mem0[mem_max-mem_min+1],*const mem= mem0-mem_min; pointer lo_mem_max; pointer hi_mem_min; -#line 2531 "btex.w" -/*:121*//*122:*/ -#line 283 "htex.ch" +/*:122*//*123:*/ +#line 2623 "htex.w" static int var_used,dyn_used; -#line 2542 "btex.w" #ifdef STAT #define incr_dyn_used incr(dyn_used) #define decr_dyn_used decr(dyn_used) @@ -40,80 +40,70 @@ static int var_used,dyn_used; #define decr_dyn_used #endif -/*:122*//*123:*/ -#line 293 "htex.ch" +/*:123*//*124:*/ +#line 2647 "htex.w" static pointer avail; -#line 2566 "btex.w" -/*:123*//*129:*/ -#line 330 "htex.ch" +/*:124*//*130:*/ +#line 2750 "htex.w" static pointer rover; -#line 2670 "btex.w" -/*:129*//*658:*/ -#line 1093 "htex.ch" +/*:130*//*659:*/ +#line 13058 "htex.w" static scaled total_stretch0[filll-normal+1], *const total_stretch= total_stretch0-normal, total_shrink0[filll-normal+1],*const total_shrink= total_shrink0-normal; -#line 12962 "btex.w" -/*:658*//*660:*/ -#line 1103 "htex.ch" +/*:659*//*661:*/ +#line 13070 "htex.w" pointer adjust_tail= null; -#line 12970 "btex.w" -/*:660*//*829:*/ -#line 1220 "htex.ch" +/*:661*//*830:*/ +#line 16195 "htex.w" pointer just_box; -#line 16110 "btex.w" -/*:829*//*837:*/ -#line 1270 "htex.ch" +/*:830*//*838:*/ +#line 16332 "htex.w" static pointer passive; -#line 16253 "btex.w" static pointer printed_node; static halfword pass_number; -/*:837*//*840:*/ -#line 1277 "htex.ch" +/*:838*//*841:*/ +#line 16372 "htex.w" static scaled active_width0[6],*const active_width= active_width0-1; -#line 16292 "btex.w" static scaled cur_active_width0[6], *const cur_active_width= cur_active_width0-1; static scaled background0[6],*const background= background0-1; static scaled break_width0[6],*const break_width= break_width0-1; -/*:840*//*843:*/ -#line 1284 "htex.ch" +/*:841*//*844:*/ +#line 16431 "htex.w" static bool no_shrink_error_yet; -#line 16350 "btex.w" -/*:843*//*847:*/ -#line 1315 "htex.ch" +/*:844*//*848:*/ +#line 16474 "htex.w" static pointer cur_p; -#line 16410 "btex.w" static bool second_pass; static bool final_pass; static int threshold; -/*:847*//*853:*/ -#line 1324 "htex.ch" +/*:848*//*854:*/ +#line 16576 "htex.w" static int minimal_demerits0[tight_fit-very_loose_fit+1], *const minimal_demerits= minimal_demerits0-very_loose_fit; -#line 16513 "btex.w" static int minimum_demerits; static pointer best_place0[tight_fit-very_loose_fit+1], @@ -123,17 +113,15 @@ static halfword best_pl_line0[tight_fit-very_loose_fit+1], *const best_pl_line= best_pl_line0-very_loose_fit; -/*:853*//*860:*/ -#line 1333 "htex.ch" +/*:854*//*861:*/ +#line 16698 "htex.w" static scaled disc_width; -#line 16632 "btex.w" -/*:860*//*869:*/ -#line 1340 "htex.ch" +/*:861*//*870:*/ +#line 16841 "htex.w" static halfword easy_line; -#line 16774 "btex.w" static halfword last_special_line; static scaled first_width; @@ -142,11 +130,10 @@ static scaled second_width; static scaled first_indent; static scaled second_indent; -/*:869*//*895:*/ -#line 1444 "htex.ch" +/*:870*//*896:*/ +#line 17347 "htex.w" static pointer best_bet; -#line 17288 "btex.w" static int fewest_demerits; static halfword best_line; static int actual_looseness; @@ -154,80 +141,71 @@ static int actual_looseness; static int line_diff; -/*:895*//*996:*/ -#line 1640 "htex.ch" +/*:896*//*997:*/ +#line 19151 "htex.w" scaled best_height_plus_depth; -#line 19052 "btex.w" -/*:996*//*1005:*/ -#line 1670 "htex.ch" +/*:997*//*1006:*/ +#line 19353 "htex.w" pointer page_tail; -#line 19258 "btex.w" int page_contents; scaled page_max_depth; pointer best_page_break; int least_page_cost; scaled best_size; -/*:1005*//*1007:*/ -#line 1681 "htex.ch" +/*:1006*//*1008:*/ +#line 19435 "htex.w" scaled page_so_far[8]; -#line 19343 "btex.w" int insert_penalties; -/*:1007*/ -#line 29 "htex.ch" +/*:1008*/ +#line 271 "htex.w" -/*97:*/ -#line 164 "htex.ch" +/*98:*/ +#line 2100 "htex.w" void overflow(char*s,int n) {QUIT("Capacity exceeded, sorry [%s=%d=0x%X]\n",s,n,n); } -#line 2028 "btex.w" -/*:97*//*98:*/ -#line 188 "htex.ch" +/*:98*//*99:*/ +#line 2113 "htex.w" void confusion(char*s) {QUIT("This can't happen(%s)",s);} -#line 2053 "btex.w" -/*:98*/ -#line 31 "htex.ch" +/*:99*/ +#line 273 "htex.w" #endif -#line 268 "btex.w" -/*:4*//*103:*/ -#line 197 "htex.ch" +/*:4*//*104:*/ +#line 2180 "htex.w" static int half(int x) -#line 2117 "btex.w" {if(odd(x))return(x+1)/2; else return x/2; } -/*:103*//*108:*/ -#line 233 "htex.ch" +/*:104*//*109:*/ +#line 2278 "htex.w" static bool arith_error; static scaled rem; -#line 2201 "btex.w" -/*:108*//*110:*/ -#line 241 "htex.ch" +/*:109*//*111:*/ +#line 2302 "htex.w" static scaled x_over_n(scaled x,int n) -#line 2223 "btex.w" {bool negative; scaled x_over_n; negative= false; @@ -246,11 +224,10 @@ else{x_over_n= -((-x)/n);rem= -((-x)%n); if(negative)negate(rem); return x_over_n;} -/*:110*//*111:*/ -#line 248 "htex.ch" +/*:111*//*112:*/ +#line 2329 "htex.w" static scaled xn_over_d(scaled x,int n,int d) -#line 2249 "btex.w" {bool positive; nonnegative_integer t,u,v; scaled xn_over_d; @@ -269,11 +246,10 @@ else{xn_over_d= -u;rem= -(v%d); } return xn_over_d;} -/*:111*//*112:*/ -#line 255 "htex.ch" +/*:112*//*113:*/ +#line 2369 "htex.w" halfword badness(scaled t,scaled s) -#line 2288 "btex.w" {int r; if(t==0)return 0; @@ -286,19 +262,16 @@ else return(r*r*r+0400000)/01000000; } } -/*:112*//*125:*/ -#line 300 "htex.ch" +/*:113*//*126:*/ +#line 2666 "htex.w" static pointer get_avail(void) -#line 2584 "btex.w" {pointer p; p= avail; if(p!=null)avail= link(avail); -#line 312 "htex.ch" else{decr(hi_mem_min);p= hi_mem_min; if(hi_mem_min<=lo_mem_max) { -#line 2593 "btex.w" overflow("main memory size",mem_max+1-mem_min); @@ -312,12 +285,11 @@ incr(dyn_used); return p; } -/*:125*//*128:*/ -#line 321 "htex.ch" +/*:126*//*129:*/ +#line 2713 "htex.w" static void flush_list(pointer p) -#line 2634 "btex.w" {pointer q,r; if(p!=null) {r= p; @@ -330,19 +302,18 @@ link(q)= avail;avail= p; } } -/*:128*//*130:*/ -#line 337 "htex.ch" +/*:129*//*131:*/ +#line 2761 "htex.w" pointer get_node(int s) -#line 2680 "btex.w" { pointer p; pointer q; int r; int t; restart:p= rover; -do{/*132:*/ -#line 2729 "btex.w" +do{/*133:*/ +#line 2813 "htex.w" q= p+node_size(p); @@ -353,8 +324,8 @@ llink(t)= llink(q);rlink(llink(q))= t; q= q+node_size(q); } r= q-s; -if(r> p+1)/*133:*/ -#line 2744 "btex.w" +if(r> p+1)/*134:*/ +#line 2828 "htex.w" {node_size(p)= r-p; @@ -362,25 +333,25 @@ rover= p; goto found; } -/*:133*/ -#line 2739 "btex.w" +/*:134*/ +#line 2823 "htex.w" ; if(r==p)if(rlink(p)!=p) -/*134:*/ -#line 2753 "btex.w" +/*135:*/ +#line 2837 "htex.w" {rover= rlink(p);t= llink(p); llink(rover)= t;rlink(t)= rover; goto found; } -/*:134*/ -#line 2741 "btex.w" +/*:135*/ +#line 2825 "htex.w" ; node_size(p)= q-p -/*:132*/ -#line 2687 "btex.w" +/*:133*/ +#line 2770 "htex.w" ; p= rlink(p); @@ -389,8 +360,8 @@ if(s==010000000000) {return max_halfword; } if(lo_mem_max+2<hi_mem_min)if(lo_mem_max+2<=mem_bot+max_halfword) -/*131:*/ -#line 2714 "btex.w" +/*132:*/ +#line 2798 "htex.w" {if(hi_mem_min-lo_mem_max>=1998)t= lo_mem_max+1000; else t= lo_mem_max+1+(hi_mem_min-lo_mem_max)/2; @@ -402,8 +373,8 @@ lo_mem_max= t;link(lo_mem_max)= null;info(lo_mem_max)= null; rover= q;goto restart; } -/*:131*/ -#line 2695 "btex.w" +/*:132*/ +#line 2778 "htex.w" ; overflow("main memory size",mem_max+1-mem_min); @@ -413,21 +384,18 @@ found:link(r)= null; var_used= var_used+s; #endif -#line 344 "htex.ch" leak_in(r,s); return r; -#line 2705 "btex.w" } -/*:130*//*135:*/ -#line 353 "htex.ch" +/*:131*//*136:*/ +#line 2848 "htex.w" static void free_node(pointer p,halfword s) {pointer q; leak_out(p,s); store_map(p,0,0); -#line 2767 "btex.w" node_size(p)= s;link(p)= empty_flag; q= llink(rover);llink(p)= q;rlink(p)= rover; llink(rover)= p;rlink(q)= p; @@ -437,11 +405,10 @@ var_used= var_used-s; } -/*:135*//*141:*/ -#line 370 "htex.ch" +/*:136*//*142:*/ +#line 2999 "htex.w" pointer new_null_box(void) -#line 2913 "btex.w" {pointer p; p= get_node(box_node_size);type(p)= hlist_node; subtype(p)= min_quarterword; @@ -450,11 +417,10 @@ glue_sign(p)= normal;glue_order(p)= normal;set_glue_ratio_zero(glue_set(p)); return p; } -/*:141*//*144:*/ -#line 377 "htex.ch" +/*:142*//*145:*/ +#line 3030 "htex.w" pointer new_rule(void) -#line 2943 "btex.w" {pointer p; p= get_node(rule_node_size);type(p)= rule_node; subtype(p)= 0; @@ -462,47 +428,40 @@ width(p)= null_flag;depth(p)= null_flag;height(p)= null_flag; return p; } -/*:144*//*149:*/ -#line 384 "htex.ch" +/*:145*//*150:*/ +#line 3100 "htex.w" pointer new_ligature(quarterword f,quarterword c,pointer q) -#line 3012 "btex.w" {pointer p; p= get_node(small_node_size);type(p)= ligature_node; font(lig_char(p))= f;character(lig_char(p))= c;lig_ptr(p)= q; subtype(p)= 0;return p; } -#line 3023 "btex.w" -/*:149*//*150:*/ -#line 409 "htex.ch" +/*:150*//*151:*/ +#line 3134 "htex.w" pointer new_disc(void) -#line 3047 "btex.w" {pointer p; p= get_node(small_node_size);type(p)= disc_node; -#line 416 "htex.ch" subtype(p)= 0;pre_break(p)= null;post_break(p)= null; -#line 3050 "btex.w" return p; } -/*:150*//*152:*/ -#line 422 "htex.ch" +/*:151*//*153:*/ +#line 3169 "htex.w" pointer new_math(scaled w,small_number s) -#line 3081 "btex.w" {pointer p; p= get_node(small_node_size);type(p)= math_node; subtype(p)= s;width(p)= w;return p; } -/*:152*//*156:*/ -#line 429 "htex.ch" +/*:153*//*157:*/ +#line 3252 "htex.w" pointer new_spec(pointer p) -#line 3163 "btex.w" {pointer q; q= get_node(glue_spec_size); mem[q]= mem[p];glue_ref_count(q)= null; @@ -510,22 +469,20 @@ width(q)= width(p);stretch(q)= stretch(p);shrink(q)= shrink(p); return q; } -/*:156*//*158:*/ -#line 436 "htex.ch" +/*:157*//*159:*/ +#line 3279 "htex.w" pointer new_glue(pointer q) -#line 3189 "btex.w" {pointer p; p= get_node(small_node_size);type(p)= glue_node;subtype(p)= normal; leader_ptr(p)= null;glue_ptr(p)= q;incr(glue_ref_count(q)); return p; } -/*:158*//*161:*/ -#line 443 "htex.ch" +/*:159*//*162:*/ +#line 3318 "htex.w" pointer new_kern(scaled w) -#line 3227 "btex.w" {pointer p; p= get_node(small_node_size);type(p)= kern_node; subtype(p)= normal; @@ -533,26 +490,24 @@ width(p)= w; return p; } -/*:161*//*163:*/ -#line 450 "htex.ch" +/*:162*//*164:*/ +#line 3342 "htex.w" pointer new_penalty(int m) -#line 3250 "btex.w" {pointer p; p= get_node(small_node_size);type(p)= penalty_node; subtype(p)= 0; penalty(p)= m;return p; } -/*:163*//*169:*/ -#line 470 "htex.ch" +/*:164*//*170:*/ +#line 3422 "htex.w" void mem_init(void) {int k; -/*170:*/ -#line 476 "htex.ch" +/*171:*/ +#line 3428 "htex.w" -#line 3334 "btex.w" for(k= mem_bot+1;k<=lo_mem_stat_max;k++)mem[k].sc= 0; @@ -562,7 +517,6 @@ k= mem_bot;while(k<=lo_mem_stat_max) stretch_order(k)= normal;shrink_order(k)= normal; k= k+glue_spec_size; } -#line 3348 "btex.w" rover= lo_mem_stat_max+1; link(rover)= empty_flag; node_size(rover)= 1000; @@ -570,60 +524,57 @@ llink(rover)= rover;rlink(rover)= rover; lo_mem_max= rover+1000;link(lo_mem_max)= null;info(lo_mem_max)= null; for(k= hi_mem_stat_min;k<=mem_top;k++) mem[k]= mem[lo_mem_max]; -/*804:*/ -#line 15652 "btex.w" +/*805:*/ +#line 15738 "htex.w" info(omit_template)= end_template_token; -/*:804*//*811:*/ -#line 15759 "btex.w" +/*:805*//*812:*/ +#line 15845 "htex.w" link(end_span)= max_quarterword+1;info(end_span)= null; -/*:811*//*835:*/ -#line 16221 "btex.w" +/*:812*//*836:*/ +#line 16301 "htex.w" type(last_active)= hyphenated;line_number(last_active)= max_halfword; subtype(last_active)= 0; -/*:835*//*1006:*/ -#line 19309 "btex.w" +/*:836*//*1007:*/ +#line 19406 "htex.w" subtype(page_ins_head)= qi(255); type(page_ins_head)= split_up;link(page_ins_head)= page_ins_head; -/*:1006*//*1013:*/ -#line 19466 "btex.w" +/*:1007*//*1014:*/ +#line 19562 "htex.w" type(page_head)= glue_node;subtype(page_head)= normal; -/*:1013*/ -#line 3355 "btex.w" +/*:1014*/ +#line 3445 "htex.w" ; -#line 491 "htex.ch" avail= null; -#line 3357 "btex.w" hi_mem_min= hi_mem_stat_min; var_used= lo_mem_stat_max+1-mem_bot;dyn_used= hi_mem_stat_usage; -/*:170*/ -#line 473 "htex.ch" +/*:171*/ +#line 3425 "htex.w" } -/*:169*//*209:*/ -#line 643 "htex.ch" +/*:170*//*210:*/ +#line 3978 "htex.w" static void delete_token_ref(pointer p) -#line 3894 "btex.w" {if(token_ref_count(p)==null)flush_list(p); else decr(token_ref_count(p)); } -/*:209*//*210:*/ -#line 652 "htex.ch" +/*:210*//*211:*/ +#line 3993 "htex.w" void delete_glue_ref(pointer p) fast_delete_glue_ref(p) @@ -631,13 +582,11 @@ static void delete_xdimen_ref(pointer p) {if(xdimen_ref_count(p)==null)free_node(p,xdimen_node_size); else decr(xdimen_ref_count(p)); } -#line 3908 "btex.w" -/*:210*//*211:*/ -#line 664 "htex.ch" +/*:211*//*212:*/ +#line 4006 "htex.w" void flush_node_list(pointer p) -#line 3915 "btex.w" { pointer q; while(p!=null) @@ -655,11 +604,10 @@ case ins_node:{flush_node_list(ins_ptr(p)); delete_glue_ref(split_top_ptr(p)); free_node(p,ins_node_size);goto done; } -case whatsit_node:/*1387:*/ -#line 24898 "btex.w" +case whatsit_node:/*1388:*/ +#line 25389 "htex.w" {switch(subtype(p)){ -#line 2527 "htex.ch" case close_node:case language_node:free_node(p,small_node_size);break; case par_node: if(par_type(p)==glue_type)fast_delete_glue_ref(par_value(p).i); @@ -725,30 +673,25 @@ case stream_node: free_node(p,stream_node_size);break; case xdimen_node: free_node(p,xdimen_node_size); -#line 24905 "btex.w" default:confusion("ext3"); } goto done; } -#line 2597 "htex.ch" -/*:1387*/ -#line 3932 "btex.w" +/*:1388*/ +#line 4025 "htex.w" case glue_node:{fast_delete_glue_ref(glue_ptr(p)); if(leader_ptr(p)!=null)flush_node_list(leader_ptr(p)); }break; case kern_node:case math_node:case penalty_node:do_nothing;break; case ligature_node:flush_node_list(lig_ptr(p));break; -#line 3939 "btex.w" case disc_node:{flush_node_list(pre_break(p)); flush_node_list(post_break(p)); }break; case adjust_node:flush_node_list(adjust_ptr(p));break; -#line 677 "htex.ch" default:QUIT("Confusion while flushing node list"); -#line 3945 "btex.w" } free_node(p,small_node_size); @@ -757,25 +700,24 @@ p= q; } } -/*:211*//*213:*/ -#line 691 "htex.ch" +/*:212*//*214:*/ +#line 4069 "htex.w" pointer copy_node_list(pointer p) -#line 3979 "btex.w" {pointer h; pointer q; pointer r; int words; h= get_avail();q= h; while(p!=null) -{/*214:*/ -#line 3992 "btex.w" +{/*215:*/ +#line 4085 "htex.w" words= 1; if(is_char_node(p))r= get_avail(); -else/*215:*/ -#line 4001 "btex.w" +else/*216:*/ +#line 4094 "htex.w" switch(type(p)){ case hlist_node:case vlist_node:case unset_node:{r= get_node(box_node_size); @@ -790,8 +732,8 @@ add_glue_ref(split_top_ptr(p)); ins_ptr(r)= copy_node_list(ins_ptr(p)); words= ins_node_size-1; }break; -case whatsit_node:/*1386:*/ -#line 24884 "btex.w" +case whatsit_node:/*1387:*/ +#line 25271 "htex.w" switch(subtype(p)){ case open_node:{r= get_node(open_node_size);words= open_node_size; @@ -802,7 +744,6 @@ add_token_ref(write_tokens(p));words= write_node_size; case close_node:case language_node:{r= get_node(small_node_size); words= small_node_size; }break; -#line 2413 "htex.ch" case par_node: {r= get_node(par_node_size); if(par_type(p)==glue_type)add_glue_ref(par_value(p).i); @@ -908,12 +849,11 @@ r= get_node(xdimen_node_size); words= xdimen_node_size; break; default:confusion("ext2"); -#line 24895 "btex.w" } -/*:1386*/ -#line 4016 "btex.w" +/*:1387*/ +#line 4109 "htex.w" break; case glue_node:{r= get_node(small_node_size);add_glue_ref(glue_ptr(p)); glue_ptr(r)= glue_ptr(p);leader_ptr(r)= copy_node_list(leader_ptr(p)); @@ -939,15 +879,15 @@ default:confusion("copying"); } -/*:215*/ -#line 3996 "btex.w" +/*:216*/ +#line 4089 "htex.w" ; while(words> 0) {decr(words);mem[r+words]= mem[p+words]; } -/*:214*/ -#line 3985 "btex.w" +/*:215*/ +#line 4078 "htex.w" ; link(q)= r;q= r;p= link(p); } @@ -955,21 +895,20 @@ link(q)= null;q= link(h);free_avail(h); return q; } -/*:213*//*224:*/ -#line 743 "htex.ch" +/*:214*//*225:*/ +#line 4459 "htex.w" -/*222:*/ -#line 729 "htex.ch" +/*223:*/ +#line 4440 "htex.w" static list_state_record nest[nest_size+1]; int nest_ptr; static int max_nest_stack; list_state_record cur_list; -#line 4340 "btex.w" -/*:222*/ -#line 745 "htex.ch" +/*:223*/ +#line 4461 "htex.w" void list_init(void) @@ -979,33 +918,29 @@ memset(&cur_list,0,sizeof(cur_list)); mode= vmode;head= contrib_head;tail= contrib_head; prev_height= prev_depth= ignore_depth; } -/*:224*//*226:*/ -#line 762 "htex.ch" +/*:225*//*227:*/ +#line 4479 "htex.w" void push_nest(void) -#line 4366 "btex.w" {if(nest_ptr> max_nest_stack) {max_nest_stack= nest_ptr; if(nest_ptr==nest_size)overflow("semantic nest size",nest_size); } nest[nest_ptr]= cur_list; -#line 769 "htex.ch" incr(nest_ptr);head= get_avail();tail= head;prev_graf= 0; cur_list.bs_pos= NULL;cur_bs= baseline_skip;cur_ls= line_skip;cur_lsl= line_skip_limit; -#line 4373 "btex.w" } -/*:226*//*227:*/ -#line 776 "htex.ch" +/*:227*//*228:*/ +#line 4496 "htex.w" void pop_nest(void) -#line 4381 "btex.w" {free_avail(head);decr(nest_ptr);cur_list= nest[nest_ptr]; } -/*:227*//*560:*/ -#line 953 "htex.ch" +/*:228*//*561:*/ +#line 10872 "htex.w" memory_word font_info[font_mem_size+1]; @@ -1014,7 +949,6 @@ static font_index fmem_ptr= 0; void hclear_fonts(void) {fmem_ptr= 0; } -#line 10766 "btex.w" static internal_font_number font_ptr; static four_quarters font_check0[font_max-font_base+1], *const font_check= font_check0-font_base; @@ -1025,10 +959,8 @@ static scaled font_dsize0[font_max-font_base+1], static font_index font_params0[font_max-font_base+1], *const font_params= font_params0-font_base; -#line 969 "htex.ch" char*font_name0[font_max-font_base+1], **const font_name= font_name0-font_base; -#line 10780 "btex.w" static eight_bits font_bc0[font_max-font_base+1], *const font_bc= font_bc0-font_base; @@ -1058,12 +990,11 @@ static int16_t font_false_bchar0[font_max-font_base+1], *const font_false_bchar= font_false_bchar0-font_base; -/*:560*//*561:*/ -#line 978 "htex.ch" +/*:561*//*562:*/ +#line 10930 "htex.w" int char_base0[font_max-font_base+1], *const char_base= char_base0-font_base; -#line 10821 "btex.w" int width_base0[font_max-font_base+1], *const width_base= width_base0-font_base; @@ -1090,17 +1021,15 @@ static int param_base0[font_max-font_base+1], *const param_base= param_base0-font_base; -/*:561*//*571:*/ -#line 987 "htex.ch" +/*:562*//*572:*/ +#line 11085 "htex.w" void read_font_info(int f,char*nom,scaled s) -#line 10975 "btex.w" { int k; bool file_opened; halfword lf,lh,bc,ec,nw,nh,nd,ni,nl,nk,ne,np; -#line 10982 "btex.w" eight_bits a,b,c,d; four_quarters qw;scaled sw; int bch_label; @@ -1108,21 +1037,19 @@ int bchar; scaled z; int alpha;int beta; -#line 10990 "btex.w" -/*573:*/ -#line 11026 "btex.w" - /*574:*/ -#line 1019 "htex.ch" +#line 11134 "htex.w" + +/*575:*/ +#line 11146 "htex.w" file_opened= true -#line 11044 "btex.w" -/*:574*/ -#line 11027 "btex.w" +/*:575*/ +#line 11135 "htex.w" ; -/*576:*/ -#line 11066 "btex.w" +/*577:*/ +#line 11170 "htex.w" {read_sixteen(lf); fget;read_sixteen(lh); @@ -1144,18 +1071,16 @@ if(lf!=6+lh+(ec-bc+1)+nw+nh+nd+ni+nl+nk+ne+np)abort; if((nw==0)||(nh==0)||(nd==0)||(ni==0))abort; } -/*:576*/ -#line 11028 "btex.w" +/*:577*/ +#line 11136 "htex.w" ; -/*577:*/ -#line 11093 "btex.w" +/*578:*/ +#line 11197 "htex.w" lf= lf-6-lh; if(np<7)lf= lf+7-np; if((font_ptr==font_max)||(fmem_ptr+lf> font_mem_size)) -#line 1035 "htex.ch" QUIT("Not enough room left for font %s\n",nom); -#line 11099 "btex.w" char_base[f]= fmem_ptr-bc; width_base[f]= char_base[f]+ec+1; height_base[f]= width_base[f]+nw; @@ -1166,11 +1091,11 @@ kern_base[f]= lig_kern_base[f]+nl-kern_base_offset; exten_base[f]= kern_base[f]+kern_base_offset+nk; param_base[f]= exten_base[f]+ne -/*:577*/ -#line 11029 "btex.w" +/*:578*/ +#line 11137 "htex.w" ; -/*579:*/ -#line 11122 "btex.w" +/*580:*/ +#line 11225 "htex.w" {if(lh<2)abort; store_four_quarters(font_check[f]); @@ -1187,11 +1112,11 @@ else z= xn_over_d(z,-s,1000); font_size[f]= z; } -/*:579*/ -#line 11030 "btex.w" +/*:580*/ +#line 11138 "htex.w" ; -/*580:*/ -#line 11138 "btex.w" +/*581:*/ +#line 11241 "htex.w" for(k= fmem_ptr;k<=width_base[f]-1;k++) {store_four_quarters(font_info[k].qqqq); @@ -1200,8 +1125,8 @@ if((a>=nw)||(b/020>=nh)||(b%020>=nd)|| switch(c%4){ case lig_tag:if(d>=nl)abort;break; case ext_tag:if(d>=ne)abort;break; -case list_tag:/*581:*/ -#line 11159 "btex.w" +case list_tag:/*582:*/ +#line 11262 "htex.w" {check_byte_range(d); while(d<current_character_being_worked_on) @@ -1213,21 +1138,21 @@ d= qo(rem_byte(qw)); if(d==current_character_being_worked_on)abort; not_found:;} -/*:581*/ -#line 11146 "btex.w" +/*:582*/ +#line 11249 "htex.w" break; default:do_nothing; } } -/*:580*/ -#line 11031 "btex.w" +/*:581*/ +#line 11139 "htex.w" ; -/*582:*/ -#line 11194 "btex.w" +/*583:*/ +#line 11297 "htex.w" -{/*583:*/ -#line 11204 "btex.w" +{/*584:*/ +#line 11307 "htex.w" {alpha= 16; while(z>=040000000) @@ -1236,8 +1161,8 @@ while(z>=040000000) beta= 256/alpha;alpha= alpha*z; } -/*:583*/ -#line 11195 "btex.w" +/*:584*/ +#line 11298 "htex.w" ; for(k= width_base[f];k<=lig_kern_base[f]-1;k++) store_scaled(font_info[k].sc); @@ -1247,11 +1172,11 @@ if(font_info[depth_base[f]].sc!=0)abort; if(font_info[italic_base[f]].sc!=0)abort; } -/*:582*/ -#line 11032 "btex.w" +/*:583*/ +#line 11140 "htex.w" ; -/*584:*/ -#line 11218 "btex.w" +/*585:*/ +#line 11321 "htex.w" bch_label= 077777;bchar= 256; if(nl> 0) @@ -1272,11 +1197,11 @@ if(a==255)bch_label= 256*c+d; for(k= kern_base[f]+kern_base_offset;k<=exten_base[f]-1;k++) store_scaled(font_info[k].sc); -/*:584*/ -#line 11033 "btex.w" +/*:585*/ +#line 11141 "htex.w" ; -/*585:*/ -#line 11238 "btex.w" +/*586:*/ +#line 11341 "htex.w" for(k= exten_base[f];k<=param_base[f]-1;k++) {store_four_quarters(font_info[k].qqqq); @@ -1286,11 +1211,11 @@ if(c!=0)check_existence(c); check_existence(d); } -/*:585*/ -#line 11034 "btex.w" +/*:586*/ +#line 11142 "htex.w" ; -/*586:*/ -#line 11250 "btex.w" +/*587:*/ +#line 11353 "htex.w" {for(k= 1;k<=np;k++) if(k==1) @@ -1300,22 +1225,18 @@ fget;font_info[param_base[f]].sc= (sw*020)+(fbyte/020); } else store_scaled(font_info[param_base[f]+k-1].sc); -#line 1041 "htex.ch" if(hpos>=hend)abort; -#line 11260 "btex.w" for(k= np+1;k<=7;k++)font_info[param_base[f]+k-1].sc= 0; } -/*:586*/ -#line 11035 "btex.w" +/*:587*/ +#line 11143 "htex.w" ; -/*587:*/ -#line 11270 "btex.w" +/*588:*/ +#line 11373 "htex.w" if(np>=7)font_params[f]= np;else font_params[f]= 7; -#line 1047 "htex.ch" hyphen_char[f]= skew_char[f]= -1; -#line 11273 "btex.w" if(bch_label<nl)bchar_label[f]= bch_label+lig_kern_base[f]; else bchar_label[f]= non_address; font_bchar[f]= qi(bchar); @@ -1325,31 +1246,25 @@ if(bchar<=ec)if(bchar>=bc) if(char_exists(qw))font_false_bchar[f]= non_char; } font_name[f]= nom; -#line 11283 "btex.w" font_bc[f]= bc;font_ec[f]= ec;font_glue[f]= null; adjust(char_base);adjust(width_base);adjust(lig_kern_base); adjust(kern_base);adjust(exten_base); decr(param_base[f]); -#line 1058 "htex.ch" fmem_ptr= fmem_ptr+lf;goto done -#line 11288 "btex.w" -/*:587*/ -#line 11036 "btex.w" +/*:588*/ +#line 11144 "htex.w" -#line 1019 "htex.ch" -/*:573*/ -#line 10992 "btex.w" +/*:574*/ +#line 11101 "htex.w" ; -#line 1007 "htex.ch" bad_tfm:QUIT("Bad tfm file: %s\n",nom); done:; -#line 10996 "btex.w" } -/*:571*//*593:*/ -#line 1074 "htex.ch" +/*:572*//*594:*/ +#line 11476 "htex.w" pointer new_character(internal_font_number f,eight_bits c) {pointer p; @@ -1360,13 +1275,11 @@ DBG(DBGFONT,"Warning: Character 0x%0X in font %d does not exist\n",c,f); p= get_avail();font(p)= f;character(p)= qi(c); return p; } -#line 11385 "btex.w" -/*:593*//*662:*/ -#line 1110 "htex.ch" +/*:594*//*663:*/ +#line 13077 "htex.w" pointer hpack(pointer p,scaled w,small_number m) -#line 12976 "btex.w" { pointer r; pointer q; @@ -1377,13 +1290,11 @@ glue_ord o; internal_font_number f; four_quarters i; eight_bits hd; -#line 1117 "htex.ch" r= get_node(box_node_size);type(r)= hlist_node; -#line 12987 "btex.w" subtype(r)= min_quarterword;shift_amount(r)= 0; q= r+list_offset;link(q)= p; -h= 0;/*663:*/ -#line 13002 "btex.w" +h= 0;/*664:*/ +#line 13103 "htex.w" d= 0;x= 0; total_stretch[normal]= 0;total_shrink[normal]= 0; @@ -1391,16 +1302,16 @@ total_stretch[fil]= 0;total_shrink[fil]= 0; total_stretch[fill]= 0;total_shrink[fill]= 0; total_stretch[filll]= 0;total_shrink[filll]= 0 -/*:663*/ -#line 12989 "btex.w" +/*:664*/ +#line 13092 "htex.w" ; -while(p!=null)/*664:*/ -#line 13009 "btex.w" +while(p!=null)/*665:*/ +#line 13110 "htex.w" {reswitch:while(is_char_node(p)) -/*667:*/ -#line 13054 "btex.w" +/*668:*/ +#line 13155 "htex.w" {f= font(p);i= char_info(f,character(p));hd= height_depth(i); x= x+char_width(f,i); @@ -1409,15 +1320,15 @@ s= char_depth(f,hd);if(s> d)d= s; p= link(p); } -/*:667*/ -#line 13013 "btex.w" +/*:668*/ +#line 13114 "htex.w" ; if(p!=null) {switch(type(p)){ case hlist_node:case vlist_node:case rule_node: case unset_node: -/*666:*/ -#line 13042 "btex.w" +/*667:*/ +#line 13143 "htex.w" {x= x+width(p); if(type(p)>=rule_node)s= 0;else s= shift_amount(p); @@ -1425,12 +1336,12 @@ if(height(p)-s> h)h= height(p)-s; if(depth(p)+s> d)d= depth(p)+s; } -/*:666*/ -#line 13019 "btex.w" +/*:667*/ +#line 13120 "htex.w" break; case ins_node:case mark_node:case adjust_node:if(adjust_tail!=null) -/*668:*/ -#line 13069 "btex.w" +/*669:*/ +#line 13170 "htex.w" {while(link(q)!=p)q= link(q); if(type(p)==adjust_node) @@ -1443,11 +1354,11 @@ else{link(adjust_tail)= p;adjust_tail= p;p= link(p); link(q)= p;p= q; } -/*:668*/ -#line 13021 "btex.w" +/*:669*/ +#line 13122 "htex.w" break; -case whatsit_node:/*1389:*/ -#line 2610 "htex.ch" +case whatsit_node:/*1390:*/ +#line 25471 "htex.w" if(subtype(p)==image_node) {glue_ord o; @@ -1456,13 +1367,12 @@ x= x+image_width(p); o= image_stretch_order(p);total_stretch[o]= total_stretch[o]+image_stretch(p); o= image_shrink_order(p);total_shrink[o]= total_shrink[o]+image_shrink(p); } -#line 24914 "btex.w" -/*:1389*/ -#line 13022 "btex.w" +/*:1390*/ +#line 13123 "htex.w" ;break; -case glue_node:/*669:*/ -#line 13081 "btex.w" +case glue_node:/*670:*/ +#line 13182 "htex.w" {g= glue_ptr(p);x= x+width(g); o= stretch_order(g);total_stretch[o]= total_stretch[o]+stretch(g); @@ -1474,19 +1384,19 @@ if(depth(g)> d)d= depth(g); } } -/*:669*/ -#line 13023 "btex.w" +/*:670*/ +#line 13124 "htex.w" break; case kern_node:case math_node:x= x+width(p);break; -case ligature_node:/*665:*/ -#line 13033 "btex.w" +case ligature_node:/*666:*/ +#line 13134 "htex.w" {mem[lig_trick]= mem[lig_char(p)];link(lig_trick)= link(p); p= lig_trick;goto reswitch; } -/*:665*/ -#line 13025 "btex.w" +/*:666*/ +#line 13126 "htex.w" default:do_nothing; } @@ -1495,13 +1405,13 @@ p= link(p); } -/*:664*/ -#line 12992 "btex.w" +/*:665*/ +#line 13095 "htex.w" ; if(adjust_tail!=null)link(adjust_tail)= null; height(r)= h;depth(r)= d; -/*670:*/ -#line 13095 "btex.w" +/*671:*/ +#line 13196 "htex.w" if(m==additional)w= x+w; width(r)= w;x= w-x; @@ -1510,19 +1420,19 @@ if(x==0) set_glue_ratio_zero(glue_set(r)); goto end; } -else if(x> 0)/*671:*/ -#line 13108 "btex.w" +else if(x> 0)/*672:*/ +#line 13209 "htex.w" -{/*672:*/ -#line 13122 "btex.w" +{/*673:*/ +#line 13220 "htex.w" if(total_stretch[filll]!=0)o= filll; else if(total_stretch[fill]!=0)o= fill; else if(total_stretch[fil]!=0)o= fil; else o= normal -/*:672*/ -#line 13109 "btex.w" +/*:673*/ +#line 13210 "htex.w" ; glue_order(r)= o;glue_sign(r)= stretching; if(total_stretch[o]!=0)glue_set(r)= unfloat(x/(double)total_stretch[o]); @@ -1530,26 +1440,25 @@ if(total_stretch[o]!=0)glue_set(r)= unfloat(x/(double)total_stretch[o]); else{glue_sign(r)= normal; set_glue_ratio_zero(glue_set(r)); } -#line 13119 "btex.w" goto end; } -/*:671*/ -#line 13104 "btex.w" +/*:672*/ +#line 13205 "htex.w" -else/*677:*/ -#line 13167 "btex.w" +else/*678:*/ +#line 13265 "htex.w" -{/*678:*/ -#line 13187 "btex.w" +{/*679:*/ +#line 13278 "htex.w" if(total_shrink[filll]!=0)o= filll; else if(total_shrink[fill]!=0)o= fill; else if(total_shrink[fil]!=0)o= fil; else o= normal -/*:678*/ -#line 13168 "btex.w" +/*:679*/ +#line 13266 "htex.w" ; glue_order(r)= o;glue_sign(r)= shrinking; if(total_shrink[o]!=0)glue_set(r)= unfloat((-x)/(double)total_shrink[o]); @@ -1558,41 +1467,35 @@ else{glue_sign(r)= normal; set_glue_ratio_zero(glue_set(r)); } if((total_shrink[o]<-x)&&(o==normal)&&(list_ptr(r)!=null)) -#line 1143 "htex.ch" set_glue_ratio_one(glue_set(r)); -#line 13184 "btex.w" goto end; } -/*:677*/ -#line 13106 "btex.w" +/*:678*/ +#line 13207 "htex.w" -/*:670*/ -#line 12996 "btex.w" +/*:671*/ +#line 13099 "htex.w" ; -#line 12999 "btex.w" end:return r; } -/*:662*//*682:*/ -#line 1153 "htex.ch" +/*:663*//*683:*/ +#line 13318 "htex.w" pointer vpackage(pointer p,scaled h,small_number m,scaled l) -#line 13226 "btex.w" { pointer r; scaled w,d,x; scaled s; pointer g; glue_ord o; -#line 1160 "htex.ch" r= get_node(box_node_size);type(r)= vlist_node; -#line 13233 "btex.w" subtype(r)= min_quarterword;shift_amount(r)= 0; list_ptr(r)= p; -w= 0;/*663:*/ -#line 13002 "btex.w" +w= 0;/*664:*/ +#line 13103 "htex.w" d= 0;x= 0; total_stretch[normal]= 0;total_shrink[normal]= 0; @@ -1600,30 +1503,30 @@ total_stretch[fil]= 0;total_shrink[fil]= 0; total_stretch[fill]= 0;total_shrink[fill]= 0; total_stretch[filll]= 0;total_shrink[filll]= 0 -/*:663*/ -#line 13235 "btex.w" +/*:664*/ +#line 13329 "htex.w" ; -while(p!=null)/*683:*/ -#line 13250 "btex.w" +while(p!=null)/*684:*/ +#line 13342 "htex.w" {if(is_char_node(p))confusion("vpack"); else switch(type(p)){ case hlist_node:case vlist_node:case rule_node: case unset_node: -/*684:*/ -#line 13267 "btex.w" +/*685:*/ +#line 13359 "htex.w" {x= x+d+height(p);d= depth(p); if(type(p)>=rule_node)s= 0;else s= shift_amount(p); if(width(p)+s> w)w= width(p)+s; } -/*:684*/ -#line 13257 "btex.w" +/*:685*/ +#line 13349 "htex.w" break; -case whatsit_node:/*1388:*/ -#line 2597 "htex.ch" +case whatsit_node:/*1389:*/ +#line 25462 "htex.w" if(subtype(p)==image_node) {glue_ord o; @@ -1632,14 +1535,12 @@ x= x+d+image_height(p);d= 0; o= image_stretch_order(p);total_stretch[o]= total_stretch[o]+image_stretch(p); o= image_shrink_order(p);total_shrink[o]= total_shrink[o]+image_shrink(p); } -#line 24912 "btex.w" -#line 2610 "htex.ch" -/*:1388*/ -#line 13258 "btex.w" +/*:1389*/ +#line 13350 "htex.w" ;break; -case glue_node:/*685:*/ -#line 13273 "btex.w" +case glue_node:/*686:*/ +#line 13365 "htex.w" {x= x+d;d= 0; g= glue_ptr(p);x= x+width(g); @@ -1651,8 +1552,8 @@ if(width(g)> w)w= width(g); } } -/*:685*/ -#line 13259 "btex.w" +/*:686*/ +#line 13351 "htex.w" break; case kern_node:{x= x+d+width(p);d= 0; }break; @@ -1661,16 +1562,16 @@ default:do_nothing; p= link(p); } -/*:683*/ -#line 13237 "btex.w" +/*:684*/ +#line 13331 "htex.w" ; width(r)= w; if(d> l) {x= x+d-l;depth(r)= l; } else depth(r)= d; -/*686:*/ -#line 13287 "btex.w" +/*687:*/ +#line 13379 "htex.w" if(m==additional)h= x+h; height(r)= h;x= h-x; @@ -1679,19 +1580,19 @@ if(x==0) set_glue_ratio_zero(glue_set(r)); goto end; } -else if(x> 0)/*687:*/ -#line 13300 "btex.w" +else if(x> 0)/*688:*/ +#line 13392 "htex.w" -{/*672:*/ -#line 13122 "btex.w" +{/*673:*/ +#line 13220 "htex.w" if(total_stretch[filll]!=0)o= filll; else if(total_stretch[fill]!=0)o= fill; else if(total_stretch[fil]!=0)o= fil; else o= normal -/*:672*/ -#line 13301 "btex.w" +/*:673*/ +#line 13393 "htex.w" ; glue_order(r)= o;glue_sign(r)= stretching; if(total_stretch[o]!=0)glue_set(r)= unfloat(x/(double)total_stretch[o]); @@ -1699,26 +1600,25 @@ if(total_stretch[o]!=0)glue_set(r)= unfloat(x/(double)total_stretch[o]); else{glue_sign(r)= normal; set_glue_ratio_zero(glue_set(r)); } -#line 13311 "btex.w" goto end; } -/*:687*/ -#line 13296 "btex.w" +/*:688*/ +#line 13388 "htex.w" -else/*690:*/ -#line 13339 "btex.w" +else/*691:*/ +#line 13428 "htex.w" -{/*678:*/ -#line 13187 "btex.w" +{/*679:*/ +#line 13278 "htex.w" if(total_shrink[filll]!=0)o= filll; else if(total_shrink[fill]!=0)o= fill; else if(total_shrink[fil]!=0)o= fil; else o= normal -/*:678*/ -#line 13340 "btex.w" +/*:679*/ +#line 13429 "htex.w" ; glue_order(r)= o;glue_sign(r)= shrinking; if(total_shrink[o]!=0)glue_set(r)= unfloat((-x)/(double)total_shrink[o]); @@ -1727,64 +1627,56 @@ else{glue_sign(r)= normal; set_glue_ratio_zero(glue_set(r)); } if((total_shrink[o]<-x)&&(o==normal)&&(list_ptr(r)!=null)) -#line 1186 "htex.ch" set_glue_ratio_one(glue_set(r)); -#line 13356 "btex.w" goto end; } -/*:690*/ -#line 13298 "btex.w" +/*:691*/ +#line 13390 "htex.w" -/*:686*/ -#line 13244 "btex.w" +/*:687*/ +#line 13338 "htex.w" ; -#line 13247 "btex.w" end:return r; } -/*:682*//*830:*/ -#line 1229 "htex.ch" +/*:683*//*831:*/ +#line 16203 "htex.w" -/*693:*/ -#line 1192 "htex.ch" +/*694:*/ +#line 13461 "htex.w" extern pointer happend_to_vlist(pointer b); void append_to_vlist(pointer b,uint32_t offset) -#line 13380 "btex.w" {scaled d; pointer p; if(prev_depth> ignore_depth) {d= width(baseline_skip)-prev_depth-height(b); -#line 1203 "htex.ch" if(d<line_skip_limit)p= new_glue(line_skip); else{temp_ptr= new_spec(baseline_skip); p= new_glue(temp_ptr);glue_ref_count(temp_ptr)= null; width(temp_ptr)= d; } store_map(p,node_pos,offset); -#line 13388 "btex.w" link(tail)= p;tail= p; } link(tail)= b;tail= b;prev_depth= depth(b); } -/*:693*//*844:*/ -#line 16351 "btex.w" +/*:694*//*845:*/ +#line 16434 "htex.w" static pointer finite_shrink(pointer p) {pointer q; -#line 1309 "htex.ch" QUIT("Infinite glue shrinkage found in a paragraph"); -#line 16373 "btex.w" q= new_spec(p);shrink_order(q)= normal; delete_glue_ref(p);return q; } -/*:844*//*848:*/ -#line 16431 "btex.w" +/*:845*//*849:*/ +#line 16497 "htex.w" static void try_break(int pi,small_number break_type) { @@ -1792,8 +1684,8 @@ pointer r; pointer prev_r; halfword old_l; bool no_break_yet; -/*849:*/ -#line 16459 "btex.w" +/*850:*/ +#line 16525 "htex.w" pointer prev_prev_r; pointer s; @@ -1813,24 +1705,24 @@ pointer save_link; #endif scaled shortfall; -/*:849*/ -#line 16438 "btex.w" +/*:850*/ +#line 16504 "htex.w" -/*850:*/ -#line 16478 "btex.w" +/*851:*/ +#line 16544 "htex.w" if(abs(pi)>=inf_penalty) if(pi> 0)goto end; else pi= eject_penalty -/*:850*/ -#line 16439 "btex.w" +/*:851*/ +#line 16505 "htex.w" ; no_break_yet= true;prev_r= active;old_l= 0; do_all_six(copy_to_cur_active); loop{resume:r= link(prev_r); -/*851:*/ -#line 16488 "btex.w" +/*852:*/ +#line 16554 "htex.w" if(type(r)==delta_node) @@ -1838,34 +1730,34 @@ if(type(r)==delta_node) prev_prev_r= prev_r;prev_r= r;goto resume; } -/*:851*/ -#line 16444 "btex.w" +/*:852*/ +#line 16510 "htex.w" ; -/*855:*/ -#line 16536 "btex.w" +/*856:*/ +#line 16603 "htex.w" {l= line_number(r); if(l> old_l) { if((minimum_demerits<awful_bad)&& ((old_l!=easy_line)||(r==last_active))) -/*856:*/ -#line 16554 "btex.w" +/*857:*/ +#line 16621 "htex.w" -{if(no_break_yet)/*857:*/ -#line 16590 "btex.w" +{if(no_break_yet)/*858:*/ +#line 16657 "htex.w" {no_break_yet= false;do_all_six(set_break_width_to_background); s= cur_p; if(break_type> unhyphenated)if(cur_p!=null) -/*861:*/ -#line 16633 "btex.w" +/*862:*/ +#line 16701 "htex.w" {t= replace_count(cur_p);v= cur_p;s= post_break(cur_p); while(t> 0) {decr(t);v= link(v); -/*862:*/ -#line 16651 "btex.w" +/*863:*/ +#line 16719 "htex.w" if(is_char_node(v)) {f= font(v); @@ -1883,13 +1775,13 @@ default:confusion("disc1"); } -/*:862*/ -#line 16637 "btex.w" +/*:863*/ +#line 16705 "htex.w" ; } while(s!=null) -{/*863:*/ -#line 16668 "btex.w" +{/*864:*/ +#line 16736 "htex.w" if(is_char_node(s)) {f= font(s); @@ -1907,8 +1799,8 @@ default:confusion("disc2"); } -/*:863*/ -#line 16640 "btex.w" +/*:864*/ +#line 16708 "htex.w" ; s= link(s); } @@ -1917,22 +1809,22 @@ if(post_break(cur_p)==null)s= link(v); } -/*:861*/ -#line 16594 "btex.w" +/*:862*/ +#line 16661 "htex.w" ; while(s!=null) {if(is_char_node(s))goto done; switch(type(s)){ -case glue_node:/*858:*/ -#line 16609 "btex.w" +case glue_node:/*859:*/ +#line 16676 "htex.w" {v= glue_ptr(s);break_width[1]= break_width[1]-width(v); break_width[2+stretch_order(v)]= break_width[2+stretch_order(v)]-stretch(v); break_width[6]= break_width[6]-shrink(v); } -/*:858*/ -#line 16598 "btex.w" +/*:859*/ +#line 16665 "htex.w" break; case penalty_node:do_nothing;break; case math_node:break_width[1]= break_width[1]-width(s);break; @@ -1944,11 +1836,11 @@ s= link(s); } done:;} -/*:857*/ -#line 16555 "btex.w" +/*:858*/ +#line 16622 "htex.w" ; -/*864:*/ -#line 16694 "btex.w" +/*865:*/ +#line 16762 "htex.w" if(type(prev_r)==delta_node) {do_all_six(convert_to_break_width); @@ -1962,16 +1854,16 @@ do_all_six(new_delta_to_break_width); link(prev_r)= q;prev_prev_r= prev_r;prev_r= q; } -/*:864*/ -#line 16556 "btex.w" +/*:865*/ +#line 16623 "htex.w" ; if(abs(adj_demerits)>=awful_bad-minimum_demerits) minimum_demerits= awful_bad-1; else minimum_demerits= minimum_demerits+abs(adj_demerits); for(fit_class= very_loose_fit;fit_class<=tight_fit;fit_class++) {if(minimal_demerits[fit_class]<=minimum_demerits) -/*866:*/ -#line 16724 "btex.w" +/*867:*/ +#line 16792 "htex.w" {q= get_node(passive_node_size); link(q)= passive;passive= q;cur_break(q)= cur_p; @@ -1987,8 +1879,8 @@ total_demerits(q)= minimal_demerits[fit_class]; link(q)= r;link(prev_r)= q;prev_r= q; #ifdef STAT if(tracing_paragraphs> 0) -/*867:*/ -#line 16744 "btex.w" +/*868:*/ +#line 16812 "htex.w" {print_nl("@@");print_int(serial(passive)); @@ -2001,21 +1893,21 @@ if(prev_break(passive)==null)print_char('0'); else print_int(serial(prev_break(passive))); } -/*:867*/ -#line 16739 "btex.w" +/*:868*/ +#line 16807 "htex.w" ; #endif } -/*:866*/ -#line 16562 "btex.w" +/*:867*/ +#line 16629 "htex.w" ; minimal_demerits[fit_class]= awful_bad; } minimum_demerits= awful_bad; -/*865:*/ -#line 16713 "btex.w" +/*866:*/ +#line 16781 "htex.w" if(r!=last_active) {q= get_node(delta_node_size);link(q)= r;type(q)= delta_node; @@ -2024,17 +1916,17 @@ do_all_six(new_delta_from_break_width); link(prev_r)= q;prev_prev_r= prev_r;prev_r= q; } -/*:865*/ -#line 16566 "btex.w" +/*:866*/ +#line 16633 "htex.w" ; } -/*:856*/ -#line 16542 "btex.w" +/*:857*/ +#line 16609 "htex.w" ; if(r==last_active)goto end; -/*872:*/ -#line 16820 "btex.w" +/*873:*/ +#line 16886 "htex.w" if(l> easy_line) {line_width= second_width;old_l= max_halfword-1; @@ -2045,24 +1937,24 @@ else if(par_shape_ptr==null)line_width= first_width; else line_width= mem[par_shape_ptr+2*l].sc; } -/*:872*/ -#line 16544 "btex.w" +/*:873*/ +#line 16611 "htex.w" ; } } -/*:855*/ -#line 16447 "btex.w" +/*:856*/ +#line 16513 "htex.w" ; -/*873:*/ -#line 16840 "btex.w" +/*874:*/ +#line 16906 "htex.w" {artificial_demerits= false; shortfall= line_width-cur_active_width[1]; if(shortfall> 0) -/*874:*/ -#line 16870 "btex.w" +/*875:*/ +#line 16936 "htex.w" if((cur_active_width[3]!=0)||(cur_active_width[4]!=0)|| (cur_active_width[5]!=0)) @@ -2079,23 +1971,23 @@ else fit_class= decent_fit; done1:; } -/*:874*/ -#line 16846 "btex.w" +/*:875*/ +#line 16912 "htex.w" -else/*875:*/ -#line 16889 "btex.w" +else/*876:*/ +#line 16955 "htex.w" {if(-shortfall> cur_active_width[6])b= inf_bad+1; else b= badness(-shortfall,cur_active_width[6]); if(b> 12)fit_class= tight_fit;else fit_class= decent_fit; } -/*:875*/ -#line 16848 "btex.w" +/*:876*/ +#line 16914 "htex.w" ; if((b> inf_bad)||(pi==eject_penalty)) -/*876:*/ -#line 16904 "btex.w" +/*877:*/ +#line 16970 "htex.w" {if(final_pass&&(minimum_demerits==awful_bad)&& (link(r)==last_active)&& @@ -2105,19 +1997,19 @@ else if(b> threshold)goto deactivate; node_r_stays_active= false; } -/*:876*/ -#line 16851 "btex.w" +/*:877*/ +#line 16917 "htex.w" else{prev_r= r; if(b> threshold)goto resume; node_r_stays_active= true; } -/*877:*/ -#line 16920 "btex.w" +/*878:*/ +#line 16986 "htex.w" if(artificial_demerits)d= 0; -else/*881:*/ -#line 16981 "btex.w" +else/*882:*/ +#line 17047 "htex.w" {d= line_penalty+b; if(abs(d)>=10000)d= 100000000;else d= d*d; @@ -2130,17 +2022,17 @@ else d= d+final_hyphen_demerits; if(abs(fit_class-fitness(r))> 1)d= d+adj_demerits; } -/*:881*/ -#line 16922 "btex.w" +/*:882*/ +#line 16988 "htex.w" ; #ifdef STAT if(tracing_paragraphs> 0) -/*878:*/ -#line 16936 "btex.w" +/*879:*/ +#line 17002 "htex.w" {if(printed_node!=cur_p) -/*879:*/ -#line 16958 "btex.w" +/*880:*/ +#line 17024 "htex.w" {print_nl(""); if(cur_p==null)short_display(link(printed_node)); @@ -2151,8 +2043,8 @@ link(cur_p)= save_link; printed_node= cur_p; } -/*:879*/ -#line 16938 "btex.w" +/*:880*/ +#line 17004 "htex.w" ; print_nl("@"); @@ -2173,8 +2065,8 @@ print(" p=");print_int(pi);print(" d="); if(artificial_demerits)print_char('*');else print_int(d); } -/*:878*/ -#line 16925 "btex.w" +/*:879*/ +#line 16991 "htex.w" ; #endif @@ -2186,16 +2078,16 @@ best_place[fit_class]= break_node(r);best_pl_line[fit_class]= l; if(d<minimum_demerits)minimum_demerits= d; } -/*:877*/ -#line 16856 "btex.w" +/*:878*/ +#line 16922 "htex.w" ; if(node_r_stays_active)goto resume; -deactivate:/*882:*/ -#line 17003 "btex.w" +deactivate:/*883:*/ +#line 17069 "htex.w" link(prev_r)= link(r);free_node(r,active_node_size); -if(prev_r==active)/*883:*/ -#line 17028 "btex.w" +if(prev_r==active)/*884:*/ +#line 17094 "htex.w" {r= link(active); if(type(r)==delta_node) @@ -2205,8 +2097,8 @@ link(active)= link(r);free_node(r,delta_node_size); } } -/*:883*/ -#line 17006 "btex.w" +/*:884*/ +#line 17072 "htex.w" else if(type(prev_r)==delta_node) {r= link(prev_r); @@ -2222,19 +2114,19 @@ link(prev_r)= link(r);free_node(r,delta_node_size); } } -/*:882*/ -#line 16858 "btex.w" +/*:883*/ +#line 16924 "htex.w" ; } -/*:873*/ -#line 16450 "btex.w" +/*:874*/ +#line 16516 "htex.w" ; } end:; #ifdef STAT -/*880:*/ -#line 16973 "btex.w" +/*881:*/ +#line 17039 "htex.w" if(cur_p==printed_node)if(cur_p!=null)if(type(cur_p)==disc_node) {t= replace_count(cur_p); @@ -2243,42 +2135,39 @@ while(t> 0) } } -/*:880*/ -#line 16454 "btex.w" +/*:881*/ +#line 16520 "htex.w" ; #endif } -/*:848*//*900:*/ -#line 17357 "btex.w" +/*:849*//*901:*/ +#line 17418 "htex.w" static void post_line_break(int final_widow_penalty) { pointer q,r,s; bool disc_break; -#line 1451 "htex.ch" bool post_disc_break; bool first_line= true; uint32_t line_offset,next_offset; -#line 17363 "btex.w" scaled cur_width; scaled cur_indent; quarterword t; int pen; halfword cur_line; -/*901:*/ -#line 17389 "btex.w" +/*902:*/ +#line 17469 "htex.w" q= break_node(best_bet);cur_p= null; do{r= q;q= prev_break(q);next_break(r)= cur_p;cur_p= r; }while(!(q==null)) -/*:901*/ -#line 17369 "btex.w" +/*:902*/ +#line 17432 "htex.w" ; cur_line= prev_graf+1; -#line 1460 "htex.ch" next_offset= hposition(link(temp_head)); if(next_offset> node_pos) next_offset= next_offset-node_pos; @@ -2296,11 +2185,11 @@ next_offset= next_offset-node_pos; else next_offset= 0; } -/*903:*/ -#line 17426 "btex.w" - /*904:*/ -#line 17438 "btex.w" +#line 17506 "htex.w" + +/*905:*/ +#line 17518 "htex.w" q= cur_break(cur_p);disc_break= false;post_disc_break= false; if(q!=null) @@ -2311,8 +2200,8 @@ subtype(q)= right_skip_code+1;add_glue_ref(right_skip); goto done; } else{if(type(q)==disc_node) -/*905:*/ -#line 1491 "htex.ch" +/*906:*/ +#line 17537 "htex.w" {pointer pre_q= pre_break(q); pointer post_q= post_break(q); @@ -2320,8 +2209,8 @@ t= replace_count(q); type(q)= whatsit_node; subtype(q)= ignore_node; ignore_info(q)= 1; -/*906:*/ -#line 1523 "htex.ch" +/*907:*/ +#line 17556 "htex.w" if(t==0){ignore_list(q)= null;r= link(q);} else{r= q; @@ -2332,10 +2221,9 @@ s= link(r); r= link(s);link(s)= null; ignore_list(q)= link(q); } -#line 17476 "btex.w" -/*:906*/ -#line 1498 "htex.ch" +/*:907*/ +#line 17544 "htex.w" ; s= get_node(ignore_node_size); type(s)= whatsit_node; @@ -2343,75 +2231,66 @@ subtype(s)= ignore_node; ignore_info(s)= 0; ignore_list(s)= null; link(s)= r;r= s; -if(post_q!=null)/*907:*/ -#line 1542 "htex.ch" +if(post_q!=null)/*908:*/ +#line 17570 "htex.w" {s= post_q; while(link(s)!=null)s= link(s); link(s)= r;r= post_q;post_disc_break= true; } -#line 17485 "btex.w" -/*:907*/ -#line 1505 "htex.ch" +/*:908*/ +#line 17551 "htex.w" ; -if(pre_q!=null)/*908:*/ -#line 1556 "htex.ch" +if(pre_q!=null)/*909:*/ +#line 17579 "htex.w" {s= pre_q;link(q)= s; while(link(s)!=null)s= link(s); q= s; } -#line 17494 "btex.w" -/*:908*/ -#line 1506 "htex.ch" +/*:909*/ +#line 17552 "htex.w" ; link(q)= r;disc_break= true; } -#line 17465 "btex.w" -#line 1523 "htex.ch" -/*:905*/ -#line 17448 "btex.w" +/*:906*/ +#line 17528 "htex.w" else if((type(q)==math_node)||(type(q)==kern_node))width(q)= 0; } else{q= temp_head; while(link(q)!=null)q= link(q); } -/*909:*/ -#line 17495 "btex.w" +/*910:*/ +#line 17585 "htex.w" -#line 1566 "htex.ch" r= new_glue(right_skip);link(r)= link(q);link(q)= r;q= r -#line 17497 "btex.w" -/*:909*/ -#line 17454 "btex.w" +/*:910*/ +#line 17534 "htex.w" ; done: -#line 1491 "htex.ch" -/*:904*/ -#line 17428 "btex.w" +/*:905*/ +#line 17508 "htex.w" ; -/*910:*/ -#line 17502 "btex.w" +/*911:*/ +#line 17592 "htex.w" r= link(q);link(q)= null;q= link(temp_head);link(temp_head)= r; if(left_skip!=zero_glue) -#line 1572 "htex.ch" {r= new_glue(left_skip); -#line 17506 "btex.w" link(r)= q;q= r; } -/*:910*/ -#line 17429 "btex.w" +/*:911*/ +#line 17509 "htex.w" ; -/*912:*/ -#line 17521 "btex.w" +/*913:*/ +#line 17618 "htex.w" if(cur_line> last_special_line) {cur_width= second_width;cur_indent= second_indent; @@ -2425,13 +2304,12 @@ cur_indent= mem[par_shape_ptr+2*cur_line-1].sc; adjust_tail= adjust_head;just_box= hpack(q,cur_width,exactly); shift_amount(just_box)= cur_indent -/*:912*/ -#line 17430 "btex.w" +/*:913*/ +#line 17510 "htex.w" ; -/*911:*/ -#line 17509 "btex.w" +/*912:*/ +#line 17599 "htex.w" -#line 1578 "htex.ch" if(first_line) {pointer p= happend_to_vlist(just_box); uint32_t pos= hposition(p); @@ -2440,17 +2318,16 @@ first_line= false; } else append_to_vlist(just_box,line_offset); -#line 17511 "btex.w" if(adjust_head!=adjust_tail) {link(tail)= link(adjust_head);tail= adjust_tail; } adjust_tail= null -/*:911*/ -#line 17432 "btex.w" +/*:912*/ +#line 17512 "htex.w" ; -/*913:*/ -#line 17541 "btex.w" +/*914:*/ +#line 17638 "htex.w" if(cur_line+1!=best_line) {pen= inter_line_penalty; @@ -2458,25 +2335,22 @@ if(cur_line==prev_graf+1)pen= pen+club_penalty; if(cur_line+2==best_line)pen= pen+final_widow_penalty; if(disc_break)pen= pen+broken_penalty; if(pen!=0) -#line 1591 "htex.ch" {r= new_penalty(pen);store_map(r,node_pos,next_offset); -#line 17549 "btex.w" link(tail)= r;tail= r; } } -/*:913*/ -#line 17433 "btex.w" +/*:914*/ +#line 17513 "htex.w" -/*:903*/ -#line 1478 "htex.ch" +/*:904*/ +#line 17452 "htex.w" ; -#line 17373 "btex.w" incr(cur_line);cur_p= next_break(cur_p); if(cur_p!=null)if(!post_disc_break) -/*902:*/ -#line 17401 "btex.w" +/*903:*/ +#line 17481 "htex.w" {r= temp_head; loop{q= link(r); @@ -2494,8 +2368,8 @@ link(temp_head)= q; } } -/*:902*/ -#line 17375 "btex.w" +/*:903*/ +#line 17455 "htex.w" ; }while(!(cur_p==null)); if((cur_line!=best_line)||(link(temp_head)!=null)) @@ -2504,53 +2378,44 @@ confusion("line breaking"); prev_graf= best_line-1; } -/*:900*//*918:*/ -#line 17655 "btex.w" +/*:901*//*919:*/ +#line 17750 "htex.w" -#line 1603 "htex.ch" -/*:918*//*966:*/ -#line 18478 "btex.w" +/*:919*//*967:*/ +#line 18573 "htex.w" #ifdef INIT -#line 18481 "btex.w" #endif -/*:966*/ -#line 1231 "htex.ch" +/*:967*/ +#line 16205 "htex.w" void line_break(int final_widow_penalty,pointer par_ptr) {scaled x= cur_list.hs_field; -#line 16119 "btex.w" -/*884:*/ -#line 17057 "btex.w" +/*885:*/ +#line 17123 "htex.w" bool auto_breaking; pointer prev_p; -#line 1380 "htex.ch" pointer q,r,s; -#line 17061 "btex.w" internal_font_number f; -/*:884*//*916:*/ -#line 17636 "btex.w" +/*:885*//*917:*/ +#line 17733 "htex.w" -#line 17639 "btex.w" -/*:916*/ -#line 16119 "btex.w" +/*:917*/ +#line 16209 "htex.w" -#line 1240 "htex.ch" set_line_break_params(); -#line 16121 "btex.w" -/*831:*/ -#line 1263 "htex.ch" +/*832:*/ +#line 16230 "htex.w" link(temp_head)= par_ptr; -#line 16152 "btex.w" -/*:831*//*845:*/ -#line 16377 "btex.w" +/*:832*//*846:*/ +#line 16442 "htex.w" no_shrink_error_yet= true; check_shrinkage(left_skip);check_shrinkage(right_skip); @@ -2560,8 +2425,8 @@ background[2+stretch_order(q)]= stretch(q); background[2+stretch_order(r)]= background[2+stretch_order(r)]+stretch(r); background[6]= shrink(q)+shrink(r); -/*:845*//*854:*/ -#line 16522 "btex.w" +/*:846*//*855:*/ +#line 16589 "htex.w" minimum_demerits= awful_bad; minimal_demerits[tight_fit]= awful_bad; @@ -2569,60 +2434,50 @@ minimal_demerits[decent_fit]= awful_bad; minimal_demerits[loose_fit]= awful_bad; minimal_demerits[very_loose_fit]= awful_bad; -/*:854*//*870:*/ -#line 16785 "btex.w" +/*:855*//*871:*/ +#line 16854 "htex.w" if(par_shape_ptr==null) if(hang_indent==0) -#line 1347 "htex.ch" {last_special_line= 0;second_width= x; -#line 16789 "btex.w" second_indent= 0; } -else/*871:*/ -#line 16799 "btex.w" +else/*872:*/ +#line 16865 "htex.w" {last_special_line= abs(hang_after); if(hang_after<0) -#line 1362 "htex.ch" {first_width= x-abs(hang_indent); -#line 16803 "btex.w" if(hang_indent>=0)first_indent= hang_indent; else first_indent= 0; -#line 1371 "htex.ch" second_width= x;second_indent= 0; } else{first_width= x;first_indent= 0; second_width= x-abs(hang_indent); -#line 16809 "btex.w" if(hang_indent>=0)second_indent= hang_indent; else second_indent= 0; } } -/*:871*/ -#line 16791 "btex.w" +/*:872*/ +#line 16860 "htex.w" -#line 1356 "htex.ch" else QUIT("parshape not yet implemented"); -#line 16796 "btex.w" if(looseness==0)easy_line= last_special_line; else easy_line= max_halfword -/*:870*/ -#line 16121 "btex.w" +/*:871*/ +#line 16211 "htex.w" ; -/*885:*/ -#line 17067 "btex.w" +/*886:*/ +#line 17133 "htex.w" threshold= pretolerance; if(threshold>=0) { #ifdef STAT -#line 1387 "htex.ch" - if(tracing_paragraphs> 0) +if(tracing_paragraphs> 0) {print_nl("@firstpass");} -#line 17074 "btex.w" #endif second_pass= false;final_pass= false; @@ -2630,14 +2485,12 @@ second_pass= false;final_pass= false; else{threshold= tolerance;second_pass= true; final_pass= (emergency_stretch<=0); #ifdef STAT -#line 17082 "btex.w" #endif } loop{if(threshold> inf_bad)threshold= inf_bad; -#line 17087 "btex.w" -/*886:*/ -#line 17125 "btex.w" +/*887:*/ +#line 17186 "htex.w" q= get_node(active_node_size); type(q)= unhyphenated;fitness(q)= decent_fit; @@ -2645,20 +2498,19 @@ link(q)= last_active;break_node(q)= null; line_number(q)= prev_graf+1;total_demerits(q)= 0;link(active)= q; do_all_six(store_background); passive= null;printed_node= temp_head;pass_number= 0; -#line 17133 "btex.w" -/*:886*/ -#line 17087 "btex.w" +/*:887*/ +#line 17151 "htex.w" ; cur_p= link(temp_head);auto_breaking= true; prev_p= cur_p; while((cur_p!=null)&&(link(active)!=last_active)) -/*888:*/ -#line 17161 "btex.w" +/*889:*/ +#line 17221 "htex.w" {if(is_char_node(cur_p)) -/*889:*/ -#line 17197 "btex.w" +/*890:*/ +#line 17255 "htex.w" {prev_p= cur_p; do{f= font(cur_p); @@ -2667,21 +2519,21 @@ cur_p= link(cur_p); }while(!(!is_char_node(cur_p))); } -/*:889*/ -#line 17163 "btex.w" +/*:890*/ +#line 17223 "htex.w" ; 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 24920 "btex.w" +case whatsit_node:/*1392:*/ +#line 25484 "htex.w" adv_past(cur_p) -/*:1391*/ -#line 17167 "btex.w" +/*:1392*/ +#line 17227 "htex.w" break; -case glue_node:{/*890:*/ -#line 17208 "btex.w" +case glue_node:{/*891:*/ +#line 17266 "htex.w" if(auto_breaking) {if(is_char_node(prev_p))try_break(0,unhyphenated); @@ -2695,26 +2547,23 @@ active_width[2+stretch_order(q)]= active_width[2+stretch_order(q)]+stretch(q); active_width[6]= active_width[6]+shrink(q) -/*:890*/ -#line 17169 "btex.w" +/*:891*/ +#line 17229 "htex.w" ; -#line 17172 "btex.w" }break; case kern_node:if(subtype(cur_p)==explicit)kern_break else act_width= act_width+width(cur_p);break; case ligature_node:{f= font(lig_char(cur_p)); act_width= act_width+char_width(f,char_info(f,character(lig_char(cur_p)))); }break; -case disc_node:/*891:*/ -#line 17224 "btex.w" +case disc_node:/*892:*/ +#line 17282 "htex.w" -#line 1430 "htex.ch" {if(!is_auto_disc(cur_p)||second_pass||final_pass) {s= pre_break(cur_p);disc_width= 0; -#line 17226 "btex.w" if(s==null)try_break(ex_hyphen_penalty,hyphenated); -else{do{/*892:*/ -#line 17242 "btex.w" +else{do{/*893:*/ +#line 17302 "htex.w" if(is_char_node(s)) {f= font(s); @@ -2732,8 +2581,8 @@ default:confusion("disc3"); } -/*:892*/ -#line 17227 "btex.w" +/*:893*/ +#line 17286 "htex.w" ; s= link(s); }while(!(s==null)); @@ -2741,13 +2590,11 @@ act_width= act_width+disc_width; try_break(hyphen_penalty,hyphenated); act_width= act_width-disc_width; } -#line 1437 "htex.ch" } r= replace_count(cur_p);s= link(cur_p); -#line 17235 "btex.w" while(r> 0) -{/*893:*/ -#line 17259 "btex.w" +{/*894:*/ +#line 17319 "htex.w" if(is_char_node(s)) {f= font(s); @@ -2765,16 +2612,16 @@ default:confusion("disc4"); } -/*:893*/ -#line 17236 "btex.w" +/*:894*/ +#line 17296 "htex.w" ; decr(r);s= link(s); } prev_p= cur_p;cur_p= s;goto done5; } -/*:891*/ -#line 17179 "btex.w" +/*:892*/ +#line 17237 "htex.w" case math_node:{auto_breaking= (subtype(cur_p)==after);kern_break; }break; @@ -2786,17 +2633,17 @@ default:confusion("paragraph"); prev_p= cur_p;cur_p= link(cur_p); done5:;} -/*:888*/ -#line 17093 "btex.w" +/*:889*/ +#line 17157 "htex.w" ; if(cur_p==null) -/*896:*/ -#line 17295 "btex.w" +/*897:*/ +#line 17356 "htex.w" {try_break(eject_penalty,hyphenated); if(link(active)!=last_active) -{/*897:*/ -#line 17305 "btex.w" +{/*898:*/ +#line 17366 "htex.w" r= link(active);fewest_demerits= awful_bad; do{if(type(r)!=delta_node)if(total_demerits(r)<fewest_demerits) @@ -2806,12 +2653,12 @@ r= link(r); }while(!(r==last_active)); best_line= line_number(best_bet) -/*:897*/ -#line 17298 "btex.w" +/*:898*/ +#line 17359 "htex.w" ; if(looseness==0)goto done; -/*898:*/ -#line 17319 "btex.w" +/*899:*/ +#line 17380 "htex.w" {r= link(active);actual_looseness= 0; do{if(type(r)!=delta_node) @@ -2831,18 +2678,18 @@ r= link(r); best_line= line_number(best_bet); } -/*:898*/ -#line 17300 "btex.w" +/*:899*/ +#line 17361 "htex.w" ; if((actual_looseness==looseness)||final_pass)goto done; } } -/*:896*/ -#line 17096 "btex.w" +/*:897*/ +#line 17160 "htex.w" ; -/*887:*/ -#line 17134 "btex.w" +/*888:*/ +#line 17194 "htex.w" q= link(active); while(q!=last_active) @@ -2858,8 +2705,8 @@ free_node(q,passive_node_size); q= cur_p; } -/*:887*/ -#line 17097 "btex.w" +/*:888*/ +#line 17161 "htex.w" ; if(!second_pass) { @@ -2870,32 +2717,29 @@ threshold= tolerance;second_pass= true;final_pass= (emergency_stretch<=0); } else{ #ifdef STAT -#line 1405 "htex.ch" - if(tracing_paragraphs> 0) +if(tracing_paragraphs> 0) print_nl("@emergencypass"); -#line 17109 "btex.w" #endif background[2]= background[2]+emergency_stretch;final_pass= true; } } done: #ifdef STAT -#line 17118 "btex.w" #endif -/*:885*/ -#line 16122 "btex.w" +/*:886*/ +#line 16212 "htex.w" ; -/*899:*/ -#line 17343 "btex.w" +/*900:*/ +#line 17404 "htex.w" post_line_break(final_widow_penalty) -/*:899*/ -#line 16124 "btex.w" +/*:900*/ +#line 16214 "htex.w" ; -/*887:*/ -#line 17134 "btex.w" +/*888:*/ +#line 17194 "htex.w" q= link(active); while(q!=last_active) @@ -2911,42 +2755,37 @@ free_node(q,passive_node_size); q= cur_p; } -/*:887*/ -#line 16125 "btex.w" +/*:888*/ +#line 16215 "htex.w" ; -#line 1246 "htex.ch" hrestore_param_list(); -#line 16127 "btex.w" } -/*:830*//*992:*/ -#line 1615 "htex.ch" +/*:831*//*993:*/ +#line 19075 "htex.w" #define ensure_vbox(N) static pointer prune_page_top(pointer p) -#line 18981 "btex.w" {pointer prev_p; pointer q; 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 18999 "btex.w" +case hlist_node:case vlist_node:case rule_node:/*994:*/ +#line 19098 "htex.w" -#line 1625 "htex.ch" {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; -#line 19001 "btex.w" if(width(temp_ptr)> height(p))width(temp_ptr)= width(temp_ptr)-height(p); else width(temp_ptr)= 0; p= null; } -/*:993*/ -#line 18987 "btex.w" +/*:994*/ +#line 19086 "htex.w" break; case whatsit_node:case mark_node:case ins_node:{prev_p= p;p= link(prev_p); }break; @@ -2959,11 +2798,10 @@ default:confusion("pruning"); return link(temp_head); } -/*:992*//*994:*/ -#line 1632 "htex.ch" +/*:993*//*995:*/ +#line 19123 "htex.w" static pointer vert_break(pointer p,scaled h,scaled d) -#line 19024 "btex.w" { pointer prev_p; @@ -2977,25 +2815,25 @@ scaled prev_dp; small_number t; prev_p= p; least_cost= awful_bad;do_all_six(set_height_zero);prev_dp= 0; -loop{/*997:*/ -#line 19057 "btex.w" +loop{/*998:*/ +#line 19159 "htex.w" if(p==null)pi= eject_penalty; -else/*998:*/ -#line 19072 "btex.w" +else/*999:*/ +#line 19174 "htex.w" switch(type(p)){ case hlist_node:case vlist_node:case rule_node:{ cur_height= cur_height+prev_dp+height(p);prev_dp= depth(p); goto not_found; } -case whatsit_node:/*1394:*/ -#line 24929 "btex.w" +case whatsit_node:/*1395:*/ +#line 25493 "htex.w" goto not_found -/*:1394*/ -#line 19078 "btex.w" +/*:1395*/ +#line 19180 "htex.w" ; case glue_node:if(precedes_break(prev_p))pi= 0; else goto update_heights;break; @@ -3009,15 +2847,15 @@ default:confusion("vertbreak"); } -/*:998*/ -#line 19061 "btex.w" +/*:999*/ +#line 19163 "htex.w" ; -/*999:*/ -#line 19093 "btex.w" +/*1000:*/ +#line 19195 "htex.w" if(pi<inf_penalty) -{/*1000:*/ -#line 19107 "btex.w" +{/*1001:*/ +#line 19209 "htex.w" if(cur_height<h) if((active_height[3]!=0)||(active_height[4]!=0)|| @@ -3026,8 +2864,8 @@ else b= badness(h-cur_height,active_height[2]); else if(cur_height-h> active_height[6])b= awful_bad; else b= badness(cur_height-h,active_height[6]) -/*:1000*/ -#line 19095 "btex.w" +/*:1001*/ +#line 19197 "htex.w" ; if(b<awful_bad) if(pi<=eject_penalty)b= pi; @@ -3040,146 +2878,139 @@ best_height_plus_depth= cur_height+prev_dp; if((b==awful_bad)||(pi<=eject_penalty))goto done; } -/*:999*/ -#line 19063 "btex.w" +/*:1000*/ +#line 19165 "htex.w" ; if((type(p)<glue_node)||(type(p)> kern_node))goto not_found; -update_heights:/*1001:*/ -#line 19119 "btex.w" +update_heights:/*1002:*/ +#line 19221 "htex.w" if(type(p)==kern_node)q= p; else{q= glue_ptr(p); active_height[2+stretch_order(q)]= active_height[2+stretch_order(q)]+stretch(q); active_height[6]= active_height[6]+shrink(q); -#line 1658 "htex.ch" if((shrink_order(q)!=normal)&&(shrink(q)!=0)) { DBG(DBGTEX,"Infinite glue shrinkage found in box being split"); r= new_spec(q);shrink_order(r)= normal;delete_glue_ref(q); glue_ptr(p)= r;q= r; } -#line 19136 "btex.w" } cur_height= cur_height+prev_dp+width(q);prev_dp= 0 -/*:1001*/ -#line 19066 "btex.w" +/*:1002*/ +#line 19168 "htex.w" ; not_found:if(prev_dp> d) {cur_height= cur_height+prev_dp-d; prev_dp= d; } -/*:997*/ -#line 19039 "btex.w" +/*:998*/ +#line 19140 "htex.w" ; prev_p= p;p= link(prev_p); } done:return best_place; } -/*:994*//*1012:*/ -#line 1688 "htex.ch" +/*:995*//*1013:*/ +#line 19520 "htex.w" void freeze_page_specs(small_number s) -#line 19426 "btex.w" {page_contents= s; -#line 1695 "htex.ch" page_goal= hvsize;page_max_depth= max_depth; -#line 19428 "btex.w" page_depth= 0;do_all_six(set_page_so_far_zero); least_page_cost= awful_bad; -#line 19439 "btex.w" +#ifdef STAT +if(tracing_pages> 0) +{begin_diagnostic(); +print_nl("%% goal height=");print_scaled(page_goal); + +print(", max depth=");print_scaled(page_max_depth); +end_diagnostic(false); +} +#endif } -/*:1012*//*1020:*/ -#line 1721 "htex.ch" +/*:1013*//*1021:*/ +#line 19618 "htex.w" bool hbuild_page(void) -#line 19524 "btex.w" { pointer p; pointer q,r; int b,c; int pi; -#line 1730 "htex.ch" if(link(contrib_head)==null)return false; -#line 19532 "btex.w" do{resume:p= link(contrib_head); -#line 19534 "btex.w" -/*1023:*/ -#line 19564 "btex.w" +/*1024:*/ +#line 19658 "htex.w" -/*1026:*/ -#line 19593 "btex.w" +/*1027:*/ +#line 19687 "htex.w" switch(type(p)){ case hlist_node:case vlist_node:case rule_node:if(page_contents<box_there) -/*1027:*/ -#line 19616 "btex.w" +/*1028:*/ +#line 19710 "htex.w" {if(page_contents==empty)freeze_page_specs(box_there); else page_contents= box_there; -#line 1760 "htex.ch" temp_ptr= new_spec(pointer_def[glue_kind][top_skip_no]); q= new_glue(temp_ptr);glue_ref_count(temp_ptr)= null; -#line 19620 "btex.w" if(width(temp_ptr)> height(p))width(temp_ptr)= width(temp_ptr)-height(p); else width(temp_ptr)= 0; link(q)= p;link(contrib_head)= q;goto resume; } -/*:1027*/ -#line 19597 "btex.w" +/*:1028*/ +#line 19691 "htex.w" -else/*1028:*/ -#line 19625 "btex.w" +else/*1029:*/ +#line 19720 "htex.w" {page_total= page_total+page_depth+height(p); page_depth= depth(p); goto contribute; } -/*:1028*/ -#line 19599 "btex.w" +/*:1029*/ +#line 19693 "htex.w" break; -case whatsit_node:/*1393:*/ -#line 24926 "btex.w" +case whatsit_node:/*1394:*/ +#line 25490 "htex.w" goto contribute -/*:1393*/ -#line 19601 "btex.w" +/*:1394*/ +#line 19695 "htex.w" ; case glue_node:if(page_contents<box_there)goto done1; else if(precedes_break(page_tail))pi= 0; else goto update_heights;break; case kern_node:if(page_contents<box_there)goto done1; -#line 1748 "htex.ch" else if(link(p)==null)return false; -#line 19607 "btex.w" else if(type(link(p))==glue_node)pi= 0; else goto update_heights;break; case penalty_node:if(page_contents<box_there)goto done1;else pi= penalty(p);break; case mark_node:goto contribute; -#line 1754 "htex.ch" case ins_node:happend_insertion(p);goto contribute; -#line 19612 "btex.w" default:confusion("page"); } -/*:1026*/ -#line 19569 "btex.w" +/*:1027*/ +#line 19663 "htex.w" ; -/*1031:*/ -#line 19659 "btex.w" +/*1032:*/ +#line 19748 "htex.w" if(pi<inf_penalty) -{/*1033:*/ -#line 19703 "btex.w" +{/*1034:*/ +#line 19794 "htex.w" if(page_total<page_goal) if((page_so_far[3]!=0)||(page_so_far[4]!=0)|| @@ -3188,9 +3019,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) -#line 1811 "htex.ch" -/*:1033*/ -#line 19662 "btex.w" +/*:1034*/ +#line 19751 "htex.w" ; if(b<awful_bad) if(pi<=eject_penalty)c= pi; @@ -3198,7 +3028,27 @@ else if(b<inf_bad)c= b+pi+insert_penalties; else c= deplorable; else c= b; if(insert_penalties>=10000)c= awful_bad; -#line 19672 "btex.w" +#ifdef STAT +if(tracing_pages> 0)/*1033:*/ +#line 19780 "htex.w" + +{begin_diagnostic();print_nl("%"); +print(" t=");print_totals(); +print(" g=");print_scaled(page_goal); +print(" b="); +if(b==awful_bad)print_char('*');else print_int(b); + +print(" p=");print_int(pi); +print(" c="); +if(c==awful_bad)print_char('*');else print_int(c); +if(c<=least_page_cost)print_char('#'); +end_diagnostic(false); +} + +/*:1033*/ +#line 19759 "htex.w" +; +#endif if(c<=least_page_cost) {best_page_break= p;best_size= page_goal; @@ -3210,44 +3060,40 @@ r= link(r); } } if((c==awful_bad)||(pi<=eject_penalty)) -#line 1799 "htex.ch" {hloc_set_next(best_page_break); if(p==best_page_break)best_page_break= null; hpack_page(); hfill_page_template(); return true; } -#line 19687 "btex.w" } -/*:1031*/ -#line 19572 "btex.w" +/*:1032*/ +#line 19666 "htex.w" ; if((type(p)<glue_node)||(type(p)> kern_node))goto contribute; -update_heights:/*1030:*/ -#line 19638 "btex.w" +update_heights:/*1031:*/ +#line 19733 "htex.w" if(type(p)==kern_node)q= p; else{q= glue_ptr(p); page_so_far[2+stretch_order(q)]= page_so_far[2+stretch_order(q)]+stretch(q); page_shrink= page_shrink+shrink(q); -#line 1778 "htex.ch" if((shrink_order(q)!=normal)&&(shrink(q)!=0)) { DBG(DBGTEX,"Infinite glue shrinkage found on current page"); r= new_spec(q);shrink_order(r)= normal;fast_delete_glue_ref(q); glue_ptr(p)= r;q= r; } -#line 19656 "btex.w" } page_total= page_total+page_depth+width(q);page_depth= 0 -/*:1030*/ -#line 19575 "btex.w" +/*:1031*/ +#line 19669 "htex.w" ; -contribute:/*1029:*/ -#line 19631 "btex.w" +contribute:/*1030:*/ +#line 19726 "htex.w" if(page_depth> page_max_depth) {page_total= @@ -3255,61 +3101,58 @@ page_total+page_depth-page_max_depth; page_depth= page_max_depth; } -/*:1029*/ -#line 19576 "btex.w" +/*:1030*/ +#line 19670 "htex.w" ; -/*1024:*/ -#line 19581 "btex.w" +/*1025:*/ +#line 19675 "htex.w" link(page_tail)= p;page_tail= p; link(contrib_head)= link(p);link(p)= null;goto done -/*:1024*/ -#line 19577 "btex.w" +/*:1025*/ +#line 19671 "htex.w" ; -done1:/*1025:*/ -#line 19585 "btex.w" +done1:/*1026:*/ +#line 19679 "htex.w" link(contrib_head)= link(p);link(p)= null;flush_node_list(p) -/*:1025*/ -#line 19578 "btex.w" +/*:1026*/ +#line 19672 "htex.w" ; done: -/*:1023*/ -#line 19536 "btex.w" +/*:1024*/ +#line 19629 "htex.w" ; }while(!(link(contrib_head)==null)); -/*1021:*/ -#line 19543 "btex.w" +/*1022:*/ +#line 19637 "htex.w" if(nest_ptr==0)tail= contrib_head; else contrib_tail= contrib_head -/*:1021*/ -#line 19538 "btex.w" +/*:1022*/ +#line 19631 "htex.w" ; -#line 1741 "htex.ch" return false; } -#line 19540 "btex.w" -/*:1020*//*1034:*/ -#line 1811 "htex.ch" +/*:1021*//*1035:*/ +#line 19802 "htex.w" void happend_insertion(pointer p) {uint8_t n; scaled delta,h,w; pointer q,r; if(page_contents==empty)freeze_page_specs(inserts_only); -#line 19713 "btex.w" n= subtype(p);r= page_ins_head; while(n>=subtype(link(r)))r= link(r); n= qo(n); if(subtype(r)!=qi(n)) -/*1035:*/ -#line 19740 "btex.w" +/*1036:*/ +#line 19834 "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); @@ -3322,14 +3165,12 @@ else h= x_over_n(height(r),1000)*count(n); page_goal= page_goal-h-width(q); page_so_far[2+stretch_order(q)]= page_so_far[2+stretch_order(q)]+stretch(q); page_shrink= page_shrink+shrink(q); -#line 1835 "htex.ch" if((shrink_order(q)!=normal)&&(shrink(q)!=0)) DBG(DBGTEX,"Infinite glue shrinkage inserted from stream %d",n); -#line 19761 "btex.w" } -/*:1035*/ -#line 19718 "btex.w" +/*:1036*/ +#line 19813 "htex.w" ; if(type(r)==split_up)insert_penalties= insert_penalties+float_cost(p); else{last_ins_ptr(r)= p; @@ -3340,8 +3181,8 @@ else h= x_over_n(height(p),1000)*count(n); 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 19773 "btex.w" +else/*1037:*/ +#line 19860 "htex.w" {if(count(n)<=0)w= max_dimen; else{w= page_goal-page_total-page_depth; @@ -3350,7 +3191,25 @@ if(count(n)!=1000)w= x_over_n(w,count(n))*1000; if(w> dimen(n)-height(r))w= dimen(n)-height(r); q= vert_break(ins_ptr(p),w,depth(p)); height(r)= height(r)+best_height_plus_depth; -#line 19784 "btex.w" +#ifdef STAT +if(tracing_pages> 0)/*1038:*/ +#line 19880 "htex.w" + +{begin_diagnostic();print_nl("% split");print_int(n); + +print(" to ");print_scaled(w); +print_char(',');print_scaled(best_height_plus_depth); +print(" p="); +if(q==null)print_int(eject_penalty); +else if(type(q)==penalty_node)print_int(penalty(q)); +else print_char('0'); +end_diagnostic(false); +} + +/*:1038*/ +#line 19869 "htex.w" +; +#endif if(count(n)!=1000) best_height_plus_depth= x_over_n(best_height_plus_depth,1000)*count(n); @@ -3360,15 +3219,14 @@ if(q==null)insert_penalties= insert_penalties+eject_penalty; else if(type(q)==penalty_node)insert_penalties= insert_penalties+penalty(q); } -/*:1036*/ -#line 19729 "btex.w" +/*:1037*/ +#line 19824 "htex.w" ; } -#line 19732 "btex.w" } -/*:1034*//*1041:*/ -#line 1869 "htex.ch" +/*:1035*//*1042:*/ +#line 19952 "htex.w" void hpack_page(void) { @@ -3389,8 +3247,8 @@ if(box(0)!=null) {flush_node_list(box(0));box(0)= null;} insert_penalties= 0; save_split_top_skip= split_top_skip; -/*1045:*/ -#line 19937 "btex.w" +/*1046:*/ +#line 20038 "htex.w" {r= link(page_ins_head); while(r!=page_ins_head) @@ -3405,22 +3263,22 @@ r= link(r); } } -/*:1045*/ -#line 1889 "htex.ch" +/*:1046*/ +#line 19972 "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 19963 "btex.w" +{/*1048:*/ +#line 20064 "htex.w" {r= link(page_ins_head); while(subtype(r)!=subtype(p))r= link(r); if(best_ins_ptr(r)==null)wait= true; else{wait= false;s= last_ins_ptr(r);link(s)= ins_ptr(p); if(best_ins_ptr(r)==p) -/*1048:*/ -#line 19979 "btex.w" +/*1049:*/ +#line 20080 "htex.w" {if(type(r)==split_up) if((broken_ins(r)==p)&&(broken_ptr(r)!=null)) @@ -3434,28 +3292,24 @@ height(p)= height(temp_ptr)+depth(temp_ptr); free_node(temp_ptr,box_node_size);wait= true; } } -#line 1927 "htex.ch" while(link(s)!=null)s= link(s); best_ins_ptr(r)= null; -#line 19993 "btex.w" n= qo(subtype(r)); temp_ptr= list_ptr(box(n)); free_node(box(n),box_node_size); -#line 1934 "htex.ch" streams[n].p= temp_ptr; streams[n].t= s; -#line 19997 "btex.w" } -/*:1048*/ -#line 19970 "btex.w" +/*:1049*/ +#line 20071 "htex.w" else{while(link(s)!=null)s= link(s); last_ins_ptr(r)= s; } } -/*1049:*/ -#line 19999 "btex.w" +/*1050:*/ +#line 20102 "htex.w" link(prev_p)= link(p);link(p)= null; if(wait) @@ -3466,20 +3320,20 @@ free_node(p,ins_node_size); } p= prev_p -/*:1049*/ -#line 19976 "btex.w" +/*:1050*/ +#line 20077 "htex.w" ; } -/*:1047*/ -#line 1894 "htex.ch" +/*:1048*/ +#line 19977 "htex.w" ; } prev_p= p;p= link(prev_p); } split_top_skip= save_split_top_skip; -/*1044:*/ -#line 19912 "btex.w" +/*1045:*/ +#line 20016 "htex.w" if(p!=null) {if(link(contrib_head)==null) @@ -3489,20 +3343,18 @@ link(page_tail)= link(contrib_head); link(contrib_head)= p; link(prev_p)= null; } -#line 1916 "htex.ch" streams[0].p= link(page_head);link(page_head)= null;page_tail= page_head; streams[0].t= prev_p; if(q!=hold_head) {link(q)= link(contrib_head); link(contrib_head)= link(hold_head); } -#line 19930 "btex.w" -/*:1044*/ -#line 1900 "htex.ch" +/*:1045*/ +#line 19983 "htex.w" ; -/*1046:*/ -#line 19951 "btex.w" +/*1047:*/ +#line 20052 "htex.w" r= link(page_ins_head); while(r!=page_ins_head) @@ -3510,14 +3362,13 @@ while(r!=page_ins_head) } link(page_ins_head)= page_ins_head -/*:1046*/ -#line 1901 "htex.ch" +/*:1047*/ +#line 19984 "htex.w" ; } -#line 19882 "btex.w" -/*:1041*//*1173:*/ -#line 1951 "htex.ch" +/*:1042*//*1174:*/ +#line 21974 "htex.w" void hdisplay(pointer p,pointer a,bool l) { @@ -3541,17 +3392,14 @@ pop_nest(); store_map(par_ptr,node_pos,0); line_break(display_widow_penalty,par_ptr); x= cur_list.hs_field; -#line 21876 "btex.w" -/*1174:*/ -#line 21891 "btex.w" +/*1175:*/ +#line 22006 "htex.w" -#line 1991 "htex.ch" v= shift_amount(just_box)+2*dimen_def[quad_no];w= -max_dimen; -#line 21893 "btex.w" p= list_ptr(just_box); while(p!=null) -{/*1175:*/ -#line 21908 "btex.w" +{/*1176:*/ +#line 22023 "htex.w" reswitch:if(is_char_node(p)) {f= font(p);d= char_width(f,char_info(f,character(p))); @@ -3560,19 +3408,19 @@ goto found; switch(type(p)){ case hlist_node:case vlist_node:case rule_node:{d= width(p);goto found; } -case ligature_node:/*665:*/ -#line 13033 "btex.w" +case ligature_node:/*666:*/ +#line 13134 "htex.w" {mem[lig_trick]= mem[lig_char(p)];link(lig_trick)= link(p); p= lig_trick;goto reswitch; } -/*:665*/ -#line 21916 "btex.w" +/*:666*/ +#line 22031 "htex.w" case kern_node:case math_node:d= width(p);break; -case glue_node:/*1176:*/ -#line 21930 "btex.w" +case glue_node:/*1177:*/ +#line 22045 "htex.w" {q= glue_ptr(p);d= width(q); if(glue_sign(just_box)==stretching) @@ -3588,22 +3436,21 @@ v= max_dimen; if(subtype(p)>=a_leaders)goto found; } -/*:1176*/ -#line 21919 "btex.w" +/*:1177*/ +#line 22034 "htex.w" break; -case whatsit_node:/*1390:*/ -#line 24915 "btex.w" +case whatsit_node:/*1391:*/ +#line 25480 "htex.w" d= 0 -#line 2624 "htex.ch" -/*:1390*/ -#line 21920 "btex.w" +/*:1391*/ +#line 22035 "htex.w" ;break; default:d= 0; } -/*:1175*/ -#line 21896 "btex.w" +/*:1176*/ +#line 22011 "htex.w" ; if(v<max_dimen)v= v+d; goto not_found; @@ -3616,26 +3463,22 @@ not_found:p= link(p); } done: -/*:1174*/ -#line 21878 "btex.w" +/*:1175*/ +#line 21999 "htex.w" ; } -/*1177:*/ -#line 21948 "btex.w" +/*1178:*/ +#line 22063 "htex.w" if(par_shape_ptr==null) if((hang_indent!=0)&& (((hang_after>=0)&&(prev_graf+2> hang_after))|| (prev_graf+1<-hang_after))) -#line 1997 "htex.ch" {l= x-abs(hang_indent); -#line 21954 "btex.w" if(hang_indent> 0)s= hang_indent;else s= 0; } -#line 2003 "htex.ch" else{l= x;s= 0; -#line 21957 "btex.w" } else{n= info(par_shape_ptr); if(prev_graf+2>=n)p= par_shape_ptr+2*n; @@ -3643,19 +3486,17 @@ else p= par_shape_ptr+2*(prev_graf+2); s= mem[p-1].sc;l= mem[p].sc; } -/*:1177*/ -#line 21881 "btex.w" +/*:1178*/ +#line 22002 "htex.w" ; -#line 1985 "htex.ch" pre_display_size= w;display_width= l;display_indent= s; -#line 21889 "btex.w" } -/*:1173*//*1228:*/ -#line 2015 "htex.ch" +/*:1174*//*1229:*/ +#line 22730 "htex.w" -{/*1226:*/ -#line 22598 "btex.w" +{/*1227:*/ +#line 22713 "htex.w" pointer b; scaled w; @@ -3668,24 +3509,20 @@ small_number g1,g2; pointer r; pointer t; -/*:1226*/ -#line 2016 "htex.ch" +/*:1227*/ +#line 22731 "htex.w" adjust_tail= adjust_head;b= hpack(p,natural);p= list_ptr(b); t= adjust_tail;adjust_tail= null; w= width(b);z= display_width;s= display_indent; -#line 2025 "htex.ch" if(a==null) -#line 22621 "btex.w" {e= 0;q= 0; } -#line 2031 "htex.ch" else{e= width(a);q= e+math_quad; -#line 22624 "btex.w" } if(w+q> z) -/*1230:*/ -#line 22650 "btex.w" +/*1231:*/ +#line 22769 "htex.w" {if((e!=0)&&((w-total_shrink[normal]+q<=z)|| (total_shrink[fil]!=0)||(total_shrink[fill]!=0)|| @@ -3702,11 +3539,11 @@ b= hpack(p,z,exactly); w= width(b); } -/*:1230*/ -#line 22627 "btex.w" +/*:1231*/ +#line 22742 "htex.w" ; -/*1231:*/ -#line 22674 "btex.w" +/*1232:*/ +#line 22793 "htex.w" d= half(z-w); if((e> 0)&&(d<2*e)) @@ -3714,13 +3551,12 @@ if((e> 0)&&(d<2*e)) if(p!=null)if(!is_char_node(p))if(type(p)==glue_node)d= 0; } -/*:1231*/ -#line 22629 "btex.w" +/*:1232*/ +#line 22744 "htex.w" ; -/*1232:*/ -#line 22687 "btex.w" +/*1233:*/ +#line 22806 "htex.w" -#line 2058 "htex.ch" tail_append(new_penalty(pre_display_penalty)); store_map(tail,node_pos,offset); if((d+s<=pre_display_size)||l) @@ -3734,13 +3570,12 @@ if(l&&(e==0)) 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);} -#line 22700 "btex.w" -/*:1232*/ -#line 22630 "btex.w" +/*:1233*/ +#line 22745 "htex.w" ; -/*1233:*/ -#line 22701 "btex.w" +/*1234:*/ +#line 22821 "htex.w" if(e!=0) {r= new_kern(z-w-e-d); @@ -3751,43 +3586,35 @@ else{link(b)= r;link(r)= a; } b= hpack(b,natural); } -#line 2076 "htex.ch" shift_amount(b)= s+d;append_to_vlist(b,offset) -#line 22712 "btex.w" -/*:1233*/ -#line 22631 "btex.w" +/*:1234*/ +#line 22746 "htex.w" ; -/*1234:*/ -#line 22713 "btex.w" +/*1235:*/ +#line 22833 "htex.w" if((a!=null)&&(e==0)&&!l) {tail_append(new_penalty(inf_penalty)); shift_amount(a)= s+z-width(a); -#line 2082 "htex.ch" append_to_vlist(a,offset); -#line 22718 "btex.w" g2= 0; } if(t!=adjust_head) {link(tail)= link(adjust_head);tail= t; } -#line 2089 "htex.ch" tail_append(new_penalty(post_display_penalty)); offset= (hpos-hstart)+1-node_pos; store_map(tail,node_pos,offset); if(g2> 0){tail_append(new_glue(pointer_def[glue_kind][g2]));store_map(tail,node_pos,offset);} -#line 22725 "btex.w" -/*:1234*/ -#line 22632 "btex.w" +/*:1235*/ +#line 22747 "htex.w" ; -#line 2037 "htex.ch" prev_graf= prev_graf+3; cur_list.bs_pos= hpos+node_pos; push_nest();mode= hmode; } } -#line 22634 "btex.w" -/*:1228*/ +/*:1229*/ diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/htex.h b/Build/source/texk/web2c/hitexdir/hintview/src/htex.h index a4beed44589..fb7a9a24427 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 2639 "htex.ch" +/*1411:*/ +#line 25703 "htex.w" #define banner "This is TeX, Version 3.141592653 (HINT)" \ @@ -710,7 +710,7 @@ else decr(glue_ref_count(A) ) ; \ #define tracing_macros int_par(tracing_macros_code) #define tracing_stats int_par(tracing_stats_code) #define tracing_paragraphs (debugflags&DBGTEX) -#define tracing_pages int_par(tracing_pages_code) +#define tracing_pages (debugflags&DBGPAGE) #define tracing_output int_par(tracing_output_code) #define tracing_lost_chars int_par(tracing_lost_chars_code) #define tracing_commands int_par(tracing_commands_code) @@ -1728,10 +1728,10 @@ 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 2640 "htex.ch" +#line 25704 "htex.w" enum{/*11:*/ -#line 355 "btex.w" +#line 362 "htex.w" mem_max= 65534, @@ -1772,36 +1772,36 @@ file_name_size= 1024, empty_string= 256 /*:11*/ -#line 2641 "htex.ch" +#line 25705 "htex.w" }; /*18:*/ -#line 495 "btex.w" +#line 502 "htex.w" typedef uint8_t ASCII_code; /*:18*//*25:*/ -#line 731 "btex.w" +#line 738 "htex.w" typedef uint8_t eight_bits; typedef struct{FILE*f;text_char d;}alpha_file; typedef struct{FILE*f;eight_bits d;}byte_file; /*:25*//*38:*/ -#line 1091 "btex.w" +#line 1098 "htex.w" typedef int32_t pool_pointer; typedef int16_t str_number; typedef uint8_t packed_ASCII_code; -/*:38*//*104:*/ -#line 2128 "btex.w" +/*:38*//*105:*/ +#line 2194 "htex.w" typedef int scaled; typedef int32_t nonnegative_integer; typedef int8_t small_number; -/*:104*//*113:*/ -#line 2322 "btex.w" +/*:105*//*114:*/ +#line 2405 "htex.w" #if __SIZEOF_FLOAT__==4 typedef float float32_t; @@ -1810,8 +1810,8 @@ typedef float float32_t; #endif typedef float glue_ratio; -/*:113*//*117:*/ -#line 2431 "btex.w" +/*:114*//*118:*/ +#line 2514 "htex.w" typedef uint8_t quarterword; typedef uint16_t halfword; @@ -1838,17 +1838,16 @@ four_quarters qqqq; };}memory_word; typedef struct{FILE*f;memory_word d;}word_file; -/*:117*//*155:*/ -#line 3155 "btex.w" +/*:118*//*156:*/ +#line 3245 "htex.w" typedef int8_t glue_ord; -/*:155*//*221:*/ -#line 4316 "btex.w" +/*:156*//*222:*/ +#line 4409 "htex.w" typedef struct{int16_t mode_field; pointer head_field,tail_field; -#line 699 "htex.ch" int pg_field; pointer bs_field,ls_field; scaled lsl_field; @@ -1857,46 +1856,45 @@ scaled hs_field; scaled ds_field,dw_field,di_field; scaled ht_field; uint32_t np_field; -#line 4320 "btex.w" memory_word aux_field; }list_state_record; -/*:221*//*279:*/ -#line 5892 "btex.w" +/*:222*//*280:*/ +#line 5998 "htex.w" typedef int8_t group_code; -/*:279*//*310:*/ -#line 6471 "btex.w" +/*:280*//*311:*/ +#line 6577 "htex.w" typedef struct{ quarterword state_field,index_field; halfword start_field,loc_field,limit_field,name_field; }in_state_record; -/*:310*//*558:*/ -#line 10753 "btex.w" +/*:311*//*559:*/ +#line 10859 "htex.w" typedef uint8_t internal_font_number; typedef uint16_t font_index; -/*:558*//*605:*/ -#line 11950 "btex.w" +/*:559*//*606:*/ +#line 12051 "htex.w" typedef int8_t dvi_index; -/*:605*//*944:*/ -#line 18222 "btex.w" +/*:606*//*945:*/ +#line 18317 "htex.w" typedef uint16_t trie_pointer; -/*:944*//*949:*/ -#line 18291 "btex.w" +/*:945*//*950:*/ +#line 18386 "htex.w" typedef int16_t hyph_pointer; -/*:949*/ -#line 2642 "htex.ch" +/*:950*/ +#line 25706 "htex.w" extern void list_init(void); extern void hpack_page(void); @@ -1904,7 +1902,6 @@ extern void happend_insertion(pointer p); extern bool hbuild_page(void); extern void hdisplay(pointer p,pointer a,bool l); extern void mem_init(void); -#line 25143 "btex.w" extern pointer copy_node_list(pointer p); extern void flush_node_list(pointer p); extern @@ -1924,20 +1921,16 @@ extern int*const char_base; extern int*const width_base; extern memory_word font_info[]; extern scaled*const font_size; -#line 2656 "htex.ch" extern char**const font_name; extern void hclear_fonts(void); extern void read_font_info(int f,char*nom,scaled s); -#line 25165 "btex.w" extern list_state_record cur_list; extern pointer get_node(int s); extern pointer lo_mem_max; extern pointer hi_mem_min; extern memory_word*const mem; extern pointer just_box; -#line 2664 "htex.ch" extern void append_to_vlist(pointer b,uint32_t offset); -#line 25172 "btex.w" extern pointer adjust_tail; extern void freeze_page_specs(small_number s); extern pointer page_tail; @@ -1956,5 +1949,4 @@ extern int nest_ptr; extern void pop_nest(void); extern void push_nest(void); extern void delete_glue_ref(pointer p); -#line 2670 "htex.ch" -void line_break(int final_widow_penalty,pointer par_ptr);/*:1410*/ +void line_break(int final_widow_penalty,pointer par_ptr);/*:1411*/ diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/rendernative.h b/Build/source/texk/web2c/hitexdir/hintview/src/rendernative.h index f45dcabf628..211aa545227 100644 --- a/Build/source/texk/web2c/hitexdir/hintview/src/rendernative.h +++ b/Build/source/texk/web2c/hitexdir/hintview/src/rendernative.h @@ -1,51 +1,51 @@ /*377:*/ -#line 7640 "hint.w" +#line 7642 "hint.w" #ifndef _RENDERNATIVE_H #define _RENDERNATIVE_H /*329:*/ -#line 6572 "hint.w" +#line 6568 "hint.w" extern void nativeInit(void); extern void nativeClear(void); /*:329*//*330:*/ -#line 6579 "hint.w" +#line 6575 "hint.w" extern void nativeSetSize(int px_h,int px_v,double xdpi,double ydpi); /*:330*//*331:*/ -#line 6584 "hint.w" +#line 6580 "hint.w" extern void nativeSetDark(int dark); /*:331*//*332:*/ -#line 6589 "hint.w" +#line 6585 "hint.w" extern void nativeBlank(void); /*:332*//*333:*/ -#line 6599 "hint.w" +#line 6595 "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); /*:333*//*334:*/ -#line 6610 "hint.w" +#line 6606 "hint.w" void nativeRule(double x,double y,double w,double h); /*:334*//*335:*/ -#line 6616 "hint.w" +#line 6612 "hint.w" void nativeImage(double x,double y,double w,double h,unsigned char*istart,unsigned char*iend); /*:335*//*336:*/ -#line 6622 "hint.w" +#line 6618 "hint.w" extern void nativeSetPK(struct gcache_s*g); extern void nativeSetFreeType(struct gcache_s*g); /*:336*//*337:*/ -#line 6629 "hint.w" +#line 6625 "hint.w" void nativeFreeGlyph(struct gcache_s*g); /*:337*/ -#line 7644 "hint.w" +#line 7646 "hint.w" #endif |