source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mdocml: Use -m for macro set selection in mandoc(1) mode only, not in
@ 2014-12-21 14:49 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2014-12-21 14:49 UTC (permalink / raw)
  To: source

Log Message:
-----------
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>.

Modified Files:
--------------
    mdocml:
        main.c

Revision Data
-------------
Index: main.c
===================================================================
RCS file: /home/cvs/mdocml/mdocml/main.c,v
retrieving revision 1.208
retrieving revision 1.209
diff -Lmain.c -Lmain.c -u -p -r1.208 -r1.209
--- main.c
+++ main.c
@@ -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 *ar
 	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 *ar
 			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);
 		}
--
 To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-12-21 14:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-21 14:49 mdocml: Use -m for macro set selection in mandoc(1) mode only, not in schwarze

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).