From: Eric S. Raymond Date: Fri, 14 Jul 2017 17:10:13 +0000 (-0400) Subject: Code cleanup. X-Git-Tag: 1.3~95 X-Git-Url: https://jxself.org/git/?p=open-adventure.git;a=commitdiff_plain;h=d1e29319fa20a0d3e9924764f83a8cf2020e84da Code cleanup. --- diff --git a/actions.c b/actions.c index 6cff55c..48de9d0 100644 --- a/actions.c +++ b/actions.c @@ -545,9 +545,7 @@ static int discard(verb_t verb, obj_t obj) } else rspeak(OK_MAN); - game.prop[BIRD] = BIRD_UNCAGED; - if (FOREST(game.loc)) - game.prop[BIRD] = BIRD_FOREST_UNCAGED; + game.prop[BIRD] = FOREST(game.loc) ? BIRD_FOREST_UNCAGED : BIRD_UNCAGED; drop(obj, game.loc); return GO_CLEAROBJ; } diff --git a/advent.h b/advent.h index 7eb54dc..34b855f 100644 --- a/advent.h +++ b/advent.h @@ -208,7 +208,6 @@ extern void packed_to_token(long, char token[]); extern long token_to_packed(const char token[]); extern void tokenize(char*, struct command_t *); extern void vspeak(const char*, bool, va_list); -extern bool wordempty(token_t); extern void wordclear(token_t *); extern void speak(const char*, ...); extern void sspeak(long msg, ...); diff --git a/misc.c b/misc.c index 756e5cb..c4dc351 100644 --- a/misc.c +++ b/misc.c @@ -128,11 +128,6 @@ void tokenize(char* raw, struct command_t *cmd) /* Hide the fact that wods are corrently packed longs */ -bool wordempty(token_t a) -{ - return a == 0; -} - void wordclear(token_t *v) { *v = 0;