From 7f361151ce53864540cfcff10e694bd557fcdf8f Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Sat, 12 Apr 2025 15:35:20 -0700 Subject: vmon: set locale I'd like to get thousands markers in some of the numbers produced via snprintf in the charts, so call setlocale() with "" so it gets set to whatever the environment has. e.g. LC_ALL=$LANG src/vmon In Arch here gets my LC_ALL set to "en_US.UTF-8", which will put commas in for thousands separators wherever the format modifier "'" has been added. --- src/vmon.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/vmon.c') diff --git a/src/vmon.c b/src/vmon.c index 74ca857..9b86ad0 100644 --- a/src/vmon.c +++ b/src/vmon.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -605,6 +606,7 @@ static vmon_t * vmon_startup(int argc, const char * const *argv) assert(argv); + setlocale(LC_ALL, ""); print_copyright(); vmon = calloc(1, sizeof(vmon_t)); -- cgit v1.2.3