version 1.287, 2017/03/27 18:51:36 |
version 1.291, 2017/05/17 23:39:31 |
|
|
OUTMODE_FLN, |
OUTMODE_FLN, |
OUTMODE_LST, |
OUTMODE_LST, |
OUTMODE_ALL, |
OUTMODE_ALL, |
OUTMODE_INT, |
|
OUTMODE_ONE |
OUTMODE_ONE |
}; |
}; |
|
|
Line 194 main(int argc, char *argv[]) |
|
Line 193 main(int argc, char *argv[]) |
|
show_usage = 0; |
show_usage = 0; |
outmode = OUTMODE_DEF; |
outmode = OUTMODE_DEF; |
|
|
while (-1 != (c = getopt(argc, argv, |
while ((c = getopt(argc, argv, |
"aC:cfhI:iK:klM:m:O:S:s:T:VW:w"))) { |
"aC:cfhI:iK:klM:m:O:S:s:T:VW:w")) != -1) { |
|
if (c == 'i' && search.argmode == ARG_EXPR) { |
|
optind--; |
|
break; |
|
} |
switch (c) { |
switch (c) { |
case 'a': |
case 'a': |
outmode = OUTMODE_ALL; |
outmode = OUTMODE_ALL; |
Line 225 main(int argc, char *argv[]) |
|
Line 228 main(int argc, char *argv[]) |
|
} |
} |
defos = mandoc_strdup(optarg + 3); |
defos = mandoc_strdup(optarg + 3); |
break; |
break; |
case 'i': |
|
outmode = OUTMODE_INT; |
|
break; |
|
case 'K': |
case 'K': |
if ( ! koptions(&options, optarg)) |
if ( ! koptions(&options, optarg)) |
return (int)MANDOCLEVEL_BADARG; |
return (int)MANDOCLEVEL_BADARG; |
Line 950 toptions(struct curparse *curp, char *arg) |
|
Line 950 toptions(struct curparse *curp, char *arg) |
|
curp->outtype = OUTT_UTF8; |
curp->outtype = OUTT_UTF8; |
else if (0 == strcmp(arg, "locale")) |
else if (0 == strcmp(arg, "locale")) |
curp->outtype = OUTT_LOCALE; |
curp->outtype = OUTT_LOCALE; |
else if (0 == strcmp(arg, "xhtml")) |
|
curp->outtype = OUTT_HTML; |
|
else if (0 == strcmp(arg, "ps")) |
else if (0 == strcmp(arg, "ps")) |
curp->outtype = OUTT_PS; |
curp->outtype = OUTT_PS; |
else if (0 == strcmp(arg, "pdf")) |
else if (0 == strcmp(arg, "pdf")) |
|
|
woptions(struct curparse *curp, char *arg) |
woptions(struct curparse *curp, char *arg) |
{ |
{ |
char *v, *o; |
char *v, *o; |
const char *toks[7]; |
const char *toks[8]; |
|
|
toks[0] = "stop"; |
toks[0] = "stop"; |
toks[1] = "all"; |
toks[1] = "all"; |
toks[2] = "warning"; |
toks[2] = "style"; |
toks[3] = "error"; |
toks[3] = "warning"; |
toks[4] = "unsupp"; |
toks[4] = "error"; |
toks[5] = "fatal"; |
toks[5] = "unsupp"; |
toks[6] = NULL; |
toks[6] = "fatal"; |
|
toks[7] = NULL; |
|
|
while (*arg) { |
while (*arg) { |
o = arg; |
o = arg; |
Line 986 woptions(struct curparse *curp, char *arg) |
|
Line 985 woptions(struct curparse *curp, char *arg) |
|
break; |
break; |
case 1: |
case 1: |
case 2: |
case 2: |
curp->wlevel = MANDOCLEVEL_WARNING; |
curp->wlevel = MANDOCLEVEL_STYLE; |
break; |
break; |
case 3: |
case 3: |
curp->wlevel = MANDOCLEVEL_ERROR; |
curp->wlevel = MANDOCLEVEL_WARNING; |
break; |
break; |
case 4: |
case 4: |
curp->wlevel = MANDOCLEVEL_UNSUPP; |
curp->wlevel = MANDOCLEVEL_ERROR; |
break; |
break; |
case 5: |
case 5: |
|
curp->wlevel = MANDOCLEVEL_UNSUPP; |
|
break; |
|
case 6: |
curp->wlevel = MANDOCLEVEL_BADARG; |
curp->wlevel = MANDOCLEVEL_BADARG; |
break; |
break; |
default: |
default: |
Line 1002 woptions(struct curparse *curp, char *arg) |
|
Line 1004 woptions(struct curparse *curp, char *arg) |
|
return 0; |
return 0; |
} |
} |
} |
} |
|
|
return 1; |
return 1; |
} |
} |
|
|