summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--utils/qa/a.h10
-rw-r--r--utils/qa/lex.c3
-rw-r--r--utils/ql/asmout.c2
-rw-r--r--utils/ql/l.h5
4 files changed, 14 insertions, 6 deletions
diff --git a/utils/qa/a.h b/utils/qa/a.h
index f7fce238..a0163ed5 100644
--- a/utils/qa/a.h
+++ b/utils/qa/a.h
@@ -55,11 +55,12 @@ struct Sym
};
#define S ((Sym*)0)
-struct
+struct s_fi
{
char* p;
int c;
-} fi;
+};
+extern struct s_fi fi;
struct Io
{
@@ -71,11 +72,12 @@ struct Io
};
#define I ((Io*)0)
-struct
+struct s_h
{
Sym* sym;
short type;
-} h[NSYM];
+};
+extern struct s_h h[NSYM];
struct Gen
{
diff --git a/utils/qa/lex.c b/utils/qa/lex.c
index afa3a708..0d79cf1a 100644
--- a/utils/qa/lex.c
+++ b/utils/qa/lex.c
@@ -3,6 +3,9 @@
#include "y.tab.h"
#include <ctype.h>
+struct s_fi fi;
+struct s_h h[NSYM];
+
void
main(int argc, char *argv[])
{
diff --git a/utils/ql/asmout.c b/utils/ql/asmout.c
index 4e685a9c..23f2a4a7 100644
--- a/utils/ql/asmout.c
+++ b/utils/ql/asmout.c
@@ -1,5 +1,7 @@
#include "l.h"
+struct s_oprange oprange[ALAST];
+
#define OPVCC(o,xo,oe,rc) (((o)<<26)|((xo)<<1)|((oe)<<10)|((rc)&1))
#define OPCC(o,xo,rc) OPVCC((o),(xo),0,(rc))
#define OP(o,xo) OPVCC((o),(xo),0,0)
diff --git a/utils/ql/l.h b/utils/ql/l.h
index 6baabc3b..b23d8440 100644
--- a/utils/ql/l.h
+++ b/utils/ql/l.h
@@ -86,11 +86,12 @@ struct Optab
char size;
char param;
};
-struct
+struct s_oprange
{
Optab* start;
Optab* stop;
-} oprange[ALAST];
+};
+extern struct s_oprange oprange[ALAST];
enum
{