- if(FIL) goto L15;
- IGNORE(fgets(INLINE+1, sizeof(INLINE)-1, stdin));
- if(feof(stdin)) score(1);
- goto L20;
-
-L15: if(!OPENED){
- OPENED=fopen("adventure.text","r" /* NOT binary */);
- if(!OPENED){printf("Can't read adventure.text!\n"); exit(0);}
- }
- IGNORE(fgets(INLINE+1,sizeof(INLINE)-1,OPENED));
-
-L20: LNLENG=0;
- for (I=1; I<=sizeof(INLINE) && INLINE[I]!=0; I++) {
- VAL=INLINE[I]+1;
- INLINE[I]=MAP1[VAL];
- if(INLINE[I] != 0)LNLENG=I;
- } /* end loop */
- LNPOSN=1;
- if(FIL && LNLENG == 0) goto L15;
-/* Above is to get around an F40 compiler bug wherein it reads a blank
- * line whenever a crlf is broken across a record boundary. */
- return;
+ if (!oldstyle && SETUP)
+ fputs("> ", stdout);
+ do {
+ IGNORE(fgets(raw_input,sizeof(INLINE)-1,OPENED));
+ } while
+ /* allow comments in logfiles */
+ (!feof(OPENED) && raw_input[0] == '#');
+ if (feof(OPENED)) {
+ if (logfp)
+ fclose(logfp);
+ } else {
+ if (logfp)
+ IGNORE(fputs(raw_input, logfp));
+ else if (!isatty(0))
+ IGNORE(fputs(raw_input, stdout));
+ for (cp = raw_input; *cp; cp++)
+ INLINE[cp - raw_input + 1]=MAP1[*cp + 1];
+ LNLENG = (cp - raw_input);
+ LNPOSN=1;
+ }