summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2009-06-18 10:03:38 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2009-06-18 10:03:38 +0000
commit5bcf1990f4d5d2498d15ce7006a2aff6bdfa7081 (patch)
tree300036578e0a02acc7cd79be6df331d43a4eaa7c /Build/source/texk/web2c
parent611243024d58336edbf2e252f8536f1513e0d5b5 (diff)
enable compiler warnings
git-svn-id: svn://tug.org/texlive/trunk@13810 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c')
-rw-r--r--Build/source/texk/web2c/otps/ChangeLog11
-rw-r--r--Build/source/texk/web2c/otps/Makefile.am1
-rw-r--r--Build/source/texk/web2c/otps/Makefile.in1
-rw-r--r--Build/source/texk/web2c/otps/otp-lexer.c66
-rw-r--r--Build/source/texk/web2c/otps/otp-lexer.l6
-rw-r--r--Build/source/texk/web2c/otps/otp-parser.c155
-rw-r--r--Build/source/texk/web2c/otps/otp-parser.y3
-rw-r--r--Build/source/texk/web2c/otps/otp2ocp.c16
-rw-r--r--Build/source/texk/web2c/otps/outocp.c16
-rw-r--r--Build/source/texk/web2c/otps/routines.c68
-rw-r--r--Build/source/texk/web2c/otps/routines.h80
11 files changed, 211 insertions, 212 deletions
diff --git a/Build/source/texk/web2c/otps/ChangeLog b/Build/source/texk/web2c/otps/ChangeLog
index 249d89de62b..f7cfc750a25 100644
--- a/Build/source/texk/web2c/otps/ChangeLog
+++ b/Build/source/texk/web2c/otps/ChangeLog
@@ -1,7 +1,14 @@
+2009-06-17 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * Makefile.am (AM_CFLAGS): enable compiler warnings.
+ * Use ANSI C prototypes for functions.
+ * otp-parser.y (yyerror): declare as static.
+ * otp2ocp.c (output, otp_read): declare as static.
+ * outocp.c (ctp_get, ctp_read, ctp_explain): declare as static.
+
2009-06-16 Peter Breitenlohner <peb@mppmu.mpg.de>
- * otp-lexer.l (yywrap): define as static function.
- * Makefile.am: no more need for $(LEXLIB).
+ * Makefile.am: otp2ocp.c provides yywrap, no need for $(LEXLIB).
2008-01-29 Peter Breitenlohner <peb@mppmu.mpg.de>
diff --git a/Build/source/texk/web2c/otps/Makefile.am b/Build/source/texk/web2c/otps/Makefile.am
index 9629e5b1c22..4fbb75903e2 100644
--- a/Build/source/texk/web2c/otps/Makefile.am
+++ b/Build/source/texk/web2c/otps/Makefile.am
@@ -4,6 +4,7 @@
## You may freely use, modify and/or distribute this file.
##
INCLUDES = -I$(top_builddir)/.. -I$(top_srcdir) $(KPATHSEA_INCLUDES)
+AM_CFLAGS = $(WARNING_CFLAGS)
AM_YFLAGS = -d -v
proglib = ../lib/lib.a
diff --git a/Build/source/texk/web2c/otps/Makefile.in b/Build/source/texk/web2c/otps/Makefile.in
index bd85265fe66..4fd7a95e43c 100644
--- a/Build/source/texk/web2c/otps/Makefile.in
+++ b/Build/source/texk/web2c/otps/Makefile.in
@@ -317,6 +317,7 @@ wlibs = @wlibs@
x_ext_lib = @x_ext_lib@
x_tool_libs = @x_tool_libs@
INCLUDES = -I$(top_builddir)/.. -I$(top_srcdir) $(KPATHSEA_INCLUDES)
+AM_CFLAGS = $(WARNING_CFLAGS)
AM_YFLAGS = -d -v
proglib = ../lib/lib.a
otps_programs = otp2ocp outocp
diff --git a/Build/source/texk/web2c/otps/otp-lexer.c b/Build/source/texk/web2c/otps/otp-lexer.c
index fbef4e283b8..0bbc4df5337 100644
--- a/Build/source/texk/web2c/otps/otp-lexer.c
+++ b/Build/source/texk/web2c/otps/otp-lexer.c
@@ -607,13 +607,7 @@ along with Omega; if not, write to the Free Software Foundation, Inc.,
int line_number = 1;
int i,j,last;
extern YYSTYPE yylval;
-
-static int
-yywrap (void)
-{
- return 1;
-}
-#line 617 "otp-lexer.c"
+#line 611 "otp-lexer.c"
#define INITIAL 0
@@ -795,9 +789,9 @@ YY_DECL
register char *yy_cp, *yy_bp;
register int yy_act;
-#line 50 "otp-lexer.l"
+#line 44 "otp-lexer.l"
-#line 801 "otp-lexer.c"
+#line 795 "otp-lexer.c"
if ( !(yy_init) )
{
@@ -901,24 +895,24 @@ do_action: /* This label is used only to access EOF actions. */
{ /* beginning of action switch */
case 1:
YY_RULE_SETUP
-#line 51 "otp-lexer.l"
+#line 45 "otp-lexer.l"
{}
YY_BREAK
case 2:
/* rule 2 can match eol */
YY_RULE_SETUP
-#line 52 "otp-lexer.l"
+#line 46 "otp-lexer.l"
{ line_number++;}
YY_BREAK
case 3:
/* rule 3 can match eol */
YY_RULE_SETUP
-#line 53 "otp-lexer.l"
+#line 47 "otp-lexer.l"
{ line_number++;}
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 54 "otp-lexer.l"
+#line 48 "otp-lexer.l"
{
yylval.yint=0;
for (i=2; i<yyleng; i++) {
@@ -941,7 +935,7 @@ YY_RULE_SETUP
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 73 "otp-lexer.l"
+#line 67 "otp-lexer.l"
{
yylval.yint=0;
for (i=2; i<yyleng; i++) {
@@ -958,7 +952,7 @@ YY_RULE_SETUP
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 86 "otp-lexer.l"
+#line 80 "otp-lexer.l"
{
yylval.yint=0;
for (i=0; i<yyleng; i++) {
@@ -975,7 +969,7 @@ YY_RULE_SETUP
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 99 "otp-lexer.l"
+#line 93 "otp-lexer.l"
{
yylval.yint=yytext[1];
return(NUMBER);
@@ -983,13 +977,13 @@ YY_RULE_SETUP
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 103 "otp-lexer.l"
+#line 97 "otp-lexer.l"
{ yylval.ystring=xstrdup(yytext); return(ID); }
YY_BREAK
case 9:
/* rule 9 can match eol */
YY_RULE_SETUP
-#line 104 "otp-lexer.l"
+#line 98 "otp-lexer.l"
{
char *newtext;
last=yyleng-2;
@@ -1008,85 +1002,85 @@ YY_RULE_SETUP
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 119 "otp-lexer.l"
+#line 113 "otp-lexer.l"
return(RIGHTARROW);
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 120 "otp-lexer.l"
+#line 114 "otp-lexer.l"
return(LEFTARROW);
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 121 "otp-lexer.l"
+#line 115 "otp-lexer.l"
return(INPUT);
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 122 "otp-lexer.l"
+#line 116 "otp-lexer.l"
return(OUTPUT);
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 123 "otp-lexer.l"
+#line 117 "otp-lexer.l"
return(ALIASES);
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 124 "otp-lexer.l"
+#line 118 "otp-lexer.l"
return(STATES);
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 125 "otp-lexer.l"
+#line 119 "otp-lexer.l"
return(TABLES);
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 126 "otp-lexer.l"
+#line 120 "otp-lexer.l"
return(EXPRESSIONS);
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 127 "otp-lexer.l"
+#line 121 "otp-lexer.l"
return(PUSH);
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 128 "otp-lexer.l"
+#line 122 "otp-lexer.l"
return(POP);
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 129 "otp-lexer.l"
+#line 123 "otp-lexer.l"
return(DIV);
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 130 "otp-lexer.l"
+#line 124 "otp-lexer.l"
return(MOD);
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 131 "otp-lexer.l"
+#line 125 "otp-lexer.l"
return(BEG);
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 132 "otp-lexer.l"
+#line 126 "otp-lexer.l"
return(END);
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 133 "otp-lexer.l"
+#line 127 "otp-lexer.l"
return(yytext[0]);
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 135 "otp-lexer.l"
+#line 129 "otp-lexer.l"
ECHO;
YY_BREAK
-#line 1090 "otp-lexer.c"
+#line 1084 "otp-lexer.c"
case YY_STATE_EOF(INITIAL):
yyterminate();
@@ -2070,7 +2064,7 @@ void yyfree (void * ptr )
#define YYTABLES_NAME "yytables"
-#line 135 "otp-lexer.l"
+#line 129 "otp-lexer.l"
diff --git a/Build/source/texk/web2c/otps/otp-lexer.l b/Build/source/texk/web2c/otps/otp-lexer.l
index 435d5aca9e4..32142af1ea7 100644
--- a/Build/source/texk/web2c/otps/otp-lexer.l
+++ b/Build/source/texk/web2c/otps/otp-lexer.l
@@ -32,12 +32,6 @@ along with Omega; if not, write to the Free Software Foundation, Inc.,
int line_number = 1;
int i,j,last;
extern YYSTYPE yylval;
-
-static int
-yywrap (void)
-{
- return 1;
-}
%}
diff --git a/Build/source/texk/web2c/otps/otp-parser.c b/Build/source/texk/web2c/otps/otp-parser.c
index 6ddb29a4a4a..d829f2ff019 100644
--- a/Build/source/texk/web2c/otps/otp-parser.c
+++ b/Build/source/texk/web2c/otps/otp-parser.c
@@ -75,14 +75,15 @@
#include "yystype.h"
int k, len;
-void yyerror(char * msg)
+static void
+yyerror(char * msg)
{
fprintf(stderr, "line %d: %s\n", line_number, msg);
}
/* Line 189 of yacc.c */
-#line 86 "otp-parser.c"
+#line 87 "otp-parser.c"
/* Enabling traces. */
#ifndef YYDEBUG
@@ -162,7 +163,7 @@ typedef int YYSTYPE;
/* Line 264 of yacc.c */
-#line 166 "otp-parser.c"
+#line 167 "otp-parser.c"
#ifdef short
# undef short
@@ -481,15 +482,15 @@ static const yytype_int8 yyrhs[] =
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 61, 61, 71, 72, 78, 79, 83, 85, 89,
- 90, 95, 94, 99, 101, 105, 107, 111, 113, 117,
- 119, 123, 125, 129, 130, 134, 139, 141, 143, 145,
- 147, 152, 154, 156, 158, 160, 162, 167, 169, 174,
- 189, 190, 195, 197, 199, 194, 204, 206, 211, 212,
- 217, 219, 225, 226, 232, 233, 238, 240, 244, 246,
- 250, 257, 259, 261, 263, 265, 270, 275, 280, 285,
- 290, 291, 293, 295, 297, 299, 302, 301, 308, 310,
- 312, 314, 316, 319, 321, 323, 325, 327
+ 0, 62, 62, 72, 73, 79, 80, 84, 86, 90,
+ 91, 96, 95, 100, 102, 106, 108, 112, 114, 118,
+ 120, 124, 126, 130, 131, 135, 140, 142, 144, 146,
+ 148, 153, 155, 157, 159, 161, 163, 168, 170, 175,
+ 190, 191, 196, 198, 200, 195, 205, 207, 212, 213,
+ 218, 220, 226, 227, 233, 234, 239, 241, 245, 247,
+ 251, 258, 260, 262, 264, 266, 271, 276, 281, 286,
+ 291, 292, 294, 296, 298, 300, 303, 302, 309, 311,
+ 313, 315, 317, 320, 322, 324, 326, 328
};
#endif
@@ -1502,168 +1503,168 @@ yyreduce:
case 3:
/* Line 1455 of yacc.c */
-#line 71 "otp-parser.y"
+#line 72 "otp-parser.y"
{ input_bytes=2; }
break;
case 4:
/* Line 1455 of yacc.c */
-#line 73 "otp-parser.y"
+#line 74 "otp-parser.y"
{ input_bytes=(yyvsp[(2) - (3)]).yint; }
break;
case 5:
/* Line 1455 of yacc.c */
-#line 78 "otp-parser.y"
+#line 79 "otp-parser.y"
{ output_bytes=2; }
break;
case 6:
/* Line 1455 of yacc.c */
-#line 80 "otp-parser.y"
+#line 81 "otp-parser.y"
{ output_bytes=(yyvsp[(2) - (3)]).yint; }
break;
case 11:
/* Line 1455 of yacc.c */
-#line 95 "otp-parser.y"
+#line 96 "otp-parser.y"
{ store_table((yyvsp[(1) - (4)]).ystring, (yyvsp[(3) - (4)]).yint); }
break;
case 15:
/* Line 1455 of yacc.c */
-#line 106 "otp-parser.y"
+#line 107 "otp-parser.y"
{ add_to_table((yyvsp[(1) - (1)]).yint); }
break;
case 16:
/* Line 1455 of yacc.c */
-#line 108 "otp-parser.y"
+#line 109 "otp-parser.y"
{ add_to_table((yyvsp[(3) - (3)]).yint); }
break;
case 19:
/* Line 1455 of yacc.c */
-#line 118 "otp-parser.y"
+#line 119 "otp-parser.y"
{ store_state((yyvsp[(1) - (1)]).ystring); }
break;
case 20:
/* Line 1455 of yacc.c */
-#line 120 "otp-parser.y"
+#line 121 "otp-parser.y"
{ store_state((yyvsp[(3) - (3)]).ystring); }
break;
case 25:
/* Line 1455 of yacc.c */
-#line 135 "otp-parser.y"
+#line 136 "otp-parser.y"
{ store_alias((yyvsp[(1) - (4)]).ystring, (yyvsp[(3) - (4)]).yleft); }
break;
case 26:
/* Line 1455 of yacc.c */
-#line 140 "otp-parser.y"
+#line 141 "otp-parser.y"
{ (yyval).yleft = StringLeft((yyvsp[(1) - (1)]).ystring); }
break;
case 27:
/* Line 1455 of yacc.c */
-#line 142 "otp-parser.y"
+#line 143 "otp-parser.y"
{ (yyval).yleft = CompleteLeft((yyvsp[(1) - (6)]).yleft, (yyvsp[(3) - (6)]).yint, (yyvsp[(5) - (6)]).yint); }
break;
case 28:
/* Line 1455 of yacc.c */
-#line 144 "otp-parser.y"
+#line 145 "otp-parser.y"
{ (yyval).yleft = PlusLeft((yyvsp[(1) - (5)]).yleft, (yyvsp[(3) - (5)]).yint); }
break;
case 29:
/* Line 1455 of yacc.c */
-#line 146 "otp-parser.y"
+#line 147 "otp-parser.y"
{ (yyval).yleft = CompleteLeft((yyvsp[(1) - (4)]).yleft, (yyvsp[(3) - (4)]).yint, (yyvsp[(3) - (4)]).yint); }
break;
case 30:
/* Line 1455 of yacc.c */
-#line 148 "otp-parser.y"
+#line 149 "otp-parser.y"
{ (yyval).yleft = (yyvsp[(1) - (1)]).yleft; }
break;
case 31:
/* Line 1455 of yacc.c */
-#line 153 "otp-parser.y"
+#line 154 "otp-parser.y"
{ (yyval).yleft = SingleLeft((yyvsp[(1) - (1)]).yint); }
break;
case 32:
/* Line 1455 of yacc.c */
-#line 155 "otp-parser.y"
+#line 156 "otp-parser.y"
{ (yyval).yleft = DoubleLeft((yyvsp[(1) - (3)]).yint, (yyvsp[(3) - (3)]).yint); }
break;
case 33:
/* Line 1455 of yacc.c */
-#line 157 "otp-parser.y"
+#line 158 "otp-parser.y"
{ (yyval).yleft = WildCard(); }
break;
case 34:
/* Line 1455 of yacc.c */
-#line 159 "otp-parser.y"
+#line 160 "otp-parser.y"
{ (yyval).yleft = NotChoiceLeft((yyvsp[(3) - (4)]).ylleft); }
break;
case 35:
/* Line 1455 of yacc.c */
-#line 161 "otp-parser.y"
+#line 162 "otp-parser.y"
{ (yyval).yleft = ChoiceLeft((yyvsp[(2) - (3)]).ylleft); }
break;
case 36:
/* Line 1455 of yacc.c */
-#line 163 "otp-parser.y"
+#line 164 "otp-parser.y"
{ (yyval).yleft = lookup_alias((yyvsp[(2) - (3)]).ystring); }
break;
case 37:
/* Line 1455 of yacc.c */
-#line 168 "otp-parser.y"
+#line 169 "otp-parser.y"
{ (yyval).ylleft = llist1((yyvsp[(1) - (1)]).yleft); }
break;
case 38:
/* Line 1455 of yacc.c */
-#line 170 "otp-parser.y"
+#line 171 "otp-parser.y"
{ (yyval).ylleft = lappend1((yyvsp[(1) - (3)]).ylleft, (yyvsp[(3) - (3)]).yleft); }
break;
case 39:
/* Line 1455 of yacc.c */
-#line 175 "otp-parser.y"
+#line 176 "otp-parser.y"
{
for(cur_state=0; cur_state<no_states; cur_state++) {
if ((states[cur_state].no_exprs)==0) {
@@ -1680,105 +1681,105 @@ yyreduce:
case 42:
/* Line 1455 of yacc.c */
-#line 195 "otp-parser.y"
+#line 196 "otp-parser.y"
{ states[cur_state].no_exprs++; }
break;
case 43:
/* Line 1455 of yacc.c */
-#line 197 "otp-parser.y"
+#line 198 "otp-parser.y"
{ out_left((yyvsp[(3) - (3)]).ylleft); right_offset=0; }
break;
case 44:
/* Line 1455 of yacc.c */
-#line 199 "otp-parser.y"
+#line 200 "otp-parser.y"
{ right_offset=OTP_PBACK_OFFSET; }
break;
case 45:
/* Line 1455 of yacc.c */
-#line 201 "otp-parser.y"
+#line 202 "otp-parser.y"
{ fill_in_left(); }
break;
case 48:
/* Line 1455 of yacc.c */
-#line 211 "otp-parser.y"
+#line 212 "otp-parser.y"
{ cur_state = 0; }
break;
case 49:
/* Line 1455 of yacc.c */
-#line 213 "otp-parser.y"
+#line 214 "otp-parser.y"
{ cur_state = lookup_state((yyvsp[(2) - (3)]).ystring); }
break;
case 50:
/* Line 1455 of yacc.c */
-#line 218 "otp-parser.y"
+#line 219 "otp-parser.y"
{ (yyval).ylleft = lappend((yyvsp[(1) - (3)]).ylleft, lappend((yyvsp[(2) - (3)]).ylleft, (yyvsp[(3) - (3)]).ylleft)); }
break;
case 51:
/* Line 1455 of yacc.c */
-#line 220 "otp-parser.y"
+#line 221 "otp-parser.y"
{ (yyval).ylleft = lappend((yyvsp[(1) - (2)]).ylleft, (yyvsp[(2) - (2)]).ylleft); }
break;
case 52:
/* Line 1455 of yacc.c */
-#line 225 "otp-parser.y"
+#line 226 "otp-parser.y"
{ (yyval).ylleft = nil; }
break;
case 53:
/* Line 1455 of yacc.c */
-#line 227 "otp-parser.y"
+#line 228 "otp-parser.y"
{ (yyval).ylleft = llist1(BeginningLeft()); }
break;
case 54:
/* Line 1455 of yacc.c */
-#line 232 "otp-parser.y"
+#line 233 "otp-parser.y"
{ (yyval).ylleft = nil; }
break;
case 55:
/* Line 1455 of yacc.c */
-#line 234 "otp-parser.y"
+#line 235 "otp-parser.y"
{ (yyval).ylleft = llist1(EndLeft()); }
break;
case 56:
/* Line 1455 of yacc.c */
-#line 239 "otp-parser.y"
+#line 240 "otp-parser.y"
{ (yyval).ylleft = llist1((yyvsp[(1) - (1)]).yleft); }
break;
case 57:
/* Line 1455 of yacc.c */
-#line 241 "otp-parser.y"
+#line 242 "otp-parser.y"
{ (yyval).ylleft = lappend1((yyvsp[(1) - (2)]).ylleft, (yyvsp[(2) - (2)]).yleft); }
break;
case 60:
/* Line 1455 of yacc.c */
-#line 251 "otp-parser.y"
+#line 252 "otp-parser.y"
{
len=strlen((yyvsp[(1) - (1)]).ystring);
for (k=0; k<len; k++) {
@@ -1790,35 +1791,35 @@ yyreduce:
case 61:
/* Line 1455 of yacc.c */
-#line 258 "otp-parser.y"
+#line 259 "otp-parser.y"
{ out_right(OTP_RIGHT_NUM, (yyvsp[(1) - (1)]).yint); }
break;
case 62:
/* Line 1455 of yacc.c */
-#line 260 "otp-parser.y"
+#line 261 "otp-parser.y"
{ out_right(OTP_RIGHT_CHAR, (yyvsp[(2) - (2)]).yint); }
break;
case 63:
/* Line 1455 of yacc.c */
-#line 262 "otp-parser.y"
+#line 263 "otp-parser.y"
{ out_right(OTP_RIGHT_LCHAR, 0); }
break;
case 64:
/* Line 1455 of yacc.c */
-#line 264 "otp-parser.y"
+#line 265 "otp-parser.y"
{ out_right(OTP_RIGHT_LCHAR, (yyvsp[(5) - (6)]).yint); }
break;
case 65:
/* Line 1455 of yacc.c */
-#line 266 "otp-parser.y"
+#line 267 "otp-parser.y"
{
out_right(OTP_RIGHT_SOME, 0);
out_int(0,0);
@@ -1828,7 +1829,7 @@ yyreduce:
case 66:
/* Line 1455 of yacc.c */
-#line 271 "otp-parser.y"
+#line 272 "otp-parser.y"
{
out_right(OTP_RIGHT_SOME, (yyvsp[(5) - (6)]).yint);
out_int(0, 0);
@@ -1838,7 +1839,7 @@ yyreduce:
case 67:
/* Line 1455 of yacc.c */
-#line 276 "otp-parser.y"
+#line 277 "otp-parser.y"
{
out_right(OTP_RIGHT_SOME, 0);
out_int(0, (yyvsp[(5) - (6)]).yint);
@@ -1848,7 +1849,7 @@ yyreduce:
case 68:
/* Line 1455 of yacc.c */
-#line 281 "otp-parser.y"
+#line 282 "otp-parser.y"
{
out_right(OTP_RIGHT_SOME, (yyvsp[(5) - (8)]).yint);
out_int(0, (yyvsp[(7) - (8)]).yint);
@@ -1858,119 +1859,119 @@ yyreduce:
case 69:
/* Line 1455 of yacc.c */
-#line 286 "otp-parser.y"
+#line 287 "otp-parser.y"
{ out_right(OTP_RIGHT_OUTPUT, 0); }
break;
case 71:
/* Line 1455 of yacc.c */
-#line 292 "otp-parser.y"
+#line 293 "otp-parser.y"
{ out_int(OTP_ADD, 0); }
break;
case 72:
/* Line 1455 of yacc.c */
-#line 294 "otp-parser.y"
+#line 295 "otp-parser.y"
{ out_int(OTP_SUB, 0); }
break;
case 73:
/* Line 1455 of yacc.c */
-#line 296 "otp-parser.y"
+#line 297 "otp-parser.y"
{ out_int(OTP_MULT, 0); }
break;
case 74:
/* Line 1455 of yacc.c */
-#line 298 "otp-parser.y"
+#line 299 "otp-parser.y"
{ out_int(OTP_DIV, 0); }
break;
case 75:
/* Line 1455 of yacc.c */
-#line 300 "otp-parser.y"
+#line 301 "otp-parser.y"
{ out_int(OTP_MOD, 0); }
break;
case 76:
/* Line 1455 of yacc.c */
-#line 302 "otp-parser.y"
+#line 303 "otp-parser.y"
{ out_int(OTP_PUSH_NUM, lookup_table((yyvsp[(1) - (1)]).ystring)); }
break;
case 77:
/* Line 1455 of yacc.c */
-#line 304 "otp-parser.y"
+#line 305 "otp-parser.y"
{ out_int(OTP_LOOKUP, 0); }
break;
case 78:
/* Line 1455 of yacc.c */
-#line 309 "otp-parser.y"
+#line 310 "otp-parser.y"
{ out_int(OTP_PUSH_NUM, (yyvsp[(1) - (1)]).yint); }
break;
case 79:
/* Line 1455 of yacc.c */
-#line 311 "otp-parser.y"
+#line 312 "otp-parser.y"
{ out_int(OTP_PUSH_CHAR, (yyvsp[(2) - (2)]).yint); }
break;
case 80:
/* Line 1455 of yacc.c */
-#line 313 "otp-parser.y"
+#line 314 "otp-parser.y"
{ out_int(OTP_PUSH_LCHAR, 0); }
break;
case 81:
/* Line 1455 of yacc.c */
-#line 315 "otp-parser.y"
+#line 316 "otp-parser.y"
{ out_int(OTP_PUSH_LCHAR, (yyvsp[(5) - (6)]).yint); }
break;
case 84:
/* Line 1455 of yacc.c */
-#line 322 "otp-parser.y"
+#line 323 "otp-parser.y"
{ out_int(OTP_STATE_CHANGE, 0); }
break;
case 85:
/* Line 1455 of yacc.c */
-#line 324 "otp-parser.y"
+#line 325 "otp-parser.y"
{ out_int(OTP_STATE_CHANGE, lookup_state((yyvsp[(2) - (3)]).ystring)); }
break;
case 86:
/* Line 1455 of yacc.c */
-#line 326 "otp-parser.y"
+#line 327 "otp-parser.y"
{ out_int(OTP_STATE_PUSH, lookup_state((yyvsp[(3) - (4)]).ystring)); }
break;
case 87:
/* Line 1455 of yacc.c */
-#line 328 "otp-parser.y"
+#line 329 "otp-parser.y"
{ out_int(OTP_STATE_POP, 0); }
break;
/* Line 1455 of yacc.c */
-#line 1974 "otp-parser.c"
+#line 1975 "otp-parser.c"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -2182,6 +2183,6 @@ yyreturn:
/* Line 1675 of yacc.c */
-#line 330 "otp-parser.y"
+#line 331 "otp-parser.y"
diff --git a/Build/source/texk/web2c/otps/otp-parser.y b/Build/source/texk/web2c/otps/otp-parser.y
index a67c6a1c06d..7870a3269a2 100644
--- a/Build/source/texk/web2c/otps/otp-parser.y
+++ b/Build/source/texk/web2c/otps/otp-parser.y
@@ -28,7 +28,8 @@ along with Omega; if not, write to the Free Software Foundation, Inc.,
#include "yystype.h"
int k, len;
-void yyerror(char * msg)
+static void
+yyerror(char * msg)
{
fprintf(stderr, "line %d: %s\n", line_number, msg);
}
diff --git a/Build/source/texk/web2c/otps/otp2ocp.c b/Build/source/texk/web2c/otps/otp2ocp.c
index d9b7ef10ab4..4037fc21e9e 100644
--- a/Build/source/texk/web2c/otps/otp2ocp.c
+++ b/Build/source/texk/web2c/otps/otp2ocp.c
@@ -32,14 +32,14 @@ along with Omega; if not, write to the Free Software Foundation, Inc.,
#include "routines.h"
extern FILE *yyin;
-int yywrap
-P1H (void)
+int
+yywrap(void)
{
return 1;
}
-void output
-P2C (FILE *, output_file, int, i)
+static void
+output(FILE *output_file, int i)
{
/* make sure output is in big-endian form */
char j;
@@ -57,8 +57,8 @@ P2C (FILE *, output_file, int, i)
fwrite (&j, 1, 1, output_file);
}
-void otp_read
-P2C (string, input_name, string, output_name)
+static void
+otp_read(string input_name, string output_name)
{
int i, j, len, no_words;
int *table, *instrs;
@@ -118,8 +118,8 @@ P2C (string, input_name, string, output_name)
}
}
-int main
-P2C (int, argc, string *, argv)
+int
+main(int argc, string *argv)
{
string input_name, full_input_name;
string output_name;
diff --git a/Build/source/texk/web2c/otps/outocp.c b/Build/source/texk/web2c/otps/outocp.c
index 9e8afd6913b..0b8447877b5 100644
--- a/Build/source/texk/web2c/otps/outocp.c
+++ b/Build/source/texk/web2c/otps/outocp.c
@@ -73,8 +73,8 @@ char *otp_names[] = {
int no_words_read = 0;
-int ctp_get
-P1C (FILE *, input_file)
+static int
+ctp_get(FILE *input_file)
{
int ctpchar;
ctpchar = getc (input_file);
@@ -85,8 +85,8 @@ P1C (FILE *, input_file)
return ctpchar;
}
-int ctp_read
-P1C (FILE *, input_file)
+static int
+ctp_read(FILE *input_file)
{
int ctpword;
no_words_read++;
@@ -101,8 +101,8 @@ P1C (FILE *, input_file)
return ctpword;
}
-void ctp_explain
-P1C (FILE *, input_file)
+static void
+ctp_explain(FILE *input_file)
{
int i, j, arg, entry, instruction;
int ctp_length, real_ctp_length, ctp_input, ctp_output,
@@ -191,8 +191,8 @@ P1C (FILE *, input_file)
no_words_read, no_words_read);
}
-int main
-P2C (int, argc, string *, argv)
+int
+main(int argc, string *argv)
{
string input_name, full_input_name;
FILE *input_file;
diff --git a/Build/source/texk/web2c/otps/routines.c b/Build/source/texk/web2c/otps/routines.c
index 6ee5d54188d..d22f304ba16 100644
--- a/Build/source/texk/web2c/otps/routines.c
+++ b/Build/source/texk/web2c/otps/routines.c
@@ -54,7 +54,7 @@ alias_pair aliases[OTP_MAXALIASES];
/* cons = [x] + L */
list
-cons P2C(int, x, list, L)
+cons(int x, list L)
{
list temp;
temp = (list) malloc(sizeof(cell));
@@ -65,7 +65,7 @@ return temp;
/* list1 = [x] */
list
-list1 P1C(int, x)
+list1(int x)
{
list temp;
temp = (list) malloc(sizeof(cell));
@@ -76,7 +76,7 @@ return temp;
/* list2 = [x, y] */
list
-list2 P2C(int, x, int, y)
+list2(int x, int y)
{
list temp, temp1;
temp = (list) malloc(sizeof(cell));
@@ -90,7 +90,7 @@ return temp;
/* append = copy(K) + L */
list
-append P2C(list, K, list, L)
+append(list K, list L)
{
if (K==nil) return L;
return cons(K->val, append(K->ptr, L));
@@ -98,14 +98,14 @@ return cons(K->val, append(K->ptr, L));
/* append1 = copy(L) + [x] */
list
-append1 P2C(list, L, int, x)
+append1(list L, int x)
{
return (append(L,list1(x)));
}
/* lcons = [x] + L */
llist
-lcons P2C(left, x, llist, L)
+lcons(left x, llist L)
{
llist temp;
temp = (llist) malloc(sizeof(lcell));
@@ -116,7 +116,7 @@ return temp;
/* llist1 = [x] */
llist
-llist1 P1C(left, x)
+llist1(left x)
{
llist temp;
temp = (llist) malloc(sizeof(lcell));
@@ -127,7 +127,7 @@ return temp;
/* llist2 = [x, y] */
llist
-llist2 P2C(left, x, left, y)
+llist2(left x, left y)
{
llist temp, temp1;
temp = (llist) malloc(sizeof(lcell));
@@ -141,7 +141,7 @@ return temp;
/* lappend = copy(K) + L */
llist
-lappend P2C(llist, K, llist, L)
+lappend(llist K, llist L)
{
if (K==nil) return L;
return lcons(K->val, lappend(K->ptr, L));
@@ -149,13 +149,13 @@ return lcons(K->val, lappend(K->ptr, L));
/* lappend1 = copy(L) + [x] */
llist
-lappend1 P2C(llist, L, left, x)
+lappend1(llist L, left x)
{
return (lappend(L,llist1(x)));
}
left
-WildCard P1H(void)
+WildCard(void)
{
left temp;
temp = (left) malloc(sizeof(lft_cell));
@@ -164,7 +164,7 @@ return temp;
}
left
-StringLeft P1C(char *, x)
+StringLeft(char *x)
{
left temp;
temp = (left) malloc(sizeof(lft_cell));
@@ -174,7 +174,7 @@ return temp;
}
left
-SingleLeft P1C(int, x)
+SingleLeft(int x)
{
left temp;
temp = (left) malloc(sizeof(lft_cell));
@@ -184,7 +184,7 @@ return temp;
}
left
-DoubleLeft P2C(int, x, int, y)
+DoubleLeft(int x, int y)
{
left temp;
temp = (left) malloc(sizeof(lft_cell));
@@ -195,7 +195,7 @@ return temp;
}
left
-ChoiceLeft P1C(llist, L)
+ChoiceLeft(llist L)
{
left temp;
temp = (left) malloc(sizeof(lft_cell));
@@ -205,7 +205,7 @@ return temp;
}
left
-NotChoiceLeft P1C(llist, L)
+NotChoiceLeft(llist L)
{
left temp;
temp = (left) malloc(sizeof(lft_cell));
@@ -215,7 +215,7 @@ return temp;
}
left
-PlusLeft P2C(left, l, int, n)
+PlusLeft(left l, int n)
{
left temp;
if (n == 0) { FATAL ("plusleft's argument must be non-zero"); }
@@ -227,7 +227,7 @@ return temp;
}
left
-CompleteLeft P3C(left, l, int, n, int, m)
+CompleteLeft(left l, int n, int m)
{
left temp;
if (n == 0) { FATAL ("completeleft's first argument must be non-zero"); }
@@ -240,7 +240,7 @@ return temp;
}
left
-BeginningLeft P1H(void)
+BeginningLeft(void)
{
left temp;
temp = (left) malloc(sizeof(lft_cell));
@@ -249,7 +249,7 @@ return temp;
}
left
-EndLeft P1H(void)
+EndLeft(void)
{
left temp;
temp = (left) malloc(sizeof(lft_cell));
@@ -258,7 +258,7 @@ return temp;
}
list
-gen_left P1C(left, arg)
+gen_left(left arg)
{
int save_ptr, k;
list holes, false_holes, true_holes, backup_holes;
@@ -397,7 +397,7 @@ default:
}
void
-store_alias P2C(string, str, left, l)
+store_alias(string str, left l)
{
int i;
for (i=0; i<no_aliases; i++) {
@@ -411,7 +411,7 @@ no_aliases++;
}
left
-lookup_alias P1C(string, str)
+lookup_alias(string str)
{
int i;
for (i=0; i<no_aliases; i++) {
@@ -423,7 +423,7 @@ FATAL1 ("alias %s not defined", str);
}
void
-out_left P1C(llist, L)
+out_left(llist L)
{
llist p;
list holes;
@@ -448,14 +448,14 @@ while (p!=nil) {
}
void
-fill_in_left P1H(void)
+fill_in_left(void)
{
out_int(OTP_STOP, 0);
fill_in(left_false_holes);
}
void
-fill_in P1C(list, L)
+fill_in(list L)
{
list p;
p=L;
@@ -466,13 +466,13 @@ while (p!=0) {
}
void
-out_right P2C(int, instr, int, val)
+out_right(int instr, int val)
{
out_int(instr+right_offset, val);
}
void
-out_int P2C(int, instr, int, val)
+out_int(int instr, int val)
{
if (val>=(1<<24)) {
FATAL1 ("Argument (%d) of instruction too big", val);
@@ -481,7 +481,7 @@ add_to_state((instr<<24)+val);
}
void
-store_state P1C(string, str)
+store_state(string str)
{
int i;
for (i=0; i<no_states; i++) {
@@ -497,7 +497,7 @@ no_states++;
}
int
-lookup_state P1C(string, str)
+lookup_state(string str)
{
int i;
for (i=0; i<no_states; i++) {
@@ -509,7 +509,7 @@ FATAL1 ("state %s not defined", str);
}
void
-add_to_state P1C(int, x)
+add_to_state(int x)
{
int len;
len = states[cur_state].length;
@@ -522,7 +522,7 @@ states[cur_state].length = len+1;
}
void
-store_table P2C(string, str, int, len)
+store_table(string str, int len)
{
int i;
for (i=0; i<no_tables; i++) {
@@ -537,7 +537,7 @@ no_tables++;
}
void
-add_to_table P1C(int, x)
+add_to_table(int x)
{
int len;
len = tables[cur_table].length;
@@ -546,7 +546,7 @@ tables[cur_table].length = len+1;
}
int
-lookup_table P1C(string, str)
+lookup_table(string str)
{
int i;
for (i=0; i<no_tables; i++) {
diff --git a/Build/source/texk/web2c/otps/routines.h b/Build/source/texk/web2c/otps/routines.h
index 7ecaa7e5a0e..f8a851622c2 100644
--- a/Build/source/texk/web2c/otps/routines.h
+++ b/Build/source/texk/web2c/otps/routines.h
@@ -52,8 +52,9 @@ extern void exit();
#define BEGINNINGLEFT 8
#define ENDLEFT 9
-extern int yyparse();
-extern int yylex();
+extern int yyparse(void);
+extern int yylex(void);
+extern int yywrap(void);
extern int line_number;
@@ -76,35 +77,35 @@ typedef struct lcell_struct {struct lcell_struct *ptr;
left val; } lcell;
typedef lcell *llist;
-extern list cons();
-extern list list1();
-extern list list2();
-extern list append();
-extern list append1();
-
-extern llist lcons();
-extern llist llist1 P1H(left);
-extern llist llist2();
-extern llist lappend P2H(llist,llist);
-extern llist lappend1 P2H(llist,left);
-
-extern left WildCard();
-extern left SingleLeft P1H(int);
-extern left StringLeft P1H(char *);
-extern left DoubleLeft P2H(int,int);
-extern left ChoiceLeft P1H(llist);
-extern left NotChoiceLeft P1H(llist);
-extern left PlusLeft P2H(left,int);
-extern left CompleteLeft P3H(left,int,int);
-extern left BeginningLeft();
-extern left EndLeft();
-extern list gen_left();
-extern void fill_in_left();
-extern void out_left P1H(llist);
-extern int no_lefts;
+extern list cons(int x, list L);
+extern list list1(int x);
+extern list list2(int x, int y);
+extern list append(list K, list L);
+extern list append1(list L, int x);
+
+extern llist lcons(left x, llist L);
+extern llist llist1(left x);
+extern llist llist2(left x, left y);
+extern llist lappend(llist K, llist L);
+extern llist lappend1(llist L, left x);
+
+extern left WildCard(void);
+extern left StringLeft(char *x);
+extern left SingleLeft(int x);
+extern left DoubleLeft(int x, int y);
+extern left ChoiceLeft(llist L);
+extern left NotChoiceLeft(llist L);
+extern left PlusLeft(left l, int n);
+extern left CompleteLeft(left l, int n, int m);
+extern left BeginningLeft(void);
+extern left EndLeft(void);
+extern list gen_left(left arg);
-extern void store_alias P2H(string, left);
-extern left lookup_alias P1H(string);
+extern int no_lefts;
+extern void store_alias(string str, left l);
+extern left lookup_alias(string str);
+extern void out_left(llist L);
+extern void fill_in_left(void);
#define ARRAY_SIZE 50000
typedef struct {
@@ -117,7 +118,7 @@ extern int no_tables;
extern int cur_table;
extern int room_for_tables;
extern table_type tables[];
-extern void add_to_table P1H(int);
+extern void add_to_table(int x);
typedef struct {
int length;
@@ -130,17 +131,16 @@ extern int no_states;
extern int cur_state;
extern int room_for_states;
extern state_type states[];
-extern void add_to_state P1H(int);
+extern void add_to_state(int x);
-extern void fill_in P1H(list);
-extern void right_int();
-extern void out_int P2H(int,int);
-extern void out_right P2H(int,int);
+extern void fill_in(list L);
+extern void out_int(int instr, int val);
+extern void out_right(int instr, int val);
-extern void store_state P1H(string);
-extern int lookup_state P1H(string);
-extern void store_table P2H(string, int);
-extern int lookup_table P1H(string);
+extern void store_state(string str);
+extern int lookup_state(string str);
+extern void store_table(string str, int len);
+extern int lookup_table(string str);
typedef struct { char * str; left left_val; } alias_pair;