| 836 | } |
| 837 | |
| 838 | int |
| 839 | main (int argc, char **argv) |
| 840 | { |
| 841 | char const *specified_mode = NULL; |
| 842 | bool make_backups = false; |
| 843 | char const *backup_suffix = NULL; |
| 844 | char *version_control_string = NULL; |
| 845 | bool mkdir_and_install = false; |
| 846 | struct cp_options x; |
| 847 | char const *target_directory = NULL; |
| 848 | bool no_target_directory = false; |
| 849 | bool strip_program_specified = false; |
| 850 | char const *scontext = NULL; |
| 851 | /* set iff kernel has extra selinux system calls */ |
| 852 | selinux_enabled = (0 < is_selinux_enabled ()); |
| 853 | |
| 854 | initialize_main (&argc, &argv); |
| 855 | set_program_name (argv[0]); |
| 856 | setlocale (LC_ALL, ""); |
| 857 | bindtextdomain (PACKAGE, LOCALEDIR); |
| 858 | textdomain (PACKAGE); |
| 859 | |
| 860 | atexit (close_stdin); |
| 861 | |
| 862 | cp_option_init (&x); |
| 863 | |
| 864 | umask (0); |
| 865 | |
| 866 | int optc; |
| 867 | while ((optc = getopt_long (argc, argv, "bcCsDdg:m:o:pt:TvS:Z", long_options, |
| 868 | NULL)) |
| 869 | != -1) |
| 870 | { |
| 871 | switch (optc) |
| 872 | { |
| 873 | case 'b': |
| 874 | make_backups = true; |
| 875 | if (optarg) |
| 876 | version_control_string = optarg; |
| 877 | break; |
| 878 | case 'c': |
| 879 | break; |
| 880 | case 'C': |
| 881 | copy_only_if_needed = true; |
| 882 | break; |
| 883 | case 's': |
| 884 | strip_files = true; |
| 885 | #ifdef SIGCHLD |
| 886 | /* System V fork+wait does not work if SIGCHLD is ignored. */ |
| 887 | signal (SIGCHLD, SIG_DFL); |
| 888 | #endif |
| 889 | break; |
| 890 | case DEBUG_OPTION: |
| 891 | x.debug = x.verbose = true; |
| 892 | break; |
| 893 | case STRIP_PROGRAM_OPTION: |
| 894 | strip_program = xstrdup (optarg); |
| 895 | strip_program_specified = true; |
nothing calls this directly
no test coverage detected