From bb33df56cbbb02650328dd201e2d9686363d15f5 Mon Sep 17 00:00:00 2001 From: sinanmohd Date: Sun, 23 Jun 2024 18:49:29 +0530 Subject: evanix: init arg parsing --- include/evanix.h | 15 +++++++++++++++ include/jobs.h | 2 +- include/util.h | 3 +++ 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 include/evanix.h (limited to 'include') 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 + +#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 #include #include @@ -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[]); -- cgit v1.2.3