summaryrefslogtreecommitdiff
path: root/usr.bin/yacc/error.c
diff options
context:
space:
mode:
authorPeter Valchev <pvalchev@cvs.openbsd.org>2001-07-16 06:29:46 +0000
committerPeter Valchev <pvalchev@cvs.openbsd.org>2001-07-16 06:29:46 +0000
commit0a0ba19345d4c3688a74252a888d0f7040caf1c7 (patch)
tree2ef2e7e241110608a2a18a3415c913051fa3bc10 /usr.bin/yacc/error.c
parente43f28fe697b759e0f67c428fb7400874b7b4ebb (diff)
-Wall cleanup; ok deraadt
Diffstat (limited to 'usr.bin/yacc/error.c')
-rw-r--r--usr.bin/yacc/error.c60
1 files changed, 34 insertions, 26 deletions
diff --git a/usr.bin/yacc/error.c b/usr.bin/yacc/error.c
index 0eefc474978..9758d6bb6dd 100644
--- a/usr.bin/yacc/error.c
+++ b/usr.bin/yacc/error.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: error.c,v 1.4 1999/08/04 18:31:26 millert Exp $ */
+/* $OpenBSD: error.c,v 1.5 2001/07/16 06:29:44 pvalchev Exp $ */
/* $NetBSD: error.c,v 1.4 1996/03/19 03:21:32 jtc Exp $ */
/*
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)error.c 5.3 (Berkeley) 6/1/90";
#else
-static char rcsid[] = "$OpenBSD: error.c,v 1.4 1999/08/04 18:31:26 millert Exp $";
+static char rcsid[] = "$OpenBSD: error.c,v 1.5 2001/07/16 06:29:44 pvalchev Exp $";
#endif
#endif /* not lint */
@@ -50,6 +50,7 @@ static char rcsid[] = "$OpenBSD: error.c,v 1.4 1999/08/04 18:31:26 millert Exp $
#include "defs.h"
+void
fatal(msg)
char *msg;
{
@@ -58,6 +59,7 @@ char *msg;
}
+void
no_space()
{
fprintf(stderr, "%s: f - out of space\n", __progname);
@@ -65,6 +67,7 @@ no_space()
}
+void
open_error(filename)
char *filename;
{
@@ -73,6 +76,7 @@ char *filename;
}
+void
unexpected_EOF()
{
fprintf(stderr, "%s: e - line %d of \"%s\", unexpected end-of-file\n",
@@ -81,6 +85,7 @@ unexpected_EOF()
}
+void
print_pos(st_line, st_cptr)
char *st_line;
char *st_cptr;
@@ -107,7 +112,7 @@ char *st_cptr;
putc('\n', stderr);
}
-
+void
syntax_error(st_lineno, st_line, st_cptr)
int st_lineno;
char *st_line;
@@ -119,7 +124,7 @@ char *st_cptr;
done(1);
}
-
+void
unterminated_comment(c_lineno, c_line, c_cptr)
int c_lineno;
char *c_line;
@@ -131,7 +136,7 @@ char *c_cptr;
done(1);
}
-
+void
unterminated_string(s_lineno, s_line, s_cptr)
int s_lineno;
char *s_line;
@@ -143,7 +148,7 @@ char *s_cptr;
done(1);
}
-
+void
unterminated_text(t_lineno, t_line, t_cptr)
int t_lineno;
char *t_line;
@@ -155,7 +160,7 @@ char *t_cptr;
done(1);
}
-
+void
unterminated_union(u_lineno, u_line, u_cptr)
int u_lineno;
char *u_line;
@@ -167,7 +172,7 @@ declaration\n", __progname, u_lineno, input_file_name);
done(1);
}
-
+void
over_unionized(u_cptr)
char *u_cptr;
{
@@ -177,7 +182,7 @@ declarations\n", __progname, lineno, input_file_name);
done(1);
}
-
+void
illegal_tag(t_lineno, t_line, t_cptr)
int t_lineno;
char *t_line;
@@ -190,6 +195,7 @@ char *t_cptr;
}
+void
illegal_character(c_cptr)
char *c_cptr;
{
@@ -200,6 +206,7 @@ char *c_cptr;
}
+void
used_reserved(s)
char *s;
{
@@ -208,7 +215,7 @@ char *s;
done(1);
}
-
+void
tokenized_start(s)
char *s;
{
@@ -217,7 +224,7 @@ declared to be a token\n", __progname, lineno, input_file_name, s);
done(1);
}
-
+void
retyped_warning(s)
char *s;
{
@@ -225,7 +232,7 @@ char *s;
redeclared\n", __progname, lineno, input_file_name, s);
}
-
+void
reprec_warning(s)
char *s;
{
@@ -233,7 +240,7 @@ char *s;
redeclared\n", __progname, lineno, input_file_name, s);
}
-
+void
revalued_warning(s)
char *s;
{
@@ -241,7 +248,7 @@ char *s;
redeclared\n", __progname, lineno, input_file_name, s);
}
-
+void
terminal_start(s)
char *s;
{
@@ -250,14 +257,14 @@ token\n", __progname, lineno, input_file_name, s);
done(1);
}
-
+void
restarted_warning()
{
fprintf(stderr, "%s: w - line %d of \"%s\", the start symbol has been \
redeclared\n", __progname, lineno, input_file_name);
}
-
+void
no_grammar()
{
fprintf(stderr, "%s: e - line %d of \"%s\", no grammar has been \
@@ -265,7 +272,7 @@ specified\n", __progname, lineno, input_file_name);
done(1);
}
-
+void
terminal_lhs(s_lineno)
int s_lineno;
{
@@ -274,14 +281,14 @@ of a production\n", __progname, s_lineno, input_file_name);
done(1);
}
-
+void
prec_redeclared()
{
fprintf(stderr, "%s: w - line %d of \"%s\", conflicting %%prec \
specifiers\n", __progname, lineno, input_file_name);
}
-
+void
unterminated_action(a_lineno, a_line, a_cptr)
int a_lineno;
char *a_line;
@@ -293,7 +300,7 @@ char *a_cptr;
done(1);
}
-
+void
dollar_warning(a_lineno, i)
int a_lineno;
int i;
@@ -302,7 +309,7 @@ int i;
end of the current rule\n", __progname, a_lineno, input_file_name, i);
}
-
+void
dollar_error(a_lineno, a_line, a_cptr)
int a_lineno;
char *a_line;
@@ -315,6 +322,7 @@ char *a_cptr;
}
+void
untyped_lhs()
{
fprintf(stderr, "%s: e - line %d of \"%s\", $$ is untyped\n",
@@ -322,7 +330,7 @@ untyped_lhs()
done(1);
}
-
+void
untyped_rhs(i, s)
int i;
char *s;
@@ -332,7 +340,7 @@ char *s;
done(1);
}
-
+void
unknown_rhs(i)
int i;
{
@@ -341,14 +349,14 @@ int i;
done(1);
}
-
+void
default_action_warning()
{
fprintf(stderr, "%s: w - line %d of \"%s\", the default action assigns an \
undefined value to $$\n", __progname, lineno, input_file_name);
}
-
+void
undefined_goal(s)
char *s;
{
@@ -356,7 +364,7 @@ char *s;
done(1);
}
-
+void
undefined_symbol_warning(s)
char *s;
{