texlive[61152] Build/source/texk/web2c/hitexdir: making the programs
commits+mruckert at tug.org
commits+mruckert at tug.org
Thu Nov 25 15:10:20 CET 2021
Revision: 61152
http://tug.org/svn/texlive?view=revision&revision=61152
Author: mruckert
Date: 2021-11-25 15:10:20 +0100 (Thu, 25 Nov 2021)
Log Message:
-----------
making the programs hishrink and histretch match the man pages
Modified Paths:
--------------
trunk/Build/source/texk/web2c/hitexdir/hiformat.w
trunk/Build/source/texk/web2c/hitexdir/hilexer.c
trunk/Build/source/texk/web2c/hitexdir/hilexer.l
trunk/Build/source/texk/web2c/hitexdir/hiparser.c
trunk/Build/source/texk/web2c/hitexdir/hiparser.h
trunk/Build/source/texk/web2c/hitexdir/hiparser.y
Modified: trunk/Build/source/texk/web2c/hitexdir/hiformat.w
===================================================================
--- trunk/Build/source/texk/web2c/hitexdir/hiformat.w 2021-11-25 14:09:09 UTC (rev 61151)
+++ trunk/Build/source/texk/web2c/hitexdir/hiformat.w 2021-11-25 14:10:20 UTC (rev 61152)
@@ -8572,14 +8572,22 @@
"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 @@
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 @@
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 @@
@<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 @@
@<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 @@
@<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[])
Modified: trunk/Build/source/texk/web2c/hitexdir/hilexer.c
===================================================================
--- trunk/Build/source/texk/web2c/hitexdir/hilexer.c 2021-11-25 14:09:09 UTC (rev 61151)
+++ trunk/Build/source/texk/web2c/hitexdir/hilexer.c 2021-11-25 14:10:20 UTC (rev 61152)
@@ -851,7 +851,7 @@
#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 @@
}
/*:61*/
int yywrap(void){
- #line 10269 "format.w"
+ #line 10284 "format.w"
return 1;}
#ifdef _MSC_VER
#pragma warning( disable : 4267)
Modified: trunk/Build/source/texk/web2c/hitexdir/hilexer.l
===================================================================
--- trunk/Build/source/texk/web2c/hitexdir/hilexer.l 2021-11-25 14:09:09 UTC (rev 61151)
+++ trunk/Build/source/texk/web2c/hitexdir/hilexer.l 2021-11-25 14:10:20 UTC (rev 61152)
@@ -1,6 +1,6 @@
/*511:*/
%{
- #line 10258 "format.w"
+ #line 10273 "format.w"
#include "hibasetypes.h"
#include "hierror.h"
@@ -136,7 +136,7 @@
}
/*:61*/
int yywrap(void){
- #line 10269 "format.w"
+ #line 10284 "format.w"
return 1;}
#ifdef _MSC_VER
#pragma warning( disable : 4267)
Modified: trunk/Build/source/texk/web2c/hitexdir/hiparser.c
===================================================================
--- trunk/Build/source/texk/web2c/hitexdir/hiparser.c 2021-11-25 14:09:09 UTC (rev 61151)
+++ trunk/Build/source/texk/web2c/hitexdir/hiparser.c 2021-11-25 14:10:20 UTC (rev 61152)
@@ -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 @@
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;
}
Modified: trunk/Build/source/texk/web2c/hitexdir/hiparser.h
===================================================================
--- trunk/Build/source/texk/web2c/hitexdir/hiparser.h 2021-11-25 14:09:09 UTC (rev 61151)
+++ trunk/Build/source/texk/web2c/hitexdir/hiparser.h 2021-11-25 14:10:20 UTC (rev 61152)
@@ -147,7 +147,7 @@
{
#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;
Modified: trunk/Build/source/texk/web2c/hitexdir/hiparser.y
===================================================================
--- trunk/Build/source/texk/web2c/hitexdir/hiparser.y 2021-11-25 14:09:09 UTC (rev 61151)
+++ trunk/Build/source/texk/web2c/hitexdir/hiparser.y 2021-11-25 14:10:20 UTC (rev 61152)
@@ -1,6 +1,6 @@
/*512:*/
%{
- #line 10299 "format.w"
+ #line 10314 "format.w"
#include "hibasetypes.h"
#include <string.h>
@@ -63,7 +63,7 @@
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 @@
%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;
More information about the tex-live-commits
mailing list.