- strcpy(target_dir, argv[optind+1]);
- }
- }
-/* 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]);
- }
-*/
- else if (optflag & dpkg_deb_extract) {
- extract_flag = TRUE;
- strcpy(ar_filename, "data.tar.gz");
- if ( (optind + 2) > argc ) {
- error_msg_and_die("No directory specified\n");
- }
- target_dir = (char *) xmalloc(strlen(argv[optind+1]));
- strcpy(target_dir, argv[optind+1]);
- }
- else if (optflag & dpkg_deb_verbose_extract) {
- extract_flag = TRUE;
- list_flag = TRUE;
- strcpy(ar_filename, "data.tar.gz");
- if ( (optind + 2) > argc ) {
- error_msg_and_die("No directory specified\n");
- }
- target_dir = (char *) xmalloc(strlen(argv[optind+1]));
- strcpy(target_dir, argv[optind+1]);
- }
-
- ar_headers = (ar_headers_t *) xmalloc(sizeof(ar_headers_t));
- srcFd = open(argv[optind], O_RDONLY);
-
- *ar_headers = get_headers(srcFd);
- if (ar_headers->next==NULL)
- error_msg_and_die("Couldnt find %s in %s\n",ar_filename, argv[optind]);