From 9442040891f239ae3d53982cffe4176012f3ef20 Mon Sep 17 00:00:00 2001 From: Paul Oliver Date: Thu, 29 Feb 2024 01:50:44 +0100 Subject: Modified quit-without-save command. --- tsalis/README.md | 2 +- tsalis/src/handler.c | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'tsalis') diff --git a/tsalis/README.md b/tsalis/README.md index ce27647..e58ebd2 100644 --- a/tsalis/README.md +++ b/tsalis/README.md @@ -51,7 +51,7 @@ control some aspects of the simulation. Parameters here are represented by |Command |Param. 1 |Param. 2 |Action | |:-----------|:-----------|:-----------|---------------------------------------------------------------------:| |q |--- |--- |Save and quit simulation. | -|x |--- |--- |Quit simulation without saving. | +|q! |--- |--- |Quit simulation without saving. | |i*XX*\_*XX* |address |instructions|Writes given instructions into address. | |c*XX*\_*XX* |address |file name |Compiles given file into address. | |n*XX*\_*XX* |address |size |Initializes organism of given size into address. | diff --git a/tsalis/src/handler.c b/tsalis/src/handler.c index 265df47..e886733 100644 --- a/tsalis/src/handler.c +++ b/tsalis/src/handler.c @@ -163,11 +163,10 @@ runConsole(void) switch (command[0]) { case 'q': - s_save(g_simName); - g_exit = STRUE; - break; + if (command[1] != '!') { + s_save(g_simName); + } - case 'x': g_exit = STRUE; break; -- cgit v1.2.1