diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-09-06 17:45:58 +0200 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-09-06 17:45:58 +0200 |
commit | 8a5ea0833a6428f2ed783693c7572bfdd88aa9d5 (patch) | |
tree | 463f4fe4bec121d65532b209a6a8ba8db9a0d267 /src/main.c | |
parent | c2a254fb64499d74a76ab53bae2d7fdcd5f5b0c8 (diff) |
Improve error messages a tiny bit
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -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; |