summaryrefslogtreecommitdiff
path: root/maje.h
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2020-01-14 15:56:22 -0500
committerJakob Kaivo <jkk@ung.org>2020-01-14 15:56:22 -0500
commitef68a24f9dbb9ea7d29d8c3ef483b136f49c6cb0 (patch)
tree058c2c8b24de405751eb5b74913c020c4f0294f3 /maje.h
parentf2263ff211aba3e6af4658b416f3a7bef7dcc852 (diff)
use a struct to cache stat() information
Diffstat (limited to 'maje.h')
-rw-r--r--maje.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/maje.h b/maje.h
index 8262967..e51fe6b 100644
--- a/maje.h
+++ b/maje.h
@@ -1,3 +1,15 @@
-char **find_source_files(const char *path);
-char *find_main(char **sources);
-void make_makefile(const char *makefile, char **sources, const char *target);
+#ifndef MAJE_H
+#define MAJE_H
+
+#include <sys/stat.h>
+
+struct majefile {
+ struct stat st;
+ char path[];
+};
+
+struct majefile **find_source_files(const char *path);
+char *find_main(struct majefile **sources);
+void make_makefile(const char *makefile, struct majefile **sources, const char *target);
+
+#endif