From 21ed0c9090c6bab5e315474cd3a959abeb70ac11 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Tue, 16 Jul 2024 14:58:45 -0400 Subject: listbas: remove -A option, make autodetect the default. --- listbas.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'listbas.c') diff --git a/listbas.c b/listbas.c index d0a87fd..8c55f99 100644 --- a/listbas.c +++ b/listbas.c @@ -76,7 +76,7 @@ int immediate = 0; /* 1 with -i */ int underline = 0; /* 1 with -u */ int skip_lineno = 0; /* 1 with -l */ int dump_tables = 0; /* 1 with -D */ -int autodetect = 0; /* 1 with -a */ +int autodetect = 1; /* 0 with -b */ /* change these with -c */ int color_cmd = C_YELLOW; @@ -167,14 +167,13 @@ void parse_args(int argc, char **argv, int from_env) { optind = 1; - while( (opt = getopt(argc, argv, "ADb:UCviamnBdhxulc:")) != -1) { + while( (opt = getopt(argc, argv, "Db:UCviamnBdhxulc:")) != -1) { switch(opt) { case 'U': output_mode = M_UTF8; break; case 'a': output_mode = M_ATASCII; break; case 'm': output_mode = M_MAG; break; case 'd': output_mode = M_DOTS; break; case 'x': output_mode = M_UTF8_I; break; - case 'A': autodetect = 1; break; case 'D': dump_tables = 1; break; case 'v': verbose = 1; break; case 'i': immediate = 1; break; @@ -183,7 +182,7 @@ void parse_args(int argc, char **argv, int from_env) { case 'C': color = 1; break; case 'n': color = 0; break; case 'l': skip_lineno = 1; break; - case 'b': bas_type = get_bas_type(optarg); break; + case 'b': autodetect = 0; bas_type = get_bas_type(optarg); break; case 'c': parse_color_scheme(optarg); break; case 'h': print_help(); exit(0); default: @@ -764,7 +763,7 @@ void detect_bas_dialect() { } else { /* we are the child */ if(execvp(args[0], (char * const *)args) < 0) { - perror("exec()"); + perror("Can't execute whichbas"); exit(1); } } -- cgit v1.2.3