source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mdocml: When interpreting the -O argument as a macro name fails, fall
@ 2015-03-11 13:11 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2015-03-11 13:11 UTC (permalink / raw)
  To: source

Log Message:
-----------
When interpreting the -O argument as a macro name fails,
fall back to showing Nd rather than not showing anything.
Issue reported by jmc@.

Modified Files:
--------------
    mdocml:
        mansearch.c
        TODO

Revision Data
-------------
Index: mansearch.c
===================================================================
RCS file: /home/cvs/mdocml/mdocml/mansearch.c,v
retrieving revision 1.54
retrieving revision 1.55
diff -Lmansearch.c -Lmansearch.c -u -p -r1.54 -r1.55
--- mansearch.c
+++ mansearch.c
@@ -195,8 +195,8 @@ mansearch(const struct mansearch *search
 	if (NULL == (e = exprcomp(search, argc, argv)))
 		goto out;
 
-	outbit = 0;
 	if (NULL != search->outkey) {
+		outbit = TYPE_Nd;
 		for (indexbit = 0, iterbit = 1;
 		     indexbit < mansearch_keymax;
 		     indexbit++, iterbit <<= 1) {
@@ -206,7 +206,8 @@ mansearch(const struct mansearch *search
 				break;
 			}
 		}
-	}
+	} else
+		outbit = 0;
 
 	/*
 	 * Save a descriptor to the current working directory.
Index: TODO
===================================================================
RCS file: /home/cvs/mdocml/mdocml/TODO,v
retrieving revision 1.201
retrieving revision 1.202
diff -LTODO -LTODO -u -p -r1.201 -r1.202
--- TODO
+++ TODO
@@ -557,6 +557,11 @@ Several areas can be cleaned up to make 
 * structural issues
 ************************************************************************
 
+- Improve -O suboption parsing.  Do it in the main program such that
+  errors can be reported.  Pay attention to distinguishing the
+  mandoc(1) and apropos(1) styles of both options.
+  loc **  exist *  algo **  size **  imp ***
+
 - Use libz directly instead of forking gunzip(1).
   Suggested by bapt at FreeBSD among others.
 
--
 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:[~2015-03-11 13:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-11 13:11 mdocml: When interpreting the -O argument as a macro name fails, fall 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).