summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Ruckert <martin.ruckert@hm.edu>2021-11-22 16:45:58 +0000
committerMartin Ruckert <martin.ruckert@hm.edu>2021-11-22 16:45:58 +0000
commita0f8c49db29d14303820f9f0601fcadb196ab0d1 (patch)
treec20624586f42905f78c56ffc1f076e0e270344b7
parent039a2fa78baaaeec75b3610f47e0964a2b4bfab9 (diff)
fixing various options: (-g -a --help --version)
git-svn-id: svn://tug.org/texlive/trunk@61117 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Build/source/texk/web2c/hitexdir/hiformat.w331
-rw-r--r--Build/source/texk/web2c/hitexdir/hilexer.c24
-rw-r--r--Build/source/texk/web2c/hitexdir/hilexer.l24
-rw-r--r--Build/source/texk/web2c/hitexdir/hiparser.c396
-rw-r--r--Build/source/texk/web2c/hitexdir/hiparser.h2
-rw-r--r--Build/source/texk/web2c/hitexdir/hiparser.y434
-rw-r--r--Build/source/texk/web2c/hitexdir/hitex.w389
-rwxr-xr-xBuild/source/texk/web2c/hitexdir/tests/hello.test8
-rwxr-xr-xBuild/source/texk/web2c/hitexdir/tests/rule.test10
-rw-r--r--Build/source/texk/web2c/hitexdir/tex/ifhitex.tex7
10 files changed, 807 insertions, 818 deletions
diff --git a/Build/source/texk/web2c/hitexdir/hiformat.w b/Build/source/texk/web2c/hitexdir/hiformat.w
index 9208890ffe6..138b25d76be 100644
--- a/Build/source/texk/web2c/hitexdir/hiformat.w
+++ b/Build/source/texk/web2c/hitexdir/hiformat.w
@@ -47,9 +47,9 @@
\def\setrevision$#1: #2 ${\gdef\lastrevision{#2}}
-\setrevision$Revision: 2541 $
+\setrevision$Revision: 2571 $
\def\setdate$#1(#2) ${\gdef\lastdate{#2}}
-\setdate$Date: 2021-10-26 09:03:28 +0200 (Tue, 26 Oct 2021) $
+\setdate$Date: 2021-11-22 17:37:05 +0100 (Mon, 22 Nov 2021) $
\null
@@ -3403,9 +3403,11 @@ appendix~\secref{fastforward}.
\subsection{Boxes}\label{boxnodes}
The central structuring elements of \TeX\ are boxes\index{box}.
Boxes have a height |h|, a depth |d|, and a width |w|.
-The shift amount |a| shifts the contents of the box, the glue ratio\index{glue ratio} |r| is a factor
-applied to the glue inside the box, the glue order |o| is its order of stretchability\index{stretchability},
-and the glue sign |s| is $-1$ for shrinking\index{shrinkability}, 0 for rigid, and $+1$ for stretching.
+The shift amount |a| shifts the contents of the box,
+the glue ratio\index{glue ratio} |r| is a factor applied to the glue inside the box,
+the glue order |o| is its order of stretchability\index{stretchability},
+and the glue sign |s| is $-1$ for shrinking\index{shrinkability},
+0 for rigid, and $+1$ for stretching.
Most importantly, a box contains a list |l| of content nodes inside the box.
@@ -6834,13 +6836,13 @@ void hset_entry(entry_t *e, uint16_t i, uint32_t size, uint32_t xsize, @|char *f
@
-Writing the auxiliary files depends on the {\tt -n}, {\tt -f} and {\tt -g}
+Writing the auxiliary files depends on the {\tt -a}, {\tt -g} and {\tt -f}
options.
@<without {\tt -f} skip writing an existing file@>=
- if ( !option_force && access(file_name,F_OK)==0)
+ if ( !option_force && access(aux_name,F_OK)==0)
{ MESSAGE("File '%s' exists.\n"@| "To rewrite the file use the -f option.\n",
- file_name);
+ aux_name);
continue;
}
@
@@ -6864,63 +6866,77 @@ If the \HINT\ file is {\tt shrink}ed on one system and
{\tt stretch}ed on another system, this is usually not the desired behavior.
Without the {\tt -g} option,\label{absrel} the files will be written in two local directories.
The names of these directories are derived from the output file name,
-replacing the extension ``{\tt .HINT}'' with ``{\tt .abs}'' if the original
+replacing the extension ``{\tt .hint}'' with ``{\tt .abs}'' if the original
filename contained an absolute path, and replacing it with ``{\tt .rel}''
if the original filename contained a relative path. Inside these directories,
the path as given in the filename is retained.
When {\tt shrink}ing a \HINT\ file without the {\tt -g} option,
the original filenames can be reconstructed.
-@<without {\tt -g} compute a local |file_name|@>=
-if (!option_global)
-{ int path_length=(int)strlen(file_name);
- @<determine whether |file_name| is absolute or relative@>@;
- if (file_name_length<stem_length+ext_length+path_length)
- { file_name_length=stem_length+ext_length+path_length;
- REALLOCATE(stem_name, file_name_length+1,char);
- }
- strcpy(stem_name+stem_length,aux_ext[name_type]);
- strcpy(stem_name+stem_length+ext_length,file_name);
- DBG(DBGDIR,"Replacing auxiliary file name:\n\t%s\n->\t%s\n",file_name,stem_name);
- file_name=stem_name;
+@<compute a local |aux_name|@>=
+{ char *path=dir[i].file_name;
+ int path_length=(int)strlen(path);
+ int aux_length;
+ @<determine whether |path| is absolute or relative@>@;
+ aux_length=stem_length+ext_length+path_length;
+ ALLOCATE(aux_name,aux_length+1,char);
+ strcpy(aux_name,stem_name);
+ strcpy(aux_name+stem_length,aux_ext[name_type]);
+ strcpy(aux_name+stem_length+ext_length,path);
+ @<replace links to the parent directory@>@;
+ DBG(DBGDIR,"Replacing auxiliary file name:\n\t%s\n->\t%s\n",path,aux_name);
}
@
-@<determine whether |file_name| is absolute or relative@>=
+@<determine whether |path| is absolute or relative@>=
enum {absolute=0, relative=1} name_type;
char *aux_ext[2]={".abs/",".rel/"};
int ext_length=5;
- if (file_name[0]=='/')
- { name_type=absolute;
- file_name++; path_length--;
+ if (path[0]=='/')
+ { name_type=absolute;
+ path++; path_length--;
}
- else if (path_length>3 && isalpha(file_name[0]) &&
- file_name[1]==':' && file_name[2]=='/')
+ else if (path_length>3 && isalpha(path[0]) &&
+ path[1]==':' && path[2]=='/')
{ name_type=absolute;
- file_name[1]='_';
+ path[1]='_';
}
else
name_type=relative;
@
+
+When the {\tt -g} is not given, auxiliar files are written into
+special subdirectories. To prevent them from escaping into the global
+file system, we replace links to the parent direcory ``{\tt ../}'' by
+``{\tt \_\,\_/}''.
+
+@<replace links to the parent directory@>=
+{ int k;
+ for (k=0; k<aux_length-3;k++)
+ if (aux_name[k]=='.'&& aux_name[k+1]=='.'&& aux_name[k+2]=='/')
+ { aux_name[k]=aux_name[k+1]='_';k=k+2;}
+}
+@
+
It remains to create the directories along the path we might have constructed.
-@<make sure the path in |file_name| exists@>=
+@<make sure the path in |aux_name| exists@>=
{ char *path_end;
- path_end=file_name+1;
+ path_end=aux_name+1;
while (*path_end!=0)
{ if(*path_end=='/')
{ struct stat s;
*path_end=0;
- if (stat(file_name,&s)==-1)
+ if (stat(aux_name,&s)==-1)
{
#ifdef WIN32
- if (mkdir(file_name)!=0)
+ if (mkdir(aux_name)!=0)
#else
- @t\2\kern-1em@>if (mkdir(file_name,0777)!=0)
+ @t\2\kern-1em@>if (mkdir(aux_name,0777)!=0)
#endif
- QUIT("Unable to create directory %s",file_name);
- DBG(DBGDIR,"Creating directory %s\n",file_name);
+ QUIT("Unable to create directory %s",aux_name);
+ DBG(DBGDIR,"Creating directory %s\n",aux_name);
} else if (!(S_IFDIR&s.st_mode))
- QUIT("Unable to create directory %s, file exists",file_name);
+ QUIT("Unable to create directory %s, file exists",aux_name);
*path_end='/';
}
path_end++;
@@ -6939,28 +6955,30 @@ extern int stem_length;
void hget_section(uint16_t n);
void hwrite_aux_files(void)
{ int i;
- if (option_no_aux) return;
+ if (!option_aux) return;
DBG(DBGBASIC|DBGDIR,"Writing %d aux files\n",max_section_no-2);
for (i=3;i<=max_section_no;i++)
{ FILE *f;
- char * file_name=dir[i].file_name;
- int file_name_length=0;
-
- @<without {\tt -g} compute a local |file_name|@>@;
+ char *aux_name=NULL;
+ if (option_global)
+ aux_name=strdup(dir[i].file_name);
+ else
+ @<compute a local |aux_name|@>@;
@<without {\tt -f} skip writing an existing file@>@;
- @<make sure the path in |file_name| exists@>@;
+ @<make sure the path in |aux_name| exists@>@;
- f=fopen(file_name,"wb");
+ f=fopen(aux_name,"wb");
if (f==NULL)
- QUIT("Unable to open file '%s' for writing",file_name);
+ QUIT("Unable to open file '%s' for writing",aux_name);
else
{ size_t s;
hget_section(i);
- DBG(DBGDIR,"Writing file %s\n",file_name);
+ DBG(DBGDIR,"Writing file %s\n",aux_name);
s=fwrite(hstart,1,dir[i].size,f);
- if (s!=dir[i].size) QUIT("writing file %s",file_name);
+ if (s!=dir[i].size) QUIT("writing file %s",aux_name);
fclose(f);
}
+ free(aux_name);
}
}
@
@@ -7059,6 +7077,7 @@ it starts with the maximum section number instead of the section number zero,
and we set its position to the position of the
entry for section 1 (which might already be compressed).
The name of the directory section must be the empty string.
+
\gdef\subcodetitle{Directory Section}%
\getcode
@<get file functions@>=
@@ -7097,28 +7116,6 @@ void hclear_dir(void)
@
-When the \.{shrink} program writes the directory section in the short format,
-it needs to know the sizes of all the sections---including the optional sections.
-These sizes are not provided in the long format because it is safer and more
-convenient to let the machine figure out the file sizes\index{file size}.
-
-@<set the file sizes for optional sections@>=
-{ int i;
- for (i=3;i<=max_section_no;i++)
- { struct stat s;
- char *file_name=dir[i].file_name;
- int file_name_length=0;
- @<without {\tt -g} compute a local |file_name|@>@;
- if (stat(file_name,&s)!=0)
- QUIT("Unable to obtain file size for '%s'",dir[i].file_name);
- dir[i].size=s.st_size;
- dir[i].xsize=0;
- }
-}
-@
-
-The computation of the sizes of the mandatory sections will be
-explained later.
Armed with these preparations, we can put the directory into the \HINT\ file.
\gdef\subcodetitle{Directory Section}%
@@ -7173,9 +7170,11 @@ static size_t hput_root(void)
}
extern int option_compress;
+static char **aux_names;
void hput_directory(void)
{ int i;
- @<set the file sizes for optional sections@>@;
+ @<update the file sizes of optional sections@>@;
+
if (option_compress) { hcompress(1); @+hcompress(2); @+}
hput_directory_start();
for (i=1; i<=max_section_no; i++)
@@ -7189,15 +7188,67 @@ void hput_directory(void)
@
+Now let us look at the optional sections described in the directory entries 3 and above
+Where these files are found depends on the {\tt -g} and {\tt -a} options.
+
+With the {\tt -g} option given, only the file names as given in the directory entries are used.
+With the {\tt -a} option given, the file names are translated to filenames in the {|hin_name|\tt .abs} and {|hin_name|\tt .rel} directories, as described in section~\secref{absrel}.
+If neither the {\tt -a} nor the {\tt -g} option is given, {\tt shrink} first trys the translated
+filename and then the global filename before it gives up.
+When the \.{shrink} program writes the directory section in the short format,
+it needs to know the sizes of all the sections---including the optional sections.
+These sizes are not provided in the long format because it is safer and more
+convenient to let the machine figure out the file sizes\index{file size}.
+But before we can determine the size, we need to determine the file.
+
+@<update the file sizes of optional sections@>=
+{ int i;
+ ALLOCATE(aux_names,max_section_no+1,char *);
+ for (i=3;i<=max_section_no;i++)
+ { struct stat s;
+
+ if (!option_global)
+ { char * aux_name=NULL;
+ @<compute a local |aux_name|@>@;
+ if (stat(aux_name,&s)==0)
+ aux_names[i]=aux_name;
+ else
+ { if (option_aux) QUIT("Unable to find file '%s'",aux_name);
+ free(aux_name);
+ }
+ }
+ if ((aux_names[i]==NULL && !option_aux) || option_global)
+ { if (stat(dir[i].file_name,&s)!=0)
+ QUIT("Unable to find file '%s'",dir[i].file_name);
+ }
+ dir[i].size=s.st_size;
+ dir[i].xsize=0;
+ DBG(DBGDIR,"section %i: found file %s size %u\n",i,aux_names[i]?aux_names[i]:dir[i].file_name, dir[i].size);
+ }
+}
+@
+
+@<rewrite the file names of optional sections@>=
+{ int i;
+ for (i=3;i<=max_section_no;i++)
+ if (aux_names[i]!=NULL)
+ { free(dir[i].file_name);
+ dir[i].file_name=aux_names[i];
+ aux_names[i]=NULL;
+ }
+}
+@
+
+
+The computation of the sizes of the mandatory sections will be
+explained later.
+
+
+\gdef\subcodetitle{Optional Sections}%
To conclude this section, here is the function that adds the files that
are described in the directory entries 3 and above to a \HINT\ file in short format.
-Where these files are found depends on the {\tt -g} option.
-With that option given, the file names of the directory entries are used unchanged.
-Without that option, the files are found in the {|hin_name|\tt .abs} and {|hin_name|\tt .rel}
-directories, as described in section~\secref{absrel}.
-\gdef\subcodetitle{Optional Sections}%
\putcode
@<put functions@>=
static void hput_optional_sections(void)
@@ -7207,11 +7258,9 @@ static void hput_optional_sections(void)
{ FILE *f;
size_t fsize;
char *file_name=dir[i].file_name;
- int file_name_length=0;
- DBG(DBGDIR,"file %d: %s\n",dir[i].section_no,file_name);
+ DBG(DBGDIR,"adding file %d: %s\n",dir[i].section_no,file_name);
if (dir[i].xsize!=0) @/
DBG(DBGDIR,"Compressing of auxiliary files currently not supported");
- @<without {\tt -g} compute a local |file_name|@>@;
f=fopen(file_name,"rb");
if (f==NULL) QUIT("Unable to read section %d, file %s",
dir[i].section_no,file_name);
@@ -7226,7 +7275,7 @@ static void hput_optional_sections(void)
}
fclose(f);
if (fsize!=dir[i].size)
- QUIT(@["File size " SIZE_F " does not match directory size %u"@],@|fsize,dir[i].size);
+ QUIT(@["File size " SIZE_F " does not match section[0] size %u"@],@|fsize,dir[i].size);
}
}
@
@@ -8516,39 +8565,40 @@ parameters and options\index{option}\index{debugging}.
It tells us what to expect in the rest of this section.
{\def\SP{\hskip .5em}
@<explain usage@>=
- fprintf(stderr,
- "Usage: %s [options] filename%s\n",prog_name, in_ext);@/
- fprintf(stderr,
+ fprintf(stdout,
+ "Usage: %s [OPTION]... FILENAME%s\n",prog_name, in_ext);@/
+ fprintf(stdout,DESCRIPTION);
+ fprintf(stdout,
"Options:\n"@/
"\t --help \t display this message\n"@/
"\t --version\t display the HINT version\n"@/
"\t -o file\t specify an output file name\n"@/
- "\t -g \t assume global names for auxiliary files\n"@/
- "\t -f \t force overwriting auxiliary files\n"@/
- "\t -n \t do not write auxiliary files\n"@/
+ "\t -a \t write auxiliary files\n"@/
+ "\t -g \t use global names of auxiliary files (implies -a)\n"@/
+ "\t -f \t force overwriting existing auxiliary files\n"@/
"\t -l \t redirect stderr to a log file\n"@/
"\t -u \t enable writing utf8 character codes\n"@/
"\t -x \t enable writing hexadecimal character codes\n"@/
"\t -c \t enable compression of section 1 and 2\n");@/
#ifdef DEBUG
-fprintf(stderr,"\t -d XXXX \t set debug flag to hexadecimal value XXXX.\n"
+fprintf(stdout,"\t -d XXXX \t set debug flag to hexadecimal value XXXX.\n"
"\t\t\t OR together these values:\n");@/
-fprintf(stderr,"\t\t\t XX=%03X basic debugging\n", DBGBASIC);@/
-fprintf(stderr,"\t\t\t XX=%03X tag debugging\n", DBGTAGS);@/
-fprintf(stderr,"\t\t\t XX=%03X node debugging\n",DBGNODE);@/
-fprintf(stderr,"\t\t\t XX=%03X definition debugging\n", DBGDEF);@/
-fprintf(stderr,"\t\t\t XX=%03X directory debugging\n", DBGDIR);@/
-fprintf(stderr,"\t\t\t XX=%03X range debugging\n",DBGRANGE);@/
-fprintf(stderr,"\t\t\t XX=%03X float debugging\n", DBGFLOAT);@/
-fprintf(stderr,"\t\t\t XX=%03X compression debugging\n", DBGCOMPRESS);@/
-fprintf(stderr,"\t\t\t XX=%03X buffer debugging\n", DBGBUFFER);@/
-fprintf(stderr,"\t\t\t XX=%03X flex debugging\n", DBGFLEX);@/
-fprintf(stderr,"\t\t\t XX=%03X bison debugging\n", DBGBISON);@/
-fprintf(stderr,"\t\t\t XX=%03X TeX debugging\n", DBGTEX);@/
-fprintf(stderr,"\t\t\t XX=%03X Page debugging\n", DBGPAGE);@/
-fprintf(stderr,"\t\t\t XX=%03X Font debugging\n", DBGFONT);@/
-fprintf(stderr,"\t\t\t XX=%03X Render debugging\n", DBGRENDER);@/
-fprintf(stderr,"\t\t\t XX=%03X Label debugging\n", DBGLABEL);@/
+fprintf(stdout,"\t\t\t XX=%03X basic debugging\n", DBGBASIC);@/
+fprintf(stdout,"\t\t\t XX=%03X tag debugging\n", DBGTAGS);@/
+fprintf(stdout,"\t\t\t XX=%03X node debugging\n",DBGNODE);@/
+fprintf(stdout,"\t\t\t XX=%03X definition debugging\n", DBGDEF);@/
+fprintf(stdout,"\t\t\t XX=%03X directory debugging\n", DBGDIR);@/
+fprintf(stdout,"\t\t\t XX=%03X range debugging\n",DBGRANGE);@/
+fprintf(stdout,"\t\t\t XX=%03X float debugging\n", DBGFLOAT);@/
+fprintf(stdout,"\t\t\t XX=%03X compression debugging\n", DBGCOMPRESS);@/
+fprintf(stdout,"\t\t\t XX=%03X buffer debugging\n", DBGBUFFER);@/
+fprintf(stdout,"\t\t\t XX=%03X flex debugging\n", DBGFLEX);@/
+fprintf(stdout,"\t\t\t XX=%03X bison debugging\n", DBGBISON);@/
+fprintf(stdout,"\t\t\t XX=%03X TeX debugging\n", DBGTEX);@/
+fprintf(stdout,"\t\t\t XX=%03X Page debugging\n", DBGPAGE);@/
+fprintf(stdout,"\t\t\t XX=%03X Font debugging\n", DBGFONT);@/
+fprintf(stdout,"\t\t\t XX=%03X Render debugging\n", DBGRENDER);@/
+fprintf(stdout,"\t\t\t XX=%03X Label debugging\n", DBGLABEL);@/
#endif
@
}
@@ -8582,7 +8632,7 @@ int option_utf8=false;
int option_hex=false;
int option_force=false;
int option_global=false;
-int option_no_aux=false;
+int option_aux=false;
int option_compress=false;
char *stem_name=NULL;
int stem_length=0;
@@ -8591,7 +8641,7 @@ The variable |stem_name| contains the name of the input file
not including the extension. The space allocated for it
is large enough to append an extension with up to five characters.
It can be used with the extension {\tt .log} for the log file,
-with {\tt .HINT} or {\tt .hnt} for the output file,
+with {\tt .hint} or {\tt .hnt} for the output file,
and with {\tt .abs} or {\tt .rel} when writing or reading the auxiliary sections.
The {\tt stretch} program will overwrite the |stem_name|
using the name of the output file if it is set with the {\tt -o}
@@ -8616,7 +8666,12 @@ are supported in addition to the short options.
@<process the command line@>=
debugflags=DBGBASIC;
prog_name=argv[0];
- if (argc < 2) goto explain_usage;
+ if (argc < 2)
+ { fprintf(stderr,
+ "%s: no input file given\n"
+ "Try '%s --help' for more information\n",prog_name, prog_name);
+ exit(1);
+ }
argv++; /* skip the program name */
while (*argv!=NULL)
{ if ((*argv)[0]=='-')
@@ -8627,7 +8682,11 @@ are supported in addition to the short options.
{ fprintf(stderr,"%s version %d.%d\n",prog_name, HINT_VERSION, HINT_SUB_VERSION);
exit(0);
}
- default: goto explain_usage;
+ else if (strcmp(*argv,"--help")==0)
+ { @<explain usage@>@;
+ fprintf(stdout,"\nFor further information and reporting bugs see https://hint.userweb.mwn.de/\n");
+ exit(0);
+ }
case 'o': argv++;
file_name_length=(int)strlen(*argv);
ALLOCATE(file_name,file_name_length+6,char); /*plus extension*/
@@ -8636,13 +8695,24 @@ are supported in addition to the short options.
case 'u': option_utf8=true;@+break;
case 'x': option_hex=true;@+break;
case 'f': option_force=true; @+break;
- case 'g': option_global=true; @+break;
- case 'n': option_no_aux=true; @+break;
+ case 'g': option_global=option_aux=true; @+break;
+ case 'a': option_aux=true; @+break;
case 'c': option_compress=true; @+break;
case 'd': @/
- argv++; if (*argv==NULL) goto explain_usage;
+ argv++; if (*argv==NULL)
+ { fprintf(stderr,
+ "%s: option -d expects an argument\n"
+ "Try '%s --help' for more information\n",prog_name, prog_name);
+ exit(1);
+ }
debugflags=strtol(*argv,NULL,16);
break;
+ default:
+ { fprintf(stderr,
+ "%s: unrecognized option '%s'\n"
+ "Try '%s --help' for more information\n",prog_name,*argv,prog_name);
+ exit(1);
+ }
}
}
else /* the input file name */
@@ -8659,11 +8729,21 @@ are supported in addition to the short options.
ALLOCATE(stem_name,stem_length+6,char);
strncpy(stem_name,hin_name,stem_length);
stem_name[stem_length]=0;
- if (*(argv+1)!=NULL) goto explain_usage;
+ if (*(argv+1)!=NULL)
+ { fprintf(stderr,
+ "%s: extra argument after input file name: '%s'\n"
+ "Try '%s --help' for more information\n",prog_name,*(argv+1),prog_name);
+ exit(1);
+ }
}
argv++;
}
- if (hin_name==NULL) goto explain_usage;
+ if (hin_name==NULL)
+ { fprintf(stderr,
+ "%s: missing input file name\n"
+ "Try '%s --help' for more information\n",prog_name,prog_name);
+ exit(1);
+ }
@
After the command line has been processed, three file streams need to be opened:
@@ -8721,7 +8801,10 @@ Once we have established logging, we can try to open the other files.
strcpy(file_name,stem_name);@+
strcpy(file_name+stem_length,out_ext);
}
- @<make sure the path in |file_name| exists@>@;
+ { char *aux_name=file_name;
+ @<make sure the path in |aux_name| exists@>@;
+ aux_name=NULL;
+ }
hout=fopen(file_name,"wb");
if (hout==NULL) QUIT("Unable to open output file %s",file_name);
@
@@ -10290,9 +10373,11 @@ extern int yyparse(void);
@<function to write the banner@>@;
@<put functions@>@;
+#define DESCRIPTION "\nShrinking converts a 'long' ASCII HINT file into a`short' binary HINT file .\n"
+
int main(int argc, char *argv[])
{ @<local variables in |main|@>@;
- in_ext=".HINT";
+ in_ext=".hint";
out_ext=".hnt";
@<process the command line@>@;
@@ -10314,16 +10399,13 @@ int main(int argc, char *argv[])
yyparse();
hput_directory();
-
- hput_hint("shrink");
+ @<rewrite the file names of optional sections@>@;
+ hput_hint("created by shrink");
@<close the output file@>@;
@<close the input file@>@;
@<close the log file@>@;
return 0;
-explain_usage:
- @<explain usage@>@;
- return 1;
}
@
@@ -10365,11 +10447,13 @@ format into a \HINT\ file in long format.
@<shared get functions@>@;
@<get functions@>@;
+#define DESCRIPTION "\nStretching converts a `short' binary HINT file into a 'long' ASCII HINT file.\n"
+
int main(int argc, char *argv[])
{ @<local variables in |main|@>@;
in_ext=".hnt";
- out_ext=".HINT";
+ out_ext=".hint";
@<process the command line@>@;
@<open the log file@>@;
@<open the output file@>@;
@@ -10379,7 +10463,7 @@ int main(int argc, char *argv[])
hend=hstart+hin_size;
hget_banner();
if (!hcheck_banner("hint")) QUIT("Invalid banner");
- hput_banner("HINT","stretch");
+ hput_banner("HINT","created by stretch");
hget_directory();
hwrite_directory();
hget_definition_section();
@@ -10390,9 +10474,7 @@ int main(int argc, char *argv[])
DBG(DBGBASIC,"End of Program\n");
@<close the log file@>@;
return 0;
-explain_usage:
- @<explain usage@>@;
- return 1;}
+}
@
In the above program, the get functions call the write functions
@@ -10445,6 +10527,8 @@ backwards.
@<shared skip functions@>@;
@<skip functions@>@;
+#define DESCRIPTION "\n This program tests parsing a binary HINT file in reverse direction.\n"
+
int main(int argc, char *argv[])
{ @<local variables in |main|@>@;
in_ext=".hnt";
@@ -10477,9 +10561,6 @@ int main(int argc, char *argv[])
hget_unmap();
@<close the log file@>@;
return 0;
-explain_usage:
- @<explain usage@>@;
- return 1;
}
@
diff --git a/Build/source/texk/web2c/hitexdir/hilexer.c b/Build/source/texk/web2c/hitexdir/hilexer.c
index a075b22397d..2b6f3e6d00c 100644
--- a/Build/source/texk/web2c/hitexdir/hilexer.c
+++ b/Build/source/texk/web2c/hitexdir/hilexer.c
@@ -843,22 +843,22 @@ static const flex_int16_t yy_rule_linenum[126] =
char *yytext;
#line 1 "lexer.l"
#line 2 "lexer.l"
- /*509:*/
- #line 10175 "format.w"
+ /*511:*/
+ #line 10258 "format.w"
#include "hibasetypes.h"
#include "hierror.h"
#include "hiformat.h"
#include "hiput.h"
- /*423:*/
+ /*425:*/
#ifdef DEBUG
#define YYDEBUG 1
extern int yydebug;
#else
#define YYDEBUG 0
#endif
- /*:423*/
+ /*:425*/
#include "hiparser.h"
/*22:*/
@@ -980,7 +980,7 @@ float64_t xtof(char*x)
}
/*:61*/
int yywrap(void){
- #line 10186 "format.w"
+ #line 10269 "format.w"
return 1;}
#ifdef _MSC_VER
#pragma warning( disable : 4267)
@@ -2013,37 +2013,37 @@ YY_RULE_SETUP
#line 338 "lexer.l"
return SECTION;
YY_BREAK
-/*:323*/ /*342:*/
+/*:323*/ /*344:*/
case 119:
YY_RULE_SETUP
#line 340 "lexer.l"
return DEFINITIONS;
YY_BREAK
-/*:342*/ /*350:*/
+/*:344*/ /*352:*/
case 120:
YY_RULE_SETUP
#line 342 "lexer.l"
return MAX;
YY_BREAK
-/*:350*/ /*365:*/
+/*:352*/ /*367:*/
case 121:
YY_RULE_SETUP
#line 344 "lexer.l"
return PARAM;
YY_BREAK
-/*:365*/ /*374:*/
+/*:367*/ /*376:*/
case 122:
YY_RULE_SETUP
#line 346 "lexer.l"
return FONT;
YY_BREAK
-/*:374*/ /*402:*/
+/*:376*/ /*404:*/
case 123:
YY_RULE_SETUP
#line 348 "lexer.l"
return CONTENT;
YY_BREAK
-/*:402*/
+/*:404*/
case 124:
YY_RULE_SETUP
#line 350 "lexer.l"
@@ -3226,5 +3226,5 @@ void yyfree (void * ptr )
#line 353 "lexer.l"
- /*:509*/
+ /*:511*/
diff --git a/Build/source/texk/web2c/hitexdir/hilexer.l b/Build/source/texk/web2c/hitexdir/hilexer.l
index 17ffe51bc11..d959a4d0171 100644
--- a/Build/source/texk/web2c/hitexdir/hilexer.l
+++ b/Build/source/texk/web2c/hitexdir/hilexer.l
@@ -1,20 +1,20 @@
- /*509:*/
+ /*511:*/
%{
- #line 10175 "format.w"
+ #line 10258 "format.w"
#include "hibasetypes.h"
#include "hierror.h"
#include "hiformat.h"
#include "hiput.h"
- /*423:*/
+ /*425:*/
#ifdef DEBUG
#define YYDEBUG 1
extern int yydebug;
#else
#define YYDEBUG 0
#endif
- /*:423*/
+ /*:425*/
#include "hiparser.h"
/*22:*/
@@ -136,7 +136,7 @@ float64_t xtof(char*x)
}
/*:61*/
int yywrap(void){
- #line 10186 "format.w"
+ #line 10269 "format.w"
return 1;}
#ifdef _MSC_VER
#pragma warning( disable : 4267)
@@ -335,19 +335,19 @@ range return RANGE;
/*:296*/ /*323:*/
directory return DIRECTORY;
section return SECTION;
- /*:323*/ /*342:*/
+ /*:323*/ /*344:*/
definitions return DEFINITIONS;
- /*:342*/ /*350:*/
+ /*:344*/ /*352:*/
max return MAX;
- /*:350*/ /*365:*/
+ /*:352*/ /*367:*/
param return PARAM;
- /*:365*/ /*374:*/
+ /*:367*/ /*376:*/
font return FONT;
- /*:374*/ /*402:*/
+ /*:376*/ /*404:*/
content return CONTENT;
- /*:402*/
+ /*:404*/
[a-z]+ QUIT("Unexpected keyword '%s' in line %d",yytext,yylineno);
. QUIT("Unexpected character '%c' (0x%02X) in line %d",yytext[0]>' '?yytext[0]:' ',yytext[0],yylineno);
%%
- /*:509*/
+ /*:511*/
diff --git a/Build/source/texk/web2c/hitexdir/hiparser.c b/Build/source/texk/web2c/hitexdir/hiparser.c
index ba32a0db995..06e9a9caae0 100644
--- a/Build/source/texk/web2c/hitexdir/hiparser.c
+++ b/Build/source/texk/web2c/hitexdir/hiparser.c
@@ -69,7 +69,7 @@
/* First part of user prologue. */
#line 2 "parser.y"
- #line 10216 "format.w"
+ #line 10299 "format.w"
#include "hibasetypes.h"
#include <string.h>
@@ -79,9 +79,9 @@
#include "hiput.h"
extern char**hfont_name;
- /*356:*/
+ /*358:*/
uint32_t definition_bits[0x100/32][32]= {
- #line 7578 "format.w"
+ #line 7627 "format.w"
{0}};
#define SET_DBIT(N,K) ((N)>0xFF?1:(definition_bits[N/32][K] |= (1<<((N)&(32-1)))))
@@ -91,52 +91,52 @@ uint32_t definition_bits[0x100/32][32]= {
RNG("Definition",(D).n,max_fixed[(D).k]+1,max_ref[(D).k]);
#define REF(K,N) REF_RNG(K,N);if(!GET_DBIT(N,K)) \
QUIT("Reference %d to %s before definition",(N),definition_name[K])
- /*:356*/ /*360:*/
+ /*:358*/ /*362:*/
#define DEF_REF(D,K,M,N) DEF(D,K,M);\
if ((M)>max_default[K]) QUIT("Defining non default reference %d for %s",M,definition_name[K]); \
if ((N)>max_fixed[K]) QUIT("Defining reference %d for %s by non fixed reference %d",M,definition_name[K],N);
- /*:360*/
+ /*:362*/
extern void hset_entry(entry_t*e,uint16_t i,uint32_t size,
uint32_t xsize,char*file_name);
- /*423:*/
+ /*425:*/
#ifdef DEBUG
#define YYDEBUG 1
extern int yydebug;
#else
#define YYDEBUG 0
#endif
- /*:423*/
+ /*:425*/
extern int yylex(void);
- /*352:*/
+ /*354:*/
void hset_max(kind_t k,int n)
{
- #line 7421 "format.w"
+ #line 7470 "format.w"
DBG(DBGDEF,"Setting max %s to %d\n",definition_name[k],n);
RNG("Maximum",n,max_fixed[k]+1,MAX_REF(k));
if(n>max_ref[k])
max_ref[k]= n;
}
- /*:352*/ /*363:*/
+ /*:354*/ /*365:*/
void check_param_def(ref_t*df)
{
- #line 7727 "format.w"
+ #line 7776 "format.w"
if(df->k!=int_kind&&df->k!=dimen_kind&&df->k!=glue_kind)
QUIT("Kind %s not allowed in parameter list",definition_name[df->k]);
if(df->n<=max_fixed[df->k]||max_default[df->k]<df->n)
QUIT("Parameter %d for %s not allowed in parameter list",df->n,definition_name[df->k]);
}
- /*:363*/ /*422:*/
+ /*:365*/ /*424:*/
extern int yylineno;
int yyerror(const char*msg)
{
- #line 8803 "format.w"
+ #line 8886 "format.w"
QUIT(" in line %d %s",yylineno,msg);
return 0;
}
- /*:422*/
+ /*:424*/
@@ -2428,7 +2428,7 @@ yyreduce:
case 63: /* box_dimen: dimension dimension dimension */
#line 449 "parser.y"
{
- #line 3470 "format.w"
+ #line 3472 "format.w"
(yyval.info)= hput_box_dimen((yyvsp[-2].d),(yyvsp[-1].d),(yyvsp[0].d));}
#line 2434 "parser.c"
break;
@@ -2436,7 +2436,7 @@ yyreduce:
case 64: /* box_shift: %empty */
#line 452 "parser.y"
{
- #line 3471 "format.w"
+ #line 3473 "format.w"
(yyval.info)= b000;}
#line 2442 "parser.c"
break;
@@ -2444,7 +2444,7 @@ yyreduce:
case 65: /* box_shift: "shifted" dimension */
#line 455 "parser.y"
{
- #line 3472 "format.w"
+ #line 3474 "format.w"
(yyval.info)= hput_box_shift((yyvsp[0].d));}
#line 2450 "parser.c"
break;
@@ -2452,7 +2452,7 @@ yyreduce:
case 66: /* box_glue_set: %empty */
#line 459 "parser.y"
{
- #line 3474 "format.w"
+ #line 3476 "format.w"
(yyval.info)= b000;}
#line 2458 "parser.c"
break;
@@ -2460,7 +2460,7 @@ yyreduce:
case 67: /* box_glue_set: "plus" stretch */
#line 462 "parser.y"
{
- #line 3475 "format.w"
+ #line 3477 "format.w"
(yyval.info)= hput_box_glue_set(+1,(yyvsp[0].st).f,(yyvsp[0].st).o);}
#line 2466 "parser.c"
break;
@@ -2468,7 +2468,7 @@ yyreduce:
case 68: /* box_glue_set: "minus" stretch */
#line 465 "parser.y"
{
- #line 3476 "format.w"
+ #line 3478 "format.w"
(yyval.info)= hput_box_glue_set(-1,(yyvsp[0].st).f,(yyvsp[0].st).o);}
#line 2474 "parser.c"
break;
@@ -2476,7 +2476,7 @@ yyreduce:
case 69: /* box: box_dimen box_shift box_glue_set list */
#line 470 "parser.y"
{
- #line 3479 "format.w"
+ #line 3481 "format.w"
(yyval.info)= (yyvsp[-3].info) |(yyvsp[-2].info) |(yyvsp[-1].info);}
#line 2482 "parser.c"
break;
@@ -2484,7 +2484,7 @@ yyreduce:
case 70: /* hbox_node: start "hbox" box ">" */
#line 474 "parser.y"
{
- #line 3481 "format.w"
+ #line 3483 "format.w"
hput_tags((yyvsp[-3].u),TAG(hbox_kind,(yyvsp[-1].info)));}
#line 2490 "parser.c"
break;
@@ -2492,7 +2492,7 @@ yyreduce:
case 71: /* vbox_node: start "vbox" box ">" */
#line 477 "parser.y"
{
- #line 3482 "format.w"
+ #line 3484 "format.w"
hput_tags((yyvsp[-3].u),TAG(vbox_kind,(yyvsp[-1].info)));}
#line 2498 "parser.c"
break;
@@ -2500,7 +2500,7 @@ yyreduce:
case 74: /* box_flex: plus minus */
#line 482 "parser.y"
{
- #line 3663 "format.w"
+ #line 3665 "format.w"
hput_stretch(&((yyvsp[-1].st)));hput_stretch(&((yyvsp[0].st)));}
#line 2506 "parser.c"
break;
@@ -2508,7 +2508,7 @@ yyreduce:
case 75: /* xbox: box_dimen box_shift box_flex xdimen_ref list */
#line 485 "parser.y"
{
- #line 3664 "format.w"
+ #line 3666 "format.w"
(yyval.info)= (yyvsp[-4].info) |(yyvsp[-3].info);}
#line 2514 "parser.c"
break;
@@ -2516,7 +2516,7 @@ yyreduce:
case 76: /* xbox: box_dimen box_shift box_flex xdimen_node list */
#line 488 "parser.y"
{
- #line 3665 "format.w"
+ #line 3667 "format.w"
(yyval.info)= (yyvsp[-4].info) |(yyvsp[-3].info) |b100;}
#line 2522 "parser.c"
break;
@@ -2524,7 +2524,7 @@ yyreduce:
case 77: /* box_goal: "to" xdimen_ref */
#line 492 "parser.y"
{
- #line 3667 "format.w"
+ #line 3669 "format.w"
(yyval.info)= b000;}
#line 2530 "parser.c"
break;
@@ -2532,7 +2532,7 @@ yyreduce:
case 78: /* box_goal: "add" xdimen_ref */
#line 495 "parser.y"
{
- #line 3668 "format.w"
+ #line 3670 "format.w"
(yyval.info)= b001;}
#line 2538 "parser.c"
break;
@@ -2540,7 +2540,7 @@ yyreduce:
case 79: /* box_goal: "to" xdimen_node */
#line 498 "parser.y"
{
- #line 3669 "format.w"
+ #line 3671 "format.w"
(yyval.info)= b100;}
#line 2546 "parser.c"
break;
@@ -2548,7 +2548,7 @@ yyreduce:
case 80: /* box_goal: "add" xdimen_node */
#line 501 "parser.y"
{
- #line 3670 "format.w"
+ #line 3672 "format.w"
(yyval.info)= b101;}
#line 2554 "parser.c"
break;
@@ -2556,7 +2556,7 @@ yyreduce:
case 81: /* hpack: box_shift box_goal list */
#line 505 "parser.y"
{
- #line 3672 "format.w"
+ #line 3674 "format.w"
(yyval.info)= (yyvsp[-1].info);}
#line 2562 "parser.c"
break;
@@ -2564,7 +2564,7 @@ yyreduce:
case 82: /* $@3: %empty */
#line 508 "parser.y"
{
- #line 3673 "format.w"
+ #line 3675 "format.w"
HPUT32((yyvsp[0].d));}
#line 2570 "parser.c"
break;
@@ -2572,7 +2572,7 @@ yyreduce:
case 83: /* vpack: box_shift "max" "depth" dimension $@3 box_goal list */
#line 510 "parser.y"
{
- #line 3673 "format.w"
+ #line 3675 "format.w"
(yyval.info)= (yyvsp[-6].info) |(yyvsp[-1].info);}
#line 2578 "parser.c"
break;
@@ -2580,7 +2580,7 @@ yyreduce:
case 84: /* vxbox_node: start "vset" xbox ">" */
#line 514 "parser.y"
{
- #line 3675 "format.w"
+ #line 3677 "format.w"
hput_tags((yyvsp[-3].u),TAG(vset_kind,(yyvsp[-1].info)));}
#line 2586 "parser.c"
break;
@@ -2588,7 +2588,7 @@ yyreduce:
case 85: /* vxbox_node: start "vpack" vpack ">" */
#line 517 "parser.y"
{
- #line 3676 "format.w"
+ #line 3678 "format.w"
hput_tags((yyvsp[-3].u),TAG(vpack_kind,(yyvsp[-1].info)));}
#line 2594 "parser.c"
break;
@@ -2596,7 +2596,7 @@ yyreduce:
case 86: /* hxbox_node: start "hset" xbox ">" */
#line 522 "parser.y"
{
- #line 3679 "format.w"
+ #line 3681 "format.w"
hput_tags((yyvsp[-3].u),TAG(hset_kind,(yyvsp[-1].info)));}
#line 2602 "parser.c"
break;
@@ -2604,7 +2604,7 @@ yyreduce:
case 87: /* hxbox_node: start "hpack" hpack ">" */
#line 525 "parser.y"
{
- #line 3680 "format.w"
+ #line 3682 "format.w"
hput_tags((yyvsp[-3].u),TAG(hpack_kind,(yyvsp[-1].info)));}
#line 2610 "parser.c"
break;
@@ -2612,7 +2612,7 @@ yyreduce:
case 90: /* ltype: %empty */
#line 531 "parser.y"
{
- #line 3790 "format.w"
+ #line 3792 "format.w"
(yyval.info)= 1;}
#line 2618 "parser.c"
break;
@@ -2620,7 +2620,7 @@ yyreduce:
case 91: /* ltype: "align" */
#line 533 "parser.y"
{
- #line 3790 "format.w"
+ #line 3792 "format.w"
(yyval.info)= 1;}
#line 2626 "parser.c"
break;
@@ -2628,7 +2628,7 @@ yyreduce:
case 92: /* ltype: "center" */
#line 535 "parser.y"
{
- #line 3790 "format.w"
+ #line 3792 "format.w"
(yyval.info)= 2;}
#line 2634 "parser.c"
break;
@@ -2636,7 +2636,7 @@ yyreduce:
case 93: /* ltype: "expand" */
#line 537 "parser.y"
{
- #line 3790 "format.w"
+ #line 3792 "format.w"
(yyval.info)= 3;}
#line 2642 "parser.c"
break;
@@ -2644,7 +2644,7 @@ yyreduce:
case 94: /* leaders: glue_node ltype rule_node */
#line 540 "parser.y"
{
- #line 3791 "format.w"
+ #line 3793 "format.w"
if((yyvsp[-2].b))(yyval.info)= (yyvsp[-1].info) |b100;else (yyval.info)= (yyvsp[-1].info);}
#line 2650 "parser.c"
break;
@@ -2652,7 +2652,7 @@ yyreduce:
case 95: /* leaders: glue_node ltype hbox_node */
#line 543 "parser.y"
{
- #line 3792 "format.w"
+ #line 3794 "format.w"
if((yyvsp[-2].b))(yyval.info)= (yyvsp[-1].info) |b100;else (yyval.info)= (yyvsp[-1].info);}
#line 2658 "parser.c"
break;
@@ -2660,7 +2660,7 @@ yyreduce:
case 96: /* leaders: glue_node ltype vbox_node */
#line 546 "parser.y"
{
- #line 3793 "format.w"
+ #line 3795 "format.w"
if((yyvsp[-2].b))(yyval.info)= (yyvsp[-1].info) |b100;else (yyval.info)= (yyvsp[-1].info);}
#line 2666 "parser.c"
break;
@@ -2668,7 +2668,7 @@ yyreduce:
case 97: /* content_node: start "leaders" leaders ">" */
#line 549 "parser.y"
{
- #line 3794 "format.w"
+ #line 3796 "format.w"
hput_tags((yyvsp[-3].u),TAG(leaders_kind,(yyvsp[-1].info)));}
#line 2674 "parser.c"
break;
@@ -2676,7 +2676,7 @@ yyreduce:
case 98: /* $@4: %empty */
#line 553 "parser.y"
{
- #line 3900 "format.w"
+ #line 3902 "format.w"
if((yyvsp[0].d)!=0)HPUT32((yyvsp[0].d));}
#line 2682 "parser.c"
break;
@@ -2684,7 +2684,7 @@ yyreduce:
case 99: /* baseline: dimension $@4 glue_node glue_node */
#line 556 "parser.y"
{
- #line 3901 "format.w"
+ #line 3903 "format.w"
(yyval.info)= b000;if((yyvsp[-3].d)!=0)(yyval.info) |= b001;
if((yyvsp[-1].b))(yyval.info) |= b100;
if((yyvsp[0].b))(yyval.info) |= b010;
@@ -2695,7 +2695,7 @@ yyreduce:
case 100: /* content_node: start "baseline" baseline ">" */
#line 563 "parser.y"
{
- #line 3906 "format.w"
+ #line 3908 "format.w"
if((yyvsp[-1].info)==b000)HPUT8(0);hput_tags((yyvsp[-3].u),TAG(baseline_kind,(yyvsp[-1].info)));}
#line 2701 "parser.c"
break;
@@ -2703,7 +2703,7 @@ yyreduce:
case 102: /* cc_list: cc_list TXT_CC */
#line 567 "parser.y"
{
- #line 3989 "format.w"
+ #line 3991 "format.w"
hput_utf8((yyvsp[0].u));}
#line 2709 "parser.c"
break;
@@ -2711,7 +2711,7 @@ yyreduce:
case 103: /* lig_cc: UNSIGNED */
#line 570 "parser.y"
{
- #line 3990 "format.w"
+ #line 3992 "format.w"
RNG("UTF-8 code",(yyvsp[0].u),0,0x1FFFFF);(yyval.u)= hpos-hstart;hput_utf8((yyvsp[0].u));}
#line 2717 "parser.c"
break;
@@ -2719,7 +2719,7 @@ yyreduce:
case 104: /* lig_cc: CHARCODE */
#line 573 "parser.y"
{
- #line 3991 "format.w"
+ #line 3993 "format.w"
(yyval.u)= hpos-hstart;hput_utf8((yyvsp[0].u));}
#line 2725 "parser.c"
break;
@@ -2727,7 +2727,7 @@ yyreduce:
case 105: /* ref: REFERENCE */
#line 576 "parser.y"
{
- #line 3992 "format.w"
+ #line 3994 "format.w"
HPUT8((yyvsp[0].u));(yyval.u)= (yyvsp[0].u);}
#line 2733 "parser.c"
break;
@@ -2735,7 +2735,7 @@ yyreduce:
case 106: /* $@5: %empty */
#line 579 "parser.y"
{
- #line 3993 "format.w"
+ #line 3995 "format.w"
REF(font_kind,(yyvsp[0].u));}
#line 2741 "parser.c"
break;
@@ -2743,7 +2743,7 @@ yyreduce:
case 107: /* ligature: ref $@5 lig_cc TXT_START cc_list TXT_END */
#line 582 "parser.y"
{
- #line 3994 "format.w"
+ #line 3996 "format.w"
(yyval.lg).f= (yyvsp[-5].u);(yyval.lg).l.p= (yyvsp[-3].u);(yyval.lg).l.s= (hpos-hstart)-(yyvsp[-3].u);
RNG("Ligature size",(yyval.lg).l.s,0,255);}
#line 2750 "parser.c"
@@ -2752,7 +2752,7 @@ yyreduce:
case 108: /* content_node: start "ligature" ligature ">" */
#line 586 "parser.y"
{
- #line 3996 "format.w"
+ #line 3998 "format.w"
hput_tags((yyvsp[-3].u),hput_ligature(&((yyvsp[-1].lg))));}
#line 2758 "parser.c"
break;
@@ -2760,7 +2760,7 @@ yyreduce:
case 109: /* replace_count: explicit */
#line 590 "parser.y"
{
- #line 4106 "format.w"
+ #line 4108 "format.w"
if((yyvsp[0].b)){(yyval.u)= 0x80;HPUT8(0x80);}else (yyval.u)= 0x00;}
#line 2766 "parser.c"
break;
@@ -2768,7 +2768,7 @@ yyreduce:
case 110: /* replace_count: explicit UNSIGNED */
#line 593 "parser.y"
{
- #line 4107 "format.w"
+ #line 4109 "format.w"
RNG("Replace count",(yyvsp[0].u),0,31);
(yyval.u)= ((yyvsp[0].u)) |(((yyvsp[-1].b))?0x80:0x00);if((yyval.u)!=0)HPUT8((yyval.u));}
#line 2775 "parser.c"
@@ -2777,7 +2777,7 @@ yyreduce:
case 111: /* disc: replace_count list list */
#line 597 "parser.y"
{
- #line 4109 "format.w"
+ #line 4111 "format.w"
(yyval.dc).r= (yyvsp[-2].u);(yyval.dc).p= (yyvsp[-1].l);(yyval.dc).q= (yyvsp[0].l);
if((yyvsp[0].l).s==0){hpos= hpos-2;if((yyvsp[-1].l).s==0)hpos= hpos-2;}}
#line 2784 "parser.c"
@@ -2786,7 +2786,7 @@ yyreduce:
case 112: /* disc: replace_count list */
#line 601 "parser.y"
{
- #line 4111 "format.w"
+ #line 4113 "format.w"
(yyval.dc).r= (yyvsp[-1].u);(yyval.dc).p= (yyvsp[0].l);if((yyvsp[0].l).s==0)hpos= hpos-2;(yyval.dc).q.s= 0;}
#line 2792 "parser.c"
break;
@@ -2794,7 +2794,7 @@ yyreduce:
case 113: /* disc: replace_count */
#line 604 "parser.y"
{
- #line 4112 "format.w"
+ #line 4114 "format.w"
(yyval.dc).r= (yyvsp[0].u);(yyval.dc).p.s= 0;(yyval.dc).q.s= 0;}
#line 2800 "parser.c"
break;
@@ -2802,7 +2802,7 @@ yyreduce:
case 114: /* disc_node: start "disc" disc ">" */
#line 610 "parser.y"
{
- #line 4116 "format.w"
+ #line 4118 "format.w"
hput_tags((yyvsp[-3].u),hput_disc(&((yyvsp[-1].dc))));}
#line 2808 "parser.c"
break;
@@ -2810,7 +2810,7 @@ yyreduce:
case 116: /* par_dimen: xdimen */
#line 616 "parser.y"
{
- #line 4268 "format.w"
+ #line 4270 "format.w"
hput_xdimen_node(&((yyvsp[0].xd)));}
#line 2816 "parser.c"
break;
@@ -2818,7 +2818,7 @@ yyreduce:
case 117: /* par: xdimen_ref param_ref list */
#line 619 "parser.y"
{
- #line 4269 "format.w"
+ #line 4271 "format.w"
(yyval.info)= b000;}
#line 2824 "parser.c"
break;
@@ -2826,7 +2826,7 @@ yyreduce:
case 118: /* par: xdimen_ref empty_param_list non_empty_param_list list */
#line 622 "parser.y"
{
- #line 4270 "format.w"
+ #line 4272 "format.w"
(yyval.info)= b010;}
#line 2832 "parser.c"
break;
@@ -2834,7 +2834,7 @@ yyreduce:
case 119: /* par: xdimen_ref empty_param_list list */
#line 625 "parser.y"
{
- #line 4271 "format.w"
+ #line 4273 "format.w"
(yyval.info)= b010;}
#line 2840 "parser.c"
break;
@@ -2842,7 +2842,7 @@ yyreduce:
case 120: /* $@6: %empty */
#line 628 "parser.y"
{
- #line 4272 "format.w"
+ #line 4274 "format.w"
hput_xdimen_node(&((yyvsp[-1].xd)));}
#line 2848 "parser.c"
break;
@@ -2850,7 +2850,7 @@ yyreduce:
case 121: /* par: xdimen param_ref $@6 list */
#line 630 "parser.y"
{
- #line 4272 "format.w"
+ #line 4274 "format.w"
(yyval.info)= b100;}
#line 2856 "parser.c"
break;
@@ -2858,7 +2858,7 @@ yyreduce:
case 122: /* par: par_dimen empty_param_list non_empty_param_list list */
#line 633 "parser.y"
{
- #line 4273 "format.w"
+ #line 4275 "format.w"
(yyval.info)= b110;}
#line 2864 "parser.c"
break;
@@ -2866,7 +2866,7 @@ yyreduce:
case 123: /* par: par_dimen empty_param_list list */
#line 636 "parser.y"
{
- #line 4274 "format.w"
+ #line 4276 "format.w"
(yyval.info)= b110;}
#line 2872 "parser.c"
break;
@@ -2874,7 +2874,7 @@ yyreduce:
case 124: /* content_node: start "par" par ">" */
#line 640 "parser.y"
{
- #line 4276 "format.w"
+ #line 4278 "format.w"
hput_tags((yyvsp[-3].u),TAG(par_kind,(yyvsp[-1].info)));}
#line 2880 "parser.c"
break;
@@ -2882,7 +2882,7 @@ yyreduce:
case 125: /* math: param_ref list */
#line 644 "parser.y"
{
- #line 4342 "format.w"
+ #line 4344 "format.w"
(yyval.info)= b000;}
#line 2888 "parser.c"
break;
@@ -2890,7 +2890,7 @@ yyreduce:
case 126: /* math: param_ref list hbox_node */
#line 647 "parser.y"
{
- #line 4343 "format.w"
+ #line 4345 "format.w"
(yyval.info)= b001;}
#line 2896 "parser.c"
break;
@@ -2898,7 +2898,7 @@ yyreduce:
case 127: /* math: param_ref hbox_node list */
#line 650 "parser.y"
{
- #line 4344 "format.w"
+ #line 4346 "format.w"
(yyval.info)= b010;}
#line 2904 "parser.c"
break;
@@ -2906,7 +2906,7 @@ yyreduce:
case 128: /* math: empty_param_list list */
#line 653 "parser.y"
{
- #line 4345 "format.w"
+ #line 4347 "format.w"
(yyval.info)= b100;}
#line 2912 "parser.c"
break;
@@ -2914,7 +2914,7 @@ yyreduce:
case 129: /* math: empty_param_list list hbox_node */
#line 656 "parser.y"
{
- #line 4346 "format.w"
+ #line 4348 "format.w"
(yyval.info)= b101;}
#line 2920 "parser.c"
break;
@@ -2922,7 +2922,7 @@ yyreduce:
case 130: /* math: empty_param_list hbox_node list */
#line 659 "parser.y"
{
- #line 4347 "format.w"
+ #line 4349 "format.w"
(yyval.info)= b110;}
#line 2928 "parser.c"
break;
@@ -2930,7 +2930,7 @@ yyreduce:
case 131: /* math: empty_param_list non_empty_param_list list */
#line 662 "parser.y"
{
- #line 4348 "format.w"
+ #line 4350 "format.w"
(yyval.info)= b100;}
#line 2936 "parser.c"
break;
@@ -2938,7 +2938,7 @@ yyreduce:
case 132: /* math: empty_param_list non_empty_param_list list hbox_node */
#line 665 "parser.y"
{
- #line 4349 "format.w"
+ #line 4351 "format.w"
(yyval.info)= b101;}
#line 2944 "parser.c"
break;
@@ -2946,7 +2946,7 @@ yyreduce:
case 133: /* math: empty_param_list non_empty_param_list hbox_node list */
#line 668 "parser.y"
{
- #line 4350 "format.w"
+ #line 4352 "format.w"
(yyval.info)= b110;}
#line 2952 "parser.c"
break;
@@ -2954,7 +2954,7 @@ yyreduce:
case 134: /* content_node: start "math" math ">" */
#line 672 "parser.y"
{
- #line 4352 "format.w"
+ #line 4354 "format.w"
hput_tags((yyvsp[-3].u),TAG(math_kind,(yyvsp[-1].info)));}
#line 2960 "parser.c"
break;
@@ -2962,7 +2962,7 @@ yyreduce:
case 135: /* on_off: "on" */
#line 676 "parser.y"
{
- #line 4402 "format.w"
+ #line 4404 "format.w"
(yyval.i)= 1;}
#line 2968 "parser.c"
break;
@@ -2970,7 +2970,7 @@ yyreduce:
case 136: /* on_off: "off" */
#line 678 "parser.y"
{
- #line 4402 "format.w"
+ #line 4404 "format.w"
(yyval.i)= 0;}
#line 2976 "parser.c"
break;
@@ -2978,7 +2978,7 @@ yyreduce:
case 137: /* math: on_off */
#line 681 "parser.y"
{
- #line 4403 "format.w"
+ #line 4405 "format.w"
(yyval.info)= b011 |((yyvsp[0].i)<<2);}
#line 2984 "parser.c"
break;
@@ -2986,7 +2986,7 @@ yyreduce:
case 138: /* content_node: start "adjust" list ">" */
#line 685 "parser.y"
{
- #line 4434 "format.w"
+ #line 4436 "format.w"
hput_tags((yyvsp[-3].u),TAG(adjust_kind,1));}
#line 2992 "parser.c"
break;
@@ -2994,7 +2994,7 @@ yyreduce:
case 139: /* span_count: UNSIGNED */
#line 689 "parser.y"
{
- #line 4533 "format.w"
+ #line 4535 "format.w"
(yyval.info)= hput_span_count((yyvsp[0].u));}
#line 3000 "parser.c"
break;
@@ -3002,7 +3002,7 @@ yyreduce:
case 140: /* content_node: start "item" content_node ">" */
#line 692 "parser.y"
{
- #line 4534 "format.w"
+ #line 4536 "format.w"
hput_tags((yyvsp[-3].u),TAG(item_kind,1));}
#line 3008 "parser.c"
break;
@@ -3010,7 +3010,7 @@ yyreduce:
case 141: /* content_node: start "item" span_count content_node ">" */
#line 695 "parser.y"
{
- #line 4535 "format.w"
+ #line 4537 "format.w"
hput_tags((yyvsp[-4].u),TAG(item_kind,(yyvsp[-2].info)));}
#line 3016 "parser.c"
break;
@@ -3018,7 +3018,7 @@ yyreduce:
case 142: /* content_node: start "item" list ">" */
#line 698 "parser.y"
{
- #line 4536 "format.w"
+ #line 4538 "format.w"
hput_tags((yyvsp[-3].u),TAG(item_kind,b000));}
#line 3024 "parser.c"
break;
@@ -3026,7 +3026,7 @@ yyreduce:
case 143: /* table: "h" box_goal list list */
#line 702 "parser.y"
{
- #line 4538 "format.w"
+ #line 4540 "format.w"
(yyval.info)= (yyvsp[-2].info);}
#line 3032 "parser.c"
break;
@@ -3034,7 +3034,7 @@ yyreduce:
case 144: /* table: "v" box_goal list list */
#line 705 "parser.y"
{
- #line 4539 "format.w"
+ #line 4541 "format.w"
(yyval.info)= (yyvsp[-2].info) |b010;}
#line 3040 "parser.c"
break;
@@ -3042,7 +3042,7 @@ yyreduce:
case 145: /* content_node: start "table" table ">" */
#line 709 "parser.y"
{
- #line 4541 "format.w"
+ #line 4543 "format.w"
hput_tags((yyvsp[-3].u),TAG(table_kind,(yyvsp[-1].info)));}
#line 3048 "parser.c"
break;
@@ -3050,7 +3050,7 @@ yyreduce:
case 146: /* image_dimen: dimension dimension */
#line 713 "parser.y"
{
- #line 4629 "format.w"
+ #line 4631 "format.w"
(yyval.x).w= (yyvsp[-1].d);(yyval.x).h= (yyvsp[0].d);}
#line 3056 "parser.c"
break;
@@ -3058,7 +3058,7 @@ yyreduce:
case 147: /* image_dimen: %empty */
#line 715 "parser.y"
{
- #line 4629 "format.w"
+ #line 4631 "format.w"
(yyval.x).w= (yyval.x).h= 0;}
#line 3064 "parser.c"
break;
@@ -3066,7 +3066,7 @@ yyreduce:
case 148: /* image: UNSIGNED image_dimen plus minus */
#line 718 "parser.y"
{
- #line 4630 "format.w"
+ #line 4632 "format.w"
(yyval.x).w= (yyvsp[-2].x).w;(yyval.x).h= (yyvsp[-2].x).h;(yyval.x).p= (yyvsp[-1].st);(yyval.x).m= (yyvsp[0].st);RNG("Section number",(yyvsp[-3].u),3,max_section_no);(yyval.x).n= (yyvsp[-3].u);}
#line 3072 "parser.c"
break;
@@ -3074,7 +3074,7 @@ yyreduce:
case 149: /* content_node: start "image" image ">" */
#line 721 "parser.y"
{
- #line 4631 "format.w"
+ #line 4633 "format.w"
hput_tags((yyvsp[-3].u),hput_image(&((yyvsp[-1].x))));}
#line 3080 "parser.c"
break;
@@ -3082,7 +3082,7 @@ yyreduce:
case 150: /* max_value: "outline" UNSIGNED */
#line 725 "parser.y"
{
- #line 4868 "format.w"
+ #line 4870 "format.w"
max_outline= (yyvsp[0].u);
RNG("max outline",max_outline,0,0xFFFF);
DBG(DBGDEF |DBGLABEL,"Setting max outline to %d\n",max_outline);
@@ -3093,7 +3093,7 @@ yyreduce:
case 151: /* placement: "top" */
#line 732 "parser.y"
{
- #line 4960 "format.w"
+ #line 4962 "format.w"
(yyval.i)= LABEL_TOP;}
#line 3099 "parser.c"
break;
@@ -3101,7 +3101,7 @@ yyreduce:
case 152: /* placement: "bot" */
#line 734 "parser.y"
{
- #line 4960 "format.w"
+ #line 4962 "format.w"
(yyval.i)= LABEL_BOT;}
#line 3107 "parser.c"
break;
@@ -3109,7 +3109,7 @@ yyreduce:
case 153: /* placement: "mid" */
#line 736 "parser.y"
{
- #line 4960 "format.w"
+ #line 4962 "format.w"
(yyval.i)= LABEL_MID;}
#line 3115 "parser.c"
break;
@@ -3117,7 +3117,7 @@ yyreduce:
case 154: /* placement: %empty */
#line 738 "parser.y"
{
- #line 4960 "format.w"
+ #line 4962 "format.w"
(yyval.i)= LABEL_MID;}
#line 3123 "parser.c"
break;
@@ -3125,7 +3125,7 @@ yyreduce:
case 155: /* content_node: "<" "label" REFERENCE placement ">" */
#line 742 "parser.y"
{
- #line 4962 "format.w"
+ #line 4964 "format.w"
hset_label((yyvsp[-2].u),(yyvsp[-1].i));}
#line 3131 "parser.c"
break;
@@ -3133,7 +3133,7 @@ yyreduce:
case 156: /* content_node: start "link" REFERENCE on_off ">" */
#line 747 "parser.y"
{
- #line 5220 "format.w"
+ #line 5222 "format.w"
hput_tags((yyvsp[-4].u),hput_link((yyvsp[-2].u),(yyvsp[-1].i)));}
#line 3139 "parser.c"
break;
@@ -3141,7 +3141,7 @@ yyreduce:
case 157: /* def_node: "<" "outline" REFERENCE integer position list ">" */
#line 751 "parser.y"
{
- #line 5350 "format.w"
+ #line 5352 "format.w"
static int outline_no= -1;
(yyval.rf).k= outline_kind;(yyval.rf).n= (yyvsp[-4].u);
@@ -3155,7 +3155,7 @@ yyreduce:
case 158: /* stream_link: ref */
#line 761 "parser.y"
{
- #line 5765 "format.w"
+ #line 5767 "format.w"
REF_RNG(stream_kind,(yyvsp[0].u));}
#line 3161 "parser.c"
break;
@@ -3163,7 +3163,7 @@ yyreduce:
case 159: /* stream_link: "*" */
#line 763 "parser.y"
{
- #line 5765 "format.w"
+ #line 5767 "format.w"
HPUT8(255);}
#line 3169 "parser.c"
break;
@@ -3171,7 +3171,7 @@ yyreduce:
case 160: /* stream_split: stream_link stream_link UNSIGNED */
#line 766 "parser.y"
{
- #line 5766 "format.w"
+ #line 5768 "format.w"
RNG("split ratio",(yyvsp[0].u),0,1000);HPUT16((yyvsp[0].u));}
#line 3177 "parser.c"
break;
@@ -3179,7 +3179,7 @@ yyreduce:
case 161: /* $@7: %empty */
#line 769 "parser.y"
{
- #line 5767 "format.w"
+ #line 5769 "format.w"
RNG("magnification factor",(yyvsp[0].u),0,1000);HPUT16((yyvsp[0].u));}
#line 3185 "parser.c"
break;
@@ -3187,7 +3187,7 @@ yyreduce:
case 163: /* stream_type: stream_info */
#line 773 "parser.y"
{
- #line 5769 "format.w"
+ #line 5771 "format.w"
(yyval.info)= 0;}
#line 3193 "parser.c"
break;
@@ -3195,7 +3195,7 @@ yyreduce:
case 164: /* stream_type: "first" */
#line 775 "parser.y"
{
- #line 5769 "format.w"
+ #line 5771 "format.w"
(yyval.info)= 1;}
#line 3201 "parser.c"
break;
@@ -3203,7 +3203,7 @@ yyreduce:
case 165: /* stream_type: "last" */
#line 777 "parser.y"
{
- #line 5769 "format.w"
+ #line 5771 "format.w"
(yyval.info)= 2;}
#line 3209 "parser.c"
break;
@@ -3211,7 +3211,7 @@ yyreduce:
case 166: /* stream_type: "top" */
#line 779 "parser.y"
{
- #line 5769 "format.w"
+ #line 5771 "format.w"
(yyval.info)= 3;}
#line 3217 "parser.c"
break;
@@ -3219,7 +3219,7 @@ yyreduce:
case 167: /* stream_def_node: start "stream (definition)" ref stream_type list xdimen_node glue_node list glue_node ">" */
#line 785 "parser.y"
{
- #line 5773 "format.w"
+ #line 5775 "format.w"
DEF((yyval.rf),stream_kind,(yyvsp[-7].u));hput_tags((yyvsp[-9].u),TAG(stream_kind,(yyvsp[-6].info) |b100));}
#line 3225 "parser.c"
break;
@@ -3227,7 +3227,7 @@ yyreduce:
case 168: /* stream_ins_node: start "stream (definition)" ref ">" */
#line 790 "parser.y"
{
- #line 5776 "format.w"
+ #line 5778 "format.w"
RNG("Stream insertion",(yyvsp[-1].u),0,max_ref[stream_kind]);hput_tags((yyvsp[-3].u),TAG(stream_kind,b100));}
#line 3233 "parser.c"
break;
@@ -3235,7 +3235,7 @@ yyreduce:
case 171: /* stream: empty_param_list list */
#line 796 "parser.y"
{
- #line 5871 "format.w"
+ #line 5873 "format.w"
(yyval.info)= b010;}
#line 3241 "parser.c"
break;
@@ -3243,7 +3243,7 @@ yyreduce:
case 172: /* stream: empty_param_list non_empty_param_list list */
#line 799 "parser.y"
{
- #line 5872 "format.w"
+ #line 5874 "format.w"
(yyval.info)= b010;}
#line 3249 "parser.c"
break;
@@ -3251,7 +3251,7 @@ yyreduce:
case 173: /* stream: param_ref list */
#line 802 "parser.y"
{
- #line 5873 "format.w"
+ #line 5875 "format.w"
(yyval.info)= b000;}
#line 3257 "parser.c"
break;
@@ -3259,7 +3259,7 @@ yyreduce:
case 174: /* content_node: start "stream" stream_ref stream ">" */
#line 806 "parser.y"
{
- #line 5875 "format.w"
+ #line 5877 "format.w"
hput_tags((yyvsp[-4].u),TAG(stream_kind,(yyvsp[-1].info)));}
#line 3265 "parser.c"
break;
@@ -3267,7 +3267,7 @@ yyreduce:
case 175: /* page_priority: %empty */
#line 810 "parser.y"
{
- #line 5978 "format.w"
+ #line 5980 "format.w"
HPUT8(1);}
#line 3273 "parser.c"
break;
@@ -3275,7 +3275,7 @@ yyreduce:
case 176: /* page_priority: UNSIGNED */
#line 813 "parser.y"
{
- #line 5979 "format.w"
+ #line 5981 "format.w"
RNG("page priority",(yyvsp[0].u),0,255);HPUT8((yyvsp[0].u));}
#line 3281 "parser.c"
break;
@@ -3283,7 +3283,7 @@ yyreduce:
case 179: /* $@8: %empty */
#line 819 "parser.y"
{
- #line 5983 "format.w"
+ #line 5985 "format.w"
hput_string((yyvsp[0].s));}
#line 3289 "parser.c"
break;
@@ -3291,7 +3291,7 @@ yyreduce:
case 180: /* $@9: %empty */
#line 821 "parser.y"
{
- #line 5983 "format.w"
+ #line 5985 "format.w"
HPUT32((yyvsp[0].d));}
#line 3297 "parser.c"
break;
@@ -3299,7 +3299,7 @@ yyreduce:
case 182: /* content_node: "<" "range" REFERENCE "on" ">" */
#line 828 "parser.y"
{
- #line 6095 "format.w"
+ #line 6097 "format.w"
REF(page_kind,(yyvsp[-2].u));hput_range((yyvsp[-2].u),true);}
#line 3305 "parser.c"
break;
@@ -3307,7 +3307,7 @@ yyreduce:
case 183: /* content_node: "<" "range" REFERENCE "off" ">" */
#line 831 "parser.y"
{
- #line 6096 "format.w"
+ #line 6098 "format.w"
REF(page_kind,(yyvsp[-2].u));hput_range((yyvsp[-2].u),false);}
#line 3313 "parser.c"
break;
@@ -3315,7 +3315,7 @@ yyreduce:
case 185: /* $@10: %empty */
#line 837 "parser.y"
{
- #line 6786 "format.w"
+ #line 6788 "format.w"
new_directory((yyvsp[0].u)+1);new_output_buffers();}
#line 3321 "parser.c"
break;
@@ -3323,7 +3323,7 @@ yyreduce:
case 189: /* entry: "<" "entry" UNSIGNED string ">" */
#line 842 "parser.y"
{
- #line 6789 "format.w"
+ #line 6791 "format.w"
RNG("Section number",(yyvsp[-2].u),3,max_section_no);hset_entry(&(dir[(yyvsp[-2].u)]),(yyvsp[-2].u),0,0,(yyvsp[-1].s));}
#line 3329 "parser.c"
break;
@@ -3331,7 +3331,7 @@ yyreduce:
case 190: /* $@11: %empty */
#line 846 "parser.y"
{
- #line 7277 "format.w"
+ #line 7326 "format.w"
hput_definitions_start();}
#line 3337 "parser.c"
break;
@@ -3339,7 +3339,7 @@ yyreduce:
case 191: /* definition_section: "<" "definitions" $@11 max_definitions definition_list ">" */
#line 850 "parser.y"
{
- #line 7279 "format.w"
+ #line 7328 "format.w"
hput_definitions_end();}
#line 3345 "parser.c"
break;
@@ -3347,7 +3347,7 @@ yyreduce:
case 194: /* max_definitions: "<" "max" max_list ">" */
#line 856 "parser.y"
{
- #line 7395 "format.w"
+ #line 7444 "format.w"
/*245:*/
if(max_ref[label_kind]>=0)
ALLOCATE(labels,max_ref[label_kind]+1,label_t);
@@ -3357,7 +3357,7 @@ yyreduce:
/*:266*/ /*293:*/
ALLOCATE(page_on,max_ref[page_kind]+1,int);
ALLOCATE(range_pos,2*(max_ref[range_kind]+1),range_pos_t);
- /*:293*/ /*357:*/
+ /*:293*/ /*359:*/
definition_bits[0][int_kind]= (1<<(MAX_INT_DEFAULT+1))-1;
definition_bits[0][dimen_kind]= (1<<(MAX_DIMEN_DEFAULT+1))-1;
definition_bits[0][xdimen_kind]= (1<<(MAX_XDIMEN_DEFAULT+1))-1;
@@ -3366,16 +3366,16 @@ yyreduce:
definition_bits[0][page_kind]= (1<<(MAX_PAGE_DEFAULT+1))-1;
definition_bits[0][stream_kind]= (1<<(MAX_STREAM_DEFAULT+1))-1;
definition_bits[0][range_kind]= (1<<(MAX_RANGE_DEFAULT+1))-1;
- /*:357*/ /*372:*/
+ /*:359*/ /*374:*/
ALLOCATE(hfont_name,max_ref[font_kind]+1,char*);
- /*:372*/hput_max_definitions();}
+ /*:374*/hput_max_definitions();}
#line 3373 "parser.c"
break;
case 197: /* max_value: "font" UNSIGNED */
#line 882 "parser.y"
{
- #line 7399 "format.w"
+ #line 7448 "format.w"
hset_max(font_kind,(yyvsp[0].u));}
#line 3381 "parser.c"
break;
@@ -3383,7 +3383,7 @@ yyreduce:
case 198: /* max_value: "int" UNSIGNED */
#line 885 "parser.y"
{
- #line 7400 "format.w"
+ #line 7449 "format.w"
hset_max(int_kind,(yyvsp[0].u));}
#line 3389 "parser.c"
break;
@@ -3391,7 +3391,7 @@ yyreduce:
case 199: /* max_value: "dimen" UNSIGNED */
#line 888 "parser.y"
{
- #line 7401 "format.w"
+ #line 7450 "format.w"
hset_max(dimen_kind,(yyvsp[0].u));}
#line 3397 "parser.c"
break;
@@ -3399,7 +3399,7 @@ yyreduce:
case 200: /* max_value: "ligature" UNSIGNED */
#line 891 "parser.y"
{
- #line 7402 "format.w"
+ #line 7451 "format.w"
hset_max(ligature_kind,(yyvsp[0].u));}
#line 3405 "parser.c"
break;
@@ -3407,7 +3407,7 @@ yyreduce:
case 201: /* max_value: "disc" UNSIGNED */
#line 894 "parser.y"
{
- #line 7403 "format.w"
+ #line 7452 "format.w"
hset_max(disc_kind,(yyvsp[0].u));}
#line 3413 "parser.c"
break;
@@ -3415,7 +3415,7 @@ yyreduce:
case 202: /* max_value: "glue" UNSIGNED */
#line 897 "parser.y"
{
- #line 7404 "format.w"
+ #line 7453 "format.w"
hset_max(glue_kind,(yyvsp[0].u));}
#line 3421 "parser.c"
break;
@@ -3423,7 +3423,7 @@ yyreduce:
case 203: /* max_value: "language" UNSIGNED */
#line 900 "parser.y"
{
- #line 7405 "format.w"
+ #line 7454 "format.w"
hset_max(language_kind,(yyvsp[0].u));}
#line 3429 "parser.c"
break;
@@ -3431,7 +3431,7 @@ yyreduce:
case 204: /* max_value: "rule" UNSIGNED */
#line 903 "parser.y"
{
- #line 7406 "format.w"
+ #line 7455 "format.w"
hset_max(rule_kind,(yyvsp[0].u));}
#line 3437 "parser.c"
break;
@@ -3439,7 +3439,7 @@ yyreduce:
case 205: /* max_value: "image" UNSIGNED */
#line 906 "parser.y"
{
- #line 7407 "format.w"
+ #line 7456 "format.w"
hset_max(image_kind,(yyvsp[0].u));}
#line 3445 "parser.c"
break;
@@ -3447,7 +3447,7 @@ yyreduce:
case 206: /* max_value: "leaders" UNSIGNED */
#line 909 "parser.y"
{
- #line 7408 "format.w"
+ #line 7457 "format.w"
hset_max(leaders_kind,(yyvsp[0].u));}
#line 3453 "parser.c"
break;
@@ -3455,7 +3455,7 @@ yyreduce:
case 207: /* max_value: "baseline" UNSIGNED */
#line 912 "parser.y"
{
- #line 7409 "format.w"
+ #line 7458 "format.w"
hset_max(baseline_kind,(yyvsp[0].u));}
#line 3461 "parser.c"
break;
@@ -3463,7 +3463,7 @@ yyreduce:
case 208: /* max_value: "xdimen" UNSIGNED */
#line 915 "parser.y"
{
- #line 7410 "format.w"
+ #line 7459 "format.w"
hset_max(xdimen_kind,(yyvsp[0].u));}
#line 3469 "parser.c"
break;
@@ -3471,7 +3471,7 @@ yyreduce:
case 209: /* max_value: "param" UNSIGNED */
#line 918 "parser.y"
{
- #line 7411 "format.w"
+ #line 7460 "format.w"
hset_max(param_kind,(yyvsp[0].u));}
#line 3477 "parser.c"
break;
@@ -3479,7 +3479,7 @@ yyreduce:
case 210: /* max_value: "stream (definition)" UNSIGNED */
#line 921 "parser.y"
{
- #line 7412 "format.w"
+ #line 7461 "format.w"
hset_max(stream_kind,(yyvsp[0].u));}
#line 3485 "parser.c"
break;
@@ -3487,7 +3487,7 @@ yyreduce:
case 211: /* max_value: "page" UNSIGNED */
#line 924 "parser.y"
{
- #line 7413 "format.w"
+ #line 7462 "format.w"
hset_max(page_kind,(yyvsp[0].u));}
#line 3493 "parser.c"
break;
@@ -3495,7 +3495,7 @@ yyreduce:
case 212: /* max_value: "range" UNSIGNED */
#line 927 "parser.y"
{
- #line 7414 "format.w"
+ #line 7463 "format.w"
hset_max(range_kind,(yyvsp[0].u));}
#line 3501 "parser.c"
break;
@@ -3503,7 +3503,7 @@ yyreduce:
case 213: /* max_value: "label" UNSIGNED */
#line 930 "parser.y"
{
- #line 7415 "format.w"
+ #line 7464 "format.w"
hset_max(label_kind,(yyvsp[0].u));}
#line 3509 "parser.c"
break;
@@ -3511,7 +3511,7 @@ yyreduce:
case 214: /* def_node: start "font" ref font ">" */
#line 936 "parser.y"
{
- #line 7612 "format.w"
+ #line 7661 "format.w"
DEF((yyval.rf),font_kind,(yyvsp[-2].u));hput_tags((yyvsp[-4].u),(yyvsp[-1].info));}
#line 3517 "parser.c"
break;
@@ -3519,7 +3519,7 @@ yyreduce:
case 215: /* def_node: start "int" ref integer ">" */
#line 939 "parser.y"
{
- #line 7613 "format.w"
+ #line 7662 "format.w"
DEF((yyval.rf),int_kind,(yyvsp[-2].u));hput_tags((yyvsp[-4].u),hput_int((yyvsp[-1].i)));}
#line 3525 "parser.c"
break;
@@ -3527,7 +3527,7 @@ yyreduce:
case 216: /* def_node: start "dimen" ref dimension ">" */
#line 942 "parser.y"
{
- #line 7614 "format.w"
+ #line 7663 "format.w"
DEF((yyval.rf),dimen_kind,(yyvsp[-2].u));hput_tags((yyvsp[-4].u),hput_dimen((yyvsp[-1].d)));}
#line 3533 "parser.c"
break;
@@ -3535,7 +3535,7 @@ yyreduce:
case 217: /* def_node: start "language" ref string ">" */
#line 945 "parser.y"
{
- #line 7615 "format.w"
+ #line 7664 "format.w"
DEF((yyval.rf),language_kind,(yyvsp[-2].u));hput_string((yyvsp[-1].s));hput_tags((yyvsp[-4].u),TAG(language_kind,0));}
#line 3541 "parser.c"
break;
@@ -3543,7 +3543,7 @@ yyreduce:
case 218: /* def_node: start "glue" ref glue ">" */
#line 948 "parser.y"
{
- #line 7616 "format.w"
+ #line 7665 "format.w"
DEF((yyval.rf),glue_kind,(yyvsp[-2].u));hput_tags((yyvsp[-4].u),hput_glue(&((yyvsp[-1].g))));}
#line 3549 "parser.c"
break;
@@ -3551,7 +3551,7 @@ yyreduce:
case 219: /* def_node: start "xdimen" ref xdimen ">" */
#line 951 "parser.y"
{
- #line 7617 "format.w"
+ #line 7666 "format.w"
DEF((yyval.rf),xdimen_kind,(yyvsp[-2].u));hput_tags((yyvsp[-4].u),hput_xdimen(&((yyvsp[-1].xd))));}
#line 3557 "parser.c"
break;
@@ -3559,7 +3559,7 @@ yyreduce:
case 220: /* def_node: start "rule" ref rule ">" */
#line 954 "parser.y"
{
- #line 7618 "format.w"
+ #line 7667 "format.w"
DEF((yyval.rf),rule_kind,(yyvsp[-2].u));hput_tags((yyvsp[-4].u),hput_rule(&((yyvsp[-1].r))));}
#line 3565 "parser.c"
break;
@@ -3567,7 +3567,7 @@ yyreduce:
case 221: /* def_node: start "leaders" ref leaders ">" */
#line 957 "parser.y"
{
- #line 7619 "format.w"
+ #line 7668 "format.w"
DEF((yyval.rf),leaders_kind,(yyvsp[-2].u));hput_tags((yyvsp[-4].u),TAG(leaders_kind,(yyvsp[-1].info)));}
#line 3573 "parser.c"
break;
@@ -3575,7 +3575,7 @@ yyreduce:
case 222: /* def_node: start "baseline" ref baseline ">" */
#line 960 "parser.y"
{
- #line 7620 "format.w"
+ #line 7669 "format.w"
DEF((yyval.rf),baseline_kind,(yyvsp[-2].u));hput_tags((yyvsp[-4].u),TAG(baseline_kind,(yyvsp[-1].info)));}
#line 3581 "parser.c"
break;
@@ -3583,7 +3583,7 @@ yyreduce:
case 223: /* def_node: start "ligature" ref ligature ">" */
#line 963 "parser.y"
{
- #line 7621 "format.w"
+ #line 7670 "format.w"
DEF((yyval.rf),ligature_kind,(yyvsp[-2].u));hput_tags((yyvsp[-4].u),hput_ligature(&((yyvsp[-1].lg))));}
#line 3589 "parser.c"
break;
@@ -3591,7 +3591,7 @@ yyreduce:
case 224: /* def_node: start "disc" ref disc ">" */
#line 966 "parser.y"
{
- #line 7622 "format.w"
+ #line 7671 "format.w"
DEF((yyval.rf),disc_kind,(yyvsp[-2].u));hput_tags((yyvsp[-4].u),hput_disc(&((yyvsp[-1].dc))));}
#line 3597 "parser.c"
break;
@@ -3599,7 +3599,7 @@ yyreduce:
case 225: /* def_node: start "image" ref image ">" */
#line 969 "parser.y"
{
- #line 7623 "format.w"
+ #line 7672 "format.w"
DEF((yyval.rf),image_kind,(yyvsp[-2].u));hput_tags((yyvsp[-4].u),hput_image(&((yyvsp[-1].x))));}
#line 3605 "parser.c"
break;
@@ -3607,7 +3607,7 @@ yyreduce:
case 226: /* def_node: start "param" ref parameters ">" */
#line 972 "parser.y"
{
- #line 7624 "format.w"
+ #line 7673 "format.w"
DEF((yyval.rf),param_kind,(yyvsp[-2].u));hput_tags((yyvsp[-4].u),hput_list((yyvsp[-4].u)+2,&((yyvsp[-1].l))));}
#line 3613 "parser.c"
break;
@@ -3615,7 +3615,7 @@ yyreduce:
case 227: /* def_node: start "page" ref page ">" */
#line 975 "parser.y"
{
- #line 7625 "format.w"
+ #line 7674 "format.w"
DEF((yyval.rf),page_kind,(yyvsp[-2].u));hput_tags((yyvsp[-4].u),TAG(page_kind,0));}
#line 3621 "parser.c"
break;
@@ -3623,7 +3623,7 @@ yyreduce:
case 228: /* def_node: start "int" ref ref ">" */
#line 980 "parser.y"
{
- #line 7644 "format.w"
+ #line 7693 "format.w"
DEF_REF((yyval.rf),int_kind,(yyvsp[-2].u),(yyvsp[-1].u));hput_tags((yyvsp[-4].u),TAG(int_kind,0));}
#line 3629 "parser.c"
break;
@@ -3631,7 +3631,7 @@ yyreduce:
case 229: /* def_node: start "dimen" ref ref ">" */
#line 983 "parser.y"
{
- #line 7645 "format.w"
+ #line 7694 "format.w"
DEF_REF((yyval.rf),dimen_kind,(yyvsp[-2].u),(yyvsp[-1].u));hput_tags((yyvsp[-4].u),TAG(dimen_kind,0));}
#line 3637 "parser.c"
break;
@@ -3639,7 +3639,7 @@ yyreduce:
case 230: /* def_node: start "glue" ref ref ">" */
#line 986 "parser.y"
{
- #line 7646 "format.w"
+ #line 7695 "format.w"
DEF_REF((yyval.rf),glue_kind,(yyvsp[-2].u),(yyvsp[-1].u));hput_tags((yyvsp[-4].u),TAG(glue_kind,0));}
#line 3645 "parser.c"
break;
@@ -3647,7 +3647,7 @@ yyreduce:
case 232: /* def_list: def_list def_node */
#line 991 "parser.y"
{
- #line 7760 "format.w"
+ #line 7809 "format.w"
check_param_def(&((yyvsp[0].rf)));}
#line 3653 "parser.c"
break;
@@ -3655,7 +3655,7 @@ yyreduce:
case 233: /* parameters: estimate def_list */
#line 994 "parser.y"
{
- #line 7761 "format.w"
+ #line 7810 "format.w"
(yyval.l).p= (yyvsp[0].u);(yyval.l).k= param_kind;(yyval.l).s= (hpos-hstart)-(yyvsp[0].u);}
#line 3661 "parser.c"
break;
@@ -3663,7 +3663,7 @@ yyreduce:
case 234: /* empty_param_list: position */
#line 998 "parser.y"
{
- #line 7782 "format.w"
+ #line 7831 "format.w"
HPUTX(2);hpos++;hput_tags((yyvsp[0].u),TAG(param_kind,1));}
#line 3669 "parser.c"
break;
@@ -3671,7 +3671,7 @@ yyreduce:
case 235: /* $@12: %empty */
#line 1001 "parser.y"
{
- #line 7783 "format.w"
+ #line 7832 "format.w"
hpos= hpos-2;}
#line 3677 "parser.c"
break;
@@ -3679,7 +3679,7 @@ yyreduce:
case 236: /* non_empty_param_list: start "param" $@12 parameters ">" */
#line 1004 "parser.y"
{
- #line 7784 "format.w"
+ #line 7833 "format.w"
hput_tags((yyvsp[-4].u)-2,hput_list((yyvsp[-4].u)-1,&((yyvsp[-1].l))));}
#line 3685 "parser.c"
break;
@@ -3687,7 +3687,7 @@ yyreduce:
case 238: /* font_head: string dimension UNSIGNED UNSIGNED */
#line 1012 "parser.y"
{
- #line 7926 "format.w"
+ #line 7975 "format.w"
uint8_t f= (yyvsp[-4].u);SET_DBIT(f,font_kind);hfont_name[f]= strdup((yyvsp[-3].s));(yyval.info)= hput_font_head(f,hfont_name[f],(yyvsp[-2].d),(yyvsp[-1].u),(yyvsp[0].u));}
#line 3693 "parser.c"
break;
@@ -3695,7 +3695,7 @@ yyreduce:
case 241: /* font_param: start "penalty" fref penalty ">" */
#line 1019 "parser.y"
{
- #line 7931 "format.w"
+ #line 7980 "format.w"
hput_tags((yyvsp[-4].u),hput_int((yyvsp[-1].i)));}
#line 3701 "parser.c"
break;
@@ -3703,7 +3703,7 @@ yyreduce:
case 242: /* font_param: start "kern" fref kern ">" */
#line 1022 "parser.y"
{
- #line 7932 "format.w"
+ #line 7981 "format.w"
hput_tags((yyvsp[-4].u),hput_kern(&((yyvsp[-1].kt))));}
#line 3709 "parser.c"
break;
@@ -3711,7 +3711,7 @@ yyreduce:
case 243: /* font_param: start "ligature" fref ligature ">" */
#line 1025 "parser.y"
{
- #line 7933 "format.w"
+ #line 7982 "format.w"
hput_tags((yyvsp[-4].u),hput_ligature(&((yyvsp[-1].lg))));}
#line 3717 "parser.c"
break;
@@ -3719,7 +3719,7 @@ yyreduce:
case 244: /* font_param: start "disc" fref disc ">" */
#line 1028 "parser.y"
{
- #line 7934 "format.w"
+ #line 7983 "format.w"
hput_tags((yyvsp[-4].u),hput_disc(&((yyvsp[-1].dc))));}
#line 3725 "parser.c"
break;
@@ -3727,7 +3727,7 @@ yyreduce:
case 245: /* font_param: start "glue" fref glue ">" */
#line 1031 "parser.y"
{
- #line 7935 "format.w"
+ #line 7984 "format.w"
hput_tags((yyvsp[-4].u),hput_glue(&((yyvsp[-1].g))));}
#line 3733 "parser.c"
break;
@@ -3735,7 +3735,7 @@ yyreduce:
case 246: /* font_param: start "language" fref string ">" */
#line 1034 "parser.y"
{
- #line 7936 "format.w"
+ #line 7985 "format.w"
hput_string((yyvsp[-1].s));hput_tags((yyvsp[-4].u),TAG(language_kind,0));}
#line 3741 "parser.c"
break;
@@ -3743,7 +3743,7 @@ yyreduce:
case 247: /* font_param: start "rule" fref rule ">" */
#line 1037 "parser.y"
{
- #line 7937 "format.w"
+ #line 7986 "format.w"
hput_tags((yyvsp[-4].u),hput_rule(&((yyvsp[-1].r))));}
#line 3749 "parser.c"
break;
@@ -3751,7 +3751,7 @@ yyreduce:
case 248: /* font_param: start "image" fref image ">" */
#line 1040 "parser.y"
{
- #line 7938 "format.w"
+ #line 7987 "format.w"
hput_tags((yyvsp[-4].u),hput_image(&((yyvsp[-1].x))));}
#line 3757 "parser.c"
break;
@@ -3759,7 +3759,7 @@ yyreduce:
case 249: /* fref: ref */
#line 1044 "parser.y"
{
- #line 7940 "format.w"
+ #line 7989 "format.w"
RNG("Font parameter",(yyvsp[0].u),0,MAX_FONT_PARAMS);}
#line 3765 "parser.c"
break;
@@ -3767,7 +3767,7 @@ yyreduce:
case 250: /* xdimen_ref: ref */
#line 1048 "parser.y"
{
- #line 8013 "format.w"
+ #line 8062 "format.w"
REF(xdimen_kind,(yyvsp[0].u));}
#line 3773 "parser.c"
break;
@@ -3775,7 +3775,7 @@ yyreduce:
case 251: /* param_ref: ref */
#line 1051 "parser.y"
{
- #line 8014 "format.w"
+ #line 8063 "format.w"
REF(param_kind,(yyvsp[0].u));}
#line 3781 "parser.c"
break;
@@ -3783,7 +3783,7 @@ yyreduce:
case 252: /* stream_ref: ref */
#line 1054 "parser.y"
{
- #line 8015 "format.w"
+ #line 8064 "format.w"
REF_RNG(stream_kind,(yyvsp[0].u));}
#line 3789 "parser.c"
break;
@@ -3791,7 +3791,7 @@ yyreduce:
case 253: /* content_node: start "penalty" ref ">" */
#line 1060 "parser.y"
{
- #line 8019 "format.w"
+ #line 8068 "format.w"
REF(penalty_kind,(yyvsp[-1].u));hput_tags((yyvsp[-3].u),TAG(penalty_kind,0));}
#line 3797 "parser.c"
break;
@@ -3799,7 +3799,7 @@ yyreduce:
case 254: /* content_node: start "kern" explicit ref ">" */
#line 1064 "parser.y"
{
- #line 8021 "format.w"
+ #line 8070 "format.w"
REF(dimen_kind,(yyvsp[-1].u));hput_tags((yyvsp[-4].u),TAG(kern_kind,((yyvsp[-2].b))?b100:b000));}
#line 3805 "parser.c"
break;
@@ -3807,7 +3807,7 @@ yyreduce:
case 255: /* content_node: start "kern" explicit "xdimen" ref ">" */
#line 1068 "parser.y"
{
- #line 8023 "format.w"
+ #line 8072 "format.w"
REF(xdimen_kind,(yyvsp[-1].u));hput_tags((yyvsp[-5].u),TAG(kern_kind,((yyvsp[-3].b))?b101:b001));}
#line 3813 "parser.c"
break;
@@ -3815,7 +3815,7 @@ yyreduce:
case 256: /* content_node: start "glue" ref ">" */
#line 1071 "parser.y"
{
- #line 8024 "format.w"
+ #line 8073 "format.w"
REF(glue_kind,(yyvsp[-1].u));hput_tags((yyvsp[-3].u),TAG(glue_kind,0));}
#line 3821 "parser.c"
break;
@@ -3823,7 +3823,7 @@ yyreduce:
case 257: /* content_node: start "ligature" ref ">" */
#line 1074 "parser.y"
{
- #line 8025 "format.w"
+ #line 8074 "format.w"
REF(ligature_kind,(yyvsp[-1].u));hput_tags((yyvsp[-3].u),TAG(ligature_kind,0));}
#line 3829 "parser.c"
break;
@@ -3831,7 +3831,7 @@ yyreduce:
case 258: /* content_node: start "disc" ref ">" */
#line 1077 "parser.y"
{
- #line 8026 "format.w"
+ #line 8075 "format.w"
REF(disc_kind,(yyvsp[-1].u));hput_tags((yyvsp[-3].u),TAG(disc_kind,0));}
#line 3837 "parser.c"
break;
@@ -3839,7 +3839,7 @@ yyreduce:
case 259: /* content_node: start "rule" ref ">" */
#line 1080 "parser.y"
{
- #line 8027 "format.w"
+ #line 8076 "format.w"
REF(rule_kind,(yyvsp[-1].u));hput_tags((yyvsp[-3].u),TAG(rule_kind,0));}
#line 3845 "parser.c"
break;
@@ -3847,7 +3847,7 @@ yyreduce:
case 260: /* content_node: start "image" ref ">" */
#line 1083 "parser.y"
{
- #line 8028 "format.w"
+ #line 8077 "format.w"
REF(image_kind,(yyvsp[-1].u));hput_tags((yyvsp[-3].u),TAG(image_kind,0));}
#line 3853 "parser.c"
break;
@@ -3855,7 +3855,7 @@ yyreduce:
case 261: /* content_node: start "leaders" ref ">" */
#line 1086 "parser.y"
{
- #line 8029 "format.w"
+ #line 8078 "format.w"
REF(leaders_kind,(yyvsp[-1].u));hput_tags((yyvsp[-3].u),TAG(leaders_kind,0));}
#line 3861 "parser.c"
break;
@@ -3863,7 +3863,7 @@ yyreduce:
case 262: /* content_node: start "baseline" ref ">" */
#line 1089 "parser.y"
{
- #line 8030 "format.w"
+ #line 8079 "format.w"
REF(baseline_kind,(yyvsp[-1].u));hput_tags((yyvsp[-3].u),TAG(baseline_kind,0));}
#line 3869 "parser.c"
break;
@@ -3871,7 +3871,7 @@ yyreduce:
case 263: /* content_node: start "language" REFERENCE ">" */
#line 1092 "parser.y"
{
- #line 8031 "format.w"
+ #line 8080 "format.w"
REF(language_kind,(yyvsp[-1].u));hput_tags((yyvsp[-3].u),hput_language((yyvsp[-1].u)));}
#line 3877 "parser.c"
break;
@@ -3879,7 +3879,7 @@ yyreduce:
case 264: /* glue_node: start "glue" ref ">" */
#line 1096 "parser.y"
{
- #line 8033 "format.w"
+ #line 8082 "format.w"
REF(glue_kind,(yyvsp[-1].u));
if((yyvsp[-1].u)==zero_skip_no){hpos= hpos-2;(yyval.b)= false;}
else{hput_tags((yyvsp[-3].u),TAG(glue_kind,0));(yyval.b)= true;}}
@@ -3889,7 +3889,7 @@ yyreduce:
case 265: /* $@13: %empty */
#line 1103 "parser.y"
{
- #line 8464 "format.w"
+ #line 8513 "format.w"
hput_content_start();}
#line 3895 "parser.c"
break;
@@ -3897,7 +3897,7 @@ yyreduce:
case 266: /* content_section: "<" "content" $@13 content_list ">" */
#line 1106 "parser.y"
{
- #line 8465 "format.w"
+ #line 8514 "format.w"
hput_content_end();hput_range_defs();hput_label_defs();}
#line 3903 "parser.c"
break;
@@ -4129,4 +4129,4 @@ yyreturnlab:
#line 1110 "parser.y"
- /*:510*/
+ /*:512*/
diff --git a/Build/source/texk/web2c/hitexdir/hiparser.h b/Build/source/texk/web2c/hitexdir/hiparser.h
index a368d1069cc..4d0ce411f77 100644
--- a/Build/source/texk/web2c/hitexdir/hiparser.h
+++ b/Build/source/texk/web2c/hitexdir/hiparser.h
@@ -147,7 +147,7 @@ union YYSTYPE
{
#line 79 "parser.y"
- #line 10241 "format.w"
+ #line 10324 "format.w"
uint32_t u; int32_t i; char *s; float64_t f; glyph_t c;
dimen_t d;stretch_t st;xdimen_t xd;kern_t kt;
rule_t r;glue_t g;image_t x;
diff --git a/Build/source/texk/web2c/hitexdir/hiparser.y b/Build/source/texk/web2c/hitexdir/hiparser.y
index b3f1b1e2a05..37c4b31b8b5 100644
--- a/Build/source/texk/web2c/hitexdir/hiparser.y
+++ b/Build/source/texk/web2c/hitexdir/hiparser.y
@@ -1,6 +1,6 @@
- /*510:*/
+ /*512:*/
%{
- #line 10216 "format.w"
+ #line 10299 "format.w"
#include "hibasetypes.h"
#include <string.h>
@@ -10,9 +10,9 @@
#include "hiput.h"
extern char**hfont_name;
- /*356:*/
+ /*358:*/
uint32_t definition_bits[0x100/32][32]= {
- #line 7578 "format.w"
+ #line 7627 "format.w"
{0}};
#define SET_DBIT(N,K) ((N)>0xFF?1:(definition_bits[N/32][K] |= (1<<((N)&(32-1)))))
@@ -22,52 +22,52 @@ uint32_t definition_bits[0x100/32][32]= {
RNG("Definition",(D).n,max_fixed[(D).k]+1,max_ref[(D).k]);
#define REF(K,N) REF_RNG(K,N);if(!GET_DBIT(N,K)) \
QUIT("Reference %d to %s before definition",(N),definition_name[K])
- /*:356*/ /*360:*/
+ /*:358*/ /*362:*/
#define DEF_REF(D,K,M,N) DEF(D,K,M);\
if ((M)>max_default[K]) QUIT("Defining non default reference %d for %s",M,definition_name[K]); \
if ((N)>max_fixed[K]) QUIT("Defining reference %d for %s by non fixed reference %d",M,definition_name[K],N);
- /*:360*/
+ /*:362*/
extern void hset_entry(entry_t*e,uint16_t i,uint32_t size,
uint32_t xsize,char*file_name);
- /*423:*/
+ /*425:*/
#ifdef DEBUG
#define YYDEBUG 1
extern int yydebug;
#else
#define YYDEBUG 0
#endif
- /*:423*/
+ /*:425*/
extern int yylex(void);
- /*352:*/
+ /*354:*/
void hset_max(kind_t k,int n)
{
- #line 7421 "format.w"
+ #line 7470 "format.w"
DBG(DBGDEF,"Setting max %s to %d\n",definition_name[k],n);
RNG("Maximum",n,max_fixed[k]+1,MAX_REF(k));
if(n>max_ref[k])
max_ref[k]= n;
}
- /*:352*/ /*363:*/
+ /*:354*/ /*365:*/
void check_param_def(ref_t*df)
{
- #line 7727 "format.w"
+ #line 7776 "format.w"
if(df->k!=int_kind&&df->k!=dimen_kind&&df->k!=glue_kind)
QUIT("Kind %s not allowed in parameter list",definition_name[df->k]);
if(df->n<=max_fixed[df->k]||max_default[df->k]<df->n)
QUIT("Parameter %d for %s not allowed in parameter list",df->n,definition_name[df->k]);
}
- /*:363*/ /*422:*/
+ /*:365*/ /*424:*/
extern int yylineno;
int yyerror(const char*msg)
{
- #line 8803 "format.w"
+ #line 8886 "format.w"
QUIT(" in line %d %s",yylineno,msg);
return 0;
}
- /*:422*/
+ /*:424*/
%}
@@ -77,7 +77,7 @@ int yyerror(const char*msg)
%union {
- #line 10241 "format.w"
+ #line 10324 "format.w"
uint32_t u; int32_t i; char *s; float64_t f; glyph_t c;
dimen_t d;stretch_t st;xdimen_t xd;kern_t kt;
rule_t r;glue_t g;image_t x;
@@ -242,23 +242,23 @@ int yyerror(const char*msg)
/*:295*/ /*322:*/
%token DIRECTORY "directory"
%token SECTION "entry"
- /*:322*/ /*341:*/
+ /*:322*/ /*343:*/
%token DEFINITIONS "definitions"
- /*:341*/ /*349:*/
+ /*:343*/ /*351:*/
%token MAX "max"
- /*:349*/ /*358:*/
+ /*:351*/ /*360:*/
%type <rf> def_node
- /*:358*/ /*364:*/
+ /*:360*/ /*366:*/
%token PARAM "param"
%type <u> def_list
%type <l> parameters
- /*:364*/ /*373:*/
+ /*:366*/ /*375:*/
%token FONT "font"
%type <info> font font_head
- /*:373*/ /*401:*/
+ /*:375*/ /*403:*/
%token CONTENT "content"
- /*:401*/
+ /*:403*/
%%
/*5:*/
glyph:UNSIGNED REFERENCE{
@@ -447,309 +447,309 @@ txt:TXT_CC{
box_dimen:dimension dimension dimension
{
- #line 3470 "format.w"
+ #line 3472 "format.w"
$$= hput_box_dimen($1,$2,$3);};
box_shift:{
- #line 3471 "format.w"
+ #line 3473 "format.w"
$$= b000;}
|SHIFTED dimension{
- #line 3472 "format.w"
+ #line 3474 "format.w"
$$= hput_box_shift($2);};
box_glue_set:{
- #line 3474 "format.w"
+ #line 3476 "format.w"
$$= b000;}
|PLUS stretch{
- #line 3475 "format.w"
+ #line 3477 "format.w"
$$= hput_box_glue_set(+1,$2.f,$2.o);}
|MINUS stretch{
- #line 3476 "format.w"
+ #line 3478 "format.w"
$$= hput_box_glue_set(-1,$2.f,$2.o);};
box:box_dimen box_shift box_glue_set list{
- #line 3479 "format.w"
+ #line 3481 "format.w"
$$= $1 |$2 |$3;};
hbox_node:start HBOX box END{
- #line 3481 "format.w"
+ #line 3483 "format.w"
hput_tags($1,TAG(hbox_kind,$3));};
vbox_node:start VBOX box END{
- #line 3482 "format.w"
+ #line 3484 "format.w"
hput_tags($1,TAG(vbox_kind,$3));};
content_node:hbox_node |vbox_node;
/*:163*/ /*171:*/
box_flex:plus minus{
- #line 3663 "format.w"
+ #line 3665 "format.w"
hput_stretch(&($1));hput_stretch(&($2));};
xbox:box_dimen box_shift box_flex xdimen_ref list{
- #line 3664 "format.w"
+ #line 3666 "format.w"
$$= $1 |$2;}
|box_dimen box_shift box_flex xdimen_node list{
- #line 3665 "format.w"
+ #line 3667 "format.w"
$$= $1 |$2 |b100;};
box_goal:TO xdimen_ref{
- #line 3667 "format.w"
+ #line 3669 "format.w"
$$= b000;}
|ADD xdimen_ref{
- #line 3668 "format.w"
+ #line 3670 "format.w"
$$= b001;}
|TO xdimen_node{
- #line 3669 "format.w"
+ #line 3671 "format.w"
$$= b100;}
|ADD xdimen_node{
- #line 3670 "format.w"
+ #line 3672 "format.w"
$$= b101;};
hpack:box_shift box_goal list{
- #line 3672 "format.w"
+ #line 3674 "format.w"
$$= $2;};
vpack:box_shift MAX DEPTH dimension{
- #line 3673 "format.w"
+ #line 3675 "format.w"
HPUT32($4);}box_goal list{
- #line 3673 "format.w"
+ #line 3675 "format.w"
$$= $1 |$6;};
vxbox_node:start VSET xbox END{
- #line 3675 "format.w"
+ #line 3677 "format.w"
hput_tags($1,TAG(vset_kind,$3));}
|start VPACK vpack END{
- #line 3676 "format.w"
+ #line 3678 "format.w"
hput_tags($1,TAG(vpack_kind,$3));};
hxbox_node:start HSET xbox END{
- #line 3679 "format.w"
+ #line 3681 "format.w"
hput_tags($1,TAG(hset_kind,$3));}
|start HPACK hpack END{
- #line 3680 "format.w"
+ #line 3682 "format.w"
hput_tags($1,TAG(hpack_kind,$3));};
content_node:vxbox_node |hxbox_node;
/*:171*/ /*176:*/
ltype:{
- #line 3790 "format.w"
+ #line 3792 "format.w"
$$= 1;} |ALIGN{
- #line 3790 "format.w"
+ #line 3792 "format.w"
$$= 1;} |CENTER{
- #line 3790 "format.w"
+ #line 3792 "format.w"
$$= 2;} |EXPAND{
- #line 3790 "format.w"
+ #line 3792 "format.w"
$$= 3;};
leaders:glue_node ltype rule_node{
- #line 3791 "format.w"
+ #line 3793 "format.w"
if($1)$$= $2 |b100;else $$= $2;}
|glue_node ltype hbox_node{
- #line 3792 "format.w"
+ #line 3794 "format.w"
if($1)$$= $2 |b100;else $$= $2;}
|glue_node ltype vbox_node{
- #line 3793 "format.w"
+ #line 3795 "format.w"
if($1)$$= $2 |b100;else $$= $2;};
content_node:start LEADERS leaders END{
- #line 3794 "format.w"
+ #line 3796 "format.w"
hput_tags($1,TAG(leaders_kind,$3));}
/*:176*/ /*183:*/
baseline:dimension{
- #line 3900 "format.w"
+ #line 3902 "format.w"
if($1!=0)HPUT32($1);}
glue_node glue_node{
- #line 3901 "format.w"
+ #line 3903 "format.w"
$$= b000;if($1!=0)$$ |= b001;
if($3)$$ |= b100;
if($4)$$ |= b010;
};
content_node:start BASELINE baseline END
{
- #line 3906 "format.w"
+ #line 3908 "format.w"
if($3==b000)HPUT8(0);hput_tags($1,TAG(baseline_kind,$3));};
/*:183*/ /*190:*/
cc_list: |cc_list TXT_CC{
- #line 3989 "format.w"
+ #line 3991 "format.w"
hput_utf8($2);};
lig_cc:UNSIGNED{
- #line 3990 "format.w"
+ #line 3992 "format.w"
RNG("UTF-8 code",$1,0,0x1FFFFF);$$= hpos-hstart;hput_utf8($1);};
lig_cc:CHARCODE{
- #line 3991 "format.w"
+ #line 3993 "format.w"
$$= hpos-hstart;hput_utf8($1);};
ref:REFERENCE{
- #line 3992 "format.w"
+ #line 3994 "format.w"
HPUT8($1);$$= $1;};
ligature:ref{
- #line 3993 "format.w"
+ #line 3995 "format.w"
REF(font_kind,$1);}lig_cc TXT_START cc_list TXT_END
{
- #line 3994 "format.w"
+ #line 3996 "format.w"
$$.f= $1;$$.l.p= $3;$$.l.s= (hpos-hstart)-$3;
RNG("Ligature size",$$.l.s,0,255);};
content_node:start LIGATURE ligature END{
- #line 3996 "format.w"
+ #line 3998 "format.w"
hput_tags($1,hput_ligature(&($3)));};
/*:190*/ /*198:*/
replace_count:explicit{
- #line 4106 "format.w"
+ #line 4108 "format.w"
if($1){$$= 0x80;HPUT8(0x80);}else $$= 0x00;}
|explicit UNSIGNED{
- #line 4107 "format.w"
+ #line 4109 "format.w"
RNG("Replace count",$2,0,31);
$$= ($2) |(($1)?0x80:0x00);if($$!=0)HPUT8($$);};
disc:replace_count list list{
- #line 4109 "format.w"
+ #line 4111 "format.w"
$$.r= $1;$$.p= $2;$$.q= $3;
if($3.s==0){hpos= hpos-2;if($2.s==0)hpos= hpos-2;}}
|replace_count list{
- #line 4111 "format.w"
+ #line 4113 "format.w"
$$.r= $1;$$.p= $2;if($2.s==0)hpos= hpos-2;$$.q.s= 0;}
|replace_count{
- #line 4112 "format.w"
+ #line 4114 "format.w"
$$.r= $1;$$.p.s= 0;$$.q.s= 0;};
disc_node:start DISC disc END
{
- #line 4116 "format.w"
+ #line 4118 "format.w"
hput_tags($1,hput_disc(&($3)));};
content_node:disc_node;
/*:198*/ /*206:*/
par_dimen:xdimen{
- #line 4268 "format.w"
+ #line 4270 "format.w"
hput_xdimen_node(&($1));};
par:xdimen_ref param_ref list{
- #line 4269 "format.w"
+ #line 4271 "format.w"
$$= b000;}
|xdimen_ref empty_param_list non_empty_param_list list{
- #line 4270 "format.w"
+ #line 4272 "format.w"
$$= b010;}
|xdimen_ref empty_param_list list{
- #line 4271 "format.w"
+ #line 4273 "format.w"
$$= b010;}
|xdimen param_ref{
- #line 4272 "format.w"
+ #line 4274 "format.w"
hput_xdimen_node(&($1));}list{
- #line 4272 "format.w"
+ #line 4274 "format.w"
$$= b100;}
|par_dimen empty_param_list non_empty_param_list list{
- #line 4273 "format.w"
+ #line 4275 "format.w"
$$= b110;}
|par_dimen empty_param_list list{
- #line 4274 "format.w"
+ #line 4276 "format.w"
$$= b110;};
content_node:start PAR par END{
- #line 4276 "format.w"
+ #line 4278 "format.w"
hput_tags($1,TAG(par_kind,$3));};
/*:206*/ /*211:*/
math:param_ref list{
- #line 4342 "format.w"
+ #line 4344 "format.w"
$$= b000;}
|param_ref list hbox_node{
- #line 4343 "format.w"
+ #line 4345 "format.w"
$$= b001;}
|param_ref hbox_node list{
- #line 4344 "format.w"
+ #line 4346 "format.w"
$$= b010;}
|empty_param_list list{
- #line 4345 "format.w"
+ #line 4347 "format.w"
$$= b100;}
|empty_param_list list hbox_node{
- #line 4346 "format.w"
+ #line 4348 "format.w"
$$= b101;}
|empty_param_list hbox_node list{
- #line 4347 "format.w"
+ #line 4349 "format.w"
$$= b110;}
|empty_param_list non_empty_param_list list{
- #line 4348 "format.w"
+ #line 4350 "format.w"
$$= b100;}
|empty_param_list non_empty_param_list list hbox_node{
- #line 4349 "format.w"
+ #line 4351 "format.w"
$$= b101;}
|empty_param_list non_empty_param_list hbox_node list{
- #line 4350 "format.w"
+ #line 4352 "format.w"
$$= b110;};
content_node:start MATH math END{
- #line 4352 "format.w"
+ #line 4354 "format.w"
hput_tags($1,TAG(math_kind,$3));};
/*:211*/ /*216:*/
on_off:ON{
- #line 4402 "format.w"
+ #line 4404 "format.w"
$$= 1;} |OFF{
- #line 4402 "format.w"
+ #line 4404 "format.w"
$$= 0;};
math:on_off{
- #line 4403 "format.w"
+ #line 4405 "format.w"
$$= b011 |($1<<2);};
/*:216*/ /*220:*/
content_node:start ADJUST list END{
- #line 4434 "format.w"
+ #line 4436 "format.w"
hput_tags($1,TAG(adjust_kind,1));};
/*:220*/ /*224:*/
span_count:UNSIGNED{
- #line 4533 "format.w"
+ #line 4535 "format.w"
$$= hput_span_count($1);};
content_node:start ITEM content_node END{
- #line 4534 "format.w"
+ #line 4536 "format.w"
hput_tags($1,TAG(item_kind,1));};
content_node:start ITEM span_count content_node END{
- #line 4535 "format.w"
+ #line 4537 "format.w"
hput_tags($1,TAG(item_kind,$3));};
content_node:start ITEM list END{
- #line 4536 "format.w"
+ #line 4538 "format.w"
hput_tags($1,TAG(item_kind,b000));};
table:H box_goal list list{
- #line 4538 "format.w"
+ #line 4540 "format.w"
$$= $2;};
table:V box_goal list list{
- #line 4539 "format.w"
+ #line 4541 "format.w"
$$= $2 |b010;};
content_node:start TABLE table END{
- #line 4541 "format.w"
+ #line 4543 "format.w"
hput_tags($1,TAG(table_kind,$3));};
/*:224*/ /*231:*/
image_dimen:dimension dimension{
- #line 4629 "format.w"
+ #line 4631 "format.w"
$$.w= $1;$$.h= $2;} |{
- #line 4629 "format.w"
+ #line 4631 "format.w"
$$.w= $$.h= 0;};
image:UNSIGNED image_dimen plus minus{
- #line 4630 "format.w"
+ #line 4632 "format.w"
$$.w= $2.w;$$.h= $2.h;$$.p= $3;$$.m= $4;RNG("Section number",$1,3,max_section_no);$$.n= $1;};
content_node:start IMAGE image END{
- #line 4631 "format.w"
+ #line 4633 "format.w"
hput_tags($1,hput_image(&($3)));}
/*:231*/ /*241:*/
max_value:OUTLINE UNSIGNED{
- #line 4868 "format.w"
+ #line 4870 "format.w"
max_outline= $2;
RNG("max outline",max_outline,0,0xFFFF);
DBG(DBGDEF |DBGLABEL,"Setting max outline to %d\n",max_outline);
};
/*:241*/ /*248:*/
placement:TOP{
- #line 4960 "format.w"
+ #line 4962 "format.w"
$$= LABEL_TOP;} |BOT{
- #line 4960 "format.w"
+ #line 4962 "format.w"
$$= LABEL_BOT;} |MID{
- #line 4960 "format.w"
+ #line 4962 "format.w"
$$= LABEL_MID;} |{
- #line 4960 "format.w"
+ #line 4962 "format.w"
$$= LABEL_MID;};
content_node:START LABEL REFERENCE placement END
{
- #line 4962 "format.w"
+ #line 4964 "format.w"
hset_label($3,$4);}
/*:248*/ /*262:*/
content_node:start LINK REFERENCE on_off END
{
- #line 5220 "format.w"
+ #line 5222 "format.w"
hput_tags($1,hput_link($3,$4));};
/*:262*/ /*272:*/
def_node:START OUTLINE REFERENCE integer position list END{
- #line 5350 "format.w"
+ #line 5352 "format.w"
static int outline_no= -1;
$$.k= outline_kind;$$.n= $3;
@@ -759,102 +759,102 @@ def_node:START OUTLINE REFERENCE integer position list END{
};
/*:272*/ /*279:*/
stream_link:ref{
- #line 5765 "format.w"
+ #line 5767 "format.w"
REF_RNG(stream_kind,$1);} |NOREFERENCE{
- #line 5765 "format.w"
+ #line 5767 "format.w"
HPUT8(255);};
stream_split:stream_link stream_link UNSIGNED{
- #line 5766 "format.w"
+ #line 5768 "format.w"
RNG("split ratio",$3,0,1000);HPUT16($3);};
stream_info:xdimen_node UNSIGNED{
- #line 5767 "format.w"
+ #line 5769 "format.w"
RNG("magnification factor",$2,0,1000);HPUT16($2);}stream_split;
stream_type:stream_info{
- #line 5769 "format.w"
+ #line 5771 "format.w"
$$= 0;} |FIRST{
- #line 5769 "format.w"
+ #line 5771 "format.w"
$$= 1;} |LAST{
- #line 5769 "format.w"
+ #line 5771 "format.w"
$$= 2;} |TOP{
- #line 5769 "format.w"
+ #line 5771 "format.w"
$$= 3;};
stream_def_node:start STREAMDEF ref stream_type
list xdimen_node glue_node list glue_node END
{
- #line 5773 "format.w"
+ #line 5775 "format.w"
DEF($$,stream_kind,$3);hput_tags($1,TAG(stream_kind,$4 |b100));};
stream_ins_node:start STREAMDEF ref END
{
- #line 5776 "format.w"
+ #line 5778 "format.w"
RNG("Stream insertion",$3,0,max_ref[stream_kind]);hput_tags($1,TAG(stream_kind,b100));};
content_node:stream_def_node |stream_ins_node;
/*:279*/ /*284:*/
stream:empty_param_list list{
- #line 5871 "format.w"
+ #line 5873 "format.w"
$$= b010;}
|empty_param_list non_empty_param_list list{
- #line 5872 "format.w"
+ #line 5874 "format.w"
$$= b010;}
|param_ref list{
- #line 5873 "format.w"
+ #line 5875 "format.w"
$$= b000;};
content_node:start STREAM stream_ref stream END
{
- #line 5875 "format.w"
+ #line 5877 "format.w"
hput_tags($1,TAG(stream_kind,$4));};
/*:284*/ /*289:*/
page_priority:{
- #line 5978 "format.w"
+ #line 5980 "format.w"
HPUT8(1);}
|UNSIGNED{
- #line 5979 "format.w"
+ #line 5981 "format.w"
RNG("page priority",$1,0,255);HPUT8($1);};
stream_def_list: |stream_def_list stream_def_node;
page:string{
- #line 5983 "format.w"
+ #line 5985 "format.w"
hput_string($1);}page_priority glue_node dimension{
- #line 5983 "format.w"
+ #line 5985 "format.w"
HPUT32($5);}
xdimen_node xdimen_node
list stream_def_list;
/*:289*/ /*297:*/
content_node:START RANGE REFERENCE ON END{
- #line 6095 "format.w"
+ #line 6097 "format.w"
REF(page_kind,$3);hput_range($3,true);}
|START RANGE REFERENCE OFF END{
- #line 6096 "format.w"
+ #line 6098 "format.w"
REF(page_kind,$3);hput_range($3,false);};
/*:297*/ /*308:*/
hint:directory_section definition_section content_section;
/*:308*/ /*324:*/
directory_section:START DIRECTORY UNSIGNED{
- #line 6786 "format.w"
+ #line 6788 "format.w"
new_directory($3+1);new_output_buffers();}entry_list END;
entry_list: |entry_list entry;
entry:START SECTION UNSIGNED string END
{
- #line 6789 "format.w"
+ #line 6791 "format.w"
RNG("Section number",$3,3,max_section_no);hset_entry(&(dir[$3]),$3,0,0,$4);};
- /*:324*/ /*343:*/
+ /*:324*/ /*345:*/
definition_section:START DEFINITIONS{
- #line 7277 "format.w"
+ #line 7326 "format.w"
hput_definitions_start();}
max_definitions definition_list
END{
- #line 7279 "format.w"
+ #line 7328 "format.w"
hput_definitions_end();};
definition_list: |definition_list def_node;
- /*:343*/ /*351:*/
+ /*:345*/ /*353:*/
max_definitions:START MAX max_list END
{
- #line 7395 "format.w"
+ #line 7444 "format.w"
/*245:*/
if(max_ref[label_kind]>=0)
ALLOCATE(labels,max_ref[label_kind]+1,label_t);
@@ -864,7 +864,7 @@ max_definitions:START MAX max_list END
/*:266*/ /*293:*/
ALLOCATE(page_on,max_ref[page_kind]+1,int);
ALLOCATE(range_pos,2*(max_ref[range_kind]+1),range_pos_t);
- /*:293*/ /*357:*/
+ /*:293*/ /*359:*/
definition_bits[0][int_kind]= (1<<(MAX_INT_DEFAULT+1))-1;
definition_bits[0][dimen_kind]= (1<<(MAX_DIMEN_DEFAULT+1))-1;
definition_bits[0][xdimen_kind]= (1<<(MAX_XDIMEN_DEFAULT+1))-1;
@@ -873,239 +873,239 @@ max_definitions:START MAX max_list END
definition_bits[0][page_kind]= (1<<(MAX_PAGE_DEFAULT+1))-1;
definition_bits[0][stream_kind]= (1<<(MAX_STREAM_DEFAULT+1))-1;
definition_bits[0][range_kind]= (1<<(MAX_RANGE_DEFAULT+1))-1;
- /*:357*/ /*372:*/
+ /*:359*/ /*374:*/
ALLOCATE(hfont_name,max_ref[font_kind]+1,char*);
- /*:372*/hput_max_definitions();};
+ /*:374*/hput_max_definitions();};
max_list: |max_list START max_value END;
max_value:FONT UNSIGNED{
- #line 7399 "format.w"
+ #line 7448 "format.w"
hset_max(font_kind,$2);}
|INTEGER UNSIGNED{
- #line 7400 "format.w"
+ #line 7449 "format.w"
hset_max(int_kind,$2);}
|DIMEN UNSIGNED{
- #line 7401 "format.w"
+ #line 7450 "format.w"
hset_max(dimen_kind,$2);}
|LIGATURE UNSIGNED{
- #line 7402 "format.w"
+ #line 7451 "format.w"
hset_max(ligature_kind,$2);}
|DISC UNSIGNED{
- #line 7403 "format.w"
+ #line 7452 "format.w"
hset_max(disc_kind,$2);}
|GLUE UNSIGNED{
- #line 7404 "format.w"
+ #line 7453 "format.w"
hset_max(glue_kind,$2);}
|LANGUAGE UNSIGNED{
- #line 7405 "format.w"
+ #line 7454 "format.w"
hset_max(language_kind,$2);}
|RULE UNSIGNED{
- #line 7406 "format.w"
+ #line 7455 "format.w"
hset_max(rule_kind,$2);}
|IMAGE UNSIGNED{
- #line 7407 "format.w"
+ #line 7456 "format.w"
hset_max(image_kind,$2);}
|LEADERS UNSIGNED{
- #line 7408 "format.w"
+ #line 7457 "format.w"
hset_max(leaders_kind,$2);}
|BASELINE UNSIGNED{
- #line 7409 "format.w"
+ #line 7458 "format.w"
hset_max(baseline_kind,$2);}
|XDIMEN UNSIGNED{
- #line 7410 "format.w"
+ #line 7459 "format.w"
hset_max(xdimen_kind,$2);}
|PARAM UNSIGNED{
- #line 7411 "format.w"
+ #line 7460 "format.w"
hset_max(param_kind,$2);}
|STREAMDEF UNSIGNED{
- #line 7412 "format.w"
+ #line 7461 "format.w"
hset_max(stream_kind,$2);}
|PAGE UNSIGNED{
- #line 7413 "format.w"
+ #line 7462 "format.w"
hset_max(page_kind,$2);}
|RANGE UNSIGNED{
- #line 7414 "format.w"
+ #line 7463 "format.w"
hset_max(range_kind,$2);}
|LABEL UNSIGNED{
- #line 7415 "format.w"
+ #line 7464 "format.w"
hset_max(label_kind,$2);};
- /*:351*/ /*359:*/
+ /*:353*/ /*361:*/
def_node:
start FONT ref font END{
- #line 7612 "format.w"
+ #line 7661 "format.w"
DEF($$,font_kind,$3);hput_tags($1,$4);}
|start INTEGER ref integer END{
- #line 7613 "format.w"
+ #line 7662 "format.w"
DEF($$,int_kind,$3);hput_tags($1,hput_int($4));}
|start DIMEN ref dimension END{
- #line 7614 "format.w"
+ #line 7663 "format.w"
DEF($$,dimen_kind,$3);hput_tags($1,hput_dimen($4));}
|start LANGUAGE ref string END{
- #line 7615 "format.w"
+ #line 7664 "format.w"
DEF($$,language_kind,$3);hput_string($4);hput_tags($1,TAG(language_kind,0));}
|start GLUE ref glue END{
- #line 7616 "format.w"
+ #line 7665 "format.w"
DEF($$,glue_kind,$3);hput_tags($1,hput_glue(&($4)));}
|start XDIMEN ref xdimen END{
- #line 7617 "format.w"
+ #line 7666 "format.w"
DEF($$,xdimen_kind,$3);hput_tags($1,hput_xdimen(&($4)));}
|start RULE ref rule END{
- #line 7618 "format.w"
+ #line 7667 "format.w"
DEF($$,rule_kind,$3);hput_tags($1,hput_rule(&($4)));}
|start LEADERS ref leaders END{
- #line 7619 "format.w"
+ #line 7668 "format.w"
DEF($$,leaders_kind,$3);hput_tags($1,TAG(leaders_kind,$4));}
|start BASELINE ref baseline END{
- #line 7620 "format.w"
+ #line 7669 "format.w"
DEF($$,baseline_kind,$3);hput_tags($1,TAG(baseline_kind,$4));}
|start LIGATURE ref ligature END{
- #line 7621 "format.w"
+ #line 7670 "format.w"
DEF($$,ligature_kind,$3);hput_tags($1,hput_ligature(&($4)));}
|start DISC ref disc END{
- #line 7622 "format.w"
+ #line 7671 "format.w"
DEF($$,disc_kind,$3);hput_tags($1,hput_disc(&($4)));}
|start IMAGE ref image END{
- #line 7623 "format.w"
+ #line 7672 "format.w"
DEF($$,image_kind,$3);hput_tags($1,hput_image(&($4)));}
|start PARAM ref parameters END{
- #line 7624 "format.w"
+ #line 7673 "format.w"
DEF($$,param_kind,$3);hput_tags($1,hput_list($1+2,&($4)));}
|start PAGE ref page END{
- #line 7625 "format.w"
+ #line 7674 "format.w"
DEF($$,page_kind,$3);hput_tags($1,TAG(page_kind,0));};
- /*:359*/ /*361:*/
+ /*:361*/ /*363:*/
def_node:
start INTEGER ref ref END{
- #line 7644 "format.w"
+ #line 7693 "format.w"
DEF_REF($$,int_kind,$3,$4);hput_tags($1,TAG(int_kind,0));}
|start DIMEN ref ref END{
- #line 7645 "format.w"
+ #line 7694 "format.w"
DEF_REF($$,dimen_kind,$3,$4);hput_tags($1,TAG(dimen_kind,0));}
|start GLUE ref ref END{
- #line 7646 "format.w"
+ #line 7695 "format.w"
DEF_REF($$,glue_kind,$3,$4);hput_tags($1,TAG(glue_kind,0));};
- /*:361*/ /*366:*/
+ /*:363*/ /*368:*/
def_list:position
|def_list def_node{
- #line 7760 "format.w"
+ #line 7809 "format.w"
check_param_def(&($2));};
parameters:estimate def_list{
- #line 7761 "format.w"
+ #line 7810 "format.w"
$$.p= $2;$$.k= param_kind;$$.s= (hpos-hstart)-$2;};
- /*:366*/ /*367:*/
+ /*:368*/ /*369:*/
empty_param_list:position{
- #line 7782 "format.w"
+ #line 7831 "format.w"
HPUTX(2);hpos++;hput_tags($1,TAG(param_kind,1));};
non_empty_param_list:start PARAM{
- #line 7783 "format.w"
+ #line 7832 "format.w"
hpos= hpos-2;}parameters END
{
- #line 7784 "format.w"
+ #line 7833 "format.w"
hput_tags($1-2,hput_list($1-1,&($4)));};
- /*:367*/ /*375:*/
+ /*:369*/ /*377:*/
font:font_head font_param_list;
font_head:string dimension UNSIGNED UNSIGNED
{
- #line 7926 "format.w"
+ #line 7975 "format.w"
uint8_t f= $<u>0;SET_DBIT(f,font_kind);hfont_name[f]= strdup($1);$$= hput_font_head(f,hfont_name[f],$2,$3,$4);};
font_param_list:glue_node disc_node |font_param_list font_param;
font_param:
start PENALTY fref penalty END{
- #line 7931 "format.w"
+ #line 7980 "format.w"
hput_tags($1,hput_int($4));}
|start KERN fref kern END{
- #line 7932 "format.w"
+ #line 7981 "format.w"
hput_tags($1,hput_kern(&($4)));}
|start LIGATURE fref ligature END{
- #line 7933 "format.w"
+ #line 7982 "format.w"
hput_tags($1,hput_ligature(&($4)));}
|start DISC fref disc END{
- #line 7934 "format.w"
+ #line 7983 "format.w"
hput_tags($1,hput_disc(&($4)));}
|start GLUE fref glue END{
- #line 7935 "format.w"
+ #line 7984 "format.w"
hput_tags($1,hput_glue(&($4)));}
|start LANGUAGE fref string END{
- #line 7936 "format.w"
+ #line 7985 "format.w"
hput_string($4);hput_tags($1,TAG(language_kind,0));}
|start RULE fref rule END{
- #line 7937 "format.w"
+ #line 7986 "format.w"
hput_tags($1,hput_rule(&($4)));}
|start IMAGE fref image END{
- #line 7938 "format.w"
+ #line 7987 "format.w"
hput_tags($1,hput_image(&($4)));};
fref:ref{
- #line 7940 "format.w"
+ #line 7989 "format.w"
RNG("Font parameter",$1,0,MAX_FONT_PARAMS);};
- /*:375*/ /*378:*/
+ /*:377*/ /*380:*/
xdimen_ref:ref{
- #line 8013 "format.w"
+ #line 8062 "format.w"
REF(xdimen_kind,$1);};
param_ref:ref{
- #line 8014 "format.w"
+ #line 8063 "format.w"
REF(param_kind,$1);};
stream_ref:ref{
- #line 8015 "format.w"
+ #line 8064 "format.w"
REF_RNG(stream_kind,$1);};
content_node:
start PENALTY ref END{
- #line 8019 "format.w"
+ #line 8068 "format.w"
REF(penalty_kind,$3);hput_tags($1,TAG(penalty_kind,0));}
|start KERN explicit ref END
{
- #line 8021 "format.w"
+ #line 8070 "format.w"
REF(dimen_kind,$4);hput_tags($1,TAG(kern_kind,($3)?b100:b000));}
|start KERN explicit XDIMEN ref END
{
- #line 8023 "format.w"
+ #line 8072 "format.w"
REF(xdimen_kind,$5);hput_tags($1,TAG(kern_kind,($3)?b101:b001));}
|start GLUE ref END{
- #line 8024 "format.w"
+ #line 8073 "format.w"
REF(glue_kind,$3);hput_tags($1,TAG(glue_kind,0));}
|start LIGATURE ref END{
- #line 8025 "format.w"
+ #line 8074 "format.w"
REF(ligature_kind,$3);hput_tags($1,TAG(ligature_kind,0));}
|start DISC ref END{
- #line 8026 "format.w"
+ #line 8075 "format.w"
REF(disc_kind,$3);hput_tags($1,TAG(disc_kind,0));}
|start RULE ref END{
- #line 8027 "format.w"
+ #line 8076 "format.w"
REF(rule_kind,$3);hput_tags($1,TAG(rule_kind,0));}
|start IMAGE ref END{
- #line 8028 "format.w"
+ #line 8077 "format.w"
REF(image_kind,$3);hput_tags($1,TAG(image_kind,0));}
|start LEADERS ref END{
- #line 8029 "format.w"
+ #line 8078 "format.w"
REF(leaders_kind,$3);hput_tags($1,TAG(leaders_kind,0));}
|start BASELINE ref END{
- #line 8030 "format.w"
+ #line 8079 "format.w"
REF(baseline_kind,$3);hput_tags($1,TAG(baseline_kind,0));}
|start LANGUAGE REFERENCE END{
- #line 8031 "format.w"
+ #line 8080 "format.w"
REF(language_kind,$3);hput_tags($1,hput_language($3));};
glue_node:start GLUE ref END{
- #line 8033 "format.w"
+ #line 8082 "format.w"
REF(glue_kind,$3);
if($3==zero_skip_no){hpos= hpos-2;$$= false;}
else{hput_tags($1,TAG(glue_kind,0));$$= true;}};
- /*:378*/ /*403:*/
+ /*:380*/ /*405:*/
content_section:START CONTENT{
- #line 8464 "format.w"
+ #line 8513 "format.w"
hput_content_start();}content_list END
{
- #line 8465 "format.w"
+ #line 8514 "format.w"
hput_content_end();hput_range_defs();hput_label_defs();};
- /*:403*/
+ /*:405*/
%%
- /*:510*/
+ /*:512*/
diff --git a/Build/source/texk/web2c/hitexdir/hitex.w b/Build/source/texk/web2c/hitexdir/hitex.w
index f99e40077a4..146def646e2 100644
--- a/Build/source/texk/web2c/hitexdir/hitex.w
+++ b/Build/source/texk/web2c/hitexdir/hitex.w
@@ -202,7 +202,7 @@
@s dotdot TeX
@* Introduction.
This is Hi\TeX, a program derived from and extending the capabilities
-of \TeX\ plus \eTeX\ plus \Prote\ plus k\TeX,
+of \TeX\ plus \eTeX\ plus \Prote\ plus the \TeX\ Live extensions.
a document compiler intended to produce typesetting of high
quality.
The \PASCAL\ program that follows is the definition of \TeX82, a standard
@@ -324,9 +324,7 @@ known as `\Prote'.
@d Prote_banner "This is Prote, Version " Prote_version_string
/*printed when \Prote\ starts*/
@#
-@d HiTeX_version_string Prote_version_string "-1.0"
-@#
-@d banner "This is HiTeX, Version 3.141592653" HiTeX_version_string /*printed when \TeX\ starts*/
+@d banner "This is HiTeX, Version 3.141592653-" HiTeX_version_string /*printed when \TeX\ starts*/
@ Different \PASCAL s have slightly different conventions, and the present
@!@:PASCAL H}{\ph@>
@@ -8075,7 +8073,6 @@ recursive calls don't invalidate them.
@p @t\4@>@<Declare the procedure called |macro_call|@>@;@/
@t\4@>@<Declare the procedure called |insert_relax|@>@;@/
@t\4@>@<Declare \eTeX\ procedures for expanding@>@;@/
-@t\4@>@<Declare \Prote\ procedures for expanding@>@;@/
static void pass_text(void);
static void start_input(void);
static void conditional(void);
@@ -8713,7 +8710,6 @@ procedures are also declared at this point.
@p static void scan_int(void); /*scans an integer value*/
@t\4\4@>@<Declare procedures that scan restricted classes of integers@>@;
@t\4\4@>@<Declare \eTeX\ procedures for scanning@>@;
-@t\4\4@>@<Declare \Prote\ procedures for scanning@>@;
@t\4\4@>@<Declare procedures that scan font-related stuff@>@;
@ \TeX\ doesn't know exactly what to expect when |scan_something_internal|
@@ -14911,7 +14907,9 @@ static void make_vcenter(pointer @!q)
{@+pointer v; /*the box that should be centered vertically*/
scaled @!delta; /*its height plus depth*/
v=info(nucleus(q));
-if (type(v)!=vlist_node) confusion("vcenter");
+if (type(v)!=vlist_node &&
+ !(type(v)==whatsit_node && (subtype(v)==vset_node || subtype(v)==vpack_node)))
+ confusion("vcenter");
@:this can't happen vcenter}{\quad vcenter@>
delta=height(v)+depth(v);
height(v)=axis_height(cur_size)+half(delta);
@@ -23047,25 +23045,17 @@ mlist_to_hlist();p=link(temp_head); link(temp_head)=null;@/
display_no_bs(q)= prev_depth <= ignore_depth;
tail_append(q);
}
-/* this is from |resume_after_display| */
-if (cur_group!=math_shift_group) confusion("display");
-@:this can't happen display}{\quad display@>
-unsave();
-mode=hmode;space_factor=1000;set_cur_lang;clang=cur_lang;
-prev_graf=(norm_min(left_hyphen_min)*0100+norm_min(right_hyphen_min))
- *0200000+cur_lang;
-@<Scan an optional space@>;
+resume_after_display()
@ @<Declare act...@>=
static void resume_after_display(void)
{@+if (cur_group!=math_shift_group) confusion("display");
@:this can't happen display}{\quad display@>
-unsave();prev_graf=prev_graf+3;
-push_nest();mode=hmode;space_factor=1000;set_cur_lang;clang=cur_lang;
+unsave();
+mode=hmode;space_factor=1000;set_cur_lang;clang=cur_lang;
prev_graf=(norm_min(left_hyphen_min)*0100+norm_min(right_hyphen_min))
*0200000+cur_lang;
@<Scan an optional space@>;
-if (nest_ptr==1) build_page();
}
@ The user can force the equation number to go on a separate line
@@ -25779,11 +25769,12 @@ case par_node: print_esc("parameter ");
print_char(':');print_int(par_value(p).i);
break;
case graf_node: print_esc("paragraf(");
+ print_xdimen(graf_extent(p));
+ print(", ");
print_int(graf_penalty(p));
print_char(')');
node_list_display(graf_params(p));
node_list_display(graf_list(p));
- print_xdimen(graf_extent(p));
break;
case disp_node: print_esc("display ");
node_list_display(display_eqno(p));
@@ -26331,7 +26322,7 @@ if (iniversion && (buffer[loc]=='*'||etexp)&&str_eq_str(format_ident," (INITEX)"
if (buffer[loc]=='*') incr(loc);
eTeX_mode=1; /*enter extended mode*/
@<Initialize variables for \eTeX\ extended mode@>@;
- if (buffer[loc]=='*'||protep) {@+
+ if (buffer[loc]=='*'||ltxp) {@+
@<Check \Prote\ ``constant'' values for consistency@>@;
@<Generate all \Prote\ primitives@>@;
if (buffer[loc]=='*')incr(loc);
@@ -28574,7 +28565,7 @@ head of the reference count is returned in |link(garbage)|, the
tail in |info(garbage)| and if the two are equals, the list is empty.
User must keep in mind that this has to be flushed when done with!
-@<Declare \Prote\ procedures for expanding@>=
+@<Forward declarations@>=
static void scan_general_x_text(void);
@ @<Declare \Prote\ procedures for token lists@>=
@@ -28589,7 +28580,8 @@ def_ref=d; /*restore whatever*/
and converts it to a string number that is returned in |info(garbage)|.
Neither the token list nor the string (obviously) are flushed.
-@<Declare \Prote\ procedures for scanning@>=
+
+@<Forward declarations@>=
static void toks_to_str(void);
@ Here we are using |token_show| that has to take a reference count.
@@ -31071,6 +31063,9 @@ if (type(p)==mark_node)
{ if (bot_mark!=null) delete_token_ref(bot_mark);
bot_mark=mark_ptr(p);add_token_ref(bot_mark);
}
+
+
+
@*1 Replacing {\tt hpack} and {\tt vpack}.
The following routines extend \TeX's original routines. They check for
any dependency of the box size on {\tt hsize} or {\tt vsize} and
@@ -31082,202 +31077,89 @@ create an hset node or hpack node if such a dependency was found.
static pointer hpack(pointer p,scaled w, scaled hf, scaled vf, small_number m)
{
pointer r; /*the box node that will be returned*/
- pointer prev_p; /*trails behind |p|*/
+ pointer q; /*trails behind |p|*/
scaled h,d,x; /*height, depth, and natural width*/
scaled s; /*shift amount*/
pointer g; /*points to a glue specification*/
- glue_ord sto, sho; /*order of infinity*/
+ glue_ord o, sto, sho; /*order of infinity*/
internal_font_number f; /*the font in a |char_node|*/
four_quarters i; /*font information about a |char_node|*/
eight_bits hd; /*height and depth indices for a character*/
+ bool repack=false; /* whether repacking is necessary */
last_badness= 0;r= get_node(box_node_size);type(r)= hlist_node;
subtype(r)= min_quarterword;shift_amount(r)= 0;
- prev_p= r+list_offset;link(prev_p)= p;
- h= 0; d= 0; x= 0;
- total_stretch[normal]= 0;total_shrink[normal]= 0;
- total_stretch[fil]= 0;total_shrink[fil]= 0;
- total_stretch[fill]= 0;total_shrink[fill]= 0;
- total_stretch[filll]= 0;total_shrink[filll]= 0;
- while(p!=null)
- {
- reswitch:
- while(is_char_node(p))
- { f= font(p);i= char_info(f, character(p));hd= height_depth(i);
- x= x+char_width(f, i);
- s= char_height(f, hd);if (s> h)h= s;
- s= char_depth(f, hd);if (s> d)d= s;
- p= link(p);
- }
- if (p!=null)
- { switch(type(p)){
- case hlist_node:case vlist_node:case rule_node:case unset_node:
- { x= x+width(p);
- if (type(p)>=rule_node)s= 0;else s= shift_amount(p);
- if (height(p)-s> h)h= height(p)-s;
- if (depth(p)+s> d)d= depth(p)+s;
- }
- break;
- case ins_node:case mark_node:case adjust_node:if (adjust_tail!=null)
- { while(link(prev_p)!=p)prev_p= link(prev_p);
- if (type(p)==adjust_node)
- { link(adjust_tail)= adjust_ptr(p);
- while(link(adjust_tail)!=null)adjust_tail= link(adjust_tail);
- p= link(p);free_node(link(prev_p),small_node_size);
- }
- else
- { link(adjust_tail)= p;adjust_tail= p;p= link(p);
- }
- link(prev_p)= p;p= prev_p;
- }
- break;
- case whatsit_node:
- if (subtype(p)==graf_node)
- goto repack;
- else if (subtype(p)==disp_node )
- goto repack;
- else if (subtype(p)==vpack_node )
- goto repack;
- else if (subtype(p)==hpack_node )
- goto repack;
- else if (subtype(p)==hset_node )
- goto repack;
- else if (subtype(p)==vset_node )
- goto repack;
- else if (subtype(p)==stream_node )
- goto repack;
- else if (subtype(p)==image_node)
- { glue_ord o;
- if (image_height(p)> h) h= image_height(p);
- x= x+image_width(p);
- o= image_stretch_order(p);total_stretch[o]= total_stretch[o]+image_stretch(p);
- o= image_shrink_order(p);total_shrink[o]= total_shrink[o]+image_shrink(p);
- }
- break;
- break;
- case glue_node:
- { glue_ord o;
- g= glue_ptr(p);x= x+width(g);
- o= stretch_order(g);total_stretch[o]= total_stretch[o]+stretch(g);
- o= shrink_order(g);total_shrink[o]= total_shrink[o]+shrink(g);
- if (subtype(p)>=a_leaders)
- { g= leader_ptr(p);
- if (height(g)> h)h= height(g);
- if (depth(g)> d)d= depth(g);
- }
- }
- break;
- case kern_node:case math_node:x= x+width(p);break;
- case ligature_node:
- { mem[lig_trick]= mem[lig_char(p)];link(lig_trick)= link(p);
- p= lig_trick;goto reswitch;
- }
- default:do_nothing;
- }
- p= link(p);
- }
+ q= r+list_offset;link(q)= p;
+ h= 0;@<Clear dimensions to zero@>;
+ while(p!=null) {
+reswitch:
+ while(is_char_node(p))
+ @<Incorporate character dimensions into the dimensions of the hbox that will contain~it,
+then move to the next node@>;
+ if (p!=null)
+ { switch(type(p)){
+ case hlist_node: case vlist_node: case rule_node: case unset_node: case unset_set_node: case unset_pack_node:
+ @<Incorporate box dimensions into the dimensions of the hbox that will contain~it@>@;@+break;
+ case ins_node: case mark_node: case adjust_node: if (adjust_tail!=null)
+ @<Transfer node |p| to the adjustment list@>@;@+break;
+ case glue_node: @<Incorporate glue into the horizontal totals@>@;@+break;
+ case kern_node: case math_node: x=x+width(p);@+break;
+ case ligature_node: @<Make node |p| look like a |char_node| and |goto reswitch|@>@;
+ case whatsit_node: @<Incorporate the various extended boxes into an hbox@>@;@+break;
+ default:do_nothing;
+ }
+ p= link(p);
}
+ }
+
if (adjust_tail!=null) link(adjust_tail)= null;
height(r)= h;depth(r)= d;
- if (total_stretch[filll]!=0)sto= filll;
- else if (total_stretch[fill]!=0)sto= fill;
- else if (total_stretch[fil]!=0)sto= fil;
- else sto= normal;
-
- if (total_shrink[filll]!=0)sho= filll;
- else if (total_shrink[fill]!=0)sho= fill;
- else if (total_shrink[fil]!=0)sho= fil;
- else sho= normal;
-
- if (hf!=0 || vf!=0 ) /* convert to a hset node */
- { pointer q;
- q=new_set_node();
- subtype(q)=hset_node;
- height(q)=h;
- depth(q)=d;
- width(q)=x; /* the natural width */
- shift_amount(q)=shift_amount(r);
- list_ptr(q)=list_ptr(r);
- list_ptr(r)=null;
- free_node(r, box_node_size);
- if (m==exactly)
- set_extent(q)=new_xdimen(w,hf,vf);
- else
- set_extent(q)=new_xdimen(x+w,hf,vf);
- set_stretch_order(q)=sto;
- set_shrink_order(q)=sho;
- set_stretch(q)=total_stretch[sto];
- set_shrink(q)=total_shrink[sho];
- return q;
- }
-
-
-
+ if (repack) /* convert to a |hpack_node| */
+ { q=new_pack_node();
+ height(q)=h;
+ depth(q)=d;
+ width(q)=x;
+ subtype(q)=hpack_node;
+ list_ptr(q)=list_ptr(r);
+ list_ptr(r)=null;
+ free_node(r, box_node_size);
+ pack_limit(q)=max_dimen; /* no limit, not used */
+ pack_m(q)=m;
+ pack_extent(q)=new_xdimen(w,hf,vf);
+ return q;
+ }
+ else if (hf!=0 || vf!=0 ) /* convert to a hset node */
+ { if (total_stretch[filll]!=0)sto= filll;
+ else if (total_stretch[fill]!=0)sto= fill;
+ else if (total_stretch[fil]!=0)sto= fil;
+ else sto= normal;
- if (m==additional) w= x+w;
- width(r)= w;x= w-x; /*now |x| is the excess to be made up*/
+ if (total_shrink[filll]!=0)sho= filll;
+ else if (total_shrink[fill]!=0)sho= fill;
+ else if (total_shrink[fil]!=0)sho= fil;
+ else sho= normal;
+ q=new_set_node();
+ subtype(q)=hset_node;
+ height(q)=h;
+ depth(q)=d;
+ width(q)=x; /* the natural width */
+ shift_amount(q)=shift_amount(r);
+ list_ptr(q)=list_ptr(r);
+ list_ptr(r)=null;
+ free_node(r, box_node_size);
+ if (m==exactly)
+ set_extent(q)=new_xdimen(w,hf,vf);
+ else
+ set_extent(q)=new_xdimen(x+w,hf,vf);
+ set_stretch_order(q)=sto;
+ set_shrink_order(q)=sho;
+ set_stretch(q)=total_stretch[sto];
+ set_shrink(q)=total_shrink[sho];
+ return q;
+ }
- if (x==0)
- { glue_sign(r)= normal; glue_order(r)= normal;
- set_glue_ratio_zero(glue_set(r));
- goto end;
- }
- else if (x> 0)
- {
- glue_order(r)= sto;glue_sign(r)= stretching;
- if (total_stretch[sto]!=0)glue_set(r)= unfloat(x/(double)total_stretch[sto]);
- else
- { glue_sign(r)= normal;
- set_glue_ratio_zero(glue_set(r));
- }
- if (sto==normal)
- { if (list_ptr(r)!=null)
- { last_badness= badness(x,total_stretch[normal]);
- if (last_badness> hbadness)
- { print_ln();
- if (last_badness> 100)
- print_nl("Underfull");else print_nl("Loose");
- print(" \\hbox (badness ");print_int(last_badness);
- goto common_ending;
- }
- }
- }
- goto end;
- }
- else
- {
- glue_order(r)= sho;glue_sign(r)= shrinking;
- if (total_shrink[sho]!=0)
- glue_set(r)= unfloat((-x)/(double)total_shrink[sho]);
- else
- { glue_sign(r)= normal;
- set_glue_ratio_zero(glue_set(r));
- }
- if ((total_shrink[sho]<-x)&&(sho==normal)&&(list_ptr(r)!=null))
- { last_badness= 1000000;
- set_glue_ratio_one(glue_set(r));
- if ((-x-total_shrink[normal]> hfuzz)||(hbadness<100))
- { if ((overfull_rule> 0)&&(-x-total_shrink[normal]> hfuzz))
- { while(link(prev_p)!=null)prev_p= link(prev_p);
- link(prev_p)= new_rule();
- width(link(prev_p))= overfull_rule;
- }
- print_ln();print_nl("Overfull \\hbox (");
- print_scaled(-x-total_shrink[normal]);print("pt too wide");
- goto common_ending;
- }
- }
- else if (sho==normal)
- { if (list_ptr(r)!=null)
- { last_badness= badness(-x,total_shrink[normal]);
- if (last_badness> hbadness)
- { print_ln();print_nl("Tight \\hbox (badness ");print_int(last_badness);
- goto common_ending;
- }
- }
- }
- goto end;
- }
- common_ending:
+@<Determine the value of |width(r)| and the appropriate glue setting; then |return|
+or |goto common_ending|@>;
+common_ending:
if (pack_begin_line!=0)
{ if (pack_begin_line> 0)print(") in paragraph at lines ");
else print(") in alignment at lines ");
@@ -31289,25 +31171,38 @@ static pointer hpack(pointer p,scaled w, scaled hf, scaled vf, small_number m)
print_ln();
font_in_short_display= null_font;short_display(list_ptr(r));print_ln();
begin_diagnostic();show_box(r);end_diagnostic(true);
- end:return r;
-
-
-repack:
- { /* convert the box to a |hpack_node| */
- pointer q;
- q=new_pack_node();
- height(q)=h;
- depth(q)=d;
- width(q)=x;
- subtype(q)=hpack_node;
- list_ptr(q)=list_ptr(r);
- list_ptr(r)=null;
- free_node(r, box_node_size);
- pack_limit(q)=max_dimen; /* no limit, not used */
- pack_m(q)=m;
- pack_extent(q)=new_xdimen(w,hf,vf);
- return q;
- }
+end:return r;
+}
+
+@ Now we consider the various whatsit nodes that are new in Hi\TeX.
+In most cases, it is no longer possible to determine the dimensions so that
+the |hpack| function is forced to return a hpack node. The hpack nodes cause
+special trouble when converting mlists to hlists because there the dimensions
+are necessary for positioning the parts of the formulas.
+A clean solution requires to postpone such computations to the \HINT\ viewer.
+For now we adopt a simpler solution and supply an educated guess which is
+reasonable since the boxes that occur in math formulas are often not very
+complicated. | graph_node|s should not be in a horizontal list, and |disp_node|s
+should be only inside |graph_node|s.
+
+@<Incorporate the various extended boxes into an hbox@>=
+switch (subtype(p))
+{ case graf_node: break;
+ case disp_node: break;
+ case vpack_node:
+ case hpack_node:
+ case hset_node:
+ case vset_node:
+ @<Incorporate box dimensions into the dimensions of the hbox...@>@;
+ repack=true; break;
+ case stream_node: repack=true; break; /* streams are for page templates only */
+ case image_node:
+ if (image_height(p)> h) h= image_height(p);
+ x= x+image_width(p);
+ o= image_stretch_order(p);total_stretch[o]= total_stretch[o]+image_stretch(p);
+ o= image_shrink_order(p);total_shrink[o]= total_shrink[o]+image_shrink(p);
+ break;
+ default: break;
}
@ @<Hi\TeX\ routines@>=
@@ -31740,7 +31635,6 @@ static pointer new_setpage_node(uint8_t i, str_number n)
@ The default values are replaced by parameters given to the {\tt\BS setpage}
primitive and by the current values of certain
\TeX\ registers when finishing the page template.
-page template itself,
@<Hi\TeX\ routines@>=
static void hfinish_page_group(void)
@@ -33896,20 +33790,20 @@ function |usage_help|.
static void usage_help(void)
{@+@<explain the command line@>@;
@<explain the options@>@;
- fprintf(stderr,"\nEmail bug reports to ruckert@@cs.hm.edu.\n");
+ fprintf(stdout,"\nFor further information and reporting bugs see https://hint.userweb.mwn.de/\n");
exit(0);
}
@ The command line commes in three slightly different versions:
@<explain the command line@>=
- fprintf(stderr,@/
+ fprintf(stdout,@/
"Usage: %s [OPTION]... [TEXNAME[.tex]] [COMMANDS]\n"@/
" or: %s [OPTION]... \\FIRST-LINE\n"@/
" or: %s [OPTION]... &FMT ARGS\n\n",@/
argv[0],argv[0],argv[0]);@/
- fprintf(stderr,@/
- " Run TeX on TEXNAME, creating TEXNAME.dvi.\n"@/
+ fprintf(stdout,@/
+ " Run HiTeX on TEXNAME, creating TEXNAME.hnt.\n"@/
" Any remaining COMMANDS are processed\n"@/
" as TeX input after TEXNAME is read.\n"@/
" If the first line of TEXNAME starts with %%&FMT, and FMT is\n"@/
@@ -33931,7 +33825,7 @@ static void usage_help(void)
@ Here is the list of possible options and their explanation:
@<explain the options@>=
- fprintf(stderr,
+ fprintf(stdout,
"Options:\n"@/
" -help "@/
@t\qquad@>"\t display this help and exit\n"@/
@@ -33939,8 +33833,8 @@ static void usage_help(void)
@t\qquad@>"\t output version information and exit\n"@/
" -etex "@/
@t\qquad@>"\t enable e-TeX extensions\n"@/
- " -prote "@/
- @t\qquad@>"\t enable prote extensions\n"@/
+ " -ltx "@/
+ @t\qquad@>"\t enable extensions required for LaTeX\n"@/
" -ini "@/
@t\qquad@>"\t be initex for dumping formats; this is\n"@/
@t\qquad@>"\t\t\t also true if the program name is `kinitex'\n"@/
@@ -33971,8 +33865,8 @@ static void usage_help(void)
@t\qquad@>"\t enable compression of section 1 and 2\n"@/
" [-no]-empty-page "@/
@t\qquad@>"\t Disable/Enable empty pages\n"@/
- " -hyphenate-first-word "@/
- @t\qquad@>"\t hyphenate the first word of a paragraph\n"@/
+ " -no-hyphenate-first-word "@/
+ @t\qquad@>"\t don't hyphenate the first word of a paragraph\n"@/
" -resolution=NUMBER "@/
@t\qquad@>"\t set the resolution to NUMBER dpi\n"@/
" -mfmode=MODE "@/
@@ -34003,12 +33897,12 @@ string variables are initialized with |NULL|.
@<Global...@>=
static int iniversion=0;
static int etexp=0;
-static int protep=0;
+static int ltxp=0;
static int parsefirstlinep=-1;
static int filelineerrorstylep=-1;
static const char *user_progname=NULL, *output_directory=NULL, *c_job_name=NULL;
static char *dump_name=NULL;@#
-int option_no_empty_page=true, option_hyphen_first=false;
+int option_no_empty_page=true, option_hyphen_first=true;
int option_dpi=600;
const char *option_mfmode="ljfour", *option_dpi_str="600";
extern int option_compress;
@@ -34028,7 +33922,7 @@ static struct option long_options[] = {@/
{ "cnf-line", 1, 0, 0 },@/
{ "ini", 0, &iniversion, 1 },@/
{ "etex", 0, &etexp, 1 },@/
- { "prote", 0, &protep, 1 },@/
+ { "ltx", 0, &ltxp, 1 },@/
{ "parse-first-line", 0, &parsefirstlinep, 1 },@/
{ "no-parse-first-line", 0, &parsefirstlinep, 0 },@/
{ "file-line-error", 0, &filelineerrorstylep, 1 },@/
@@ -34036,7 +33930,7 @@ static struct option long_options[] = {@/
{ "compress", 0, &option_compress, 1 },@/
{ "no-empty-page", 0, &option_no_empty_page, 1 },@/
{ "empty-page", 0, &option_no_empty_page, 0 },@/
- { "hyphenate-first-word", 0, &option_hyphen_first, 1 },@/
+ { "no-hyphenate-first-word", 0, &option_hyphen_first, 0 },@/
{ "resolution", 1, 0, 0 },@/
{ "mfmode", 1, 0, 0 },@/
#ifdef DEBUG
@@ -34058,6 +33952,10 @@ static void parse_options (int argc, char *argv[])
int g = getopt_long_only (argc, argv, "+", long_options, &option_index);
if (g==0)
{ @<handle the option at |option_index|@>@;@+ }
+ else if (g == '?')
+ { fprintf(stderr,"Try '%s --help' for more information\n",argv[0]);
+ exit(1);
+ }
else if (g == -1) return;
}
}
@@ -34081,10 +33979,15 @@ static int argument_is(struct option *opt, char * s)
#define ARGUMENT_IS(S) argument_is(long_options+option_index,S)
@ Now we can handle the first two options:
+
+@d HiTeX_version 1
+@d HiTeX_revision 0
+@d HiTeX_version_string "1.0"
+
@<handle the option at |option_index|@>=
if (ARGUMENT_IS("help")) usage_help();
else if (ARGUMENT_IS("version")){@+
- printf("Version 0.0\n");
+ printf("Version " HiTeX_version_string "\n");
exit(0);@+
}
@@ -34389,8 +34292,8 @@ if (etexp && !iniversion)
{ fprintf(stderr,"-etex requires -ini\n");
exit(1);
}
-if (protep && !etexp )
-{ fprintf(stderr,"-prote requires -etex\n");
+if (ltxp && !etexp )
+{ fprintf(stderr,"-ltx requires -etex\n");
exit(1);
}
@@ -34862,14 +34765,12 @@ static int get_md5_sum(int s, int file)
the new engine returns a version number as an integer
extending the cases for |last_item|.
-@d HiTeX_version 1
-@d HiTeX_revision 0
@d HiTeX_version_code (eTeX_last_last_item_cmd_mod+7) /* \.{\\HiTeXversion} */
@d HiTeX_revision_code (eTeX_last_last_item_cmd_mod+8) /* \.{\\HiTeXrevision} */
@<Generate all \Prote\ primitives@>=
primitive("HiTeXversion", last_item, HiTeX_version_code);
-@!@:Hi\TeX\_version\_}{\.{\\HiTeXversion} primitive@>
+@!@:HiTeX\_version\_}{\.{\\HiTeXversion} primitive@>
primitive("HiTeXrevision", last_item, HiTeX_revision_code);
@!@:HiTeX\_revision\_}{\.{\\HiTeXrevision} primitive@>
diff --git a/Build/source/texk/web2c/hitexdir/tests/hello.test b/Build/source/texk/web2c/hitexdir/tests/hello.test
index 6ab7dddb747..082c7ff0870 100755
--- a/Build/source/texk/web2c/hitexdir/tests/hello.test
+++ b/Build/source/texk/web2c/hitexdir/tests/hello.test
@@ -20,13 +20,13 @@ OUTDIR=./hitexdir/tests/outdir; mkdir $OUTDIR
./hitex -ini -interaction=nonstopmode -output-directory=$OUTDIR hello.tex \
|| exit $?
-./histretch -n $OUTDIR/hello.hnt || exit $?
+./histretch $OUTDIR/hello.hnt || exit $?
-if grep "<section 3 '../../../texk/web2c/tests/cmr10.tfm'>" \
- $OUTDIR/hello.HINT >/dev/null; then
+if grep "<section 3 .*cmr10.tfm'>" \
+ $OUTDIR/hello.hint >/dev/null; then
: # OK
else
- echo "hello.HINT does not contain the proper <section with" \
+ echo "hello.hint does not contain the proper <section with" \
" cmr10.tfm, goodbye." >&2
exit 1
fi
diff --git a/Build/source/texk/web2c/hitexdir/tests/rule.test b/Build/source/texk/web2c/hitexdir/tests/rule.test
index 989ca1bf100..9ae94c86631 100755
--- a/Build/source/texk/web2c/hitexdir/tests/rule.test
+++ b/Build/source/texk/web2c/hitexdir/tests/rule.test
@@ -12,20 +12,20 @@ OUTDIR=./hitexdir/tests/outdir; mkdir $OUTDIR
./hitex -ini --interaction=nonstopmode -output-directory=$OUTDIR rule.tex \
|| exit $?
./histretch $OUTDIR/rule.hnt || exit $?
-./hishrink -o $OUTDIR/rule.out.hnt $OUTDIR/rule.HINT || exit $?
+./hishrink -o $OUTDIR/rule.out.hnt $OUTDIR/rule.hint || exit $?
./histretch $OUTDIR/rule.out.hnt || exit $?
-if grep "<rule 0x48.451Ept 1pt 0x1C.73E7pt>" $OUTDIR/rule.HINT >/dev/null; then
+if grep "<rule 0x48.451Ept 1pt 0x1C.73E7pt>" $OUTDIR/rule.hint >/dev/null; then
: # OK
else
- echo "rule.HINT does not contain the proper <rule, goodbye." >&2
+ echo "rule.hint does not contain the proper <rule, goodbye." >&2
exit 1
fi
-if diff $OUTDIR/rule.out.HINT $OUTDIR/rule.HINT; then # -w?
+if diff $OUTDIR/rule.out.hint $OUTDIR/rule.hint; then # -w?
: # OK
else
- echo "rule.out.HINT and rule.HINT differ, goodbye." >&2
+ echo "rule.out.hint and rule.hint differ, goodbye." >&2
exit 1
fi
diff --git a/Build/source/texk/web2c/hitexdir/tex/ifhitex.tex b/Build/source/texk/web2c/hitexdir/tex/ifhitex.tex
new file mode 100644
index 00000000000..5793a0adb31
--- /dev/null
+++ b/Build/source/texk/web2c/hitexdir/tex/ifhitex.tex
@@ -0,0 +1,7 @@
+% How to test for the HiTeX engine
+\newif\ifHiTeX
+\expandafter\ifx\csname HiTeXversion\endcsname\relax
+ \HiTeXfalse
+\else
+ \HiTeXtrue
+\fi