diff options
Diffstat (limited to 'lib/xregcomp.c')
-rw-r--r-- | lib/xregcomp.c | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/lib/xregcomp.c b/lib/xregcomp.c deleted file mode 100644 index ec7d1b79..00000000 --- a/lib/xregcomp.c +++ /dev/null @@ -1,22 +0,0 @@ -/* Call regcomp() and handle errors. - * - * Copyright 2007 Rob Landley <rob@landley.net> - * - * This is a separate file so environments that haven't got regular expression - * support can configure this out and avoid a build break. - */ - -#include "toys.h" -#include "xregcomp.h" - -void xregcomp(regex_t *preg, char *regex, int cflags) -{ - int rc = regcomp(preg, regex, cflags); - - if (rc) { - char msg[256]; - regerror(rc, preg, msg, 255); - msg[255]=0; - error_exit("xregcomp: %s", msg); - } -} |