~crc_/retroforth

10711711fbaf7b0ee07dc53738d1b9288a526595 — crc 1 year, 1 month ago 4d3970b
nga-c: add internal "interactive" flag to VM state information (#94)

FossilOrigin-Name: 7c5ed4e2a5b64dd3e55be32525c423df55287d0e2726a80ac2dcadf80e3262ca
1 files changed, 3 insertions(+), 0 deletions(-)

M vm/nga-c/retro.c
M vm/nga-c/retro.c => vm/nga-c/retro.c +3 -0
@@ 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++;