51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#include <system.h>
+#include <system-ioctl.h>
#include <signal.h>
#include <closeout.h>
#include <fnmatch.h>
+#include <getline.h>
#include <human.h>
#include <quotearg.h>
{
static FILE *read_file;
static int looped;
+ int prompt;
if (!read_file && !info_script_option)
/* FIXME: if fopen is used, it will never be closed. */
archive_name_cursor = archive_name_array;
looped = 1;
}
+ prompt = looped;
tryagain:
- if (looped)
+ if (prompt)
{
/* We have to prompt from now on. */
open_warn (*archive_name_cursor);
if (!verify_option && mode == ACCESS_WRITE && backup_option)
undo_last_backup ();
+ prompt = 1;
goto tryagain;
}
block_ordinal = current_block_ordinal ();
blk = start_header (&st);
- free (st.orig_file_name);
if (!blk)
abort (); /* FIXME */
finish_header (&st, blk, block_ordinal);
+ free (st.orig_file_name);
}
}