summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorMartin Ruckert <martin.ruckert@hm.edu>2021-11-25 14:10:20 +0000
committerMartin Ruckert <martin.ruckert@hm.edu>2021-11-25 14:10:20 +0000
commit9bb1d536b006d4a9e16a0eae95d0797e9e5926a0 (patch)
tree959afdd586f8731d17d1af9e28564cdfc39fe396 /Build
parent44ef5de2a9fc14c12486aabd3e1d50dd7cc85e97 (diff)
making the programs hishrink and histretch match the man pages
git-svn-id: svn://tug.org/texlive/trunk@61152 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/web2c/hitexdir/hiformat.w32
-rw-r--r--Build/source/texk/web2c/hitexdir/hilexer.c4
-rw-r--r--Build/source/texk/web2c/hitexdir/hilexer.l4
-rw-r--r--Build/source/texk/web2c/hitexdir/hiparser.c4
-rw-r--r--Build/source/texk/web2c/hitexdir/hiparser.h2
-rw-r--r--Build/source/texk/web2c/hitexdir/hiparser.y6
6 files changed, 35 insertions, 17 deletions
diff --git a/Build/source/texk/web2c/hitexdir/hiformat.w b/Build/source/texk/web2c/hitexdir/hiformat.w
index 138b25d76be..05bd04baa51 100644
--- a/Build/source/texk/web2c/hitexdir/hiformat.w
+++ b/Build/source/texk/web2c/hitexdir/hiformat.w
@@ -8572,14 +8572,22 @@ It tells us what to expect in the rest of this section.
"Options:\n"@/
"\t --help \t display this message\n"@/
"\t --version\t display the HINT version\n"@/
+ "\t -l \t redirect stderr to a log file\n"@/
+#if defined (STRETCH) || defined (SHRINK)
"\t -o file\t specify an output file name\n"@/
+#endif
+#if defined (STRETCH)
"\t -a \t write auxiliary files\n"@/
- "\t -g \t use global names of auxiliary files (implies -a)\n"@/
+ "\t -g \t do not use localized names (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");@/
+#elif defined (SHRINK)
+ "\t -a \t use only localized names\n"@/
+ "\t -g \t do not use localized names\n"@/
+ "\t -c \t enable compression\n"@/
+#endif
+);
#ifdef DEBUG
fprintf(stdout,"\t -d XXXX \t set debug flag to hexadecimal value XXXX.\n"
"\t\t\t OR together these values:\n");@/
@@ -8653,9 +8661,11 @@ Next are the variables that are local in the |main| program.
char *prog_name;
char *in_ext;
char *out_ext;
+int option_log=false;
+#ifndef SKIP
char *file_name=NULL;
int file_name_length=0;
-int option_log=false;
+#endif
@
Processing the command line looks for options and then sets the
@@ -8687,17 +8697,22 @@ are supported in addition to the short options.
fprintf(stdout,"\nFor further information and reporting bugs see https://hint.userweb.mwn.de/\n");
exit(0);
}
+ case 'l': option_log=true; @+break;
+#if defined (STRETCH) || defined (SHRINK)
case 'o': argv++;
file_name_length=(int)strlen(*argv);
ALLOCATE(file_name,file_name_length+6,char); /*plus extension*/
strcpy(file_name,*argv);@+ break;
- case 'l': option_log=true; @+break;
+ case 'g': option_global=option_aux=true; @+break;
+ case 'a': option_aux=true; @+break;
+#endif
+#if defined (STRETCH)
case 'u': option_utf8=true;@+break;
case 'x': option_hex=true;@+break;
case 'f': option_force=true; @+break;
- case 'g': option_global=option_aux=true; @+break;
- case 'a': option_aux=true; @+break;
+#elif defined (SHRINK)
case 'c': option_compress=true; @+break;
+#endif
case 'd': @/
argv++; if (*argv==NULL)
{ fprintf(stderr,
@@ -10373,6 +10388,7 @@ extern int yyparse(void);
@<function to write the banner@>@;
@<put functions@>@;
+#define SHRINK
#define DESCRIPTION "\nShrinking converts a 'long' ASCII HINT file into a`short' binary HINT file .\n"
int main(int argc, char *argv[])
@@ -10447,6 +10463,7 @@ format into a \HINT\ file in long format.
@<shared get functions@>@;
@<get functions@>@;
+#define STRETCH
#define DESCRIPTION "\nStretching converts a `short' binary HINT file into a 'long' ASCII HINT file.\n"
int main(int argc, char *argv[])
@@ -10527,6 +10544,7 @@ backwards.
@<shared skip functions@>@;
@<skip functions@>@;
+#define SKIP
#define DESCRIPTION "\n This program tests parsing a binary HINT file in reverse direction.\n"
int main(int argc, char *argv[])
diff --git a/Build/source/texk/web2c/hitexdir/hilexer.c b/Build/source/texk/web2c/hitexdir/hilexer.c
index 949adf83370..4fc33f2156e 100644
--- a/Build/source/texk/web2c/hitexdir/hilexer.c
+++ b/Build/source/texk/web2c/hitexdir/hilexer.c
@@ -851,7 +851,7 @@ char *yytext;
#line 1 "lexer.l"
/*511:*/
#line 3 "lexer.l"
- #line 10258 "format.w"
+ #line 10273 "format.w"
#include "hibasetypes.h"
#include "hierror.h"
@@ -987,7 +987,7 @@ float64_t xtof(char*x)
}
/*:61*/
int yywrap(void){
- #line 10269 "format.w"
+ #line 10284 "format.w"
return 1;}
#ifdef _MSC_VER
#pragma warning( disable : 4267)
diff --git a/Build/source/texk/web2c/hitexdir/hilexer.l b/Build/source/texk/web2c/hitexdir/hilexer.l
index d959a4d0171..c6334a9b9e0 100644
--- a/Build/source/texk/web2c/hitexdir/hilexer.l
+++ b/Build/source/texk/web2c/hitexdir/hilexer.l
@@ -1,6 +1,6 @@
/*511:*/
%{
- #line 10258 "format.w"
+ #line 10273 "format.w"
#include "hibasetypes.h"
#include "hierror.h"
@@ -136,7 +136,7 @@ float64_t xtof(char*x)
}
/*:61*/
int yywrap(void){
- #line 10269 "format.w"
+ #line 10284 "format.w"
return 1;}
#ifdef _MSC_VER
#pragma warning( disable : 4267)
diff --git a/Build/source/texk/web2c/hitexdir/hiparser.c b/Build/source/texk/web2c/hitexdir/hiparser.c
index 06e9a9caae0..51e57115117 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 10299 "format.w"
+ #line 10314 "format.w"
#include "hibasetypes.h"
#include <string.h>
@@ -132,7 +132,7 @@ void check_param_def(ref_t*df)
extern int yylineno;
int yyerror(const char*msg)
{
- #line 8886 "format.w"
+ #line 8901 "format.w"
QUIT(" in line %d %s",yylineno,msg);
return 0;
}
diff --git a/Build/source/texk/web2c/hitexdir/hiparser.h b/Build/source/texk/web2c/hitexdir/hiparser.h
index 4d0ce411f77..4ab634ab407 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 10324 "format.w"
+ #line 10339 "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 37c4b31b8b5..707bc9287f4 100644
--- a/Build/source/texk/web2c/hitexdir/hiparser.y
+++ b/Build/source/texk/web2c/hitexdir/hiparser.y
@@ -1,6 +1,6 @@
/*512:*/
%{
- #line 10299 "format.w"
+ #line 10314 "format.w"
#include "hibasetypes.h"
#include <string.h>
@@ -63,7 +63,7 @@ void check_param_def(ref_t*df)
extern int yylineno;
int yyerror(const char*msg)
{
- #line 8886 "format.w"
+ #line 8901 "format.w"
QUIT(" in line %d %s",yylineno,msg);
return 0;
}
@@ -77,7 +77,7 @@ int yyerror(const char*msg)
%union {
- #line 10324 "format.w"
+ #line 10339 "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;