mirror of
https://git.sr.ht/~crc_/retroforth
synced 2024-11-16 19:48:56 +01:00
nga-c: add internal "interactive" flag to VM state information (#94)
FossilOrigin-Name: 7c5ed4e2a5b64dd3e55be32525c423df55287d0e2726a80ac2dcadf80e3262ca
This commit is contained in:
parent
4d3970b3e0
commit
10711711fb
1 changed files with 3 additions and 0 deletions
|
@ -127,6 +127,7 @@ struct NgaState {
|
|||
char line[4096];
|
||||
int current_source;
|
||||
int perform_abort;
|
||||
int interactive;
|
||||
|
||||
CELL currentLine;
|
||||
CELL ignoreToEOL, ignoreToEOF;
|
||||
|
@ -858,6 +859,7 @@ int main(int argc, char **argv) {
|
|||
#endif
|
||||
|
||||
initialize(vm); /* Initialize Nga & image */
|
||||
vm->interactive = 0;
|
||||
|
||||
register_device(vm, io_output, query_output);
|
||||
register_device(vm, io_keyboard, query_keyboard);
|
||||
|
@ -940,6 +942,7 @@ int main(int argc, char **argv) {
|
|||
exit(0);
|
||||
} else if (strcmp(argv[i], "-i") == 0) {
|
||||
modes[FLAG_INTERACTIVE] = 1;
|
||||
vm->interactive = -1;
|
||||
} else if (strcmp(argv[i], "-f") == 0) {
|
||||
include_file(vm, argv[i + 1], 0);
|
||||
i++;
|
||||
|
|
Loading…
Reference in a new issue