]> git.pond.sub.org Git - empserver/commitdiff
(empfile[]) Add table of tables to empfile[].
authorRon Koenderink <rkoenderink@yahoo.ca>
Sat, 22 Oct 2005 12:38:58 +0000 (12:38 +0000)
committerRon Koenderink <rkoenderink@yahoo.ca>
Sat, 22 Oct 2005 12:38:58 +0000 (12:38 +0000)
include/file.h
include/nsc.h
src/lib/global/file.c
src/lib/global/nsc.c

index f9e01ada8364ce3c382a7748bbf2c4ffb322a24f..9fae5c18e8d30144c24204bdcd054ebe1f64ab20 100644 (file)
@@ -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. */
index 40e40bf300053211937b09ee6539d5c05f0ee3c8..16761f12e2343a1be84a87e25f5910f163ab6e33 100644 (file)
@@ -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);
index e64748cfdf447dabf5d2c42c171c602a485b681f..ad62f5f17d369d328e3e13ea7a60e931468b666e 100644 (file)
@@ -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,
index 9989732c5abd241a901f87138efb85077c734a7d..444f51de04248ccf87aee57509771d57ccbde70e 100644 (file)
@@ -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}
+};
+