summaryrefslogtreecommitdiff
path: root/grep.c
diff options
context:
space:
mode:
Diffstat (limited to 'grep.c')
-rw-r--r--grep.c19
1 files changed, 1 insertions, 18 deletions
diff --git a/grep.c b/grep.c
index 070502b..951e90e 100644
--- a/grep.c
+++ b/grep.c
@@ -60,12 +60,9 @@ static int grep_match(struct grep_list *head, const char *buf)
continue;
}
- printf("%s => ", buf);
- int e;
- if ((e = regexec(&(c->re), buf, 0, NULL, REG_NOSUB)) == 0) {
+ if (regexec(&(c->re), buf, 0, NULL, 0) == 0) {
return 1;
}
- printf("%d\n", e);
}
return 0;
@@ -245,20 +242,6 @@ int main(int argc, char *argv[])
found += grep(head, argv[optind++], flags);
} while (optind < argc);
- printf("REG_BADBR=%d\n", REG_BADBR);
- printf("REG_BADPAT=%d\n", REG_BADPAT);
- printf("REG_BADRPT=%d\n", REG_BADRPT);
- printf("REG_EBRACE=%d\n", REG_EBRACE);
- printf("REG_EBRACK=%d\n", REG_EBRACK);
- printf("REG_ECOLLATE=%d\n", REG_ECOLLATE);
- printf("REG_ECTYPE=%d\n", REG_ECTYPE);
- printf("REG_EESCAPE=%d\n", REG_EESCAPE);
- printf("REG_EPAREN=%d\n", REG_EPAREN);
- printf("REG_ERANGE=%d\n", REG_ERANGE);
- printf("REG_ESPACE=%d\n", REG_ESPACE);
- printf("REG_ESUBREG=%d\n", REG_ESUBREG);
- printf("REG_NOMATCH=%d\n", REG_NOMATCH);
-
if (found) {
return 0;
}