summaryrefslogtreecommitdiff
path: root/src/cmd/5a/a.h
diff options
context:
space:
mode:
authorKai Backman <kaib@golang.org>2009-03-25 16:31:38 -0700
committerKai Backman <kaib@golang.org>2009-03-25 16:31:38 -0700
commit95207c8d8eda9ff909cd5ca6bbef053a6ce4bc92 (patch)
tree7191f3ca8fa4916312747c406979c1a9c420eba6 /src/cmd/5a/a.h
parent1a0719d5b94224238cf1b68c754a4f45ccdf8c5e (diff)
downloadgolang-95207c8d8eda9ff909cd5ca6bbef053a6ce4bc92.tar.gz
This is really two changes in one but given interdependencies
and expected review latency I needed to combine the CLs. 1. Made the 5* toolpath build using the go build system. Hooked the subdirectories to clean.bash but added a separate make5.bash for now. Minor massage to make the code more similar to the current structure of 6c/6a/6l. 2. Change all references from long to int32 in line with similar change for the other toolchains. The end result is that 5c, 5a and 5l can now be compiled and the executables start up properly. Haven't thrown any input at them yet. R=rsc APPROVED=rsc DELTA=1052 (392 added, 328 deleted, 332 changed) OCL=26757 CL=26761
Diffstat (limited to 'src/cmd/5a/a.h')
-rw-r--r--src/cmd/5a/a.h48
1 files changed, 14 insertions, 34 deletions
diff --git a/src/cmd/5a/a.h b/src/cmd/5a/a.h
index c93b73121..939ae563e 100644
--- a/src/cmd/5a/a.h
+++ b/src/cmd/5a/a.h
@@ -30,7 +30,8 @@
#include <lib9.h>
#include <bio.h>
-#include "../5c/5.out.h"
+#include "../5l/5.out.h"
+#include "compat.h"
#ifndef EXTERN
#define EXTERN extern
@@ -59,7 +60,7 @@ struct Sym
{
Sym* link;
char* macro;
- long value;
+ int32 value;
ushort type;
char *name;
char sym;
@@ -91,7 +92,7 @@ EXTERN struct
struct Gen
{
Sym* sym;
- long offset;
+ int32 offset;
short type;
short reg;
short name;
@@ -103,8 +104,8 @@ struct Hist
{
Hist* link;
char* name;
- long line;
- long offset;
+ int32 line;
+ int32 offset;
};
#define H ((Hist*)0)
@@ -130,25 +131,25 @@ EXTERN char* include[NINCLUDE];
EXTERN Io* iofree;
EXTERN Io* ionext;
EXTERN Io* iostack;
-EXTERN long lineno;
+EXTERN int32 lineno;
EXTERN int nerrors;
-EXTERN long nhunk;
+EXTERN int32 nhunk;
EXTERN int ninclude;
EXTERN Gen nullgen;
EXTERN char* outfile;
EXTERN int pass;
EXTERN char* pathname;
-EXTERN long pc;
+EXTERN int32 pc;
EXTERN int peekc;
EXTERN int sym;
EXTERN char symb[NSYMB];
EXTERN int thechar;
EXTERN char* thestring;
-EXTERN long thunk;
+EXTERN int32 thunk;
EXTERN Biobuf obuf;
-void* alloc(long);
-void* allocn(void*, long, long);
+void* alloc(int32);
+void* allocn(void*, int32, int32);
void errorexit(void);
void pushio(void);
void newio(void);
@@ -156,7 +157,7 @@ void newfile(char*, int);
Sym* slookup(char*);
Sym* lookup(void);
void syminit(Sym*);
-long yylex(void);
+int32 yylex(void);
int getc(void);
int getnsc(void);
void unget(int);
@@ -182,31 +183,10 @@ void macif(int);
void macend(void);
void outhist(void);
void dodefine(char*);
-void prfile(long);
+void prfile(int32);
void linehist(char*, int);
void gethunk(void);
void yyerror(char*, ...);
int yyparse(void);
void setinclude(char*);
int assemble(char*);
-
-/*
- * system-dependent stuff from ../cc/compat.c
- */
-
-enum /* keep in synch with ../cc/cc.h */
-{
- Plan9 = 1<<0,
- Unix = 1<<1,
- Windows = 1<<2,
-};
-int mywait(int*);
-int mycreat(char*, int);
-int systemtype(int);
-int pathchar(void);
-char* mygetwd(char*, int);
-int myexec(char*, char*[]);
-int mydup(int, int);
-int myfork(void);
-int mypipe(int*);
-void* mysbrk(ulong);