23 #define UNZIP_INTERNAL 44 " Length EAs ACLs Date Time Name";
46 "--------- --- ---- ---------- ----- ----";
49 " Length Date Time Name";
51 "--------- ---------- ----- ----";
55 " Length Method Size Cmpr Date Time CRC-32 Name";
57 "-------- ------ ------- ---- ---------- ----- -------- ----";
62 "%s (\"^\" ==> case\n%s conversion)\n";
64 "%s %-7s%s %4s %02u%c%02u%c%02u %02u:%02u %08lx %c";
66 "-------- ------- --- \ 67 -------\n%s %s %4s %lu file%s\n";
70 "%s %6lu %6lu %02u%c%02u%c%02u %02u:%02u %c";
72 "--------- ----- ----- \ 73 -------\n%s %6lu %6lu %lu file%s\n";
74 static ZCONST char Far OS2ExtAttrTrailer[] =
75 "%lu file%s %lu bytes of OS/2 extended attributes attached.\n";
77 "%lu file%s %lu bytes of access control lists attached.\n";
80 "%s %02u%c%02u%c%02u %02u:%02u %c";
82 "--------- -------\n%s\ 100 char sgn, cfactorstr[10];
101 int longhdr=(
uO.vflag>1);
108 #ifdef USE_EF_UT_TIME 113 zusz_t csiz, tot_csize=0L, tot_ucsize=0L;
115 ulg ea_size, tot_easize=0L, tot_eafiles=0L;
116 ulg acl_size, tot_aclsize=0L, tot_aclfiles=0L;
120 static ZCONST char dtype[]=
"NXFS";
122 {
"Stored",
"Shrunk",
"Reduce1",
"Reduce2",
"Reduce3",
"Reduce4",
123 "Implode",
"Token",
"Defl:#",
"Def64#",
"ImplDCL",
"BZip2",
124 "LZMA",
"Terse",
"IBMLZ77",
"WavPack",
"PPMd",
"Unk:###"};
206 error_in_archive =
error;
217 error_in_archive =
error;
227 do_this_file =
FALSE;
237 do_this_file =
FALSE;
253 if (
G.processExternally) {
263 ea_size = acl_size = 0;
280 #ifdef USE_EF_UT_TIME 292 t = (
struct tm *)
NULL;
293 if (t != (
struct tm *)
NULL) {
294 mo = (unsigned)(t->tm_mon + 1);
295 dy = (unsigned)(t->tm_mday);
296 yr = (unsigned)(t->tm_year + 1900);
297 hh = (unsigned)(t->tm_hour);
298 mm = (unsigned)(t->tm_min);
311 switch (date_format) {
346 #if defined(DOS_FLX_NLM_OS2_W32) || defined(THEOS) || defined(UNIX) 355 if (
G.lpUserFunctions->SendApplicationMessage !=
NULL)
356 (*
G.lpUserFunctions->SendApplicationMessage)(
G.
crec.
ucsize,
362 else if (
G.lpUserFunctions->SendApplicationMessage_i32 !=
NULL) {
363 unsigned long ucsize_lo, csiz_lo;
364 unsigned long ucsize_hi=0L, csiz_hi=0L;
366 csiz_lo = (
unsigned long)(csiz);
369 csiz_hi = (
unsigned long)(csiz >> 32);
371 (*
G.lpUserFunctions->SendApplicationMessage_i32)(ucsize_lo,
372 ucsize_hi, csiz_lo, csiz_hi, (
unsigned)
cfactor,
387 FmZofft(csiz,
"8",
"u"), cfactorstr,
408 error_in_archive =
error;
417 tot_easize += ea_size;
421 tot_aclsize += acl_size;
440 && !
G.processExternally
456 G.lpUserFunctions->TotalSizeComp = tot_csize;
457 G.lpUserFunctions->TotalSize = tot_ucsize;
459 G.lpUserFunctions->NumMembers = members;
469 cfactorstr, members, members==1?
"":
"s"));
471 if (tot_easize || tot_aclsize)
473 if (tot_eafiles && tot_easize)
475 tot_eafiles, tot_eafiles == 1?
" has" :
"s have a total of",
477 if (tot_aclfiles && tot_aclsize)
480 tot_aclfiles == 1 ?
" has" :
"s have a total of",
486 FmZofft(tot_ucsize,
"9",
"u"), tot_easize, tot_aclsize,
487 members, members == 1 ?
"" :
"s"));
491 members, members == 1 ?
"" :
"s"));
497 if (error_in_archive <=
PK_WARN) {
515 if (members == 0L && error_in_archive <=
PK_WARN)
520 return error_in_archive;
534 static int fn_is_dir(
__G)
554 int get_time_stamp(
__G__ last_modtime, nmember)
556 time_t *last_modtime;
561 #ifdef USE_EF_UT_TIME 583 if (((
unsigned)(j - 1) & (
unsigned)0xFFFF) ==
603 error_in_archive =
error;
614 error_in_archive =
error;
624 do_this_file =
FALSE;
634 do_this_file =
FALSE;
647 #ifdef USE_EF_UT_TIME 656 if (*last_modtime < z_utime.
mtime)
657 *last_modtime = z_utime.
mtime;
663 if (*last_modtime < modtime)
664 *last_modtime = modtime;
680 if (*nmember == 0L && error_in_archive <=
PK_WARN)
683 return error_in_archive;
707 (
int) ((uc-
c + (denom>>1)) / denom) :
708 -((
int) ((
c-uc + (denom>>1)) / denom)));
712 (
int) ((1000L*(uc-
c) + (denom>>1)) / denom) :
713 -((
int) ((1000L*(
c-uc) + (denom>>1)) / denom)));