X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=src%2Fmain.c;h=00ef6d8cac495e3df70bf7407f38a01ac18d33b3;hb=7986601dcba66059e6f269b389dffe7924ddf50f;hp=9920f38006bb7737c0ef77a02d0b934ee33a34a7;hpb=c8f46dfa8f411b643907bc4c372bf788140f26f3;p=smdp.git diff --git a/src/main.c b/src/main.c index 9920f38..00ef6d8 100644 --- a/src/main.c +++ b/src/main.c @@ -36,6 +36,7 @@ void usage() { fprintf(stderr, "%s", " -i, --invert swap black and white color\n"); fprintf(stderr, "%s", " -t, --notrans disable transparency in transparent terminal\n"); fprintf(stderr, "%s", " -s, --noslidenum do not show slide number at the bottom\n"); + fprintf(stderr, "%s", " -v, --version display the version number and license\n"); fprintf(stderr, "%s", " -x, --noslidemax show slide number, but not total number of slides\n"); fprintf(stderr, "%s", "\nWith no FILE, or when FILE is -, read standard input.\n\n"); exit(EXIT_FAILURE); @@ -90,8 +91,9 @@ int main(int argc, char *argv[]) { } } - // set locale to read and display UTF-8 correctly in ncurses - setlocale(LC_CTYPE, "en_US.UTF8"); + // set locale to that of the environment, so that ncurses properly renders + // UTF-8 characters if the system supports it + setlocale(LC_CTYPE, ""); // open file or set input to STDIN char *file = NULL;