Archive-Unzip-Burst
view release on metacpan or search on metacpan
unzip-6.0/amiga/filedate.c view on Meta::CPAN
# include <stdlib.h> /* to be safe */
# include "memwatch.h"
# endif /* MWDEBUG */
#endif /* __SASC */
#include "crypt.h" /* just so we can tell if CRYPT is supported */
#if (!defined(FUNZIP) && !defined(UTIL))
#include "timezone.h" /* for AMIGA-specific timezone callbacks */
#ifndef SUCCESS
# define SUCCESS (-1L)
# define FAILURE 0L
#endif
#define ReqVers 36L /* required library version for SetFileDate() */
#define ENVSIZE 100 /* max space allowed for an environment var */
extern struct ExecBase *SysBase;
unzip-6.0/wince/README view on Meta::CPAN
and wince.cpp/h), the resource script files (punzip.rc, punzip.rcv, and
resource.h), several resources (punzip.ic2, zipfile.ic2, imglist.2bp,
ilmask.bmp, toolbar.2bp, punzip.ico, zipfile.ico, imglist.bmp, and
toolbar.bmp), and the help file (punzip.htp).
The application's entry point is WinMain(), which is located in winmain.cpp
(what a surprise). winmain.cpp basically contains all the Windows code and
the user interface. It knows nothing about the Info-ZIP code or things like
the Globals struct. That stuff is the job of the intrface module.
intrface.cpp implements an easy (or at least easier) to understand interface
to the Info-ZIP routines. It also handles all the callbacks from Info-ZIP
and relays the appropriate information back to the code in winmain.cpp.
The final module is wince.cpp. This module implements all the Win32 APIs
and C runtime functions that are called by the rest of the code, but are
not natively implemented on Windows CE. Most all of this module is excluded
for NT native builds.
Two preprocessor defines are used in conjunction with several defines from
the Info-ZIP code and from other ports. The two that are specific to the
Windows CE port are:
unzip-6.0/wince/intrface.cpp view on Meta::CPAN
//******************************************************************************
//
// File: INTRFACE.CPP
//
// Description: This module acts as the interface between the Info-ZIP code and
// our Windows code in WINMAIN.CPP. We expose the needed
// functions to query a file list, test file(s), extract file(s),
// and display a zip file comment. The windows code is never
// bothered with understanding the Globals structure "Uz_Globs".
//
// This module also catches all the callbacks from the Info-ZIP
// code, cleans up the data provided in the callback, and then
// forwards the information to the appropriate function in the
// windows code. These callbacks include status messages, file
// lists, comments, password prompt, and file overwrite prompts.
//
// Finally, this module implements the few functions that the
// Info-ZIP code expects the port to implement. These functions are
// OS dependent and are mostly related to validating file names and
// directories, and setting file attributes and dates of saved files.
//
// Copyright: All the source files for Pocket UnZip, except for components
// written by the Info-ZIP group, are copyrighted 1997 by Steve P.
// Miller. As of June 1999, Steve P. Miller has agreed to apply
unzip-6.0/wince/intrface.cpp view on Meta::CPAN
static int GetFileTimes(Uz_Globs *pG, FILETIME *pftCreated,
FILETIME *pftAccessed, FILETIME *pftModified);
// Check for FAT, VFAT, HPFS, etc.
static BOOL IsOldFileSystem(char *szPath);
#ifdef POCKET_UNZIP
extern "C" {
// Local variants of callbacks from Info-ZIP code.
// (These functions are not referenced by name outside this source module.)
int UZ_EXP UzpMessagePrnt2(zvoid *pG, uch *buffer, ulg size, int flag);
int UZ_EXP UzpInput2(zvoid *pG, uch *buffer, int *size, int flag);
int UZ_EXP CheckForAbort2(zvoid *pG, int fnflag, ZCONST char *zfn,
ZCONST char *efn, ZCONST zvoid *details);
int WINAPI UzpReplace(LPSTR szFile, unsigned nbufsiz);
void WINAPI UzpSound(void);
#ifdef Z_UINT8_DEFINED
void WINAPI SendAppMsg(z_uint8 uzSize, z_uint8 uzCompressedSize,
#else
unzip-6.0/wince/intrface.h view on Meta::CPAN
//******************************************************************************
//***** Function Prototypes
//******************************************************************************
// Our exposed interface functions to the Info-ZIP core.
int DoListFiles(LPCSTR szZipFile);
BOOL DoExtractOrTestFiles(LPCSTR szZipFile, EXTRACT_INFO *pei);
int DoGetComment(LPCSTR szZipFile);
BOOL SetExtractToDirectory(LPTSTR szDirectory);
// "Internal" callbacks from Info-ZIP code.
// (The "official" callback functions are declared in the UnZip DLL headers,
// see "unzip.h".)
void WINAPI Wiz_NoPrinting(int f);
int win_fprintf(zvoid *pG, FILE *file, unsigned int dwCount, char far *buffer);
//******************************************************************************
//***** Global Variables
//******************************************************************************
unzip-6.0/wince/winmain.cpp view on Meta::CPAN
*/
//******************************************************************************
//
// File: WINMAIN.CPP
//
// Description: This module contains all the Windows specific code for Pocket
// UnZip. It contains the entire user interface. This code knows
// almost nothing about the Info-ZIP code. All Info-ZIP related
// functions are wrapped by helper functions in INTRFACE.CPP. The
// code in this module only calls those wrapper functions and
// INTRFACE.CPP handles all the details and callbacks of the
// Info-ZIP code.
//
// Copyright: All the source files for Pocket UnZip, except for components
// written by the Info-ZIP group, are copyrighted 1997 by Steve P.
// Miller. The product "Pocket UnZip" itself is property of the
// author and cannot be altered in any way without written consent
// from Steve P. Miller.
//
// Disclaimer: All project files are provided "as is" with no guarantee of
// their correctness. The authors are not liable for any outcome
unzip-6.0/wince/winmain.cpp view on Meta::CPAN
// Ghost all our Unzip related menu items.
EnableAllMenuItems(IDM_FILE_PROPERTIES, FALSE);
EnableAllMenuItems(IDM_ACTION_EXTRACT, FALSE);
EnableAllMenuItems(IDM_ACTION_EXTRACT_ALL, FALSE);
EnableAllMenuItems(IDM_ACTION_TEST, FALSE);
EnableAllMenuItems(IDM_ACTION_TEST_ALL, FALSE);
EnableAllMenuItems(IDM_ACTION_VIEW, FALSE);
EnableAllMenuItems(IDM_ACTION_SELECT_ALL, FALSE);
EnableAllMenuItems(IDM_VIEW_COMMENT, FALSE);
// Let Info-ZIP and our callbacks do the work.
SendMessage(g_hWndList, WM_SETREDRAW, FALSE, 0);
int result = DoListFiles(g_szZipFile);
SendMessage(g_hWndList, WM_SETREDRAW, TRUE, 0);
// Restore/remove cursor.
SetCursor(hCur);
// Update our column widths
ResizeColumns();
unzip-6.0/wince/winmain.cpp view on Meta::CPAN
CenterWindow(hDlg);
#endif
// Set our edit control to be the full size of our dialog.
GetClientRect(hDlg, &rc);
MoveWindow(g_hWndEdit, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, FALSE);
// Show hour glass cursor while processing comment.
hCur = SetCursor(LoadCursor(NULL, IDC_WAIT));
// Let Info-ZIP and our callbacks do the work.
result = DoGetComment(g_szZipFile);
// Restore/remove our cursor.
SetCursor(hCur);
// Display an error dialog if an error occurred.
if ((result != PK_OK) && (result != PK_WARN)) {
MessageBox(g_hWndMain, GetZipErrorString(result), g_szAppName,
MB_ICONERROR | MB_OK);
}
( run in 0.352 second using v1.01-cache-2.11-cpan-9b1e4054eb1 )