]> git.pond.sub.org Git - empserver/commitdiff
(show_news, news, empfile[], page_headings[], page_headings_symbols[]):
authorRon Koenderink <rkoenderink@yahoo.ca>
Mon, 30 Jan 2006 22:26:48 +0000 (22:26 +0000)
committerRon Koenderink <rkoenderink@yahoo.ca>
Mon, 30 Jan 2006 22:26:48 +0000 (22:26 +0000)
Change page_headings[] to struct symbol and removed
page_headings_symbols[].

include/news.h
include/nsc.h
src/lib/commands/news.c
src/lib/global/file.c
src/lib/global/news.c
src/lib/global/nsc.c
src/lib/subs/show.c

index 3d5ecaa7a5ca54c231d77a7cef941217b3c45543..545eca501b9371c67b5e28dc2afc892bcba7eb62 100644 (file)
@@ -167,6 +167,6 @@ struct rptstr {
        (struct nwsstr *) ef_ptr(EF_NEWS, n)
 
 extern struct rptstr rpt[N_MAX_VERB + 2];
-extern char *page_headings[N_MAX_PAGE + 1];
+extern struct symbol page_headings[N_MAX_PAGE + 2];
 
 #endif
index 71268144b47085b7c091bf3e89ef9a921ff23862..7cf466a7c872e65c9740127310f811b06e55b32c 100644 (file)
@@ -238,7 +238,6 @@ extern struct symbol plague_stages[];
 extern struct symbol packing[];
 extern struct symbol resources[];
 extern struct symbol sector_navigation[];
-extern struct symbol page_headings_symbols[];
 
 /* src/lib/subs/nstr.c */
 extern int nstr_comp(struct nscstr *np, int len, int type, char *str);
index 75cd68313a83916b9a4fdc5db504708c88bdca18..6106a8a56147f1ac07d757d0c9faf03b75a18da8 100644 (file)
@@ -105,7 +105,7 @@ news(void)
     for (page = 1; page <= N_MAX_PAGE; page++) {
        if (!page_has_news[page])
            continue;
-       pr("\n\t ===  %s  ===\n", page_headings[page]);
+       pr("\n\t ===  %s  ===\n", page_headings[page].name);
        snxtitem_rewind(&nstr);
        while (nxtitem(&nstr, &nws)) {
            if (rpt[(int)nws.nws_vrb].r_newspage != page)
index 93237528452607afce6e008ab69be5f8603498ea..38842aee8cd18497dbe96a5200da2d47b4725f98 100644 (file)
@@ -192,7 +192,7 @@ struct empfile empfile[] = {
     {EF_SECTOR_NAVIGATION, "sector-navigation", NULL, symbol_ca,
      PTR_CACHE(sector_navigation, EFF_CFG)},
     {EF_PAGE_HEADINGS, "page-headings", NULL, symbol_ca,
-     PTR_CACHE(page_headings_symbols, EFF_CFG)},
+     PTR_CACHE(page_headings, EFF_CFG)},
 
     /* Views */
     {EF_COUNTRY, "country", NULL, cou_ca, UNMAPPED_CACHE(struct natstr, 0)},
index 651fb637d0719e623219c25ff89f0b506d22c5c9..a4141c12a7c76ea27ed0686a69cd158824bd904c 100644 (file)
 
 #include "misc.h"
 #include "news.h"
+#include "nsc.h"
 
-char *page_headings[] = {
-/* N_NOTUSED*/ "Comics",
-/* N_FOR    */ "Foreign Affairs",
-/* N_FRONT  */ "The Front Line",
-/* N_SEA    */ "The High Seas",
-/* N_SKY    */ "Sky Watch",
-/* N_MISS   */ "Guidance Systems",
-/* N_ARTY   */ "Firestorms",
-/* N_ECON   */ "Business & Economics",
-/* N_COLONY */ "The Frontier",
-/* N_HOME   */ "The Home Front",
-/* N_SPY    */ "Espionage",
-/* N_TELE   */ "Telecommunications"
+struct symbol page_headings[] = {
+    {N_NOTUSED, "Comics"},
+    {N_FOR, "Foreign Affairs"},
+    {N_FRONT, "The Front Line"},
+    {N_SEA, "The High Seas"},
+    {N_SKY, "Sky Watch"},
+    {N_MISS, "Guidance Systems"},
+    {N_ARTY, "Firestorms"},
+    {N_ECON, "Business & Economics"},
+    {N_COLONY, "The Frontier"},
+    {N_HOME, "The Home Front"},
+    {N_SPY, "Espionage"},
+    {N_TELE, "Telecommunications"},
+    {0, NULL}
 };
 
 static char no_news[] = "does nothing in particular to %s";
index 2bbb86517bfc6e33df9a62cb350789849dbd5007..6a5b0e0958024f437745d592ec381fdef9254ae3 100644 (file)
@@ -792,19 +792,3 @@ struct symbol sector_navigation[] = { /* for d_nav */
     {NAV_60, "bridge"},
     {0, NULL}
 };
-
-struct symbol page_headings_symbols[] = {
-    {N_NOTUSED, "Not Used"},
-    {N_FOR, "Foreign Affairs"},
-    {N_FRONT, "The Front Line"},
-    {N_SEA, "The High Seas"},
-    {N_SKY, "Sky Watch"},
-    {N_MISS, "Guidance Systems"},
-    {N_ARTY, "Firestorms"},
-    {N_ECON, "Business & Economics"},
-    {N_COLONY, "The Frontier"},
-    {N_HOME, "The Home Front"},
-    {N_SPY, "Espionage"},
-    {N_TELE, "Telecommunications"},
-    {0, NULL}
-};
index b69e61b2e3eb1c219ad43bb10f5263bfa27581d8..6cb1e5f22ef9e8a4a8cce5f0b0bcd596eee1ff57 100644 (file)
@@ -637,7 +637,7 @@ show_news(int tlev)
 
     for (i = 1; i < N_MAX_VERB + 1; i++) {
        pr("%-2d %-20.20s %4d\n", rpt[i].r_uid,
-           page_headings[rpt[i].r_newspage], rpt[i].r_good_will);
+           page_headings[rpt[i].r_newspage].name, rpt[i].r_good_will);
 
        for (j = 0; j < NUM_RPTS; j++)
            pr("    %s\n", rpt[i].r_newstory[j]);