From 8a1009c65d31c0814efdcbf484dfc600530f8820 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Mon, 8 Jul 2024 23:01:09 -0400 Subject: whichbas: improve detection of TRACE/EXTEND, cmd token 0x59. --- whichbas.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/whichbas.c b/whichbas.c index be21435..ff955ff 100644 --- a/whichbas.c +++ b/whichbas.c @@ -225,11 +225,19 @@ CALLBACK(handle_cmd) { } break; case 0x58: /* TRACE (optional + or -), EXTEND (BXE; no args) */ - /* EXTEND can't show up in a program except maybe line 32768, e.g. - EXTEND:SAVE "D:BLAH". */ - remove_type(BT_BXL); - if(lineno < 32768) { - remove_type(BT_BXE); + if(nexttok == OP_PLUS || nexttok == OP_MINUS) { + bas_type = BT_TURBO; + print_result(); + } else { + /* In BXL, this looks to be an extra END token, that behaves the same + as the regular one, but can't be entered in the editor. Assume + no BXL program contains this token. */ + remove_type(BT_BXL); + if(lineno < 32768) { + /* EXTEND can't show up in a program except maybe line 32768, e.g. + EXTEND:SAVE "D:BLAH". */ + remove_type(BT_BXE); + } } break; case 0x59: /* TEXT or PROCEDURE */ -- cgit v1.2.3