30static void init(
struct buffer *buf)
37static void add(
struct buffer *buf,
char c)
39 if (buf->len >= buf->alloc) {
41 buf->buf =
G_realloc(buf->buf, buf->alloc);
44 buf->buf[buf->len++] = c;
47static void fini(
struct buffer *buf)
52static const char *do_set(
struct buffer *buf,
const char *p)
66 for (; *p && *p !=
']'; p++)
77static int wc2regex(
struct buffer *buf,
const char *
pat)
86 for (p =
pat; p && *p; p++) {
126 if (!(p = do_set(buf, p)))
147static int re_filter(
const char *filename,
void *closure)
245 if (!wc2regex(&buf,
pat)) {
void G_free(void *)
Free allocated memory.
void G_set_ls_exclude_filter(int(*)(const char *, void *), void *)
void G_set_ls_filter(int(*)(const char *, void *), void *)
void * G_ls_regex_filter(const char *pat, int exclude, int extended, int ignorecase)
void G_free_ls_filter(void *regex)
void * G_ls_glob_filter(const char *pat, int exclude, int ignorecase)