With database cinpilation not broken this time...
KTAB[331], *LINES, LINK[201], LNLENG, LNPOSN,
PARMS[26], PLACE[101], PTEXT[101], RTEXT[278],
SETUP = 0, TABSIZ = 330;
-signed char INLINE[LINESIZE+1], MAP1[129], MAP2[129];
+signed char rawbuf[LINESIZE], INLINE[LINESIZE+1], MAP1[129], MAP2[129];
long ABBNUM, ACTSPK[36], AMBER, ATTACK, AXE, BACK, BATTER, BEAR, BIRD, BLOOD, BONUS,
BOTTLE, CAGE, CAVE, CAVITY, CHAIN, CHASM, CHEST, CHLOC, CHLOC2,
score(1);
}
+static bool fallback_handler(signed char *buf)
+/* fallback handler for commands not handled by FORTRANish parser */
+{
+ printf("Fallback handler sees: %s\n", buf);
+ return false;
+}
+
static bool do_command(FILE *cmdin) {
/* Can't leave cave once it's closing (except by main office). */
/* Gee, I don't understand. */
L3000: SETPRM(1,WD1,WD1X);
+ if (fallback_handler(rawbuf))
+ return true;
RSPEAK(254);
goto L2600;
extern long ABB[], ATAB[], ATLOC[], BLKLIN, DFLAG, DLOC[], FIXED[], HOLDNG,
KTAB[], *LINES, LINK[], LNLENG, LNPOSN,
PARMS[], PLACE[], PTEXT[], RTEXT[], TABSIZ;
-extern signed char INLINE[LINESIZE+1], MAP1[], MAP2[];
+extern signed char rawbuf[LINESIZE], INLINE[LINESIZE+1], MAP1[], MAP2[];
extern FILE *logfp;
extern bool oldstyle;
extern lcg_state lcgstate;
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
+#include <string.h>
#include "main.h"
#include "share.h" /* for SETUP */
#include "misc.h"
if (!oldstyle && SETUP && OPENED == stdin)
fputs("> ", stdout);
do {
- IGNORE(fgets(INLINE+1,sizeof(INLINE)-1,OPENED));
+ IGNORE(fgets(rawbuf,sizeof(INLINE)-1,OPENED));
} while
(!feof(OPENED) && INLINE[1] == '#');
if (feof(OPENED)) {
fclose(logfp);
} else {
if (logfp && OPENED == stdin)
- IGNORE(fputs(INLINE+1, logfp));
+ IGNORE(fputs(rawbuf, logfp));
else if (!isatty(0))
- IGNORE(fputs(INLINE+1, stdout));
+ IGNORE(fputs(rawbuf, stdout));
+ strcpy(INLINE+1, rawbuf);
LNLENG=0;
for (I=1; I<=sizeof(INLINE) && INLINE[I]!=0; I++) {
VAL=INLINE[I]+1;