version 1.11, 2003/06/25 21:09:09 |
version 1.12, 2004/07/01 19:20:23 |
|
|
*/ |
*/ |
|
|
#ifndef lint |
#ifndef lint |
static char copyright[] = |
static const char copyright[] = |
"@(#) Copyright (c) 1980, 1993\n\ |
"@(#) Copyright (c) 1980, 1993\n\ |
The Regents of the University of California. All rights reserved.\n"; |
The Regents of the University of California. All rights reserved.\n"; |
#endif /* not lint */ |
#endif /* not lint */ |
|
|
#ifndef lint |
#ifndef lint |
#if 0 |
#if 0 |
static char sccsid[] = "@(#)checknr.c 8.1 (Berkeley) 6/6/93"; |
static const char sccsid[] = "@(#)checknr.c 8.1 (Berkeley) 6/6/93"; |
#else |
#else |
static char rcsid[] = "$OpenBSD$"; |
static const char rcsid[] = "$OpenBSD$"; |
#endif |
#endif |
#endif /* not lint */ |
#endif /* not lint */ |
|
|
|
|
#include <stdlib.h> |
#include <stdlib.h> |
#include <unistd.h> |
#include <unistd.h> |
#include <ctype.h> |
#include <ctype.h> |
|
#include <err.h> |
|
|
#define MAXSTK 100 /* Stack size */ |
#define MAXSTK 100 /* Stack size */ |
#define MAXBR 100 /* Max number of bracket pairs known */ |
#define MAXBR 100 /* Max number of bracket pairs known */ |
|
|
cfilename = argv[i]; |
cfilename = argv[i]; |
f = fopen(cfilename, "r"); |
f = fopen(cfilename, "r"); |
if (f == NULL) |
if (f == NULL) |
perror(cfilename); |
warn(cfilename); |
else |
else |
process(f); |
process(f); |
} |
} |
|
|
void |
void |
usage(void) |
usage(void) |
{ |
{ |
|
extern char *__progname; |
(void)fprintf(stderr, |
(void)fprintf(stderr, |
"usage: checknr [-fs] [-a.x1.y1.x2.y2. ... .xn.yn] " |
"usage: %s [-fs] [-a.x1.y1.x2.y2. ... .xn.yn] " |
"[-c.x1.x2.x3. ... .xn] [file]\n"); |
"[-c.x1.x2.x3. ... .xn] [file]\n", __progname); |
exit(1); |
exit(1); |
} |
} |
|
|