Remove "SU" - not valid country code
Fix locale comparison with "C", add "POSIX"
This commit is contained in:
parent
0503c005e0
commit
c052429fde
@ -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++)
|
||||
|
Loading…
Reference in New Issue
Block a user