projects
/
open-adventure.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add -s option.
[open-adventure.git]
/
misc.c
diff --git
a/misc.c
b/misc.c
index dde006340525739807e6e4c8f9362ce02083726c..e6f17abbddcc236ae726dc91e15d938c51a9ec38 100644
(file)
--- a/
misc.c
+++ b/
misc.c
@@
-630,14
+630,14
@@
bool MAPLIN(FILE *fp)
* and is not changed thereafter unless the routines on this page choose
* to do so. */
* and is not changed thereafter unless the routines on this page choose
* to do so. */
- if (
!oldstyle && !isatty(1)
)
+ if (
prompt
)
fputs("> ", stdout);
do {
fputs("> ", stdout);
do {
- if (
oldstyl
e) {
+ if (
!editlin
e) {
IGNORE(fgets(rawbuf,sizeof(rawbuf)-1,fp));
eof = (feof(fp));
} else {
IGNORE(fgets(rawbuf,sizeof(rawbuf)-1,fp));
eof = (feof(fp));
} else {
- char *cp = linenoise(
">
");
+ char *cp = linenoise(
prompt ? "> ": "
");
eof = (cp == NULL);
if (!eof) {
strncpy(rawbuf, cp, sizeof(rawbuf)-1);
eof = (cp == NULL);
if (!eof) {
strncpy(rawbuf, cp, sizeof(rawbuf)-1);