Changeset View
Changeset View
Standalone View
Standalone View
contrib/one-true-awk/main.c
Show First 20 Lines • Show All 111 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
int main(int argc, char *argv[]) | int main(int argc, char *argv[]) | ||||
{ | { | ||||
const char *fs = NULL; | const char *fs = NULL; | ||||
char *fn, *vn; | char *fn, *vn; | ||||
setlocale(LC_CTYPE, ""); | setlocale(LC_CTYPE, ""); | ||||
setlocale(LC_COLLATE, ""); | |||||
rgrimes: Are there any possible side effects from this no-longer being cleared to NULL? Ie, what if… | |||||
setlocale(LC_NUMERIC, "C"); /* for parsing cmdline & prog */ | setlocale(LC_NUMERIC, "C"); /* for parsing cmdline & prog */ | ||||
cmdname = argv[0]; | cmdname = argv[0]; | ||||
if (argc == 1) { | if (argc == 1) { | ||||
fprintf(stderr, | fprintf(stderr, | ||||
"usage: %s [-F fs] [-v var=value] [-f progfile | 'prog'] [file ...]\n", | "usage: %s [-F fs] [-v var=value] [-f progfile | 'prog'] [file ...]\n", | ||||
cmdname); | cmdname); | ||||
exit(1); | exit(1); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 136 Lines • Show Last 20 Lines |
Are there any possible side effects from this no-longer being cleared to NULL? Ie, what if LC_COLLATE is set, prior to this change that wouldn't matter, but after this change can that cause things like ports to break ? NVM, I think I answered that myself, after this change there are no more calls to strcoll, so this value would not matter anyway.