From 7a87830f5eb32373bc17235e9d178d383830dc64 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Sun, 23 Oct 2011 17:52:19 -0300 Subject: xregcomp: don't consider every regex compilation failure an internal error. This pushes the error handling up one step, but makes the function more flexible. Running out of memory still triggers an internal error, in the spirit of other xutils functions. --- util/xutil.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'util/xutil.h') diff --git a/util/xutil.h b/util/xutil.h index fd77f733..92992564 100644 --- a/util/xutil.h +++ b/util/xutil.h @@ -43,7 +43,8 @@ xstrdup (const char *s); char * xstrndup (const char *s, size_t n); -void +/* Returns 0 for successful compilation, 1 otherwise */ +int xregcomp (regex_t *preg, const char *regex, int cflags); int -- cgit v1.2.3