Jettison the -s option.
It's no longer needed since libedit doesn't have the 'paste bug'.
This commit is contained in:
parent
98f019b9e4
commit
dec4cf3968
4 changed files with 7 additions and 14 deletions
2
advent.h
2
advent.h
|
@ -173,7 +173,7 @@ struct command_t {
|
||||||
|
|
||||||
extern struct game_t game;
|
extern struct game_t game;
|
||||||
extern FILE *logfp;
|
extern FILE *logfp;
|
||||||
extern bool oldstyle, editline, prompt;
|
extern bool oldstyle, prompt;
|
||||||
|
|
||||||
extern char* xstrdup(const char* s);
|
extern char* xstrdup(const char* s);
|
||||||
extern void* xmalloc(size_t size);
|
extern void* xmalloc(size_t size);
|
||||||
|
|
1
cheat.c
1
cheat.c
|
@ -8,7 +8,6 @@
|
||||||
|
|
||||||
FILE *logfp = NULL, *rfp = NULL;
|
FILE *logfp = NULL, *rfp = NULL;
|
||||||
bool oldstyle = false;
|
bool oldstyle = false;
|
||||||
bool editline = true;
|
|
||||||
bool prompt = true;
|
bool prompt = true;
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
|
|
16
main.c
16
main.c
|
@ -27,7 +27,6 @@
|
||||||
|
|
||||||
FILE *logfp = NULL, *rfp = NULL;
|
FILE *logfp = NULL, *rfp = NULL;
|
||||||
bool oldstyle = false;
|
bool oldstyle = false;
|
||||||
bool editline = true;
|
|
||||||
bool prompt = true;
|
bool prompt = true;
|
||||||
|
|
||||||
// LCOV_EXCL_START
|
// LCOV_EXCL_START
|
||||||
|
@ -63,11 +62,11 @@ int main(int argc, char *argv[])
|
||||||
/* Options. */
|
/* Options. */
|
||||||
|
|
||||||
#ifndef ADVENT_NOSAVE
|
#ifndef ADVENT_NOSAVE
|
||||||
const char* opts = "l:or:s";
|
const char* opts = "l:or";
|
||||||
const char* usage = "Usage: %s [-l logfilename] [-o] [-r restorefilename] [-s] \n";
|
const char* usage = "Usage: %s [-l logfilename] [-o] [-r restorefilename]\n";
|
||||||
#else
|
#else
|
||||||
const char* opts = "l:os";
|
const char* opts = "l:o";
|
||||||
const char* usage = "Usage: %s [-l logfilename] [-o] [-s] \n";
|
const char* usage = "Usage: %s [-l logfilename] [-o]\n";
|
||||||
#endif
|
#endif
|
||||||
while ((ch = getopt(argc, argv, opts)) != EOF) {
|
while ((ch = getopt(argc, argv, opts)) != EOF) {
|
||||||
switch (ch) {
|
switch (ch) {
|
||||||
|
@ -81,7 +80,7 @@ int main(int argc, char *argv[])
|
||||||
break;
|
break;
|
||||||
case 'o':
|
case 'o':
|
||||||
oldstyle = true;
|
oldstyle = true;
|
||||||
editline = prompt = false;
|
prompt = false;
|
||||||
break;
|
break;
|
||||||
#ifndef ADVENT_NOSAVE
|
#ifndef ADVENT_NOSAVE
|
||||||
case 'r':
|
case 'r':
|
||||||
|
@ -93,9 +92,6 @@ int main(int argc, char *argv[])
|
||||||
signal(SIGINT, sig_handler);
|
signal(SIGINT, sig_handler);
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
case 's':
|
|
||||||
editline = false;
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
usage, argv[0]);
|
usage, argv[0]);
|
||||||
|
@ -107,8 +103,6 @@ int main(int argc, char *argv[])
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
" -r restore from specified saved game file\n");
|
" -r restore from specified saved game file\n");
|
||||||
#endif
|
#endif
|
||||||
fprintf(stderr,
|
|
||||||
" -s suppress command editing\n");
|
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
## Exercise logging option and seed dump
|
## Exercise logging option and seed dump
|
||||||
#options: -s -l scratch.tmp
|
#options: -l scratch.tmp
|
||||||
n
|
n
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue