8 /* naive and wrong regex stubs */
9 typedef struct regex_t {
13 typedef size_t regoff_t;
15 typedef struct regmatch_t {
20 #define REG_EXTENDED 1
29 int regcomp(regex_t *regex, const char *pattern, int cflags)
32 regex->pattern = _strdup(pattern);
36 int regexec(const regex_t *regex, const char *haystack, size_t nmatch, regmatch_t pmatch[], int flags)
39 const char *pattern = regex->pattern;
40 for (i = 0; pattern[i] != '\0'; ++i) {
41 if (pattern[i] != haystack[i])
47 void regfree(regex_t *regex)