diff options
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/m4/Makefile | 2 | ||||
-rw-r--r-- | usr.bin/m4/expr.c | 19 | ||||
-rw-r--r-- | usr.bin/m4/main.c | 2 |
3 files changed, 11 insertions, 12 deletions
diff --git a/usr.bin/m4/Makefile b/usr.bin/m4/Makefile index feceb0c..702b3f3 100644 --- a/usr.bin/m4/Makefile +++ b/usr.bin/m4/Makefile @@ -9,6 +9,4 @@ CFLAGS+=-DEXTENDED SRCS= eval.c expr.c look.c main.c misc.c gnum4.c trace.c -WARNS?= 0 - .include <bsd.prog.mk> diff --git a/usr.bin/m4/expr.c b/usr.bin/m4/expr.c index be0f9f9..8f4dd9c 100644 --- a/usr.bin/m4/expr.c +++ b/usr.bin/m4/expr.c @@ -71,8 +71,8 @@ __FBSDID("$FreeBSD$"); * nerel : shift { ("<" | ">" | "<=" | ">=") shift } * shift : primary { ("<<" | ">>") primary } * primary : term { ("+" | "-") term } - * term : exp { ("*" | "/" | "%") exp } - * exp : unary { "**" unary } + * term : exponent { ("*" | "/" | "%") exponent } + * exponent: unary { "**" unary } * unary : factor * | ("+" | "-" | "~" | "!") unary * factor : constant @@ -115,12 +115,11 @@ static int nerel(int mayeval); static int shift(int mayeval); static int primary(int mayeval); static int term(int mayeval); -static int exp(int mayeval); +static int exponent(int mayeval); static int unary(int mayeval); static int factor(int mayeval); static int constant(int mayeval); static int num(int mayeval); -static int geteqrel(int mayeval); static int skipws(void); static void experr(const char *); @@ -388,16 +387,16 @@ primary(int mayeval) } /* - * term : exp { ("*" | "/" | "%") exp } + * term : exponent { ("*" | "/" | "%") exponent } */ static int term(int mayeval) { int c, vl, vr; - vl = exp(mayeval); + vl = exponent(mayeval); while ((c = skipws()) == '*' || c == '/' || c == '%') { - vr = exp(mayeval); + vr = exponent(mayeval); switch (c) { case '*': @@ -426,10 +425,10 @@ term(int mayeval) } /* - * exp : unary { "**" exp } + * exponent : unary { "**" exponent } */ static int -exp(int mayeval) +exponent(int mayeval) { int c, vl, vr, n; @@ -562,7 +561,7 @@ constant(int mayeval) * num : digit | num digit */ static int -num(int mayeval) +num(int mayeval __unused) { int rval, c, base; int ndig; diff --git a/usr.bin/m4/main.c b/usr.bin/m4/main.c index 99f5233..0e60fce 100644 --- a/usr.bin/m4/main.c +++ b/usr.bin/m4/main.c @@ -34,9 +34,11 @@ */ #ifndef lint +#if 0 static char copyright[] = "@(#) Copyright (c) 1989, 1993\n\ The Regents of the University of California. All rights reserved.\n"; +#endif #endif /* not lint */ #ifndef lint |