version 1.2, 2009/06/14 23:00:57 |
version 1.3, 2009/06/14 23:39:43 |
|
|
struct man **, struct mdoc **); |
struct man **, struct mdoc **); |
static struct man *man_init(struct curparse *); |
static struct man *man_init(struct curparse *); |
static struct mdoc *mdoc_init(struct curparse *); |
static struct mdoc *mdoc_init(struct curparse *); |
|
__dead static void version(void); |
__dead static void usage(void); |
__dead static void usage(void); |
|
|
extern char *__progname; |
extern char *__progname; |
|
|
curp.outtype = OUTT_ASCII; |
curp.outtype = OUTT_ASCII; |
|
|
/* LINTED */ |
/* LINTED */ |
while (-1 != (c = getopt(argc, argv, "f:m:W:T:"))) |
while (-1 != (c = getopt(argc, argv, "f:m:VW:T:"))) |
switch (c) { |
switch (c) { |
case ('f'): |
case ('f'): |
if ( ! foptions(&curp.fflags, optarg)) |
if ( ! foptions(&curp.fflags, optarg)) |
|
|
if ( ! woptions(&curp.wflags, optarg)) |
if ( ! woptions(&curp.wflags, optarg)) |
return(0); |
return(0); |
break; |
break; |
|
case ('V'): |
|
version(); |
|
/* NOTREACHED */ |
default: |
default: |
usage(); |
usage(); |
/* NOTREACHED */ |
/* NOTREACHED */ |
|
|
|
|
|
|
__dead static void |
__dead static void |
|
version(void) |
|
{ |
|
|
|
(void)printf("%s %s\n", __progname, VERSION); |
|
exit(EXIT_SUCCESS); |
|
} |
|
|
|
|
|
__dead static void |
usage(void) |
usage(void) |
{ |
{ |
|
|
(void)fprintf(stderr, "usage: %s [-foption...] " |
(void)fprintf(stderr, "usage: %s [-V] [-foption...] " |
"[-mformat] [-Toutput] [-Werr...]\n", |
"[-mformat] [-Toutput] [-Werr...]\n", |
__progname); |
__progname); |
exit(EXIT_FAILURE); |
exit(EXIT_FAILURE); |