util: add eregcomp: show descriptive error message on regcomp error

This commit is contained in:
Hiltjo Posthuma
2014-11-16 15:16:14 +01:00
committed by sin
parent 25e3e068ed
commit ce90cc57d4
3 changed files with 31 additions and 0 deletions

5
util.h
View File

@@ -1,4 +1,5 @@
/* See LICENSE file for copyright and license details. */
#include <regex.h>
#include <stddef.h>
#include <sys/types.h>
#include "arg.h"
@@ -34,6 +35,10 @@ size_t strlcat(char *, const char *, size_t);
#undef strlcpy
size_t strlcpy(char *, const char *, size_t);
/* regex */
int enregcomp(int, regex_t *, const char *, int);
int eregcomp(regex_t *, const char *, int);
/* misc */
void enmasse(int, char **, int (*)(const char *, const char *));
void fnck(const char *, const char *, int (*)(const char *, const char *));