diff options
author | Jakob Kaivo <jkk@ung.org> | 2020-03-27 16:31:31 -0400 |
---|---|---|
committer | Jakob Kaivo <jkk@ung.org> | 2020-03-27 16:31:31 -0400 |
commit | 2a15bdb94ea913b361c026541eff3cfdcffccde6 (patch) | |
tree | 0816fd74815dcb60644b138145c7b551caa63ed9 | |
parent | 7cffb54ce1a5956fdd41741a66de4026fe3ba2ac (diff) |
fix pattern for possible whitespace
-rw-r--r-- | main.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -38,7 +38,7 @@ static bool matches(const struct majefile * restrict file, const regex_t * restr char *find_main(struct majefile *sources) { regex_t re; - int rc = regcomp(&re, "int[[:space:]]+main[[:space:]\\(]", + int rc = regcomp(&re, "int[[:space:]]+main[[:space:]]*\\(", REG_EXTENDED | REG_NEWLINE | REG_NOSUB); if (rc != 0) { fprintf(stderr, "maje: regcomp() failed\n"); |