Archive-Unzip-Burst
view release on metacpan or search on metacpan
lib/Archive/Unzip/Burst.xs view on Meta::CPAN
char psLBEntry[_MAX_PATH];
char LongHdrStats[] =
"%7lu %7lu %4s %02u-%02u-%02u %02u:%02u %c%s";
char CompFactorStr[] = "%c%d%%";
char CompFactor100[] = "100%%";
char szCompFactor[10];
char sgn;
if (csize > ucsize)
sgn = '-';
else
sgn = ' ';
if (cfactor == 100)
lstrcpy(szCompFactor, CompFactor100);
else
sprintf(szCompFactor, CompFactorStr, sgn, cfactor);
wsprintf(psLBEntry, LongHdrStats,
ucsize, csize, szCompFactor, mo, dy, yr, hh, mm, c, filename);
printf("%s\n", psLBEntry);
}
/* Password entry routine - see password.c in the wiz directory for how
this is actually implemented in WiZ. If you have an encrypted file,
this will probably give you great pain.
*/
int WINAPI password(LPSTR p, int n, LPCSTR m, LPCSTR name)
{
return 1;
}
/* Dummy "print" routine that simply outputs what is sent from the dll */
int WINAPI DisplayBuf(LPSTR buf, unsigned long size)
{
printf("%s", (char *)buf);
return (int)(unsigned int) size;
}
#else
int UzpMain(int, char**);
#endif
MODULE = Archive::Unzip::Burst PACKAGE = Archive::Unzip::Burst
int
_unzip(filename)
char * filename
INIT:
int r;
CODE:
int argno = 4;
char* args[4];
args[0] = "unzip";
args[1] = "-qq";
args[2] = "-o";
args[3] = filename;
r = UzpMain(argno, args);
RETVAL = r;
OUTPUT:
RETVAL
( run in 0.456 second using v1.01-cache-2.11-cpan-5735350b133 )