]> git.cameronkatri.com Git - mandoc.git/blobdiff - mansearch.c
style message about duplicate RCS ids; inspired by mdoclint
[mandoc.git] / mansearch.c
index 1a5eba7fd402c73d65859b86796ea133fdb1f7b1..26a7c23f589c9bc0a0ce5e5793302086c0faa0fb 100644 (file)
@@ -155,7 +155,8 @@ mansearch(const struct mansearch *search,
                chdir_status = 1;
 
                if (dbm_open(MANDOC_DB) == -1) {
-                       warn("%s/%s", paths->paths[i], MANDOC_DB);
+                       if (errno != ENOENT)
+                               warn("%s/%s", paths->paths[i], MANDOC_DB);
                        continue;
                }
 
@@ -672,6 +673,12 @@ exprterm(const struct mansearch *search, int argc, char *argv[], int *argi)
                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 +697,6 @@ exprterm(const struct mansearch *search, int argc, char *argv[], int *argi)
         * If needed, request regular expression handling.
         */
 
-       cs = 1;
        if (search->argmode == ARG_WORD) {
                e->bits = TYPE_Nm;
                e->match.type = DBM_REGEX;