Delete dead code, fix indentation, spelling, obvious warning
avoidance, doc fixes. No functional changes.
This commit is contained in:
parent
f5e49a830c
commit
d2e0c8224b
11 changed files with 23 additions and 24 deletions
|
@ -360,7 +360,7 @@ resbenefit(natid who, int good)
|
|||
}
|
||||
}
|
||||
|
||||
extern void
|
||||
void
|
||||
resnoise(struct sctstr *sptr, int public_amt, s_char *name, int old,
|
||||
int new)
|
||||
{
|
||||
|
|
|
@ -62,7 +62,7 @@ tele(void)
|
|||
logerror("tele: typed_wu failed to #%d", to);
|
||||
} else if (*player->argp[0] == 'p') {
|
||||
if (getele("your Gracious Deity", buf) <= 0) {
|
||||
pr("Prayor aborted\n");
|
||||
pr("Prayer aborted\n");
|
||||
return RET_OK;
|
||||
}
|
||||
pr("\n");
|
||||
|
|
|
@ -70,10 +70,10 @@ upgr(void)
|
|||
case 'L':
|
||||
return lupgr();
|
||||
default:
|
||||
pr("Ships, land units or planes only!\n");
|
||||
return RET_SYN;
|
||||
break;
|
||||
}
|
||||
return RET_OK;
|
||||
pr("Ships, land units or planes only!\n");
|
||||
return RET_SYN;
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
|
@ -73,9 +73,10 @@ nstr_exec(struct nscstr *conds, register int ncond, void *ptr, int type)
|
|||
lhs = decode(player->cnum, nsc->fld1, ptr, type);
|
||||
|
||||
op = oper;
|
||||
if ((op == '<' && lhs >= rhs) ||
|
||||
(op == '=' && lhs != rhs) ||
|
||||
(op == '>' && lhs <= rhs) || (op == '#' && lhs == rhs))
|
||||
if ((op == '<' && lhs >= rhs)
|
||||
|| (op == '=' && lhs != rhs)
|
||||
|| (op == '>' && lhs <= rhs)
|
||||
|| (op == '#' && lhs == rhs))
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
|
|
|
@ -43,8 +43,8 @@
|
|||
* 2 = update only bmap with force
|
||||
*/
|
||||
|
||||
static int
|
||||
do_map_set(natid cnum, s_char *map, coord x, coord y, s_char t, int force, int sync);
|
||||
static int do_map_set(natid cnum, s_char *map, coord x, coord y,
|
||||
s_char t, int force, int sync);
|
||||
|
||||
int
|
||||
map_set(natid cnum, coord x, coord y, s_char t, int only_bmap)
|
||||
|
|
|
@ -113,14 +113,15 @@ encode(register s_char *str, long int *val, int type)
|
|||
return 0;
|
||||
}
|
||||
if (isdigit(*str) || ((*str == '-') && isdigit(str[1]))) {
|
||||
#ifdef BIT16ONLY
|
||||
/* XXX silently truncate to 16 bit int */
|
||||
*val = atoi(str) & 0xffff;
|
||||
#else
|
||||
*val = atoi(str);
|
||||
#endif /* BIT16ONLY */
|
||||
return 2;
|
||||
}
|
||||
/*
|
||||
* FIXME This accepts the first match found, even if there are
|
||||
* more matches in other tables, i.e. it quietly accepts ambiguous
|
||||
* matches (matches in multiple tables), and fails to prefer an
|
||||
* exact match to partial match in an earlier table.
|
||||
*/
|
||||
if ((i = typematch(str, type)) >= 0) {
|
||||
*val = i;
|
||||
return 1;
|
||||
|
@ -148,7 +149,6 @@ encode(register s_char *str, long int *val, int type)
|
|||
if (i >= 0) {
|
||||
*val = var_ca[i].ca_code & ~NSC_ROUND;
|
||||
return legal_val(str, *val);
|
||||
return 1;
|
||||
}
|
||||
if (i == M_NOTUNIQUE) {
|
||||
pr("%s -- ambiguous commodity selector\n", str);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue