From 7c9a0bfb36e0c630d6056e5897d00a8d54317261 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Wed, 14 Jun 2017 15:15:00 -0400 Subject: [PATCH] Fix handling of intransitive "say". --- Makefile | 2 +- actions.c | 2 +- tests/woodshint.chk | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 31f35a9..b8b8221 100644 --- 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) diff --git a/actions.c b/actions.c index d0608f6..5197250 100644 --- 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); diff --git a/tests/woodshint.chk b/tests/woodshint.chk index d58fc6b..d785236 100644 --- a/tests/woodshint.chk +++ b/tests/woodshint.chk @@ -115,11 +115,11 @@ Drop what? > say -Okay, "SAY". +Say what? > nothing -OK +Okay, "NOTHI". > wave -- 2.31.1