summaryrefslogtreecommitdiff
path: root/includes/compiler/CPrep.h
diff options
context:
space:
mode:
authorAsh Wolf <ninji@wuffs.org>2022-11-20 00:07:22 -0500
committerAsh Wolf <ninji@wuffs.org>2022-11-20 00:07:22 -0500
commit9d2728a5605f651934fe67a6fe6986b3e4a2c011 (patch)
treee81e0a3588a0c8d1855bf28316efe27d86b04d66 /includes/compiler/CPrep.h
parent9a46dd0e2e80790d9848c0bbd718932a27c23269 (diff)
downloadMWCC-9d2728a5605f651934fe67a6fe6986b3e4a2c011.tar.gz
MWCC-9d2728a5605f651934fe67a6fe6986b3e4a2c011.zip
add a bunch of code and a ton of stub files for later
Diffstat (limited to '')
-rw-r--r--includes/compiler/CPrep.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/includes/compiler/CPrep.h b/includes/compiler/CPrep.h
index a681ec5..749303d 100644
--- a/includes/compiler/CPrep.h
+++ b/includes/compiler/CPrep.h
@@ -24,6 +24,15 @@ typedef struct TokenStack {
Boolean macrocheck;
} TokenStack;
+//#define OPT_OFFSET(optname) ((short) (((char *) (&copts.optname)) - ((char *) &copts)))
+#define OPT_OFFSET(optname) ((short) ( &((COpts *)0)->optname ))
+enum {
+ OPT_OFFSET_MASK = 0x1FFF,
+ OPT_FLAG_2000 = 0x2000,
+ OPT_FLAG_4000 = 0x4000,
+ OPT_FLAG_8000 = 0x8000
+};
+
extern CParams *cparamblkptr;
extern short tk;
extern CInt64 tkintconst;
@@ -71,9 +80,12 @@ extern void CPrep_RemoveSpecialMacros(void);
extern Boolean setupprep(void);
extern void cleanupprep(void);
extern void CPrep_TSBufferGrow(int amount);
+// this is actually an arg of `PrepState *`
extern void CPrep_TokenStreamGetState(SInt32 *state);
+// this is actually an arg of `const PrepState *`
extern void CPrep_TokenStreamSetState(SInt32 *state);
extern void CPrep_UnLex(void);
+// this is actually an arg of `const PrepState *`
extern void CPrep_TokenStreamSetCurState(SInt32 *state);
typedef void (*CPrepStreamFuncPtr)(TStreamElement *);
extern void CPrep_StreamGetBlock(TStream *stream, CPrepStreamFuncPtr func, int arg);