Project

General

Profile

Bug #1237 » expr.patch

josepht, 01/20/2009 04:32 AM

View differences:

bin/expr/expr.y
#include <errno.h>
#include <regex.h>
#include <limits.h>
#include <unistd.h>
enum valtype {
integer, numeric_string, string
......
/* NOTREACHED */
}
static void
usage(void)
{
fprintf(stderr,
"usage: expr <expression>\n");
exit(EXIT_FAILURE);
}
int
main (int argc __unused, char **argv)
main (int argc, char **argv)
{
int ch;
setlocale (LC_ALL, "");
av = argv + 1;
while ((ch = getopt(argc, argv, "-")) != -1) {
switch (ch) {
default:
usage();
/* NOTREACED */
}
}
argc -= optind;
argv += optind;
av = argv;
yyparse ();
(1-1/3)