Support execution of command script arguments.
This commit is contained in:
parent
8378063198
commit
bb2b8e0fca
7 changed files with 80 additions and 9 deletions
|
@ -11,7 +11,6 @@
|
|||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <editline/readline.h>
|
||||
#include <time.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
|
@ -74,7 +73,7 @@ int suspend(void)
|
|||
game.saved = game.saved + 5;
|
||||
|
||||
while (fp == NULL) {
|
||||
char* name = readline("\nFile name: ");
|
||||
char* name = myreadline("\nFile name: ");
|
||||
if (name == NULL)
|
||||
return GO_TOP;
|
||||
fp = fopen(name, WRITE_MODE);
|
||||
|
@ -107,7 +106,7 @@ int resume(void)
|
|||
}
|
||||
|
||||
while (fp == NULL) {
|
||||
char* name = readline("\nFile name: ");
|
||||
char* name = myreadline("\nFile name: ");
|
||||
// Autocomplete can leave the input with an extra traoling space.
|
||||
if (name != NULL && strlen(name) > 0 && name[strlen(name) - 1] == ' ')
|
||||
name[strlen(name) - 1] = '\0';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue