source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mdocml: The apropos(1) manual still documents the unary -i operator for
@ 2017-04-18 15:07 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2017-04-18 15:07 UTC (permalink / raw)
  To: source

Log Message:
-----------
The apropos(1) manual still documents the unary -i operator for
regular expression search terms, but it appears that somewhere 
along the way, the implementation got lost, so restore it.
Bug found while investigating other reports from Gonzalo Tornaria.

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

Revision Data
-------------
Index: mansearch.c
===================================================================
RCS file: /home/cvs/mdocml/mdocml/mansearch.c,v
retrieving revision 1.71
retrieving revision 1.72
diff -Lmansearch.c -Lmansearch.c -u -p -r1.71 -r1.72
--- mansearch.c
+++ mansearch.c
@@ -672,6 +672,12 @@ exprterm(const struct mansearch *search,
 		return e;
 	}
 
+	if (strcmp("-i", argv[*argi]) == 0 && *argi + 1 < argc) {
+		cs = 0;
+		++*argi;
+	} else
+		cs = 1;
+
 	e = mandoc_calloc(1, sizeof(*e));
 	e->type = EXPR_TERM;
 	e->bits = 0;
@@ -690,7 +696,6 @@ exprterm(const struct mansearch *search,
 	 * If needed, request regular expression handling.
 	 */
 
-	cs = 1;
 	if (search->argmode == ARG_WORD) {
 		e->bits = TYPE_Nm;
 		e->match.type = DBM_REGEX;
--
 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:[~2017-04-18 15:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-18 15:07 mdocml: The apropos(1) manual still documents the unary -i operator for 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).