]> git.notmuchmail.org Git - notmuch/blobdiff - util/xutil.c
emacs: Add new option notmuch-search-hide-excluded
[notmuch] / util / xutil.c
index 15ff7650c3b5cc7782726c88f781ec20106baf95..07a00343c3900f8c782c4c7778dee9abba1f3f1c 100644 (file)
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see http://www.gnu.org/licenses/ .
+ * along with this program.  If not, see https://www.gnu.org/licenses/ .
  *
  * Author: Carl Worth <cworth@cworth.org>
  */
@@ -99,7 +99,7 @@ xstrndup (const char *s, size_t n)
     return ret;
 }
 
-void
+int
 xregcomp (regex_t *preg, const char *regex, int cflags)
 {
     int rerr;
@@ -110,9 +110,12 @@ xregcomp (regex_t *preg, const char *regex, int cflags)
        char *error = xmalloc (error_size);
 
        regerror (rerr, preg, error, error_size);
-       INTERNAL_ERROR ("compiling regex %s: %s\n",
-                       regex, error);
+       fprintf (stderr, "compiling regex %s: %s\n",
+                regex, error);
+       free (error);
+       return 1;
     }
+    return 0;
 }
 
 int