This commit is contained in:
King_DuckZ 2020-05-05 20:23:03 +02:00
parent bf7250aed3
commit c9bd217232
7 changed files with 124 additions and 24 deletions

View file

@ -12,8 +12,8 @@ all:
@echo ""
@echo "TARGET_SYSTEM is one of"
@echo ""
@echo " posix-utf8 : POSIX with utf8 filesystem(Most of modern OS, e.g. OSX/Ubuntu)"
@echo " posix : POSIX system (FreeBSD/linux/OSX/sparc/Win32)"
@echo " posix-utf8 : POSIX with utf8 filesystem(e.g. OSX)"
@echo " linux-utf8 : LINUX with utf8 filesystem(without -liconv option)"
@echo " posix-noiconv : POSIX without libiconv (Windows(MINGW32,CYGWIN) or EUC-KR file system)"
@echo ""

View file

@ -118,6 +118,16 @@ static BOOL IsBigEndian(void)
#endif
// 64bit file handling support
#if (_FILE_OFFSET_BITS==64)
# define unalz_fseek fseeko
# define unalz_ftell ftello
#else
# define unalz_fseek fseek
# define unalz_ftell ftell
#endif
// error string table <- CUnAlz::ERR ÀÇ ¹ø¿ª
static const char* errorstrtable[]=
{
@ -278,7 +288,7 @@ BOOL CUnAlz::Open(const char* szPathName)
BOOL ret;
if(FEof()) break;
//int pos = ftell(m_fp);
//int pos = unalz_ftell(m_fp);
sig = ReadSignature();
if(sig==SIG_EOF)
{
@ -1494,9 +1504,9 @@ BOOL CUnAlz::FOpen(const char* szPathName)
m_files[i].fp = fopen(temp, "rb");
if(m_files[i].fp==NULL) break;
dwFileSizeHigh=0;
fseek(m_files[i].fp,0,SEEK_END);
nFileSizeLow=ftell(m_files[i].fp);
fseek(m_files[i].fp,0,SEEK_SET);
unalz_fseek(m_files[i].fp,0,SEEK_END);
nFileSizeLow=unalz_ftell(m_files[i].fp);
unalz_fseek(m_files[i].fp,0,SEEK_SET);
#endif
m_nFileCount++;
m_files[i].nFileSize = ((INT64)nFileSizeLow) + (((INT64)dwFileSizeHigh)<<32);
@ -1584,7 +1594,7 @@ BOOL CUnAlz::FSeek(INT64 offset)
#ifdef _WIN32
SetFilePointer(m_files[i].fp, LONG(m_nCurFilePos), &remainHigh, FILE_BEGIN);
#else
fseek(m_files[i].fp, m_nCurFilePos, SEEK_SET);
unalz_fseek(m_files[i].fp, m_nCurFilePos, SEEK_SET);
#endif
return TRUE;
}
@ -1668,7 +1678,7 @@ BOOL CUnAlz::FRead(void* buffer, UINT32 nBytesToRead, int* pTotRead )
#ifdef _WIN32
SetFilePointer(m_files[m_nCurFile].fp, (int)m_nCurFilePos, NULL, FILE_BEGIN);
#else
fseek(m_files[m_nCurFile].fp, m_nCurFilePos, SEEK_SET);
unalz_fseek(m_files[m_nCurFile].fp, m_nCurFilePos, SEEK_SET);
#endif
}
else

View file

@ -115,6 +115,10 @@
- unalz 0.62
2009/01/09 - apple gcc (by lacovnk)
- unalz 0.63
2009/01/20 - 2GB가 (by bsjeon@hanmail)
-
-
- unalz 0.64
:
- alz (deflate/ bzip2/raw)
@ -564,7 +568,7 @@ private : //
INT64 m_nCurFilePos; ///< 현재 파일의 물리적 위치.
BOOL m_bIsEOF; ///< 파일의 끝까지 (분할 파일 포함해서) 왔나?
BOOL m_bIsEncrypted; // xf86
BOOL m_bIsEncrypted; ///< by xf86
BOOL m_bIsDataDescr;
#define UNALZ_LEN_PASSWORD 512
char m_szPasswd[UNALZ_LEN_PASSWORD];

View file

@ -68,9 +68,10 @@ int ListAlz(CUnAlz* pUnAlz, const char* src)
list = pUnAlz->GetFileList();
printf("\nListing archive: %s\n"
"\n Date & Time Attr Size Compressed Name\n",
"\n"
"Attr Uncomp Size Comp Size Date & Time & File Name\n",
src);
printf("------------------- ----- ------------ ------------ ------------\n");
printf("---- ------------ ------------ ------------------------------------------------\n");
// char szDate[64];
char szTime[64];
@ -91,9 +92,9 @@ int ListAlz(CUnAlz* pUnAlz, const char* src)
// attributes
FileAttr2Str(szAttr, i->head.fileAttribute);
printf("%19s %s " I64FORM(12) " " I64FORM(12) " %s%s\n",
szTime, szAttr, i->uncompressedSize,
i->compressedSize, i->fileName,
printf("%s " I64FORM(12) " " I64FORM(12) " %s %s%s\n",
szAttr, i->uncompressedSize,
i->compressedSize, szTime, i->fileName,
i->head.fileDescriptor & ALZ_FILE_DESCRIPTOR_ENCRYPTED ? "*" : "" );
++fileNum;
@ -101,11 +102,9 @@ int ListAlz(CUnAlz* pUnAlz, const char* src)
totalCompressedSize += i->compressedSize;
}
printf("------------------- ----- ------------ ------------ ------------\n");
printf(" " U64FORM(12) " " U64FORM(12) " %u file(s)\n",
totalUnCompressedSize, totalCompressedSize, fileNum);
printf("---- ------------ ------------ ------------------------------------------------\n");
printf(" " U64FORM(12) " " U64FORM(12) " Total %u file%s\n",
totalUnCompressedSize, totalCompressedSize, fileNum, fileNum<=1 ? "" : "s");
return 0;
}

View file

@ -1,3 +1,41 @@
/*
UNALZ : read and extract module for ALZ format.
LICENSE (zlib License)
Copyright (C) 2004-2009 kippler@gmail.com , http://www.kipple.pe.kr
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
"있는 그대로" .
.
.
1. .
.
2. .
3. .
=============================================================================================================
*/
////////////////////////////////////////////////////////////////////////////////////////////////////
///
/// unalz 관련 유틸 모음

View file

@ -1,3 +1,40 @@
/*
UNALZ : read and extract module for ALZ format.
LICENSE (zlib License)
Copyright (C) 2004-2009 kippler@gmail.com , http://www.kipple.pe.kr
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
"있는 그대로" .
.
.
1. .
.
2. .
3. .
=============================================================================================================
*/
#ifdef _WIN32
# pragma warning( disable : 4786 ) // stl warning ¾ø¾Ö±â
#endif
@ -32,7 +69,8 @@ void Copyright()
// printf("unalz v0.60 (2006/12/31) \n");
// printf("unalz v0.61 (2007/02/10) \n");
// printf("unalz v0.62 (2008/04/04) \n");
printf("unalz v0.63 (2009/01/09) \n");
// printf("unalz v0.63 (2009/01/09) \n");
printf("unalz v0.64 (2009/01/20) \n");
printf("Copyright(C) 2004-2009 by kippler@gmail.com (http://www.kipple.pe.kr) \n");
}
@ -104,7 +142,7 @@ void UnAlzCallback(const char* szFileName, INT64 nCurrent, INT64 nRange, void* p
#else
snprintf(szMessage, MSG_BUF_LEN, "unalziiiing : %s (%lldbytes) ", szFileName, nRange);
#endif
printf("%s", szMessage);
printf("%s.", szMessage);
fflush(stdout);
nPrevPercent = -1;
return;
@ -318,7 +356,7 @@ int main(int argc, char* argv[])
}
}
if(g_bPipeMode==FALSE)
printf("\ndone..\n");
printf("\ndone.\n");
}
return 0;

View file

@ -1,14 +1,12 @@
unalz v0.63
unalz v0.64
Copyright(C) 2004-2009 by kippler@gmail.com (http://www.kipple.pe.kr)
- LICENSE (zlib License)
Copyright (C) 2004-2009 kippler@gmail.com , http://www.kipple.pe.kr
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
@ -25,3 +23,16 @@
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
이 소프트웨어는 어떠한 명시적 또는 묵시적 보증도 없이 "있는 그대로" 제공됩니다. 그
어떤 경우에도 작성자는 이 소프트웨어의 사용으로 인한 손해에 대해 책임을 지지 않습니다.
다음 제한 규정을 준수하는 경우에 한하여 상업적인 응용 프로그램을 포함하는 모든 용도로 이 소프트웨어를
사용하고 자유롭게 수정 및 재배포할 수 있는 권한이 누구에게나 부여됩니다.
1. 이 소프트웨어의 출처를 잘못 표시하거나 원래 소프트웨어를 자신이 작성했다고 주장해서는 안 됩니다. 제품에
이 소프트웨어를 사용하는 경우 요구 사항은 아니지만 제품 설명서에 인정 조항을 넣어 주시면 감사하겠습니다.
2. 수정된 소스 버전은 반드시 명확하게 표시되어야 하며 원래 소프트웨어로 오인되도록 잘못 표시해서는 안 됩니다.
3. 모든 소스 배포 시 이 공지를 삭제하거나 수정할 수 없습니다.