From f9eb6383f1fc75589d186d9eb88e4190e26042a7 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Tue, 23 May 2017 22:29:24 -0400 Subject: [PATCH] Revert a variable name previously changed to be out of the way. Also, make output from replays easier to interpret by adding prompts. --- actions1.c | 2 +- init.c | 8 ++++---- main.c | 2 +- misc.c | 4 +++- share.h | 2 +- 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/actions1.c b/actions1.c index b84d622..2c6885c 100644 --- a/actions1.c +++ b/actions1.c @@ -23,7 +23,7 @@ int action(FILE *input, long STARTAT) { BUG(99); L4000: VERB=K; - game.spk=ACTVERB[VERB]; + game.spk=ACTSPK[VERB]; if(WD2 > 0 && VERB != SAY) return(2800); if(VERB == SAY)OBJ=WD2; if(OBJ > 0) goto L4090; diff --git a/init.c b/init.c index bde0512..65a47d5 100644 --- a/init.c +++ b/init.c @@ -19,7 +19,7 @@ * 185 locations (LTEXT, STEXT, KEY, COND, ABB, ATLOC, LOCSND, LOCSIZ). * 100 objects (PLAC, PLACE, FIXD, FIXED, LINK (TWICE), PTEXT, PROP, * OBJSND, OBJTXT). - * 35 "action" verbs (ACTVERB, VRBSIZ). + * 35 "action" verbs (ACTSPK, VRBSIZ). * 277 random messages (RTEXT, RTXSIZ). * 12 different player classifications (CTEXT, CVAL, CLSMAX). * 20 hints (HINTLC, HINTED, HINTS, HNTSIZ). @@ -324,11 +324,11 @@ L1050: OBJ=GETNUM(OPENED); FIXD[OBJ]=GETNUM(NULL); goto L1050; -/* Read default message numbers for action verbs, store in ACTVERB. */ +/* Read default message numbers for action verbs, store in ACTSPK. */ L1060: VERB=GETNUM(OPENED); if(VERB == -1) goto L1002; - ACTVERB[VERB]=GETNUM(NULL); + ACTSPK[VERB]=GETNUM(NULL); goto L1060; /* Read info about available liquids and other conditions, store in COND. */ @@ -697,7 +697,7 @@ static void quick_io(void) { quick_array(ATAB,TABSIZ); quick_array(PLAC,100); quick_array(FIXD,100); - quick_array(ACTVERB,VRBSIZ); + quick_array(ACTSPK,VRBSIZ); quick_array((long *)HINTS,(HNTMAX+1)*5-1); } diff --git a/main.c b/main.c index c0db189..2027607 100644 --- a/main.c +++ b/main.c @@ -18,7 +18,7 @@ long ABB[186], ATAB[331], ATLOC[186], TABSIZ = 330; signed char INLINE[LINESIZE+1], MAP1[129], MAP2[129]; -long ACTVERB[36], AMBER, ATTACK, AXE, BACK, BATTER, BEAR, BIRD, BLOOD, +long ACTSPK[36], AMBER, ATTACK, AXE, BACK, BATTER, BEAR, BIRD, BLOOD, BOTTLE, CAGE, CAVE, CAVITY, CHAIN, CHASM, CHEST, CHLOC, CHLOC2, CLAM, CLSMAX = 12, CLSSES, COINS, COND[186], CONDS, CTEXT[13], CVAL[13], DALTLC, diff --git a/misc.c b/misc.c index 77fdd22..1bc963b 100644 --- a/misc.c +++ b/misc.c @@ -894,8 +894,10 @@ long I, VAL; } else { if (logfp) IGNORE(fputs(INLINE+1, logfp)); - else if (!isatty(0)) + else if (!isatty(0)) { + IGNORE(fputs("> ", stdout)); IGNORE(fputs(INLINE+1, stdout)); + } LNLENG=0; for (I=1; I<=sizeof(INLINE) && INLINE[I]!=0; I++) { VAL=INLINE[I]+1; diff --git a/share.h b/share.h index cf8693b..ccb6a45 100644 --- a/share.h +++ b/share.h @@ -1,5 +1,5 @@ extern void score(long); -extern long ACTVERB[], AMBER, ATTACK, AXE, BACK, BATTER, BEAR, +extern long ACTSPK[], AMBER, ATTACK, AXE, BACK, BATTER, BEAR, BIRD, BLOOD, BOTTLE, CAGE, CAVE, CAVITY, CHAIN, CHASM, CHEST, CHLOC, CHLOC2, CLAM, CLSMAX, CLSSES, COINS, COND[], CONDS, CTEXT[], CVAL[], DALTLC, -- 2.31.1