sprintf(buf, "%s %s", command.raw1, command.raw2);
if (sscanf(buf, "seed %ld", &sv) == 1) {
sprintf(buf, "%s %s", command.raw1, command.raw2);
if (sscanf(buf, "seed %ld", &sv) == 1) {
* lamp give out. When it gets close, we come here to warn him.
* First following arm checks if the lamp and fresh batteries are
* here, in which case we replace the batteries and continue.
* lamp give out. When it gets close, we come here to warn him.
* First following arm checks if the lamp and fresh batteries are
* here, in which case we replace the batteries and continue.
* out, he can explore outside for a while if desired. */
if (game.limit <= WARNTIME) {
if (HERE(BATTERY) && game.prop[BATTERY] == FRESH_BATTERIES && HERE(LAMP)) {
rspeak(REPLACE_BATTERIES);
game.prop[BATTERY] = DEAD_BATTERIES;
* out, he can explore outside for a while if desired. */
if (game.limit <= WARNTIME) {
if (HERE(BATTERY) && game.prop[BATTERY] == FRESH_BATTERIES && HERE(LAMP)) {
rspeak(REPLACE_BATTERIES);
game.prop[BATTERY] = DEAD_BATTERIES;
}
if (command.id1 == ENTER && command.id2 != WORD_NOT_FOUND && command.id2 != WORD_EMPTY) {
command.id1 = command.id2;
}
if (command.id1 == ENTER && command.id2 != WORD_NOT_FOUND && command.id2 != WORD_EMPTY) {
command.id1 = command.id2;
- command.type1 = command.type2;
- strncpy(command.raw1, command.raw2, LINESIZE + 1);
+ command.type1 = command.type2;
+ strncpy(command.raw1, command.raw2, LINESIZE - 1);
- command.type2 = NO_WORD_TYPE;
- strncpy(command.raw2, "", LINESIZE + 1);
+ command.type2 = NO_WORD_TYPE;
+ strncpy(command.raw2, "", LINESIZE - 1);
- if (AT(command.id2))
- {
- command.id2 = POUR;
- command.type2 = ACTION;
- strncpy(command.raw2, "POUR", LINESIZE + 1);
+ if (AT(command.id2)) {
+ command.id2 = POUR;
+ command.type2 = ACTION;
+ strncpy(command.raw2, "POUR", LINESIZE - 1);
- if (command.id1 == CAGE && command.id2 == BIRD && HERE(CAGE) && HERE(BIRD))
- {
- command.id1 = CARRY;
- command.type1 = ACTION;
- strncpy(command.raw2, "CATCH", LINESIZE + 1);
+ if (command.id1 == CAGE && command.id2 == BIRD && HERE(CAGE) && HERE(BIRD)) {
+ command.id1 = CARRY;
+ command.type1 = ACTION;
+ strncpy(command.raw2, "CATCH", LINESIZE - 1);
- command.id1 = command.id2;
- command.type1 = command.type2;
- strncpy(command.raw1, command.raw2, LINESIZE - 1);
- command.wd1 = command.wd2;
- command.id2 = WORD_EMPTY;
- command.type2 = NO_WORD_TYPE;
- command.raw2[0] = '\0';
+ command.id1 = command.id2;
+ command.type1 = command.type2;
+ strncpy(command.raw1, command.raw2, LINESIZE - 1);
+ command.wd1 = command.wd2;
+ command.id2 = WORD_EMPTY;
+ command.type2 = NO_WORD_TYPE;
+ command.raw2[0] = '\0';