aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-09-06 17:45:58 +0200
committerThomas Voss <mail@thomasvoss.com> 2024-09-06 17:45:58 +0200
commit8a5ea0833a6428f2ed783693c7572bfdd88aa9d5 (patch)
tree463f4fe4bec121d65532b209a6a8ba8db9a0d267 /src/main.c
parentc2a254fb64499d74a76ab53bae2d7fdcd5f5b0c8 (diff)
Improve error messages a tiny bit
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c9
1 files changed, 4 insertions, 5 deletions
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;