diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2022-02-04 11:23:27 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2022-02-04 11:28:22 -0500 |
commit | 2d4d6787c4bc62042be4a58a4791074ab2c6a89e (patch) | |
tree | 0753c783533afc2bc3362f73ba3e8c2e45f1e65b /util.c | |
parent | d83ffb41c7f5d42bfb43a19e38ab3d1331f0d86e (diff) | |
download | bfs-2d4d6787c4bc62042be4a58a4791074ab2c6a89e.tar.xz |
regex: Add support for emacs and grep types
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 11 |
1 files changed, 1 insertions, 10 deletions
@@ -115,15 +115,6 @@ int pipe_cloexec(int pipefd[2]) { #endif } -char *xregerror(int err, const regex_t *regex) { - size_t len = regerror(err, regex, NULL, 0); - char *str = malloc(len); - if (str) { - regerror(err, regex, str, len); - } - return str; -} - /** Get the single character describing the given file type. */ static char type_char(mode_t mode) { switch (mode & S_IFMT) { @@ -273,7 +264,7 @@ static int xrpregex(nl_item item, const char *response) { } regex_t regex; - int ret = regcomp(®ex, pattern, REG_EXTENDED); + int ret = bfs_regcomp(®ex, pattern, 0, BFS_REGEX_POSIX_EXTENDED); if (ret != 0) { return ret; } |