projects
/
open-adventure.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Jettison the -s option.
[open-adventure.git]
/
main.c
diff --git
a/main.c
b/main.c
index 84eca5758177d5d262d015186fb02bb5e3aeb80b..df6f9aa7dfa2ba5054b40cf3c5cd6a483971c575 100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-21,14
+21,12
@@
#include <signal.h>
#include <string.h>
#include "advent.h"
#include <signal.h>
#include <string.h>
#include "advent.h"
-#include "linenoise/linenoise.h"
#include "dungeon.h"
#define DIM(a) (sizeof(a)/sizeof(a[0]))
FILE *logfp = NULL, *rfp = NULL;
bool oldstyle = false;
#include "dungeon.h"
#define DIM(a) (sizeof(a)/sizeof(a[0]))
FILE *logfp = NULL, *rfp = NULL;
bool oldstyle = false;
-bool editline = true;
bool prompt = true;
// LCOV_EXCL_START
bool prompt = true;
// LCOV_EXCL_START
@@
-64,11
+62,11
@@
int main(int argc, char *argv[])
/* Options. */
#ifndef ADVENT_NOSAVE
/* Options. */
#ifndef ADVENT_NOSAVE
- const char* opts = "l:or
:s
";
- const char* usage = "Usage: %s [-l logfilename] [-o] [-r restorefilename]
[-s]
\n";
+ const char* opts = "l:or";
+ const char* usage = "Usage: %s [-l logfilename] [-o] [-r restorefilename]\n";
#else
#else
- const char* opts = "l:o
s
";
- const char* usage = "Usage: %s [-l logfilename] [-o]
[-s]
\n";
+ const char* opts = "l:o";
+ const char* usage = "Usage: %s [-l logfilename] [-o]\n";
#endif
while ((ch = getopt(argc, argv, opts)) != EOF) {
switch (ch) {
#endif
while ((ch = getopt(argc, argv, opts)) != EOF) {
switch (ch) {
@@
-82,7
+80,7
@@
int main(int argc, char *argv[])
break;
case 'o':
oldstyle = true;
break;
case 'o':
oldstyle = true;
-
editline =
prompt = false;
+ prompt = false;
break;
#ifndef ADVENT_NOSAVE
case 'r':
break;
#ifndef ADVENT_NOSAVE
case 'r':
@@
-94,9
+92,6
@@
int main(int argc, char *argv[])
signal(SIGINT, sig_handler);
break;
#endif
signal(SIGINT, sig_handler);
break;
#endif
- case 's':
- editline = false;
- break;
default:
fprintf(stderr,
usage, argv[0]);
default:
fprintf(stderr,
usage, argv[0]);
@@
-108,15
+103,11
@@
int main(int argc, char *argv[])
fprintf(stderr,
" -r restore from specified saved game file\n");
#endif
fprintf(stderr,
" -r restore from specified saved game file\n");
#endif
- fprintf(stderr,
- " -s suppress command editing\n");
exit(EXIT_FAILURE);
break;
}
}
exit(EXIT_FAILURE);
break;
}
}
- linenoiseHistorySetMaxLen(350);
-
/* Initialize game variables */
long seedval = initialise();
/* Initialize game variables */
long seedval = initialise();
@@
-1036,7
+1027,7
@@
L2600:
}
strncpy(inputbuf, input, LINESIZE - 1);
}
strncpy(inputbuf, input, LINESIZE - 1);
-
linenoiseF
ree(input);
+
f
ree(input);
long tokens[4];
tokenize(inputbuf, tokens);
long tokens[4];
tokenize(inputbuf, tokens);