diff --git a/include/file.h b/include/file.h index f9e01ada..9fae5c18 100644 --- a/include/file.h +++ b/include/file.h @@ -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. */ diff --git a/include/nsc.h b/include/nsc.h index 40e40bf3..16761f12 100644 --- a/include/nsc.h +++ b/include/nsc.h @@ -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); diff --git a/src/lib/global/file.c b/src/lib/global/file.c index e64748cf..ad62f5f1 100644 --- a/src/lib/global/file.c +++ b/src/lib/global/file.c @@ -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, diff --git a/src/lib/global/nsc.c b/src/lib/global/nsc.c index 9989732c..444f51de 100644 --- a/src/lib/global/nsc.c +++ b/src/lib/global/nsc.c @@ -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} +}; +