| 759 | } |
| 760 | |
| 761 | int |
| 762 | main (int argc, char **argv) |
| 763 | { |
| 764 | bool ignore_environment = false; |
| 765 | bool opt_nul_terminate_output = false; |
| 766 | char const *newdir = NULL; |
| 767 | char *argv0 = NULL; |
| 768 | |
| 769 | initialize_main (&argc, &argv); |
| 770 | set_program_name (argv[0]); |
| 771 | setlocale (LC_ALL, ""); |
| 772 | bindtextdomain (PACKAGE, LOCALEDIR); |
| 773 | textdomain (PACKAGE); |
| 774 | |
| 775 | initialize_exit_failure (EXIT_CANCELED); |
| 776 | atexit (close_stdout); |
| 777 | |
| 778 | initialize_signals (); |
| 779 | |
| 780 | int optc; |
| 781 | while ((optc = getopt_long (argc, argv, shortopts, longopts, NULL)) != -1) |
| 782 | { |
| 783 | switch (optc) |
| 784 | { |
| 785 | case 'a': |
| 786 | argv0 = optarg; |
| 787 | break; |
| 788 | case 'i': |
| 789 | ignore_environment = true; |
| 790 | break; |
| 791 | case 'u': |
| 792 | append_unset_var (optarg); |
| 793 | break; |
| 794 | case 'v': |
| 795 | dev_debug = true; |
| 796 | break; |
| 797 | case '0': |
| 798 | opt_nul_terminate_output = true; |
| 799 | break; |
| 800 | case DEFAULT_SIGNAL_OPTION: |
| 801 | parse_signal_action_params (optarg, true); |
| 802 | parse_block_signal_params (optarg, false); |
| 803 | break; |
| 804 | case IGNORE_SIGNAL_OPTION: |
| 805 | parse_signal_action_params (optarg, false); |
| 806 | break; |
| 807 | case BLOCK_SIGNAL_OPTION: |
| 808 | parse_block_signal_params (optarg, true); |
| 809 | break; |
| 810 | case LIST_SIGNAL_HANDLING_OPTION: |
| 811 | report_signal_handling = true; |
| 812 | break; |
| 813 | case 'C': |
| 814 | newdir = optarg; |
| 815 | break; |
| 816 | case 'S': |
| 817 | parse_split_string (optarg, &optind, &argc, &argv); |
| 818 | break; |
nothing calls this directly
no test coverage detected