summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2020-03-27 16:31:31 -0400
committerJakob Kaivo <jkk@ung.org>2020-03-27 16:31:31 -0400
commit2a15bdb94ea913b361c026541eff3cfdcffccde6 (patch)
tree0816fd74815dcb60644b138145c7b551caa63ed9
parent7cffb54ce1a5956fdd41741a66de4026fe3ba2ac (diff)
fix pattern for possible whitespace
-rw-r--r--main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main.c b/main.c
index c04f168..39b9683 100644
--- a/main.c
+++ b/main.c
@@ -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");