11#include "../src/lhazsfx.h"
15#define MULTIBYTE_FIRST_P SJC_FIRST_P
16#define MULTIBYTE_SECOND_P SJC_SECOND_P
17#define is_directory(statp) (((statp)->st_mode & S_IFMT) == S_IFDIR)
18#define is_regularfile(statp) (((statp)->st_mode & S_IFMT) == S_IFREG)
19#define METHOD_TYPE_STRAGE 5
20#define BUFFERSIZE 2048
21#define LZHEADER_STRAGE 4096
22#define LZHUFF0_METHOD_NUM 0
23#define LZHUFF1_METHOD_NUM 1
24#define LZHUFF2_METHOD_NUM 2
25#define LZHUFF3_METHOD_NUM 3
26#define LZHUFF4_METHOD_NUM 4
27#define LZHUFF5_METHOD_NUM 5
28#define LZHUFF6_METHOD_NUM 6
29#define LZHUFF7_METHOD_NUM 7
30#define LARC_METHOD_NUM 8
31#define LARC5_METHOD_NUM 9
32#define LARC4_METHOD_NUM 10
33#define LZHDIRS_METHOD_NUM 11
34#define EXTEND_GENERIC 0
35#define EXTEND_MSDOS 'M'
36#define EXTEND_HUMAN 'H'
62 SFX(HINSTANCE hInstance);
147 static LRESULT CALLBACK
WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
148 static INT_PTR CALLBACK
DialogCancel(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
149 static INT_PTR CALLBACK
DialogMain(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
150 static INT_PTR CALLBACK
DialogOverWrite(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
155 long CopyFile(MYFILE* f2,
long size,
bool calc_crc);
158 HWND
CreateWindowExDpi(DWORD dwExStyle, LPCTSTR lpClassName, LPCTSTR lpWindowName, DWORD dwStyle,
int X,
int Y,
int nWidth,
int nHeight, HWND hWndParent, HMENU hMenu, HINSTANCE hInstance, LPVOID lpParam);
159 unsigned short DecodeLzhuf(MYFILE* outfp,
long original_size,
long packed_size, TCHAR* name,
int method);
165 inline unsigned char GetByte(
void) {
return ((
unsigned char)(*
GetPtr++ & 0xFF)); };
171 inline unsigned short GetWord(
void);
172 bool Init(HINSTANCE hInstance);
175 static void (_cdecl Thread)(
void*);
Main Class
Definition lhaz.h:47
LZH-SFX class
Definition sfx.h:59
bool ExtractOne(LzHeader *hdr)
ExtractOne
Definition Sfx.cpp:637
bool Skip
Definition sfx.h:143
INQ_RET Inquire_extract(const MYSTR &name)
Inquire_extract
Definition Sfx.cpp:977
HWND StaticWnd
Definition sfx.h:144
static void(_cdecl Thread)(void *)
bool Option
Definition sfx.h:141
int Run(void)
Run
Definition Sfx.cpp:281
bool Error
Definition sfx.h:136
void Exec(void)
Exec
Definition Sfx.cpp:610
@ I_HEADER_CHECKSUM
Definition sfx.h:95
@ I_HEADER_LEVEL
Definition sfx.h:96
@ I_PACKED_SIZE
Definition sfx.h:98
@ I_METHOD
Definition sfx.h:97
static const int SKIP_SIZE
Definition sfx.h:119
MYBUF ZoneIdentifier
Definition sfx.h:145
MYSTR DestDir
Definition sfx.h:135
bool Extract(void)
Extract
Definition Sfx.cpp:622
unsigned short DecodeLzhuf(MYFILE *outfp, long original_size, long packed_size, TCHAR *name, int method)
DecodeLzhuf
Definition Sfx.cpp:480
static const TCHAR LHAZOPEN[]
Definition sfx.h:123
bool GetHeader(LzHeader *hdr)
GetHeader
Definition Sfx.cpp:735
HWND CreateWindowExDpi(DWORD dwExStyle, LPCTSTR lpClassName, LPCTSTR lpWindowName, DWORD dwStyle, int X, int Y, int nWidth, int nHeight, HWND hWndParent, HMENU hMenu, HINSTANCE hInstance, LPVOID lpParam)
CreateWindowExDpi
Definition Sfx.cpp:199
long GetLongword(void)
GetLongword
Definition Sfx.cpp:899
HWND Hwnd
Definition sfx.h:140
static const TCHAR LHAZEXT[]
Definition sfx.h:124
static const TCHAR LHAZVIEW[]
Definition sfx.h:125
void SetupGet(char *p)
Definition sfx.h:174
time_t GenericToUnixStamp(long t)
GenericToUnixStamp
Definition Sfx.cpp:691
MYSTR gOverWriteMes
Definition sfx.h:138
long CopyFile(MYFILE *f2, long size, bool calc_crc)
CopyFile
Definition Sfx.cpp:392
long GetTZ(void)
GetTZ
Definition Sfx.cpp:955
static LRESULT CALLBACK WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
WndProc
Definition Sfx.cpp:294
static bool Initialized
Definition sfx.h:129
‾SFX(void)
Destructor
Definition Sfx.cpp:213
@ SFX_STOP
Definition sfx.h:72
@ SFX_PRGRS
Definition sfx.h:70
@ SFX_START
Definition sfx.h:68
@ SFX_DISP
Definition sfx.h:69
@ SFX_FINISH
Definition sfx.h:71
void CreateShortCut(void)
CreateShortCut
Definition Sfx.cpp:419
void DispName(const MYSTR &name)
DispName
Definition Sfx.cpp:596
void Adjust_info(TCHAR *name, LzHeader *hdr)
Adjust_info
Definition Sfx.cpp:351
unsigned short GetWord(void)
GetWord
Definition Sfx.cpp:966
char * GetPtr
Definition sfx.h:139
static const TCHAR LHAZARC[]
Definition sfx.h:126
unsigned char GetByte(void)
Definition sfx.h:165
MYFILE * Afp
Definition sfx.h:132
@ LZH_EXT_HEAD_CRC
Definition sfx.h:101
@ LZH_EXT_HEAD_GID
Definition sfx.h:112
@ LZH_EXT_HEAD_RESRV
Definition sfx.h:116
@ LZH_EXT_HEAD_ATRB
Definition sfx.h:105
@ LZH_EXT_HEAD_USER
Definition sfx.h:114
@ LZH_EXT_HEAD_MODT
Definition sfx.h:115
@ LZH_EXT_HEAD_GROUP
Definition sfx.h:113
@ LZH_EXT_HEAD_COMNT
Definition sfx.h:104
@ LZH_EXT_HEAD_UNI_PATH
Definition sfx.h:109
@ LZH_EXT_HEAD_UNI_FNAME
Definition sfx.h:108
@ LZH_EXT_HEAD_FNAME
Definition sfx.h:102
@ LZH_EXT_HEAD_PATH
Definition sfx.h:103
@ LZH_EXT_HEAD_SIZE
Definition sfx.h:107
@ LZH_EXT_HEAD_PERMS
Definition sfx.h:111
@ LZH_EXT_HEAD_CP
Definition sfx.h:110
@ LZH_EXT_HEAD_TIME
Definition sfx.h:106
MYSTR DecodeName
Definition sfx.h:134
static INT_PTR CALLBACK DialogMain(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
DialogMain
Definition Sfx.cpp:512
static const TCHAR SFXTITLE[]
Definition sfx.h:121
static HINSTANCE Instance
Definition sfx.h:130
int CalcSum(char *p, int len)
CalcSum
Definition Sfx.cpp:361
@ LHAZWND_HEIGHT
Definition sfx.h:77
@ LHAZWND_WIDTH
Definition sfx.h:76
void UpdateShell(bool mkdir, TCHAR *p)
UpdateShell
Definition Sfx.cpp:1074
HWND CancelButtonWnd
Definition sfx.h:133
bool Force
Definition sfx.h:137
static INT_PTR CALLBACK DialogOverWrite(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition Sfx.cpp:1026
bool ChangeDir(const TCHAR *dir)
ChangeDir
Definition Sfx.cpp:371
bool Init(HINSTANCE hInstance)
Init
Definition Sfx.cpp:221
bool GetParam(void)
GetParam
Definition Sfx.cpp:912
void CreateShortCutSub(int)
CreateShortCutSub
Definition Sfx.cpp:434
@ GZIP
Definition sfx.h:80
static INT_PTR CALLBACK DialogCancel(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
static const char * Methods[]
Definition sfx.h:35
INQ_RET
Definition sfx.h:86
@ INQ_CANCEL
Definition sfx.h:91
@ INQ_SKIP
Definition sfx.h:89
@ INQ_OK
Definition sfx.h:87
@ INQ_SKIP_ALL
Definition sfx.h:90
@ INQ_NO
Definition sfx.h:88
static const TCHAR ClassName[]
Definition sfx.h:120
LHAZSFX Param
Definition sfx.h:142
int GetTotalSize(void)
GetTotalSize
Definition Sfx.cpp:922
#define METHOD_TYPE_STRAGE
Definition sfx.h:19