texlive[65166] Build/source/texk/web2c/hitexdir: hitex: adapting
commits+mruckert at tug.org
commits+mruckert at tug.org
Fri Dec 2 16:52:52 CET 2022
Revision: 65166
http://tug.org/svn/texlive?view=revision&revision=65166
Author: mruckert
Date: 2022-12-02 16:52:51 +0100 (Fri, 02 Dec 2022)
Log Message:
-----------
hitex: adapting banner and -version info to TL standards
Modified Paths:
--------------
trunk/Build/source/texk/web2c/hitexdir/doc/hiformat.hnt
trunk/Build/source/texk/web2c/hitexdir/doc/hiformat.pdf
trunk/Build/source/texk/web2c/hitexdir/hiformat.w
trunk/Build/source/texk/web2c/hitexdir/hilexer.c
trunk/Build/source/texk/web2c/hitexdir/hiparser.c
trunk/Build/source/texk/web2c/hitexdir/hiparser.h
trunk/Build/source/texk/web2c/hitexdir/hitex.w
Modified: trunk/Build/source/texk/web2c/hitexdir/doc/hiformat.hnt
===================================================================
(Binary files differ)
Modified: trunk/Build/source/texk/web2c/hitexdir/doc/hiformat.pdf
===================================================================
(Binary files differ)
Modified: trunk/Build/source/texk/web2c/hitexdir/hiformat.w
===================================================================
--- trunk/Build/source/texk/web2c/hitexdir/hiformat.w 2022-12-02 15:51:09 UTC (rev 65165)
+++ trunk/Build/source/texk/web2c/hitexdir/hiformat.w 2022-12-02 15:52:51 UTC (rev 65166)
@@ -6720,7 +6720,7 @@
{ MESSAGE("Wrong HINT subversion: got %d, expected %d\n",v,HINT_SUB_VERSION); return false; }
if (*t!=' ' && *t!='\n')
{ MESSAGE("Space expected in banner after HINT subversion\n"); return false; }
- LOG("%s file version %d.%d:%s",magic,HINT_VERSION, HINT_SUB_VERSION, t);
+ LOG("%s file version " HINT_VERSION_STRING ":%s", magic, t);
DBG(DBGDIR,"banner size=0x%x\n",hbanner_size);
return true;
}
@@ -6766,7 +6766,7 @@
@<function to write the banner@>=
static size_t hput_banner(char *magic, char *str)
-{ size_t s=fprintf(hout,"%s %d.%d %s\n",magic,HINT_VERSION,HINT_SUB_VERSION,str);
+{ size_t s=fprintf(hout,"%s " HINT_VERSION_STRING " %s\n",magic,str);
if (s>MAX_BANNER) QUIT("Banner too big");
return s;
}
@@ -9140,7 +9140,7 @@
switch(option)
{ case '-':
if (strcmp(*argv,"--version")==0)
- { fprintf(stderr,"%s version %d.%d\n",prog_name, HINT_VERSION, HINT_SUB_VERSION);
+ { fprintf(stderr,"%s version " HINT_VERSION_STRING "\n",prog_name);
exit(0);
}
else if (strcmp(*argv,"--help")==0)
@@ -10456,6 +10456,9 @@
#endif
#define HINT_VERSION 1
#define HINT_SUB_VERSION 4
+#define AS_STR(X) #X
+#define VERSION_AS_STR(X,Y) AS_STR(X) "." AS_STR(Y)
+#define HINT_VERSION_STRING VERSION_AS_STR(HINT_VERSION, HINT_SUB_VERSION)
#endif
@
Modified: trunk/Build/source/texk/web2c/hitexdir/hilexer.c
===================================================================
--- trunk/Build/source/texk/web2c/hitexdir/hilexer.c 2022-12-02 15:51:09 UTC (rev 65165)
+++ trunk/Build/source/texk/web2c/hitexdir/hilexer.c 2022-12-02 15:52:51 UTC (rev 65166)
@@ -856,7 +856,7 @@
#line 1 "lexer.l"
/*519:*/
#line 3 "lexer.l"
- #line 10736 "format.w"
+ #line 10739 "format.w"
#include "hibasetypes.h"
#include "hierror.h"
@@ -992,7 +992,7 @@
}
/*:61*/
int yywrap(void){
- #line 10747 "format.w"
+ #line 10750 "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 2022-12-02 15:51:09 UTC (rev 65165)
+++ trunk/Build/source/texk/web2c/hitexdir/hiparser.c 2022-12-02 15:52:51 UTC (rev 65166)
@@ -69,7 +69,7 @@
/* First part of user prologue. */
#line 2 "parser.y"
- #line 10777 "format.w"
+ #line 10780 "format.w"
#include "hibasetypes.h"
#include <string.h>
Modified: trunk/Build/source/texk/web2c/hitexdir/hiparser.h
===================================================================
--- trunk/Build/source/texk/web2c/hitexdir/hiparser.h 2022-12-02 15:51:09 UTC (rev 65165)
+++ trunk/Build/source/texk/web2c/hitexdir/hiparser.h 2022-12-02 15:52:51 UTC (rev 65166)
@@ -149,7 +149,7 @@
{
#line 79 "parser.y"
- #line 10802 "format.w"
+ #line 10805 "format.w"
uint32_t u; int32_t i; char *s; float64_t f; Glyph c;
Dimen d;Stretch st;Xdimen xd;Kern kt;
Rule r;Glue g;Image x;
Modified: trunk/Build/source/texk/web2c/hitexdir/hitex.w
===================================================================
--- trunk/Build/source/texk/web2c/hitexdir/hitex.w 2022-12-02 15:51:09 UTC (rev 65165)
+++ trunk/Build/source/texk/web2c/hitexdir/hitex.w 2022-12-02 15:52:51 UTC (rev 65166)
@@ -365,10 +365,9 @@
@d Prote_banner "This is Prote, Version " Prote_version_string
/*printed when \Prote\ starts*/
@#
- at d QUOTE(X) #X
- at d HINT_VER_STR(X,Y) "HINT version " QUOTE(X) "." QUOTE(Y)
- at d banner "This is HiTeX, Version 3.141592653, " HINT_VER_STR(HINT_VERSION,HINT_SUB_VERSION)
- /*printed when \TeX\ starts*/
+ at d banner "This is HiTeX, Version 3.141592653"
+ eTeX_version_string"-"HINT_VERSION_STRING" "TL_VERSION
+ /*printed when \TeX\ starts*/
@ Different \PASCAL s have slightly different conventions, and the present
@!@:PASCAL H}{\ph@>
@@ -34088,7 +34087,17 @@
Some code for \TeX\ Live must come before
the definition of \TeX's macros because
it uses include files containing identifiers that are in conflict
-with \TeX's macros. The remaining two parts are first auxiliary functions and then
+with \TeX's macros or modify these macros. For example
+\TeX's |banner| is modified by adding the \TeX\ Live version.
+
+@<Header files and function declarations@>=
+#ifdef WEB2CVERSION
+#define TL_VERSION "(TeX Live "WEB2CVERSION")"
+#else
+#define TL_VERSION
+#endif
+
+@ The remaining two parts are first auxiliary functions and then
those functions that are called from the ``classic'' \TeX\ code.
@p @<\TeX\ Live auxiliary functions@>@;
@@ -34357,7 +34366,7 @@
if (ARGUMENT_IS("help")) usage_help();
else if (ARGUMENT_IS("version")){@+
printf(banner@, "\n"@/
- "eTeX version "@, eTeX_version_string@, "\n"@/
+ "HINT version "@,HINT_VERSION_STRING@,"\n"@/
"Prote version "@, Prote_version_string@, "\n");
exit(0);@+
}
More information about the tex-live-commits
mailing list.