- if (((optind + 1 ) > argc) || (optflag == 0)) {
- show_usage();
- }
- if ((optflag & dpkg_deb_control) || (optflag & dpkg_deb_extract) || (optflag & dpkg_deb_verbose_extract)) {
- if ( (optind + 1) == argc ) {
- target_dir = (char *) xmalloc(7);
- strcpy(target_dir, "DEBIAN");
- } else {
- target_dir = (char *) xmalloc(strlen(argv[optind + 1]));
- strcpy(target_dir, argv[optind + 1]);
- }
- }
- deb_extract(optflag, target_dir, argv[optind]);
-/* else if (optflag & dpkg_deb_info) {
- extract_flag = TRUE;
- extract_to_stdout = TRUE;
- strcpy(ar_filename, "control.tar.gz");
- extract_list = argv+optind+1;
- printf("list one is [%s]\n",extract_list[0]);
- }
-*/