aboutsummaryrefslogtreecommitdiff
path: root/sys/cmd/cc/cc.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/cmd/cc/cc.h')
-rw-r--r--sys/cmd/cc/cc.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/sys/cmd/cc/cc.h b/sys/cmd/cc/cc.h
index 84f173f..0e525be 100644
--- a/sys/cmd/cc/cc.h
+++ b/sys/cmd/cc/cc.h
@@ -235,8 +235,9 @@ struct SymTab
Sym **vals;
};
-Sym *lookup(SymTab *tab, string ident);
Sym *define(SymTab *tab, string ident, int kind);
+Sym *lookup(SymTab *tab, string ident);
+error forget(SymTab *tab, string ident);
struct Lexer
{
@@ -363,8 +364,8 @@ struct Decl
enum
{
IOnil = iota(0),
- IOonce = iota(1),
- IOmac = iota(2),
+ IOfile = iota(1),
+ IObuff = iota(2),
};
struct Io
@@ -381,6 +382,7 @@ struct Io
struct Io *link;
};
+/* cc.c io functions */
Io* openio(byte *path);
Io* makeio();
void freeio(Io *io);
@@ -396,6 +398,7 @@ struct StrTab
int32 *vals;
};
+/* cc.c string functions */
int32 intern(byte **str);
string internview(byte* beg, byte *end);
@@ -413,6 +416,11 @@ struct Compiler
Io *io;
Io iostk[100];
+ struct {
+ int cap;
+ int len;
+ string *path;
+ } omit;
string outfile;
@@ -420,6 +428,8 @@ struct Compiler
};
extern Compiler C;
-void init();
+/* cc.c compiler functions */
+void pushomit(string omit);
+void init();
#undef iota