Support execution of command script arguments.

This commit is contained in:
Eric S. Raymond 2022-04-05 08:31:10 -04:00
parent 8378063198
commit bb2b8e0fca
7 changed files with 80 additions and 9 deletions

View file

@ -45,6 +45,8 @@
* which has its own meaning. */
#define STASHED(obj) (-1 - game.prop[obj])
#define PROMPT "> "
/*
* DESTROY(N) = Get rid of an item by putting it in LOC_NOWHERE
* MOD(N,M) = Arithmetic modulus
@ -194,6 +196,10 @@ struct settings_t {
FILE *logfp;
bool oldstyle;
bool prompt;
char **argv;
int argc;
int optind;
FILE *scriptfp;
};
typedef struct {
@ -215,6 +221,7 @@ typedef struct {
extern struct game_t game;
extern struct settings_t settings;
extern char *myreadline(const char *);
extern bool get_command_input(command_t *);
extern void clear_command(command_t *);
extern void speak(const char*, ...);