(show_news, news, empfile[], page_headings[], page_headings_symbols[]):
Change page_headings[] to struct symbol and removed page_headings_symbols[].
This commit is contained in:
parent
426eece569
commit
7b9fdf8b95
7 changed files with 19 additions and 34 deletions
|
@ -167,6 +167,6 @@ struct rptstr {
|
||||||
(struct nwsstr *) ef_ptr(EF_NEWS, n)
|
(struct nwsstr *) ef_ptr(EF_NEWS, n)
|
||||||
|
|
||||||
extern struct rptstr rpt[N_MAX_VERB + 2];
|
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
|
#endif
|
||||||
|
|
|
@ -238,7 +238,6 @@ extern struct symbol plague_stages[];
|
||||||
extern struct symbol packing[];
|
extern struct symbol packing[];
|
||||||
extern struct symbol resources[];
|
extern struct symbol resources[];
|
||||||
extern struct symbol sector_navigation[];
|
extern struct symbol sector_navigation[];
|
||||||
extern struct symbol page_headings_symbols[];
|
|
||||||
|
|
||||||
/* src/lib/subs/nstr.c */
|
/* src/lib/subs/nstr.c */
|
||||||
extern int nstr_comp(struct nscstr *np, int len, int type, char *str);
|
extern int nstr_comp(struct nscstr *np, int len, int type, char *str);
|
||||||
|
|
|
@ -105,7 +105,7 @@ news(void)
|
||||||
for (page = 1; page <= N_MAX_PAGE; page++) {
|
for (page = 1; page <= N_MAX_PAGE; page++) {
|
||||||
if (!page_has_news[page])
|
if (!page_has_news[page])
|
||||||
continue;
|
continue;
|
||||||
pr("\n\t === %s ===\n", page_headings[page]);
|
pr("\n\t === %s ===\n", page_headings[page].name);
|
||||||
snxtitem_rewind(&nstr);
|
snxtitem_rewind(&nstr);
|
||||||
while (nxtitem(&nstr, &nws)) {
|
while (nxtitem(&nstr, &nws)) {
|
||||||
if (rpt[(int)nws.nws_vrb].r_newspage != page)
|
if (rpt[(int)nws.nws_vrb].r_newspage != page)
|
||||||
|
|
|
@ -192,7 +192,7 @@ struct empfile empfile[] = {
|
||||||
{EF_SECTOR_NAVIGATION, "sector-navigation", NULL, symbol_ca,
|
{EF_SECTOR_NAVIGATION, "sector-navigation", NULL, symbol_ca,
|
||||||
PTR_CACHE(sector_navigation, EFF_CFG)},
|
PTR_CACHE(sector_navigation, EFF_CFG)},
|
||||||
{EF_PAGE_HEADINGS, "page-headings", NULL, symbol_ca,
|
{EF_PAGE_HEADINGS, "page-headings", NULL, symbol_ca,
|
||||||
PTR_CACHE(page_headings_symbols, EFF_CFG)},
|
PTR_CACHE(page_headings, EFF_CFG)},
|
||||||
|
|
||||||
/* Views */
|
/* Views */
|
||||||
{EF_COUNTRY, "country", NULL, cou_ca, UNMAPPED_CACHE(struct natstr, 0)},
|
{EF_COUNTRY, "country", NULL, cou_ca, UNMAPPED_CACHE(struct natstr, 0)},
|
||||||
|
|
|
@ -43,20 +43,22 @@
|
||||||
|
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "news.h"
|
#include "news.h"
|
||||||
|
#include "nsc.h"
|
||||||
|
|
||||||
char *page_headings[] = {
|
struct symbol page_headings[] = {
|
||||||
/* N_NOTUSED*/ "Comics",
|
{N_NOTUSED, "Comics"},
|
||||||
/* N_FOR */ "Foreign Affairs",
|
{N_FOR, "Foreign Affairs"},
|
||||||
/* N_FRONT */ "The Front Line",
|
{N_FRONT, "The Front Line"},
|
||||||
/* N_SEA */ "The High Seas",
|
{N_SEA, "The High Seas"},
|
||||||
/* N_SKY */ "Sky Watch",
|
{N_SKY, "Sky Watch"},
|
||||||
/* N_MISS */ "Guidance Systems",
|
{N_MISS, "Guidance Systems"},
|
||||||
/* N_ARTY */ "Firestorms",
|
{N_ARTY, "Firestorms"},
|
||||||
/* N_ECON */ "Business & Economics",
|
{N_ECON, "Business & Economics"},
|
||||||
/* N_COLONY */ "The Frontier",
|
{N_COLONY, "The Frontier"},
|
||||||
/* N_HOME */ "The Home Front",
|
{N_HOME, "The Home Front"},
|
||||||
/* N_SPY */ "Espionage",
|
{N_SPY, "Espionage"},
|
||||||
/* N_TELE */ "Telecommunications"
|
{N_TELE, "Telecommunications"},
|
||||||
|
{0, NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
static char no_news[] = "does nothing in particular to %s";
|
static char no_news[] = "does nothing in particular to %s";
|
||||||
|
|
|
@ -792,19 +792,3 @@ struct symbol sector_navigation[] = { /* for d_nav */
|
||||||
{NAV_60, "bridge"},
|
{NAV_60, "bridge"},
|
||||||
{0, NULL}
|
{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}
|
|
||||||
};
|
|
||||||
|
|
|
@ -637,7 +637,7 @@ show_news(int tlev)
|
||||||
|
|
||||||
for (i = 1; i < N_MAX_VERB + 1; i++) {
|
for (i = 1; i < N_MAX_VERB + 1; i++) {
|
||||||
pr("%-2d %-20.20s %4d\n", rpt[i].r_uid,
|
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++)
|
for (j = 0; j < NUM_RPTS; j++)
|
||||||
pr(" %s\n", rpt[i].r_newstory[j]);
|
pr(" %s\n", rpt[i].r_newstory[j]);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue