aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2024-07-16 04:25:31 -0400
committerB. Watson <urchlay@slackware.uk>2024-07-16 04:25:31 -0400
commit42be594d26e472d4990f6ca1d39fc30757f5006d (patch)
treee98338057c56a64c7c7c93afac2e74e1eb0a0b71
parentd4942ad6efac89f7228264d8c124c0ae9c47245f (diff)
downloadbw-atari8-tools-42be594d26e472d4990f6ca1d39fc30757f5006d.tar.gz
listbas: get "hacks" out of main().
-rw-r--r--listbas.c17
1 files 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();