summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorsinanmohd <sinan@sinanmohd.com>2024-06-23 18:49:29 +0530
committersinanmohd <sinan@sinanmohd.com>2024-06-24 11:15:39 +0530
commitbb33df56cbbb02650328dd201e2d9686363d15f5 (patch)
tree048b2066bff4b7b4e5c2d85212de087c2b1a73a5 /include
parenta3c16056c2ea8083db39054271f1118aed37ccc3 (diff)
evanix: init arg parsing
Diffstat (limited to 'include')
-rw-r--r--include/evanix.h15
-rw-r--r--include/jobs.h2
-rw-r--r--include/util.h3
3 files changed, 19 insertions, 1 deletions
diff --git a/include/evanix.h b/include/evanix.h
new file mode 100644
index 0000000..aa53b9f
--- /dev/null
+++ b/include/evanix.h
@@ -0,0 +1,15 @@
+#include <stdbool.h>
+
+#ifndef EVANIX_H
+
+struct evanix_opts_t {
+ bool isflake;
+ bool isdryrun;
+ bool ispipelined;
+ bool close_stderr_exec;
+};
+
+extern struct evanix_opts_t evanix_opts;
+
+#define EVANIX_H
+#endif
diff --git a/include/jobs.h b/include/jobs.h
index d4916f7..2357680 100644
--- a/include/jobs.h
+++ b/include/jobs.h
@@ -33,7 +33,7 @@ typedef enum {
} job_read_state_t;
int job_read(FILE *stream, struct job **jobs);
-int jobs_init(FILE **stream);
+int jobs_init(FILE **stream, char *expr);
void job_free(struct job *j);
int job_parents_list_insert(struct job *job, struct job *parent);
void job_deps_list_rm(struct job *job, struct job *dep);
diff --git a/include/util.h b/include/util.h
index 130bbdd..7c15354 100644
--- a/include/util.h
+++ b/include/util.h
@@ -1,3 +1,4 @@
+#include <stdbool.h>
#include <stdio.h>
#include <cjson/cJSON.h>
@@ -14,3 +15,5 @@
int json_streaming_read(FILE *stream, cJSON **json);
int vpopen(FILE **stream, const char *file, char *const argv[]);
+int atob(const char *s);
+int run(const char *file, char *argv[]);