aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/main.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-12-21 14:49:28 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-12-21 14:49:28 +0000
commit18c016fc3808867de2d3800f95abee7d75e409df (patch)
tree1dbf8c05f54f627c7446c402766d65eb5e88358c /main.c
parentbb55d4fd965b9c585c8757d36f150f45794917d5 (diff)
downloadmandoc-18c016fc3808867de2d3800f95abee7d75e409df.tar.gz
mandoc-18c016fc3808867de2d3800f95abee7d75e409df.tar.zst
mandoc-18c016fc3808867de2d3800f95abee7d75e409df.zip
Use -m for macro set selection in mandoc(1) mode only, not in man(1)
and apropos(1) mode. While here, put a space character between options and option arguments in error messages. Both reported by Alessandro DE LAURENZIS <just22 dot adl at gmail dot com>.
Diffstat (limited to 'main.c')
-rw-r--r--main.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/main.c b/main.c
index 345cf318..2f062788 100644
--- a/main.c
+++ b/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.208 2014/12/18 21:11:46 schwarze Exp $ */
+/* $Id: main.c,v 1.209 2014/12/21 14:49:28 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2011, 2012, 2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -206,13 +206,13 @@ main(int argc, char *argv[])
case 'I':
if (strncmp(optarg, "os=", 3)) {
fprintf(stderr,
- "%s: -I%s: Bad argument\n",
+ "%s: -I %s: Bad argument\n",
progname, optarg);
return((int)MANDOCLEVEL_BADARG);
}
if (defos) {
fprintf(stderr,
- "%s: -I%s: Duplicate argument\n",
+ "%s: -I %s: Duplicate argument\n",
progname, optarg);
return((int)MANDOCLEVEL_BADARG);
}
@@ -401,7 +401,7 @@ main(int argc, char *argv[])
/* mandoc(1) */
- if ( ! moptions(&options, auxpaths))
+ if (search.argmode == ARG_FILE && ! moptions(&options, auxpaths))
return((int)MANDOCLEVEL_BADARG);
if (use_pager && isatty(STDOUT_FILENO))
@@ -700,7 +700,7 @@ koptions(int *options, char *arg)
} else if ( ! strcmp(arg, "us-ascii")) {
*options &= ~(MPARSE_UTF8 | MPARSE_LATIN1);
} else {
- fprintf(stderr, "%s: -K%s: Bad argument\n",
+ fprintf(stderr, "%s: -K %s: Bad argument\n",
progname, arg);
return(0);
}
@@ -720,7 +720,7 @@ moptions(int *options, char *arg)
else if (0 == strcmp(arg, "an"))
*options |= MPARSE_MAN;
else {
- fprintf(stderr, "%s: -m%s: Bad argument\n",
+ fprintf(stderr, "%s: -m %s: Bad argument\n",
progname, arg);
return(0);
}
@@ -754,7 +754,7 @@ toptions(struct curparse *curp, char *arg)
else if (0 == strcmp(arg, "pdf"))
curp->outtype = OUTT_PDF;
else {
- fprintf(stderr, "%s: -T%s: Bad argument\n",
+ fprintf(stderr, "%s: -T %s: Bad argument\n",
progname, arg);
return(0);
}
@@ -793,7 +793,7 @@ woptions(struct curparse *curp, char *arg)
curp->wlevel = MANDOCLEVEL_FATAL;
break;
default:
- fprintf(stderr, "%s: -W%s: Bad argument\n",
+ fprintf(stderr, "%s: -W %s: Bad argument\n",
progname, o);
return(0);
}