* and is not changed thereafter unless the routines on this page choose
* to do so. */
- if (prompt)
- fputs("> ", stdout);
do {
if (!editline) {
+ if (prompt)
+ fputs("> ", stdout);
IGNORE(fgets(rawbuf,sizeof(rawbuf)-1,fp));
eof = (feof(fp));
} else {
- char *cp = linenoise(prompt ? "> ": "");
+ char *cp = linenoise("> ");
eof = (cp == NULL);
if (!eof) {
strncpy(rawbuf, cp, sizeof(rawbuf)-1);
fclose(logfp);
return false;
} else {
+ FILE *efp = NULL;
if (logfp && fp == stdin)
- IGNORE(fputs(rawbuf, logfp));
+ efp = logfp;
else if (!isatty(0))
- IGNORE(fputs(rawbuf, stdout));
+ efp = stdout;
+ if (efp != NULL)
+ {
+ if (prompt)
+ fputs("> ", efp);
+ IGNORE(fputs(rawbuf, efp));
+ }
strcpy(INLINE+1, rawbuf);
LNLENG=0;
for (i=1; i<=(long)sizeof(INLINE) && INLINE[i]!=0; i++) {
You have taken the vase and hurled it delicately to the ground.
->
+
You scored 139 out of a possible 430, using 210 turns.
You have achieved the rating: "Experienced Adventurer".
The little bird is now dead. Its body disappears.
->
+
You scored 32 out of a possible 430, using 22 turns.
You are obviously a rank amateur. Better luck next time.