verbose = 0;
noexec = FALSE; /* debugging option */
force = FALSE;
- timestamping = FALSE;
+ timestamp_archive = FALSE;
compress_method = DEFAULT_LZHUFF_METHOD; /* defined in config.h */
header_level = 2; /* level 2 */
quiet_mode = 0;
- file_time_stamp = 0;
#ifdef EUC
euc_mode = FALSE;
fprintf(stdout, "\
usage: lha [-]<commands>[<options>] [-<options> ...] archive_file [file...]\n\
commands: [axelvudmcpt]\n\
- options: [q[012]vnfto[567]dizg012s%s%s[w=<dir>|x=<pattern>]]\n\
+ options: [q[012]vnfto[567]dizg012%s%s[w=<dir>|x=<pattern>]]\n\
long options: --system-kanji-code={euc,sjis,utf8,cap}\n\
--archive-kanji-code={euc,sjis,utf8,cap}\n\
--extract-broken-archive\n\
--convert-filename-case\n\
- --ignore-mac-files\n\
+ --ignore-mac-files\n\
+ --timestamp-archive\n\
--traditional\n\
--help\n\
--version\n"
LHa for UNIX V 1.00 Copyright(C) 1992 Masaru Oki\n\
LHa for UNIX V 1.14 Modified 1995 Nobutaka Watazaki\n\
LHa for UNIX V 1.14i Modified 2000 Tsugio Okamoto\n\
+LHA-PMA for UNIX V 2 PMA added 2000 Maarten ter Huurne\n\
Autoconfiscated 2001-2008 Koji Arai\n\
");
");
#endif
fprintf(stdout, "\
- s time-stamp archive (a)\n\
w=<dir> specify extract directory (x/e)\n\
x=<pattern> eXclude files (a/u/c)\n\
");
{"convert-filename-case", no_argument, &convertcase, TRUE},
{"traditional", no_argument, 0, TRADITIONAL_BEHAVIOR},
{"ignore-mac-files", no_argument, 0, IGNORE_MAC_FILES},
+ {"timestamp-archive", no_argument, ×tamp_archive, 1},
{"debug", required_argument, 0, DEBUG_OPTION},
{0, 0, 0, 0}
};
int i;
- char short_options[256] = "q[012]vnfto[567]dizg012esw:x:";
+ char short_options[256] = "q[012]vnfto[567]dizg012ew:x:";
/* "[...]" means optional 1 byte argument (original extention) */
#if HAVE_LIBAPPLEFILE
decode_macbinary_contents = TRUE;
break;
#endif
- case 's':
- timestamping = TRUE;
- break;
case 'n':
noexec = TRUE;
break;
char *n = name;
while (*path)
if (*path++ != *n++)
- return (path[-1] == '/' && *n == '\0');
+ return (path[-1] == '/' && n[-1] == '\0');
return (*n == '/' || (n != name && path[-1] == '/' && n[-1] == '/'));
}
}
/* ------------------------------------------------------------------------ */
-void
-copy_old_one(oafp, nafp, hdr)
- FILE *oafp, *nafp;
- LzHeader *hdr;
-{
- if (noexec) {
- fseeko(oafp, hdr->header_size + hdr->packed_size, SEEK_CUR);
- }
- else {
- reading_filename = archive_name;
- writing_filename = temporary_name;
- copyfile(oafp, nafp, hdr->header_size + hdr->packed_size, 0, 0);
- }
-}
-
#undef exit
void