From 42be594d26e472d4990f6ca1d39fc30757f5006d Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Tue, 16 Jul 2024 04:25:31 -0400 Subject: listbas: get "hacks" out of main(). --- listbas.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/listbas.c b/listbas.c index 961ec32..d964baa 100644 --- a/listbas.c +++ b/listbas.c @@ -689,13 +689,8 @@ void init_token_tables() { init_bxe_tables(); } -int main(int argc, char **argv) { - set_self(*argv); - parse_general_args(argc, argv, print_help); - parse_env_args(); - parse_args(argc, argv, 0); - - if(bas_type != B_ATARI && bas_type != B_APLUS) +void init_bas_dialect() { + if(bas_type == B_BXL || bas_type == B_BXE) allow_hex_const = 1; if(bas_type == B_APLUS) @@ -703,7 +698,15 @@ int main(int argc, char **argv) { if(bas_type == B_BXL) bxl_exttok_hack = 1; +} + +int main(int argc, char **argv) { + set_self(*argv); + parse_general_args(argc, argv, print_help); + parse_env_args(); + parse_args(argc, argv, 0); + init_bas_dialect(); init_token_tables(); readfile(); -- cgit v1.2.3