From c205442db594cb9c19de8b065f32ac837b220370 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Sat, 20 Jul 2024 19:06:52 -0400 Subject: listbas: decouple -a and -c options (so -a followed by -U won't be in mono). --- listbas.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/listbas.c b/listbas.c index 3226340..ab23fc3 100644 --- a/listbas.c +++ b/listbas.c @@ -211,7 +211,7 @@ void parse_args(int argc, char **argv, int from_env) { while( (opt = getopt(argc, argv, "r:Db:UCviamnBdhxulc:kt")) != -1) { switch(opt) { case 'U': output_mode = M_UTF8; break; - case 'a': output_mode = M_ATASCII; color = 0; 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; @@ -235,6 +235,8 @@ void parse_args(int argc, char **argv, int from_env) { } } + if(output_mode == M_ATASCII) color = 0; + if(!from_env) { if(optind >= argc) { die("No input file given (use - for stdin)."); -- cgit v1.2.3