diff options
author | Martin Ruckert <martin.ruckert@hm.edu> | 2022-01-19 16:45:25 +0000 |
---|---|---|
committer | Martin Ruckert <martin.ruckert@hm.edu> | 2022-01-19 16:45:25 +0000 |
commit | fed1176913b9541699b98cb0aadc0edd5ffb35c7 (patch) | |
tree | 538f278dd5f1eda608afb820659b65f9ffaed042 /Build | |
parent | 7f3c341a9f19795e423e8821c34bbe37fea20aed (diff) |
updating the HINT viewer source files with changes due to Android
git-svn-id: svn://tug.org/texlive/trunk@61659 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
16 files changed, 1225 insertions, 1190 deletions
diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/Makefile b/Build/source/texk/web2c/hitexdir/hintview/src/Makefile index 6fb3b15d5e9..876d708a79d 100644 --- a/Build/source/texk/web2c/hitexdir/hintview/src/Makefile +++ b/Build/source/texk/web2c/hitexdir/hintview/src/Makefile @@ -24,7 +24,7 @@ LIBS= ../external/glfw-3.1.2/msys.build/src/libglfw3.a ../external/libglew.a -l -lm -lz # -ldl -lm -lX11 -lpthread -lXrandr -lXinerama -lXi -lXcursor -lGL -lz else -LIBS= -l:libglfw3.a -l:libGLEW.a -ldl -lfreetype -lX11 -lXrandr -lXinerama -lXi -lXcursor -lGL -lz -lpthread -lm +LIBS= -lglfw -lGLEW -ldl -lfreetype -lX11 -lXrandr -lXinerama -lXi -lXcursor -lGL -lz -lpthread -lm endif all: hintview @@ -50,13 +50,6 @@ hfonts.o: hfonts.c hintview: $(OBJ) $(CC) $(LDFLAGS) $(OBJ) $(LIBS) -o $@ -SRC= $(OBJ:.o=.c) $(HFILES) main.h stb_image.h Makefile -DIST_SRC = $(SRC:%=src/%) -DIST_MAN = man/hintview.1 - -hintview.tgz: - tar -c -C .. --transform 's,^,hintview/,' -z -f $@ $(DIST_SRC) $(DIST_MAN) - BINDIR=/usr/local/bin MANDIR=/usr/local/man @@ -65,13 +58,7 @@ install: hintview install -t $(BINDIR) --mode=755 hintview install -t $(MANDIR)/man1 --mode=644 ../man/hintview.1 - -.PHONY: www -www: hintview hintview.tgz - cp hintview hintview.tgz ../man/hintview.1 ../../www/linux/ - clean: rm -f *.o *~ *.dvi *.log *.aux - rm -f hintview hintview.tgz - $(MAKE) -C ../../hint viewlinux || true + rm -f hintview diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/error.h b/Build/source/texk/web2c/hitexdir/hintview/src/error.h index d283a6cd52e..53401a44e05 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 @@ -/*357:*/ -#line 7147 "hint.w" +/*358:*/ +#line 7163 "hint.w" #ifndef _ERROR_H #define _ERROR_H @@ -56,4 +56,4 @@ extern int herror(char*title,char*msg); #endif #endif -/*:357*/ +/*:358*/ diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/format.h b/Build/source/texk/web2c/hitexdir/hintview/src/format.h index fa3ac640948..a4ed4b630af 100644 --- a/Build/source/texk/web2c/hitexdir/hintview/src/format.h +++ b/Build/source/texk/web2c/hitexdir/hintview/src/format.h @@ -155,12 +155,12 @@ DEF_KIND(penalty,int,31) font_kind= glyph_kind,int_kind= penalty_kind,dimen_kind= kern_kind,label_kind= link_kind,outline_kind= link_kind /*:10*/ #line 489 "format.w" -}kind_t; +}Kind; #undef DEF_KIND /*:6*/ /*11:*/ #line 621 "format.w" -typedef enum{b000= 0,b001= 1,b010= 2,b011= 3,b100= 4,b101= 5,b110= 6,b111= 7}info_t; +typedef enum{b000= 0,b001= 1,b010= 2,b011= 3,b100= 4,b101= 5,b110= 6,b111= 7}Info; /*:11*/ /*56:*/ #line 1294 "format.w" @@ -176,39 +176,39 @@ typedef enum{b000= 0,b001= 1,b010= 2,b011= 3,b100= 4,b101= 5,b110= 6,b111= 7}inf /*:56*/ /*76:*/ #line 1620 "format.w" -typedef int32_t scaled_t; -#define ONE ((scaled_t)(1<<16)) +typedef int32_t Scaled; +#define ONE ((Scaled)(1<<16)) /*:76*/ /*81:*/ #line 1676 "format.w" -typedef scaled_t dimen_t; -#define MAX_DIMEN ((dimen_t)(0x3FFFFFFF)) +typedef Scaled Dimen; +#define MAX_DIMEN ((Dimen)(0x3FFFFFFF)) /*:81*/ /*86:*/ #line 1732 "format.w" typedef struct{ -dimen_t w;float32_t h,v; -}xdimen_t; +Dimen w;float32_t h,v; +}Xdimen; /*:86*/ /*95:*/ #line 1877 "format.w" -typedef enum{normal_o= 0,fil_o= 1,fill_o= 2,filll_o= 3}order_t; -typedef struct{float64_t f;order_t o;}stretch_t; -typedef union{float32_t f;uint32_t u;}stch_t; +typedef enum{normal_o= 0,fil_o= 1,fill_o= 2,filll_o= 3}Order; +typedef struct{float64_t f;Order o;}Stretch; +typedef union{float32_t f;uint32_t u;}Stch; /*:95*/ /*130:*/ #line 2458 "format.w" typedef struct{ -xdimen_t w; -stretch_t p,m; -}glue_t; +Xdimen w; +Stretch p,m; +}Glue; /*:130*/ /*180:*/ #line 3881 "format.w" typedef struct{ -glue_t bs,ls; -dimen_t lsl; -}baseline_t; +Glue bs,ls; +Dimen lsl; +}Baseline; /*:180*/ /*242:*/ #line 4883 "format.w" @@ -218,7 +218,7 @@ uint8_t where; bool used; int next; uint32_t pos0;uint8_t f; -}label_t; +}Label; /*:242*/ /*373:*/ #line 7941 "format.w" @@ -253,7 +253,7 @@ month_no= 19, year_no= 20, hang_after_no= 21, floating_penalty_no= 22 -}int_no_t; +}Int_no; #define MAX_INT_DEFAULT floating_penalty_no /*:385*/ /*387:*/ #line 8249 "format.w" @@ -269,7 +269,7 @@ hang_indent_no= 6, emergency_stretch_no= 7, quad_no= 8, math_quad_no= 9 -}dimen_no_t; +}Dimen_no; #define MAX_DIMEN_DEFAULT math_quad_no /*:387*/ /*389:*/ #line 8294 "format.w" @@ -278,7 +278,7 @@ typedef enum{ zero_xdimen_no= 0, hsize_xdimen_no= 1, vsize_xdimen_no= 2 -}xdimen_no_t; +}Xdimen_no; #define MAX_XDIMEN_DEFAULT vsize_xdimen_no /*:389*/ /*391:*/ #line 8318 "format.w" @@ -299,42 +299,42 @@ top_skip_no= 11, split_top_skip_no= 12, tab_skip_no= 13, par_fill_skip_no= 14 -}glue_no_t; +}Glue_no; #define MAX_GLUE_DEFAULT par_fill_skip_no /*:391*/ /*393:*/ #line 8404 "format.w" typedef enum{ zero_baseline_no= 0 -}baseline_no_t; +}Baseline_no; #define MAX_BASELINE_DEFAULT zero_baseline_no /*:393*/ /*395:*/ #line 8429 "format.w" typedef enum{ zero_label_no= 0 -}label_no_t; +}Label_no; #define MAX_LABEL_DEFAULT zero_label_no /*:395*/ /*397:*/ #line 8443 "format.w" typedef enum{ zero_stream_no= 0 -}stream_no_t; +}Stream_no; #define MAX_STREAM_DEFAULT zero_stream_no /*:397*/ /*399:*/ #line 8459 "format.w" typedef enum{ zero_page_no= 0 -}page_no_t; +}Page_no; #define MAX_PAGE_DEFAULT zero_page_no /*:399*/ /*401:*/ #line 8476 "format.w" typedef enum{ zero_range_no= 0 -}range_no_t; +}Range_no; #define MAX_RANGE_DEFAULT zero_range_no /*:401*/ #line 10010 "format.w" @@ -346,11 +346,11 @@ extern unsigned int debugflags; extern FILE*hlog; extern int max_fixed[32],max_default[32],max_ref[32],max_outline; extern int32_t int_defaults[MAX_INT_DEFAULT+1]; -extern dimen_t dimen_defaults[MAX_DIMEN_DEFAULT+1]; -extern xdimen_t xdimen_defaults[MAX_XDIMEN_DEFAULT+1]; -extern glue_t glue_defaults[MAX_GLUE_DEFAULT+1]; -extern baseline_t baseline_defaults[MAX_BASELINE_DEFAULT+1]; -extern label_t label_defaults[MAX_LABEL_DEFAULT+1]; +extern Dimen dimen_defaults[MAX_DIMEN_DEFAULT+1]; +extern Xdimen xdimen_defaults[MAX_XDIMEN_DEFAULT+1]; +extern Glue glue_defaults[MAX_GLUE_DEFAULT+1]; +extern Baseline baseline_defaults[MAX_BASELINE_DEFAULT+1]; +extern Label label_defaults[MAX_LABEL_DEFAULT+1]; extern signed char hnode_size[0x100]; #endif diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/get.c b/Build/source/texk/web2c/hitexdir/hintview/src/get.c index 300c7db66f2..b4a40e9e6e7 100644 --- a/Build/source/texk/web2c/hitexdir/hintview/src/get.c +++ b/Build/source/texk/web2c/hitexdir/hintview/src/get.c @@ -1,5 +1,5 @@ /*508:*/ - #line 10151 "format.w" + #line 10150 "format.w" #include "basetypes.h" #include <string.h> @@ -16,12 +16,12 @@ /*244:*/ #line 4905 "format.w" -label_t*labels; +Label*labels; int first_label= -1; /*:244*/ /*292:*/ #line 6068 "format.w" -range_pos_t*range_pos; +RangePos*range_pos; int next_range= 1,max_range; int*page_on; /*:292*/ /*303:*/ @@ -60,7 +60,7 @@ int stem_length= 0; FILE*hin= NULL,*hout= NULL,*hlog= NULL; /*:414*/ - #line 10164 "format.w" + #line 10163 "format.w" /*317:*/ @@ -158,7 +158,7 @@ return hin_size; #endif /*:317*/ - #line 10166 "format.w" + #line 10165 "format.w" /*304:*/ #line 6258 "format.w" @@ -194,24 +194,24 @@ DBG(DBGDIR,"banner size=0x%x\n",hbanner_size); return true; } /*:304*/ - #line 10167 "format.w" + #line 10166 "format.w" /*326:*/ #line 6813 "format.w" -entry_t*dir= NULL; +Entry*dir= NULL; uint16_t section_no,max_section_no; void new_directory(uint32_t entries) {DBG(DBGDIR,"Creating directory with %d entries\n",entries); RNG("Directory entries",entries,3,0x10000); max_section_no= entries-1; -ALLOCATE(dir,entries,entry_t); +ALLOCATE(dir,entries,Entry); dir[0].section_no= 0;dir[1].section_no= 1;dir[2].section_no= 2; } /*:326*/ /*327:*/ #line 6826 "format.w" -void hset_entry(entry_t*e,uint16_t i,uint32_t size,uint32_t xsize,char*file_name) +void hset_entry(Entry*e,uint16_t i,uint32_t size,uint32_t xsize,char*file_name) {e->section_no= i; e->size= size;e->xsize= xsize; if(file_name==NULL||*file_name==0) @@ -221,7 +221,7 @@ e->file_name= strdup(file_name); DBG(DBGDIR,"Creating entry %d: \"%s\" size=0x%x xsize=0x%x\n",i,file_name,size,xsize); } /*:327*/ - #line 10168 "format.w" + #line 10167 "format.w" /*305:*/ @@ -291,7 +291,7 @@ if(dir[n].xsize>0)hdecompress(n); /*:320*/ /*337:*/ #line 7051 "format.w" -void hget_entry(entry_t*e) +void hget_entry(Entry*e) { /*15:*/ #line 712 "format.w" @@ -328,7 +328,7 @@ NAME(a),INFO(a),NAME(z),INFO(z),node_pos,hpos-hstart-1); /*:337*/ /*338:*/ #line 7083 "format.w" -static void hget_root(entry_t*root) +static void hget_root(Entry*root) {DBG(DBGDIR,"Root entry at "SIZE_F"\n",hpos-hstart); hget_entry(root); root->pos= hpos-hstart; @@ -339,7 +339,7 @@ if(max_section_no<2)QUIT("Sections 0, 1, and 2 are mandatory"); void hget_directory(void) {int i; -entry_t root= {0}; +Entry root= {0}; hget_root(&root); DBG(DBGDIR,"Directory\n"); new_directory(max_section_no+1); @@ -365,7 +365,7 @@ free(dir);dir= NULL; #line 7499 "format.w" void hget_max_definitions(void) -{kind_t k; +{Kind k; /*15:*/ #line 712 "format.w" @@ -419,7 +419,7 @@ NAME(a),INFO(a),NAME(z),INFO(z),node_pos,hpos-hstart-1); if(INFO(a)!=0)QUIT("End of maximum list with info %d",INFO(a)); } /*:356*/ - #line 10170 "format.w" + #line 10169 "format.w" /*52:*/ #line 1228 "format.w" @@ -458,7 +458,7 @@ return u.d; /*:75*/ /*145:*/ #line 2822 "format.w" -void hget_size_boundary(info_t info) +void hget_size_boundary(Info info) {uint32_t n; if(info<2)return; n= HGET8; @@ -466,7 +466,7 @@ if(n-1!=0x100-info)QUIT("Size boundary byte 0x%x with info value %d at "SIZE_F, n,info,hpos-hstart-1); } -uint32_t hget_list_size(info_t info) +uint32_t hget_list_size(Info info) {uint32_t n= 0; if(info==1)return 0; else if(info==2)n= HGET8; @@ -477,7 +477,7 @@ else QUIT("List info %d must be 1, 2, 3, 4, or 5",info); return n; } -void hget_list(list_t*l) +void hget_list(List*l) {if(KIND(*hpos)!=list_kind&& KIND(*hpos)!=text_kind&&KIND(*hpos)!=param_kind) QUIT("List expected at 0x%x",(uint32_t)(hpos-hstart)); @@ -509,7 +509,7 @@ DBG(DBGNODE,"Get list at 0x%x size=%u\n",l->p,l->s); } } /*:145*/ - #line 10171 "format.w" + #line 10170 "format.w" /*426:*/ #line 8943 "format.w" @@ -557,7 +557,7 @@ return u.d; /*:457*/ /*495:*/ #line 9824 "format.w" -void hteg_size_boundary(info_t info) +void hteg_size_boundary(Info info) {uint32_t n; if(info<2)return; n= HTEG8; @@ -565,7 +565,7 @@ if(n-1!=0x100-info)QUIT("List size boundary byte 0x%x does not match info value n,info,hpos-hstart); } -uint32_t hteg_list_size(info_t info) +uint32_t hteg_list_size(Info info) {uint32_t n; if(info==1)return 0; else if(info==2)n= HTEG8; @@ -576,7 +576,7 @@ else QUIT("List info %d must be 1, 2, 3, 4, or 5",info); return n; } -void hteg_list(list_t*l) +void hteg_list(List*l) { /*454:*/ #line 9368 "format.w" @@ -612,13 +612,13 @@ hpos-hstart,node_pos-1); } } -void hteg_param_list(list_t*l) +void hteg_param_list(List*l) {if(KIND(*(hpos-1))!=param_kind)return; hteg_list(l); } /*:495*/ - #line 10172 "format.w" + #line 10171 "format.w" /*:508*/ diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/get.h b/Build/source/texk/web2c/hitexdir/hintview/src/get.h index 31bebae04e7..2d64ca9d8b2 100644 --- a/Build/source/texk/web2c/hitexdir/hintview/src/get.h +++ b/Build/source/texk/web2c/hitexdir/hintview/src/get.h @@ -1,61 +1,61 @@ /*507:*/ - #line 10106 "format.w" + #line 10105 "format.w" /*1:*/ #line 328 "format.w" -typedef struct{uint32_t c;uint8_t f;}glyph_t; +typedef struct{uint32_t c;uint8_t f;}Glyph; /*:1*/ /*113:*/ #line 2153 "format.w" typedef struct{ -dimen_t h,d,w; -}rule_t; +Dimen h,d,w; +}Rule; /*:113*/ /*122:*/ #line 2267 "format.w" typedef struct{ bool x; -xdimen_t d; -}kern_t; +Xdimen d; +}Kern; /*:122*/ /*140:*/ #line 2688 "format.w" typedef struct{ -kind_t k; +Kind k; uint32_t p; uint32_t s; -}list_t; +}List; /*:140*/ /*148:*/ #line 3110 "format.w" typedef enum{txt_font= 0x00,txt_global= 0x08,txt_local= 0x11, txt_cc= 0x1D,txt_node= 0x1E,txt_hyphen= 0x1F, -txt_glue= 0x20,txt_ignore= 0xFB}txt_t; +txt_glue= 0x20,txt_ignore= 0xFB}Txt; /*:148*/ /*159:*/ #line 3377 "format.w" -typedef struct{kind_t k;int n;}ref_t; +typedef struct{Kind k;int n;}Ref; /*:159*/ /*160:*/ #line 3414 "format.w" -typedef struct{dimen_t h,d,w,a;float32_t r;int8_t s,o;list_t l;}box_t; +typedef struct{Dimen h,d,w,a;float32_t r;int8_t s,o;List l;}Box; /*:160*/ /*187:*/ #line 3970 "format.w" -typedef struct{uint8_t f;list_t l;}lig_t; +typedef struct{uint8_t f;List l;}Lig; /*:187*/ /*195:*/ #line 4087 "format.w" -typedef struct disc_t{bool x;list_t p,q;uint8_t r;}disc_t; +typedef struct{bool x;List p,q;uint8_t r;}Disc; /*:195*/ /*228:*/ #line 4608 "format.w" typedef struct{ uint16_t n; -dimen_t w,h; -stretch_t p,m; -}image_t; +Dimen w,h; +Stretch p,m; +}Image; /*:228*/ /*264:*/ #line 5247 "format.w" @@ -64,14 +64,14 @@ uint8_t*t; int s; int d; uint16_t r; -}outline_t; +}Outline; /*:264*/ /*291:*/ #line 6063 "format.w" typedef -struct{uint8_t pg;uint32_t pos;bool on;int link;}range_pos_t; +struct{uint8_t pg;uint32_t pos;bool on;int link;}RangePos; /*:291*/ - #line 10107 "format.w" + #line 10106 "format.w" /*325:*/ #line 6799 "format.w" @@ -83,9 +83,9 @@ uint16_t section_no; char*file_name; uint8_t*buffer; uint32_t bsize; -}entry_t; +}Entry; /*:325*/ - #line 10108 "format.w" + #line 10107 "format.w" /*37:*/ #line 1062 "format.w" @@ -149,41 +149,41 @@ uint32_t bsize; #define HTEG32(X) (HBACK(4),(X)= (hpos[0]<<24)+(hpos[1]<<16)+(hpos[2]<<8)+hpos[3]) #define HTEGTAG(X) X= HTEG8,DBGTAG(X,hpos) /*:456*/ - #line 10109 "format.w" + #line 10108 "format.w" -extern entry_t*dir; +extern Entry*dir; extern uint16_t section_no,max_section_no; extern uint8_t*hpos,*hstart,*hend,*hpos0; extern uint64_t hin_size,hin_time; extern uint8_t*hin_addr; -extern label_t*labels; +extern Label*labels; extern char*hin_name; extern bool hget_map(void); extern void hget_unmap(void); extern void new_directory(uint32_t entries); -extern void hset_entry(entry_t*e,uint16_t i,uint32_t size,uint32_t xsize,char*file_name); +extern void hset_entry(Entry*e,uint16_t i,uint32_t size,uint32_t xsize,char*file_name); extern void hget_banner(void); extern void hget_section(uint16_t n); -extern void hget_entry(entry_t*e); +extern void hget_entry(Entry*e); extern void hget_directory(void); extern void hclear_dir(void); extern bool hcheck_banner(char*magic); extern void hget_max_definitions(void); extern uint32_t hget_utf8(void); -extern void hget_size_boundary(info_t info); -extern uint32_t hget_list_size(info_t info); -extern void hget_list(list_t*l); +extern void hget_size_boundary(Info info); +extern uint32_t hget_list_size(Info info); +extern void hget_list(List*l); extern uint32_t hget_utf8(void); extern float32_t hget_float32(void); extern float32_t hteg_float32(void); -extern void hteg_size_boundary(info_t info); -extern uint32_t hteg_list_size(info_t info); -extern void hteg_list(list_t*l); +extern void hteg_size_boundary(Info info); +extern uint32_t hteg_list_size(Info info); +extern void hteg_list(List*l); extern void hff_hpos(void); extern uint32_t hff_list_pos,hff_list_size; extern uint8_t hff_tag; diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/hfonts.c b/Build/source/texk/web2c/hitexdir/hintview/src/hfonts.c index 7de7f5a1da6..8f4ff366883 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 @@ -/*375:*/ -#line 7596 "hint.w" +/*376:*/ +#line 7612 "hint.w" #include "basetypes.h" #include "error.h" @@ -13,19 +13,19 @@ #include "rendernative.h" /*308:*/ -#line 5715 "hint.w" +#line 5724 "hint.w" -static font_t*fonts[0x100]= {NULL}; -/*:308*//*314:*/ -#line 5844 "hint.w" +static Font*fonts[0x100]= {NULL}; +/*:308*//*315:*/ +#line 5860 "hint.w" -static gcache_t g_undefined= {0}; -/*:314*//*348:*/ -#line 6991 "hint.w" +static Gcache g_undefined= {0}; +/*:315*//*349:*/ +#line 7007 "hint.w" static FT_Library ft_library= NULL; -/*:348*/ -#line 7608 "hint.w" +/*:349*/ +#line 7624 "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 7609 "hint.w" +#line 7625 "hint.w" -/*313:*/ -#line 5801 "hint.w" +/*314:*/ +#line 5817 "hint.w" #define G0_BITS 7 #define G0_SIZE (1<<G0_BITS) @@ -45,7 +45,7 @@ extern int32_t font_at_size(uint8_t f); #define G123_SIZE (1<<G123_BITS) #define G123_MASK (G123_SIZE-1) -static gcache_t*g_lookup(font_t*f,unsigned int cc) +static Gcache*g_lookup(Font*f,unsigned int cc) {if(cc>>G0_BITS){ unsigned int cc1= (cc>>G0_BITS); @@ -70,96 +70,96 @@ else if(f->g0) return f->g0[cc]; return NULL; } -/*:313*//*315:*/ -#line 5848 "hint.w" +/*:314*//*316:*/ +#line 5864 "hint.w" -static gcache_t*hnew_g(gcache_t**g) +static Gcache*hnew_g(Gcache**g) {if(*g==NULL) -*g= calloc(1,sizeof(gcache_t)); +*g= calloc(1,sizeof(Gcache)); if(*g==NULL) return&g_undefined; (*g)->ff= no_format; return*g; } -static gcache_t*hnew_g0(gcache_t***g,unsigned int cc) +static Gcache*hnew_g0(Gcache***g,unsigned int cc) {unsigned int cc0= cc&G0_MASK; if(*g==NULL) -*g= calloc(G0_SIZE,sizeof(gcache_t*)); +*g= calloc(G0_SIZE,sizeof(Gcache*)); if(*g==NULL) return&g_undefined; return hnew_g((*g)+cc0); } -static gcache_t*hnew_g1(gcache_t****g,unsigned int cc) +static Gcache*hnew_g1(Gcache****g,unsigned int cc) {unsigned int cc1= (cc>>G0_BITS)&G123_MASK; if(*g==NULL) -*g= calloc(G123_SIZE,sizeof(gcache_t**)); +*g= calloc(G123_SIZE,sizeof(Gcache**)); if(*g==NULL) return&g_undefined; return hnew_g0((*g)+cc1,cc); } -static gcache_t*hnew_g2(gcache_t*****g,unsigned int cc) +static Gcache*hnew_g2(Gcache*****g,unsigned int cc) {unsigned int cc2= (cc>>(G123_BITS+G0_BITS))&G123_MASK; if(*g==NULL) -*g= calloc(G123_SIZE,sizeof(gcache_t***)); +*g= calloc(G123_SIZE,sizeof(Gcache***)); if(*g==NULL) return&g_undefined; return hnew_g1((*g)+cc2,cc); } -static gcache_t*hnew_g3(gcache_t******g,unsigned int cc) +static Gcache*hnew_g3(Gcache******g,unsigned int cc) {unsigned int cc3= (cc>>(G123_BITS+G123_BITS+G0_BITS))&G123_MASK; if(*g==NULL) -*g= calloc(G123_SIZE,sizeof(gcache_t****)); +*g= calloc(G123_SIZE,sizeof(Gcache****)); if(*g==NULL) return&g_undefined; return hnew_g2((*g)+cc3,cc); } -static gcache_t*hnew_glyph(font_t*f,unsigned int cc) +static Gcache*hnew_glyph(Font*f,unsigned int cc) {if(cc<G0_SIZE)return hnew_g0(&(f->g0),cc); else if(cc<G123_SIZE*G0_SIZE)return hnew_g1(&(f->g1),cc); else if(cc<G123_SIZE*G123_SIZE*G0_SIZE)return hnew_g2(&(f->g2),cc); else if(cc<G123_SIZE*G123_SIZE*G123_SIZE*G0_SIZE)return hnew_g3(&(f->g3),cc); else return&g_undefined; } -/*:315*/ -#line 7610 "hint.w" +/*:316*/ +#line 7626 "hint.w" -/*352:*/ -#line 7025 "hint.w" +/*353:*/ +#line 7041 "hint.w" -int unpack_ft_file(font_t*f) +int unpack_ft_file(Font*f) {int e; -/*349:*/ -#line 6995 "hint.w" +/*350:*/ +#line 7011 "hint.w" if(ft_library==NULL) {int e= FT_Init_FreeType(&ft_library); if(e)QUIT("Unable to initialize the FreeType library"); } -/*:349*/ -#line 7029 "hint.w" +/*:350*/ +#line 7045 "hint.w" f->hpxs= 72.27/xdpi; f->vpxs= 72.27/ydpi; e= FT_New_Memory_Face(ft_library, f->font_data,f->data_size,0,&(f->tt.face)); if(e)return 0; -/*353:*/ -#line 7050 "hint.w" +/*354:*/ +#line 7066 "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); -/*:353*/ -#line 7035 "hint.w" +/*:354*/ +#line 7051 "hint.w" -/*354:*/ -#line 7058 "hint.w" +/*355:*/ +#line 7074 "hint.w" e= FT_Set_Char_Size( f->tt.face, @@ -169,16 +169,16 @@ f->tt.face, 72.27/f->vpxs); if(e)QUIT("Unable to set FreeType glyph size"); FT_Set_Transform(f->tt.face,0,0); -/*:354*/ -#line 7036 "hint.w" +/*:355*/ +#line 7052 "hint.w" f->ff= ft_format; return 1; } -/*:352*//*355:*/ -#line 7081 "hint.w" +/*:353*//*356:*/ +#line 7097 "hint.w" -static void ft_unpack_glyph(font_t*f,gcache_t*g,uint32_t cc) +static void ft_unpack_glyph(Font*f,Gcache*g,uint32_t cc) {int e,i; i= FT_Get_Char_Index(f->tt.face,cc); @@ -200,25 +200,25 @@ g->ff= ft_format; nativeSetFreeType(g); } -/*:355*/ -#line 7612 "hint.w" +/*:356*/ +#line 7628 "hint.w" -/*340:*/ -#line 6696 "hint.w" +/*341:*/ +#line 6712 "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) -/*:340*//*342:*/ -#line 6723 "hint.w" +/*:341*//*343:*/ +#line 6739 "hint.w" #define read_nybble(P) ((P).j&1?((P).data[(P).j++>>1]&0xF):(((P).data[(P).j++>>1]>>4)&0xF)) -/*:342*//*343:*/ -#line 6749 "hint.w" +/*:343*//*344:*/ +#line 6765 "hint.w" -static int packed_number(pk_parse_t*p) +static int packed_number(PKparse*p) {int i,k; i= read_nybble(*p); if(i==0) @@ -234,11 +234,11 @@ else p->r= 1; return packed_number(p); } } -/*:343*//*344:*/ -#line 6778 "hint.w" +/*:344*//*345:*/ +#line 6794 "hint.w" -static void pk_runlength(gcache_t*g,unsigned char*data){ -pk_parse_t p; +static void pk_runlength(Gcache*g,unsigned char*data){ +PKparse p; int x,y; unsigned char*bits; int n; @@ -276,10 +276,10 @@ y++; } } } -/*:344*//*345:*/ -#line 6830 "hint.w" +/*:345*//*346:*/ +#line 6846 "hint.w" -static void pk_bitmap(gcache_t*g,unsigned char*data){ +static void pk_bitmap(Gcache*g,unsigned char*data){ unsigned char*bits; int x,y; unsigned char mask; @@ -297,11 +297,11 @@ mask= mask>>1; if(mask==0){data++;mask= 0x80;} } } -/*:345*//*346:*/ -#line 6853 "hint.w" +/*:346*//*347:*/ +#line 6869 "hint.w" -static void pkunpack_glyph(gcache_t*g) +static void pkunpack_glyph(Gcache*g) {int i,k; unsigned char*data; if(g==NULL||g->pk.encoding==NULL)return; @@ -340,11 +340,11 @@ if((g->pk.flag>>4)==14)pk_bitmap(g,data+i); else pk_runlength(g,data+i); nativeSetPK(g); } -/*:346*//*347:*/ -#line 6898 "hint.w" +/*:347*//*348:*/ +#line 6914 "hint.w" -static gcache_t*hnew_glyph(font_t*pk,unsigned int cc); +static Gcache*hnew_glyph(Font*pk,unsigned int cc); @@ -359,7 +359,7 @@ static gcache_t*hnew_glyph(font_t*pk,unsigned int cc); #define PK_ID 89 -int unpack_pk_file(font_t*pk) +int unpack_pk_file(Font*pk) {int i,j; unsigned int k; @@ -402,7 +402,7 @@ default: { unsigned int pl; unsigned int cc; -gcache_t*g; +Gcache*g; if((flag&7)==7) {pl= PK_READ_4_BYTE(); cc= PK_READ_4_BYTE(); @@ -426,15 +426,15 @@ break; return 1; } -/*:347*/ -#line 7614 "hint.w" +/*:348*/ +#line 7630 "hint.w" /*309:*/ -#line 5721 "hint.w" +#line 5730 "hint.w" struct font_s*hget_font(unsigned char f) -{font_t*fp; +{Font*fp; if(fonts[f]!=NULL)return fonts[f]; DBG(DBGFONT,"Decoding new font %d\n",f); if(f> max_ref[font_kind]) @@ -452,15 +452,15 @@ fp->data_size= hend-hstart; hpos= spos;hstart= sstart;hend= send; } fp->s= font_at_size(f)/(double)(1<<16); -/*337:*/ -#line 6633 "hint.w" +/*338:*/ +#line 6649 "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;} } -/*:337*//*356:*/ -#line 7108 "hint.w" +/*:338*//*357:*/ +#line 7124 "hint.w" else if(unpack_ft_file(fp)) fp->ff= ft_format; @@ -468,16 +468,16 @@ else {QUIT("Font format not supported for font %d\n",fp->n); free(fp);fp= NULL; } -/*:356*/ -#line 5741 "hint.w" +/*:357*/ +#line 5750 "hint.w" fonts[f]= fp; return fonts[f]; } /*:309*//*311:*/ -#line 5759 "hint.w" +#line 5768 "hint.w" -static void hfree_glyph_cache(font_t*f,bool rm); +static void hfree_glyph_cache(Font*f,bool rm); void hint_clear_fonts(bool rm) {int f; @@ -488,8 +488,8 @@ if(fonts[f]!=NULL) if(rm){free(fonts[f]);fonts[f]= NULL;} } } -/*:311*//*316:*/ -#line 5912 "hint.w" +/*:311*//*317:*/ +#line 5928 "hint.w" static void hfree_g0(struct gcache_s**g,bool rm) {int i; @@ -535,7 +535,7 @@ if(rm){free(g[i]);g[i]= NULL;} } -static void hfree_glyph_cache(font_t*f,bool rm) +static void hfree_glyph_cache(Font*f,bool rm) {if(f->g0!=NULL) {hfree_g0(f->g0,rm); if(rm){free(f->g0);f->g0= NULL;} @@ -553,12 +553,12 @@ if(f->g3!=NULL) if(rm){free(f->g3);f->g3= NULL;} } } -/*:316*//*318:*/ -#line 6038 "hint.w" +/*:317*//*319:*/ +#line 6054 "hint.w" -gcache_t*hget_glyph(font_t*f,unsigned int cc) +Gcache*hget_glyph(Font*f,unsigned int cc) { -gcache_t*g= NULL; +Gcache*g= NULL; g= g_lookup(f,cc); if(g==NULL) {if(f->ff==ft_format) @@ -573,13 +573,13 @@ else QUIT("Font format not supported"); } return g; } -/*:318*//*320:*/ -#line 6070 "hint.w" +/*:319*//*321:*/ +#line 6086 "hint.w" void render_char(int x,int y,struct font_s*f,uint32_t cc,uint8_t s) {double w,h,dx,dy; -gcache_t*g= hget_glyph(f,cc); +Gcache*g= hget_glyph(f,cc); if(g==NULL)return; dx= (double)g->hoff*f->hpxs; @@ -589,8 +589,8 @@ h= (double)g->h*f->vpxs; nativeGlyph(SP2PT(x),dx,SP2PT(y),dy,w,h,g,s); } -/*:320*/ -#line 7616 "hint.w" +/*:321*/ +#line 7632 "hint.w" -/*:375*/ +/*:376*/ diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/hfonts.h b/Build/source/texk/web2c/hitexdir/hintview/src/hfonts.h index 550c6a9a751..ad96ffa63b3 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 @@ -/*374:*/ -#line 7585 "hint.w" +/*375:*/ +#line 7601 "hint.w" #ifndef _HFONTS_H #define _HFONTS_H /*306:*/ -#line 5687 "hint.w" +#line 5696 "hint.w" -typedef enum{no_format,pk_format,ft_format}font_format_t; +typedef enum{no_format,pk_format,ft_format}FontFormat; /*:306*//*307:*/ -#line 5699 "hint.w" +#line 5708 "hint.w" -/*338:*/ -#line 6672 "hint.w" +/*339:*/ +#line 6688 "hint.w" typedef struct @@ -20,21 +20,21 @@ typedef struct unsigned int cs; double ds; unsigned char id; -}pk_t; -/*:338*//*350:*/ -#line 7003 "hint.w" +}PKfont; +/*:339*//*351:*/ +#line 7019 "hint.w" typedef struct {FT_Face face; -}ft_t; -/*:350*//*351:*/ -#line 7010 "hint.w" +}FTfont; +/*:351*//*352:*/ +#line 7026 "hint.w" typedef struct {int dummy; -}ftg_t; -/*:351*/ -#line 5700 "hint.w" +}FTglyph; +/*:352*/ +#line 5709 "hint.w" typedef struct font_s{ @@ -43,41 +43,41 @@ unsigned char*font_data; int data_size; double s; double hpxs,vpxs; -/*312:*/ -#line 5787 "hint.w" +/*313:*/ +#line 5803 "hint.w" struct gcache_s**g0; struct gcache_s***g1; struct gcache_s****g2; struct gcache_s*****g3; -/*:312*/ -#line 5708 "hint.w" +/*:313*/ +#line 5717 "hint.w" -font_format_t ff; -union{pk_t pk;ft_t tt;}; -}font_t; -/*:307*//*317:*/ -#line 5999 "hint.w" +FontFormat ff; +union{PKfont pk;FTfont tt;}; +}Font; +/*:307*//*318:*/ +#line 6015 "hint.w" -/*339:*/ -#line 6685 "hint.w" +/*340:*/ +#line 6701 "hint.w" typedef struct {unsigned char flag; unsigned char*encoding; -}pkg_t; -/*:339*//*341:*/ -#line 6712 "hint.w" +}PKglyph; +/*:340*//*342:*/ +#line 6728 "hint.w" typedef struct{ int j; int r; int f; unsigned char*data; -}pk_parse_t; -/*:341*/ -#line 6000 "hint.w" +}PKparse; +/*:342*/ +#line 6016 "hint.w" struct gcache_s{ @@ -85,17 +85,17 @@ int w,h; int hoff,voff; unsigned char*bits; unsigned int GLtexture; -font_format_t ff; +FontFormat ff; union{ -pkg_t pk; -ftg_t tt; +PKglyph pk; +FTglyph tt; }; }; -typedef struct gcache_s gcache_t; -/*:317*/ -#line 7589 "hint.w" +typedef struct gcache_s Gcache; +/*:318*/ +#line 7605 "hint.w" #endif -/*:374*/ +/*:375*/ diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/hint.c b/Build/source/texk/web2c/hitexdir/hintview/src/hint.c index a021046481b..33f3de2b29a 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 @@ -/*371:*/ -#line 7506 "hint.w" +/*372:*/ +#line 7522 "hint.w" #include "basetypes.h" #include <string.h> @@ -29,7 +29,7 @@ /*:83*//*87:*/ #line 1394 "hint.w" -#define HGET_STRETCH(F,O) { stch_t _st; HGET32(_st.u); (O)= _st.u&3; _st.u&= ~3; (F)= (scaled)(_st.f*ONE); } +#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" @@ -158,7 +158,7 @@ link(q)= null; flush_node_list(q);\ #define HGET_PAR(I) \ { scaled x= 0;\ - param_def_t *q;\ + ParamDef *q;\ if ((I)==b100) q= hget_param_list_ref(HGET8);\ if ((I)&b100) x= hget_xdimen_node(); else x= hget_xdimen_ref(HGET8);\ if ((I)&b010) q= hget_param_list_node(); \ @@ -169,7 +169,7 @@ link(q)= null; flush_node_list(q);\ #line 2921 "hint.w" #define HGET_MATH(I) \ -{ param_def_t *q; pointer p= null, a= null;\ +{ ParamDef *q; pointer p= null, a= null;\ if ((I)&b100) q= hget_param_list_node(); else q= hget_param_list_ref(HGET8);\ if ((I)&b010) a= hget_hbox_node(); \ p= hget_list_pointer(); \ @@ -198,7 +198,7 @@ hget_list_pointer(); #line 3102 "hint.w" #define HGET_STREAM(I) \ -{ param_def_t *q; pointer p;\ +{ ParamDef *q; pointer p;\ p= get_node(ins_node_size); type(p)= ins_node;\ subtype(p)= HGET8;RNG("Stream",subtype(p),1,254); \ if ((I)&b010) q= hget_param_list_node(); else q= hget_param_list_ref(HGET8); \ @@ -230,7 +230,7 @@ hget_list_pointer(); label_has_name(p)= 0;\ tail_append(p);} /*:193*/ -#line 7518 "hint.w" +#line 7534 "hint.w" /*84:*/ #line 1299 "hint.w" @@ -242,7 +242,7 @@ hget_list_pointer(); /*:84*//*88:*/ #line 1397 "hint.w" -#define HTEG_STRETCH(F,O) { stch_t _st; HTEG32(_st.u); (O)= _st.u&3; _st.u&= ~3; (F)= (scaled)(_st.f*ONE); } +#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" @@ -373,7 +373,7 @@ font(lig_char(p))= HTEG8;\ #line 2932 "hint.w" #define HTEG_MATH(I) \ -{ param_def_t *q; pointer p= null, a= null;\ +{ ParamDef *q; pointer p= null, a= null;\ if ((I)&b001) a= hteg_hbox_node();\ p= hteg_list_pointer(); \ if ((I)&b010) a= hteg_hbox_node(); \ @@ -395,8 +395,8 @@ if ((I)&b100) hteg_xdimen_node(); else hget_xdimen_ref(HTEG8); #define HTEG_STREAM(I) \ {pointer p= get_node(ins_node_size); type(p)= ins_node;\ ins_ptr(p)= hteg_list_pointer();\ - if ((I)&b010) {param_def_t *q= hteg_param_list_node(); hset_stream_params(p,true,q);}\ - else {param_def_t *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,true,q);}\ + else {ParamDef *q= hget_param_list_ref(HTEG8); hset_stream_params(p,false,q);}\ subtype(p)= HTEG8;RNG("Stream",subtype(p),1,254);\ tail_append(p);} /*:186*//*190:*/ @@ -424,13 +424,13 @@ if ((I)&b100) hteg_xdimen_node(); else hget_xdimen_ref(HTEG8); label_has_name(p)= 0;\ tail_append(p);} /*:194*/ -#line 7519 "hint.w" +#line 7535 "hint.w" /*21:*/ #line 366 "hint.w" -typedef struct{pointer bs,ls;scaled lsl;}bs_t; +typedef struct{pointer bs,ls;scaled lsl;}BaselineSkip; /*:21*//*28:*/ #line 476 "hint.w" @@ -441,21 +441,21 @@ scaled s; pointer g; pointer h; pointer p[MAX_FONT_PARAMS+1]; -}font_def_t; -extern font_def_t*font_def; +}FontDef; +extern FontDef*font_def; /*:28*//*37:*/ #line 581 "hint.w" -typedef struct param_t{ +typedef struct{ uint8_t n,k; int32_t v; -}param_t; +}Param; -typedef struct param_def_t{ -struct param_def_t*next; -param_t p;}param_def_t; +typedef struct ParamDef{ +struct ParamDef*next; +Param p;}ParamDef; /*:37*/ -#line 7521 "hint.w" +#line 7537 "hint.w" @@ -474,66 +474,66 @@ scaled*dimen_def; /*:10*//*14:*/ #line 300 "hint.w" -xdimen_t*xdimen_def; +Xdimen*xdimen_def; /*:14*//*22:*/ #line 370 "hint.w" -bs_t*baseline_def= NULL; +BaselineSkip*baseline_def= NULL; /*:22*//*29:*/ #line 488 "hint.w" -font_def_t*font_def; +FontDef*font_def; /*:29*//*38:*/ #line 593 "hint.w" -param_def_t**param_def; +ParamDef**param_def; /*:38*//*45:*/ #line 733 "hint.w" typedef struct{ uint8_t pg; uint32_t f,t; -}range_def_t; -range_def_t*range_def; +}RangeDef; +RangeDef*range_def; /*:45*//*50:*/ #line 790 "hint.w" -stream_t*streams; +Stream*streams; /*:50*//*53:*/ #line 804 "hint.w" typedef struct{ -xdimen_t x; +Xdimen x; int f; int p,n,r; pointer b,a; -xdimen_t w; +Xdimen w; pointer g; pointer h; -}stream_def_t; +}StreamDef; /*:53*//*57:*/ #line 877 "hint.w" typedef struct{ char*n; -dimen_t d; +Dimen d; pointer g; uint8_t p; uint32_t t; -xdimen_t v,h; -stream_def_t*s; -}page_def_t; -page_def_t*page_def; -page_def_t*cur_page; +Xdimen v,h; +StreamDef*s; +}PageDef; +PageDef*page_def; +PageDef*cur_page; /*:57*//*65:*/ #line 1021 "hint.w" -hint_outline_t*hint_outlines= NULL; +hint_Outline*hint_outlines= NULL; int outline_no= -1; /*:65*//*162:*/ #line 2762 "hint.w" -static param_def_t*line_break_params= NULL; +static ParamDef*line_break_params= NULL; /*:162*//*205:*/ #line 3487 "hint.w" @@ -552,25 +552,25 @@ uint64_t page_loc[MAX_PAGE_POS]; int cur_loc; static int lo_loc,hi_loc; /*:225*//*242:*/ -#line 4212 "hint.w" +#line 4221 "hint.w" scaled hvsize,hhsize; /*:242*//*244:*/ -#line 4240 "hint.w" +#line 4249 "hint.w" int page_v,page_h,offset_v,offset_h; /*:244*//*301:*/ -#line 5514 "hint.w" +#line 5523 "hint.w" -hint_link_t*hint_links= NULL; +hint_Link*hint_links= NULL; int max_link= -1; -/*:301*//*358:*/ -#line 7207 "hint.w" +/*:301*//*359:*/ +#line 7223 "hint.w" jmp_buf error_exit; char herror_string[MAX_HERROR]; -/*:358*/ -#line 7524 "hint.w" +/*:359*/ +#line 7540 "hint.w" /*3:*/ #line 196 "hint.w" @@ -580,10 +580,10 @@ static int32_t hget_integer_def(uint8_t a); static scaled hget_dimen_def(uint8_t a); static pointer hget_glue_def(uint8_t a); static void hget_baseline_def(uint8_t a,uint8_t n); -static param_def_t*hget_param_list(uint8_t a); +static ParamDef*hget_param_list(uint8_t a); static void hget_range_def(uint8_t a,uint8_t pg); static void hget_page_def(uint8_t a,uint8_t n); -static void hget_outline_or_label_def(info_t i,int n); +static void hget_outline_or_label_def(Info i,int n); static void hget_font_metrics(); static pointer hget_definition(uint8_t a); /*:3*//*27:*/ @@ -609,7 +609,7 @@ static pointer hteg_list_pointer(void); static scaled hget_xdimen_node(void); /*:124*/ -#line 7525 "hint.w" +#line 7541 "hint.w" /*9:*/ #line 253 "hint.w" @@ -629,7 +629,7 @@ return integer_def[n]; /*:9*//*17:*/ #line 311 "hint.w" -static scaled xdimen(xdimen_t*x) +static scaled xdimen(Xdimen*x) {return round(x->w+(double)x->h*(double)hhsize+(double)x->v*(double)hvsize); } static scaled hget_xdimen_ref(uint8_t n) @@ -665,7 +665,7 @@ return new_glue(pointer_def[glue_kind][n]); static void hget_font_def(uint8_t a,uint8_t n) {char*t; -font_def_t*f= font_def+n; +FontDef*f= font_def+n; HGET_STRING(t);f->n= strdup(t); DBG(DBGDEF,"Font %d: %s\n",n,t); HGET32(f->s);RNG("Font size",f->s,1,0x7fffffff); @@ -675,7 +675,7 @@ f->g= hget_glue_spec(); f->h= hget_disc_node(); DBG(DBGDEF,"Start font parameters\n"); while(KIND(*hpos)!=font_kind) -{kind_t k; +{Kind k; uint8_t n; /*74:*/ #line 1161 "hint.w" @@ -724,9 +724,9 @@ font_def[i].s= font_size[i]; /*:33*//*41:*/ #line 610 "hint.w" -static void free_param_list(param_def_t*p) +static void free_param_list(ParamDef*p) {while(p!=NULL) -{param_def_t*q= p; +{ParamDef*q= p; p= p->next; free(q); } @@ -734,9 +734,9 @@ free(q); /*:41*//*42:*/ #line 622 "hint.w" -static param_def_t*hget_param_list(uint8_t a) +static ParamDef*hget_param_list(uint8_t a) {uint32_t s,t; -param_def_t*p= NULL; +ParamDef*p= NULL; uint8_t*list_start,*list_end; list_start= hpos; s= hget_list_size(INFO(a)); @@ -745,7 +745,7 @@ list_end= hpos+s; if(list_end>=hend) QUIT("list end after before stream end\n"); while(hpos<list_end) -{param_def_t*r;param_t*q; +{ParamDef*r;Param*q; /*74:*/ #line 1161 "hint.w" @@ -754,7 +754,7 @@ HGETTAG(a); /*:74*/ #line 635 "hint.w" -ALLOCATE(r,1,param_def_t); +ALLOCATE(r,1,ParamDef); q= &(r->p); q->n= HGET8; q->k= KIND(a); @@ -783,10 +783,10 @@ QUIT("List sizes at "SIZE_F" and "SIZE_F" do not match 0x%x != 0x%x",list_start- return p; } -param_def_t*hget_param_list_node(void) +ParamDef*hget_param_list_node(void) {if(KIND(*hpos)!=param_kind)return NULL; else -{param_def_t*p; +{ParamDef*p; /*74:*/ #line 1161 "hint.w" @@ -810,7 +810,7 @@ return p; } } -param_def_t*hget_param_list_ref(uint8_t n) +ParamDef*hget_param_list_ref(uint8_t n) {REF_RNG(param_kind,n); return param_def[n]; } @@ -819,11 +819,11 @@ return param_def[n]; #define MAX_SAVE 100 #define SAVE_BOUNDARY 0xFF -static param_t par_save[MAX_SAVE]; +static Param par_save[MAX_SAVE]; static int par_save_ptr= 0; static void hset_param(uint8_t k,uint8_t n,int32_t v) -{param_t*q; +{Param*q; if(par_save_ptr>=MAX_SAVE)QUIT("Parameter save stack overflow"); q= &(par_save[par_save_ptr++]); q->k= k; @@ -836,7 +836,7 @@ else if(q->k==glue_kind) {q->v= pointer_def[glue_kind][q->n];pointer_def[glue_kind][q->n]= (pointer)v;} } -void hset_param_list(param_def_t*p) +void hset_param_list(ParamDef*p) {hset_param(SAVE_BOUNDARY,0,0); while(p!=NULL) {hset_param(p->p.k,p->p.n,p->p.v); @@ -847,7 +847,7 @@ p= p->next; void hrestore_param_list(void) { while(par_save_ptr> 0) -{param_t*q; +{Param*q; q= &(par_save[--par_save_ptr]); if(q->k==SAVE_BOUNDARY)return; if(q->k==int_kind) @@ -892,9 +892,9 @@ return 0; /*:48*//*54:*/ #line 821 "hint.w" -static void hget_xdimen_def_node(xdimen_t*x); +static void hget_xdimen_def_node(Xdimen*x); -static bool hget_stream_def(stream_def_t*s) +static bool hget_stream_def(StreamDef*s) {if(KIND(*hpos)!=stream_kind||!(INFO(*hpos)&b100)) return false; else @@ -962,7 +962,7 @@ static void hskip_list(void); static void hget_page_def(uint8_t a,uint8_t i) {char*n; cur_page= &(page_def[i]); -ALLOCATE(cur_page->s,max_ref[stream_kind]+1,stream_def_t); +ALLOCATE(cur_page->s,max_ref[stream_kind]+1,StreamDef); HGET_STRING(n);cur_page->n= strdup(n); cur_page->p= HGET8; cur_page->g= hget_glue_spec(); @@ -1008,7 +1008,7 @@ return copy_node_list(pointer_def[leaders_kind][n]); #line 1306 "hint.w" -static void hget_xdimen_def(info_t i,xdimen_t*x) +static void hget_xdimen_def(Info i,Xdimen*x) {switch(i) { case b000: @@ -1030,8 +1030,8 @@ default: x->w= 0;x->h= x->v= 0.0; } } -static scaled hget_xdimen(info_t i) -{xdimen_t x; +static scaled hget_xdimen(Info i) +{Xdimen x; hget_xdimen_def(i,&x); return xdimen(&x); } @@ -1063,7 +1063,7 @@ NAME(a),INFO(a),NAME(z),INFO(z),node_pos,hpos-hstart-1); return x; } -static void hget_xdimen_def_node(xdimen_t*x) +static void hget_xdimen_def_node(Xdimen*x) {/*74:*/ #line 1161 "hint.w" @@ -1093,7 +1093,7 @@ NAME(a),INFO(a),NAME(z),INFO(z),node_pos,hpos-hstart-1); #line 1359 "hint.w" scaled hteg_xdimen(uint8_t a) -{xdimen_t x; +{Xdimen x; switch(a) { case TAG(xdimen_kind,b000):return hget_xdimen_ref(HTEG8); @@ -1341,9 +1341,9 @@ else TAGERR(z); return 0; } -static param_def_t*hteg_param_list(uint8_t z) +static ParamDef*hteg_param_list(uint8_t z) {uint32_t s,t; -param_def_t*p= NULL; +ParamDef*p= NULL; uint8_t*list_start,*list_end; list_end= hpos; s= hteg_list_size(INFO(z)); @@ -1352,7 +1352,7 @@ list_start= hpos-s; if(list_start<=hstart) QUIT("list start before stream start\n"); while(list_start<hpos) -{param_def_t*r;param_t*q; +{ParamDef*r;Param*q; /*78:*/ #line 1222 "hint.w" @@ -1361,7 +1361,7 @@ z= HTEG8,DBGTAG(z,hpos); /*:78*/ #line 1787 "hint.w" -ALLOCATE(r,1,param_def_t); +ALLOCATE(r,1,ParamDef); q= &(r->p); q->k= KIND(z); if(KIND(z)==int_kind)q->i= hteg_integer_def(a); @@ -1392,8 +1392,8 @@ return p; } #endif -static param_def_t*hteg_param_list_node(void) -{param_def_t*p; +static ParamDef*hteg_param_list_node(void) +{ParamDef*p; uint8_t*list_start; hskip_list_back(); list_start= hpos; @@ -1744,10 +1744,10 @@ return null; /*:159*//*165:*/ #line 2779 "hint.w" -pointer hget_paragraph(scaled x,uint32_t offset,param_def_t*q) +pointer hget_paragraph(scaled x,uint32_t offset,ParamDef*q) { pointer p,par_head; -param_def_t*save_lbp= line_break_params; +ParamDef*save_lbp= line_break_params; par_head= tail; line_break_params= q; if(offset==0) @@ -1766,7 +1766,7 @@ return par_head; void hget_par_node(uint32_t offset) {scaled x= 0; -param_def_t*q; +ParamDef*q; /*74:*/ #line 1161 "hint.w" @@ -1796,9 +1796,9 @@ NAME(a),INFO(a),NAME(z),INFO(z),node_pos,hpos-hstart-1); /*:165*//*168:*/ #line 2833 "hint.w" -void hteg_paragraph(info_t i) +void hteg_paragraph(Info i) {scaled x= 0; -param_def_t*q= null; +ParamDef*q= null; pointer par_head; uint8_t*bs_pos= cur_list.bs_pos; scaled ph= prev_height; @@ -1844,8 +1844,8 @@ hpos= par_start; /*:168*//*184:*/ #line 3080 "hint.w" -static void hset_stream_params(pointer p,bool f,param_def_t*q) -{param_def_t*r; +static void hset_stream_params(pointer p,bool f,ParamDef*q) +{ParamDef*r; pointer s; while(q!=null) {r= q; @@ -1962,7 +1962,7 @@ cur_loc= i; DBG(DBGPAGE,"loc_set_prev: %d < %d < %d\n",lo_loc,cur_loc,hi_loc); } /*:232*//*245:*/ -#line 4250 "hint.w" +#line 4259 "hint.w" static void hset_margins(void) {if(cur_page==&(page_def[0])){ @@ -1985,7 +1985,7 @@ if(hvsize> page_v)hvsize= page_v; } } /*:245*//*247:*/ -#line 4280 "hint.w" +#line 4289 "hint.w" static void houtput_template0(void) {pointer p,q,r; @@ -2003,7 +2003,7 @@ shift_amount(p)+= offset_h; streams[0].p= q; } /*:247*//*272:*/ -#line 4923 "hint.w" +#line 4932 "hint.w" static int trv_string_size= 0; static char trv_string[256]; @@ -2031,8 +2031,8 @@ trv_hlist(p); trv_string[trv_string_size]= 0; return trv_string; } -/*:272*//*368:*/ -#line 7435 "hint.w" +/*:272*//*369:*/ +#line 7451 "hint.w" static pointer leaks[1<<16]= {0}; @@ -2072,14 +2072,14 @@ if(leaks[i]!=0) fprintf(stderr,"ERROR:leak final: p=%d, s=%d\n",i,leaks[i]); #endif } -/*:368*/ -#line 7526 "hint.w" +/*:369*/ +#line 7542 "hint.w" /*1:*/ #line 111 "hint.w" void hget_def_node(void) -{kind_t k; +{Kind k; int n; /*74:*/ #line 1161 "hint.w" @@ -2125,7 +2125,7 @@ NAME(a),INFO(a),NAME(z),INFO(z),node_pos,hpos-hstart-1); } -pointer hset_glue(glue_t*g) +pointer hset_glue(Glue*g) {if(ZERO_GLUE(*g)) {add_glue_ref(zero_glue); return zero_glue; @@ -2230,7 +2230,7 @@ hget_max_definitions(); /*4:*/ #line 211 "hint.w" -{kind_t k; +{Kind k; for(k= 0;k<32;k++) {if(k==font_kind||k==int_kind||k==dimen_kind||k==xdimen_kind|| k==glue_kind||k==baseline_kind||k==range_kind||k==page_kind||k==param_kind||k==stream_kind||k==label_kind) @@ -2249,11 +2249,11 @@ ALLOCATE(integer_def,max_ref[int_kind]+1,int32_t); /*:7*//*11:*/ #line 274 "hint.w" -ALLOCATE(dimen_def,max_ref[dimen_kind]+1,dimen_t); +ALLOCATE(dimen_def,max_ref[dimen_kind]+1,Dimen); /*:11*//*15:*/ #line 304 "hint.w" -ALLOCATE(xdimen_def,max_ref[xdimen_kind]+1,xdimen_t); +ALLOCATE(xdimen_def,max_ref[xdimen_kind]+1,Xdimen); /*:15*//*20:*/ #line 355 "hint.w" @@ -2261,34 +2261,34 @@ ALLOCATE(pointer_def[glue_kind],max_ref[glue_kind]+1,pointer); /*:20*//*23:*/ #line 374 "hint.w" -ALLOCATE(baseline_def,max_ref[baseline_kind]+1,bs_t); +ALLOCATE(baseline_def,max_ref[baseline_kind]+1,BaselineSkip); /*:23*//*30:*/ #line 492 "hint.w" -ALLOCATE(font_def,max_ref[font_kind]+1,font_def_t); +ALLOCATE(font_def,max_ref[font_kind]+1,FontDef); /*:30*//*39:*/ #line 597 "hint.w" -ALLOCATE(param_def,max_ref[param_kind]+1,param_def_t*); +ALLOCATE(param_def,max_ref[param_kind]+1,ParamDef*); /*:39*//*46:*/ #line 740 "hint.w" -ALLOCATE(range_def,max_ref[range_kind]+1,range_def_t); +ALLOCATE(range_def,max_ref[range_kind]+1,RangeDef); /*:46*//*51:*/ #line 794 "hint.w" -ALLOCATE(streams,max_ref[stream_kind]+1,stream_t); +ALLOCATE(streams,max_ref[stream_kind]+1,Stream); /*:51*//*58:*/ #line 891 "hint.w" -ALLOCATE(page_def,max_ref[page_kind]+1,page_def_t); +ALLOCATE(page_def,max_ref[page_kind]+1,PageDef); /*:58*//*66:*/ #line 1026 "hint.w" if(max_ref[label_kind]>=0) -ALLOCATE(labels,max_ref[label_kind]+1,label_t); +ALLOCATE(labels,max_ref[label_kind]+1,Label); if(max_outline>=0) -ALLOCATE(hint_outlines,max_outline+1,hint_outline_t); +ALLOCATE(hint_outlines,max_outline+1,hint_Outline); /*:66*/ #line 180 "hint.w" @@ -2311,7 +2311,7 @@ page_def[0].h.w= -9*ONE; page_def[0].h.h= 1.25; page_def[0].h.v= 0.0; page_def[0].t= 0; -ALLOCATE(page_def[0].s,max_ref[stream_kind]+1,stream_def_t); +ALLOCATE(page_def[0].s,max_ref[stream_kind]+1,StreamDef); cur_page= &(page_def[0]); /*:59*/ #line 186 "hint.w" @@ -2390,12 +2390,12 @@ return p; /*:26*//*68:*/ #line 1046 "hint.w" -void hget_outline_or_label_def(info_t i,int n) +void hget_outline_or_label_def(Info i,int n) {if(i&b100) /*70:*/ #line 1067 "hint.w" -{hint_outline_t*t; +{hint_Outline*t; uint64_t pos; uint8_t where; outline_no++; @@ -2426,7 +2426,7 @@ else /*69:*/ #line 1055 "hint.w" -{label_t*t= labels+n; +{Label*t= labels+n; HGET32(t->pos); t->where= HGET8; if(t->where> LABEL_MID)t->where= LABEL_UNDEF; @@ -2609,7 +2609,7 @@ QUIT("Text in paragraph not yet implemented"); return null; } /*:160*/ -#line 7527 "hint.w" +#line 7543 "hint.w" /*80:*/ #line 1241 "hint.w" @@ -2909,7 +2909,7 @@ return p; void hteg_par_node(uint32_t offset) {scaled x= 0; -param_def_t*save_lbp= line_break_params; +ParamDef*save_lbp= line_break_params; pointer p; pointer par_head= tail; uint8_t*bs_pos= cur_list.bs_pos; @@ -2971,7 +2971,7 @@ line_break_params= save_lbp; } /*:170*/ -#line 7528 "hint.w" +#line 7544 "hint.w" /*18:*/ @@ -3617,6 +3617,7 @@ int hint_begin(void) {if(!hint_map())return 0; hpos= hstart= hin_addr; hend= hstart+hin_size; +hint_clear_fonts(true); hflush_contribution_list();hpage_init(); flush_node_list(link(page_head)); free_definitions(); @@ -3647,7 +3648,7 @@ list_leaks(); hclear_dir(); } /*:234*//*238:*/ -#line 4125 "hint.w" +#line 4134 "hint.w" bool hint_forward(void) {hpage_init(); @@ -3661,7 +3662,7 @@ if(hbuild_page())return true; return false; } /*:238*//*239:*/ -#line 4166 "hint.w" +#line 4175 "hint.w" bool hint_backward(void) {hpage_init(); @@ -3675,7 +3676,7 @@ if(hbuild_page_up())return true; return false; } /*:239*//*241:*/ -#line 4194 "hint.w" +#line 4203 "hint.w" bool flush_pages(uint32_t pos) {pointer p= link(head); @@ -3692,18 +3693,18 @@ store_map(tail,pos,0); return false; } /*:241*//*263:*/ -#line 4707 "hint.w" +#line 4716 "hint.w" int hint_get_outline_max(void) {return max_outline;} /*:263*//*268:*/ -#line 4787 "hint.w" +#line 4796 "hint.w" -hint_outline_t*hint_get_outlines(void) +hint_Outline*hint_get_outlines(void) {return hint_outlines; } /*:268*//*270:*/ -#line 4846 "hint.w" +#line 4855 "hint.w" static bool trv_ignore= false; static bool trv_skip_space= false; @@ -3769,7 +3770,7 @@ p= link(p); } } /*:270*/ -#line 7530 "hint.w" +#line 7546 "hint.w" -/*:371*/ +/*:372*/ diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/hint.h b/Build/source/texk/web2c/hitexdir/hintview/src/hint.h index a9e8ec7ea27..c0d0a62f263 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 @@ -/*370:*/ -#line 7493 "hint.w" +/*371:*/ +#line 7509 "hint.w" #ifndef _HINT_H_ #define _HINT_H_ @@ -16,8 +16,8 @@ extern void hrestore_param_list(void); typedef struct{ pointer p,t; -}stream_t; -extern stream_t*streams; +}Stream; +extern Stream*streams; /*:49*//*64:*/ #line 1009 "hint.w" @@ -51,7 +51,7 @@ extern int32_t*integer_def; /*:197*//*198:*/ #line 3322 "hint.w" -extern stream_t*streams; +extern Stream*streams; extern bool flush_pages(uint32_t pos); extern pointer skip(uint8_t n); extern pointer*box_ptr(uint8_t n); @@ -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 4068 "hint.w" +#line 4069 "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 4184 "hint.w" +#line 4193 "hint.w" extern bool hint_forward(void); extern bool hint_backward(void); /*:240*//*243:*/ -#line 4215 "hint.w" +#line 4224 "hint.w" extern scaled hvsize,hhsize; /*:243*//*264:*/ -#line 4720 "hint.w" +#line 4729 "hint.w" typedef struct{ uint64_t pos; @@ -118,50 +118,50 @@ uint8_t depth; uint8_t where; int p; char*title; -}hint_outline_t; -extern hint_outline_t*hint_outlines; +}hint_Outline; +extern hint_Outline*hint_outlines; /*:264*//*265:*/ -#line 4738 "hint.w" +#line 4747 "hint.w" #define LABEL_UNDEF 0 #define LABEL_TOP 1 #define LABEL_BOT 2 #define LABEL_MID 3 /*:265*//*269:*/ -#line 4797 "hint.w" +#line 4806 "hint.w" extern int hint_get_outline_max(void); -extern hint_outline_t*hint_get_outlines(void); +extern hint_Outline*hint_get_outlines(void); extern uint64_t hint_outline_page(int i); /*:269*//*271:*/ -#line 4912 "hint.w" +#line 4921 "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 5504 "hint.w" +#line 5513 "hint.w" typedef struct{ uint64_t pos; uint8_t where; int top,bottom,left,right; -}hint_link_t; -extern hint_link_t*hint_links; +}hint_Link; +extern hint_Link*hint_links; extern int max_link; /*:300*//*305:*/ -#line 5666 "hint.w" +#line 5675 "hint.w" extern int hint_find_link(scaled x,scaled y,scaled precission); extern uint64_t hint_link_page(int i); -/*:305*//*369:*/ -#line 7476 "hint.w" +/*:305*//*370:*/ +#line 7492 "hint.w" extern void leak_in(pointer p,int s); extern void leak_out(pointer p,int s); -/*:369*/ -#line 7500 "hint.w" +/*:370*/ +#line 7516 "hint.w" #endif -/*:370*/ +/*:371*/ diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/hrender.c b/Build/source/texk/web2c/hitexdir/hintview/src/hrender.c index bf0946e3e1e..ec38f3f3990 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 @@ -/*373:*/ -#line 7565 "hint.w" +/*374:*/ +#line 7581 "hint.w" #include "basetypes.h" #include "error.h" @@ -13,74 +13,82 @@ #include "hint.h" /*310:*/ -#line 5748 "hint.w" +#line 5757 "hint.w" extern struct font_s*hget_font(unsigned char f); -/*:310*//*321:*/ -#line 6086 "hint.w" +/*:310*//*322:*/ +#line 6102 "hint.w" extern void render_char(int x,int y,struct font_s*f,uint32_t cc,uint8_t s); -/*:321*/ -#line 7577 "hint.w" +/*:322*/ +#line 7593 "hint.w" /*236:*/ -#line 4097 "hint.w" +#line 4098 "hint.w" double xdpi= 600.0,ydpi= 600.0; /*:236*//*254:*/ -#line 4447 "hint.w" +#line 4456 "hint.w" static bool forward_mode= false,backward_mode= false; /*:254*//*273:*/ -#line 4959 "hint.w" +#line 4968 "hint.w" static char*m_str; static int m_length,m_chars; /*:273*//*277:*/ -#line 5030 "hint.w" +#line 5039 "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 5131 "hint.w" +#line 5140 "hint.w" static int m_state,m_spaces; static uint32_t m_d; /*:280*//*285:*/ -#line 5253 "hint.w" +#line 5262 "hint.w" static int m_focus; static uint64_t m_page; /*:285*//*288:*/ -#line 5289 "hint.w" +#line 5298 "hint.w" static bool c_ignore; static int m_style; /*:288*//*296:*/ -#line 5458 "hint.w" +#line 5467 "hint.w" static int cur_link= -1; -/*:296*//*324:*/ -#line 6128 "hint.w" +/*:296*//*325:*/ +#line 6144 "hint.w" static scaled cur_h,cur_v; static scaled rule_ht,rule_dp,rule_wd; static int cur_f; static struct font_s*cur_fp; static uint8_t cur_style= 0; -/*:324*/ -#line 7579 "hint.w" +/*:325*/ +#line 7595 "hint.w" /*237:*/ -#line 4101 "hint.w" +#line 4102 "hint.w" void hint_resize(int px_h,int px_v,double x_dpi,double y_dpi) -{static int old_px_h= 0,old_px_v= 0; +{ +#if 0 + + + +static int old_px_h= 0,old_px_v= 0; static double old_xdpi= 0.0,old_ydpi= 0.0; -if(old_px_h==px_h&&old_px_v==px_v&&old_xdpi==x_dpi&&old_ydpi==y_dpi)return; -old_px_h= px_h;old_px_v= px_v;old_xdpi= xdpi= x_dpi;old_ydpi= ydpi= y_dpi; +if(old_px_h==px_h&&old_px_v==px_v&&old_xdpi==x_dpi&&old_ydpi==y_dpi) +return; +old_px_h= px_h;old_px_v= px_v;old_xdpi= x_dpi;old_ydpi= y_dpi; +#endif +xdpi= x_dpi;ydpi= y_dpi; nativeSetSize(px_h,px_v,xdpi,ydpi); hloc_clear(); hflush_contribution_list();hpage_init(); @@ -88,7 +96,7 @@ forward_mode= false; backward_mode= false; } /*:237*//*248:*/ -#line 4312 "hint.w" +#line 4321 "hint.w" uint64_t hint_page_top(uint64_t h) @@ -109,7 +117,7 @@ backward_mode= false; return h; } /*:248*//*249:*/ -#line 4335 "hint.w" +#line 4344 "hint.w" uint64_t hint_page_get(void) { @@ -119,7 +127,7 @@ if(hin_addr==NULL)return 0; return page_loc[cur_loc]; } /*:249*//*250:*/ -#line 4351 "hint.w" +#line 4360 "hint.w" uint64_t hint_page(void) {uint64_t i; @@ -131,7 +139,7 @@ else return hint_page_top(i); } /*:250*//*251:*/ -#line 4367 "hint.w" +#line 4376 "hint.w" uint64_t hint_page_home(void) {uint64_t pos; @@ -147,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 4372 "hint.w" +#line 4381 "hint.w" /*267:*/ -#line 4760 "hint.w" +#line 4769 "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 4373 "hint.w" +#line 4382 "hint.w" } /*:251*//*252:*/ -#line 4394 "hint.w" +#line 4403 "hint.w" double hint_get_fpos(void) { @@ -171,7 +179,7 @@ if(hin_addr==NULL)return 0.0; return(double)LOC_POS(page_loc[cur_loc])/(double)(hend-hstart); } /*:252*//*253:*/ -#line 4408 "hint.w" +#line 4417 "hint.w" uint64_t hint_set_fpos(double fpos) {uint32_t pos,pos0; @@ -206,7 +214,7 @@ pos= pos0= hpos-hstart; return hint_page_top(PAGE_LOC(pos0,pos-pos0)); } /*:253*//*255:*/ -#line 4452 "hint.w" +#line 4461 "hint.w" uint64_t hint_page_next(void) {if(hin_addr==NULL)return 0; @@ -223,7 +231,7 @@ return hint_page(); } } /*:255*//*256:*/ -#line 4477 "hint.w" +#line 4486 "hint.w" uint64_t hint_page_prev(void) {if(hin_addr==NULL)return 0; @@ -241,7 +249,7 @@ else return hint_page_bottom(hint_page_get()); } /*:256*//*257:*/ -#line 4503 "hint.w" +#line 4512 "hint.w" uint64_t hint_page_bottom(uint64_t h) {if(hin_addr==NULL)return 0; @@ -256,7 +264,7 @@ forward_mode= false; return hint_page_get(); } /*:257*//*258:*/ -#line 4528 "hint.w" +#line 4537 "hint.w" uint64_t hint_page_middle(uint64_t l) {uint32_t pos,pos0,offset; @@ -275,11 +283,11 @@ hget_content(); p= link(contrib_head); if(offset> 0) {/*259:*/ -#line 4567 "hint.w" +#line 4576 "hint.w" {while(p!=null) {/*260:*/ -#line 4594 "hint.w" +#line 4603 "hint.w" switch(type(p)) {case hlist_node:case vlist_node:case rule_node: @@ -302,7 +310,7 @@ default: pi= hp= dp= 0; } /*:260*/ -#line 4569 "hint.w" +#line 4578 "hint.w" h+= d+hp; d= dp; @@ -318,7 +326,7 @@ p= link(p); if(tp==null)ht= h; if(ht>=hvsize) {/*261:*/ -#line 4621 "hint.w" +#line 4630 "hint.w" pointer q= contrib_head; scaled dh= ht-hvsize/2; @@ -326,7 +334,7 @@ p= link(contrib_head); h= d= 0; while(p!=null) {/*260:*/ -#line 4594 "hint.w" +#line 4603 "hint.w" switch(type(p)) {case hlist_node:case vlist_node:case rule_node: @@ -349,7 +357,7 @@ default: pi= hp= dp= 0; } /*:260*/ -#line 4627 "hint.w" +#line 4636 "hint.w" h= h+d+hp; d= dp; @@ -364,23 +372,23 @@ flush_node_list(link(contrib_head)); link(contrib_head)= p; } /*:261*/ -#line 4583 "hint.w" +#line 4592 "hint.w" goto found; } } /*:259*/ -#line 4545 "hint.w" +#line 4554 "hint.w" } else if(p!=null&&type(p)==penalty_node) pi= penalty(p); /*262:*/ -#line 4646 "hint.w" +#line 4655 "hint.w" -{pointer save_h= link(contrib_head); -pointer save_t= tail; -uint8_t*save_hpos= hpos; +{pointer h_save= link(contrib_head); +pointer t_save= tail; +uint8_t*hpos_save= hpos; pointer best_p= null; int best_pi= pi; link(contrib_head)= null;p= tail= contrib_head; @@ -394,7 +402,7 @@ break; else p= link(p); /*260:*/ -#line 4594 "hint.w" +#line 4603 "hint.w" switch(type(p)) {case hlist_node:case vlist_node:case rule_node: @@ -417,7 +425,7 @@ default: pi= hp= dp= 0; } /*:260*/ -#line 4662 "hint.w" +#line 4671 "hint.w" h= h+dp+hp; if(pi<best_pi) @@ -434,21 +442,21 @@ else {p= link(contrib_head); do{pointer q; q= link(p); -link(p)= save_h; -save_h= p; +link(p)= h_save; +h_save= p; p= q; -}while(save_h!=best_p); +}while(h_save!=best_p); flush_node_list(p); pos0= LOC_POS0(hlocation(best_p)); offset= 0; } -link(contrib_head)= save_h; -if(save_t!=contrib_head) -tail= save_t; -hpos= save_hpos; +link(contrib_head)= h_save; +if(t_save!=contrib_head) +tail= t_save; +hpos= hpos_save; } /*:262*/ -#line 4549 "hint.w" +#line 4558 "hint.w" found: hloc_set(PAGE_LOC(pos0,offset)); @@ -458,7 +466,7 @@ backward_mode= false; return hint_page_get(); } /*:258*//*266:*/ -#line 4749 "hint.w" +#line 4758 "hint.w" uint64_t hint_outline_page(int i) {uint64_t pos; @@ -467,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 4760 "hint.w" +#line 4769 "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 4756 "hint.w" +#line 4765 "hint.w" } /*:266*//*274:*/ -#line 4964 "hint.w" +#line 4973 "hint.w" void hint_set_mark(char*m,int s) {m_str= m; m_length= s; /*275:*/ -#line 4975 "hint.w" +#line 4984 "hint.w" if(m_length> 0) {int i,j,k; @@ -500,12 +508,12 @@ m_length= k; m_chars= m_length-j; } /*:275*/ -#line 4968 "hint.w" +#line 4977 "hint.w" hmark_page(); } /*:274*//*278:*/ -#line 5064 "hint.w" +#line 5073 "hint.w" static void m_put(uint32_t d) {if(m_ptr<MAX_M_DIST) @@ -542,7 +550,7 @@ x= (x<<7)+y; } } /*:278*//*279:*/ -#line 5105 "hint.w" +#line 5114 "hint.w" static int m_next(int i) {while((0x80&m_dist[i])==0)i++; @@ -557,7 +565,7 @@ while(i> 0&&(0x80&m_dist[i-1])==0)i--; return i; } /*:279*//*281:*/ -#line 5136 "hint.w" +#line 5145 "hint.w" static void next_m_char(uint32_t c) { @@ -578,7 +586,7 @@ m_state= 0; } else /*282:*/ -#line 5170 "hint.w" +#line 5179 "hint.w" {int i= 0,j= 0; do{ @@ -590,13 +598,13 @@ m_state= m_state-i; goto reconsider; } /*:282*/ -#line 5155 "hint.w" +#line 5164 "hint.w" } /*:281*//*283:*/ -#line 5183 "hint.w" +#line 5192 "hint.w" #if 0 static void next_m_space(void) @@ -618,7 +626,7 @@ else if(m_state> 0) } #endif /*:283*//*284:*/ -#line 5206 "hint.w" +#line 5215 "hint.w" #if 0 static void vlist_mark(pointer p); @@ -665,7 +673,7 @@ p= link(p); } #endif /*:284*//*286:*/ -#line 5259 "hint.w" +#line 5268 "hint.w" void hmark_page(void) {if(streams==NULL||streams[0].p==null)return; @@ -687,13 +695,13 @@ m_put(0xFF); if(m_focus>=m_max)m_focus= 0; } /*:286*//*293:*/ -#line 5374 "hint.w" +#line 5383 "hint.w" void c_ignore_list(pointer p) {while(p!=null) {if(is_char_node(p)) {/*290:*/ -#line 5314 "hint.w" +#line 5323 "hint.w" {while(m_d==0) {m_style^= MARK_BIT; @@ -709,7 +717,7 @@ m_d= m_get(); m_d--; } /*:290*/ -#line 5378 "hint.w" +#line 5387 "hint.w" cur_style|= m_style; } @@ -721,7 +729,7 @@ case ligature_node: {pointer q= lig_ptr(p); while(q!=null) {/*290:*/ -#line 5314 "hint.w" +#line 5323 "hint.w" {while(m_d==0) {m_style^= MARK_BIT; @@ -737,7 +745,7 @@ m_d= m_get(); m_d--; } /*:290*/ -#line 5388 "hint.w" +#line 5397 "hint.w" cur_style|= m_style; q= link(q); @@ -750,7 +758,7 @@ p= link(p); } } /*:293*//*294:*/ -#line 5421 "hint.w" +#line 5430 "hint.w" bool hint_prev_mark(void) {m_focus= m_prev(m_focus); @@ -771,22 +779,22 @@ m_focus= m_next(0); return(m_focus!=0); } /*:294*//*302:*/ -#line 5522 "hint.w" +#line 5531 "hint.w" static int links_allocated= 0; void add_new_link(int n,pointer p,scaled h,scaled v) -{hint_link_t*t; +{hint_Link*t; uint64_t pos; uint8_t where; max_link++; if(max_link>=links_allocated) {if(links_allocated<=0) {links_allocated= 32; -ALLOCATE(hint_links,links_allocated,hint_link_t); +ALLOCATE(hint_links,links_allocated,hint_Link); } else {links_allocated= links_allocated*1.4142136+0.5; -REALLOCATE(hint_links,links_allocated,hint_link_t); +REALLOCATE(hint_links,links_allocated,hint_Link); } } t= hint_links+max_link; @@ -801,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 5541 "hint.w" +#line 5550 "hint.w" t->where= where; t->pos= pos; @@ -821,7 +829,7 @@ t->right= h+width(p); } void end_new_link(int n,pointer p,scaled h,scaled v) -{hint_link_t*t; +{hint_Link*t; t= hint_links+max_link; if(type(p)==hlist_node) t->right= h; @@ -829,9 +837,9 @@ else t->bottom= v; } /*:302*//*303:*/ -#line 5591 "hint.w" +#line 5600 "hint.w" -static scaled hlink_distance(scaled x,scaled y,hint_link_t*t) +static scaled hlink_distance(scaled x,scaled y,hint_Link*t) {scaled d,dx= 0,dy= 0; d= t->top-y; if(d> 0)dy= d; @@ -852,7 +860,7 @@ else return dy; int hint_find_link(scaled x,scaled y,scaled precission) {static int last_hit= -1; int i; -hint_link_t*t; +hint_Link*t; if(max_link<0)return-1; if(last_hit<0||last_hit> max_link)last_hit= max_link/2; i= last_hit; @@ -885,7 +893,7 @@ return last_hit; } } /*:303*//*304:*/ -#line 5651 "hint.w" +#line 5660 "hint.w" uint64_t hint_link_page(int i) {uint64_t h; @@ -898,15 +906,15 @@ else if(w==LABEL_BOT)return hint_page_bottom(h); else if(w==LABEL_MID)return hint_page_middle(h); else return hint_page_get(); } -/*:304*//*322:*/ -#line 6093 "hint.w" +/*:304*//*323:*/ +#line 6109 "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)); } -/*:322*//*323:*/ -#line 6104 "hint.w" +/*:323*//*324:*/ +#line 6120 "hint.w" void render_image(int x,int y,int w,int h,uint32_t n) { @@ -916,15 +924,15 @@ hget_section(n); nativeImage(SP2PT(x),SP2PT(y),SP2PT(w),SP2PT(h),hstart,hend); hpos= spos;hstart= sstart;hend= send; } -/*:323*//*325:*/ -#line 6136 "hint.w" +/*:324*//*326:*/ +#line 6152 "hint.w" static void vlist_render(pointer this_box); static void hlist_render(pointer this_box) {scaled base_line; scaled left_edge; -scaled save_h; +scaled h_save; glue_ord g_order; uint8_t g_sign; pointer p; @@ -952,7 +960,7 @@ this_box,mem[this_box].i,p); base_line= cur_v; left_edge= cur_h; /*299:*/ -#line 5488 "hint.w" +#line 5497 "hint.w" if(cur_link>=0) {add_new_link(cur_link,this_box,cur_h,cur_v); @@ -960,7 +968,7 @@ local_link= cur_link; cur_link= -1; } /*:299*/ -#line 6169 "hint.w" +#line 6185 "hint.w" while(p!=null) { @@ -977,7 +985,7 @@ c= character(p); if(!c_ignore&&c!=' ') {cur_style= cur_style&~(MARK_BIT|FOCUS_BIT); /*290:*/ -#line 5314 "hint.w" +#line 5323 "hint.w" {while(m_d==0) {m_style^= MARK_BIT; @@ -993,7 +1001,7 @@ m_d= m_get(); m_d--; } /*:290*/ -#line 6184 "hint.w" +#line 6200 "hint.w" cur_style|= m_style; } @@ -1043,7 +1051,7 @@ rule_ht= height(p);rule_dp= depth(p);rule_wd= width(p); goto fin_rule; case whatsit_node: /*292:*/ -#line 5351 "hint.w" +#line 5360 "hint.w" if(subtype(p)==ignore_node) {if(ignore_info(p)==1) @@ -1055,10 +1063,10 @@ else c_ignore= false; } /*:292*/ -#line 6232 "hint.w" +#line 6248 "hint.w" else/*297:*/ -#line 5462 "hint.w" +#line 5471 "hint.w" if(subtype(p)==start_link_node) {cur_style|= LINK_BIT; @@ -1071,7 +1079,7 @@ end_new_link(local_link,this_box,cur_h,cur_v); local_link= -1; } /*:297*/ -#line 6233 "hint.w" +#line 6249 "hint.w" else if(subtype(p)==image_node) {scaled h,w; @@ -1128,9 +1136,9 @@ if((leader_wd> 0)&&(rule_wd> 0)) edge= cur_h+rule_wd;lx= 0; if(subtype(p)==a_leaders) -{save_h= cur_h; +{h_save= cur_h; cur_h= left_edge+leader_wd*((cur_h-left_edge)/leader_wd); -if(cur_h<save_h)cur_h= cur_h+leader_wd; +if(cur_h<h_save)cur_h= cur_h+leader_wd; } else {int lq= rule_wd/leader_wd; @@ -1143,7 +1151,7 @@ cur_h= cur_h+((lr-(lq-1)*lx)/2); while(cur_h+leader_wd<=edge) {cur_v= base_line+shift_amount(leader_box); -save_h= cur_h; +h_save= cur_h; c_ignore= true; if(type(leader_box)==vlist_node) vlist_render(leader_box); @@ -1151,7 +1159,7 @@ else hlist_render(leader_box); c_ignore= false; cur_v= base_line; -cur_h= save_h+leader_wd+lx; +cur_h= h_save+leader_wd+lx; } cur_h= edge-10;goto next_p; } @@ -1166,7 +1174,7 @@ case ligature_node: f= font(lig_char(p)); c= character(lig_char(p)); /*291:*/ -#line 5333 "hint.w" +#line 5342 "hint.w" if(!c_ignore) {pointer q; @@ -1174,7 +1182,7 @@ cur_style= cur_style&~(MARK_BIT|FOCUS_BIT); q= lig_ptr(p); while(q!=null) {/*290:*/ -#line 5314 "hint.w" +#line 5323 "hint.w" {while(m_d==0) {m_style^= MARK_BIT; @@ -1190,14 +1198,14 @@ m_d= m_get(); m_d--; } /*:290*/ -#line 5339 "hint.w" +#line 5348 "hint.w" cur_style|= m_style; q= link(q); } } /*:291*/ -#line 6326 "hint.w" +#line 6342 "hint.w" goto render_c; default:; @@ -1224,14 +1232,14 @@ p= link(p); } } /*298:*/ -#line 5478 "hint.w" +#line 5487 "hint.w" if(local_link>=0) {end_new_link(local_link,this_box,cur_h,cur_v); cur_link= local_link; } /*:298*/ -#line 6351 "hint.w" +#line 6367 "hint.w" } @@ -1400,15 +1408,15 @@ p= link(p); } } -/*:325*//*326:*/ -#line 6526 "hint.w" +/*:326*//*327:*/ +#line 6542 "hint.w" uint64_t hint_blank(void) {nativeBlank(); return 0; } -/*:326*//*327:*/ -#line 6535 "hint.w" +/*:327*//*328:*/ +#line 6551 "hint.w" void hint_render(void) @@ -1419,18 +1427,18 @@ cur_v= height(streams[0].p); cur_f= -1;cur_fp= NULL; cur_link= -1;max_link= -1; /*289:*/ -#line 5307 "hint.w" +#line 5316 "hint.w" m_ptr= 0;m_d= 0;m_style= MARK_BIT;c_ignore= false;cur_style= 0; /*:289*/ -#line 6544 "hint.w" +#line 6560 "hint.w" if(type(streams[0].p)==vlist_node) vlist_render(streams[0].p); else hlist_render(streams[0].p); } -/*:327*/ -#line 7580 "hint.w" +/*:328*/ +#line 7596 "hint.w" -/*:373*/ +/*:374*/ diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/hrender.h b/Build/source/texk/web2c/hitexdir/hintview/src/hrender.h index 7d389335aea..f71feaa0d2e 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 @@ -/*372:*/ -#line 7535 "hint.w" +/*373:*/ +#line 7551 "hint.w" #ifndef _HRENDER_H #define _HRENDER_H /*276:*/ -#line 4997 "hint.w" +#line 5006 "hint.w" #define MARK_BIT 0x1 #define FOCUS_BIT 0x2 /*:276*//*295:*/ -#line 5447 "hint.w" +#line 5456 "hint.w" #define LINK_BIT 0x4 -/*:295*//*319:*/ -#line 6067 "hint.w" +/*:295*//*320:*/ +#line 6083 "hint.w" #define SP2PT(X) ((X)/(double)(1<<16)) -/*:319*/ -#line 7538 "hint.w" +/*:320*/ +#line 7554 "hint.w" extern int page_h,page_v; @@ -42,4 +42,4 @@ extern double hint_get_fpos(void); extern uint64_t hint_set_fpos(double fpos); #endif -/*:372*/ +/*:373*/ diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/htex.c b/Build/source/texk/web2c/hitexdir/hintview/src/htex.c index 4c3d5d18066..c191e47cdbb 100644 --- a/Build/source/texk/web2c/hitexdir/hintview/src/htex.c +++ b/Build/source/texk/web2c/hitexdir/hintview/src/htex.c @@ -17,21 +17,21 @@ #line 262 "htex.ch" pointer temp_ptr; -#line 2494 "btex.w" +#line 2496 "btex.w" /*:120*//*121:*/ -#line 272 "htex.ch" +#line 273 "htex.ch" memory_word mem0[mem_max-mem_min+1],*const mem= mem0-mem_min; pointer lo_mem_max; pointer hi_mem_min; -#line 2528 "btex.w" +#line 2531 "btex.w" /*:121*//*122:*/ -#line 282 "htex.ch" +#line 283 "htex.ch" static int var_used,dyn_used; -#line 2539 "btex.w" +#line 2542 "btex.w" #ifdef STAT #define incr_dyn_used incr(dyn_used) #define decr_dyn_used decr(dyn_used) @@ -41,93 +41,99 @@ static int var_used,dyn_used; #endif /*:122*//*123:*/ -#line 292 "htex.ch" +#line 293 "htex.ch" static pointer avail; -#line 2563 "btex.w" +#line 2566 "btex.w" /*:123*//*129:*/ -#line 329 "htex.ch" +#line 330 "htex.ch" static pointer rover; -#line 2667 "btex.w" +#line 2670 "btex.w" /*:129*//*658:*/ -#line 1085 "htex.ch" +#line 1093 "htex.ch" -static scaled total_stretch0[filll-normal+1],*const total_stretch= total_stretch0-normal,total_shrink0[filll-normal+1],*const total_shrink= total_shrink0-normal; +static scaled total_stretch0[filll-normal+1], +*const total_stretch= total_stretch0-normal, +total_shrink0[filll-normal+1],*const total_shrink= total_shrink0-normal; -#line 12902 "btex.w" +#line 12962 "btex.w" /*:658*//*660:*/ -#line 1093 "htex.ch" +#line 1103 "htex.ch" pointer adjust_tail= null; -#line 12910 "btex.w" +#line 12970 "btex.w" /*:660*//*829:*/ -#line 1208 "htex.ch" +#line 1220 "htex.ch" pointer just_box; -#line 16025 "btex.w" +#line 16110 "btex.w" /*:829*//*837:*/ -#line 1258 "htex.ch" +#line 1270 "htex.ch" static pointer passive; -#line 16168 "btex.w" +#line 16253 "btex.w" static pointer printed_node; static halfword pass_number; /*:837*//*840:*/ -#line 1265 "htex.ch" +#line 1277 "htex.ch" static scaled active_width0[6],*const active_width= active_width0-1; -#line 16207 "btex.w" +#line 16292 "btex.w" -static scaled cur_active_width0[6],*const cur_active_width= cur_active_width0-1; +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 1272 "htex.ch" +#line 1284 "htex.ch" static bool no_shrink_error_yet; -#line 16264 "btex.w" +#line 16350 "btex.w" /*:843*//*847:*/ -#line 1303 "htex.ch" +#line 1315 "htex.ch" static pointer cur_p; -#line 16324 "btex.w" +#line 16410 "btex.w" static bool second_pass; static bool final_pass; static int threshold; /*:847*//*853:*/ -#line 1311 "htex.ch" +#line 1324 "htex.ch" -static int minimal_demerits0[tight_fit-very_loose_fit+1],*const minimal_demerits= minimal_demerits0-very_loose_fit; +static int minimal_demerits0[tight_fit-very_loose_fit+1], +*const minimal_demerits= minimal_demerits0-very_loose_fit; -#line 16426 "btex.w" +#line 16513 "btex.w" static int minimum_demerits; -static pointer best_place0[tight_fit-very_loose_fit+1],*const best_place= best_place0-very_loose_fit; +static pointer best_place0[tight_fit-very_loose_fit+1], +*const best_place= best_place0-very_loose_fit; -static halfword best_pl_line0[tight_fit-very_loose_fit+1],*const best_pl_line= best_pl_line0-very_loose_fit; +static halfword best_pl_line0[tight_fit-very_loose_fit+1], +*const best_pl_line= best_pl_line0-very_loose_fit; /*:853*//*860:*/ -#line 1319 "htex.ch" +#line 1333 "htex.ch" static scaled disc_width; -#line 16543 "btex.w" +#line 16632 "btex.w" /*:860*//*869:*/ -#line 1326 "htex.ch" +#line 1340 "htex.ch" static halfword easy_line; -#line 16683 "btex.w" +#line 16774 "btex.w" static halfword last_special_line; static scaled first_width; @@ -137,10 +143,10 @@ static scaled first_indent; static scaled second_indent; /*:869*//*895:*/ -#line 1430 "htex.ch" +#line 1444 "htex.ch" static pointer best_bet; -#line 17193 "btex.w" +#line 17288 "btex.w" static int fewest_demerits; static halfword best_line; static int actual_looseness; @@ -149,17 +155,17 @@ static int line_diff; /*:895*//*996:*/ -#line 1625 "htex.ch" +#line 1640 "htex.ch" scaled best_height_plus_depth; -#line 18940 "btex.w" +#line 19052 "btex.w" /*:996*//*1005:*/ -#line 1655 "htex.ch" +#line 1670 "htex.ch" pointer page_tail; -#line 19146 "btex.w" +#line 19258 "btex.w" int page_contents; scaled page_max_depth; pointer best_page_break; @@ -167,10 +173,10 @@ int least_page_cost; scaled best_size; /*:1005*//*1007:*/ -#line 1666 "htex.ch" +#line 1681 "htex.ch" scaled page_so_far[8]; -#line 19231 "btex.w" +#line 19343 "btex.w" int insert_penalties; @@ -184,7 +190,7 @@ int insert_penalties; void overflow(char*s,int n) {QUIT("Capacity exceeded, sorry [%s=%d=0x%X]\n",s,n,n); } -#line 2026 "btex.w" +#line 2028 "btex.w" /*:97*//*98:*/ #line 188 "htex.ch" @@ -192,7 +198,7 @@ void overflow(char*s,int n) void confusion(char*s) {QUIT("This can't happen(%s)",s);} -#line 2051 "btex.w" +#line 2053 "btex.w" /*:98*/ #line 31 "htex.ch" @@ -205,7 +211,7 @@ void confusion(char*s) static int half(int x) -#line 2115 "btex.w" +#line 2117 "btex.w" {if(odd(x))return(x+1)/2; else return x/2; } @@ -215,13 +221,13 @@ else return x/2; static bool arith_error; static scaled rem; -#line 2199 "btex.w" +#line 2201 "btex.w" /*:108*//*110:*/ #line 241 "htex.ch" static scaled x_over_n(scaled x,int n) -#line 2221 "btex.w" +#line 2223 "btex.w" {bool negative; scaled x_over_n; negative= false; @@ -244,7 +250,7 @@ return x_over_n;} #line 248 "htex.ch" static scaled xn_over_d(scaled x,int n,int d) -#line 2247 "btex.w" +#line 2249 "btex.w" {bool positive; nonnegative_integer t,u,v; scaled xn_over_d; @@ -267,7 +273,7 @@ return xn_over_d;} #line 255 "htex.ch" halfword badness(scaled t,scaled s) -#line 2286 "btex.w" +#line 2288 "btex.w" {int r; if(t==0)return 0; @@ -281,18 +287,18 @@ else return(r*r*r+0400000)/01000000; } /*:112*//*125:*/ -#line 299 "htex.ch" +#line 300 "htex.ch" static pointer get_avail(void) -#line 2581 "btex.w" +#line 2584 "btex.w" {pointer p; p= avail; if(p!=null)avail= link(avail); -#line 311 "htex.ch" +#line 312 "htex.ch" else{decr(hi_mem_min);p= hi_mem_min; if(hi_mem_min<=lo_mem_max) { -#line 2590 "btex.w" +#line 2593 "btex.w" overflow("main memory size",mem_max+1-mem_min); @@ -307,11 +313,11 @@ return p; } /*:125*//*128:*/ -#line 320 "htex.ch" +#line 321 "htex.ch" static void flush_list(pointer p) -#line 2631 "btex.w" +#line 2634 "btex.w" {pointer q,r; if(p!=null) {r= p; @@ -325,10 +331,10 @@ link(q)= avail;avail= p; } /*:128*//*130:*/ -#line 336 "htex.ch" +#line 337 "htex.ch" pointer get_node(int s) -#line 2677 "btex.w" +#line 2680 "btex.w" { pointer p; pointer q; @@ -336,7 +342,7 @@ int r; int t; restart:p= rover; do{/*132:*/ -#line 2726 "btex.w" +#line 2729 "btex.w" q= p+node_size(p); @@ -348,7 +354,7 @@ q= q+node_size(q); } r= q-s; if(r> p+1)/*133:*/ -#line 2741 "btex.w" +#line 2744 "btex.w" {node_size(p)= r-p; @@ -357,11 +363,11 @@ goto found; } /*:133*/ -#line 2736 "btex.w" +#line 2739 "btex.w" ; if(r==p)if(rlink(p)!=p) /*134:*/ -#line 2750 "btex.w" +#line 2753 "btex.w" {rover= rlink(p);t= llink(p); llink(rover)= t;rlink(t)= rover; @@ -369,12 +375,12 @@ goto found; } /*:134*/ -#line 2738 "btex.w" +#line 2741 "btex.w" ; node_size(p)= q-p /*:132*/ -#line 2684 "btex.w" +#line 2687 "btex.w" ; p= rlink(p); @@ -384,7 +390,7 @@ if(s==010000000000) } if(lo_mem_max+2<hi_mem_min)if(lo_mem_max+2<=mem_bot+max_halfword) /*131:*/ -#line 2711 "btex.w" +#line 2714 "btex.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; @@ -397,7 +403,7 @@ rover= q;goto restart; } /*:131*/ -#line 2692 "btex.w" +#line 2695 "btex.w" ; overflow("main memory size",mem_max+1-mem_min); @@ -407,21 +413,21 @@ found:link(r)= null; var_used= var_used+s; #endif -#line 343 "htex.ch" +#line 344 "htex.ch" leak_in(r,s); return r; -#line 2702 "btex.w" +#line 2705 "btex.w" } /*:130*//*135:*/ -#line 352 "htex.ch" +#line 353 "htex.ch" static void free_node(pointer p,halfword s) {pointer q; leak_out(p,s); store_map(p,0,0); -#line 2764 "btex.w" +#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; @@ -432,10 +438,10 @@ var_used= var_used-s; } /*:135*//*141:*/ -#line 369 "htex.ch" +#line 370 "htex.ch" pointer new_null_box(void) -#line 2910 "btex.w" +#line 2913 "btex.w" {pointer p; p= get_node(box_node_size);type(p)= hlist_node; subtype(p)= min_quarterword; @@ -445,10 +451,10 @@ return p; } /*:141*//*144:*/ -#line 376 "htex.ch" +#line 377 "htex.ch" pointer new_rule(void) -#line 2940 "btex.w" +#line 2943 "btex.w" {pointer p; p= get_node(rule_node_size);type(p)= rule_node; subtype(p)= 0; @@ -457,46 +463,46 @@ return p; } /*:144*//*149:*/ -#line 383 "htex.ch" +#line 384 "htex.ch" pointer new_ligature(quarterword f,quarterword c,pointer q) -#line 3009 "btex.w" +#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 3020 "btex.w" +#line 3023 "btex.w" /*:149*//*150:*/ -#line 408 "htex.ch" +#line 409 "htex.ch" pointer new_disc(void) -#line 3044 "btex.w" +#line 3047 "btex.w" {pointer p; p= get_node(small_node_size);type(p)= disc_node; -#line 415 "htex.ch" +#line 416 "htex.ch" subtype(p)= 0;pre_break(p)= null;post_break(p)= null; -#line 3047 "btex.w" +#line 3050 "btex.w" return p; } /*:150*//*152:*/ -#line 421 "htex.ch" +#line 422 "htex.ch" pointer new_math(scaled w,small_number s) -#line 3078 "btex.w" +#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 428 "htex.ch" +#line 429 "htex.ch" pointer new_spec(pointer p) -#line 3160 "btex.w" +#line 3163 "btex.w" {pointer q; q= get_node(glue_spec_size); mem[q]= mem[p];glue_ref_count(q)= null; @@ -505,10 +511,10 @@ return q; } /*:156*//*158:*/ -#line 435 "htex.ch" +#line 436 "htex.ch" pointer new_glue(pointer q) -#line 3186 "btex.w" +#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)); @@ -516,10 +522,10 @@ return p; } /*:158*//*161:*/ -#line 442 "htex.ch" +#line 443 "htex.ch" pointer new_kern(scaled w) -#line 3224 "btex.w" +#line 3227 "btex.w" {pointer p; p= get_node(small_node_size);type(p)= kern_node; subtype(p)= normal; @@ -528,10 +534,10 @@ return p; } /*:161*//*163:*/ -#line 449 "htex.ch" +#line 450 "htex.ch" pointer new_penalty(int m) -#line 3247 "btex.w" +#line 3250 "btex.w" {pointer p; p= get_node(small_node_size);type(p)= penalty_node; subtype(p)= 0; @@ -539,14 +545,14 @@ penalty(p)= m;return p; } /*:163*//*169:*/ -#line 469 "htex.ch" +#line 470 "htex.ch" void mem_init(void) {int k; /*170:*/ -#line 475 "htex.ch" +#line 476 "htex.ch" -#line 3331 "btex.w" +#line 3334 "btex.w" for(k= mem_bot+1;k<=lo_mem_stat_max;k++)mem[k].sc= 0; @@ -556,7 +562,7 @@ k= mem_bot;while(k<=lo_mem_stat_max) stretch_order(k)= normal;shrink_order(k)= normal; k= k+glue_spec_size; } -#line 3345 "btex.w" +#line 3348 "btex.w" rover= lo_mem_stat_max+1; link(rover)= empty_flag; node_size(rover)= 1000; @@ -565,59 +571,59 @@ 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 15568 "btex.w" +#line 15652 "btex.w" info(omit_template)= end_template_token; /*:804*//*811:*/ -#line 15675 "btex.w" +#line 15759 "btex.w" link(end_span)= max_quarterword+1;info(end_span)= null; /*:811*//*835:*/ -#line 16136 "btex.w" +#line 16221 "btex.w" type(last_active)= hyphenated;line_number(last_active)= max_halfword; subtype(last_active)= 0; /*:835*//*1006:*/ -#line 19197 "btex.w" +#line 19309 "btex.w" subtype(page_ins_head)= qi(255); type(page_ins_head)= split_up;link(page_ins_head)= page_ins_head; /*:1006*//*1013:*/ -#line 19354 "btex.w" +#line 19466 "btex.w" type(page_head)= glue_node;subtype(page_head)= normal; /*:1013*/ -#line 3352 "btex.w" +#line 3355 "btex.w" ; -#line 490 "htex.ch" +#line 491 "htex.ch" avail= null; -#line 3354 "btex.w" +#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 472 "htex.ch" +#line 473 "htex.ch" } /*:169*//*209:*/ -#line 642 "htex.ch" +#line 643 "htex.ch" static void delete_token_ref(pointer p) -#line 3888 "btex.w" +#line 3894 "btex.w" {if(token_ref_count(p)==null)flush_list(p); else decr(token_ref_count(p)); } /*:209*//*210:*/ -#line 651 "htex.ch" +#line 652 "htex.ch" void delete_glue_ref(pointer p) fast_delete_glue_ref(p) @@ -625,13 +631,13 @@ 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 3902 "btex.w" +#line 3908 "btex.w" /*:210*//*211:*/ -#line 663 "htex.ch" +#line 664 "htex.ch" void flush_node_list(pointer p) -#line 3909 "btex.w" +#line 3915 "btex.w" { pointer q; while(p!=null) @@ -639,7 +645,8 @@ while(p!=null) {q= link(p); if(is_char_node(p))free_avail(p) else{switch(type(p)){ -case hlist_node:case vlist_node:case unset_node:{flush_node_list(list_ptr(p)); +case hlist_node:case vlist_node: +case unset_node:{flush_node_list(list_ptr(p)); free_node(p,box_node_size);goto done; } case rule_node:{free_node(p,rule_node_size);goto done; @@ -649,10 +656,10 @@ delete_glue_ref(split_top_ptr(p)); free_node(p,ins_node_size);goto done; } case whatsit_node:/*1387:*/ -#line 24761 "btex.w" +#line 24898 "btex.w" {switch(subtype(p)){ -#line 2512 "htex.ch" +#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); @@ -718,30 +725,30 @@ case stream_node: free_node(p,stream_node_size);break; case xdimen_node: free_node(p,xdimen_node_size); -#line 24768 "btex.w" +#line 24905 "btex.w" default:confusion("ext3"); } goto done; } -#line 2582 "htex.ch" +#line 2597 "htex.ch" /*:1387*/ -#line 3925 "btex.w" +#line 3932 "btex.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 3932 "btex.w" +#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 676 "htex.ch" +#line 677 "htex.ch" default:QUIT("Confusion while flushing node list"); -#line 3938 "btex.w" +#line 3945 "btex.w" } free_node(p,small_node_size); @@ -751,11 +758,11 @@ p= q; } /*:211*//*213:*/ -#line 690 "htex.ch" +#line 691 "htex.ch" pointer copy_node_list(pointer p) -#line 3972 "btex.w" +#line 3979 "btex.w" {pointer h; pointer q; pointer r; @@ -763,12 +770,12 @@ int words; h= get_avail();q= h; while(p!=null) {/*214:*/ -#line 3985 "btex.w" +#line 3992 "btex.w" words= 1; if(is_char_node(p))r= get_avail(); else/*215:*/ -#line 3994 "btex.w" +#line 4001 "btex.w" switch(type(p)){ case hlist_node:case vlist_node:case unset_node:{r= get_node(box_node_size); @@ -784,7 +791,7 @@ ins_ptr(r)= copy_node_list(ins_ptr(p)); words= ins_node_size-1; }break; case whatsit_node:/*1386:*/ -#line 24747 "btex.w" +#line 24884 "btex.w" switch(subtype(p)){ case open_node:{r= get_node(open_node_size);words= open_node_size; @@ -795,7 +802,7 @@ 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 2398 "htex.ch" +#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); @@ -901,12 +908,12 @@ r= get_node(xdimen_node_size); words= xdimen_node_size; break; default:confusion("ext2"); -#line 24758 "btex.w" +#line 24895 "btex.w" } /*:1386*/ -#line 4009 "btex.w" +#line 4016 "btex.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)); @@ -933,14 +940,14 @@ default:confusion("copying"); } /*:215*/ -#line 3989 "btex.w" +#line 3996 "btex.w" ; while(words> 0) {decr(words);mem[r+words]= mem[p+words]; } /*:214*/ -#line 3978 "btex.w" +#line 3985 "btex.w" ; link(q)= r;q= r;p= link(p); } @@ -949,20 +956,20 @@ return q; } /*:213*//*224:*/ -#line 742 "htex.ch" +#line 743 "htex.ch" /*222:*/ -#line 728 "htex.ch" +#line 729 "htex.ch" static list_state_record nest[nest_size+1]; int nest_ptr; static int max_nest_stack; list_state_record cur_list; -#line 4333 "btex.w" +#line 4340 "btex.w" /*:222*/ -#line 744 "htex.ch" +#line 745 "htex.ch" void list_init(void) @@ -973,32 +980,32 @@ mode= vmode;head= contrib_head;tail= contrib_head; prev_height= prev_depth= ignore_depth; } /*:224*//*226:*/ -#line 761 "htex.ch" +#line 762 "htex.ch" void push_nest(void) -#line 4359 "btex.w" +#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 768 "htex.ch" +#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 4366 "btex.w" +#line 4373 "btex.w" } /*:226*//*227:*/ -#line 775 "htex.ch" +#line 776 "htex.ch" void pop_nest(void) -#line 4374 "btex.w" +#line 4381 "btex.w" {free_avail(head);decr(nest_ptr);cur_list= nest[nest_ptr]; } /*:227*//*560:*/ -#line 952 "htex.ch" +#line 953 "htex.ch" memory_word font_info[font_mem_size+1]; @@ -1007,70 +1014,93 @@ static font_index fmem_ptr= 0; void hclear_fonts(void) {fmem_ptr= 0; } -#line 10740 "btex.w" +#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; -scaled font_size0[font_max-font_base+1],*const font_size= font_size0-font_base; -static scaled font_dsize0[font_max-font_base+1],*const font_dsize= font_dsize0-font_base; -static font_index font_params0[font_max-font_base+1],*const font_params= font_params0-font_base; +static four_quarters font_check0[font_max-font_base+1], +*const font_check= font_check0-font_base; +scaled font_size0[font_max-font_base+1], +*const font_size= font_size0-font_base; +static scaled font_dsize0[font_max-font_base+1], +*const font_dsize= font_dsize0-font_base; +static font_index font_params0[font_max-font_base+1], +*const font_params= font_params0-font_base; -#line 966 "htex.ch" -char*font_name0[font_max-font_base+1],**const font_name= font_name0-font_base; -#line 10748 "btex.w" -static eight_bits font_bc0[font_max-font_base+1],*const font_bc= font_bc0-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; -static eight_bits font_ec0[font_max-font_base+1],*const font_ec= font_ec0-font_base; +static eight_bits font_ec0[font_max-font_base+1], +*const font_ec= font_ec0-font_base; -static pointer font_glue0[font_max-font_base+1],*const font_glue= font_glue0-font_base; +static pointer font_glue0[font_max-font_base+1], +*const font_glue= font_glue0-font_base; -static bool font_used0[font_max-font_base+1],*const font_used= font_used0-font_base; +static bool font_used0[font_max-font_base+1], +*const font_used= font_used0-font_base; -static int hyphen_char0[font_max-font_base+1],*const hyphen_char= hyphen_char0-font_base; +static int hyphen_char0[font_max-font_base+1], +*const hyphen_char= hyphen_char0-font_base; -static int skew_char0[font_max-font_base+1],*const skew_char= skew_char0-font_base; +static int skew_char0[font_max-font_base+1], +*const skew_char= skew_char0-font_base; -static font_index bchar_label0[font_max-font_base+1],*const bchar_label= bchar_label0-font_base; +static font_index bchar_label0[font_max-font_base+1], +*const bchar_label= bchar_label0-font_base; -static int16_t font_bchar0[font_max-font_base+1],*const font_bchar= font_bchar0-font_base; +static int16_t font_bchar0[font_max-font_base+1], +*const font_bchar= font_bchar0-font_base; -static int16_t font_false_bchar0[font_max-font_base+1],*const font_false_bchar= font_false_bchar0-font_base; +static int16_t font_false_bchar0[font_max-font_base+1], +*const font_false_bchar= font_false_bchar0-font_base; /*:560*//*561:*/ -#line 973 "htex.ch" +#line 978 "htex.ch" -int char_base0[font_max-font_base+1],*const char_base= char_base0-font_base; -#line 10779 "btex.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; +int width_base0[font_max-font_base+1], +*const width_base= width_base0-font_base; -static int height_base0[font_max-font_base+1],*const height_base= height_base0-font_base; +static int height_base0[font_max-font_base+1], +*const height_base= height_base0-font_base; -static int depth_base0[font_max-font_base+1],*const depth_base= depth_base0-font_base; +static int depth_base0[font_max-font_base+1], +*const depth_base= depth_base0-font_base; -static int italic_base0[font_max-font_base+1],*const italic_base= italic_base0-font_base; +static int italic_base0[font_max-font_base+1], +*const italic_base= italic_base0-font_base; -static int lig_kern_base0[font_max-font_base+1],*const lig_kern_base= lig_kern_base0-font_base; +static int lig_kern_base0[font_max-font_base+1], +*const lig_kern_base= lig_kern_base0-font_base; -static int kern_base0[font_max-font_base+1],*const kern_base= kern_base0-font_base; +static int kern_base0[font_max-font_base+1], +*const kern_base= kern_base0-font_base; -static int exten_base0[font_max-font_base+1],*const exten_base= exten_base0-font_base; +static int exten_base0[font_max-font_base+1], +*const exten_base= exten_base0-font_base; -static int param_base0[font_max-font_base+1],*const param_base= param_base0-font_base; +static int param_base0[font_max-font_base+1], +*const param_base= param_base0-font_base; /*:561*//*571:*/ -#line 981 "htex.ch" +#line 987 "htex.ch" void read_font_info(int f,char*nom,scaled s) -#line 10925 "btex.w" +#line 10975 "btex.w" { int k; bool file_opened; halfword lf,lh,bc,ec,nw,nh,nd,ni,nl,nk,ne,np; -#line 10932 "btex.w" +#line 10982 "btex.w" eight_bits a,b,c,d; four_quarters qw;scaled sw; int bch_label; @@ -1078,21 +1108,21 @@ int bchar; scaled z; int alpha;int beta; -#line 10940 "btex.w" +#line 10990 "btex.w" /*573:*/ -#line 10976 "btex.w" +#line 11026 "btex.w" /*574:*/ -#line 1013 "htex.ch" +#line 1019 "htex.ch" file_opened= true -#line 10994 "btex.w" +#line 11044 "btex.w" /*:574*/ -#line 10977 "btex.w" +#line 11027 "btex.w" ; /*576:*/ -#line 11016 "btex.w" +#line 11066 "btex.w" {read_sixteen(lf); fget;read_sixteen(lh); @@ -1115,17 +1145,17 @@ if((nw==0)||(nh==0)||(nd==0)||(ni==0))abort; } /*:576*/ -#line 10978 "btex.w" +#line 11028 "btex.w" ; /*577:*/ -#line 11043 "btex.w" +#line 11093 "btex.w" lf= lf-6-lh; if(np<7)lf= lf+7-np; if((font_ptr==font_max)||(fmem_ptr+lf> font_mem_size)) -#line 1029 "htex.ch" +#line 1035 "htex.ch" QUIT("Not enough room left for font %s\n",nom); -#line 11049 "btex.w" +#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; @@ -1137,10 +1167,10 @@ exten_base[f]= kern_base[f]+kern_base_offset+nk; param_base[f]= exten_base[f]+ne /*:577*/ -#line 10979 "btex.w" +#line 11029 "btex.w" ; /*579:*/ -#line 11072 "btex.w" +#line 11122 "btex.w" {if(lh<2)abort; store_four_quarters(font_check[f]); @@ -1158,10 +1188,10 @@ font_size[f]= z; } /*:579*/ -#line 10980 "btex.w" +#line 11030 "btex.w" ; /*580:*/ -#line 11088 "btex.w" +#line 11138 "btex.w" for(k= fmem_ptr;k<=width_base[f]-1;k++) {store_four_quarters(font_info[k].qqqq); @@ -1171,7 +1201,7 @@ switch(c%4){ case lig_tag:if(d>=nl)abort;break; case ext_tag:if(d>=ne)abort;break; case list_tag:/*581:*/ -#line 11109 "btex.w" +#line 11159 "btex.w" {check_byte_range(d); while(d<current_character_being_worked_on) @@ -1184,20 +1214,20 @@ if(d==current_character_being_worked_on)abort; not_found:;} /*:581*/ -#line 11096 "btex.w" +#line 11146 "btex.w" break; default:do_nothing; } } /*:580*/ -#line 10981 "btex.w" +#line 11031 "btex.w" ; /*582:*/ -#line 11144 "btex.w" +#line 11194 "btex.w" {/*583:*/ -#line 11154 "btex.w" +#line 11204 "btex.w" {alpha= 16; while(z>=040000000) @@ -1207,7 +1237,7 @@ beta= 256/alpha;alpha= alpha*z; } /*:583*/ -#line 11145 "btex.w" +#line 11195 "btex.w" ; for(k= width_base[f];k<=lig_kern_base[f]-1;k++) store_scaled(font_info[k].sc); @@ -1218,10 +1248,10 @@ if(font_info[italic_base[f]].sc!=0)abort; } /*:582*/ -#line 10982 "btex.w" +#line 11032 "btex.w" ; /*584:*/ -#line 11168 "btex.w" +#line 11218 "btex.w" bch_label= 077777;bchar= 256; if(nl> 0) @@ -1243,10 +1273,10 @@ for(k= kern_base[f]+kern_base_offset;k<=exten_base[f]-1;k++) store_scaled(font_info[k].sc); /*:584*/ -#line 10983 "btex.w" +#line 11033 "btex.w" ; /*585:*/ -#line 11188 "btex.w" +#line 11238 "btex.w" for(k= exten_base[f];k<=param_base[f]-1;k++) {store_four_quarters(font_info[k].qqqq); @@ -1257,10 +1287,10 @@ check_existence(d); } /*:585*/ -#line 10984 "btex.w" +#line 11034 "btex.w" ; /*586:*/ -#line 11200 "btex.w" +#line 11250 "btex.w" {for(k= 1;k<=np;k++) if(k==1) @@ -1270,22 +1300,22 @@ fget;font_info[param_base[f]].sc= (sw*020)+(fbyte/020); } else store_scaled(font_info[param_base[f]+k-1].sc); -#line 1035 "htex.ch" +#line 1041 "htex.ch" if(hpos>=hend)abort; -#line 11210 "btex.w" +#line 11260 "btex.w" for(k= np+1;k<=7;k++)font_info[param_base[f]+k-1].sc= 0; } /*:586*/ -#line 10985 "btex.w" +#line 11035 "btex.w" ; /*587:*/ -#line 11220 "btex.w" +#line 11270 "btex.w" if(np>=7)font_params[f]= np;else font_params[f]= 7; -#line 1041 "htex.ch" +#line 1047 "htex.ch" hyphen_char[f]= skew_char[f]= -1; -#line 11223 "btex.w" +#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); @@ -1295,31 +1325,31 @@ if(bchar<=ec)if(bchar>=bc) if(char_exists(qw))font_false_bchar[f]= non_char; } font_name[f]= nom; -#line 11233 "btex.w" +#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 1052 "htex.ch" +#line 1058 "htex.ch" fmem_ptr= fmem_ptr+lf;goto done -#line 11238 "btex.w" +#line 11288 "btex.w" /*:587*/ -#line 10986 "btex.w" +#line 11036 "btex.w" -#line 1013 "htex.ch" +#line 1019 "htex.ch" /*:573*/ -#line 10942 "btex.w" +#line 10992 "btex.w" ; -#line 1001 "htex.ch" +#line 1007 "htex.ch" bad_tfm:QUIT("Bad tfm file: %s\n",nom); done:; -#line 10946 "btex.w" +#line 10996 "btex.w" } /*:571*//*593:*/ -#line 1068 "htex.ch" +#line 1074 "htex.ch" pointer new_character(internal_font_number f,eight_bits c) {pointer p; @@ -1330,13 +1360,13 @@ 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 11335 "btex.w" +#line 11385 "btex.w" /*:593*//*662:*/ -#line 1100 "htex.ch" +#line 1110 "htex.ch" pointer hpack(pointer p,scaled w,small_number m) -#line 12916 "btex.w" +#line 12976 "btex.w" { pointer r; pointer q; @@ -1347,13 +1377,13 @@ glue_ord o; internal_font_number f; four_quarters i; eight_bits hd; -#line 1107 "htex.ch" +#line 1117 "htex.ch" r= get_node(box_node_size);type(r)= hlist_node; -#line 12927 "btex.w" +#line 12987 "btex.w" subtype(r)= min_quarterword;shift_amount(r)= 0; q= r+list_offset;link(q)= p; h= 0;/*663:*/ -#line 12942 "btex.w" +#line 13002 "btex.w" d= 0;x= 0; total_stretch[normal]= 0;total_shrink[normal]= 0; @@ -1362,15 +1392,15 @@ total_stretch[fill]= 0;total_shrink[fill]= 0; total_stretch[filll]= 0;total_shrink[filll]= 0 /*:663*/ -#line 12929 "btex.w" +#line 12989 "btex.w" ; while(p!=null)/*664:*/ -#line 12949 "btex.w" +#line 13009 "btex.w" {reswitch:while(is_char_node(p)) /*667:*/ -#line 12992 "btex.w" +#line 13054 "btex.w" {f= font(p);i= char_info(f,character(p));hd= height_depth(i); x= x+char_width(f,i); @@ -1380,13 +1410,14 @@ p= link(p); } /*:667*/ -#line 12953 "btex.w" +#line 13013 "btex.w" ; if(p!=null) {switch(type(p)){ -case hlist_node:case vlist_node:case rule_node:case unset_node: +case hlist_node:case vlist_node:case rule_node: +case unset_node: /*666:*/ -#line 12980 "btex.w" +#line 13042 "btex.w" {x= x+width(p); if(type(p)>=rule_node)s= 0;else s= shift_amount(p); @@ -1395,11 +1426,11 @@ if(depth(p)+s> d)d= depth(p)+s; } /*:666*/ -#line 12957 "btex.w" +#line 13019 "btex.w" break; case ins_node:case mark_node:case adjust_node:if(adjust_tail!=null) /*668:*/ -#line 13007 "btex.w" +#line 13069 "btex.w" {while(link(q)!=p)q= link(q); if(type(p)==adjust_node) @@ -1413,10 +1444,10 @@ link(q)= p;p= q; } /*:668*/ -#line 12959 "btex.w" +#line 13021 "btex.w" break; case whatsit_node:/*1389:*/ -#line 2595 "htex.ch" +#line 2610 "htex.ch" if(subtype(p)==image_node) {glue_ord o; @@ -1425,13 +1456,13 @@ 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 24777 "btex.w" +#line 24914 "btex.w" /*:1389*/ -#line 12960 "btex.w" +#line 13022 "btex.w" ;break; case glue_node:/*669:*/ -#line 13019 "btex.w" +#line 13081 "btex.w" {g= glue_ptr(p);x= x+width(g); o= stretch_order(g);total_stretch[o]= total_stretch[o]+stretch(g); @@ -1444,18 +1475,18 @@ if(depth(g)> d)d= depth(g); } /*:669*/ -#line 12961 "btex.w" +#line 13023 "btex.w" break; case kern_node:case math_node:x= x+width(p);break; case ligature_node:/*665:*/ -#line 12971 "btex.w" +#line 13033 "btex.w" {mem[lig_trick]= mem[lig_char(p)];link(lig_trick)= link(p); p= lig_trick;goto reswitch; } /*:665*/ -#line 12963 "btex.w" +#line 13025 "btex.w" default:do_nothing; } @@ -1465,12 +1496,12 @@ p= link(p); /*:664*/ -#line 12932 "btex.w" +#line 12992 "btex.w" ; if(adjust_tail!=null)link(adjust_tail)= null; height(r)= h;depth(r)= d; /*670:*/ -#line 13033 "btex.w" +#line 13095 "btex.w" if(m==additional)w= x+w; width(r)= w;x= w-x; @@ -1480,10 +1511,10 @@ set_glue_ratio_zero(glue_set(r)); goto end; } else if(x> 0)/*671:*/ -#line 13045 "btex.w" +#line 13108 "btex.w" {/*672:*/ -#line 13059 "btex.w" +#line 13122 "btex.w" if(total_stretch[filll]!=0)o= filll; else if(total_stretch[fill]!=0)o= fill; @@ -1491,7 +1522,7 @@ else if(total_stretch[fil]!=0)o= fil; else o= normal /*:672*/ -#line 13046 "btex.w" +#line 13109 "btex.w" ; glue_order(r)= o;glue_sign(r)= stretching; if(total_stretch[o]!=0)glue_set(r)= unfloat(x/(double)total_stretch[o]); @@ -1499,18 +1530,18 @@ 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 13056 "btex.w" +#line 13119 "btex.w" goto end; } /*:671*/ -#line 13042 "btex.w" +#line 13104 "btex.w" else/*677:*/ -#line 13104 "btex.w" +#line 13167 "btex.w" {/*678:*/ -#line 13123 "btex.w" +#line 13187 "btex.w" if(total_shrink[filll]!=0)o= filll; else if(total_shrink[fill]!=0)o= fill; @@ -1518,7 +1549,7 @@ else if(total_shrink[fil]!=0)o= fil; else o= normal /*:678*/ -#line 13105 "btex.w" +#line 13168 "btex.w" ; glue_order(r)= o;glue_sign(r)= shrinking; if(total_shrink[o]!=0)glue_set(r)= unfloat((-x)/(double)total_shrink[o]); @@ -1527,41 +1558,41 @@ else{glue_sign(r)= normal; set_glue_ratio_zero(glue_set(r)); } if((total_shrink[o]<-x)&&(o==normal)&&(list_ptr(r)!=null)) -#line 1132 "htex.ch" +#line 1143 "htex.ch" set_glue_ratio_one(glue_set(r)); -#line 13120 "btex.w" +#line 13184 "btex.w" goto end; } /*:677*/ -#line 13043 "btex.w" +#line 13106 "btex.w" /*:670*/ -#line 12936 "btex.w" +#line 12996 "btex.w" ; -#line 12939 "btex.w" +#line 12999 "btex.w" end:return r; } /*:662*//*682:*/ -#line 1142 "htex.ch" +#line 1153 "htex.ch" pointer vpackage(pointer p,scaled h,small_number m,scaled l) -#line 13162 "btex.w" +#line 13226 "btex.w" { pointer r; scaled w,d,x; scaled s; pointer g; glue_ord o; -#line 1149 "htex.ch" +#line 1160 "htex.ch" r= get_node(box_node_size);type(r)= vlist_node; -#line 13169 "btex.w" +#line 13233 "btex.w" subtype(r)= min_quarterword;shift_amount(r)= 0; list_ptr(r)= p; w= 0;/*663:*/ -#line 12942 "btex.w" +#line 13002 "btex.w" d= 0;x= 0; total_stretch[normal]= 0;total_shrink[normal]= 0; @@ -1570,17 +1601,18 @@ total_stretch[fill]= 0;total_shrink[fill]= 0; total_stretch[filll]= 0;total_shrink[filll]= 0 /*:663*/ -#line 13171 "btex.w" +#line 13235 "btex.w" ; while(p!=null)/*683:*/ -#line 13186 "btex.w" +#line 13250 "btex.w" {if(is_char_node(p))confusion("vpack"); else switch(type(p)){ -case hlist_node:case vlist_node:case rule_node:case unset_node: +case hlist_node:case vlist_node:case rule_node: +case unset_node: /*684:*/ -#line 13201 "btex.w" +#line 13267 "btex.w" {x= x+d+height(p);d= depth(p); if(type(p)>=rule_node)s= 0;else s= shift_amount(p); @@ -1588,10 +1620,10 @@ if(width(p)+s> w)w= width(p)+s; } /*:684*/ -#line 13191 "btex.w" +#line 13257 "btex.w" break; case whatsit_node:/*1388:*/ -#line 2582 "htex.ch" +#line 2597 "htex.ch" if(subtype(p)==image_node) {glue_ord o; @@ -1600,14 +1632,14 @@ 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 24775 "btex.w" +#line 24912 "btex.w" -#line 2595 "htex.ch" +#line 2610 "htex.ch" /*:1388*/ -#line 13192 "btex.w" +#line 13258 "btex.w" ;break; case glue_node:/*685:*/ -#line 13207 "btex.w" +#line 13273 "btex.w" {x= x+d;d= 0; g= glue_ptr(p);x= x+width(g); @@ -1620,7 +1652,7 @@ if(width(g)> w)w= width(g); } /*:685*/ -#line 13193 "btex.w" +#line 13259 "btex.w" break; case kern_node:{x= x+d+width(p);d= 0; }break; @@ -1630,7 +1662,7 @@ p= link(p); } /*:683*/ -#line 13173 "btex.w" +#line 13237 "btex.w" ; width(r)= w; if(d> l) @@ -1638,7 +1670,7 @@ if(d> l) } else depth(r)= d; /*686:*/ -#line 13221 "btex.w" +#line 13287 "btex.w" if(m==additional)h= x+h; height(r)= h;x= h-x; @@ -1648,10 +1680,10 @@ set_glue_ratio_zero(glue_set(r)); goto end; } else if(x> 0)/*687:*/ -#line 13233 "btex.w" +#line 13300 "btex.w" {/*672:*/ -#line 13059 "btex.w" +#line 13122 "btex.w" if(total_stretch[filll]!=0)o= filll; else if(total_stretch[fill]!=0)o= fill; @@ -1659,7 +1691,7 @@ else if(total_stretch[fil]!=0)o= fil; else o= normal /*:672*/ -#line 13234 "btex.w" +#line 13301 "btex.w" ; glue_order(r)= o;glue_sign(r)= stretching; if(total_stretch[o]!=0)glue_set(r)= unfloat(x/(double)total_stretch[o]); @@ -1667,18 +1699,18 @@ 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 13244 "btex.w" +#line 13311 "btex.w" goto end; } /*:687*/ -#line 13230 "btex.w" +#line 13296 "btex.w" else/*690:*/ -#line 13272 "btex.w" +#line 13339 "btex.w" {/*678:*/ -#line 13123 "btex.w" +#line 13187 "btex.w" if(total_shrink[filll]!=0)o= filll; else if(total_shrink[fill]!=0)o= fill; @@ -1686,7 +1718,7 @@ else if(total_shrink[fil]!=0)o= fil; else o= normal /*:678*/ -#line 13273 "btex.w" +#line 13340 "btex.w" ; glue_order(r)= o;glue_sign(r)= shrinking; if(total_shrink[o]!=0)glue_set(r)= unfloat((-x)/(double)total_shrink[o]); @@ -1695,64 +1727,64 @@ else{glue_sign(r)= normal; set_glue_ratio_zero(glue_set(r)); } if((total_shrink[o]<-x)&&(o==normal)&&(list_ptr(r)!=null)) -#line 1174 "htex.ch" +#line 1186 "htex.ch" set_glue_ratio_one(glue_set(r)); -#line 13288 "btex.w" +#line 13356 "btex.w" goto end; } /*:690*/ -#line 13231 "btex.w" +#line 13298 "btex.w" /*:686*/ -#line 13180 "btex.w" +#line 13244 "btex.w" ; -#line 13183 "btex.w" +#line 13247 "btex.w" end:return r; } /*:682*//*830:*/ -#line 1217 "htex.ch" +#line 1229 "htex.ch" /*693:*/ -#line 1180 "htex.ch" +#line 1192 "htex.ch" extern pointer happend_to_vlist(pointer b); void append_to_vlist(pointer b,uint32_t offset) -#line 13312 "btex.w" +#line 13380 "btex.w" {scaled d; pointer p; if(prev_depth> ignore_depth) {d= width(baseline_skip)-prev_depth-height(b); -#line 1191 "htex.ch" +#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 13320 "btex.w" +#line 13388 "btex.w" link(tail)= p;tail= p; } link(tail)= b;tail= b;prev_depth= depth(b); } /*:693*//*844:*/ -#line 16265 "btex.w" +#line 16351 "btex.w" static pointer finite_shrink(pointer p) {pointer q; -#line 1297 "htex.ch" +#line 1309 "htex.ch" QUIT("Infinite glue shrinkage found in a paragraph"); -#line 16287 "btex.w" +#line 16373 "btex.w" q= new_spec(p);shrink_order(q)= normal; delete_glue_ref(p);return q; } /*:844*//*848:*/ -#line 16345 "btex.w" +#line 16431 "btex.w" static void try_break(int pi,small_number break_type) { @@ -1761,7 +1793,7 @@ pointer prev_r; halfword old_l; bool no_break_yet; /*849:*/ -#line 16373 "btex.w" +#line 16459 "btex.w" pointer prev_prev_r; pointer s; @@ -1782,23 +1814,23 @@ pointer save_link; scaled shortfall; /*:849*/ -#line 16352 "btex.w" +#line 16438 "btex.w" /*850:*/ -#line 16392 "btex.w" +#line 16478 "btex.w" if(abs(pi)>=inf_penalty) if(pi> 0)goto end; else pi= eject_penalty /*:850*/ -#line 16353 "btex.w" +#line 16439 "btex.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 16402 "btex.w" +#line 16488 "btex.w" if(type(r)==delta_node) @@ -1807,10 +1839,10 @@ prev_prev_r= prev_r;prev_r= r;goto resume; } /*:851*/ -#line 16358 "btex.w" +#line 16444 "btex.w" ; /*855:*/ -#line 16447 "btex.w" +#line 16536 "btex.w" {l= line_number(r); if(l> old_l) @@ -1818,22 +1850,22 @@ if(l> old_l) if((minimum_demerits<awful_bad)&& ((old_l!=easy_line)||(r==last_active))) /*856:*/ -#line 16465 "btex.w" +#line 16554 "btex.w" {if(no_break_yet)/*857:*/ -#line 16501 "btex.w" +#line 16590 "btex.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 16544 "btex.w" +#line 16633 "btex.w" {t= replace_count(cur_p);v= cur_p;s= post_break(cur_p); while(t> 0) {decr(t);v= link(v); /*862:*/ -#line 16562 "btex.w" +#line 16651 "btex.w" if(is_char_node(v)) {f= font(v); @@ -1844,19 +1876,20 @@ case ligature_node:{f= font(lig_char(v)); break_width[1]= break_width[1]- char_width(f,char_info(f,character(lig_char(v)))); }break; -case hlist_node:case vlist_node:case rule_node:case kern_node: +case hlist_node:case vlist_node:case rule_node: +case kern_node: break_width[1]= break_width[1]-width(v);break; default:confusion("disc1"); } /*:862*/ -#line 16548 "btex.w" +#line 16637 "btex.w" ; } while(s!=null) {/*863:*/ -#line 16578 "btex.w" +#line 16668 "btex.w" if(is_char_node(s)) {f= font(s); @@ -1867,14 +1900,15 @@ case ligature_node:{f= font(lig_char(s)); break_width[1]= break_width[1]+ char_width(f,char_info(f,character(lig_char(s)))); }break; -case hlist_node:case vlist_node:case rule_node:case kern_node: +case hlist_node:case vlist_node:case rule_node: +case kern_node: break_width[1]= break_width[1]+width(s);break; default:confusion("disc2"); } /*:863*/ -#line 16551 "btex.w" +#line 16640 "btex.w" ; s= link(s); } @@ -1884,13 +1918,13 @@ if(post_break(cur_p)==null)s= link(v); } /*:861*/ -#line 16505 "btex.w" +#line 16594 "btex.w" ; while(s!=null) {if(is_char_node(s))goto done; switch(type(s)){ case glue_node:/*858:*/ -#line 16520 "btex.w" +#line 16609 "btex.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); @@ -1898,7 +1932,7 @@ break_width[6]= break_width[6]-shrink(v); } /*:858*/ -#line 16509 "btex.w" +#line 16598 "btex.w" break; case penalty_node:do_nothing;break; case math_node:break_width[1]= break_width[1]-width(s);break; @@ -1911,10 +1945,10 @@ s= link(s); done:;} /*:857*/ -#line 16466 "btex.w" +#line 16555 "btex.w" ; /*864:*/ -#line 16603 "btex.w" +#line 16694 "btex.w" if(type(prev_r)==delta_node) {do_all_six(convert_to_break_width); @@ -1929,7 +1963,7 @@ link(prev_r)= q;prev_prev_r= prev_r;prev_r= q; } /*:864*/ -#line 16467 "btex.w" +#line 16556 "btex.w" ; if(abs(adj_demerits)>=awful_bad-minimum_demerits) minimum_demerits= awful_bad-1; @@ -1937,7 +1971,7 @@ 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 16633 "btex.w" +#line 16724 "btex.w" {q= get_node(passive_node_size); link(q)= passive;passive= q;cur_break(q)= cur_p; @@ -1954,7 +1988,7 @@ link(q)= r;link(prev_r)= q;prev_r= q; #ifdef STAT if(tracing_paragraphs> 0) /*867:*/ -#line 16653 "btex.w" +#line 16744 "btex.w" {print_nl("@@");print_int(serial(passive)); @@ -1968,20 +2002,20 @@ else print_int(serial(prev_break(passive))); } /*:867*/ -#line 16648 "btex.w" +#line 16739 "btex.w" ; #endif } /*:866*/ -#line 16473 "btex.w" +#line 16562 "btex.w" ; minimal_demerits[fit_class]= awful_bad; } minimum_demerits= awful_bad; /*865:*/ -#line 16622 "btex.w" +#line 16713 "btex.w" if(r!=last_active) {q= get_node(delta_node_size);link(q)= r;type(q)= delta_node; @@ -1991,16 +2025,16 @@ link(prev_r)= q;prev_prev_r= prev_r;prev_r= q; } /*:865*/ -#line 16477 "btex.w" +#line 16566 "btex.w" ; } /*:856*/ -#line 16453 "btex.w" +#line 16542 "btex.w" ; if(r==last_active)goto end; /*872:*/ -#line 16729 "btex.w" +#line 16820 "btex.w" if(l> easy_line) {line_width= second_width;old_l= max_halfword-1; @@ -2012,23 +2046,23 @@ else line_width= mem[par_shape_ptr+2*l].sc; } /*:872*/ -#line 16455 "btex.w" +#line 16544 "btex.w" ; } } /*:855*/ -#line 16361 "btex.w" +#line 16447 "btex.w" ; /*873:*/ -#line 16749 "btex.w" +#line 16840 "btex.w" {artificial_demerits= false; shortfall= line_width-cur_active_width[1]; if(shortfall> 0) /*874:*/ -#line 16779 "btex.w" +#line 16870 "btex.w" if((cur_active_width[3]!=0)||(cur_active_width[4]!=0)|| (cur_active_width[5]!=0)) @@ -2046,10 +2080,10 @@ done1:; } /*:874*/ -#line 16755 "btex.w" +#line 16846 "btex.w" else/*875:*/ -#line 16798 "btex.w" +#line 16889 "btex.w" {if(-shortfall> cur_active_width[6])b= inf_bad+1; else b= badness(-shortfall,cur_active_width[6]); @@ -2057,11 +2091,11 @@ if(b> 12)fit_class= tight_fit;else fit_class= decent_fit; } /*:875*/ -#line 16757 "btex.w" +#line 16848 "btex.w" ; if((b> inf_bad)||(pi==eject_penalty)) /*876:*/ -#line 16813 "btex.w" +#line 16904 "btex.w" {if(final_pass&&(minimum_demerits==awful_bad)&& (link(r)==last_active)&& @@ -2072,18 +2106,18 @@ node_r_stays_active= false; } /*:876*/ -#line 16760 "btex.w" +#line 16851 "btex.w" else{prev_r= r; if(b> threshold)goto resume; node_r_stays_active= true; } /*877:*/ -#line 16829 "btex.w" +#line 16920 "btex.w" if(artificial_demerits)d= 0; else/*881:*/ -#line 16890 "btex.w" +#line 16981 "btex.w" {d= line_penalty+b; if(abs(d)>=10000)d= 100000000;else d= d*d; @@ -2097,16 +2131,16 @@ if(abs(fit_class-fitness(r))> 1)d= d+adj_demerits; } /*:881*/ -#line 16831 "btex.w" +#line 16922 "btex.w" ; #ifdef STAT if(tracing_paragraphs> 0) /*878:*/ -#line 16845 "btex.w" +#line 16936 "btex.w" {if(printed_node!=cur_p) /*879:*/ -#line 16867 "btex.w" +#line 16958 "btex.w" {print_nl(""); if(cur_p==null)short_display(link(printed_node)); @@ -2118,7 +2152,7 @@ printed_node= cur_p; } /*:879*/ -#line 16847 "btex.w" +#line 16938 "btex.w" ; print_nl("@"); @@ -2140,7 +2174,7 @@ if(artificial_demerits)print_char('*');else print_int(d); } /*:878*/ -#line 16834 "btex.w" +#line 16925 "btex.w" ; #endif @@ -2153,15 +2187,15 @@ if(d<minimum_demerits)minimum_demerits= d; } /*:877*/ -#line 16765 "btex.w" +#line 16856 "btex.w" ; if(node_r_stays_active)goto resume; deactivate:/*882:*/ -#line 16912 "btex.w" +#line 17003 "btex.w" link(prev_r)= link(r);free_node(r,active_node_size); if(prev_r==active)/*883:*/ -#line 16937 "btex.w" +#line 17028 "btex.w" {r= link(active); if(type(r)==delta_node) @@ -2172,7 +2206,7 @@ link(active)= link(r);free_node(r,delta_node_size); } /*:883*/ -#line 16915 "btex.w" +#line 17006 "btex.w" else if(type(prev_r)==delta_node) {r= link(prev_r); @@ -2189,18 +2223,18 @@ link(prev_r)= link(r);free_node(r,delta_node_size); } /*:882*/ -#line 16767 "btex.w" +#line 16858 "btex.w" ; } /*:873*/ -#line 16364 "btex.w" +#line 16450 "btex.w" ; } end:; #ifdef STAT /*880:*/ -#line 16882 "btex.w" +#line 16973 "btex.w" if(cur_p==printed_node)if(cur_p!=null)if(type(cur_p)==disc_node) {t= replace_count(cur_p); @@ -2210,41 +2244,41 @@ while(t> 0) } /*:880*/ -#line 16368 "btex.w" +#line 16454 "btex.w" ; #endif } /*:848*//*900:*/ -#line 17262 "btex.w" +#line 17357 "btex.w" static void post_line_break(int final_widow_penalty) { pointer q,r,s; bool disc_break; -#line 1437 "htex.ch" +#line 1451 "htex.ch" bool post_disc_break; bool first_line= true; uint32_t line_offset,next_offset; -#line 17268 "btex.w" +#line 17363 "btex.w" scaled cur_width; scaled cur_indent; quarterword t; int pen; halfword cur_line; /*901:*/ -#line 17293 "btex.w" +#line 17389 "btex.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 17273 "btex.w" +#line 17369 "btex.w" ; cur_line= prev_graf+1; -#line 1446 "htex.ch" +#line 1460 "htex.ch" next_offset= hposition(link(temp_head)); if(next_offset> node_pos) next_offset= next_offset-node_pos; @@ -2263,10 +2297,10 @@ else next_offset= 0; } /*903:*/ -#line 17330 "btex.w" +#line 17426 "btex.w" /*904:*/ -#line 17342 "btex.w" +#line 17438 "btex.w" q= cur_break(cur_p);disc_break= false;post_disc_break= false; if(q!=null) @@ -2278,7 +2312,7 @@ goto done; } else{if(type(q)==disc_node) /*905:*/ -#line 1476 "htex.ch" +#line 1491 "htex.ch" {pointer pre_q= pre_break(q); pointer post_q= post_break(q); @@ -2287,7 +2321,7 @@ type(q)= whatsit_node; subtype(q)= ignore_node; ignore_info(q)= 1; /*906:*/ -#line 1508 "htex.ch" +#line 1523 "htex.ch" if(t==0){ignore_list(q)= null;r= link(q);} else{r= q; @@ -2298,10 +2332,10 @@ s= link(r); r= link(s);link(s)= null; ignore_list(q)= link(q); } -#line 17379 "btex.w" +#line 17476 "btex.w" /*:906*/ -#line 1483 "htex.ch" +#line 1498 "htex.ch" ; s= get_node(ignore_node_size); type(s)= whatsit_node; @@ -2310,36 +2344,36 @@ ignore_info(s)= 0; ignore_list(s)= null; link(s)= r;r= s; if(post_q!=null)/*907:*/ -#line 1527 "htex.ch" +#line 1542 "htex.ch" {s= post_q; while(link(s)!=null)s= link(s); link(s)= r;r= post_q;post_disc_break= true; } -#line 17388 "btex.w" +#line 17485 "btex.w" /*:907*/ -#line 1490 "htex.ch" +#line 1505 "htex.ch" ; if(pre_q!=null)/*908:*/ -#line 1541 "htex.ch" +#line 1556 "htex.ch" {s= pre_q;link(q)= s; while(link(s)!=null)s= link(s); q= s; } -#line 17397 "btex.w" +#line 17494 "btex.w" /*:908*/ -#line 1491 "htex.ch" +#line 1506 "htex.ch" ; link(q)= r;disc_break= true; } -#line 17368 "btex.w" +#line 17465 "btex.w" -#line 1508 "htex.ch" +#line 1523 "htex.ch" /*:905*/ -#line 17352 "btex.w" +#line 17448 "btex.w" else if((type(q)==math_node)||(type(q)==kern_node))width(q)= 0; } @@ -2347,37 +2381,37 @@ else{q= temp_head; while(link(q)!=null)q= link(q); } /*909:*/ -#line 17398 "btex.w" +#line 17495 "btex.w" -#line 1551 "htex.ch" +#line 1566 "htex.ch" r= new_glue(right_skip);link(r)= link(q);link(q)= r;q= r -#line 17400 "btex.w" +#line 17497 "btex.w" /*:909*/ -#line 17358 "btex.w" +#line 17454 "btex.w" ; done: -#line 1476 "htex.ch" +#line 1491 "htex.ch" /*:904*/ -#line 17332 "btex.w" +#line 17428 "btex.w" ; /*910:*/ -#line 17405 "btex.w" +#line 17502 "btex.w" r= link(q);link(q)= null;q= link(temp_head);link(temp_head)= r; if(left_skip!=zero_glue) -#line 1557 "htex.ch" +#line 1572 "htex.ch" {r= new_glue(left_skip); -#line 17409 "btex.w" +#line 17506 "btex.w" link(r)= q;q= r; } /*:910*/ -#line 17333 "btex.w" +#line 17429 "btex.w" ; /*912:*/ -#line 17424 "btex.w" +#line 17521 "btex.w" if(cur_line> last_special_line) {cur_width= second_width;cur_indent= second_indent; @@ -2392,12 +2426,12 @@ adjust_tail= adjust_head;just_box= hpack(q,cur_width,exactly); shift_amount(just_box)= cur_indent /*:912*/ -#line 17334 "btex.w" +#line 17430 "btex.w" ; /*911:*/ -#line 17412 "btex.w" +#line 17509 "btex.w" -#line 1563 "htex.ch" +#line 1578 "htex.ch" if(first_line) {pointer p= happend_to_vlist(just_box); uint32_t pos= hposition(p); @@ -2406,17 +2440,17 @@ first_line= false; } else append_to_vlist(just_box,line_offset); -#line 17414 "btex.w" +#line 17511 "btex.w" if(adjust_head!=adjust_tail) {link(tail)= link(adjust_head);tail= adjust_tail; } adjust_tail= null /*:911*/ -#line 17336 "btex.w" +#line 17432 "btex.w" ; /*913:*/ -#line 17444 "btex.w" +#line 17541 "btex.w" if(cur_line+1!=best_line) {pen= inter_line_penalty; @@ -2424,25 +2458,25 @@ 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 1576 "htex.ch" +#line 1591 "htex.ch" {r= new_penalty(pen);store_map(r,node_pos,next_offset); -#line 17452 "btex.w" +#line 17549 "btex.w" link(tail)= r;tail= r; } } /*:913*/ -#line 17337 "btex.w" +#line 17433 "btex.w" /*:903*/ -#line 1464 "htex.ch" +#line 1478 "htex.ch" ; -#line 17277 "btex.w" +#line 17373 "btex.w" incr(cur_line);cur_p= next_break(cur_p); if(cur_p!=null)if(!post_disc_break) /*902:*/ -#line 17305 "btex.w" +#line 17401 "btex.w" {r= temp_head; loop{q= link(r); @@ -2461,7 +2495,7 @@ link(temp_head)= q; } /*:902*/ -#line 17279 "btex.w" +#line 17375 "btex.w" ; }while(!(cur_p==null)); if((cur_line!=best_line)||(link(temp_head)!=null)) @@ -2471,52 +2505,52 @@ prev_graf= best_line-1; } /*:900*//*918:*/ -#line 17558 "btex.w" +#line 17655 "btex.w" -#line 1588 "htex.ch" +#line 1603 "htex.ch" /*:918*//*966:*/ -#line 18371 "btex.w" +#line 18478 "btex.w" #ifdef INIT -#line 18374 "btex.w" +#line 18481 "btex.w" #endif /*:966*/ -#line 1219 "htex.ch" +#line 1231 "htex.ch" void line_break(int final_widow_penalty,pointer par_ptr) {scaled x= cur_list.hs_field; -#line 16034 "btex.w" +#line 16119 "btex.w" /*884:*/ -#line 16966 "btex.w" +#line 17057 "btex.w" bool auto_breaking; pointer prev_p; -#line 1366 "htex.ch" +#line 1380 "htex.ch" pointer q,r,s; -#line 16970 "btex.w" +#line 17061 "btex.w" internal_font_number f; /*:884*//*916:*/ -#line 17539 "btex.w" +#line 17636 "btex.w" -#line 17542 "btex.w" +#line 17639 "btex.w" /*:916*/ -#line 16034 "btex.w" +#line 16119 "btex.w" -#line 1228 "htex.ch" +#line 1240 "htex.ch" set_line_break_params(); -#line 16036 "btex.w" +#line 16121 "btex.w" /*831:*/ -#line 1251 "htex.ch" +#line 1263 "htex.ch" link(temp_head)= par_ptr; -#line 16067 "btex.w" +#line 16152 "btex.w" /*:831*//*845:*/ -#line 16291 "btex.w" +#line 16377 "btex.w" no_shrink_error_yet= true; check_shrinkage(left_skip);check_shrinkage(right_skip); @@ -2527,7 +2561,7 @@ background[2+stretch_order(r)]= background[2+stretch_order(r)]+stretch(r); background[6]= shrink(q)+shrink(r); /*:845*//*854:*/ -#line 16433 "btex.w" +#line 16522 "btex.w" minimum_demerits= awful_bad; minimal_demerits[tight_fit]= awful_bad; @@ -2536,59 +2570,59 @@ minimal_demerits[loose_fit]= awful_bad; minimal_demerits[very_loose_fit]= awful_bad; /*:854*//*870:*/ -#line 16694 "btex.w" +#line 16785 "btex.w" if(par_shape_ptr==null) if(hang_indent==0) -#line 1333 "htex.ch" +#line 1347 "htex.ch" {last_special_line= 0;second_width= x; -#line 16698 "btex.w" +#line 16789 "btex.w" second_indent= 0; } else/*871:*/ -#line 16708 "btex.w" +#line 16799 "btex.w" {last_special_line= abs(hang_after); if(hang_after<0) -#line 1348 "htex.ch" +#line 1362 "htex.ch" {first_width= x-abs(hang_indent); -#line 16712 "btex.w" +#line 16803 "btex.w" if(hang_indent>=0)first_indent= hang_indent; else first_indent= 0; -#line 1357 "htex.ch" +#line 1371 "htex.ch" second_width= x;second_indent= 0; } else{first_width= x;first_indent= 0; second_width= x-abs(hang_indent); -#line 16718 "btex.w" +#line 16809 "btex.w" if(hang_indent>=0)second_indent= hang_indent; else second_indent= 0; } } /*:871*/ -#line 16700 "btex.w" +#line 16791 "btex.w" -#line 1342 "htex.ch" +#line 1356 "htex.ch" else QUIT("parshape not yet implemented"); -#line 16705 "btex.w" +#line 16796 "btex.w" if(looseness==0)easy_line= last_special_line; else easy_line= max_halfword /*:870*/ -#line 16036 "btex.w" +#line 16121 "btex.w" ; /*885:*/ -#line 16976 "btex.w" +#line 17067 "btex.w" threshold= pretolerance; if(threshold>=0) { #ifdef STAT -#line 1373 "htex.ch" +#line 1387 "htex.ch" if(tracing_paragraphs> 0) {print_nl("@firstpass");} -#line 16983 "btex.w" +#line 17074 "btex.w" #endif second_pass= false;final_pass= false; @@ -2596,14 +2630,14 @@ second_pass= false;final_pass= false; else{threshold= tolerance;second_pass= true; final_pass= (emergency_stretch<=0); #ifdef STAT -#line 16991 "btex.w" +#line 17082 "btex.w" #endif } loop{if(threshold> inf_bad)threshold= inf_bad; -#line 16996 "btex.w" +#line 17087 "btex.w" /*886:*/ -#line 17034 "btex.w" +#line 17125 "btex.w" q= get_node(active_node_size); type(q)= unhyphenated;fitness(q)= decent_fit; @@ -2611,20 +2645,20 @@ 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 17042 "btex.w" +#line 17133 "btex.w" /*:886*/ -#line 16996 "btex.w" +#line 17087 "btex.w" ; cur_p= link(temp_head);auto_breaking= true; prev_p= cur_p; while((cur_p!=null)&&(link(active)!=last_active)) /*888:*/ -#line 17070 "btex.w" +#line 17161 "btex.w" {if(is_char_node(cur_p)) /*889:*/ -#line 17104 "btex.w" +#line 17197 "btex.w" {prev_p= cur_p; do{f= font(cur_p); @@ -2634,20 +2668,20 @@ cur_p= link(cur_p); } /*:889*/ -#line 17072 "btex.w" +#line 17163 "btex.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 24783 "btex.w" +#line 24920 "btex.w" adv_past(cur_p) /*:1391*/ -#line 17075 "btex.w" +#line 17167 "btex.w" break; case glue_node:{/*890:*/ -#line 17115 "btex.w" +#line 17208 "btex.w" if(auto_breaking) {if(is_char_node(prev_p))try_break(0,unhyphenated); @@ -2662,9 +2696,9 @@ active_width[2+stretch_order(q)]+stretch(q); active_width[6]= active_width[6]+shrink(q) /*:890*/ -#line 17077 "btex.w" +#line 17169 "btex.w" ; -#line 17080 "btex.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; @@ -2672,15 +2706,15 @@ 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 17131 "btex.w" +#line 17224 "btex.w" -#line 1416 "htex.ch" +#line 1430 "htex.ch" {if(!is_auto_disc(cur_p)||second_pass||final_pass) {s= pre_break(cur_p);disc_width= 0; -#line 17133 "btex.w" +#line 17226 "btex.w" if(s==null)try_break(ex_hyphen_penalty,hyphenated); else{do{/*892:*/ -#line 17149 "btex.w" +#line 17242 "btex.w" if(is_char_node(s)) {f= font(s); @@ -2691,14 +2725,15 @@ case ligature_node:{f= font(lig_char(s)); disc_width= disc_width+ char_width(f,char_info(f,character(lig_char(s)))); }break; -case hlist_node:case vlist_node:case rule_node:case kern_node: +case hlist_node:case vlist_node:case rule_node: +case kern_node: disc_width= disc_width+width(s);break; default:confusion("disc3"); } /*:892*/ -#line 17134 "btex.w" +#line 17227 "btex.w" ; s= link(s); }while(!(s==null)); @@ -2706,13 +2741,13 @@ act_width= act_width+disc_width; try_break(hyphen_penalty,hyphenated); act_width= act_width-disc_width; } -#line 1423 "htex.ch" +#line 1437 "htex.ch" } r= replace_count(cur_p);s= link(cur_p); -#line 17142 "btex.w" +#line 17235 "btex.w" while(r> 0) {/*893:*/ -#line 17165 "btex.w" +#line 17259 "btex.w" if(is_char_node(s)) {f= font(s); @@ -2723,14 +2758,15 @@ case ligature_node:{f= font(lig_char(s)); act_width= act_width+ char_width(f,char_info(f,character(lig_char(s)))); }break; -case hlist_node:case vlist_node:case rule_node:case kern_node: +case hlist_node:case vlist_node:case rule_node: +case kern_node: act_width= act_width+width(s);break; default:confusion("disc4"); } /*:893*/ -#line 17143 "btex.w" +#line 17236 "btex.w" ; decr(r);s= link(s); } @@ -2738,7 +2774,7 @@ prev_p= cur_p;cur_p= s;goto done5; } /*:891*/ -#line 17086 "btex.w" +#line 17179 "btex.w" case math_node:{auto_breaking= (subtype(cur_p)==after);kern_break; }break; @@ -2751,16 +2787,16 @@ prev_p= cur_p;cur_p= link(cur_p); done5:;} /*:888*/ -#line 17002 "btex.w" +#line 17093 "btex.w" ; if(cur_p==null) /*896:*/ -#line 17200 "btex.w" +#line 17295 "btex.w" {try_break(eject_penalty,hyphenated); if(link(active)!=last_active) {/*897:*/ -#line 17210 "btex.w" +#line 17305 "btex.w" r= link(active);fewest_demerits= awful_bad; do{if(type(r)!=delta_node)if(total_demerits(r)<fewest_demerits) @@ -2771,11 +2807,11 @@ r= link(r); best_line= line_number(best_bet) /*:897*/ -#line 17203 "btex.w" +#line 17298 "btex.w" ; if(looseness==0)goto done; /*898:*/ -#line 17224 "btex.w" +#line 17319 "btex.w" {r= link(active);actual_looseness= 0; do{if(type(r)!=delta_node) @@ -2796,17 +2832,17 @@ best_line= line_number(best_bet); } /*:898*/ -#line 17205 "btex.w" +#line 17300 "btex.w" ; if((actual_looseness==looseness)||final_pass)goto done; } } /*:896*/ -#line 17005 "btex.w" +#line 17096 "btex.w" ; /*887:*/ -#line 17043 "btex.w" +#line 17134 "btex.w" q= link(active); while(q!=last_active) @@ -2823,7 +2859,7 @@ q= cur_p; } /*:887*/ -#line 17006 "btex.w" +#line 17097 "btex.w" ; if(!second_pass) { @@ -2834,32 +2870,32 @@ threshold= tolerance;second_pass= true;final_pass= (emergency_stretch<=0); } else{ #ifdef STAT -#line 1391 "htex.ch" +#line 1405 "htex.ch" if(tracing_paragraphs> 0) print_nl("@emergencypass"); -#line 17018 "btex.w" +#line 17109 "btex.w" #endif background[2]= background[2]+emergency_stretch;final_pass= true; } } done: #ifdef STAT -#line 17027 "btex.w" +#line 17118 "btex.w" #endif /*:885*/ -#line 16037 "btex.w" +#line 16122 "btex.w" ; /*899:*/ -#line 17248 "btex.w" +#line 17343 "btex.w" post_line_break(final_widow_penalty) /*:899*/ -#line 16039 "btex.w" +#line 16124 "btex.w" ; /*887:*/ -#line 17043 "btex.w" +#line 17134 "btex.w" q= link(active); while(q!=last_active) @@ -2876,33 +2912,33 @@ q= cur_p; } /*:887*/ -#line 16040 "btex.w" +#line 16125 "btex.w" ; -#line 1234 "htex.ch" +#line 1246 "htex.ch" hrestore_param_list(); -#line 16042 "btex.w" +#line 16127 "btex.w" } /*:830*//*992:*/ -#line 1600 "htex.ch" +#line 1615 "htex.ch" #define ensure_vbox(N) static pointer prune_page_top(pointer p) -#line 18869 "btex.w" +#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 18887 "btex.w" +#line 18999 "btex.w" -#line 1610 "htex.ch" +#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 18889 "btex.w" +#line 19001 "btex.w" if(width(temp_ptr)> height(p))width(temp_ptr)= width(temp_ptr)-height(p); else width(temp_ptr)= 0; @@ -2910,7 +2946,7 @@ p= null; } /*:993*/ -#line 18875 "btex.w" +#line 18987 "btex.w" break; case whatsit_node:case mark_node:case ins_node:{prev_p= p;p= link(prev_p); }break; @@ -2924,10 +2960,10 @@ return link(temp_head); } /*:992*//*994:*/ -#line 1617 "htex.ch" +#line 1632 "htex.ch" static pointer vert_break(pointer p,scaled h,scaled d) -#line 18912 "btex.w" +#line 19024 "btex.w" { pointer prev_p; @@ -2942,11 +2978,11 @@ small_number t; prev_p= p; least_cost= awful_bad;do_all_six(set_height_zero);prev_dp= 0; loop{/*997:*/ -#line 18945 "btex.w" +#line 19057 "btex.w" if(p==null)pi= eject_penalty; else/*998:*/ -#line 18960 "btex.w" +#line 19072 "btex.w" switch(type(p)){ case hlist_node:case vlist_node:case rule_node:{ @@ -2954,12 +2990,12 @@ cur_height= cur_height+prev_dp+height(p);prev_dp= depth(p); goto not_found; } case whatsit_node:/*1394:*/ -#line 24792 "btex.w" +#line 24929 "btex.w" goto not_found /*:1394*/ -#line 18966 "btex.w" +#line 19078 "btex.w" ; case glue_node:if(precedes_break(prev_p))pi= 0; else goto update_heights;break; @@ -2974,14 +3010,14 @@ default:confusion("vertbreak"); } /*:998*/ -#line 18949 "btex.w" +#line 19061 "btex.w" ; /*999:*/ -#line 18981 "btex.w" +#line 19093 "btex.w" if(pi<inf_penalty) {/*1000:*/ -#line 18995 "btex.w" +#line 19107 "btex.w" if(cur_height<h) if((active_height[3]!=0)||(active_height[4]!=0)|| @@ -2991,7 +3027,7 @@ else if(cur_height-h> active_height[6])b= awful_bad; else b= badness(cur_height-h,active_height[6]) /*:1000*/ -#line 18983 "btex.w" +#line 19095 "btex.w" ; if(b<awful_bad) if(pi<=eject_penalty)b= pi; @@ -3005,30 +3041,30 @@ if((b==awful_bad)||(pi<=eject_penalty))goto done; } /*:999*/ -#line 18951 "btex.w" +#line 19063 "btex.w" ; if((type(p)<glue_node)||(type(p)> kern_node))goto not_found; update_heights:/*1001:*/ -#line 19007 "btex.w" +#line 19119 "btex.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 1643 "htex.ch" +#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 19024 "btex.w" +#line 19136 "btex.w" } cur_height= cur_height+prev_dp+width(q);prev_dp= 0 /*:1001*/ -#line 18954 "btex.w" +#line 19066 "btex.w" ; not_found:if(prev_dp> d) {cur_height= cur_height+prev_dp-d; @@ -3036,7 +3072,7 @@ prev_dp= d; } /*:997*/ -#line 18927 "btex.w" +#line 19039 "btex.w" ; prev_p= p;p= link(prev_p); } @@ -3044,62 +3080,62 @@ done:return best_place; } /*:994*//*1012:*/ -#line 1673 "htex.ch" +#line 1688 "htex.ch" void freeze_page_specs(small_number s) -#line 19314 "btex.w" +#line 19426 "btex.w" {page_contents= s; -#line 1680 "htex.ch" +#line 1695 "htex.ch" page_goal= hvsize;page_max_depth= max_depth; -#line 19316 "btex.w" +#line 19428 "btex.w" page_depth= 0;do_all_six(set_page_so_far_zero); least_page_cost= awful_bad; -#line 19327 "btex.w" +#line 19439 "btex.w" } /*:1012*//*1020:*/ -#line 1706 "htex.ch" +#line 1721 "htex.ch" bool hbuild_page(void) -#line 19412 "btex.w" +#line 19524 "btex.w" { pointer p; pointer q,r; int b,c; int pi; -#line 1715 "htex.ch" +#line 1730 "htex.ch" if(link(contrib_head)==null)return false; -#line 19420 "btex.w" +#line 19532 "btex.w" do{resume:p= link(contrib_head); -#line 19422 "btex.w" +#line 19534 "btex.w" /*1023:*/ -#line 19452 "btex.w" +#line 19564 "btex.w" /*1026:*/ -#line 19480 "btex.w" +#line 19593 "btex.w" switch(type(p)){ case hlist_node:case vlist_node:case rule_node:if(page_contents<box_there) /*1027:*/ -#line 19501 "btex.w" +#line 19616 "btex.w" {if(page_contents==empty)freeze_page_specs(box_there); else page_contents= box_there; -#line 1745 "htex.ch" +#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 19505 "btex.w" +#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 19484 "btex.w" +#line 19597 "btex.w" else/*1028:*/ -#line 19510 "btex.w" +#line 19625 "btex.w" {page_total= page_total+page_depth+height(p); page_depth= depth(p); @@ -3107,43 +3143,43 @@ goto contribute; } /*:1028*/ -#line 19485 "btex.w" +#line 19599 "btex.w" break; case whatsit_node:/*1393:*/ -#line 24789 "btex.w" +#line 24926 "btex.w" goto contribute /*:1393*/ -#line 19486 "btex.w" +#line 19601 "btex.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 1733 "htex.ch" +#line 1748 "htex.ch" else if(link(p)==null)return false; -#line 19492 "btex.w" +#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 1739 "htex.ch" +#line 1754 "htex.ch" case ins_node:happend_insertion(p);goto contribute; -#line 19497 "btex.w" +#line 19612 "btex.w" default:confusion("page"); } /*:1026*/ -#line 19456 "btex.w" +#line 19569 "btex.w" ; /*1031:*/ -#line 19544 "btex.w" +#line 19659 "btex.w" if(pi<inf_penalty) {/*1033:*/ -#line 19588 "btex.w" +#line 19703 "btex.w" if(page_total<page_goal) if((page_so_far[3]!=0)||(page_so_far[4]!=0)|| @@ -3152,9 +3188,9 @@ 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 1796 "htex.ch" +#line 1811 "htex.ch" /*:1033*/ -#line 19547 "btex.w" +#line 19662 "btex.w" ; if(b<awful_bad) if(pi<=eject_penalty)c= pi; @@ -3162,7 +3198,7 @@ else if(b<inf_bad)c= b+pi+insert_penalties; else c= deplorable; else c= b; if(insert_penalties>=10000)c= awful_bad; -#line 19557 "btex.w" +#line 19672 "btex.w" if(c<=least_page_cost) {best_page_break= p;best_size= page_goal; @@ -3174,44 +3210,44 @@ r= link(r); } } if((c==awful_bad)||(pi<=eject_penalty)) -#line 1784 "htex.ch" +#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 19572 "btex.w" +#line 19687 "btex.w" } /*:1031*/ -#line 19459 "btex.w" +#line 19572 "btex.w" ; if((type(p)<glue_node)||(type(p)> kern_node))goto contribute; update_heights:/*1030:*/ -#line 19523 "btex.w" +#line 19638 "btex.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 1763 "htex.ch" +#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 19541 "btex.w" +#line 19656 "btex.w" } page_total= page_total+page_depth+width(q);page_depth= 0 /*:1030*/ -#line 19462 "btex.w" +#line 19575 "btex.w" ; contribute:/*1029:*/ -#line 19516 "btex.w" +#line 19631 "btex.w" if(page_depth> page_max_depth) {page_total= @@ -3220,60 +3256,60 @@ page_depth= page_max_depth; } /*:1029*/ -#line 19463 "btex.w" +#line 19576 "btex.w" ; /*1024:*/ -#line 19468 "btex.w" +#line 19581 "btex.w" link(page_tail)= p;page_tail= p; link(contrib_head)= link(p);link(p)= null;goto done /*:1024*/ -#line 19464 "btex.w" +#line 19577 "btex.w" ; done1:/*1025:*/ -#line 19472 "btex.w" +#line 19585 "btex.w" link(contrib_head)= link(p);link(p)= null;flush_node_list(p) /*:1025*/ -#line 19465 "btex.w" +#line 19578 "btex.w" ; done: /*:1023*/ -#line 19424 "btex.w" +#line 19536 "btex.w" ; }while(!(link(contrib_head)==null)); /*1021:*/ -#line 19431 "btex.w" +#line 19543 "btex.w" if(nest_ptr==0)tail= contrib_head; else contrib_tail= contrib_head /*:1021*/ -#line 19426 "btex.w" +#line 19538 "btex.w" ; -#line 1726 "htex.ch" +#line 1741 "htex.ch" return false; } -#line 19428 "btex.w" +#line 19540 "btex.w" /*:1020*//*1034:*/ -#line 1796 "htex.ch" +#line 1811 "htex.ch" 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 19598 "btex.w" +#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 19624 "btex.w" +#line 19740 "btex.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); @@ -3286,14 +3322,14 @@ 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 1820 "htex.ch" +#line 1835 "htex.ch" if((shrink_order(q)!=normal)&&(shrink(q)!=0)) DBG(DBGTEX,"Infinite glue shrinkage inserted from stream %d",n); -#line 19645 "btex.w" +#line 19761 "btex.w" } /*:1035*/ -#line 19603 "btex.w" +#line 19718 "btex.w" ; if(type(r)==split_up)insert_penalties= insert_penalties+float_cost(p); else{last_ins_ptr(r)= p; @@ -3305,7 +3341,7 @@ if(((h<=0)||(h<=delta))&&(height(p)+height(r)<=dimen(n))) {page_goal= page_goal-h;height(r)= height(r)+height(p); } else/*1036:*/ -#line 19657 "btex.w" +#line 19773 "btex.w" {if(count(n)<=0)w= max_dimen; else{w= page_goal-page_total-page_depth; @@ -3314,7 +3350,7 @@ 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 19668 "btex.w" +#line 19784 "btex.w" if(count(n)!=1000) best_height_plus_depth= x_over_n(best_height_plus_depth,1000)*count(n); @@ -3325,14 +3361,14 @@ else if(type(q)==penalty_node)insert_penalties= insert_penalties+penalty(q); } /*:1036*/ -#line 19613 "btex.w" +#line 19729 "btex.w" ; } -#line 19616 "btex.w" +#line 19732 "btex.w" } /*:1034*//*1041:*/ -#line 1854 "htex.ch" +#line 1869 "htex.ch" void hpack_page(void) { @@ -3354,7 +3390,7 @@ if(box(0)!=null) insert_penalties= 0; save_split_top_skip= split_top_skip; /*1045:*/ -#line 19821 "btex.w" +#line 19937 "btex.w" {r= link(page_ins_head); while(r!=page_ins_head) @@ -3370,13 +3406,13 @@ r= link(r); } /*:1045*/ -#line 1874 "htex.ch" +#line 1889 "htex.ch" ; 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 19847 "btex.w" +#line 19963 "btex.w" {r= link(page_ins_head); while(subtype(r)!=subtype(p))r= link(r); @@ -3384,7 +3420,7 @@ if(best_ins_ptr(r)==null)wait= true; else{wait= false;s= last_ins_ptr(r);link(s)= ins_ptr(p); if(best_ins_ptr(r)==p) /*1048:*/ -#line 19863 "btex.w" +#line 19979 "btex.w" {if(type(r)==split_up) if((broken_ins(r)==p)&&(broken_ptr(r)!=null)) @@ -3398,28 +3434,28 @@ height(p)= height(temp_ptr)+depth(temp_ptr); free_node(temp_ptr,box_node_size);wait= true; } } -#line 1912 "htex.ch" +#line 1927 "htex.ch" while(link(s)!=null)s= link(s); best_ins_ptr(r)= null; -#line 19877 "btex.w" +#line 19993 "btex.w" n= qo(subtype(r)); temp_ptr= list_ptr(box(n)); free_node(box(n),box_node_size); -#line 1919 "htex.ch" +#line 1934 "htex.ch" streams[n].p= temp_ptr; streams[n].t= s; -#line 19881 "btex.w" +#line 19997 "btex.w" } /*:1048*/ -#line 19854 "btex.w" +#line 19970 "btex.w" else{while(link(s)!=null)s= link(s); last_ins_ptr(r)= s; } } /*1049:*/ -#line 19883 "btex.w" +#line 19999 "btex.w" link(prev_p)= link(p);link(p)= null; if(wait) @@ -3431,19 +3467,19 @@ free_node(p,ins_node_size); p= prev_p /*:1049*/ -#line 19860 "btex.w" +#line 19976 "btex.w" ; } /*:1047*/ -#line 1879 "htex.ch" +#line 1894 "htex.ch" ; } prev_p= p;p= link(prev_p); } split_top_skip= save_split_top_skip; /*1044:*/ -#line 19796 "btex.w" +#line 19912 "btex.w" if(p!=null) {if(link(contrib_head)==null) @@ -3453,20 +3489,20 @@ link(page_tail)= link(contrib_head); link(contrib_head)= p; link(prev_p)= null; } -#line 1901 "htex.ch" +#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 19814 "btex.w" +#line 19930 "btex.w" /*:1044*/ -#line 1885 "htex.ch" +#line 1900 "htex.ch" ; /*1046:*/ -#line 19835 "btex.w" +#line 19951 "btex.w" r= link(page_ins_head); while(r!=page_ins_head) @@ -3475,13 +3511,13 @@ while(r!=page_ins_head) link(page_ins_head)= page_ins_head /*:1046*/ -#line 1886 "htex.ch" +#line 1901 "htex.ch" ; } -#line 19766 "btex.w" +#line 19882 "btex.w" /*:1041*//*1173:*/ -#line 1936 "htex.ch" +#line 1951 "htex.ch" void hdisplay(pointer p,pointer a,bool l) { @@ -3505,17 +3541,17 @@ pop_nest(); store_map(par_ptr,node_pos,0); line_break(display_widow_penalty,par_ptr); x= cur_list.hs_field; -#line 21742 "btex.w" +#line 21876 "btex.w" /*1174:*/ -#line 21757 "btex.w" +#line 21891 "btex.w" -#line 1976 "htex.ch" +#line 1991 "htex.ch" v= shift_amount(just_box)+2*dimen_def[quad_no];w= -max_dimen; -#line 21759 "btex.w" +#line 21893 "btex.w" p= list_ptr(just_box); while(p!=null) {/*1175:*/ -#line 21774 "btex.w" +#line 21908 "btex.w" reswitch:if(is_char_node(p)) {f= font(p);d= char_width(f,char_info(f,character(p))); @@ -3525,18 +3561,18 @@ switch(type(p)){ case hlist_node:case vlist_node:case rule_node:{d= width(p);goto found; } case ligature_node:/*665:*/ -#line 12971 "btex.w" +#line 13033 "btex.w" {mem[lig_trick]= mem[lig_char(p)];link(lig_trick)= link(p); p= lig_trick;goto reswitch; } /*:665*/ -#line 21782 "btex.w" +#line 21916 "btex.w" case kern_node:case math_node:d= width(p);break; case glue_node:/*1176:*/ -#line 21796 "btex.w" +#line 21930 "btex.w" {q= glue_ptr(p);d= width(q); if(glue_sign(just_box)==stretching) @@ -3553,21 +3589,21 @@ if(subtype(p)>=a_leaders)goto found; } /*:1176*/ -#line 21785 "btex.w" +#line 21919 "btex.w" break; case whatsit_node:/*1390:*/ -#line 24778 "btex.w" +#line 24915 "btex.w" d= 0 -#line 2609 "htex.ch" +#line 2624 "htex.ch" /*:1390*/ -#line 21786 "btex.w" +#line 21920 "btex.w" ;break; default:d= 0; } /*:1175*/ -#line 21762 "btex.w" +#line 21896 "btex.w" ; if(v<max_dimen)v= v+d; goto not_found; @@ -3581,25 +3617,25 @@ not_found:p= link(p); done: /*:1174*/ -#line 21744 "btex.w" +#line 21878 "btex.w" ; } /*1177:*/ -#line 21814 "btex.w" +#line 21948 "btex.w" if(par_shape_ptr==null) if((hang_indent!=0)&& (((hang_after>=0)&&(prev_graf+2> hang_after))|| (prev_graf+1<-hang_after))) -#line 1982 "htex.ch" +#line 1997 "htex.ch" {l= x-abs(hang_indent); -#line 21820 "btex.w" +#line 21954 "btex.w" if(hang_indent> 0)s= hang_indent;else s= 0; } -#line 1988 "htex.ch" +#line 2003 "htex.ch" else{l= x;s= 0; -#line 21823 "btex.w" +#line 21957 "btex.w" } else{n= info(par_shape_ptr); if(prev_graf+2>=n)p= par_shape_ptr+2*n; @@ -3608,18 +3644,18 @@ s= mem[p-1].sc;l= mem[p].sc; } /*:1177*/ -#line 21747 "btex.w" +#line 21881 "btex.w" ; -#line 1970 "htex.ch" +#line 1985 "htex.ch" pre_display_size= w;display_width= l;display_indent= s; -#line 21755 "btex.w" +#line 21889 "btex.w" } /*:1173*//*1228:*/ -#line 2000 "htex.ch" +#line 2015 "htex.ch" {/*1226:*/ -#line 22463 "btex.w" +#line 22598 "btex.w" pointer b; scaled w; @@ -3633,23 +3669,23 @@ pointer r; pointer t; /*:1226*/ -#line 2001 "htex.ch" +#line 2016 "htex.ch" 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 2010 "htex.ch" +#line 2025 "htex.ch" if(a==null) -#line 22486 "btex.w" +#line 22621 "btex.w" {e= 0;q= 0; } -#line 2016 "htex.ch" +#line 2031 "htex.ch" else{e= width(a);q= e+math_quad; -#line 22489 "btex.w" +#line 22624 "btex.w" } if(w+q> z) /*1230:*/ -#line 22515 "btex.w" +#line 22650 "btex.w" {if((e!=0)&&((w-total_shrink[normal]+q<=z)|| (total_shrink[fil]!=0)||(total_shrink[fill]!=0)|| @@ -3667,10 +3703,10 @@ w= width(b); } /*:1230*/ -#line 22492 "btex.w" +#line 22627 "btex.w" ; /*1231:*/ -#line 22539 "btex.w" +#line 22674 "btex.w" d= half(z-w); if((e> 0)&&(d<2*e)) @@ -3679,12 +3715,12 @@ if(p!=null)if(!is_char_node(p))if(type(p)==glue_node)d= 0; } /*:1231*/ -#line 22494 "btex.w" +#line 22629 "btex.w" ; /*1232:*/ -#line 22552 "btex.w" +#line 22687 "btex.w" -#line 2043 "htex.ch" +#line 2058 "htex.ch" tail_append(new_penalty(pre_display_penalty)); store_map(tail,node_pos,offset); if((d+s<=pre_display_size)||l) @@ -3698,13 +3734,13 @@ 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 22565 "btex.w" +#line 22700 "btex.w" /*:1232*/ -#line 22495 "btex.w" +#line 22630 "btex.w" ; /*1233:*/ -#line 22566 "btex.w" +#line 22701 "btex.w" if(e!=0) {r= new_kern(z-w-e-d); @@ -3715,43 +3751,43 @@ else{link(b)= r;link(r)= a; } b= hpack(b,natural); } -#line 2061 "htex.ch" +#line 2076 "htex.ch" shift_amount(b)= s+d;append_to_vlist(b,offset) -#line 22577 "btex.w" +#line 22712 "btex.w" /*:1233*/ -#line 22496 "btex.w" +#line 22631 "btex.w" ; /*1234:*/ -#line 22578 "btex.w" +#line 22713 "btex.w" if((a!=null)&&(e==0)&&!l) {tail_append(new_penalty(inf_penalty)); shift_amount(a)= s+z-width(a); -#line 2067 "htex.ch" +#line 2082 "htex.ch" append_to_vlist(a,offset); -#line 22583 "btex.w" +#line 22718 "btex.w" g2= 0; } if(t!=adjust_head) {link(tail)= link(adjust_head);tail= t; } -#line 2074 "htex.ch" +#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 22590 "btex.w" +#line 22725 "btex.w" /*:1234*/ -#line 22497 "btex.w" +#line 22632 "btex.w" ; -#line 2022 "htex.ch" +#line 2037 "htex.ch" prev_graf= prev_graf+3; cur_list.bs_pos= hpos+node_pos; push_nest();mode= hmode; } } -#line 22499 "btex.w" +#line 22634 "btex.w" /*:1228*/ diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/htex.h b/Build/source/texk/web2c/hitexdir/hintview/src/htex.h index 1107e48533b..a4beed44589 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 2624 "htex.ch" +#line 2639 "htex.ch" #define banner "This is TeX, Version 3.141592653 (HINT)" \ @@ -907,7 +907,8 @@ incr(input_ptr) ; \ #define back_list(A) begin_token_list(A,backed_up) #define ins_list(A) begin_token_list(A,inserted) \ -#define any_state_plus(A) case mid_line+A:case skip_blanks+A:case new_line+A \ +#define any_state_plus(A) case mid_line+A: \ +case skip_blanks+A:case new_line+A \ #define add_delims_to(A) A+math_shift:A+tab_mark:A+mac_param: \ A+sub_mark:A+letter:A+other_char \ @@ -1497,7 +1498,8 @@ if(mode> 0) tail_append(new_disc() ) ; \ } \ } \ -#define any_mode(A) case vmode+A:case hmode+A:case mmode+A \ +#define any_mode(A) case vmode+A:case hmode+A: \ +case mmode+A \ #define non_math(A) case vmode+A:case hmode+A \ @@ -1726,7 +1728,7 @@ str_pool[k+2]= si(qo(w.b2) ) ;str_pool[k+3]= si(qo(w.b3) ) \ #define end_write_token cs_token_flag+end_write \ -#line 2625 "htex.ch" +#line 2640 "htex.ch" enum{/*11:*/ #line 355 "btex.w" @@ -1770,7 +1772,7 @@ file_name_size= 1024, empty_string= 256 /*:11*/ -#line 2626 "htex.ch" +#line 2641 "htex.ch" }; /*18:*/ #line 495 "btex.w" @@ -1792,14 +1794,14 @@ typedef int16_t str_number; typedef uint8_t packed_ASCII_code; /*:38*//*104:*/ -#line 2126 "btex.w" +#line 2128 "btex.w" typedef int scaled; typedef int32_t nonnegative_integer; typedef int8_t small_number; /*:104*//*113:*/ -#line 2320 "btex.w" +#line 2322 "btex.w" #if __SIZEOF_FLOAT__==4 typedef float float32_t; @@ -1809,7 +1811,7 @@ typedef float float32_t; typedef float glue_ratio; /*:113*//*117:*/ -#line 2429 "btex.w" +#line 2431 "btex.w" typedef uint8_t quarterword; typedef uint16_t halfword; @@ -1837,16 +1839,16 @@ four_quarters qqqq; typedef struct{FILE*f;memory_word d;}word_file; /*:117*//*155:*/ -#line 3152 "btex.w" +#line 3155 "btex.w" typedef int8_t glue_ord; /*:155*//*221:*/ -#line 4309 "btex.w" +#line 4316 "btex.w" typedef struct{int16_t mode_field; pointer head_field,tail_field; -#line 698 "htex.ch" +#line 699 "htex.ch" int pg_field; pointer bs_field,ls_field; scaled lsl_field; @@ -1855,17 +1857,17 @@ scaled hs_field; scaled ds_field,dw_field,di_field; scaled ht_field; uint32_t np_field; -#line 4313 "btex.w" +#line 4320 "btex.w" memory_word aux_field; }list_state_record; /*:221*//*279:*/ -#line 5881 "btex.w" +#line 5892 "btex.w" typedef int8_t group_code; /*:279*//*310:*/ -#line 6457 "btex.w" +#line 6471 "btex.w" typedef struct{ quarterword state_field,index_field; @@ -1873,28 +1875,28 @@ halfword start_field,loc_field,limit_field,name_field; }in_state_record; /*:310*//*558:*/ -#line 10727 "btex.w" +#line 10753 "btex.w" typedef uint8_t internal_font_number; typedef uint16_t font_index; /*:558*//*605:*/ -#line 11900 "btex.w" +#line 11950 "btex.w" typedef int8_t dvi_index; /*:605*//*944:*/ -#line 18120 "btex.w" +#line 18222 "btex.w" typedef uint16_t trie_pointer; /*:944*//*949:*/ -#line 18186 "btex.w" +#line 18291 "btex.w" typedef int16_t hyph_pointer; /*:949*/ -#line 2627 "htex.ch" +#line 2642 "htex.ch" extern void list_init(void); extern void hpack_page(void); @@ -1902,7 +1904,7 @@ 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 25006 "btex.w" +#line 25143 "btex.w" extern pointer copy_node_list(pointer p); extern void flush_node_list(pointer p); extern @@ -1922,20 +1924,20 @@ extern int*const char_base; extern int*const width_base; extern memory_word font_info[]; extern scaled*const font_size; -#line 2641 "htex.ch" +#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 25028 "btex.w" +#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 2649 "htex.ch" +#line 2664 "htex.ch" extern void append_to_vlist(pointer b,uint32_t offset); -#line 25035 "btex.w" +#line 25172 "btex.w" extern pointer adjust_tail; extern void freeze_page_specs(small_number s); extern pointer page_tail; @@ -1954,5 +1956,5 @@ extern int nest_ptr; extern void pop_nest(void); extern void push_nest(void); extern void delete_glue_ref(pointer p); -#line 2655 "htex.ch" +#line 2670 "htex.ch" void line_break(int final_widow_penalty,pointer par_ptr);/*:1410*/ diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/renderOGL.c b/Build/source/texk/web2c/hitexdir/hintview/src/renderOGL.c index 7a2488cf982..27de51570be 100644 --- a/Build/source/texk/web2c/hitexdir/hintview/src/renderOGL.c +++ b/Build/source/texk/web2c/hitexdir/hintview/src/renderOGL.c @@ -339,7 +339,8 @@ void nativeSetDark(int on) static float pt_h=600.0, pt_v=800.0; void nativeSetSize(int px_h, int px_v, double x_dpi, double y_dpi) -{ pt_h = px_h * 72.27 / x_dpi; +{ //LOG("xdpi=%f, ydpi=%f\n",x_dpi,y_dpi); + pt_h = px_h * 72.27 / x_dpi; pt_v = px_v * 72.27 / y_dpi; page_h = round(pt_h * (1 << 16)); page_v = round(pt_v * (1 << 16)); @@ -444,7 +445,7 @@ void nativeImage(double x, double y, double w, double h, unsigned char *b, unsig } -static void GLtexture(gcache_t *g) { +static void GLtexture(Gcache *g) { unsigned texID; glPixelStorei(GL_UNPACK_ALIGNMENT, 1); checkGlError("glPixelStorei"); diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/rendernative.h b/Build/source/texk/web2c/hitexdir/hintview/src/rendernative.h index 1a375736e77..f45dcabf628 100644 --- a/Build/source/texk/web2c/hitexdir/hintview/src/rendernative.h +++ b/Build/source/texk/web2c/hitexdir/hintview/src/rendernative.h @@ -1,52 +1,52 @@ -/*376:*/ -#line 7624 "hint.w" +/*377:*/ +#line 7640 "hint.w" #ifndef _RENDERNATIVE_H #define _RENDERNATIVE_H -/*328:*/ -#line 6556 "hint.w" +/*329:*/ +#line 6572 "hint.w" extern void nativeInit(void); extern void nativeClear(void); -/*:328*//*329:*/ -#line 6563 "hint.w" +/*:329*//*330:*/ +#line 6579 "hint.w" extern void nativeSetSize(int px_h,int px_v,double xdpi,double ydpi); -/*:329*//*330:*/ -#line 6568 "hint.w" +/*:330*//*331:*/ +#line 6584 "hint.w" extern void nativeSetDark(int dark); -/*:330*//*331:*/ -#line 6573 "hint.w" +/*:331*//*332:*/ +#line 6589 "hint.w" extern void nativeBlank(void); -/*:331*//*332:*/ -#line 6583 "hint.w" +/*:332*//*333:*/ +#line 6599 "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); -/*:332*//*333:*/ -#line 6594 "hint.w" +/*:333*//*334:*/ +#line 6610 "hint.w" void nativeRule(double x,double y,double w,double h); -/*:333*//*334:*/ -#line 6600 "hint.w" +/*:334*//*335:*/ +#line 6616 "hint.w" void nativeImage(double x,double y,double w,double h,unsigned char*istart,unsigned char*iend); -/*:334*//*335:*/ -#line 6606 "hint.w" +/*:335*//*336:*/ +#line 6622 "hint.w" extern void nativeSetPK(struct gcache_s*g); extern void nativeSetFreeType(struct gcache_s*g); -/*:335*//*336:*/ -#line 6613 "hint.w" +/*:336*//*337:*/ +#line 6629 "hint.w" void nativeFreeGlyph(struct gcache_s*g); -/*:336*/ -#line 7628 "hint.w" +/*:337*/ +#line 7644 "hint.w" #endif -/*:376*/ +/*:377*/ diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/tables.c b/Build/source/texk/web2c/hitexdir/hintview/src/tables.c index e8d8c4cd3ca..ceec250aae4 100644 --- a/Build/source/texk/web2c/hitexdir/hintview/src/tables.c +++ b/Build/source/texk/web2c/hitexdir/hintview/src/tables.c @@ -9,9 +9,9 @@ int max_outline=-1; int32_t int_defaults[MAX_INT_DEFAULT+1]={0, 100, 200, 10, 50, 50, 150, 150, 50, 100, 10000, 0, 0, 10000, 5000, 10000, 0, 720, 4, 7, 1776, 1, 20000}; -dimen_t dimen_defaults[MAX_DIMEN_DEFAULT+1]={0x0, 0x1d5c147, 0x28333f7, 0x0, 0x0, 0x38000, 0x0, 0x0, 0xa0000, 0xa0000}; +Dimen dimen_defaults[MAX_DIMEN_DEFAULT+1]={0x0, 0x1d5c147, 0x28333f7, 0x0, 0x0, 0x38000, 0x0, 0x0, 0xa0000, 0xa0000}; -glue_t glue_defaults[MAX_GLUE_DEFAULT+1]={ +Glue glue_defaults[MAX_GLUE_DEFAULT+1]={ {{0x0, 0.000000, 0.000000},{0.000000, 0},{0.000000, 0}}, {{0x0, 0.000000, 0.000000},{1.000000, 1},{0.000000, 0}}, {{0x0, 0.000000, 0.000000},{1.000000, 2},{0.000000, 0}}, @@ -29,11 +29,11 @@ glue_t glue_defaults[MAX_GLUE_DEFAULT+1]={ {{0x0, 0.000000, 0.000000},{1.000000, 1},{0.000000, 0}}, }; -xdimen_t xdimen_defaults[MAX_XDIMEN_DEFAULT+1]={{0x0, 0.0, 0.0}, {0x0, 1.0, 0.0}, {0x0, 0.0, 1.0}}; +Xdimen xdimen_defaults[MAX_XDIMEN_DEFAULT+1]={{0x0, 0.0, 0.0}, {0x0, 1.0, 0.0}, {0x0, 0.0, 1.0}}; -baseline_t baseline_defaults[MAX_BASELINE_DEFAULT+1]={{{{0x0, 0.000000, 0.000000},{0.000000, 0},{0.000000, 0}}, {{0x0, 0.000000, 0.000000},{0.000000, 0},{0.000000, 0}}, 0x0}}; +Baseline baseline_defaults[MAX_BASELINE_DEFAULT+1]={{{{0x0, 0.000000, 0.000000},{0.000000, 0},{0.000000, 0}}, {{0x0, 0.000000, 0.000000},{0.000000, 0},{0.000000, 0}}, 0x0}}; -label_t label_defaults[MAX_LABEL_DEFAULT+1]={{0,LABEL_TOP,true,0,0,0}}; +Label label_defaults[MAX_LABEL_DEFAULT+1]={{0,LABEL_TOP,true,0,0,0}}; int max_fixed[32]= {65536, 65536, -1, 2, 65536, -1, 0, 2, -1, -1, -1, -1, -1, -1, 0, 65536, 65536, 65536, 65536, 65536, 65536, 65536, 65536, 65536, 65536, 0, 0, 0, -1, 65536, 65536, 0}; |