version 1.46, 2009/10/13 10:57:25 |
version 1.49, 2009/10/26 08:42:37 |
|
|
|
|
#ifdef __linux__ |
#ifdef __linux__ |
extern int getsubopt(char **, char * const *, char **); |
extern int getsubopt(char **, char * const *, char **); |
|
extern size_t strlcat(char *, const char *, size_t); |
# ifndef __dead |
# ifndef __dead |
# define __dead __attribute__((__noreturn__)) |
# define __dead __attribute__((__noreturn__)) |
# endif |
# endif |
Line 88 struct curparse { |
|
Line 89 struct curparse { |
|
out_man outman; |
out_man outman; |
out_free outfree; |
out_free outfree; |
void *outdata; |
void *outdata; |
char *outopts; |
char outopts[BUFSIZ]; |
}; |
}; |
|
|
static int foptions(int *, char *); |
static int foptions(int *, char *); |
Line 124 main(int argc, char *argv[]) |
|
Line 125 main(int argc, char *argv[]) |
|
curp.outtype = OUTT_ASCII; |
curp.outtype = OUTT_ASCII; |
|
|
/* LINTED */ |
/* LINTED */ |
while (-1 != (c = getopt(argc, argv, "f:m:o:T:VW:"))) |
while (-1 != (c = getopt(argc, argv, "f:m:O:T:VW:"))) |
switch (c) { |
switch (c) { |
case ('f'): |
case ('f'): |
if ( ! foptions(&curp.fflags, optarg)) |
if ( ! foptions(&curp.fflags, optarg)) |
Line 134 main(int argc, char *argv[]) |
|
Line 135 main(int argc, char *argv[]) |
|
if ( ! moptions(&curp.inttype, optarg)) |
if ( ! moptions(&curp.inttype, optarg)) |
return(EXIT_FAILURE); |
return(EXIT_FAILURE); |
break; |
break; |
case ('o'): |
case ('O'): |
curp.outopts = optarg; |
(void)strlcat(curp.outopts, optarg, BUFSIZ); |
|
(void)strlcat(curp.outopts, ",", BUFSIZ); |
break; |
break; |
case ('T'): |
case ('T'): |
if ( ! toptions(&curp.outtype, optarg)) |
if ( ! toptions(&curp.outtype, optarg)) |
|
|
{ |
{ |
|
|
(void)fprintf(stderr, "usage: %s [-V] [-foption...] " |
(void)fprintf(stderr, "usage: %s [-V] [-foption...] " |
"[-mformat] [-Toutput] [-Werr...]\n", |
"[-mformat] [-Ooption] [-Toutput] " |
__progname); |
"[-Werr...]\n", __progname); |
exit(EXIT_FAILURE); |
exit(EXIT_FAILURE); |
} |
} |
|
|