| 4429 | } |
| 4430 | |
| 4431 | int |
| 4432 | main (int argc, char **argv) |
| 4433 | { |
| 4434 | struct keyfield *key; |
| 4435 | struct keyfield key_buf; |
| 4436 | struct keyfield gkey; |
| 4437 | bool gkey_only = false; |
| 4438 | char const *s; |
| 4439 | int c = 0; |
| 4440 | char checkonly = 0; |
| 4441 | bool mergeonly = false; |
| 4442 | char *random_source = NULL; |
| 4443 | bool need_random = false; |
| 4444 | size_t nthreads = 0; |
| 4445 | size_t nfiles = 0; |
| 4446 | bool posixly_correct = (getenv ("POSIXLY_CORRECT") != NULL); |
| 4447 | int posix_ver = posix2_version (); |
| 4448 | bool traditional_usage = ! (200112 <= posix_ver && posix_ver < 200809); |
| 4449 | char **files; |
| 4450 | char *files_from = NULL; |
| 4451 | struct Tokens tok; |
| 4452 | char const *outfile = NULL; |
| 4453 | bool locale_ok; |
| 4454 | |
| 4455 | initialize_main (&argc, &argv); |
| 4456 | set_program_name (argv[0]); |
| 4457 | locale_ok = !! setlocale (LC_ALL, ""); |
| 4458 | bindtextdomain (PACKAGE, LOCALEDIR); |
| 4459 | textdomain (PACKAGE); |
| 4460 | |
| 4461 | initialize_exit_failure (SORT_FAILURE); |
| 4462 | |
| 4463 | hard_LC_COLLATE = hard_locale (LC_COLLATE); |
| 4464 | #if HAVE_NL_LANGINFO |
| 4465 | hard_LC_TIME = hard_locale (LC_TIME); |
| 4466 | #endif |
| 4467 | |
| 4468 | /* Get locale's representation of the decimal point. */ |
| 4469 | { |
| 4470 | struct lconv const *locale = localeconv (); |
| 4471 | |
| 4472 | /* If the locale doesn't define a decimal point, or if the decimal |
| 4473 | point is multibyte, use the C locale's decimal point. FIXME: |
| 4474 | add support for multibyte decimal points. */ |
| 4475 | decimal_point = locale->decimal_point[0]; |
| 4476 | if (! decimal_point || locale->decimal_point[1]) |
| 4477 | decimal_point = '.'; |
| 4478 | |
| 4479 | /* FIXME: add support for multibyte thousands separators. */ |
| 4480 | thousands_sep = locale->thousands_sep[0]; |
| 4481 | if (thousands_sep && locale->thousands_sep[1]) |
| 4482 | thousands_sep_ignored = true; |
| 4483 | if (! thousands_sep || locale->thousands_sep[1]) |
| 4484 | thousands_sep = NON_CHAR; |
| 4485 | } |
| 4486 | |
| 4487 | inittables (); |
| 4488 |
nothing calls this directly
no test coverage detected