Fix handling of intransitive "say".
authorEric S. Raymond <esr@thyrsus.com>
Wed, 14 Jun 2017 19:15:00 +0000 (15:15 -0400)
committerEric S. Raymond <esr@thyrsus.com>
Wed, 14 Jun 2017 19:15:00 +0000 (15:15 -0400)
Makefile
actions.c
tests/woodshint.chk

index 31f35a96f24a14e57466e4307503a503c71538a0..b8b82212046aac3007b935b6fd9f0b759eaa4640 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -14,7 +14,7 @@
 VERS=1.0
 
 CC?=gcc
-CCFLAGS+=-std=c99 -D _DEFAULT_SOURCE -Wall -Wpedantic
+CCFLAGS+=-std=c99 -D _DEFAULT_SOURCE -Wall -Wpedantic -g
 LIBS=
 UNAME_S := $(shell uname -s)
 ifeq ($(UNAME_S),Linux)
index d0608f60f1d8017ec2d6bdeee1248215d8769a2a..51972507052be7e1276022a32633bd5bdc412839 100644 (file)
--- a/actions.c
+++ b/actions.c
@@ -1051,7 +1051,7 @@ int action(FILE *input, enum speechpart part, long verb, token_t obj)
        case intransitive:
            if (WD2 > 0 && verb != SAY) return(2800);
            if (verb == SAY)obj=WD2;
-           if (obj == 0) {
+           if (obj == 0 || obj == INTRANSITIVE) {
                /*  Analyse an intransitive verb (ie, no object given yet). */
                    switch (verb-1) {
                    case  0: /* CARRY */ return carry(verb, INTRANSITIVE);
index d58fc6b558d809c63b21ec25626be0d5b83c19f3..d78523685d57e3810a8c82622866ccff58070b06 100644 (file)
@@ -115,11 +115,11 @@ Drop what?
 
 > say
 
-Okay, "SAY".
+Say what?
 
 > nothing
 
-OK
+Okay, "NOTHI".
 
 > wave