From 8a5ea0833a6428f2ed783693c7572bfdd88aa9d5 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Fri, 6 Sep 2024 17:45:58 +0200 Subject: Improve error messages a tiny bit --- src/main.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 81fe189..3fe6967 100644 --- a/src/main.c +++ b/src/main.c @@ -43,7 +43,7 @@ static int rv; static bool_style_t bflag = BS_BINARY; static tbl_style_t tflag = TS_UNSET; -bool interactive; +bool interactive, utf8; const char *current_file; static void astprocess_cli(asts_t); @@ -119,10 +119,9 @@ usage: } } - if (tflag == TS_UNSET) { - tflag = streq(nl_langinfo(CODESET), "UTF-8") - ? TS_UTF8 : TS_ASCII; - } + utf8 = streq(nl_langinfo(CODESET), "UTF-8"); + if (tflag == TS_UNSET) + tflag = utf8 ? TS_UTF8 : TS_ASCII; argc -= optind; argv += optind; -- cgit v1.2.3