From c052429fde0b1bb891d3bfa3a791d2083adcce56 Mon Sep 17 00:00:00 2001 From: "Andrey A. Chernov" Date: Sun, 10 Jun 2001 21:06:01 +0000 Subject: [PATCH] Remove "SU" - not valid country code Fix locale comparison with "C", add "POSIX" --- usr.bin/ncal/ncal.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/usr.bin/ncal/ncal.c b/usr.bin/ncal/ncal.c index 3bf1095a640..186c6f65a95 100644 --- a/usr.bin/ncal/ncal.c +++ b/usr.bin/ncal/ncal.c @@ -99,7 +99,6 @@ static struct djswitch { {"RO", "Romania", {1919, 3, 31}}, {"RU", "Russia", {1918, 1, 31}}, {"SI", "Slovenia", {1919, 3, 4}}, - {"SU", "USSR", {1920, 3, 4}}, {"SW", "Sweden", {1753, 2, 17}}, {"TR", "Turkey", {1926, 12, 18}}, {"US", "United States", {1752, 9, 2}}, @@ -204,7 +203,9 @@ main(int argc, char *argv[]) if (setlocale(LC_ALL, "") == NULL) warn("setlocale"); locale = setlocale(LC_TIME, NULL); - if (locale == NULL || locale == "C") + if (locale == NULL || + strcmp(locale, "C") == 0 || + strcmp(locale, "POSIX") == 0) locale = "_US"; q = switches + sizeof(switches) / sizeof(struct djswitch); for (p = switches; p != q; p++) -- 2.45.2