projects
/
open-adventure.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix the slightly broken prompt test.
[open-adventure.git]
/
misc.c
diff --git
a/misc.c
b/misc.c
index 63052ced47351603e80fccdd31da28c47ca90cca..a08720cbeb20b08cd7414d20eb743343bb3f1d83 100644
(file)
--- a/
misc.c
+++ b/
misc.c
@@
-2,6
+2,7
@@
#include <stdlib.h>
#include <stdio.h>
#include "main.h"
#include <stdlib.h>
#include <stdio.h>
#include "main.h"
+#include "share.h" /* for SETUP */
#include "misc.h"
#include "funcs.h"
#include "misc.h"
#include "funcs.h"
@@
-885,7
+886,7
@@
long I, VAL;
if(MAP2[1] == 0)MPINIT();
if(MAP2[1] == 0)MPINIT();
- if (!oldstyle &&
isatty(0)
)
+ if (!oldstyle &&
SETUP
)
fputs("> ", stdout);
IGNORE(fgets(INLINE+1,sizeof(INLINE)-1,OPENED));
if (feof(OPENED)) {
fputs("> ", stdout);
IGNORE(fgets(INLINE+1,sizeof(INLINE)-1,OPENED));
if (feof(OPENED)) {
@@
-894,6
+895,8
@@
long I, VAL;
} else {
if (logfp)
IGNORE(fputs(INLINE+1, logfp));
} else {
if (logfp)
IGNORE(fputs(INLINE+1, logfp));
+ else if (!isatty(0))
+ IGNORE(fputs(INLINE+1, stdout));
LNLENG=0;
for (I=1; I<=sizeof(INLINE) && INLINE[I]!=0; I++) {
VAL=INLINE[I]+1;
LNLENG=0;
for (I=1; I<=sizeof(INLINE) && INLINE[I]!=0; I++) {
VAL=INLINE[I]+1;