From 2a15bdb94ea913b361c026541eff3cfdcffccde6 Mon Sep 17 00:00:00 2001
From: Jakob Kaivo <jkk@ung.org>
Date: Fri, 27 Mar 2020 16:31:31 -0400
Subject: fix pattern for possible whitespace

---
 main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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");
-- 
cgit v1.2.1