(empfile[]) Add table of tables to empfile[].
This commit is contained in:
parent
c4c46190bf
commit
29d21997b9
4 changed files with 13 additions and 0 deletions
|
@ -107,6 +107,7 @@ struct empfile {
|
|||
#define EF_ITEM 21
|
||||
#define EF_INFRASTRUCTURE 22
|
||||
#define EF_PRODUCT 23
|
||||
#define EF_TABLE 24
|
||||
|
||||
#define EF_NMAP 222 /* Kinda bogus, but used to describe a newdesmap
|
||||
instead of bmap or map. */
|
||||
|
|
|
@ -204,6 +204,7 @@ extern struct castr trade_ca[];
|
|||
extern struct castr nat_ca[];
|
||||
extern struct castr intrchr_ca[];
|
||||
extern struct castr rpt_ca[];
|
||||
extern struct castr empfile_ca[];
|
||||
|
||||
/* src/lib/subs/nstr.c */
|
||||
extern int nstr_comp(struct nscstr *np, int len, int type, char *str);
|
||||
|
|
|
@ -135,6 +135,9 @@ struct empfile empfile[] = {
|
|||
{"product", NULL, EFF_MEM,
|
||||
0, sizeof(pchr[0]), NULL, NULL, NULL,
|
||||
-1, -1, 0, 0, (char *)pchr, 0, pchr_ca},
|
||||
{"table", NULL, EFF_MEM,
|
||||
0, sizeof(empfile[0]), NULL, NULL, NULL,
|
||||
-1, -1, 0, 0, (char *)empfile, 0, empfile_ca},
|
||||
|
||||
/* Sentinel */
|
||||
{NULL, NULL, 0,
|
||||
|
|
|
@ -51,6 +51,7 @@
|
|||
#include "commodity.h"
|
||||
#include "lost.h"
|
||||
#include "product.h"
|
||||
#include "file.h"
|
||||
|
||||
#define fldoff(str, fld) offsetof(struct str, fld)
|
||||
|
||||
|
@ -495,3 +496,10 @@ struct castr rpt_ca[] = {
|
|||
{NSC_NOTYPE, 0, 0, 0, NULL}
|
||||
};
|
||||
|
||||
struct castr empfile_ca[] = {
|
||||
{NSC_STRING, 0, 0, offsetof(struct empfile, name), "name"},
|
||||
{NSC_STRING, 0, 0, offsetof(struct empfile, file), "file_name"},
|
||||
{NSC_INT, 0, 0, offsetof(struct empfile, flags), "flags"},
|
||||
{NSC_NOTYPE, 0, 0, 0, NULL}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue