(news, fina): Report bad conditionals as syntax error. Closes #775475.

This commit is contained in:
Ron Koenderink 2005-01-06 02:09:30 +00:00
parent d1df194176
commit c0618aec6e
2 changed files with 4 additions and 2 deletions

View file

@ -57,13 +57,14 @@ fina(void)
pr("Loans are not enabled.\n");
return RET_FAIL;
}
if (!snxtitem(&ni, EF_LOAN, "*"))
return RET_SYN;
(void)time(&now);
pr("\n");
pr(" -= Empire Financial Status Report =- \n");
pr(" ");
prdate();
pr("Loan From To Rate Dur Paid Total\n");
snxtitem(&ni, EF_LOAN, "*");
while (nxtitem(&ni, &loan)) {
if (loan.l_status != LS_SIGNED)
continue;

View file

@ -65,6 +65,8 @@ news(void)
s_char num[128];
s_char *verb;
if (!snxtitem(&nstr, EF_NEWS, "*"))
return RET_SYN;
memset(page_has_news, 0, sizeof(page_has_news));
memset(sectors_taken, 0, sizeof(sectors_taken));
(void)head();
@ -86,7 +88,6 @@ news(void)
/* if (then < now - days(3))
then = now - days(3);
*/
snxtitem(&nstr, EF_NEWS, "*");
pr("\nThe details of Empire news since %s", ctime(&then));
while (nxtitem(&nstr, (s_char *)&nws)) {
if (nws.nws_when < then)