aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorShav Kinderlehrer <[email protected]>2023-04-12 23:46:53 -0400
committerShav Kinderlehrer <[email protected]>2023-04-12 23:46:53 -0400
commit58e0d435c38c0b4e6c59244436556dba6ed96abf (patch)
tree8876d6c5d2d7bdbb4e0bfef1eda33e49bf1f1da3 /include
parentc760493f48e4f8c6fd9f3effb5082d263128548c (diff)
downloadlat-58e0d435c38c0b4e6c59244436556dba6ed96abf.tar.gz
lat-58e0d435c38c0b4e6c59244436556dba6ed96abf.zip
Add argsv0.4.0
- add color arg - add lines arg
Diffstat (limited to 'include')
-rw-r--r--include/arg.h14
-rw-r--r--include/file.h4
-rw-r--r--include/util.h1
3 files changed, 17 insertions, 2 deletions
diff --git a/include/arg.h b/include/arg.h
new file mode 100644
index 0000000..be7ca0e
--- /dev/null
+++ b/include/arg.h
@@ -0,0 +1,14 @@
+#ifndef ARG_H
+#define ARG_H
+#include <stdbool.h>
+
+struct config {
+ bool color;
+ bool lines;
+};
+
+extern struct config conf;
+
+int parseargs(int argc, char *argv[]);
+
+#endif
diff --git a/include/file.h b/include/file.h
index 8dbaf86..df3b515 100644
--- a/include/file.h
+++ b/include/file.h
@@ -1,7 +1,7 @@
-#include <stdio.h>
-
#ifndef FILE_H
#define FILE_H
+
+#include <stdio.h>
struct filedata {
int lc;
size_t len;
diff --git a/include/util.h b/include/util.h
index ddb86fc..1b0243c 100644
--- a/include/util.h
+++ b/include/util.h
@@ -1,5 +1,6 @@
#ifndef LIB_H
#define LIB_H
+#include <stdbool.h>
#include <stddef.h>
void die(const char *message);