From e972e632b103aecbf99486e9e901a399b641b241 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Wed, 26 Jun 2024 00:36:28 -0400 Subject: listbas: tweak code and doc. --- listbas.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'listbas.c') diff --git a/listbas.c b/listbas.c index 2cb9dcc..a278bd7 100644 --- a/listbas.c +++ b/listbas.c @@ -148,7 +148,6 @@ CALLBACK(print_op) { default: break; } - if(tok > last_operator || (!(name = operators[tok]))) fprintf(outfh, "(bad op token $%02x)", tok); else @@ -163,11 +162,9 @@ CALLBACK(print_varname) { for(i = vnstart, count = 0; count < tok; i++) { if(program[i] & 0x80) count++; } - while(1) { - c = program[i++]; - outchr(c & 0x7f); - if(c & 0x80) break; - } + do { + outchr( (c = program[i++]) & 0x7f); + } while (c < 0x80); } CALLBACK(print_text) { -- cgit v1.2.3