(castr,empfile,ship_chr,plane_chr,land_chr,nuke_chr):

Add table index to castr to create a reference to the symbol table.
Add "ship chr flags" table to empfile.
Add "plane chr flags" table to empfile.
Add "land chr flags" table to empfile.
Add "nuke chr flags" table to empfile.
Add EF_SHIP_CHR_FLAGS reference to ship_chr.
Add EF_PLANE_CHR_FLAGS reference to plane_chr.
Add EF_LAND_CHR_FLAGS reference to land_chr.
Add EF_NUKE_CHR_FLAGS reference to nuke_chr.

(show_ship_capab,show_plane_capab,show_land_capab,
show_nuke_capab,ship_flags,land_flags,plane_flags,nuke_flags):
Move ship_flags nsc.c from show.c
Rename ship_flags to ship_chr_flags.
Move plane_flags nsc.c from show.c
Rename plane_flags to plane_chr_flags.
Move land_flags nsc.c from show.c
Rename land_flags to land_chr_flags.
Move nuke_flags nsc.c from show.c
Rename nuke_flags to nuke_chr_flags.
This is to accomodate future symbol table for EF_PLANE table.
This commit is contained in:
Ron Koenderink 2005-10-22 16:39:45 +00:00
parent cf4faac293
commit fcf5c59513
5 changed files with 454 additions and 429 deletions

View file

@ -168,6 +168,14 @@ struct nstr_item {
struct nscstr cond[NS_NCOND]; /* selection conditions */
};
/*
* Symbol table definition
*/
struct lookup {
int key;
s_char *value;
};
/*
* Selector descriptor.
* Value is at offset CA_OFF in the context object.
@ -178,6 +186,7 @@ struct castr {
unsigned short ca_len; /* non-zero: is an array; #array elements */
ptrdiff_t ca_off;
char *ca_name;
int ca_table; /* table index -- symbols, symbol sets */
};
/* variables using the above */
@ -205,6 +214,11 @@ extern struct castr nat_ca[];
extern struct castr intrchr_ca[];
extern struct castr rpt_ca[];
extern struct castr empfile_ca[];
extern struct castr lookup_ca[];
extern struct lookup ship_chr_flags[];
extern struct lookup plane_chr_flags[];
extern struct lookup land_chr_flags[];
extern struct lookup nuke_chr_flags[];
/* src/lib/subs/nstr.c */
extern int nstr_comp(struct nscstr *np, int len, int type, char *str);