| 547 | } |
| 548 | |
| 549 | int |
| 550 | main (int argc, char **argv) |
| 551 | { |
| 552 | /* The printf(3) format used for output. */ |
| 553 | char const *format_str = NULL; |
| 554 | |
| 555 | initialize_main (&argc, &argv); |
| 556 | set_program_name (argv[0]); |
| 557 | locale_ok = !!setlocale (LC_ALL, ""); |
| 558 | bindtextdomain (PACKAGE, LOCALEDIR); |
| 559 | textdomain (PACKAGE); |
| 560 | |
| 561 | atexit (close_stdout); |
| 562 | |
| 563 | /* We have to handle negative numbers in the command line but this |
| 564 | conflicts with the command line arguments. So explicitly check first |
| 565 | whether the next argument looks like a negative number. */ |
| 566 | while (optind < argc) |
| 567 | { |
| 568 | int optc; |
| 569 | if (argv[optind][0] == '-' |
| 570 | && ((optc = argv[optind][1]) == '.' || c_isdigit (optc))) |
| 571 | { |
| 572 | /* means negative number */ |
| 573 | break; |
| 574 | } |
| 575 | |
| 576 | optc = getopt_long (argc, argv, "+f:s:w", long_options, NULL); |
| 577 | if (optc == -1) |
| 578 | break; |
| 579 | |
| 580 | switch (optc) |
| 581 | { |
| 582 | case 'f': |
| 583 | format_str = optarg; |
| 584 | break; |
| 585 | |
| 586 | case 's': |
| 587 | separator = optarg; |
| 588 | break; |
| 589 | |
| 590 | case 'w': |
| 591 | equal_width = true; |
| 592 | break; |
| 593 | |
| 594 | case_GETOPT_HELP_CHAR; |
| 595 | |
| 596 | case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS); |
| 597 | |
| 598 | default: |
| 599 | usage (EXIT_FAILURE); |
| 600 | } |
| 601 | } |
| 602 | |
| 603 | int n_args = argc - optind; |
| 604 | if (n_args < 1) |
| 605 | { |
| 606 | error (0, 0, _("missing operand")); |
nothing calls this directly
no test coverage detected