texlive[60175] Build/source/texk/web2c/otps: otps: apply patch from

commits+hironobu at tug.org commits+hironobu at tug.org
Fri Aug 6 16:04:43 CEST 2021


Revision: 60175
          http://tug.org/svn/texlive?view=revision&revision=60175
Author:   hironobu
Date:     2021-08-06 16:04:42 +0200 (Fri, 06 Aug 2021)
Log Message:
-----------
otps: apply patch from W32TeX to avoid MSVC compiler error

Modified Paths:
--------------
    trunk/Build/source/texk/web2c/otps/ChangeLog
    trunk/Build/source/texk/web2c/otps/otp-lexer.c
    trunk/Build/source/texk/web2c/otps/otp-lexer.l
    trunk/Build/source/texk/web2c/otps/otp-parser.c
    trunk/Build/source/texk/web2c/otps/otp-parser.h
    trunk/Build/source/texk/web2c/otps/otp-parser.y

Modified: trunk/Build/source/texk/web2c/otps/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/otps/ChangeLog	2021-08-05 23:47:28 UTC (rev 60174)
+++ trunk/Build/source/texk/web2c/otps/ChangeLog	2021-08-06 14:04:42 UTC (rev 60175)
@@ -1,3 +1,11 @@
+2021-08-06  Hironobu Yamashita  <h.y.acetaminophen at gmail.com>
+
+	* Avoid MSVC compiler errors (adapted from W32TeX patch).
+	- otp-parser.c(118) : error C2365: 'INPUT' :
+	  redefinition; previous definition was 'Typedef'
+	- otp-parser.c(118) : error C2086: 'yytokentype INPUT' :
+	  redefinition
+
 2015-07-07  Peter Breitenlohner  <peb at mppmu.mpg.de>
 
 	* Makefile.am: Better dependencies for 'make check'.

Modified: trunk/Build/source/texk/web2c/otps/otp-lexer.c
===================================================================
--- trunk/Build/source/texk/web2c/otps/otp-lexer.c	2021-08-05 23:47:28 UTC (rev 60174)
+++ trunk/Build/source/texk/web2c/otps/otp-lexer.c	2021-08-06 14:04:42 UTC (rev 60175)
@@ -1004,7 +1004,7 @@
 case 12:
 YY_RULE_SETUP
 #line 123 "../../../../texk/web2c/otps/otp-lexer.l"
-return(INPUT);
+return(MYINPUT);
 	YY_BREAK
 case 13:
 YY_RULE_SETUP

Modified: trunk/Build/source/texk/web2c/otps/otp-lexer.l
===================================================================
--- trunk/Build/source/texk/web2c/otps/otp-lexer.l	2021-08-05 23:47:28 UTC (rev 60174)
+++ trunk/Build/source/texk/web2c/otps/otp-lexer.l	2021-08-06 14:04:42 UTC (rev 60175)
@@ -120,7 +120,7 @@
 		}
 =>		return(RIGHTARROW);
 "<"=		return(LEFTARROW);
-input:		return(INPUT);
+input:		return(MYINPUT);
 output:		return(OUTPUT);
 aliases:	return(ALIASES);
 states:		return(STATES);

Modified: trunk/Build/source/texk/web2c/otps/otp-parser.c
===================================================================
--- trunk/Build/source/texk/web2c/otps/otp-parser.c	2021-08-05 23:47:28 UTC (rev 60174)
+++ trunk/Build/source/texk/web2c/otps/otp-parser.c	2021-08-06 14:04:42 UTC (rev 60175)
@@ -115,7 +115,7 @@
     STRING = 260,
     LEFTARROW = 261,
     RIGHTARROW = 262,
-    INPUT = 263,
+    MYINPUT = 263,
     OUTPUT = 264,
     ALIASES = 265,
     STATES = 266,
@@ -135,7 +135,7 @@
 #define STRING 260
 #define LEFTARROW 261
 #define RIGHTARROW 262
-#define INPUT 263
+#define MYINPUT 263
 #define OUTPUT 264
 #define ALIASES 265
 #define STATES 266
@@ -481,7 +481,7 @@
 static const char *const yytname[] =
 {
   "$end", "error", "$undefined", "NUMBER", "ID", "STRING", "LEFTARROW",
-  "RIGHTARROW", "INPUT", "OUTPUT", "ALIASES", "STATES", "TABLES",
+  "RIGHTARROW", "MYINPUT", "OUTPUT", "ALIASES", "STATES", "TABLES",
   "EXPRESSIONS", "PUSH", "POP", "DIV", "MOD", "BEG", "END", "'+'", "'-'",
   "'*'", "';'", "'['", "']'", "'='", "'{'", "'}'", "','", "'<'", "'>'",
   "'.'", "'^'", "'('", "')'", "'|'", "'\\\\'", "'$'", "'#'", "$accept",

Modified: trunk/Build/source/texk/web2c/otps/otp-parser.h
===================================================================
--- trunk/Build/source/texk/web2c/otps/otp-parser.h	2021-08-05 23:47:28 UTC (rev 60174)
+++ trunk/Build/source/texk/web2c/otps/otp-parser.h	2021-08-06 14:04:42 UTC (rev 60175)
@@ -50,7 +50,7 @@
     STRING = 260,
     LEFTARROW = 261,
     RIGHTARROW = 262,
-    INPUT = 263,
+    MYINPUT = 263,
     OUTPUT = 264,
     ALIASES = 265,
     STATES = 266,
@@ -70,7 +70,7 @@
 #define STRING 260
 #define LEFTARROW 261
 #define RIGHTARROW 262
-#define INPUT 263
+#define MYINPUT 263
 #define OUTPUT 264
 #define ALIASES 265
 #define STATES 266

Modified: trunk/Build/source/texk/web2c/otps/otp-parser.y
===================================================================
--- trunk/Build/source/texk/web2c/otps/otp-parser.y	2021-08-05 23:47:28 UTC (rev 60174)
+++ trunk/Build/source/texk/web2c/otps/otp-parser.y	2021-08-06 14:04:42 UTC (rev 60175)
@@ -40,7 +40,7 @@
 %token STRING
 %token LEFTARROW
 %token RIGHTARROW
-%token INPUT
+%token MYINPUT
 %token OUTPUT
 %token ALIASES
 %token STATES
@@ -70,7 +70,7 @@
 Input :
 	/* Empty */
 	{ input_bytes=2; }
-    |	INPUT NUMBER ';'
+    |	MYINPUT NUMBER ';'
 	{ input_bytes=$2.yint; }
     ;
 



More information about the tex-live-commits mailing list.