summaryrefslogtreecommitdiff
path: root/Build/source/texk
diff options
context:
space:
mode:
authorMartin Ruckert <martin.ruckert@hm.edu>2022-07-14 13:24:59 +0000
committerMartin Ruckert <martin.ruckert@hm.edu>2022-07-14 13:24:59 +0000
commiteaaf9faef83392a61ca18d110442330a4a636416 (patch)
tree93e093fac3ba61e55e8b68219a9136e689412440 /Build/source/texk
parentad352dbe824f9ce7023bebda6bd808020c11bf70 (diff)
HINT adding back in the eTeX marks
git-svn-id: svn://tug.org/texlive/trunk@63889 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk')
-rw-r--r--Build/source/texk/web2c/hitexdir/doc/hiformat.hntbin1113685 -> 1113677 bytes
-rw-r--r--Build/source/texk/web2c/hitexdir/doc/hiformat.pdfbin1255758 -> 1255614 bytes
-rw-r--r--Build/source/texk/web2c/hitexdir/doc/hintmac.tex4
-rw-r--r--Build/source/texk/web2c/hitexdir/hiformat.w2
-rw-r--r--Build/source/texk/web2c/hitexdir/hintview/src/error.h6
-rw-r--r--Build/source/texk/web2c/hitexdir/hintview/src/hfonts.c140
-rw-r--r--Build/source/texk/web2c/hitexdir/hintview/src/hfonts.h58
-rw-r--r--Build/source/texk/web2c/hitexdir/hintview/src/hint.c48
-rw-r--r--Build/source/texk/web2c/hitexdir/hintview/src/hint.h32
-rw-r--r--Build/source/texk/web2c/hitexdir/hintview/src/hrender.c342
-rw-r--r--Build/source/texk/web2c/hitexdir/hintview/src/hrender.h27
-rw-r--r--Build/source/texk/web2c/hitexdir/hintview/src/htex.c748
-rw-r--r--Build/source/texk/web2c/hitexdir/hintview/src/htex.h42
-rw-r--r--Build/source/texk/web2c/hitexdir/hintview/src/main.c16
-rw-r--r--Build/source/texk/web2c/hitexdir/hintview/src/renderOGL.c92
-rw-r--r--Build/source/texk/web2c/hitexdir/hintview/src/rendernative.h49
-rw-r--r--Build/source/texk/web2c/hitexdir/hitex.w218
17 files changed, 994 insertions, 830 deletions
diff --git a/Build/source/texk/web2c/hitexdir/doc/hiformat.hnt b/Build/source/texk/web2c/hitexdir/doc/hiformat.hnt
index a6cca9e85aa..f3b4bcd517c 100644
--- a/Build/source/texk/web2c/hitexdir/doc/hiformat.hnt
+++ b/Build/source/texk/web2c/hitexdir/doc/hiformat.hnt
Binary files differ
diff --git a/Build/source/texk/web2c/hitexdir/doc/hiformat.pdf b/Build/source/texk/web2c/hitexdir/doc/hiformat.pdf
index 088b11c186b..5ec26605285 100644
--- a/Build/source/texk/web2c/hitexdir/doc/hiformat.pdf
+++ b/Build/source/texk/web2c/hitexdir/doc/hiformat.pdf
Binary files differ
diff --git a/Build/source/texk/web2c/hitexdir/doc/hintmac.tex b/Build/source/texk/web2c/hitexdir/doc/hintmac.tex
index 1fa9d7232f2..e57b4ef4763 100644
--- a/Build/source/texk/web2c/hitexdir/doc/hintmac.tex
+++ b/Build/source/texk/web2c/hitexdir/doc/hintmac.tex
@@ -198,7 +198,7 @@
\def\TUG{\TeX\ \UG}
\def\tug{\acro{TUG}}
\def\UG{Users Group}
-\ifacro
+\ifpdf
\sanitizecommand{\TeX}{TeX}
\sanitizecommand{\eTeX}{eTeX}
\sanitizecommand{\Prote}{PRoTE}
@@ -1503,7 +1503,7 @@
\else\ifpdf
\def\includefig#1{\leavevmode\hbox{\immediate\pdfximage{image/#1.pdf}\pdfrefximage\pdflastximage}}
\else\ifhint
- \def\includefig#1{\image=image/#1.png\relax}
+ \def\includefig#1{\HINTimage=image/#1.png\relax}
\else
\input epsf.tex
\def\includefig#1{\epsfbox{image/#1.eps}}% this is a \leavevmode\hbox{...}
diff --git a/Build/source/texk/web2c/hitexdir/hiformat.w b/Build/source/texk/web2c/hitexdir/hiformat.w
index 827f3f8b430..ab192c9d396 100644
--- a/Build/source/texk/web2c/hitexdir/hiformat.w
+++ b/Build/source/texk/web2c/hitexdir/hiformat.w
@@ -5343,7 +5343,7 @@ An undefined label has |where| equal to zero.
@
@<common variables@>=
-Label *labels;
+Label *labels=NULL;
int first_label=-1;
@
The variable |first_label| will be used together with the |next| field of
diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/error.h b/Build/source/texk/web2c/hitexdir/hintview/src/error.h
index c350d15dd34..54ef0070091 100644
--- a/Build/source/texk/web2c/hitexdir/hintview/src/error.h
+++ b/Build/source/texk/web2c/hitexdir/hintview/src/error.h
@@ -1,5 +1,5 @@
-/*358:*/
-#line 7171 "hint.w"
+/*359:*/
+#line 7180 "hint.w"
#ifndef _ERROR_H
#define _ERROR_H
@@ -56,4 +56,4 @@ extern int herror(char*title,char*msg);
#endif
#endif
-/*:358*/
+/*:359*/
diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/hfonts.c b/Build/source/texk/web2c/hitexdir/hintview/src/hfonts.c
index 6aa16f2408b..6ab1efe3dcb 100644
--- a/Build/source/texk/web2c/hitexdir/hintview/src/hfonts.c
+++ b/Build/source/texk/web2c/hitexdir/hintview/src/hfonts.c
@@ -1,5 +1,5 @@
-/*376:*/
-#line 7624 "hint.w"
+/*377:*/
+#line 7640 "hint.w"
#include "basetypes.h"
#include "error.h"
@@ -12,20 +12,20 @@
#include "hrender.h"
#include "rendernative.h"
-/*308:*/
-#line 5765 "hint.w"
+/*309:*/
+#line 5768 "hint.w"
static Font*fonts[0x100]= {NULL};
-/*:308*//*315:*/
-#line 5901 "hint.w"
+/*:309*//*316:*/
+#line 5904 "hint.w"
static Gcache g_undefined= {0};
-/*:315*//*349:*/
-#line 7015 "hint.w"
+/*:316*//*350:*/
+#line 7024 "hint.w"
static FT_Library ft_library= NULL;
-/*:349*/
-#line 7636 "hint.w"
+/*:350*/
+#line 7652 "hint.w"
/*35:*/
#line 577 "hint.w"
@@ -33,10 +33,10 @@ static FT_Library ft_library= NULL;
extern uint16_t hglyph_section(uint8_t f);
extern int32_t font_at_size(uint8_t f);
/*:35*/
-#line 7637 "hint.w"
+#line 7653 "hint.w"
-/*314:*/
-#line 5858 "hint.w"
+/*315:*/
+#line 5861 "hint.w"
#define G0_BITS 7
#define G0_SIZE (1<<G0_BITS)
@@ -70,8 +70,8 @@ else if(f->g0)
return f->g0[cc];
return NULL;
}
-/*:314*//*316:*/
-#line 5905 "hint.w"
+/*:315*//*317:*/
+#line 5908 "hint.w"
static Gcache*hnew_g(Gcache**g)
{if(*g==NULL)
@@ -125,41 +125,41 @@ else if(cc<G123_SIZE*G123_SIZE*G0_SIZE)return hnew_g2(&(f->g2),cc);
else if(cc<G123_SIZE*G123_SIZE*G123_SIZE*G0_SIZE)return hnew_g3(&(f->g3),cc);
else return&g_undefined;
}
-/*:316*/
-#line 7638 "hint.w"
+/*:317*/
+#line 7654 "hint.w"
-/*353:*/
-#line 7049 "hint.w"
+/*354:*/
+#line 7058 "hint.w"
int unpack_ft_file(Font*f)
{int e;
-/*350:*/
-#line 7019 "hint.w"
+/*351:*/
+#line 7028 "hint.w"
if(ft_library==NULL)
{int e= FT_Init_FreeType(&ft_library);
if(e)QUIT("Unable to initialize the FreeType library");
}
-/*:350*/
-#line 7053 "hint.w"
+/*:351*/
+#line 7062 "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;
-/*354:*/
-#line 7074 "hint.w"
+/*355:*/
+#line 7083 "hint.w"
e= FT_Select_Charmap(f->tt.face,FT_ENCODING_ADOBE_CUSTOM);
if(e)LOG("Unable to select custom encoding for font %d\n",f->n);
-/*:354*/
-#line 7059 "hint.w"
+/*:355*/
+#line 7068 "hint.w"
-/*355:*/
-#line 7082 "hint.w"
+/*356:*/
+#line 7091 "hint.w"
e= FT_Set_Char_Size(
f->tt.face,
@@ -169,14 +169,14 @@ f->tt.face,
72.27/f->vpxs);
if(e)QUIT("Unable to set FreeType glyph size");
FT_Set_Transform(f->tt.face,0,0);
-/*:355*/
-#line 7060 "hint.w"
+/*:356*/
+#line 7069 "hint.w"
f->ff= ft_format;
return 1;
}
-/*:353*//*356:*/
-#line 7105 "hint.w"
+/*:354*//*357:*/
+#line 7114 "hint.w"
static void ft_unpack_glyph(Font*f,Gcache*g,uint32_t cc)
{int e,i;
@@ -200,23 +200,23 @@ g->ff= ft_format;
nativeSetFreeType(g);
}
-/*:356*/
-#line 7640 "hint.w"
+/*:357*/
+#line 7656 "hint.w"
-/*341:*/
-#line 6720 "hint.w"
+/*342:*/
+#line 6729 "hint.w"
#define PK_READ_1_BYTE() (data[i++])
#define PK_READ_2_BYTE() (k= PK_READ_1_BYTE(),k= k<<8,k= k+data[i++],k)
#define PK_READ_3_BYTE() (k= PK_READ_2_BYTE(),k= k<<8,k= k+data[i++],k)
#define PK_READ_4_BYTE() (k= PK_READ_3_BYTE(),k= k<<8,k= k+data[i++],k)
-/*:341*//*343:*/
-#line 6747 "hint.w"
+/*:342*//*344:*/
+#line 6756 "hint.w"
#define read_nybble(P) ((P).j&1?((P).data[(P).j++>>1]&0xF):(((P).data[(P).j++>>1]>>4)&0xF))
-/*:343*//*344:*/
-#line 6773 "hint.w"
+/*:344*//*345:*/
+#line 6782 "hint.w"
static int packed_number(PKparse*p)
{int i,k;
@@ -234,8 +234,8 @@ else p->r= 1;
return packed_number(p);
}
}
-/*:344*//*345:*/
-#line 6802 "hint.w"
+/*:345*//*346:*/
+#line 6811 "hint.w"
static void pk_runlength(Gcache*g,unsigned char*data){
PKparse p;
@@ -276,8 +276,8 @@ y++;
}
}
}
-/*:345*//*346:*/
-#line 6854 "hint.w"
+/*:346*//*347:*/
+#line 6863 "hint.w"
static void pk_bitmap(Gcache*g,unsigned char*data){
unsigned char*bits;
@@ -297,8 +297,8 @@ mask= mask>>1;
if(mask==0){data++;mask= 0x80;}
}
}
-/*:346*//*347:*/
-#line 6877 "hint.w"
+/*:347*//*348:*/
+#line 6886 "hint.w"
static void pkunpack_glyph(Gcache*g)
@@ -340,8 +340,8 @@ if((g->pk.flag>>4)==14)pk_bitmap(g,data+i);
else pk_runlength(g,data+i);
nativeSetPK(g);
}
-/*:347*//*348:*/
-#line 6922 "hint.w"
+/*:348*//*349:*/
+#line 6931 "hint.w"
static Gcache*hnew_glyph(Font*pk,unsigned int cc);
@@ -426,12 +426,12 @@ break;
return 1;
}
-/*:348*/
-#line 7642 "hint.w"
+/*:349*/
+#line 7658 "hint.w"
-/*309:*/
-#line 5771 "hint.w"
+/*310:*/
+#line 5774 "hint.w"
struct font_s*hget_font(unsigned char f)
{Font*fp;
@@ -452,15 +452,15 @@ fp->data_size= hend-hstart;
hpos= spos;hstart= sstart;hend= send;
}
fp->s= font_at_size(f)/(double)(1<<16);
-/*338:*/
-#line 6657 "hint.w"
+/*339:*/
+#line 6666 "hint.w"
if(fp->font_data[0]==0xF7&&fp->font_data[1]==0x59)
{fp->ff= pk_format;
if(!unpack_pk_file(fp)){free(fp);fp= NULL;}
}
-/*:338*//*357:*/
-#line 7132 "hint.w"
+/*:339*//*358:*/
+#line 7141 "hint.w"
else if(unpack_ft_file(fp))
fp->ff= ft_format;
@@ -468,14 +468,14 @@ else
{QUIT("Font format not supported for font %d\n",fp->n);
free(fp);fp= NULL;
}
-/*:357*/
-#line 5791 "hint.w"
+/*:358*/
+#line 5794 "hint.w"
fonts[f]= fp;
return fonts[f];
}
-/*:309*//*311:*/
-#line 5809 "hint.w"
+/*:310*//*312:*/
+#line 5812 "hint.w"
static void hfree_glyph_cache(Font*f,bool rm);
@@ -488,8 +488,8 @@ if(fonts[f]!=NULL)
if(rm){free(fonts[f]);fonts[f]= NULL;}
}
}
-/*:311*//*317:*/
-#line 5969 "hint.w"
+/*:312*//*318:*/
+#line 5972 "hint.w"
static void hfree_g0(struct gcache_s**g,bool rm)
{int i;
@@ -553,8 +553,8 @@ if(f->g3!=NULL)
if(rm){free(f->g3);f->g3= NULL;}
}
}
-/*:317*//*319:*/
-#line 6095 "hint.w"
+/*:318*//*320:*/
+#line 6098 "hint.w"
Gcache*hget_glyph(Font*f,unsigned int cc)
{
@@ -573,8 +573,8 @@ else QUIT("Font format not supported");
}
return g;
}
-/*:319*//*321:*/
-#line 6127 "hint.w"
+/*:320*//*322:*/
+#line 6130 "hint.w"
void render_char(int x,int y,struct font_s*f,uint32_t cc,uint8_t s)
@@ -589,8 +589,8 @@ h= (double)g->h*f->vpxs;
nativeGlyph(SP2PT(x),dx,SP2PT(y),dy,w,h,g,s);
}
-/*:321*/
-#line 7644 "hint.w"
+/*:322*/
+#line 7660 "hint.w"
-/*:376*/
+/*:377*/
diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/hfonts.h b/Build/source/texk/web2c/hitexdir/hintview/src/hfonts.h
index 35cc72f99ba..fbd5893385f 100644
--- a/Build/source/texk/web2c/hitexdir/hintview/src/hfonts.h
+++ b/Build/source/texk/web2c/hitexdir/hintview/src/hfonts.h
@@ -1,18 +1,18 @@
-/*375:*/
-#line 7613 "hint.w"
+/*376:*/
+#line 7629 "hint.w"
#ifndef _HFONTS_H
#define _HFONTS_H
-/*306:*/
-#line 5737 "hint.w"
+/*307:*/
+#line 5740 "hint.w"
typedef enum{no_format,pk_format,ft_format}FontFormat;
-/*:306*//*307:*/
-#line 5749 "hint.w"
+/*:307*//*308:*/
+#line 5752 "hint.w"
-/*339:*/
-#line 6696 "hint.w"
+/*340:*/
+#line 6705 "hint.w"
typedef struct
@@ -21,20 +21,20 @@ unsigned int cs;
double ds;
unsigned char id;
}PKfont;
-/*:339*//*351:*/
-#line 7027 "hint.w"
+/*:340*//*352:*/
+#line 7036 "hint.w"
typedef struct
{FT_Face face;
}FTfont;
-/*:351*//*352:*/
-#line 7034 "hint.w"
+/*:352*//*353:*/
+#line 7043 "hint.w"
typedef struct
{int dummy;
}FTglyph;
-/*:352*/
-#line 5750 "hint.w"
+/*:353*/
+#line 5753 "hint.w"
typedef struct font_s{
@@ -43,32 +43,32 @@ unsigned char*font_data;
int data_size;
double s;
double hpxs,vpxs;
-/*313:*/
-#line 5844 "hint.w"
+/*314:*/
+#line 5847 "hint.w"
struct gcache_s**g0;
struct gcache_s***g1;
struct gcache_s****g2;
struct gcache_s*****g3;
-/*:313*/
-#line 5758 "hint.w"
+/*:314*/
+#line 5761 "hint.w"
FontFormat ff;
union{PKfont pk;FTfont tt;};
}Font;
-/*:307*//*318:*/
-#line 6056 "hint.w"
+/*:308*//*319:*/
+#line 6059 "hint.w"
-/*340:*/
-#line 6709 "hint.w"
+/*341:*/
+#line 6718 "hint.w"
typedef struct
{unsigned char flag;
unsigned char*encoding;
}PKglyph;
-/*:340*//*342:*/
-#line 6736 "hint.w"
+/*:341*//*343:*/
+#line 6745 "hint.w"
typedef struct{
int j;
@@ -76,8 +76,8 @@ int r;
int f;
unsigned char*data;
}PKparse;
-/*:342*/
-#line 6057 "hint.w"
+/*:343*/
+#line 6060 "hint.w"
struct gcache_s{
@@ -92,10 +92,10 @@ FTglyph tt;
};
};
typedef struct gcache_s Gcache;
-/*:318*/
-#line 7617 "hint.w"
+/*:319*/
+#line 7633 "hint.w"
#endif
-/*:375*/
+/*:376*/
diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/hint.c b/Build/source/texk/web2c/hitexdir/hintview/src/hint.c
index 04757ee2ef5..504dca00c9f 100644
--- a/Build/source/texk/web2c/hitexdir/hintview/src/hint.c
+++ b/Build/source/texk/web2c/hitexdir/hintview/src/hint.c
@@ -1,5 +1,5 @@
-/*372:*/
-#line 7534 "hint.w"
+/*373:*/
+#line 7545 "hint.w"
#include "basetypes.h"
#include <string.h>
@@ -238,7 +238,7 @@ tail_append(p);}
label_has_name(p)= 0;\
tail_append(p);}
/*:193*/
-#line 7546 "hint.w"
+#line 7557 "hint.w"
/*84:*/
#line 1318 "hint.w"
@@ -441,7 +441,7 @@ tail_append(p);}
label_has_name(p)= 0;\
tail_append(p);}
/*:194*/
-#line 7547 "hint.w"
+#line 7558 "hint.w"
/*21:*/
@@ -472,7 +472,7 @@ typedef struct ParamDef{
struct ParamDef*next;
Param p;}ParamDef;
/*:37*/
-#line 7549 "hint.w"
+#line 7560 "hint.w"
@@ -576,18 +576,18 @@ scaled hvsize,hhsize;
#line 4285 "hint.w"
int page_v,page_h,offset_v,offset_h;
-/*:244*//*301:*/
-#line 5564 "hint.w"
+/*:244*//*299:*/
+#line 5496 "hint.w"
hint_Link*hint_links= NULL;
int max_link= -1;
-/*:301*//*359:*/
-#line 7231 "hint.w"
+/*:299*//*360:*/
+#line 7240 "hint.w"
jmp_buf error_exit;
char herror_string[MAX_HERROR];
-/*:359*/
-#line 7552 "hint.w"
+/*:360*/
+#line 7563 "hint.w"
/*3:*/
#line 211 "hint.w"
@@ -626,7 +626,7 @@ static pointer hteg_list_pointer(void);
static scaled hget_xdimen_node(void);
/*:124*/
-#line 7553 "hint.w"
+#line 7564 "hint.w"
/*9:*/
#line 268 "hint.w"
@@ -2021,7 +2021,7 @@ shift_amount(p)+= offset_h;
streams[0].p= q;
}
/*:247*//*272:*/
-#line 4973 "hint.w"
+#line 4974 "hint.w"
static int trv_string_size= 0;
static char trv_string[256];
@@ -2049,8 +2049,8 @@ trv_hlist(p);
trv_string[trv_string_size]= 0;
return trv_string;
}
-/*:272*//*369:*/
-#line 7463 "hint.w"
+/*:272*//*370:*/
+#line 7474 "hint.w"
static pointer leaks[1<<16]= {0};
@@ -2090,8 +2090,8 @@ if(leaks[i]!=0)
fprintf(stderr,"ERROR:leak final: p=%d, s=%d\n",i,leaks[i]);
#endif
}
-/*:369*/
-#line 7554 "hint.w"
+/*:370*/
+#line 7565 "hint.w"
/*1:*/
#line 126 "hint.w"
@@ -2627,7 +2627,7 @@ QUIT("Text in paragraph not yet implemented");
return null;
}
/*:160*/
-#line 7555 "hint.w"
+#line 7566 "hint.w"
/*80:*/
#line 1260 "hint.w"
@@ -2992,7 +2992,7 @@ line_break_params= save_lbp;
}
/*:170*/
-#line 7556 "hint.w"
+#line 7567 "hint.w"
/*18:*/
@@ -3710,18 +3710,18 @@ store_map(tail,pos,0);
return false;
}
/*:241*//*263:*/
-#line 4757 "hint.w"
+#line 4758 "hint.w"
int hint_get_outline_max(void)
{return max_outline;}
/*:263*//*268:*/
-#line 4837 "hint.w"
+#line 4838 "hint.w"
hint_Outline*hint_get_outlines(void)
{return hint_outlines;
}
/*:268*//*270:*/
-#line 4896 "hint.w"
+#line 4897 "hint.w"
static bool trv_ignore= false;
static bool trv_skip_space= false;
@@ -3787,7 +3787,7 @@ p= link(p);
}
}
/*:270*/
-#line 7558 "hint.w"
+#line 7569 "hint.w"
-/*:372*/
+/*:373*/
diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/hint.h b/Build/source/texk/web2c/hitexdir/hintview/src/hint.h
index 4f74baa07c2..789bafe0c97 100644
--- a/Build/source/texk/web2c/hitexdir/hintview/src/hint.h
+++ b/Build/source/texk/web2c/hitexdir/hintview/src/hint.h
@@ -1,5 +1,5 @@
-/*371:*/
-#line 7521 "hint.w"
+/*372:*/
+#line 7532 "hint.w"
#ifndef _HINT_H_
#define _HINT_H_
@@ -110,7 +110,7 @@ extern bool hint_backward(void);
extern scaled hvsize,hhsize;
/*:243*//*264:*/
-#line 4770 "hint.w"
+#line 4771 "hint.w"
typedef struct{
uint64_t pos;
@@ -121,47 +121,47 @@ char*title;
}hint_Outline;
extern hint_Outline*hint_outlines;
/*:264*//*265:*/
-#line 4788 "hint.w"
+#line 4789 "hint.w"
#define LABEL_UNDEF 0
#define LABEL_TOP 1
#define LABEL_BOT 2
#define LABEL_MID 3
/*:265*//*269:*/
-#line 4847 "hint.w"
+#line 4848 "hint.w"
extern int hint_get_outline_max(void);
extern hint_Outline*hint_get_outlines(void);
extern uint64_t hint_outline_page(int i);
/*:269*//*271:*/
-#line 4962 "hint.w"
+#line 4963 "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 5554 "hint.w"
+/*:271*//*298:*/
+#line 5486 "hint.w"
typedef struct{
uint64_t pos;
uint8_t where;
-int top,bottom,left,right;
+scaled top,bottom,left,right;
}hint_Link;
extern hint_Link*hint_links;
extern int max_link;
-/*:300*//*305:*/
-#line 5716 "hint.w"
+/*:298*//*303:*/
+#line 5649 "hint.w"
extern int hint_find_link(scaled x,scaled y,scaled precission);
extern uint64_t hint_link_page(int i);
-/*:305*//*370:*/
-#line 7504 "hint.w"
+/*:303*//*371:*/
+#line 7515 "hint.w"
extern void leak_in(pointer p,int s);
extern void leak_out(pointer p,int s);
-/*:370*/
-#line 7528 "hint.w"
+/*:371*/
+#line 7539 "hint.w"
#endif
-/*:371*/
+/*:372*/
diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/hrender.c b/Build/source/texk/web2c/hitexdir/hintview/src/hrender.c
index 32ab4e120cd..a4c8285a7bb 100644
--- a/Build/source/texk/web2c/hitexdir/hintview/src/hrender.c
+++ b/Build/source/texk/web2c/hitexdir/hintview/src/hrender.c
@@ -1,5 +1,5 @@
-/*374:*/
-#line 7593 "hint.w"
+/*375:*/
+#line 7609 "hint.w"
#include "basetypes.h"
#include "error.h"
@@ -12,16 +12,16 @@
#include "htex.h"
#include "hint.h"
-/*310:*/
-#line 5798 "hint.w"
+/*311:*/
+#line 5801 "hint.w"
extern struct font_s*hget_font(unsigned char f);
-/*:310*//*322:*/
-#line 6143 "hint.w"
+/*:311*//*323:*/
+#line 6146 "hint.w"
extern void render_char(int x,int y,struct font_s*f,uint32_t cc,uint8_t s);
-/*:322*/
-#line 7605 "hint.w"
+/*:323*/
+#line 7621 "hint.w"
/*236:*/
@@ -29,49 +29,49 @@ extern void render_char(int x,int y,struct font_s*f,uint32_t cc,uint8_t s);
double xdpi= 600.0,ydpi= 600.0;
/*:236*//*254:*/
-#line 4497 "hint.w"
+#line 4498 "hint.w"
static bool forward_mode= false,backward_mode= false;
/*:254*//*273:*/
-#line 5009 "hint.w"
+#line 5010 "hint.w"
static char*m_str;
static int m_length,m_chars;
/*:273*//*277:*/
-#line 5080 "hint.w"
+#line 5081 "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 5181 "hint.w"
+#line 5183 "hint.w"
static int m_state,m_spaces;
static uint32_t m_d;
-/*:280*//*285:*/
-#line 5303 "hint.w"
+/*:280*//*283:*/
+#line 5236 "hint.w"
static int m_focus;
static uint64_t m_page;
-/*:285*//*288:*/
-#line 5339 "hint.w"
+/*:283*//*286:*/
+#line 5271 "hint.w"
static bool c_ignore;
static int m_style;
-/*:288*//*296:*/
-#line 5508 "hint.w"
+/*:286*//*294:*/
+#line 5440 "hint.w"
static int cur_link= -1;
-/*:296*//*325:*/
-#line 6186 "hint.w"
+/*:294*//*326:*/
+#line 6189 "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;
-/*:325*/
-#line 7607 "hint.w"
+/*:326*/
+#line 7623 "hint.w"
/*237:*/
#line 4138 "hint.w"
@@ -145,6 +145,7 @@ uint64_t hint_page_home(void)
{uint64_t pos;
uint8_t where;
int n= zero_label_no;
+if(hin_addr==NULL)return 0;
/*71:*/
#line 1102 "hint.w"
@@ -155,21 +156,21 @@ pos= ((uint64_t)labels[n].pos<<32)+(labels[n].pos-labels[n].pos0);
pos= ((uint64_t)labels[n].pos0<<32);
#endif
/*:71*/
-#line 4422 "hint.w"
+#line 4423 "hint.w"
/*267:*/
-#line 4810 "hint.w"
+#line 4811 "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 4423 "hint.w"
+#line 4424 "hint.w"
}
/*:251*//*252:*/
-#line 4444 "hint.w"
+#line 4445 "hint.w"
double hint_get_fpos(void)
{
@@ -179,7 +180,7 @@ if(hin_addr==NULL)return 0.0;
return(double)LOC_POS(page_loc[cur_loc])/(double)(hend-hstart);
}
/*:252*//*253:*/
-#line 4458 "hint.w"
+#line 4459 "hint.w"
uint64_t hint_set_fpos(double fpos)
{uint32_t pos,pos0;
@@ -214,7 +215,7 @@ pos= pos0= hpos-hstart;
return hint_page_top(PAGE_LOC(pos0,pos-pos0));
}
/*:253*//*255:*/
-#line 4502 "hint.w"
+#line 4503 "hint.w"
uint64_t hint_page_next(void)
{if(hin_addr==NULL)return 0;
@@ -231,7 +232,7 @@ return hint_page();
}
}
/*:255*//*256:*/
-#line 4527 "hint.w"
+#line 4528 "hint.w"
uint64_t hint_page_prev(void)
{if(hin_addr==NULL)return 0;
@@ -249,7 +250,7 @@ else
return hint_page_bottom(hint_page_get());
}
/*:256*//*257:*/
-#line 4553 "hint.w"
+#line 4554 "hint.w"
uint64_t hint_page_bottom(uint64_t h)
{if(hin_addr==NULL)return 0;
@@ -264,7 +265,7 @@ forward_mode= false;
return hint_page_get();
}
/*:257*//*258:*/
-#line 4578 "hint.w"
+#line 4579 "hint.w"
uint64_t hint_page_middle(uint64_t l)
{uint32_t pos,pos0,offset;
@@ -283,11 +284,11 @@ hget_content();
p= link(contrib_head);
if(offset> 0)
{/*259:*/
-#line 4617 "hint.w"
+#line 4618 "hint.w"
{while(p!=null)
{/*260:*/
-#line 4644 "hint.w"
+#line 4645 "hint.w"
switch(type(p))
{case hlist_node:case vlist_node:case rule_node:
@@ -310,7 +311,7 @@ default:
pi= hp= dp= 0;
}
/*:260*/
-#line 4619 "hint.w"
+#line 4620 "hint.w"
h+= d+hp;
d= dp;
@@ -326,7 +327,7 @@ p= link(p);
if(tp==null)ht= h;
if(ht>=hvsize)
{/*261:*/
-#line 4671 "hint.w"
+#line 4672 "hint.w"
pointer q= contrib_head;
scaled dh= ht-hvsize/2;
@@ -334,7 +335,7 @@ p= link(contrib_head);
h= d= 0;
while(p!=null)
{/*260:*/
-#line 4644 "hint.w"
+#line 4645 "hint.w"
switch(type(p))
{case hlist_node:case vlist_node:case rule_node:
@@ -357,7 +358,7 @@ default:
pi= hp= dp= 0;
}
/*:260*/
-#line 4677 "hint.w"
+#line 4678 "hint.w"
h= h+d+hp;
d= dp;
@@ -372,19 +373,19 @@ flush_node_list(link(contrib_head));
link(contrib_head)= p;
}
/*:261*/
-#line 4633 "hint.w"
+#line 4634 "hint.w"
goto found;
}
}
/*:259*/
-#line 4595 "hint.w"
+#line 4596 "hint.w"
}
else if(p!=null&&type(p)==penalty_node)
pi= penalty(p);
/*262:*/
-#line 4696 "hint.w"
+#line 4697 "hint.w"
{pointer h_save= link(contrib_head);
pointer t_save= tail;
@@ -402,7 +403,7 @@ break;
else
p= link(p);
/*260:*/
-#line 4644 "hint.w"
+#line 4645 "hint.w"
switch(type(p))
{case hlist_node:case vlist_node:case rule_node:
@@ -425,7 +426,7 @@ default:
pi= hp= dp= 0;
}
/*:260*/
-#line 4712 "hint.w"
+#line 4713 "hint.w"
h= h+dp+hp;
if(pi<best_pi)
@@ -456,7 +457,7 @@ tail= t_save;
hpos= hpos_save;
}
/*:262*/
-#line 4599 "hint.w"
+#line 4600 "hint.w"
found:
hloc_set(PAGE_LOC(pos0,offset));
@@ -466,7 +467,7 @@ backward_mode= false;
return hint_page_get();
}
/*:258*//*266:*/
-#line 4799 "hint.w"
+#line 4800 "hint.w"
uint64_t hint_outline_page(int i)
{uint64_t pos;
@@ -475,24 +476,24 @@ if(i<0||i> max_outline)return hint_page_get();
pos= hint_outlines[i].pos;
where= hint_outlines[i].where;
/*267:*/
-#line 4810 "hint.w"
+#line 4811 "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 4806 "hint.w"
+#line 4807 "hint.w"
}
/*:266*//*274:*/
-#line 5014 "hint.w"
+#line 5015 "hint.w"
void hint_set_mark(char*m,int s)
{m_str= m;
m_length= s;
/*275:*/
-#line 5025 "hint.w"
+#line 5026 "hint.w"
if(m_length> 0)
{int i,j,k;
@@ -508,12 +509,12 @@ m_length= k;
m_chars= m_length-j;
}
/*:275*/
-#line 5018 "hint.w"
+#line 5019 "hint.w"
hmark_page();
}
/*:274*//*278:*/
-#line 5114 "hint.w"
+#line 5116 "hint.w"
static void m_put(uint32_t d)
{if(m_ptr<MAX_M_DIST)
@@ -550,7 +551,7 @@ x= (x<<7)+y;
}
}
/*:278*//*279:*/
-#line 5155 "hint.w"
+#line 5157 "hint.w"
static int m_next(int i)
{while((0x80&m_dist[i])==0)i++;
@@ -565,12 +566,11 @@ while(i> 0&&(0x80&m_dist[i-1])==0)i--;
return i;
}
/*:279*//*281:*/
-#line 5186 "hint.w"
+#line 5188 "hint.w"
static void next_m_char(uint32_t c)
{
reconsider:
-
if(m_state==0&&c!=m_str[0])
{if(c!=' ')
m_d++;
@@ -586,7 +586,7 @@ m_state= 0;
}
else
/*282:*/
-#line 5220 "hint.w"
+#line 5222 "hint.w"
{int i= 0,j= 0;
do{
@@ -598,82 +598,13 @@ m_state= m_state-i;
goto reconsider;
}
/*:282*/
-#line 5205 "hint.w"
-
+#line 5206 "hint.w"
-}
-/*:281*//*283:*/
-#line 5233 "hint.w"
-
-#if 0
-static void next_m_space(void)
-{if(m_state==0&&m_str[0]==' ')
-{m_state= -1;m_spaces= 1;}
-else if(m_state>=0&&m_str[m_state]==' ')
-{if(m_state==0)m_spaces= 0;
-m_state++;m_spaces++;
-if(m_state==m_length)
-{m_put(m_d);
-m_d= 0;
-m_state= 0;
-}
-else
-m_state= -m_state;
-}
-else if(m_state> 0)
-{m_d= m_d+m_state-m_spaces;m_state= 0;}
-}
-#endif
-/*:283*//*284:*/
-#line 5256 "hint.w"
-
-#if 0
-static void vlist_mark(pointer p);
-static void hlist_mark(pointer p)
-{while(p!=null)
-{if(is_char_node(p)&&!m_ignore)next_m_char(character(p));
-else switch(type(p))
-{case hlist_node:if(list_ptr(p)!=null)hlist_mark(list_ptr(p));break;
-case vlist_node:if(list_ptr(p)!=null)vlist_mark(list_ptr(p));break;
-case ligature_node:
-{pointer q= lig_ptr(p);
-while(q!=null)
-{if(!m_ignore)next_m_char(character(q));q= link(q);
-}
-}
-break;
-case glue_node:if(!m_ignore)next_m_space();break;
-case whatsit_node:
-if(subtype(p)==ignore_node)
-{if(ignore_info(p)==1)
-{hlist_mark(ignore_list(p));
-m_ignore= 1;
-}
-else
-m_ignore= 0;
-}
-break;
-default:break;
-}
-p= link(p);
-}
-}
-static void vlist_mark(pointer p)
-{while(p!=null)
-{switch(type(p))
-{case hlist_node:if(list_ptr(p)!=null)hlist_mark(list_ptr(p));
-if(!m_ignore)next_m_space();break;
-case vlist_node:if(list_ptr(p)!=null)vlist_mark(list_ptr(p));break;
-default:break;
}
-p= link(p);
-}
-}
-#endif
-/*:284*//*286:*/
-#line 5309 "hint.w"
+/*:281*//*284:*/
+#line 5241 "hint.w"
void hmark_page(void)
{if(streams==NULL||streams[0].p==null)return;
@@ -694,14 +625,14 @@ trv_hlist(list_ptr(streams[0].p));
m_put(0xFF);
if(m_focus>=m_max)m_focus= 0;
}
-/*:286*//*293:*/
-#line 5424 "hint.w"
+/*:284*//*291:*/
+#line 5356 "hint.w"
void c_ignore_list(pointer p)
{while(p!=null)
{if(is_char_node(p))
-{/*290:*/
-#line 5364 "hint.w"
+{/*288:*/
+#line 5296 "hint.w"
{while(m_d==0)
{m_style^= MARK_BIT;
@@ -716,8 +647,8 @@ m_d= m_get();
}
m_d--;
}
-/*:290*/
-#line 5428 "hint.w"
+/*:288*/
+#line 5360 "hint.w"
cur_style|= m_style;
}
@@ -728,8 +659,8 @@ case vlist_node:c_ignore_list(list_ptr(p));break;
case ligature_node:
{pointer q= lig_ptr(p);
while(q!=null)
-{/*290:*/
-#line 5364 "hint.w"
+{/*288:*/
+#line 5296 "hint.w"
{while(m_d==0)
{m_style^= MARK_BIT;
@@ -744,8 +675,8 @@ m_d= m_get();
}
m_d--;
}
-/*:290*/
-#line 5438 "hint.w"
+/*:288*/
+#line 5370 "hint.w"
cur_style|= m_style;
q= link(q);
@@ -757,8 +688,8 @@ break;
p= link(p);
}
}
-/*:293*//*294:*/
-#line 5471 "hint.w"
+/*:291*//*292:*/
+#line 5403 "hint.w"
bool hint_prev_mark(void)
{m_focus= m_prev(m_focus);
@@ -778,8 +709,8 @@ m_focus= m_next(0);
}
return(m_focus!=0);
}
-/*:294*//*302:*/
-#line 5572 "hint.w"
+/*:292*//*300:*/
+#line 5504 "hint.w"
static int links_allocated= 0;
void add_new_link(int n,pointer p,scaled h,scaled v)
@@ -809,7 +740,7 @@ pos= ((uint64_t)labels[n].pos<<32)+(labels[n].pos-labels[n].pos0);
pos= ((uint64_t)labels[n].pos0<<32);
#endif
/*:71*/
-#line 5591 "hint.w"
+#line 5523 "hint.w"
t->where= where;
t->pos= pos;
@@ -836,8 +767,8 @@ t->right= h;
else
t->bottom= v;
}
-/*:302*//*303:*/
-#line 5641 "hint.w"
+/*:300*//*301:*/
+#line 5573 "hint.w"
static scaled hlink_distance(scaled x,scaled y,hint_Link*t)
{scaled d,dx= 0,dy= 0;
@@ -857,6 +788,7 @@ if(dx> dy)return dx;
else return dy;
}
+
int hint_find_link(scaled x,scaled y,scaled precission)
{static int last_hit= -1;
int i;
@@ -892,8 +824,8 @@ last_hit= min_i;
return last_hit;
}
}
-/*:303*//*304:*/
-#line 5701 "hint.w"
+/*:301*//*302:*/
+#line 5634 "hint.w"
uint64_t hint_link_page(int i)
{uint64_t h;
@@ -906,15 +838,45 @@ 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*//*323:*/
-#line 6150 "hint.w"
+/*:302*//*304:*/
+#line 5668 "hint.w"
+
+void hint_render_on(void)
+{nativeInit();
+}
+
+void hint_render_off(void)
+{nativeClear();
+}
+/*:304*//*305:*/
+#line 5680 "hint.w"
+
+void hint_dark(int dark)
+{nativeSetDark(dark);
+}
+/*:305*//*306:*/
+#line 5717 "hint.w"
+
+int hint_print_on(int w,int h,unsigned char*bits)
+{return nativePrintStart(w,h,bits);
+}
+
+int hint_print_off(void)
+{return nativePrintEnd();
+}
+
+int hint_print(unsigned char*bits)
+{return nativePrint(bits);
+}
+/*:306*//*324:*/
+#line 6153 "hint.w"
static void render_rule(int x,int y,int w,int h)
{if(w> 0&&h> 0)
nativeRule(SP2PT(x),SP2PT(y),SP2PT(w),SP2PT(h));
}
-/*:323*//*324:*/
-#line 6162 "hint.w"
+/*:324*//*325:*/
+#line 6165 "hint.w"
void render_image(int x,int y,int w,int h,uint32_t n)
{
@@ -924,8 +886,8 @@ hget_section(n);
nativeImage(SP2PT(x),SP2PT(y),SP2PT(w),SP2PT(h),hstart,hend);
hpos= spos;hstart= sstart;hend= send;
}
-/*:324*//*326:*/
-#line 6194 "hint.w"
+/*:325*//*327:*/
+#line 6197 "hint.w"
static void vlist_render(pointer this_box);
@@ -959,16 +921,16 @@ this_box,mem[this_box].i,p);
#endif
base_line= cur_v;
left_edge= cur_h;
-/*299:*/
-#line 5538 "hint.w"
+/*297:*/
+#line 5470 "hint.w"
if(cur_link>=0)
{add_new_link(cur_link,this_box,cur_h,cur_v);
local_link= cur_link;
cur_link= -1;
}
-/*:299*/
-#line 6227 "hint.w"
+/*:297*/
+#line 6230 "hint.w"
while(p!=null)
{
@@ -984,8 +946,8 @@ if(is_char_node(p))
c= character(p);
if(!c_ignore&&c!=' ')
{cur_style= cur_style&~(MARK_BIT|FOCUS_BIT);
-/*290:*/
-#line 5364 "hint.w"
+/*288:*/
+#line 5296 "hint.w"
{while(m_d==0)
{m_style^= MARK_BIT;
@@ -1000,8 +962,8 @@ m_d= m_get();
}
m_d--;
}
-/*:290*/
-#line 6242 "hint.w"
+/*:288*/
+#line 6245 "hint.w"
cur_style|= m_style;
}
@@ -1050,8 +1012,8 @@ case rule_node:
rule_ht= height(p);rule_dp= depth(p);rule_wd= width(p);
goto fin_rule;
case whatsit_node:
-/*292:*/
-#line 5401 "hint.w"
+/*290:*/
+#line 5333 "hint.w"
if(subtype(p)==ignore_node)
{if(ignore_info(p)==1)
@@ -1062,11 +1024,11 @@ c_ignore= true;
else
c_ignore= false;
}
-/*:292*/
-#line 6290 "hint.w"
+/*:290*/
+#line 6293 "hint.w"
-else/*297:*/
-#line 5512 "hint.w"
+else/*295:*/
+#line 5444 "hint.w"
if(subtype(p)==start_link_node)
{cur_style|= LINK_BIT;
@@ -1078,8 +1040,8 @@ else if(subtype(p)==end_link_node)
end_new_link(local_link,this_box,cur_h,cur_v);
local_link= -1;
}
-/*:297*/
-#line 6291 "hint.w"
+/*:295*/
+#line 6294 "hint.w"
else if(subtype(p)==image_node)
{scaled h,w;
@@ -1156,16 +1118,16 @@ break;
case ligature_node:
f= font(lig_char(p));
c= character(lig_char(p));
-/*291:*/
-#line 5383 "hint.w"
+/*289:*/
+#line 5315 "hint.w"
if(!c_ignore)
{pointer q;
cur_style= cur_style&~(MARK_BIT|FOCUS_BIT);
q= lig_ptr(p);
while(q!=null)
-{/*290:*/
-#line 5364 "hint.w"
+{/*288:*/
+#line 5296 "hint.w"
{while(m_d==0)
{m_style^= MARK_BIT;
@@ -1180,15 +1142,15 @@ m_d= m_get();
}
m_d--;
}
-/*:290*/
-#line 5389 "hint.w"
+/*:288*/
+#line 5321 "hint.w"
cur_style|= m_style;
q= link(q);
}
}
-/*:291*/
-#line 6367 "hint.w"
+/*:289*/
+#line 6370 "hint.w"
goto render_c;
default:;
@@ -1214,15 +1176,15 @@ QUIT("Undefined link in hlist mem[0x%x]=0x%x\n",p,mem[p].i);
p= link(p);
}
}
-/*298:*/
-#line 5528 "hint.w"
+/*296:*/
+#line 5460 "hint.w"
if(local_link>=0)
{end_new_link(local_link,this_box,cur_h,cur_v);
cur_link= local_link;
}
-/*:298*/
-#line 6392 "hint.w"
+/*:296*/
+#line 6395 "hint.w"
}
@@ -1374,15 +1336,15 @@ p= link(p);
}
}
-/*:326*//*327:*/
-#line 6550 "hint.w"
+/*:327*//*328:*/
+#line 6553 "hint.w"
uint64_t hint_blank(void)
{nativeBlank();
return 0;
}
-/*:327*//*328:*/
-#line 6559 "hint.w"
+/*:328*//*329:*/
+#line 6562 "hint.w"
void hint_render(void)
@@ -1392,19 +1354,19 @@ cur_h= 0;
cur_v= height(streams[0].p);
cur_f= -1;cur_fp= NULL;
cur_link= -1;max_link= -1;
-/*289:*/
-#line 5357 "hint.w"
+/*287:*/
+#line 5289 "hint.w"
m_ptr= 0;m_d= 0;m_style= MARK_BIT;c_ignore= false;cur_style= 0;
-/*:289*/
-#line 6568 "hint.w"
+/*:287*/
+#line 6571 "hint.w"
if(type(streams[0].p)==vlist_node)
vlist_render(streams[0].p);
else
hlist_render(streams[0].p);
}
-/*:328*/
-#line 7608 "hint.w"
+/*:329*/
+#line 7624 "hint.w"
-/*:374*/
+/*:375*/
diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/hrender.h b/Build/source/texk/web2c/hitexdir/hintview/src/hrender.h
index 6978b82491e..be903480c2c 100644
--- a/Build/source/texk/web2c/hitexdir/hintview/src/hrender.h
+++ b/Build/source/texk/web2c/hitexdir/hintview/src/hrender.h
@@ -1,23 +1,23 @@
-/*373:*/
-#line 7563 "hint.w"
+/*374:*/
+#line 7574 "hint.w"
#ifndef _HRENDER_H
#define _HRENDER_H
/*276:*/
-#line 5047 "hint.w"
+#line 5048 "hint.w"
#define MARK_BIT 0x1
#define FOCUS_BIT 0x2
-/*:276*//*295:*/
-#line 5497 "hint.w"
+/*:276*//*293:*/
+#line 5429 "hint.w"
#define LINK_BIT 0x4
-/*:295*//*320:*/
-#line 6124 "hint.w"
+/*:293*//*321:*/
+#line 6127 "hint.w"
#define SP2PT(X) ((X)/(double)(1<<16))
-/*:320*/
-#line 7566 "hint.w"
+/*:321*/
+#line 7577 "hint.w"
extern int page_h,page_v;
@@ -40,6 +40,11 @@ extern bool hint_prev_mark(void);
extern bool hint_next_mark(void);
extern double hint_get_fpos(void);
extern uint64_t hint_set_fpos(double fpos);
-
+extern void hint_render_on(void);
+extern void hint_render_off(void);
+extern void hint_dark(int dark);
+extern int hint_print_on(int w,int h,unsigned char*bits);
+extern int hint_print_off(void);
+extern int hint_print(unsigned char*bits);
#endif
-/*:373*/
+/*:374*/
diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/htex.c b/Build/source/texk/web2c/hitexdir/hintview/src/htex.c
index e4aa63ad1e2..63d4db0b146 100644
--- a/Build/source/texk/web2c/hitexdir/hintview/src/htex.c
+++ b/Build/source/texk/web2c/hitexdir/hintview/src/htex.c
@@ -1,5 +1,5 @@
/*4:*/
-#line 255 "htex.w"
+#line 264 "htex.w"
#ifndef _HETX_H_
#define _HTEX_H_
@@ -17,19 +17,19 @@
#include "hprint.h"
#endif
/*120:*/
-#line 2578 "htex.w"
+#line 2590 "htex.w"
pointer temp_ptr;
/*:120*//*121:*/
-#line 2610 "htex.w"
+#line 2622 "htex.w"
memory_word mem0[mem_max-mem_min+1],*const mem= mem0-mem_min;
pointer lo_mem_max;
pointer hi_mem_min;
/*:121*//*122:*/
-#line 2623 "htex.w"
+#line 2635 "htex.w"
static int var_used,dyn_used;
#ifdef STAT
@@ -41,17 +41,17 @@ static int var_used,dyn_used;
#endif
/*:122*//*123:*/
-#line 2647 "htex.w"
+#line 2659 "htex.w"
static pointer avail;
/*:123*//*129:*/
-#line 2750 "htex.w"
+#line 2762 "htex.w"
static pointer rover;
/*:129*//*658:*/
-#line 13057 "htex.w"
+#line 13069 "htex.w"
static scaled total_stretch0[filll-normal+1],
*const total_stretch= total_stretch0-normal,
@@ -59,24 +59,24 @@ total_shrink0[filll-normal+1],*const total_shrink= total_shrink0-normal;
/*:658*//*660:*/
-#line 13069 "htex.w"
+#line 13081 "htex.w"
pointer adjust_tail= null;
/*:660*//*829:*/
-#line 16194 "htex.w"
+#line 16206 "htex.w"
pointer just_box;
/*:829*//*837:*/
-#line 16331 "htex.w"
+#line 16343 "htex.w"
static pointer passive;
static pointer printed_node;
static halfword pass_number;
/*:837*//*840:*/
-#line 16371 "htex.w"
+#line 16383 "htex.w"
static scaled active_width0[6],*const active_width= active_width0-1;
@@ -86,12 +86,12 @@ static scaled background0[6],*const background= background0-1;
static scaled break_width0[6],*const break_width= break_width0-1;
/*:840*//*843:*/
-#line 16430 "htex.w"
+#line 16442 "htex.w"
static bool no_shrink_error_yet;
/*:843*//*847:*/
-#line 16473 "htex.w"
+#line 16485 "htex.w"
static pointer cur_p;
static bool second_pass;
@@ -99,7 +99,7 @@ static bool final_pass;
static int threshold;
/*:847*//*853:*/
-#line 16575 "htex.w"
+#line 16587 "htex.w"
static int minimal_demerits0[tight_fit-very_loose_fit+1],
*const minimal_demerits= minimal_demerits0-very_loose_fit;
@@ -114,12 +114,12 @@ static halfword best_pl_line0[tight_fit-very_loose_fit+1],
/*:853*//*860:*/
-#line 16697 "htex.w"
+#line 16709 "htex.w"
static scaled disc_width;
/*:860*//*869:*/
-#line 16840 "htex.w"
+#line 16852 "htex.w"
static halfword easy_line;
static halfword last_special_line;
@@ -131,7 +131,7 @@ static scaled first_indent;
static scaled second_indent;
/*:869*//*895:*/
-#line 17346 "htex.w"
+#line 17358 "htex.w"
static pointer best_bet;
static int fewest_demerits;
@@ -142,13 +142,13 @@ static int line_diff;
/*:895*//*996:*/
-#line 19150 "htex.w"
+#line 19162 "htex.w"
scaled best_height_plus_depth;
/*:996*//*1005:*/
-#line 19352 "htex.w"
+#line 19364 "htex.w"
pointer page_tail;
int page_contents;
@@ -158,37 +158,37 @@ int least_page_cost;
scaled best_size;
/*:1005*//*1007:*/
-#line 19434 "htex.w"
+#line 19446 "htex.w"
scaled page_so_far[8];
int insert_penalties;
/*:1007*/
-#line 271 "htex.w"
+#line 280 "htex.w"
/*97:*/
-#line 2100 "htex.w"
+#line 2112 "htex.w"
void overflow(char*s,int n)
{QUIT("Capacity exceeded, sorry [%s=%d=0x%X]\n",s,n,n);
}
/*:97*//*98:*/
-#line 2113 "htex.w"
+#line 2125 "htex.w"
void confusion(char*s)
{QUIT("This can't happen(%s)",s);}
/*:98*/
-#line 273 "htex.w"
+#line 282 "htex.w"
#endif
/*:4*//*103:*/
-#line 2180 "htex.w"
+#line 2192 "htex.w"
static int half(int x)
@@ -197,13 +197,13 @@ else return x/2;
}
/*:103*//*108:*/
-#line 2278 "htex.w"
+#line 2290 "htex.w"
static bool arith_error;
static scaled rem;
/*:108*//*110:*/
-#line 2302 "htex.w"
+#line 2314 "htex.w"
static scaled x_over_n(scaled x,int n)
{bool negative;
@@ -225,7 +225,7 @@ if(negative)negate(rem);
return x_over_n;}
/*:110*//*111:*/
-#line 2329 "htex.w"
+#line 2341 "htex.w"
static scaled xn_over_d(scaled x,int n,int d)
{bool positive;
@@ -247,7 +247,7 @@ else{xn_over_d= -u;rem= -(v%d);
return xn_over_d;}
/*:111*//*112:*/
-#line 2369 "htex.w"
+#line 2381 "htex.w"
halfword badness(scaled t,scaled s)
{int r;
@@ -263,7 +263,7 @@ else return(r*r*r+0400000)/01000000;
}
/*:112*//*125:*/
-#line 2666 "htex.w"
+#line 2678 "htex.w"
static pointer get_avail(void)
{pointer p;
@@ -286,7 +286,7 @@ return p;
}
/*:125*//*128:*/
-#line 2713 "htex.w"
+#line 2725 "htex.w"
static void flush_list(pointer p)
@@ -303,7 +303,7 @@ link(q)= avail;avail= p;
}
/*:128*//*130:*/
-#line 2761 "htex.w"
+#line 2773 "htex.w"
pointer get_node(int s)
{
@@ -313,7 +313,7 @@ int r;
int t;
restart:p= rover;
do{/*132:*/
-#line 2813 "htex.w"
+#line 2825 "htex.w"
q= p+node_size(p);
@@ -325,7 +325,7 @@ q= q+node_size(q);
}
r= q-s;
if(r> p+1)/*133:*/
-#line 2828 "htex.w"
+#line 2840 "htex.w"
{node_size(p)= r-p;
@@ -334,11 +334,11 @@ goto found;
}
/*:133*/
-#line 2823 "htex.w"
+#line 2835 "htex.w"
;
if(r==p)if(rlink(p)!=p)
/*134:*/
-#line 2837 "htex.w"
+#line 2849 "htex.w"
{rover= rlink(p);t= llink(p);
llink(rover)= t;rlink(t)= rover;
@@ -346,12 +346,12 @@ goto found;
}
/*:134*/
-#line 2825 "htex.w"
+#line 2837 "htex.w"
;
node_size(p)= q-p
/*:132*/
-#line 2770 "htex.w"
+#line 2782 "htex.w"
;
p= rlink(p);
@@ -361,7 +361,7 @@ if(s==010000000000)
}
if(lo_mem_max+2<hi_mem_min)if(lo_mem_max+2<=mem_bot+max_halfword)
/*131:*/
-#line 2798 "htex.w"
+#line 2810 "htex.w"
{if(hi_mem_min-lo_mem_max>=1998)t= lo_mem_max+1000;
else t= lo_mem_max+1+(hi_mem_min-lo_mem_max)/2;
@@ -374,7 +374,7 @@ rover= q;goto restart;
}
/*:131*/
-#line 2778 "htex.w"
+#line 2790 "htex.w"
;
overflow("main memory size",mem_max+1-mem_min);
@@ -389,7 +389,7 @@ return r;
}
/*:130*//*135:*/
-#line 2848 "htex.w"
+#line 2860 "htex.w"
static void free_node(pointer p,halfword s)
@@ -406,7 +406,7 @@ var_used= var_used-s;
}
/*:135*//*141:*/
-#line 2999 "htex.w"
+#line 3011 "htex.w"
pointer new_null_box(void)
{pointer p;
@@ -418,7 +418,7 @@ return p;
}
/*:141*//*144:*/
-#line 3030 "htex.w"
+#line 3042 "htex.w"
pointer new_rule(void)
{pointer p;
@@ -429,7 +429,7 @@ return p;
}
/*:144*//*149:*/
-#line 3100 "htex.w"
+#line 3112 "htex.w"
pointer new_ligature(quarterword f,quarterword c,pointer q)
{pointer p;
@@ -440,7 +440,7 @@ subtype(p)= 0;return p;
/*:149*//*150:*/
-#line 3134 "htex.w"
+#line 3146 "htex.w"
pointer new_disc(void)
{pointer p;
@@ -450,7 +450,7 @@ return p;
}
/*:150*//*152:*/
-#line 3169 "htex.w"
+#line 3181 "htex.w"
pointer new_math(scaled w,small_number s)
{pointer p;
@@ -459,7 +459,7 @@ subtype(p)= s;width(p)= w;return p;
}
/*:152*//*156:*/
-#line 3252 "htex.w"
+#line 3264 "htex.w"
pointer new_spec(pointer p)
{pointer q;
@@ -470,7 +470,7 @@ return q;
}
/*:156*//*158:*/
-#line 3279 "htex.w"
+#line 3291 "htex.w"
pointer new_glue(pointer q)
{pointer p;
@@ -480,7 +480,7 @@ return p;
}
/*:158*//*161:*/
-#line 3318 "htex.w"
+#line 3330 "htex.w"
pointer new_kern(scaled w)
{pointer p;
@@ -491,7 +491,7 @@ return p;
}
/*:161*//*163:*/
-#line 3342 "htex.w"
+#line 3354 "htex.w"
pointer new_penalty(int m)
{pointer p;
@@ -501,12 +501,12 @@ penalty(p)= m;return p;
}
/*:163*//*169:*/
-#line 3422 "htex.w"
+#line 3434 "htex.w"
void mem_init(void)
{int k;
/*170:*/
-#line 3428 "htex.w"
+#line 3440 "htex.w"
for(k= mem_bot+1;k<=lo_mem_stat_max;k++)mem[k].sc= 0;
@@ -525,34 +525,34 @@ 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 15737 "htex.w"
+#line 15749 "htex.w"
info(omit_template)= end_template_token;
/*:804*//*811:*/
-#line 15844 "htex.w"
+#line 15856 "htex.w"
link(end_span)= max_quarterword+1;info(end_span)= null;
/*:811*//*835:*/
-#line 16300 "htex.w"
+#line 16312 "htex.w"
type(last_active)= hyphenated;line_number(last_active)= max_halfword;
subtype(last_active)= 0;
/*:835*//*1006:*/
-#line 19405 "htex.w"
+#line 19417 "htex.w"
subtype(page_ins_head)= qi(255);
type(page_ins_head)= split_up;link(page_ins_head)= page_ins_head;
/*:1006*//*1013:*/
-#line 19561 "htex.w"
+#line 19573 "htex.w"
type(page_head)= glue_node;subtype(page_head)= normal;
/*:1013*/
-#line 3445 "htex.w"
+#line 3457 "htex.w"
;
avail= null;
hi_mem_min= hi_mem_stat_min;
@@ -560,12 +560,12 @@ var_used= lo_mem_stat_max+1-mem_bot;dyn_used= hi_mem_stat_usage;
/*:170*/
-#line 3425 "htex.w"
+#line 3437 "htex.w"
}
/*:169*//*209:*/
-#line 3976 "htex.w"
+#line 3988 "htex.w"
static void delete_token_ref(pointer p)
@@ -574,7 +574,7 @@ else decr(token_ref_count(p));
}
/*:209*//*210:*/
-#line 3991 "htex.w"
+#line 4003 "htex.w"
void delete_glue_ref(pointer p)
fast_delete_glue_ref(p)
@@ -585,7 +585,7 @@ else decr(xdimen_ref_count(p));
}
/*:210*//*211:*/
-#line 4005 "htex.w"
+#line 4017 "htex.w"
void flush_node_list(pointer p)
{
@@ -606,7 +606,7 @@ delete_glue_ref(split_top_ptr(p));
free_node(p,ins_node_size);goto done;
}
case whatsit_node:/*1387:*/
-#line 25384 "htex.w"
+#line 25395 "htex.w"
{switch(subtype(p)){
case close_node:case language_node:free_node(p,small_node_size);break;
@@ -682,7 +682,7 @@ goto done;
}
/*:1387*/
-#line 4024 "htex.w"
+#line 4036 "htex.w"
case glue_node:{fast_delete_glue_ref(glue_ptr(p));
if(leader_ptr(p)!=null)flush_node_list(leader_ptr(p));
@@ -703,7 +703,7 @@ p= q;
}
/*:211*//*213:*/
-#line 4068 "htex.w"
+#line 4080 "htex.w"
pointer copy_node_list(pointer p)
@@ -714,12 +714,12 @@ int words;
h= get_avail();q= h;
while(p!=null)
{/*214:*/
-#line 4084 "htex.w"
+#line 4096 "htex.w"
words= 1;
if(is_char_node(p))r= get_avail();
else/*215:*/
-#line 4093 "htex.w"
+#line 4105 "htex.w"
switch(type(p)){
case hlist_node:case vlist_node:case unset_node:{r= get_node(box_node_size);
@@ -735,7 +735,7 @@ ins_ptr(r)= copy_node_list(ins_ptr(p));
words= ins_node_size-1;
}break;
case whatsit_node:/*1386:*/
-#line 25266 "htex.w"
+#line 25277 "htex.w"
switch(subtype(p)){
case open_node:{r= get_node(open_node_size);words= open_node_size;
@@ -855,7 +855,7 @@ default:confusion("ext2");
}
/*:1386*/
-#line 4108 "htex.w"
+#line 4120 "htex.w"
break;
case glue_node:{r= get_node(small_node_size);add_glue_ref(glue_ptr(p));
glue_ptr(r)= glue_ptr(p);leader_ptr(r)= copy_node_list(leader_ptr(p));
@@ -882,14 +882,14 @@ default:confusion("copying");
}
/*:215*/
-#line 4088 "htex.w"
+#line 4100 "htex.w"
;
while(words> 0)
{decr(words);mem[r+words]= mem[p+words];
}
/*:214*/
-#line 4077 "htex.w"
+#line 4089 "htex.w"
;
link(q)= r;q= r;p= link(p);
}
@@ -898,11 +898,11 @@ return q;
}
/*:213*//*224:*/
-#line 4458 "htex.w"
+#line 4470 "htex.w"
/*222:*/
-#line 4439 "htex.w"
+#line 4451 "htex.w"
static list_state_record nest[nest_size+1];
int nest_ptr;
@@ -910,7 +910,7 @@ static int max_nest_stack;
list_state_record cur_list;
/*:222*/
-#line 4460 "htex.w"
+#line 4472 "htex.w"
void list_init(void)
@@ -921,7 +921,7 @@ mode= vmode;head= contrib_head;tail= contrib_head;
prev_height= prev_depth= ignore_depth;
}
/*:224*//*226:*/
-#line 4478 "htex.w"
+#line 4490 "htex.w"
void push_nest(void)
{if(nest_ptr> max_nest_stack)
@@ -935,14 +935,14 @@ cur_list.bs_pos= NULL;cur_bs= baseline_skip;cur_ls= line_skip;cur_lsl= line_skip
}
/*:226*//*227:*/
-#line 4495 "htex.w"
+#line 4507 "htex.w"
void pop_nest(void)
{free_avail(head);decr(nest_ptr);cur_list= nest[nest_ptr];
}
/*:227*//*560:*/
-#line 10871 "htex.w"
+#line 10883 "htex.w"
memory_word font_info[font_mem_size+1];
@@ -993,7 +993,7 @@ static int16_t font_false_bchar0[font_max-font_base+1],
/*:560*//*561:*/
-#line 10929 "htex.w"
+#line 10941 "htex.w"
int char_base0[font_max-font_base+1],
*const char_base= char_base0-font_base;
@@ -1024,7 +1024,7 @@ static int param_base0[font_max-font_base+1],
/*:561*//*571:*/
-#line 11084 "htex.w"
+#line 11096 "htex.w"
void read_font_info(int f,char*nom,scaled s)
{
@@ -1040,18 +1040,18 @@ scaled z;
int alpha;int beta;
/*573:*/
-#line 11133 "htex.w"
+#line 11145 "htex.w"
/*574:*/
-#line 11145 "htex.w"
+#line 11157 "htex.w"
file_opened= true
/*:574*/
-#line 11134 "htex.w"
+#line 11146 "htex.w"
;
/*576:*/
-#line 11169 "htex.w"
+#line 11181 "htex.w"
{read_sixteen(lf);
fget;read_sixteen(lh);
@@ -1074,10 +1074,10 @@ if((nw==0)||(nh==0)||(nd==0)||(ni==0))abort;
}
/*:576*/
-#line 11135 "htex.w"
+#line 11147 "htex.w"
;
/*577:*/
-#line 11196 "htex.w"
+#line 11208 "htex.w"
lf= lf-6-lh;
if(np<7)lf= lf+7-np;
@@ -1094,10 +1094,10 @@ exten_base[f]= kern_base[f]+kern_base_offset+nk;
param_base[f]= exten_base[f]+ne
/*:577*/
-#line 11136 "htex.w"
+#line 11148 "htex.w"
;
/*579:*/
-#line 11224 "htex.w"
+#line 11236 "htex.w"
{if(lh<2)abort;
store_four_quarters(font_check[f]);
@@ -1115,10 +1115,10 @@ font_size[f]= z;
}
/*:579*/
-#line 11137 "htex.w"
+#line 11149 "htex.w"
;
/*580:*/
-#line 11240 "htex.w"
+#line 11252 "htex.w"
for(k= fmem_ptr;k<=width_base[f]-1;k++)
{store_four_quarters(font_info[k].qqqq);
@@ -1128,7 +1128,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 11261 "htex.w"
+#line 11273 "htex.w"
{check_byte_range(d);
while(d<current_character_being_worked_on)
@@ -1141,20 +1141,20 @@ if(d==current_character_being_worked_on)abort;
not_found:;}
/*:581*/
-#line 11248 "htex.w"
+#line 11260 "htex.w"
break;
default:do_nothing;
}
}
/*:580*/
-#line 11138 "htex.w"
+#line 11150 "htex.w"
;
/*582:*/
-#line 11296 "htex.w"
+#line 11308 "htex.w"
{/*583:*/
-#line 11306 "htex.w"
+#line 11318 "htex.w"
{alpha= 16;
while(z>=040000000)
@@ -1164,7 +1164,7 @@ beta= 256/alpha;alpha= alpha*z;
}
/*:583*/
-#line 11297 "htex.w"
+#line 11309 "htex.w"
;
for(k= width_base[f];k<=lig_kern_base[f]-1;k++)
store_scaled(font_info[k].sc);
@@ -1175,10 +1175,10 @@ if(font_info[italic_base[f]].sc!=0)abort;
}
/*:582*/
-#line 11139 "htex.w"
+#line 11151 "htex.w"
;
/*584:*/
-#line 11320 "htex.w"
+#line 11332 "htex.w"
bch_label= 077777;bchar= 256;
if(nl> 0)
@@ -1200,10 +1200,10 @@ for(k= kern_base[f]+kern_base_offset;k<=exten_base[f]-1;k++)
store_scaled(font_info[k].sc);
/*:584*/
-#line 11140 "htex.w"
+#line 11152 "htex.w"
;
/*585:*/
-#line 11340 "htex.w"
+#line 11352 "htex.w"
for(k= exten_base[f];k<=param_base[f]-1;k++)
{store_four_quarters(font_info[k].qqqq);
@@ -1214,10 +1214,10 @@ check_existence(d);
}
/*:585*/
-#line 11141 "htex.w"
+#line 11153 "htex.w"
;
/*586:*/
-#line 11352 "htex.w"
+#line 11364 "htex.w"
{for(k= 1;k<=np;k++)
if(k==1)
@@ -1232,10 +1232,10 @@ for(k= np+1;k<=7;k++)font_info[param_base[f]+k-1].sc= 0;
}
/*:586*/
-#line 11142 "htex.w"
+#line 11154 "htex.w"
;
/*587:*/
-#line 11372 "htex.w"
+#line 11384 "htex.w"
if(np>=7)font_params[f]= np;else font_params[f]= 7;
hyphen_char[f]= skew_char[f]= -1;
@@ -1255,18 +1255,18 @@ decr(param_base[f]);
fmem_ptr= fmem_ptr+lf;goto done
/*:587*/
-#line 11143 "htex.w"
+#line 11155 "htex.w"
/*:573*/
-#line 11100 "htex.w"
+#line 11112 "htex.w"
;
bad_tfm:QUIT("Bad tfm file: %s\n",nom);
done:;
}
/*:571*//*593:*/
-#line 11475 "htex.w"
+#line 11487 "htex.w"
pointer new_character(internal_font_number f,eight_bits c)
{pointer p;
@@ -1279,7 +1279,7 @@ return p;
}
/*:593*//*662:*/
-#line 13076 "htex.w"
+#line 13088 "htex.w"
pointer hpack(pointer p,scaled w,small_number m)
{
@@ -1296,7 +1296,7 @@ r= get_node(box_node_size);type(r)= hlist_node;
subtype(r)= min_quarterword;shift_amount(r)= 0;
q= r+list_offset;link(q)= p;
h= 0;/*663:*/
-#line 13102 "htex.w"
+#line 13114 "htex.w"
d= 0;x= 0;
total_stretch[normal]= 0;total_shrink[normal]= 0;
@@ -1305,15 +1305,15 @@ total_stretch[fill]= 0;total_shrink[fill]= 0;
total_stretch[filll]= 0;total_shrink[filll]= 0
/*:663*/
-#line 13091 "htex.w"
+#line 13103 "htex.w"
;
while(p!=null)/*664:*/
-#line 13109 "htex.w"
+#line 13121 "htex.w"
{reswitch:while(is_char_node(p))
/*667:*/
-#line 13154 "htex.w"
+#line 13166 "htex.w"
{f= font(p);i= char_info(f,character(p));hd= height_depth(i);
x= x+char_width(f,i);
@@ -1323,14 +1323,14 @@ p= link(p);
}
/*:667*/
-#line 13113 "htex.w"
+#line 13125 "htex.w"
;
if(p!=null)
{switch(type(p)){
case hlist_node:case vlist_node:case rule_node:
case unset_node:
/*666:*/
-#line 13142 "htex.w"
+#line 13154 "htex.w"
{x= x+width(p);
if(type(p)>=rule_node)s= 0;else s= shift_amount(p);
@@ -1339,11 +1339,11 @@ if(depth(p)+s> d)d= depth(p)+s;
}
/*:666*/
-#line 13119 "htex.w"
+#line 13131 "htex.w"
break;
case ins_node:case mark_node:case adjust_node:if(adjust_tail!=null)
/*668:*/
-#line 13169 "htex.w"
+#line 13181 "htex.w"
{while(link(q)!=p)q= link(q);
if(type(p)==adjust_node)
@@ -1357,10 +1357,10 @@ link(q)= p;p= q;
}
/*:668*/
-#line 13121 "htex.w"
+#line 13133 "htex.w"
break;
case whatsit_node:/*1389:*/
-#line 25464 "htex.w"
+#line 25475 "htex.w"
if(subtype(p)==image_node)
{if(image_height(p)> h)h= image_height(p);
@@ -1368,10 +1368,10 @@ x= x+image_width(p);
}
/*:1389*/
-#line 13122 "htex.w"
+#line 13134 "htex.w"
;break;
case glue_node:/*669:*/
-#line 13181 "htex.w"
+#line 13193 "htex.w"
{g= glue_ptr(p);x= x+width(g);
o= stretch_order(g);total_stretch[o]= total_stretch[o]+stretch(g);
@@ -1384,18 +1384,18 @@ if(depth(g)> d)d= depth(g);
}
/*:669*/
-#line 13123 "htex.w"
+#line 13135 "htex.w"
break;
case kern_node:case math_node:x= x+width(p);break;
case ligature_node:/*665:*/
-#line 13133 "htex.w"
+#line 13145 "htex.w"
{mem[lig_trick]= mem[lig_char(p)];link(lig_trick)= link(p);
p= lig_trick;goto reswitch;
}
/*:665*/
-#line 13125 "htex.w"
+#line 13137 "htex.w"
default:do_nothing;
}
@@ -1405,12 +1405,12 @@ p= link(p);
/*:664*/
-#line 13094 "htex.w"
+#line 13106 "htex.w"
;
if(adjust_tail!=null)link(adjust_tail)= null;
height(r)= h;depth(r)= d;
/*670:*/
-#line 13195 "htex.w"
+#line 13207 "htex.w"
if(m==additional)w= x+w;
width(r)= w;x= w-x;
@@ -1420,10 +1420,10 @@ set_glue_ratio_zero(glue_set(r));
goto end;
}
else if(x> 0)/*671:*/
-#line 13208 "htex.w"
+#line 13220 "htex.w"
{/*672:*/
-#line 13219 "htex.w"
+#line 13231 "htex.w"
if(total_stretch[filll]!=0)o= filll;
else if(total_stretch[fill]!=0)o= fill;
@@ -1431,10 +1431,10 @@ else if(total_stretch[fil]!=0)o= fil;
else o= normal
/*:672*/
-#line 13209 "htex.w"
+#line 13221 "htex.w"
;
glue_order(r)= o;glue_sign(r)= stretching;
-if(total_stretch[o]!=0)glue_set(r)= unfloat(x/(double)total_stretch[o]);
+if(total_stretch[o]!=0)glue_set(r)= fix(x/(double)total_stretch[o]);
else{glue_sign(r)= normal;
set_glue_ratio_zero(glue_set(r));
@@ -1443,13 +1443,13 @@ goto end;
}
/*:671*/
-#line 13204 "htex.w"
+#line 13216 "htex.w"
else/*677:*/
-#line 13264 "htex.w"
+#line 13276 "htex.w"
{/*678:*/
-#line 13277 "htex.w"
+#line 13289 "htex.w"
if(total_shrink[filll]!=0)o= filll;
else if(total_shrink[fill]!=0)o= fill;
@@ -1457,10 +1457,10 @@ else if(total_shrink[fil]!=0)o= fil;
else o= normal
/*:678*/
-#line 13265 "htex.w"
+#line 13277 "htex.w"
;
glue_order(r)= o;glue_sign(r)= shrinking;
-if(total_shrink[o]!=0)glue_set(r)= unfloat((-x)/(double)total_shrink[o]);
+if(total_shrink[o]!=0)glue_set(r)= fix((-x)/(double)total_shrink[o]);
else{glue_sign(r)= normal;
set_glue_ratio_zero(glue_set(r));
@@ -1471,17 +1471,17 @@ goto end;
}
/*:677*/
-#line 13206 "htex.w"
+#line 13218 "htex.w"
/*:670*/
-#line 13098 "htex.w"
+#line 13110 "htex.w"
;
end:return r;
}
/*:662*//*682:*/
-#line 13317 "htex.w"
+#line 13329 "htex.w"
pointer vpackage(pointer p,scaled h,small_number m,scaled l)
{
@@ -1494,7 +1494,7 @@ r= get_node(box_node_size);type(r)= vlist_node;
subtype(r)= min_quarterword;shift_amount(r)= 0;
list_ptr(r)= p;
w= 0;/*663:*/
-#line 13102 "htex.w"
+#line 13114 "htex.w"
d= 0;x= 0;
total_stretch[normal]= 0;total_shrink[normal]= 0;
@@ -1503,10 +1503,10 @@ total_stretch[fill]= 0;total_shrink[fill]= 0;
total_stretch[filll]= 0;total_shrink[filll]= 0
/*:663*/
-#line 13328 "htex.w"
+#line 13340 "htex.w"
;
while(p!=null)/*683:*/
-#line 13341 "htex.w"
+#line 13353 "htex.w"
{if(is_char_node(p))confusion("vpack");
@@ -1514,7 +1514,7 @@ else switch(type(p)){
case hlist_node:case vlist_node:case rule_node:
case unset_node:
/*684:*/
-#line 13358 "htex.w"
+#line 13370 "htex.w"
{x= x+d+height(p);d= depth(p);
if(type(p)>=rule_node)s= 0;else s= shift_amount(p);
@@ -1522,10 +1522,10 @@ if(width(p)+s> w)w= width(p)+s;
}
/*:684*/
-#line 13348 "htex.w"
+#line 13360 "htex.w"
break;
case whatsit_node:/*1388:*/
-#line 25458 "htex.w"
+#line 25469 "htex.w"
if(subtype(p)==image_node)
{if(image_width(p)> w)w= image_width(p);
@@ -1533,10 +1533,10 @@ x= x+d+image_height(p);d= 0;
}
/*:1388*/
-#line 13349 "htex.w"
+#line 13361 "htex.w"
;break;
case glue_node:/*685:*/
-#line 13364 "htex.w"
+#line 13376 "htex.w"
{x= x+d;d= 0;
g= glue_ptr(p);x= x+width(g);
@@ -1549,7 +1549,7 @@ if(width(g)> w)w= width(g);
}
/*:685*/
-#line 13350 "htex.w"
+#line 13362 "htex.w"
break;
case kern_node:{x= x+d+width(p);d= 0;
}break;
@@ -1559,7 +1559,7 @@ p= link(p);
}
/*:683*/
-#line 13330 "htex.w"
+#line 13342 "htex.w"
;
width(r)= w;
if(d> l)
@@ -1567,7 +1567,7 @@ if(d> l)
}
else depth(r)= d;
/*686:*/
-#line 13378 "htex.w"
+#line 13390 "htex.w"
if(m==additional)h= x+h;
height(r)= h;x= h-x;
@@ -1577,10 +1577,10 @@ set_glue_ratio_zero(glue_set(r));
goto end;
}
else if(x> 0)/*687:*/
-#line 13391 "htex.w"
+#line 13403 "htex.w"
{/*672:*/
-#line 13219 "htex.w"
+#line 13231 "htex.w"
if(total_stretch[filll]!=0)o= filll;
else if(total_stretch[fill]!=0)o= fill;
@@ -1588,10 +1588,10 @@ else if(total_stretch[fil]!=0)o= fil;
else o= normal
/*:672*/
-#line 13392 "htex.w"
+#line 13404 "htex.w"
;
glue_order(r)= o;glue_sign(r)= stretching;
-if(total_stretch[o]!=0)glue_set(r)= unfloat(x/(double)total_stretch[o]);
+if(total_stretch[o]!=0)glue_set(r)= fix(x/(double)total_stretch[o]);
else{glue_sign(r)= normal;
set_glue_ratio_zero(glue_set(r));
@@ -1600,13 +1600,13 @@ goto end;
}
/*:687*/
-#line 13387 "htex.w"
+#line 13399 "htex.w"
else/*690:*/
-#line 13427 "htex.w"
+#line 13439 "htex.w"
{/*678:*/
-#line 13277 "htex.w"
+#line 13289 "htex.w"
if(total_shrink[filll]!=0)o= filll;
else if(total_shrink[fill]!=0)o= fill;
@@ -1614,10 +1614,10 @@ else if(total_shrink[fil]!=0)o= fil;
else o= normal
/*:678*/
-#line 13428 "htex.w"
+#line 13440 "htex.w"
;
glue_order(r)= o;glue_sign(r)= shrinking;
-if(total_shrink[o]!=0)glue_set(r)= unfloat((-x)/(double)total_shrink[o]);
+if(total_shrink[o]!=0)glue_set(r)= fix((-x)/(double)total_shrink[o]);
else{glue_sign(r)= normal;
set_glue_ratio_zero(glue_set(r));
@@ -1628,21 +1628,21 @@ goto end;
}
/*:690*/
-#line 13389 "htex.w"
+#line 13401 "htex.w"
/*:686*/
-#line 13337 "htex.w"
+#line 13349 "htex.w"
;
end:return r;
}
/*:682*//*830:*/
-#line 16202 "htex.w"
+#line 16214 "htex.w"
/*693:*/
-#line 13460 "htex.w"
+#line 13472 "htex.w"
extern pointer happend_to_vlist(pointer b);
void append_to_vlist(pointer b,uint32_t offset)
@@ -1662,7 +1662,7 @@ link(tail)= b;tail= b;prev_depth= depth(b);
}
/*:693*//*844:*/
-#line 16433 "htex.w"
+#line 16445 "htex.w"
static pointer finite_shrink(pointer p)
{pointer q;
@@ -1672,7 +1672,7 @@ delete_glue_ref(p);return q;
}
/*:844*//*848:*/
-#line 16496 "htex.w"
+#line 16508 "htex.w"
static void try_break(int pi,small_number break_type)
{
@@ -1681,7 +1681,7 @@ pointer prev_r;
halfword old_l;
bool no_break_yet;
/*849:*/
-#line 16524 "htex.w"
+#line 16536 "htex.w"
pointer prev_prev_r;
pointer s;
@@ -1702,23 +1702,23 @@ pointer save_link;
scaled shortfall;
/*:849*/
-#line 16503 "htex.w"
+#line 16515 "htex.w"
/*850:*/
-#line 16543 "htex.w"
+#line 16555 "htex.w"
if(abs(pi)>=inf_penalty)
if(pi> 0)goto end;
else pi= eject_penalty
/*:850*/
-#line 16504 "htex.w"
+#line 16516 "htex.w"
;
no_break_yet= true;prev_r= active;old_l= 0;
do_all_six(copy_to_cur_active);
loop{resume:r= link(prev_r);
/*851:*/
-#line 16553 "htex.w"
+#line 16565 "htex.w"
if(type(r)==delta_node)
@@ -1727,10 +1727,10 @@ prev_prev_r= prev_r;prev_r= r;goto resume;
}
/*:851*/
-#line 16509 "htex.w"
+#line 16521 "htex.w"
;
/*855:*/
-#line 16602 "htex.w"
+#line 16614 "htex.w"
{l= line_number(r);
if(l> old_l)
@@ -1738,22 +1738,22 @@ if(l> old_l)
if((minimum_demerits<awful_bad)&&
((old_l!=easy_line)||(r==last_active)))
/*856:*/
-#line 16620 "htex.w"
+#line 16632 "htex.w"
{if(no_break_yet)/*857:*/
-#line 16656 "htex.w"
+#line 16668 "htex.w"
{no_break_yet= false;do_all_six(set_break_width_to_background);
s= cur_p;
if(break_type> unhyphenated)if(cur_p!=null)
/*861:*/
-#line 16700 "htex.w"
+#line 16712 "htex.w"
{t= replace_count(cur_p);v= cur_p;s= post_break(cur_p);
while(t> 0)
{decr(t);v= link(v);
/*862:*/
-#line 16718 "htex.w"
+#line 16730 "htex.w"
if(is_char_node(v))
{f= font(v);
@@ -1772,12 +1772,12 @@ default:confusion("disc1");
}
/*:862*/
-#line 16704 "htex.w"
+#line 16716 "htex.w"
;
}
while(s!=null)
{/*863:*/
-#line 16735 "htex.w"
+#line 16747 "htex.w"
if(is_char_node(s))
{f= font(s);
@@ -1796,7 +1796,7 @@ default:confusion("disc2");
}
/*:863*/
-#line 16707 "htex.w"
+#line 16719 "htex.w"
;
s= link(s);
}
@@ -1806,13 +1806,13 @@ if(post_break(cur_p)==null)s= link(v);
}
/*:861*/
-#line 16660 "htex.w"
+#line 16672 "htex.w"
;
while(s!=null)
{if(is_char_node(s))goto done;
switch(type(s)){
case glue_node:/*858:*/
-#line 16675 "htex.w"
+#line 16687 "htex.w"
{v= glue_ptr(s);break_width[1]= break_width[1]-width(v);
break_width[2+stretch_order(v)]= break_width[2+stretch_order(v)]-stretch(v);
@@ -1820,7 +1820,7 @@ break_width[6]= break_width[6]-shrink(v);
}
/*:858*/
-#line 16664 "htex.w"
+#line 16676 "htex.w"
break;
case penalty_node:do_nothing;break;
case math_node:break_width[1]= break_width[1]-width(s);break;
@@ -1833,10 +1833,10 @@ s= link(s);
done:;}
/*:857*/
-#line 16621 "htex.w"
+#line 16633 "htex.w"
;
/*864:*/
-#line 16761 "htex.w"
+#line 16773 "htex.w"
if(type(prev_r)==delta_node)
{do_all_six(convert_to_break_width);
@@ -1851,7 +1851,7 @@ link(prev_r)= q;prev_prev_r= prev_r;prev_r= q;
}
/*:864*/
-#line 16622 "htex.w"
+#line 16634 "htex.w"
;
if(abs(adj_demerits)>=awful_bad-minimum_demerits)
minimum_demerits= awful_bad-1;
@@ -1859,7 +1859,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 16791 "htex.w"
+#line 16803 "htex.w"
{q= get_node(passive_node_size);
link(q)= passive;passive= q;cur_break(q)= cur_p;
@@ -1876,7 +1876,7 @@ link(q)= r;link(prev_r)= q;prev_r= q;
#ifdef STAT
if(tracing_paragraphs> 0)
/*867:*/
-#line 16811 "htex.w"
+#line 16823 "htex.w"
{print_nl("@@");print_int(serial(passive));
@@ -1890,20 +1890,20 @@ else print_int(serial(prev_break(passive)));
}
/*:867*/
-#line 16806 "htex.w"
+#line 16818 "htex.w"
;
#endif
}
/*:866*/
-#line 16628 "htex.w"
+#line 16640 "htex.w"
;
minimal_demerits[fit_class]= awful_bad;
}
minimum_demerits= awful_bad;
/*865:*/
-#line 16780 "htex.w"
+#line 16792 "htex.w"
if(r!=last_active)
{q= get_node(delta_node_size);link(q)= r;type(q)= delta_node;
@@ -1913,16 +1913,16 @@ link(prev_r)= q;prev_prev_r= prev_r;prev_r= q;
}
/*:865*/
-#line 16632 "htex.w"
+#line 16644 "htex.w"
;
}
/*:856*/
-#line 16608 "htex.w"
+#line 16620 "htex.w"
;
if(r==last_active)goto end;
/*872:*/
-#line 16885 "htex.w"
+#line 16897 "htex.w"
if(l> easy_line)
{line_width= second_width;old_l= max_halfword-1;
@@ -1934,23 +1934,23 @@ else line_width= mem[par_shape_ptr+2*l].sc;
}
/*:872*/
-#line 16610 "htex.w"
+#line 16622 "htex.w"
;
}
}
/*:855*/
-#line 16512 "htex.w"
+#line 16524 "htex.w"
;
/*873:*/
-#line 16905 "htex.w"
+#line 16917 "htex.w"
{artificial_demerits= false;
shortfall= line_width-cur_active_width[1];
if(shortfall> 0)
/*874:*/
-#line 16935 "htex.w"
+#line 16947 "htex.w"
if((cur_active_width[3]!=0)||(cur_active_width[4]!=0)||
(cur_active_width[5]!=0))
@@ -1968,10 +1968,10 @@ done1:;
}
/*:874*/
-#line 16911 "htex.w"
+#line 16923 "htex.w"
else/*875:*/
-#line 16954 "htex.w"
+#line 16966 "htex.w"
{if(-shortfall> cur_active_width[6])b= inf_bad+1;
else b= badness(-shortfall,cur_active_width[6]);
@@ -1979,11 +1979,11 @@ if(b> 12)fit_class= tight_fit;else fit_class= decent_fit;
}
/*:875*/
-#line 16913 "htex.w"
+#line 16925 "htex.w"
;
if((b> inf_bad)||(pi==eject_penalty))
/*876:*/
-#line 16969 "htex.w"
+#line 16981 "htex.w"
{if(final_pass&&(minimum_demerits==awful_bad)&&
(link(r)==last_active)&&
@@ -1994,18 +1994,18 @@ node_r_stays_active= false;
}
/*:876*/
-#line 16916 "htex.w"
+#line 16928 "htex.w"
else{prev_r= r;
if(b> threshold)goto resume;
node_r_stays_active= true;
}
/*877:*/
-#line 16985 "htex.w"
+#line 16997 "htex.w"
if(artificial_demerits)d= 0;
else/*881:*/
-#line 17046 "htex.w"
+#line 17058 "htex.w"
{d= line_penalty+b;
if(abs(d)>=10000)d= 100000000;else d= d*d;
@@ -2019,16 +2019,16 @@ if(abs(fit_class-fitness(r))> 1)d= d+adj_demerits;
}
/*:881*/
-#line 16987 "htex.w"
+#line 16999 "htex.w"
;
#ifdef STAT
if(tracing_paragraphs> 0)
/*878:*/
-#line 17001 "htex.w"
+#line 17013 "htex.w"
{if(printed_node!=cur_p)
/*879:*/
-#line 17023 "htex.w"
+#line 17035 "htex.w"
{print_nl("");
if(cur_p==null)short_display(link(printed_node));
@@ -2040,7 +2040,7 @@ printed_node= cur_p;
}
/*:879*/
-#line 17003 "htex.w"
+#line 17015 "htex.w"
;
print_nl("@");
@@ -2062,7 +2062,7 @@ if(artificial_demerits)print_char('*');else print_int(d);
}
/*:878*/
-#line 16990 "htex.w"
+#line 17002 "htex.w"
;
#endif
@@ -2075,15 +2075,15 @@ if(d<minimum_demerits)minimum_demerits= d;
}
/*:877*/
-#line 16921 "htex.w"
+#line 16933 "htex.w"
;
if(node_r_stays_active)goto resume;
deactivate:/*882:*/
-#line 17068 "htex.w"
+#line 17080 "htex.w"
link(prev_r)= link(r);free_node(r,active_node_size);
if(prev_r==active)/*883:*/
-#line 17093 "htex.w"
+#line 17105 "htex.w"
{r= link(active);
if(type(r)==delta_node)
@@ -2094,7 +2094,7 @@ link(active)= link(r);free_node(r,delta_node_size);
}
/*:883*/
-#line 17071 "htex.w"
+#line 17083 "htex.w"
else if(type(prev_r)==delta_node)
{r= link(prev_r);
@@ -2111,18 +2111,18 @@ link(prev_r)= link(r);free_node(r,delta_node_size);
}
/*:882*/
-#line 16923 "htex.w"
+#line 16935 "htex.w"
;
}
/*:873*/
-#line 16515 "htex.w"
+#line 16527 "htex.w"
;
}
end:;
#ifdef STAT
/*880:*/
-#line 17038 "htex.w"
+#line 17050 "htex.w"
if(cur_p==printed_node)if(cur_p!=null)if(type(cur_p)==disc_node)
{t= replace_count(cur_p);
@@ -2132,14 +2132,14 @@ while(t> 0)
}
/*:880*/
-#line 16519 "htex.w"
+#line 16531 "htex.w"
;
#endif
}
/*:848*//*900:*/
-#line 17417 "htex.w"
+#line 17429 "htex.w"
static void post_line_break(int final_widow_penalty)
{
@@ -2154,14 +2154,14 @@ quarterword t;
int pen;
halfword cur_line;
/*901:*/
-#line 17468 "htex.w"
+#line 17480 "htex.w"
q= break_node(best_bet);cur_p= null;
do{r= q;q= prev_break(q);next_break(r)= cur_p;cur_p= r;
}while(!(q==null))
/*:901*/
-#line 17431 "htex.w"
+#line 17443 "htex.w"
;
cur_line= prev_graf+1;
next_offset= hposition(link(temp_head));
@@ -2182,10 +2182,10 @@ else
next_offset= 0;
}
/*903:*/
-#line 17505 "htex.w"
+#line 17517 "htex.w"
/*904:*/
-#line 17517 "htex.w"
+#line 17529 "htex.w"
q= cur_break(cur_p);disc_break= false;post_disc_break= false;
if(q!=null)
@@ -2197,7 +2197,7 @@ goto done;
}
else{if(type(q)==disc_node)
/*905:*/
-#line 17536 "htex.w"
+#line 17548 "htex.w"
{pointer pre_q= pre_break(q);
pointer post_q= post_break(q);
@@ -2206,7 +2206,7 @@ type(q)= whatsit_node;
subtype(q)= ignore_node;
ignore_info(q)= 1;
/*906:*/
-#line 17555 "htex.w"
+#line 17567 "htex.w"
if(t==0){ignore_list(q)= null;r= link(q);}
else{r= q;
@@ -2219,7 +2219,7 @@ ignore_list(q)= link(q);
}
/*:906*/
-#line 17543 "htex.w"
+#line 17555 "htex.w"
;
s= get_node(ignore_node_size);
type(s)= whatsit_node;
@@ -2228,7 +2228,7 @@ ignore_info(s)= 0;
ignore_list(s)= null;
link(s)= r;r= s;
if(post_q!=null)/*907:*/
-#line 17569 "htex.w"
+#line 17581 "htex.w"
{s= post_q;
while(link(s)!=null)s= link(s);
@@ -2236,10 +2236,10 @@ link(s)= r;r= post_q;post_disc_break= true;
}
/*:907*/
-#line 17550 "htex.w"
+#line 17562 "htex.w"
;
if(pre_q!=null)/*908:*/
-#line 17578 "htex.w"
+#line 17590 "htex.w"
{s= pre_q;link(q)= s;
while(link(s)!=null)s= link(s);
@@ -2247,13 +2247,13 @@ q= s;
}
/*:908*/
-#line 17551 "htex.w"
+#line 17563 "htex.w"
;
link(q)= r;disc_break= true;
}
/*:905*/
-#line 17527 "htex.w"
+#line 17539 "htex.w"
else if((type(q)==math_node)||(type(q)==kern_node))width(q)= 0;
}
@@ -2261,20 +2261,20 @@ else{q= temp_head;
while(link(q)!=null)q= link(q);
}
/*909:*/
-#line 17584 "htex.w"
+#line 17596 "htex.w"
r= new_glue(right_skip);link(r)= link(q);link(q)= r;q= r
/*:909*/
-#line 17533 "htex.w"
+#line 17545 "htex.w"
;
done:
/*:904*/
-#line 17507 "htex.w"
+#line 17519 "htex.w"
;
/*910:*/
-#line 17591 "htex.w"
+#line 17603 "htex.w"
r= link(q);link(q)= null;q= link(temp_head);link(temp_head)= r;
if(left_skip!=zero_glue)
@@ -2283,10 +2283,10 @@ link(r)= q;q= r;
}
/*:910*/
-#line 17508 "htex.w"
+#line 17520 "htex.w"
;
/*912:*/
-#line 17617 "htex.w"
+#line 17629 "htex.w"
if(cur_line> last_special_line)
{cur_width= second_width;cur_indent= second_indent;
@@ -2301,10 +2301,10 @@ adjust_tail= adjust_head;just_box= hpack(q,cur_width,exactly);
shift_amount(just_box)= cur_indent
/*:912*/
-#line 17509 "htex.w"
+#line 17521 "htex.w"
;
/*911:*/
-#line 17598 "htex.w"
+#line 17610 "htex.w"
if(first_line)
{pointer p= happend_to_vlist(just_box);
@@ -2320,10 +2320,10 @@ if(adjust_head!=adjust_tail)
adjust_tail= null
/*:911*/
-#line 17511 "htex.w"
+#line 17523 "htex.w"
;
/*913:*/
-#line 17637 "htex.w"
+#line 17649 "htex.w"
if(cur_line+1!=best_line)
{pen= inter_line_penalty;
@@ -2337,16 +2337,16 @@ link(tail)= r;tail= r;
}
/*:913*/
-#line 17512 "htex.w"
+#line 17524 "htex.w"
/*:903*/
-#line 17451 "htex.w"
+#line 17463 "htex.w"
;
incr(cur_line);cur_p= next_break(cur_p);
if(cur_p!=null)if(!post_disc_break)
/*902:*/
-#line 17480 "htex.w"
+#line 17492 "htex.w"
{r= temp_head;
loop{q= link(r);
@@ -2365,7 +2365,7 @@ link(temp_head)= q;
}
/*:902*/
-#line 17454 "htex.w"
+#line 17466 "htex.w"
;
}while(!(cur_p==null));
if((cur_line!=best_line)||(link(temp_head)!=null))
@@ -2375,22 +2375,22 @@ prev_graf= best_line-1;
}
/*:900*//*918:*/
-#line 17749 "htex.w"
+#line 17761 "htex.w"
/*:918*//*966:*/
-#line 18572 "htex.w"
+#line 18584 "htex.w"
#ifdef INIT
#endif
/*:966*/
-#line 16204 "htex.w"
+#line 16216 "htex.w"
void line_break(int final_widow_penalty,pointer par_ptr)
{scaled x= cur_list.hs_field;
/*884:*/
-#line 17122 "htex.w"
+#line 17134 "htex.w"
bool auto_breaking;
pointer prev_p;
@@ -2398,20 +2398,20 @@ pointer q,r,s;
internal_font_number f;
/*:884*//*916:*/
-#line 17732 "htex.w"
+#line 17744 "htex.w"
/*:916*/
-#line 16208 "htex.w"
+#line 16220 "htex.w"
set_line_break_params();
/*831:*/
-#line 16229 "htex.w"
+#line 16241 "htex.w"
link(temp_head)= par_ptr;
/*:831*//*845:*/
-#line 16441 "htex.w"
+#line 16453 "htex.w"
no_shrink_error_yet= true;
check_shrinkage(left_skip);check_shrinkage(right_skip);
@@ -2422,7 +2422,7 @@ background[2+stretch_order(r)]= background[2+stretch_order(r)]+stretch(r);
background[6]= shrink(q)+shrink(r);
/*:845*//*854:*/
-#line 16588 "htex.w"
+#line 16600 "htex.w"
minimum_demerits= awful_bad;
minimal_demerits[tight_fit]= awful_bad;
@@ -2431,7 +2431,7 @@ minimal_demerits[loose_fit]= awful_bad;
minimal_demerits[very_loose_fit]= awful_bad;
/*:854*//*870:*/
-#line 16853 "htex.w"
+#line 16865 "htex.w"
if(par_shape_ptr==null)
if(hang_indent==0)
@@ -2439,7 +2439,7 @@ if(hang_indent==0)
second_indent= 0;
}
else/*871:*/
-#line 16864 "htex.w"
+#line 16876 "htex.w"
{last_special_line= abs(hang_after);
if(hang_after<0)
@@ -2456,17 +2456,17 @@ else second_indent= 0;
}
/*:871*/
-#line 16859 "htex.w"
+#line 16871 "htex.w"
else QUIT("parshape not yet implemented");
if(looseness==0)easy_line= last_special_line;
else easy_line= max_halfword
/*:870*/
-#line 16210 "htex.w"
+#line 16222 "htex.w"
;
/*885:*/
-#line 17132 "htex.w"
+#line 17144 "htex.w"
threshold= pretolerance;
if(threshold>=0)
@@ -2486,7 +2486,7 @@ final_pass= (emergency_stretch<=0);
}
loop{if(threshold> inf_bad)threshold= inf_bad;
/*886:*/
-#line 17185 "htex.w"
+#line 17197 "htex.w"
q= get_node(active_node_size);
type(q)= unhyphenated;fitness(q)= decent_fit;
@@ -2496,17 +2496,17 @@ do_all_six(store_background);
passive= null;printed_node= temp_head;pass_number= 0;
/*:886*/
-#line 17150 "htex.w"
+#line 17162 "htex.w"
;
cur_p= link(temp_head);auto_breaking= true;
prev_p= cur_p;
while((cur_p!=null)&&(link(active)!=last_active))
/*888:*/
-#line 17220 "htex.w"
+#line 17232 "htex.w"
{if(is_char_node(cur_p))
/*889:*/
-#line 17254 "htex.w"
+#line 17266 "htex.w"
{prev_p= cur_p;
do{f= font(cur_p);
@@ -2516,20 +2516,20 @@ cur_p= link(cur_p);
}
/*:889*/
-#line 17222 "htex.w"
+#line 17234 "htex.w"
;
switch(type(cur_p)){
case hlist_node:case vlist_node:case rule_node:act_width= act_width+width(cur_p);break;
case whatsit_node:/*1391:*/
-#line 25474 "htex.w"
+#line 25485 "htex.w"
adv_past(cur_p)
/*:1391*/
-#line 17226 "htex.w"
+#line 17238 "htex.w"
break;
case glue_node:{/*890:*/
-#line 17265 "htex.w"
+#line 17277 "htex.w"
if(auto_breaking)
{if(is_char_node(prev_p))try_break(0,unhyphenated);
@@ -2544,7 +2544,7 @@ active_width[2+stretch_order(q)]+stretch(q);
active_width[6]= active_width[6]+shrink(q)
/*:890*/
-#line 17228 "htex.w"
+#line 17240 "htex.w"
;
}break;
case kern_node:if(subtype(cur_p)==explicit)kern_break
@@ -2553,13 +2553,13 @@ 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 17281 "htex.w"
+#line 17293 "htex.w"
{if(!is_auto_disc(cur_p)||second_pass||final_pass)
{s= pre_break(cur_p);disc_width= 0;
if(s==null)try_break(ex_hyphen_penalty,hyphenated);
else{do{/*892:*/
-#line 17301 "htex.w"
+#line 17313 "htex.w"
if(is_char_node(s))
{f= font(s);
@@ -2578,7 +2578,7 @@ default:confusion("disc3");
}
/*:892*/
-#line 17285 "htex.w"
+#line 17297 "htex.w"
;
s= link(s);
}while(!(s==null));
@@ -2590,7 +2590,7 @@ act_width= act_width-disc_width;
r= replace_count(cur_p);s= link(cur_p);
while(r> 0)
{/*893:*/
-#line 17318 "htex.w"
+#line 17330 "htex.w"
if(is_char_node(s))
{f= font(s);
@@ -2609,7 +2609,7 @@ default:confusion("disc4");
}
/*:893*/
-#line 17295 "htex.w"
+#line 17307 "htex.w"
;
decr(r);s= link(s);
}
@@ -2617,7 +2617,7 @@ prev_p= cur_p;cur_p= s;goto done5;
}
/*:891*/
-#line 17236 "htex.w"
+#line 17248 "htex.w"
case math_node:{auto_breaking= (subtype(cur_p)==after);kern_break;
}break;
@@ -2630,16 +2630,16 @@ prev_p= cur_p;cur_p= link(cur_p);
done5:;}
/*:888*/
-#line 17156 "htex.w"
+#line 17168 "htex.w"
;
if(cur_p==null)
/*896:*/
-#line 17355 "htex.w"
+#line 17367 "htex.w"
{try_break(eject_penalty,hyphenated);
if(link(active)!=last_active)
{/*897:*/
-#line 17365 "htex.w"
+#line 17377 "htex.w"
r= link(active);fewest_demerits= awful_bad;
do{if(type(r)!=delta_node)if(total_demerits(r)<fewest_demerits)
@@ -2650,11 +2650,11 @@ r= link(r);
best_line= line_number(best_bet)
/*:897*/
-#line 17358 "htex.w"
+#line 17370 "htex.w"
;
if(looseness==0)goto done;
/*898:*/
-#line 17379 "htex.w"
+#line 17391 "htex.w"
{r= link(active);actual_looseness= 0;
do{if(type(r)!=delta_node)
@@ -2675,17 +2675,17 @@ best_line= line_number(best_bet);
}
/*:898*/
-#line 17360 "htex.w"
+#line 17372 "htex.w"
;
if((actual_looseness==looseness)||final_pass)goto done;
}
}
/*:896*/
-#line 17159 "htex.w"
+#line 17171 "htex.w"
;
/*887:*/
-#line 17193 "htex.w"
+#line 17205 "htex.w"
q= link(active);
while(q!=last_active)
@@ -2702,7 +2702,7 @@ q= cur_p;
}
/*:887*/
-#line 17160 "htex.w"
+#line 17172 "htex.w"
;
if(!second_pass)
{
@@ -2724,18 +2724,18 @@ done:
#endif
/*:885*/
-#line 16211 "htex.w"
+#line 16223 "htex.w"
;
/*899:*/
-#line 17403 "htex.w"
+#line 17415 "htex.w"
post_line_break(final_widow_penalty)
/*:899*/
-#line 16213 "htex.w"
+#line 16225 "htex.w"
;
/*887:*/
-#line 17193 "htex.w"
+#line 17205 "htex.w"
q= link(active);
while(q!=last_active)
@@ -2752,13 +2752,13 @@ q= cur_p;
}
/*:887*/
-#line 16214 "htex.w"
+#line 16226 "htex.w"
;
hrestore_param_list();
}
/*:830*//*992:*/
-#line 19074 "htex.w"
+#line 19086 "htex.w"
#define ensure_vbox(N)
@@ -2770,7 +2770,7 @@ prev_p= temp_head;link(temp_head)= p;
while(p!=null)
switch(type(p)){
case hlist_node:case vlist_node:case rule_node:/*993:*/
-#line 19097 "htex.w"
+#line 19109 "htex.w"
{temp_ptr= new_spec(pointer_def[glue_kind][split_top_skip_no]);
q= new_glue(temp_ptr);glue_ref_count(temp_ptr)= null;link(prev_p)= q;link(q)= p;
@@ -2781,7 +2781,7 @@ p= null;
}
/*:993*/
-#line 19085 "htex.w"
+#line 19097 "htex.w"
break;
case whatsit_node:case mark_node:case ins_node:{prev_p= p;p= link(prev_p);
}break;
@@ -2795,7 +2795,7 @@ return link(temp_head);
}
/*:992*//*994:*/
-#line 19122 "htex.w"
+#line 19134 "htex.w"
static pointer vert_break(pointer p,scaled h,scaled d)
@@ -2812,11 +2812,11 @@ small_number t;
prev_p= p;
least_cost= awful_bad;do_all_six(set_height_zero);prev_dp= 0;
loop{/*997:*/
-#line 19158 "htex.w"
+#line 19170 "htex.w"
if(p==null)pi= eject_penalty;
else/*998:*/
-#line 19173 "htex.w"
+#line 19185 "htex.w"
switch(type(p)){
case hlist_node:case vlist_node:case rule_node:{
@@ -2824,12 +2824,12 @@ cur_height= cur_height+prev_dp+height(p);prev_dp= depth(p);
goto not_found;
}
case whatsit_node:/*1394:*/
-#line 25483 "htex.w"
+#line 25494 "htex.w"
goto not_found
/*:1394*/
-#line 19179 "htex.w"
+#line 19191 "htex.w"
;
case glue_node:if(precedes_break(prev_p))pi= 0;
else goto update_heights;break;
@@ -2844,14 +2844,14 @@ default:confusion("vertbreak");
}
/*:998*/
-#line 19162 "htex.w"
+#line 19174 "htex.w"
;
/*999:*/
-#line 19194 "htex.w"
+#line 19206 "htex.w"
if(pi<inf_penalty)
{/*1000:*/
-#line 19208 "htex.w"
+#line 19220 "htex.w"
if(cur_height<h)
if((active_height[3]!=0)||(active_height[4]!=0)||
@@ -2861,7 +2861,7 @@ else if(cur_height-h> active_height[6])b= awful_bad;
else b= badness(cur_height-h,active_height[6])
/*:1000*/
-#line 19196 "htex.w"
+#line 19208 "htex.w"
;
if(b<awful_bad)
if(pi<=eject_penalty)b= pi;
@@ -2875,11 +2875,11 @@ if((b==awful_bad)||(pi<=eject_penalty))goto done;
}
/*:999*/
-#line 19164 "htex.w"
+#line 19176 "htex.w"
;
if((type(p)<glue_node)||(type(p)> kern_node))goto not_found;
update_heights:/*1001:*/
-#line 19220 "htex.w"
+#line 19232 "htex.w"
if(type(p)==kern_node)q= p;
else{q= glue_ptr(p);
@@ -2896,7 +2896,7 @@ glue_ptr(p)= r;q= r;
cur_height= cur_height+prev_dp+width(q);prev_dp= 0
/*:1001*/
-#line 19167 "htex.w"
+#line 19179 "htex.w"
;
not_found:if(prev_dp> d)
{cur_height= cur_height+prev_dp-d;
@@ -2904,7 +2904,7 @@ prev_dp= d;
}
/*:997*/
-#line 19139 "htex.w"
+#line 19151 "htex.w"
;
prev_p= p;p= link(prev_p);
}
@@ -2912,7 +2912,7 @@ done:return best_place;
}
/*:994*//*1012:*/
-#line 19519 "htex.w"
+#line 19531 "htex.w"
void freeze_page_specs(small_number s)
{page_contents= s;
@@ -2932,7 +2932,7 @@ end_diagnostic(false);
}
/*:1012*//*1020:*/
-#line 19617 "htex.w"
+#line 19629 "htex.w"
bool hbuild_page(void)
{
@@ -2943,15 +2943,15 @@ int pi;
if(link(contrib_head)==null)return false;
do{resume:p= link(contrib_head);
/*1023:*/
-#line 19657 "htex.w"
+#line 19669 "htex.w"
/*1026:*/
-#line 19686 "htex.w"
+#line 19698 "htex.w"
switch(type(p)){
case hlist_node:case vlist_node:case rule_node:if(page_contents<box_there)
/*1027:*/
-#line 19709 "htex.w"
+#line 19721 "htex.w"
{if(page_contents==empty)freeze_page_specs(box_there);
else page_contents= box_there;
@@ -2964,10 +2964,10 @@ link(q)= p;link(contrib_head)= q;goto resume;
}
/*:1027*/
-#line 19690 "htex.w"
+#line 19702 "htex.w"
else/*1028:*/
-#line 19720 "htex.w"
+#line 19732 "htex.w"
{page_total= page_total+page_depth+height(p);
page_depth= depth(p);
@@ -2975,15 +2975,15 @@ goto contribute;
}
/*:1028*/
-#line 19692 "htex.w"
+#line 19704 "htex.w"
break;
case whatsit_node:/*1393:*/
-#line 25480 "htex.w"
+#line 25491 "htex.w"
goto contribute
/*:1393*/
-#line 19694 "htex.w"
+#line 19706 "htex.w"
;
case glue_node:if(page_contents<box_there)goto done1;
else if(precedes_break(page_tail))pi= 0;
@@ -3000,14 +3000,14 @@ default:confusion("page");
}
/*:1026*/
-#line 19662 "htex.w"
+#line 19674 "htex.w"
;
/*1031:*/
-#line 19748 "htex.w"
+#line 19760 "htex.w"
if(pi<inf_penalty)
{/*1033:*/
-#line 19794 "htex.w"
+#line 19806 "htex.w"
if(page_total<page_goal)
if((page_so_far[3]!=0)||(page_so_far[4]!=0)||
@@ -3017,7 +3017,7 @@ else if(page_total-page_goal> page_shrink)b= awful_bad;
else b= badness(page_total-page_goal,page_shrink)
/*:1033*/
-#line 19751 "htex.w"
+#line 19763 "htex.w"
;
if(b<awful_bad)
if(pi<=eject_penalty)c= pi;
@@ -3027,7 +3027,7 @@ else c= b;
if(insert_penalties>=10000)c= awful_bad;
#ifdef STAT
if(tracing_pages> 0)/*1032:*/
-#line 19780 "htex.w"
+#line 19792 "htex.w"
{begin_diagnostic();print_nl("%");
print(" t=");print_totals();
@@ -3043,7 +3043,7 @@ end_diagnostic(false);
}
/*:1032*/
-#line 19759 "htex.w"
+#line 19771 "htex.w"
;
#endif
@@ -3066,11 +3066,11 @@ return true;
}
/*:1031*/
-#line 19665 "htex.w"
+#line 19677 "htex.w"
;
if((type(p)<glue_node)||(type(p)> kern_node))goto contribute;
update_heights:/*1030:*/
-#line 19733 "htex.w"
+#line 19745 "htex.w"
if(type(p)==kern_node)q= p;
else{q= glue_ptr(p);
@@ -3087,10 +3087,10 @@ glue_ptr(p)= r;q= r;
page_total= page_total+page_depth+width(q);page_depth= 0
/*:1030*/
-#line 19668 "htex.w"
+#line 19680 "htex.w"
;
contribute:/*1029:*/
-#line 19726 "htex.w"
+#line 19738 "htex.w"
if(page_depth> page_max_depth)
{page_total=
@@ -3099,45 +3099,45 @@ page_depth= page_max_depth;
}
/*:1029*/
-#line 19669 "htex.w"
+#line 19681 "htex.w"
;
/*1024:*/
-#line 19674 "htex.w"
+#line 19686 "htex.w"
link(page_tail)= p;page_tail= p;
link(contrib_head)= link(p);link(p)= null;goto done
/*:1024*/
-#line 19670 "htex.w"
+#line 19682 "htex.w"
;
done1:/*1025:*/
-#line 19678 "htex.w"
+#line 19690 "htex.w"
link(contrib_head)= link(p);link(p)= null;flush_node_list(p)
/*:1025*/
-#line 19671 "htex.w"
+#line 19683 "htex.w"
;
done:
/*:1023*/
-#line 19628 "htex.w"
+#line 19640 "htex.w"
;
}while(!(link(contrib_head)==null));
/*1021:*/
-#line 19636 "htex.w"
+#line 19648 "htex.w"
if(nest_ptr==0)tail= contrib_head;
else contrib_tail= contrib_head
/*:1021*/
-#line 19630 "htex.w"
+#line 19642 "htex.w"
;
return false;
}
/*:1020*//*1034:*/
-#line 19802 "htex.w"
+#line 19814 "htex.w"
void happend_insertion(pointer p)
{uint8_t n;
@@ -3149,7 +3149,7 @@ while(n>=subtype(link(r)))r= link(r);
n= qo(n);
if(subtype(r)!=qi(n))
/*1035:*/
-#line 19834 "htex.w"
+#line 19846 "htex.w"
{q= get_node(page_ins_node_size);link(q)= link(r);link(r)= q;r= q;
subtype(r)= qi(n);type(r)= inserting;ensure_vbox(n);
@@ -3167,7 +3167,7 @@ DBG(DBGTEX,"Infinite glue shrinkage inserted from stream %d",n);
}
/*:1035*/
-#line 19813 "htex.w"
+#line 19825 "htex.w"
;
if(type(r)==split_up)insert_penalties= insert_penalties+float_cost(p);
else{last_ins_ptr(r)= p;
@@ -3179,7 +3179,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 19860 "htex.w"
+#line 19872 "htex.w"
{if(count(n)<=0)w= max_dimen;
else{w= page_goal-page_total-page_depth;
@@ -3190,7 +3190,7 @@ q= vert_break(ins_ptr(p),w,depth(p));
height(r)= height(r)+best_height_plus_depth;
#ifdef STAT
if(tracing_pages> 0)/*1037:*/
-#line 19880 "htex.w"
+#line 19892 "htex.w"
{begin_diagnostic();print_nl("% split");print_int(n);
@@ -3204,7 +3204,7 @@ end_diagnostic(false);
}
/*:1037*/
-#line 19869 "htex.w"
+#line 19881 "htex.w"
;
#endif
@@ -3217,13 +3217,13 @@ else if(type(q)==penalty_node)insert_penalties= insert_penalties+penalty(q);
}
/*:1036*/
-#line 19824 "htex.w"
+#line 19836 "htex.w"
;
}
}
/*:1034*//*1041:*/
-#line 19952 "htex.w"
+#line 19964 "htex.w"
void hpack_page(void)
{
@@ -3245,7 +3245,7 @@ if(box(0)!=null)
insert_penalties= 0;
save_split_top_skip= split_top_skip;
/*1045:*/
-#line 20038 "htex.w"
+#line 20050 "htex.w"
{r= link(page_ins_head);
while(r!=page_ins_head)
@@ -3261,13 +3261,13 @@ r= link(r);
}
/*:1045*/
-#line 19972 "htex.w"
+#line 19984 "htex.w"
;
q= hold_head;link(q)= null;prev_p= page_head;p= link(prev_p);
while(p!=best_page_break)
{if(type(p)==ins_node)
{/*1047:*/
-#line 20064 "htex.w"
+#line 20076 "htex.w"
{r= link(page_ins_head);
while(subtype(r)!=subtype(p))r= link(r);
@@ -3275,7 +3275,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 20080 "htex.w"
+#line 20092 "htex.w"
{if(type(r)==split_up)
if((broken_ins(r)==p)&&(broken_ptr(r)!=null))
@@ -3299,14 +3299,14 @@ streams[n].t= s;
}
/*:1048*/
-#line 20071 "htex.w"
+#line 20083 "htex.w"
else{while(link(s)!=null)s= link(s);
last_ins_ptr(r)= s;
}
}
/*1049:*/
-#line 20102 "htex.w"
+#line 20114 "htex.w"
link(prev_p)= link(p);link(p)= null;
if(wait)
@@ -3318,19 +3318,19 @@ free_node(p,ins_node_size);
p= prev_p
/*:1049*/
-#line 20077 "htex.w"
+#line 20089 "htex.w"
;
}
/*:1047*/
-#line 19977 "htex.w"
+#line 19989 "htex.w"
;
}
prev_p= p;p= link(prev_p);
}
split_top_skip= save_split_top_skip;
/*1044:*/
-#line 20016 "htex.w"
+#line 20028 "htex.w"
if(p!=null)
{if(link(contrib_head)==null)
@@ -3348,10 +3348,10 @@ link(contrib_head)= link(hold_head);
}
/*:1044*/
-#line 19983 "htex.w"
+#line 19995 "htex.w"
;
/*1046:*/
-#line 20052 "htex.w"
+#line 20064 "htex.w"
r= link(page_ins_head);
while(r!=page_ins_head)
@@ -3360,12 +3360,12 @@ while(r!=page_ins_head)
link(page_ins_head)= page_ins_head
/*:1046*/
-#line 19984 "htex.w"
+#line 19996 "htex.w"
;
}
/*:1041*//*1173:*/
-#line 21974 "htex.w"
+#line 21986 "htex.w"
void hdisplay(pointer p,pointer a,bool l)
{
@@ -3390,13 +3390,13 @@ store_map(par_ptr,node_pos,0);
line_break(display_widow_penalty,par_ptr);
x= cur_list.hs_field;
/*1174:*/
-#line 22006 "htex.w"
+#line 22018 "htex.w"
v= shift_amount(just_box)+2*dimen_def[quad_no];w= -max_dimen;
p= list_ptr(just_box);
while(p!=null)
{/*1175:*/
-#line 22023 "htex.w"
+#line 22035 "htex.w"
reswitch:if(is_char_node(p))
{f= font(p);d= char_width(f,char_info(f,character(p)));
@@ -3406,18 +3406,18 @@ switch(type(p)){
case hlist_node:case vlist_node:case rule_node:{d= width(p);goto found;
}
case ligature_node:/*665:*/
-#line 13133 "htex.w"
+#line 13145 "htex.w"
{mem[lig_trick]= mem[lig_char(p)];link(lig_trick)= link(p);
p= lig_trick;goto reswitch;
}
/*:665*/
-#line 22031 "htex.w"
+#line 22043 "htex.w"
case kern_node:case math_node:d= width(p);break;
case glue_node:/*1176:*/
-#line 22045 "htex.w"
+#line 22057 "htex.w"
{q= glue_ptr(p);d= width(q);
if(glue_sign(just_box)==stretching)
@@ -3434,20 +3434,20 @@ if(subtype(p)>=a_leaders)goto found;
}
/*:1176*/
-#line 22034 "htex.w"
+#line 22046 "htex.w"
break;
case whatsit_node:/*1390:*/
-#line 25470 "htex.w"
+#line 25481 "htex.w"
d= 0
/*:1390*/
-#line 22035 "htex.w"
+#line 22047 "htex.w"
;break;
default:d= 0;
}
/*:1175*/
-#line 22011 "htex.w"
+#line 22023 "htex.w"
;
if(v<max_dimen)v= v+d;
goto not_found;
@@ -3461,12 +3461,12 @@ not_found:p= link(p);
done:
/*:1174*/
-#line 21999 "htex.w"
+#line 22011 "htex.w"
;
}
/*1177:*/
-#line 22063 "htex.w"
+#line 22075 "htex.w"
if(par_shape_ptr==null)
if((hang_indent!=0)&&
@@ -3484,16 +3484,16 @@ s= mem[p-1].sc;l= mem[p].sc;
}
/*:1177*/
-#line 22002 "htex.w"
+#line 22014 "htex.w"
;
pre_display_size= w;display_width= l;display_indent= s;
}
/*:1173*//*1228:*/
-#line 22730 "htex.w"
+#line 22742 "htex.w"
{/*1226:*/
-#line 22713 "htex.w"
+#line 22725 "htex.w"
pointer b;
scaled w;
@@ -3507,7 +3507,7 @@ pointer r;
pointer t;
/*:1226*/
-#line 22731 "htex.w"
+#line 22743 "htex.w"
adjust_tail= adjust_head;b= hpack(p,natural);p= list_ptr(b);
t= adjust_tail;adjust_tail= null;
@@ -3519,7 +3519,7 @@ else{e= width(a);q= e+math_quad;
}
if(w+q> z)
/*1230:*/
-#line 22769 "htex.w"
+#line 22781 "htex.w"
{if((e!=0)&&((w-total_shrink[normal]+q<=z)||
(total_shrink[fil]!=0)||(total_shrink[fill]!=0)||
@@ -3537,10 +3537,10 @@ w= width(b);
}
/*:1230*/
-#line 22742 "htex.w"
+#line 22754 "htex.w"
;
/*1231:*/
-#line 22793 "htex.w"
+#line 22805 "htex.w"
d= half(z-w);
if((e> 0)&&(d<2*e))
@@ -3549,10 +3549,10 @@ if(p!=null)if(!is_char_node(p))if(type(p)==glue_node)d= 0;
}
/*:1231*/
-#line 22744 "htex.w"
+#line 22756 "htex.w"
;
/*1232:*/
-#line 22806 "htex.w"
+#line 22818 "htex.w"
tail_append(new_penalty(pre_display_penalty));
store_map(tail,node_pos,offset);
@@ -3569,10 +3569,10 @@ tail_append(new_penalty(inf_penalty));store_map(tail,node_pos,offset);
else{tail_append(new_glue(pointer_def[glue_kind][g1]));store_map(tail,node_pos,offset);}
/*:1232*/
-#line 22745 "htex.w"
+#line 22757 "htex.w"
;
/*1233:*/
-#line 22821 "htex.w"
+#line 22833 "htex.w"
if(e!=0)
{r= new_kern(z-w-e-d);
@@ -3586,10 +3586,10 @@ b= hpack(b,natural);
shift_amount(b)= s+d;append_to_vlist(b,offset)
/*:1233*/
-#line 22746 "htex.w"
+#line 22758 "htex.w"
;
/*1234:*/
-#line 22833 "htex.w"
+#line 22845 "htex.w"
if((a!=null)&&(e==0)&&!l)
{tail_append(new_penalty(inf_penalty));
@@ -3606,7 +3606,7 @@ store_map(tail,node_pos,offset);
if(g2> 0){tail_append(new_glue(pointer_def[glue_kind][g2]));store_map(tail,node_pos,offset);}
/*:1234*/
-#line 22747 "htex.w"
+#line 22759 "htex.w"
;
prev_graf= prev_graf+3;
cur_list.bs_pos= hpos+node_pos;
diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/htex.h b/Build/source/texk/web2c/hitexdir/hintview/src/htex.h
index 32b99c40000..edca0a9f035 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 25693 "htex.w"
+#line 25704 "htex.w"
#define banner "This is TeX, Version 3.141592653 (HINT)" \
@@ -139,8 +139,8 @@ history= fatal_error_stop;jump_out() ; \
#define set_glue_ratio_zero(A) A= 0.0
#define set_glue_ratio_one(A) A= 1.0
-#define float(A) ((double) (A) )
-#define unfloat(A) ((glue_ratio) (A) )
+#define unfix(A) ((double) (A) )
+#define fix(A) ((glue_ratio) (A) )
#define float_constant(A) ((double) (A) ) \
#define min_quarterword 0
@@ -1724,10 +1724,10 @@ str_pool[k+2]= si(qo(w.b2) ) ;str_pool[k+3]= si(qo(w.b3) ) \
#define end_write_token cs_token_flag+end_write \
-#line 25694 "htex.w"
+#line 25705 "htex.w"
enum{/*11:*/
-#line 362 "htex.w"
+#line 374 "htex.w"
mem_max= 65534,
@@ -1768,36 +1768,36 @@ file_name_size= 1024,
empty_string= 256
/*:11*/
-#line 25695 "htex.w"
+#line 25706 "htex.w"
};
/*18:*/
-#line 502 "htex.w"
+#line 514 "htex.w"
typedef uint8_t ASCII_code;
/*:18*//*25:*/
-#line 738 "htex.w"
+#line 750 "htex.w"
typedef uint8_t eight_bits;
typedef struct{FILE*f;text_char d;}alpha_file;
typedef struct{FILE*f;eight_bits d;}byte_file;
/*:25*//*38:*/
-#line 1098 "htex.w"
+#line 1111 "htex.w"
typedef int32_t pool_pointer;
typedef int16_t str_number;
typedef uint8_t packed_ASCII_code;
/*:38*//*104:*/
-#line 2194 "htex.w"
+#line 2206 "htex.w"
typedef int scaled;
typedef int32_t nonnegative_integer;
typedef int8_t small_number;
/*:104*//*113:*/
-#line 2405 "htex.w"
+#line 2417 "htex.w"
#if __SIZEOF_FLOAT__==4
typedef float float32_t;
@@ -1807,7 +1807,7 @@ typedef float float32_t;
typedef float glue_ratio;
/*:113*//*117:*/
-#line 2514 "htex.w"
+#line 2526 "htex.w"
typedef uint8_t quarterword;
typedef uint16_t halfword;
@@ -1835,12 +1835,12 @@ four_quarters qqqq;
typedef struct{FILE*f;memory_word d;}word_file;
/*:117*//*155:*/
-#line 3245 "htex.w"
+#line 3257 "htex.w"
typedef int8_t glue_ord;
/*:155*//*221:*/
-#line 4408 "htex.w"
+#line 4420 "htex.w"
typedef struct{int16_t mode_field;
pointer head_field,tail_field;
@@ -1856,12 +1856,12 @@ memory_word aux_field;
}list_state_record;
/*:221*//*279:*/
-#line 5997 "htex.w"
+#line 6009 "htex.w"
typedef int8_t group_code;
/*:279*//*310:*/
-#line 6576 "htex.w"
+#line 6588 "htex.w"
typedef struct{
quarterword state_field,index_field;
@@ -1869,28 +1869,28 @@ halfword start_field,loc_field,limit_field,name_field;
}in_state_record;
/*:310*//*558:*/
-#line 10858 "htex.w"
+#line 10870 "htex.w"
typedef uint8_t internal_font_number;
typedef uint16_t font_index;
/*:558*//*605:*/
-#line 12050 "htex.w"
+#line 12062 "htex.w"
typedef int8_t dvi_index;
/*:605*//*944:*/
-#line 18316 "htex.w"
+#line 18328 "htex.w"
typedef uint16_t trie_pointer;
/*:944*//*949:*/
-#line 18385 "htex.w"
+#line 18397 "htex.w"
typedef int16_t hyph_pointer;
/*:949*/
-#line 25696 "htex.w"
+#line 25707 "htex.w"
extern void list_init(void);
extern void hpack_page(void);
diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/main.c b/Build/source/texk/web2c/hitexdir/hintview/src/main.c
index b1f6b783798..4087db610fe 100644
--- a/Build/source/texk/web2c/hitexdir/hintview/src/main.c
+++ b/Build/source/texk/web2c/hitexdir/hintview/src/main.c
@@ -40,15 +40,8 @@
#define VERSION 1
#define REVISION 3
-#define PATCHLEVEL 0
+#define PATCHLEVEL 1
-#if 0
-#include "rendernative.h" /* rendernative needs gcache_s */
-#else
-extern void nativeInit(void);
-extern void nativeClear(void);
-extern void nativeSetDark(int dark);
-#endif
#include "error.h"
#include "basetypes.h"
#include "format.h"
@@ -56,9 +49,6 @@ extern void nativeSetDark(int dark);
#include "hint.h"
#include "hrender.h"
-FILE* hlog;
-jmp_buf error_exit;
-
/* Error Handling */
int herror(const char *title, const char *message)
{ fprintf(stderr,"ERROR %s: %s\n",title,message);
@@ -405,7 +395,7 @@ void key_callback(GLFWwindow* window, int key, int scancode, int action, int mod
break;
case CTRL(GLFW_KEY_N):
dark=!dark;
- nativeSetDark(dark);
+ hint_dark(dark);
break;
case KEY(GLFW_KEY_HOME):
case CTRL(GLFW_KEY_H):
@@ -581,7 +571,7 @@ int create_window(void)
glfwSetCursorPos(window, px_h/2, px_v/2);
- nativeInit();
+ hint_render_on();
return 1;
}
diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/renderOGL.c b/Build/source/texk/web2c/hitexdir/hintview/src/renderOGL.c
index 60d510e9881..dc3cc659cde 100644
--- a/Build/source/texk/web2c/hitexdir/hintview/src/renderOGL.c
+++ b/Build/source/texk/web2c/hitexdir/hintview/src/renderOGL.c
@@ -41,17 +41,23 @@
#ifdef DEBUG
+static void printGLString(const char *name, GLenum s) {
+ const char *v = (const char *) glGetString(s);
+ LOGI("GL %s = %s\n", name, v);
+}
+
static void checkGlError(const char *op)
{ GLint error;
while( (error= glGetError())!= GL_NO_ERROR)
MESSAGE("OGL Error after %s: 0x%x\n", op, error);
}
#else
+#define printGLString(N,S) (void)0
#define checkGlError(OP) (void)0
#endif
#define MAX_INFOLOG 512
-static GLuint ProgramID, MatrixID, RuleID, GammaID, FGcolorID, ImageID, PictureID=0;
+static GLuint ProgramID, MatrixID, RuleID, GammaID, FGcolorID, IsImageID, ImageID=0;
#define xyID 0
#define uvID 1
@@ -60,7 +66,6 @@ static GLuint ProgramID, MatrixID, RuleID, GammaID, FGcolorID, ImageID, Picture
#define QUOTE(X) #X
static const char VertexShader[]=
"#version 330 core\n"
-
/* Input */
"layout(location = " STR(xyID) ") in vec2 vertexXY;\n"
"layout(location = " STR(uvID) ") in vec2 vertexUV;\n"
@@ -69,8 +74,7 @@ static const char VertexShader[]=
/* Constants for the current triangles */
"uniform mat4 MVP;\n"
- "void main()\n"
- "{\n"
+ "void main() {\n"
"gl_Position = MVP * vec4(vertexXY,-1.0f,1.0f);\n"
"UV = vertexUV;\n"
"}\n";
@@ -87,11 +91,11 @@ static const char FragmentShader[]=
"uniform sampler2D theTexture;\n"
"uniform vec3 FGcolor;\n"
"uniform float Gamma;\n"
- "uniform int Image;\n"
+ "uniform int IsImage;\n"
"void main()\n"
"{ vec4 texColor = texture( theTexture, UV );\n"
- "if (Image==1) color = texColor;\n"
+ "if (IsImage==1) color = texColor;\n"
"else\n"
"{ color.a = pow(texColor.r,Gamma);\n"
"color.rgb = FGcolor;\n"
@@ -143,8 +147,9 @@ static void createProgram(void)
GLuint fragmentID=loadShader(GL_FRAGMENT_SHADER,FragmentShader);
GLint result =GL_FALSE;
-
- /* Create, linking, and check the program */
+ if (!vertexID || !fragmentID) return;
+
+ /* Create, linking, and check the program */
ProgramID = glCreateProgram();
glAttachShader(ProgramID, vertexID);
glAttachShader(ProgramID, fragmentID);
@@ -243,8 +248,13 @@ void nativeInit(void)
glewInitialized=1;
while(glGetError()!= GL_NO_ERROR)
continue; /* ignore errors in glewInit */
-
- /* Create the vertex array object (VAO) */
+
+ printGLString("Version", GL_VERSION);
+ printGLString("Vendor", GL_VENDOR);
+ printGLString("Renderer", GL_RENDERER);
+ printGLString("Extensions", GL_EXTENSIONS);
+
+ /* Create the vertex array object (VAO) */
glGenVertexArrays(1, &VertexArrayID);
glBindVertexArray(VertexArrayID);
@@ -253,7 +263,7 @@ void nativeInit(void)
MatrixID = glGetUniformLocation(ProgramID, "MVP");
FGcolorID = glGetUniformLocation(ProgramID, "FGcolor");
GammaID = glGetUniformLocation(ProgramID, "Gamma");
- ImageID = glGetUniformLocation(ProgramID, "Image");
+ IsImageID = glGetUniformLocation(ProgramID, "IsImage");
checkGlError("get IDs");
glGenBuffers(1, &xybuffer);
@@ -269,7 +279,7 @@ void nativeInit(void)
glUniformMatrix4fv(MatrixID, 1, GL_FALSE, &MVP[0][0]);
glUniform1f(GammaID, 1.0f/2.2f);
- glUniform1i(ImageID, 0);
+ glUniform1i(IsImageID, 0);
glUniform3f(FGcolorID, 0.0, 0.0, 0.0); // black as default foreground
glClearColor(1.0f, 1.0f, 1.0f, 0.0f); // white as default background
@@ -299,18 +309,19 @@ void nativeInit(void)
hint_clear_fonts(false);
mkRuleTexture();
+ ImageID=0;
//LOG("nativeInit Done\n");
}
-
+// Unused ?
void nativeClear(void)
{ glDeleteBuffers(1, &xybuffer);
glDeleteBuffers(1, &uvbuffer);
glDeleteProgram(ProgramID);
glDeleteTextures(1, &RuleID);
- if (PictureID != 0) {
- glDeleteTextures(1, &PictureID);
- PictureID = 0;
+ if (ImageID != 0) {
+ glDeleteTextures(1, &ImageID);
+ ImageID = 0;
}
}
@@ -331,17 +342,13 @@ static void nativeSetColors(GLfloat fr, GLfloat fg, GLfloat fb, GLfloat br, GLfl
{
glClearColor(br, bg, bb, 1.0f);
curfr=fr; curfg=fg; curfb=fb;
- glUniform3f(FGcolorID, curfr, curfg, curfb);
+ glUniform3f(FGcolorID, fr, fg, fb);
last_style=0;
}
-static int dark_mode;
void nativeSetDark(int on)
{ if (on) {
- int ourModeLocation = glGetUniformLocation(ProgramID, "ourMode");
- glUniform1i(ourModeLocation, true);
- dark_mode = true;
nativeSetColors(
GET_R(FG_NIGHT)/255.0f,
GET_G(FG_NIGHT)/255.0f,
@@ -350,9 +357,6 @@ void nativeSetDark(int on)
GET_G(BG_NIGHT)/255.0f,
GET_B(BG_NIGHT)/255.0f);
} else {
- int ourModeLocation = glGetUniformLocation(ProgramID, "ourMode");
- glUniform1i(ourModeLocation, false);
- dark_mode = false;
nativeSetColors(
GET_R(FG_DAY)/255.0f,
GET_G(FG_DAY)/255.0f,
@@ -415,16 +419,15 @@ void nativeImage(double x, double y, double w, double h, unsigned char *b, unsig
int width, height, nrChannels;
unsigned char *data;
static unsigned char grey[4]={0,0,0,0x80};
- if (b!=last_b)
- { if (PictureID != 0) {
- glDeleteTextures(1, &PictureID);
- PictureID = 0;
+ if (b!=last_b||ImageID==0)
+ { if (ImageID != 0) {
+ glDeleteTextures(1, &ImageID);
+ ImageID = 0;
}
last_b=b;
data = stbi_load_from_memory(b, (int) (e - b), &width, &height, &nrChannels, 0);
if (data == NULL)
- {
- LOG("Unable to display image\n");
+ { LOG("Unable to display image\n");
data=grey; width=height=1; nrChannels=4;
}
//LOG("nativeImage %d chanels\n",nrChannels);
@@ -437,9 +440,10 @@ void nativeImage(double x, double y, double w, double h, unsigned char *b, unsig
format = GL_RG;
else
format = GL_RED;
- glGenTextures(1, &PictureID);
- glBindTexture(GL_TEXTURE_2D, PictureID);
- checkGlError("glBindTexture PictureID");
+
+ glGenTextures(1, &ImageID);
+ glBindTexture(GL_TEXTURE_2D, ImageID);
+ checkGlError("glBindTexture ImageID");
glTexImage2D(GL_TEXTURE_2D, 0, internal_format, width, height, 0, format, GL_UNSIGNED_BYTE, data);
checkGlError("glTexImage2D(image)");
@@ -450,8 +454,8 @@ void nativeImage(double x, double y, double w, double h, unsigned char *b, unsig
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
}
else
- { glBindTexture(GL_TEXTURE_2D, PictureID);
- checkGlError("glBindTexture old PictureID");
+ { glBindTexture(GL_TEXTURE_2D, ImageID);
+ checkGlError("glBindTexture old ImageID");
}
xy[0][0]=x; xy[0][1]=y;
@@ -465,9 +469,9 @@ void nativeImage(double x, double y, double w, double h, unsigned char *b, unsig
glBindBuffer(GL_ARRAY_BUFFER, xybuffer);
glBufferData(GL_ARRAY_BUFFER, sizeof(xy), xy, GL_STREAM_DRAW);
- glUniform1i(ImageID, 1);
+ glUniform1i(IsImageID, 1);
glDrawArrays(GL_TRIANGLES, 0, 2*3);
- glUniform1i(ImageID, 0);
+ glUniform1i(IsImageID, 0);
}
@@ -579,3 +583,17 @@ void nativeFreeGlyph(struct gcache_s*g)
g->GLtexture = 0;
}
}
+
+/* no printing support so far, just placeholders */
+
+int nativePrintStart(int w,int h,unsigned char*bits)
+{ return 0;
+}
+
+int nativePrintEnd(void)
+{ return 0;
+}
+
+int nativePrint(unsigned char*bits)
+{ return 0;
+}
diff --git a/Build/source/texk/web2c/hitexdir/hintview/src/rendernative.h b/Build/source/texk/web2c/hitexdir/hintview/src/rendernative.h
index 27f36754a41..56f482a5b7e 100644
--- a/Build/source/texk/web2c/hitexdir/hintview/src/rendernative.h
+++ b/Build/source/texk/web2c/hitexdir/hintview/src/rendernative.h
@@ -1,52 +1,55 @@
-/*377:*/
-#line 7652 "hint.w"
+/*378:*/
+#line 7668 "hint.w"
#ifndef _RENDERNATIVE_H
#define _RENDERNATIVE_H
-/*329:*/
-#line 6580 "hint.w"
+/*330:*/
+#line 6586 "hint.w"
extern void nativeInit(void);
extern void nativeClear(void);
-/*:329*//*330:*/
-#line 6587 "hint.w"
+extern int nativePrintStart(int w,int h,unsigned char*bits);
+extern int nativePrintEnd(void);
+extern int nativePrint(unsigned char*bits);
+/*:330*//*331:*/
+#line 6596 "hint.w"
extern void nativeSetSize(int px_h,int px_v,double xdpi,double ydpi);
-/*:330*//*331:*/
-#line 6592 "hint.w"
+/*:331*//*332:*/
+#line 6601 "hint.w"
extern void nativeSetDark(int dark);
-/*:331*//*332:*/
-#line 6597 "hint.w"
+/*:332*//*333:*/
+#line 6606 "hint.w"
extern void nativeBlank(void);
-/*:332*//*333:*/
-#line 6607 "hint.w"
+/*:333*//*334:*/
+#line 6616 "hint.w"
typedef struct gcache_s*gcache_s_ptr;
extern void nativeGlyph(double x,double dx,double y,double dy,double w,double h,struct gcache_s*g,uint8_t s);
-/*:333*//*334:*/
-#line 6618 "hint.w"
+/*:334*//*335:*/
+#line 6627 "hint.w"
void nativeRule(double x,double y,double w,double h);
-/*:334*//*335:*/
-#line 6624 "hint.w"
+/*:335*//*336:*/
+#line 6633 "hint.w"
void nativeImage(double x,double y,double w,double h,unsigned char*istart,unsigned char*iend);
-/*:335*//*336:*/
-#line 6630 "hint.w"
+/*:336*//*337:*/
+#line 6639 "hint.w"
extern void nativeSetPK(struct gcache_s*g);
extern void nativeSetFreeType(struct gcache_s*g);
-/*:336*//*337:*/
-#line 6637 "hint.w"
+/*:337*//*338:*/
+#line 6646 "hint.w"
void nativeFreeGlyph(struct gcache_s*g);
-/*:337*/
-#line 7656 "hint.w"
+/*:338*/
+#line 7672 "hint.w"
#endif
-/*:377*/
+/*:378*/
diff --git a/Build/source/texk/web2c/hitexdir/hitex.w b/Build/source/texk/web2c/hitexdir/hitex.w
index 0d956bc47c2..69c685ef63f 100644
--- a/Build/source/texk/web2c/hitexdir/hitex.w
+++ b/Build/source/texk/web2c/hitexdir/hitex.w
@@ -124,7 +124,7 @@
\let\mc=\ninerm % medium caps for names like SAIL
\def\Prote{{\tenrm P\kern-0.1em R\kern-0.15em\raise.11ex\hbox{o}%
\kern-0.22em T\kern-0.05em E}}
-\ifacro
+\ifpdftex
\sanitizecommand{\eTeX}{eTeX}
\sanitizecommand{\Prote}{PRoTE}
\fi
@@ -133,7 +133,7 @@
\def\eTeX{$\varepsilon$-\TeX}
\font\sf=cmss10 % used for the HINT name
\def\HINT{\leavevmode\hbox{\sf HINT\spacefactor1000}}
-\ifacro\sanitizecommand{\HINT}{HINT}\fi
+\ifpdftex\sanitizecommand{\HINT}{HINT}\fi
\font\revrm=xbmc10 % for right-to-left text
% to generate xbmc10 (i.e., reflected cmbx10) use a file
% xbmc10.mf containing:
@@ -3114,13 +3114,12 @@ split insertion of the same class. There is one more field, the
@ A |mark_node| has a |mark_ptr| field that points to the reference count
of a token list that contains the user's \.{\\mark} text.
-This field occupies a full word instead of a halfword, because
-there's nothing to put in the other halfword; it is easier in \PASCAL\ to
-use the full word than to risk leaving garbage in the unused half.
+In addition there is a |mark_class| field that contains the mark class.
@d mark_node 4 /*|type| of a mark node*/
@d small_node_size 2 /*number of words to allocate for most node types*/
-@d mark_ptr(A) mem[A+1].i /*head of the token list for a mark*/
+@d mark_ptr(A) link(A+1) /*head of the token list for a mark*/
+@d mark_class(A) info(A+1) /*the mark class*/
@ An |adjust_node|, which occurs only in horizontal lists,
specifies material that will be moved out into the surrounding
@@ -3129,7 +3128,8 @@ operation. The |adjust_ptr| field points to the vlist containing this
material.
@d adjust_node 5 /*|type| of an adjust node*/
-@d adjust_ptr(A) mark_ptr(A) /*vertical list to be moved out of horizontal list*/
+@d adjust_ptr(A) mem[A+1].i
+ /*vertical list to be moved out of horizontal list*/
@ A |ligature_node|, which occurs only in horizontal lists, specifies
a character that was fabricated from the interaction of two or more
@@ -4019,7 +4019,11 @@ append_char('|');show_node_list(post_break(p));flush_char; /*recursive call*/
}
@ @<Display mark |p|@>=
-{@+print_esc("mark");print_mark(mark_ptr(p));
+{@+print_esc("mark");
+if (mark_class(p)!=0)
+ {@+print_char('s');print_int(mark_class(p));
+ }
+print_mark(mark_ptr(p));
}
@ @<Display adjustment |p|@>=
@@ -4264,6 +4268,7 @@ expanded by `\.{\\the}'.
@d vmove 22 /*vertical motion ( \.{\\raise}, \.{\\lower} )*/
@d un_hbox 23 /*unglue a box ( \.{\\unhbox}, \.{\\unhcopy} )*/
@d un_vbox 24 /*unglue a box ( \.{\\unvbox}, \.{\\unvcopy} )*/
+ /*( or \.{\\pagediscards}, \.{\\splitdiscards} )*/
@d remove_item 25 /*nullify last item ( \.{\\unpenalty},
\.{\\unkern}, \.{\\unskip} )*/
@d hskip 26 /*horizontal glue ( \.{\\hskip}, \.{\\hfil}, etc.~)*/
@@ -6041,7 +6046,9 @@ case hrule: print_esc("hrule");@+break;
case ignore_spaces: print_esc("ignorespaces");@+break;
case insert: print_esc("insert");@+break;
case ital_corr: print_esc("/");@+break;
-case mark: print_esc("mark");@+break;
+case mark: {@+print_esc("mark");
+ if (chr_code > 0) print_char('s');
+ } @+break;
case math_accent: print_esc("mathaccent");@+break;
case math_char_num: print_esc("mathchar");@+break;
case math_choice: print_esc("mathchoice");@+break;
@@ -6724,7 +6731,7 @@ symbolic form, including the expansion of a macro or mark.
if (cur_cmd >= call)
{@+print_char(':');print_ln();token_show(cur_chr);
}
-else if (cur_cmd==top_bot_mark)
+else if ((cur_cmd==top_bot_mark)&&(cur_chr < marks_code))
{@+print_char(':');print_ln();
token_show(cur_mark[cur_chr]);
}
@@ -8339,6 +8346,8 @@ global array of five pointers; we refer to the individual entries of this
array by symbolic names |top_mark|, etc. The value of |top_mark| is either
|null| or a pointer to the reference count of a token list.
+@d marks_code 5 /*add this for \.{\\topmarks} etc.*/
+@#
@d top_mark_code 0 /*the mark in effect at the previous page break*/
@d first_mark_code 1 /*the first mark between |top_mark| and |bot_mark|*/
@d bot_mark_code 2 /*the mark in effect at the current page break*/
@@ -8372,20 +8381,25 @@ primitive("splitbotmark", top_bot_mark, split_bot_mark_code);
@!@:split\_bot\_mark\_}{\.{\\splitbotmark} primitive@>
@ @<Cases of |print_cmd_chr|...@>=
-case top_bot_mark: switch (chr_code) {
+case top_bot_mark: {@+switch ((chr_code%marks_code)) {
case first_mark_code: print_esc("firstmark");@+break;
case bot_mark_code: print_esc("botmark");@+break;
case split_first_mark_code: print_esc("splitfirstmark");@+break;
case split_bot_mark_code: print_esc("splitbotmark");@+break;
default:print_esc("topmark");
+ }
+ if (chr_code >= marks_code) print_char('s');
} @+break;
@ The following code is activated when |cur_cmd==top_bot_mark| and
when |cur_chr| is a code like |top_mark_code|.
@<Insert the \(a)appropriate mark text into the scanner@>=
-{@+if (cur_mark[cur_chr]!=null)
- begin_token_list(cur_mark[cur_chr], mark_text);
+{@+t=cur_chr%marks_code;
+if (cur_chr >= marks_code) scan_register_num();@+else cur_val=0;
+if (cur_val==0) cur_ptr=cur_mark[t];
+else@<Compute the mark pointer for mark type |t| and class |cur_val|@>;
+if (cur_ptr!=null) begin_token_list(cur_ptr, mark_text);
}
@ Now let's consider |macro_call| itself, which is invoked when \TeX\ is
@@ -19728,7 +19742,8 @@ The original box becomes ``void'' if and only if it has been entirely
extracted. The extracted box is ``void'' if and only if the original
box was void (or if it was, erroneously, an hlist box).
-@p static pointer vsplit(halfword @!n, scaled @!h)
+@p @t\4@>@<Declare the function called |do_marks|@>@;
+static pointer vsplit(halfword @!n, scaled @!h)
/*extracts a page of height |h| from box |n|*/
{@+
pointer v; /*the box to be split*/
@@ -19736,6 +19751,8 @@ pointer p; /*runs through the vlist*/
pointer q; /*points to where the break occurs*/
cur_val=n;fetch_box(v);
flush_node_list(split_disc);split_disc=null;
+if (sa_mark!=null)
+ if (do_marks(vsplit_init, 0, sa_mark)) sa_mark=null;
if (split_first_mark!=null)
{@+delete_token_ref(split_first_mark);split_first_mark=null;
delete_token_ref(split_bot_mark);split_bot_mark=null;
@@ -19771,7 +19788,8 @@ if (type(v)!=vlist_node)
p=list_ptr(v);
if (p==q) list_ptr(v)=null;
else loop@+{@+if (type(p)==mark_node)
- if (split_first_mark==null)
+ if (mark_class(p)!=0) @<Update the current marks for |vsplit|@>@;
+ else if (split_first_mark==null)
{@+split_first_mark=mark_ptr(p);
split_bot_mark=split_first_mark;
token_ref_count(split_first_mark)=@|
@@ -20402,6 +20420,8 @@ int @!save_vbadness; /*saved value of |vbadness|*/
scaled @!save_vfuzz; /*saved value of |vfuzz|*/
pointer @!save_split_top_skip; /*saved value of |split_top_skip|*/
@<Set the value of |output_penalty|@>;
+if (sa_mark!=null)
+ if (do_marks(fire_up_init, 0, sa_mark)) sa_mark=null;
if (bot_mark!=null)
{@+if (top_mark!=null) delete_token_ref(top_mark);
top_mark=bot_mark;add_token_ref(top_mark);
@@ -20410,6 +20430,8 @@ if (bot_mark!=null)
@<Put the \(o)optimal current page into box 255, update |first_mark| and |bot_mark|,
append insertions to their boxes, and put the remaining nodes back on the
contribution list@>;
+if (sa_mark!=null)
+ if (do_marks(fire_up_done, 0, sa_mark)) sa_mark=null;
if ((top_mark!=null)&&(first_mark==null))
{@+first_mark=top_mark;add_token_ref(top_mark);
}
@@ -20446,7 +20468,9 @@ while (p!=best_page_break)
@<Either insert the material specified by node |p| into the appropriate
box, or hold it for the next page; also delete node |p| from the current page@>;
}
- else if (type(p)==mark_node) @<Update the values of |first_mark| and |bot_mark|@>;
+ else if (type(p)==mark_node)
+ if (mark_class(p)!=0) @<Update the current marks for |fire_up|@>@;
+ else@<Update the values of |first_mark| and |bot_mark|@>;
prev_p=p;p=link(prev_p);
}
split_top_skip=save_split_top_skip;
@@ -21945,7 +21969,12 @@ case outline_group: hfinish_outline_group();@+break;
@ @<Declare act...@>=
static void make_mark(void)
{@+pointer p; /*new node*/
+halfword @!c; /*the mark class*/
+if (cur_chr==0) c=0;
+else{@+scan_register_num();c=cur_val;
+ }
p=scan_toks(false, true);p=get_node(small_node_size);
+mark_class(p)=c;
type(p)=mark_node;subtype(p)=0; /*the |subtype| is not used*/
mark_ptr(p)=def_ref;link(tail)=p;tail=p;
}
@@ -25277,6 +25306,8 @@ if (c==1)
#ifdef @!INIT
for (c=top_mark_code; c<=split_bot_mark_code; c++)
if (cur_mark[c]!=null) delete_token_ref(cur_mark[c]);
+ if (sa_mark!=null)
+ if (do_marks(destroy_marks, 0, sa_mark)) sa_mark=null;
for (c=last_box_code; c<=vsplit_code; c++) flush_node_list(disc_ptr[c]);
if (last_glue!=max_halfword) delete_glue_ref(last_glue);
store_fmt_file();return;
@@ -28005,6 +28036,31 @@ for count and dimen values, |zero_glue| for glue (skip and muskip)
values, void for boxes, and |null| for token lists (and current marks
discussed below).
+Similarly there are 32768 mark classes; the command \.{\\marks}|n|
+creates a mark node for a given mark class |0 <= n <= 32767| (where
+\.{\\marks0} is synonymous to \.{\\mark}). The page builder (actually
+the |fire_up| routine) and the |vsplit| routine maintain the current
+values of |top_mark|, |first_mark|, |bot_mark|, |split_first_mark|, and
+|split_bot_mark| for each mark class. They are accessed as
+\.{\\topmarks}|n| etc., and \.{\\topmarks0} is again synonymous to
+\.{\\topmark}. As in \TeX\ the five current marks for mark class zero
+are realized as |cur_mark| array. The additional current marks are
+again realized as tree structure with individual mark classes existing
+only when needed.
+
+@<Generate all \eTeX...@>=
+primitive("marks", mark, marks_code);
+@!@:marks\_}{\.{\\marks} primitive@>
+primitive("topmarks", top_bot_mark, top_mark_code+marks_code);
+@!@:top\_marks\_}{\.{\\topmarks} primitive@>
+primitive("firstmarks", top_bot_mark, first_mark_code+marks_code);
+@!@:first\_marks\_}{\.{\\firstmarks} primitive@>
+primitive("botmarks", top_bot_mark, bot_mark_code+marks_code);
+@!@:bot\_marks\_}{\.{\\botmarks} primitive@>
+primitive("splitfirstmarks", top_bot_mark, split_first_mark_code+marks_code);
+@!@:split\_first\_marks\_}{\.{\\splitfirstmarks} primitive@>
+primitive("splitbotmarks", top_bot_mark, split_bot_mark_code+marks_code);
+@!@:split\_bot\_marks\_}{\.{\\splitbotmarks} primitive@>
@ The |scan_register_num| procedure scans a register number that must
not exceed 255 in compatibility mode resp.\ 32767 in extended mode.
@@ -28325,6 +28381,136 @@ print_char('}');end_diagnostic(false);
}
#endif
+@ Here we compute the pointer to the current mark of type |t| and mark
+class |cur_val|.
+
+@<Compute the mark pointer...@>=
+{@+find_sa_element(mark_val, cur_val, false);
+if (cur_ptr!=null)
+ if (odd(t)) cur_ptr=link(cur_ptr+(t/2)+1);
+ else cur_ptr=info(cur_ptr+(t/2)+1);
+}
+
+@ The current marks for all mark classes are maintained by the |vsplit|
+and |fire_up| routines and are finally destroyed (for \.{INITEX} only)
+@.INITEX@>
+by the |final_cleanup| routine. Apart from updating the current marks
+when mark nodes are encountered, these routines perform certain actions
+on all existing mark classes. The recursive |do_marks| procedure walks
+through the whole tree or a subtree of existing mark class nodes and
+preforms certain actions indicted by its first parameter |a|, the action
+code. The second parameter |l| indicates the level of recursion (at
+most four); the third parameter points to a nonempty tree or subtree.
+The result is |true| if the complete tree or subtree has been deleted.
+
+@d vsplit_init 0 /*action code for |vsplit| initialization*/
+@d fire_up_init 1 /*action code for |fire_up| initialization*/
+@d fire_up_done 2 /*action code for |fire_up| completion*/
+@d destroy_marks 3 /*action code for |final_cleanup|*/
+@#
+@d sa_top_mark(A) info(A+1) /*\.{\\topmarks}|n|*/
+@d sa_first_mark(A) link(A+1) /*\.{\\firstmarks}|n|*/
+@d sa_bot_mark(A) info(A+2) /*\.{\\botmarks}|n|*/
+@d sa_split_first_mark(A) link(A+2) /*\.{\\splitfirstmarks}|n|*/
+@d sa_split_bot_mark(A) info(A+3) /*\.{\\splitbotmarks}|n|*/
+
+@<Declare the function called |do_marks|@>=
+static bool do_marks(small_number @!a, small_number @!l, pointer @!q)
+{@+int i; /*a four bit index*/
+if (l < 4) /*|q| is an index node*/
+ {@+for (i=0; i<=15; i++)
+ {@+get_sa_ptr;
+ if (cur_ptr!=null) if (do_marks(a, l+1, cur_ptr)) delete_sa_ptr;
+ }
+ if (sa_used(q)==0)
+ {@+free_node(q, index_node_size);q=null;
+ }
+ }
+else /*|q| is the node for a mark class*/
+ {@+switch (a) {
+ @<Cases for |do_marks|@>@;
+ } /*there are no other cases*/
+ if (sa_bot_mark(q)==null) if (sa_split_bot_mark(q)==null)
+ {@+free_node(q, mark_class_node_size);q=null;
+ }
+ }
+return(q==null);
+}
+
+@ At the start of the |vsplit| routine the existing |split_fist_mark|
+and |split_bot_mark| are discarded.
+
+@<Cases for |do_marks|@>=
+case vsplit_init: if (sa_split_first_mark(q)!=null)
+ {@+delete_token_ref(sa_split_first_mark(q));sa_split_first_mark(q)=null;
+ delete_token_ref(sa_split_bot_mark(q));sa_split_bot_mark(q)=null;
+ } @+break;
+
+@ We use again the fact that |split_first_mark==null| if and only if
+|split_bot_mark==null|.
+
+@<Update the current marks for |vsplit|@>=
+{@+find_sa_element(mark_val, mark_class(p), true);
+if (sa_split_first_mark(cur_ptr)==null)
+ {@+sa_split_first_mark(cur_ptr)=mark_ptr(p);
+ add_token_ref(mark_ptr(p));
+ }
+else delete_token_ref(sa_split_bot_mark(cur_ptr));
+sa_split_bot_mark(cur_ptr)=mark_ptr(p);
+add_token_ref(mark_ptr(p));
+}
+
+@ At the start of the |fire_up| routine the old |top_mark| and
+|first_mark| are discarded, whereas the old |bot_mark| becomes the new
+|top_mark|. An empty new |top_mark| token list is, however, discarded
+as well in order that mark class nodes can eventually be released. We
+use again the fact that |bot_mark!=null| implies |first_mark!=null|; it
+also knows that |bot_mark==null| implies |top_mark==first_mark==null|.
+
+@<Cases for |do_marks|@>=
+case fire_up_init: if (sa_bot_mark(q)!=null)
+ {@+if (sa_top_mark(q)!=null) delete_token_ref(sa_top_mark(q));
+ delete_token_ref(sa_first_mark(q));sa_first_mark(q)=null;
+ if (link(sa_bot_mark(q))==null) /*an empty token list*/
+ {@+delete_token_ref(sa_bot_mark(q));sa_bot_mark(q)=null;
+ }
+ else add_token_ref(sa_bot_mark(q));
+ sa_top_mark(q)=sa_bot_mark(q);
+ } @+break;
+
+@ @<Cases for |do_marks|@>=
+case fire_up_done: if ((sa_top_mark(q)!=null)&&(sa_first_mark(q)==null))
+ {@+sa_first_mark(q)=sa_top_mark(q);add_token_ref(sa_top_mark(q));
+ } @+break;
+
+@ @<Update the current marks for |fire_up|@>=
+{@+find_sa_element(mark_val, mark_class(p), true);
+if (sa_first_mark(cur_ptr)==null)
+ {@+sa_first_mark(cur_ptr)=mark_ptr(p);
+ add_token_ref(mark_ptr(p));
+ }
+if (sa_bot_mark(cur_ptr)!=null) delete_token_ref(sa_bot_mark(cur_ptr));
+sa_bot_mark(cur_ptr)=mark_ptr(p);add_token_ref(mark_ptr(p));
+}
+
+@ Here we use the fact that the five current mark pointers in a mark
+class node occupy the same locations as the the first five pointers of
+an index node. For systems using a run-time switch to distinguish
+between \.{VIRTEX} and \.{INITEX}, the codewords `$|@t\#\&{ifdef} \.{INIT}@>|\ldots|@t\#\&{endif}@>|$'
+surrounding the following piece of code should be removed.
+@.INITEX@>
+@^system dependencies@>
+
+@<Cases for |do_marks|@>=
+#ifdef @!INIT
+case destroy_marks: for (i=top_mark_code; i<=split_bot_mark_code; i++)
+ {@+get_sa_ptr;
+ if (cur_ptr!=null)
+ {@+delete_token_ref(cur_ptr);put_sa_ptr(null);
+ }
+ }
+#endif
+
@ The command code |internal_register| is used for `\.{\\count}', `\.{\\dimen}',
etc., as well as for references to sparse array elements defined by
`\.{\\countdef}', etc.