summaryrefslogtreecommitdiffstats
path: root/atc/grammar.y
diff options
context:
space:
mode:
authorlukem <lukem@NetBSD.org>1997-10-10 02:07:01 +0000
committerlukem <lukem@NetBSD.org>1997-10-10 02:07:01 +0000
commit872a50db510aae37e624f1b82db06f08023c5712 (patch)
treee5af9998b7c1daa1acf8046cd6ea941cbf25345b /atc/grammar.y
parent3c0c7a72c2f0803e801f2330c329aff2eee680d5 (diff)
downloadbsdgames-darwin-872a50db510aae37e624f1b82db06f08023c5712.tar.gz
bsdgames-darwin-872a50db510aae37e624f1b82db06f08023c5712.tar.zst
bsdgames-darwin-872a50db510aae37e624f1b82db06f08023c5712.zip
WARNSify
Diffstat (limited to 'atc/grammar.y')
-rw-r--r--atc/grammar.y20
1 files changed, 18 insertions, 2 deletions
diff --git a/atc/grammar.y b/atc/grammar.y
index a409b490..91266ac7 100644
--- a/atc/grammar.y
+++ b/atc/grammar.y
@@ -1,4 +1,4 @@
-/* $NetBSD: grammar.y,v 1.3 1995/03/21 15:03:59 cgd Exp $ */
+/* $NetBSD: grammar.y,v 1.4 1997/10/10 02:07:08 lukem Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -63,11 +63,12 @@
%{
#include "include.h"
+#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)grammar.y 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$NetBSD: grammar.y,v 1.3 1995/03/21 15:03:59 cgd Exp $";
+__RCSID("$NetBSD: grammar.y,v 1.4 1997/10/10 02:07:08 lukem Exp $");
#endif
#endif /* not lint */
@@ -288,14 +289,18 @@ Lline:
;
%%
+void
check_edge(x, y)
+ int x, y;
{
if (!(x == 0) && !(x == sp->width - 1) &&
!(y == 0) && !(y == sp->height - 1))
yyerror("edge value not on edge.");
}
+void
check_point(x, y)
+ int x, y;
{
if (x < 1 || x >= sp->width - 1)
yyerror("X value out of range.");
@@ -303,7 +308,9 @@ check_point(x, y)
yyerror("Y value out of range.");
}
+void
check_linepoint(x, y)
+ int x, y;
{
if (x < 0 || x >= sp->width)
yyerror("X value out of range.");
@@ -311,7 +318,9 @@ check_linepoint(x, y)
yyerror("Y value out of range.");
}
+void
check_line(x1, y1, x2, y2)
+ int x1, y1, x2, y2;
{
int d1, d2;
@@ -325,7 +334,9 @@ check_line(x1, y1, x2, y2)
yyerror("Bad line endpoints.");
}
+int
yyerror(s)
+ const char *s;
{
fprintf(stderr, "\"%s\": line %d: %s\n", file, line, s);
errors++;
@@ -333,7 +344,9 @@ yyerror(s)
return (errors);
}
+void
check_edir(x, y, dir)
+ int x, y, dir;
{
int bad = 0;
@@ -364,10 +377,13 @@ check_edir(x, y, dir)
yyerror("Bad direction for entrance at exit.");
}
+void
check_adir(x, y, dir)
+ int x, y, dir;
{
}
+int
checkdefs()
{
int err = 0;