Fix handling of intransitive "say".

This commit is contained in:
Eric S. Raymond 2017-06-14 15:15:00 -04:00
parent 6c6498b797
commit 7c9a0bfb36
3 changed files with 4 additions and 4 deletions

View file

@ -14,7 +14,7 @@
VERS=1.0 VERS=1.0
CC?=gcc CC?=gcc
CCFLAGS+=-std=c99 -D _DEFAULT_SOURCE -Wall -Wpedantic CCFLAGS+=-std=c99 -D _DEFAULT_SOURCE -Wall -Wpedantic -g
LIBS= LIBS=
UNAME_S := $(shell uname -s) UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux) ifeq ($(UNAME_S),Linux)

View file

@ -1051,7 +1051,7 @@ int action(FILE *input, enum speechpart part, long verb, token_t obj)
case intransitive: case intransitive:
if (WD2 > 0 && verb != SAY) return(2800); if (WD2 > 0 && verb != SAY) return(2800);
if (verb == SAY)obj=WD2; if (verb == SAY)obj=WD2;
if (obj == 0) { if (obj == 0 || obj == INTRANSITIVE) {
/* Analyse an intransitive verb (ie, no object given yet). */ /* Analyse an intransitive verb (ie, no object given yet). */
switch (verb-1) { switch (verb-1) {
case 0: /* CARRY */ return carry(verb, INTRANSITIVE); case 0: /* CARRY */ return carry(verb, INTRANSITIVE);

View file

@ -115,11 +115,11 @@ Drop what?
> say > say
Okay, "SAY". Say what?
> nothing > nothing
OK Okay, "NOTHI".
> wave > wave