aboutsummaryrefslogtreecommitdiffhomepage
path: root/common.h
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2025-10-13 19:06:52 +0200
committerlemon <lsof@mailbox.org>2025-10-13 19:09:48 +0200
commit9812f88a9a612144bea02c7acf499867eb0cbeb9 (patch)
tree0575b7c6b6b72b0683c4ffae108292b3d44998be /common.h
parent3048a0b59baae16727d0c259353ff4be1ae559b4 (diff)
implement most of preprocessor
- concatenation (##) - builtin macros (__FILE__ etc) - fails in some edge cases, and code needs cleanup - add embedded system include files (stddef.h, stdarg.h for now) - can handle stdio.h now
Diffstat (limited to 'common.h')
-rw-r--r--common.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/common.h b/common.h
index f9cc203..0269aa7 100644
--- a/common.h
+++ b/common.h
@@ -137,6 +137,10 @@ struct option {
} dbg;
};
extern struct option ccopt;
+extern struct inclpaths {
+ struct inclpaths *next;
+ const char *path;
+} *cinclpaths;
/*************************/
/** TYPE REPRESENTATION **/
@@ -531,6 +535,13 @@ struct wbuf {
struct memfile {
const uchar *p;
uint n;
+ bool statik;
+};
+
+struct embedfile {
+ const char *name;
+ const char *s;
+ size_t len;
};
#define MEMBUF(buf, cap) { (buf), (cap), .fd = -1 }