Rename addr_t to address_t to avoid clashes with the system addr_t.

This commit is contained in:
David Given 2016-11-11 20:17:10 +01:00
parent e7eb563ee9
commit d82df74a7a
4 changed files with 11 additions and 5 deletions

View file

@ -12,13 +12,13 @@ typedef struct cost {
typedef struct { typedef struct {
string ea_str; string ea_str;
word ea_off; word ea_off;
} addr_t; } address_t;
typedef struct { typedef struct {
int t_token; /* kind of token, -1 for register */ int t_token; /* kind of token, -1 for register */
union { union {
word aw; /* integer type */ word aw; /* integer type */
addr_t aa; /* address type */ address_t aa; /* address type */
int ar; /* register type */ int ar; /* register type */
} t_att[TOKENSIZE]; } t_att[TOKENSIZE];
} token_t,*token_p; } token_t,*token_p;

View file

@ -72,7 +72,7 @@ genstr(stringno) {
fputs(codestrings[stringno],codefile); fputs(codestrings[stringno],codefile);
} }
string ad2str(ad) addr_t ad; { string ad2str(ad) address_t ad; {
static char buf[100]; static char buf[100];
if (ad.ea_str==0) if (ad.ea_str==0)
@ -87,7 +87,7 @@ string ad2str(ad) addr_t ad; {
return(mystrcpy(buf)); return(mystrcpy(buf));
} }
praddr(ad) addr_t ad; { praddr(ad) address_t ad; {
if (ad.ea_str==0 || *(ad.ea_str) == '\0') if (ad.ea_str==0 || *(ad.ea_str) == '\0')
fprintf(codefile,WRD_FMT,ad.ea_off); fprintf(codefile,WRD_FMT,ad.ea_off);

View file

@ -9,7 +9,7 @@ struct result {
union { union {
word e_con; word e_con;
int e_reg; int e_reg;
addr_t e_addr; address_t e_addr;
} e_v; /* value */ } e_v; /* value */
}; };

View file

@ -1,3 +1,8 @@
clibrary {
name = "headers",
hdrs = { "./src/*.h" }
}
cprogram { cprogram {
name = "llgen", name = "llgen",
@ -6,6 +11,7 @@ cprogram {
-- do this. -- do this.
srcs = { "./src/*.c" }, srcs = { "./src/*.c" },
deps = { "+headers" },
vars = { vars = {
["+cflags"] = { ["+cflags"] = {
"-DLIBDIR=\\\""..posix.getcwd().."/"..cwd().."/lib\\\"", "-DLIBDIR=\\\""..posix.getcwd().."/"..cwd().."/lib\\\"",