]> git.pond.sub.org Git - empserver/commitdiff
(rpt): Add sentinel.
authorMarkus Armbruster <armbru@pond.sub.org>
Sat, 29 Oct 2005 06:27:00 +0000 (06:27 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Sat, 29 Oct 2005 06:27:00 +0000 (06:27 +0000)
(EF_NEWS_CHR): New.
(empfile): Add its entry.

include/file.h
src/lib/commands/xdump.c
src/lib/global/file.c
src/lib/global/news.c

index a26d05193030a2b9fc110dbae6685f76d2d44542..990a0f503006d94d02755f617a15c462f2438271 100644 (file)
@@ -110,22 +110,20 @@ struct empfile {
 #define EF_PLANE_CHR   17
 #define EF_LAND_CHR    18
 #define EF_NUKE_CHR    19
-#if 0 /* doesn't exist yet */
-#define EF_NEWS_CHR
-#endif
-#define EF_TREATY_CHR  20
-#define EF_ITEM                21
-#define EF_INFRASTRUCTURE   22
-#define EF_PRODUCT     23
-#define EF_TABLE       24
-#define EF_SHIP_CHR_FLAGS      25
-#define EF_PLANE_CHR_FLAGS     26
-#define EF_LAND_CHR_FLAGS      27
-#define EF_NUKE_CHR_FLAGS      28
-#define EF_META                29
-#define EF_META_TYPE   30
-#define EF_META_FLAGS  31
-#define EF_MAX         32
+#define EF_NEWS_CHR    20
+#define EF_TREATY_CHR  21
+#define EF_ITEM                22
+#define EF_INFRASTRUCTURE   23
+#define EF_PRODUCT     24
+#define EF_TABLE       25
+#define EF_SHIP_CHR_FLAGS      26
+#define EF_PLANE_CHR_FLAGS     27
+#define EF_LAND_CHR_FLAGS      28
+#define EF_NUKE_CHR_FLAGS      29
+#define EF_META                30
+#define EF_META_TYPE   31
+#define EF_META_FLAGS  32
+#define EF_MAX         33
 
 #define EF_IS_GAME_STATE(type) (EF_SECTOR <= (type) && (type) <= EF_LOST)
 
index dac00d9ea7d1ff202a3124ac25297aae24030158..01b2f69e4eda3cc7ce5dbb702f83cb6292f79dbb 100644 (file)
@@ -53,7 +53,7 @@
  * - Sector infrastructure characteristics: intrchr[]
  * - Ship characteristics: mchr[]
  * Less important:
- * - News item characteristics: rpt[] (TODO)
+ * - News item characteristics: rpt[]
  * - News page headings: page_headings[] (TODO)
  * - Treaty clause characteristics: tchr[]
  * - Commands: player_coms[] (TODO)
index e2a05331650cf55c504c8678a4494ded0dcda619..67c011e320e4a7175502b15d55e5533b39a1ba3d 100644 (file)
@@ -119,12 +119,9 @@ struct empfile empfile[] = {
     {EF_NUKE_CHR, "nuke chr", NULL, EFF_CFG,
      sizeof(nchr[0]), NULL, NULL, NULL,
      -1, -1, 0, 0, (char *)nchr, 0, nchr_ca},
-#if 0
-    /* FIXME rpt[] lacks sentinel, xdchr() doesn't terminate */
-    {EF_, "news chr", NULL, EFF_CFG,
+    {EF_NEWS_CHR, "news chr", NULL, EFF_CFG,
      sizeof(rpt[0]), NULL, NULL, NULL,
      -1, -1, 0, 0, (char *)rpt, 0, rpt_ca},
-#endif
     {EF_TREATY_CHR, "treaty chr", NULL, EFF_CFG,
      sizeof(tchr[0]), NULL, NULL, NULL,
      -1, -1, 0, 0, (char *)tchr, 0, tchr_ca},
index 3def09bf2b41afd0a7f8762b2bcb09c0c79c50fc..5738f1027ba167f02019a7af51a58d23650756c8 100644 (file)
@@ -58,7 +58,7 @@ char *page_headings[N_MAX_PAGE + 1] = {
 
 static char no_news[] = "does nothing in particular to %s";
 
-struct rptstr rpt[N_MAX_VERB + 1] = {
+struct rptstr rpt[N_MAX_VERB + 2] = {
 /*  nice  page     text */
 /*  0*/ { 0,  0, { no_news, no_news } },
     { -4, N_FRONT, { "infantry capture %s territory",
@@ -219,5 +219,6 @@ struct rptstr rpt[N_MAX_VERB + 1] = {
     { -3, N_FRONT, { "is repelled by %s while attempting to board a land unit",
 /* 81*/                     "forces prove inept at boarding %s's land unit" } },
     { -2, N_FRONT, { "mercenaries board one of %s's land units",
-/* 82*/                     "elite forces board %s land unit" } }
+/* 82*/                     "elite forces board %s land unit" } },
+    { 0, 0, { NULL, NULL } }
 };