summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>2001-06-10 21:06:01 +0000
committerache <ache@FreeBSD.org>2001-06-10 21:06:01 +0000
commit1988303641ed5eeea7666f3901f34f2f7c6d0710 (patch)
treee8334ad122a8c0f2e9af23a69f1960c65a461018 /usr.bin
parent3686cdeeacd38b2eb03e1d5de43b13866fdd1461 (diff)
downloadFreeBSD-src-1988303641ed5eeea7666f3901f34f2f7c6d0710.zip
FreeBSD-src-1988303641ed5eeea7666f3901f34f2f7c6d0710.tar.gz
Remove "SU" - not valid country code
Fix locale comparison with "C", add "POSIX"
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/ncal/ncal.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/ncal/ncal.c b/usr.bin/ncal/ncal.c
index 3bf1095..186c6f6 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++)
OpenPOWER on IntegriCloud