From 60fe32f8d608149e6ab2824ba298877d621bb333 Mon Sep 17 00:00:00 2001 From: Denton Woods Date: Sun, 27 Nov 2016 20:34:24 -0600 Subject: Test --- DevIL/examples/windows_example/resource.h | 162 +++---- DevIL/include/IL/ilut_config.h | 52 +- DevIL/src-ILU/include/ilu_error/ilu_err-french.h | 110 ++--- DevIL/src-ILU/include/ilu_error/ilu_err-italian.h | 110 ++--- DevIL/test/Unzip/NV_UNZIP.H | 46 +- DevIL/test/Unzip/UNZIP.H | 550 +++++++++++----------- 6 files changed, 515 insertions(+), 515 deletions(-) diff --git a/DevIL/examples/windows_example/resource.h b/DevIL/examples/windows_example/resource.h index 06211129..771d7910 100644 --- a/DevIL/examples/windows_example/resource.h +++ b/DevIL/examples/windows_example/resource.h @@ -1,81 +1,81 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Visual C++ generated include file. -// Used by windows_example.rc -// -#define IDR_MENU1 101 -#define IDI_ICON1 102 -#define IDR_ACCELERATOR1 103 -#define IDD_DIALOG_FILTER 104 -#define IDC_FILTER_EDIT 1001 -#define IDC_FILTER_DESC_TEXT 1002 -#define ID_FILE_OPEN40001 40001 -#define ID_FILE_OPENURL 40002 -#define ID_FILE_SAVE40003 40003 -#define ID_FILE_IMAGEPROPERTIES 40004 -#define ID_FILE_PRINT40005 40005 -#define ID_FILE_EXIT 40006 -#define ID_EDIT_UNDO40007 40007 -#define ID_EDIT_UNDOLEVEL 40008 -#define ID_EDIT_COOPY 40009 -#define ID_EDIT_PASTE40010 40010 -#define ID_EDIT_VIEWMIPMAP 40011 -#define ID_EDIT_VIEWIMAGENUMBER 40012 -#define ID_EDIT_NEXTIMAGE 40013 -#define ID_EDIT_C 40014 -#define ID_CONVERT_COLORINDEXED 40015 -#define ID_CONVERT_LUMINANCE 40016 -#define ID_CONVERT_LUMINANCEALPHA 40017 -#define ID_CONVERT_RGB 40018 -#define ID_CONVERT_RGBA 40019 -#define ID_CONVERT_BGR 40020 -#define ID_CONVERT_BGRA 40021 -#define ID_CONVERT_ALLPHA 40022 -#define ID_CONVERT_BATCHCONVERT 40023 -#define ID_CONVERT_UNSIGNEDBYTE 40024 -#define ID_CONVERT_UNSIGNEDBYTE40025 40025 -#define ID_CONVERT_UNSIGNEDSHORT 40026 -#define ID_CONVERT_FLOAT 40027 -#define ID_CONVERT_DOUBLE 40028 -#define ID_CONVERT_HALF 40029 -#define ID_HELP_ABOUT 40030 -#define ID_TOOLS_COUNTCOLORS 40031 -#define ID_TOOLS_BACKGROUNDCOLOR 40032 -#define ID_TOOLS_FILTERS 40033 -#define ID_TOOLS_FLIP 40034 -#define ID_TOOLS_MIRROR 40035 -#define ID_TOOLS_ROTATE 40036 -#define ID_TOOLS_SCALE 40037 -#define ID_TOOLS_SCALEBOX 40038 -#define ID_FILTERS_ALIENIFY 40039 -#define ID_FILTERS_APPLYWAVE 40040 -#define ID_FILTERS_BLUR 40041 -#define ID_FILTERS_EDGEDETECT 40042 -#define ID_FILTERS_EMBOSS 40043 -#define ID_FILTERS_EQUALIZE 40044 -#define ID_FILTERS_GAMMACORRECT 40045 -#define ID_FILTERS_NEGATIVE 40046 -#define ID_FILTERS_NOISE 40047 -#define ID_FILTERS_PIXELIZE 40048 -#define ID_FILTERS_SHARPEN 40049 -#define ID_EDIT_VIEWFACE 40050 -#define ID_EDIT_VIEWBASEIMAGE 40051 -#define ID_CONVERT_ALPHA 40052 -#define ID_CONVERT_UNSIGNEDINT 40053 -#define ID_EDIT_COPY40054 40054 -#define ID_EDIT_PREVIOUSIMAGE 40055 -#define ID_FILTERS_BLURGAUSSIAN 40064 -#define ID_FILTERS_BLURAVERAGE 40065 -#define ID_EDGEDETECT_SOBEL 40066 -#define ID_EDGEDETECT_PREWITT 40067 -#define ID_EDGEDETECT_EMBOSS 40068 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 105 -#define _APS_NEXT_COMMAND_VALUE 40069 -#define _APS_NEXT_CONTROL_VALUE 1003 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by windows_example.rc +// +#define IDR_MENU1 101 +#define IDI_ICON1 102 +#define IDR_ACCELERATOR1 103 +#define IDD_DIALOG_FILTER 104 +#define IDC_FILTER_EDIT 1001 +#define IDC_FILTER_DESC_TEXT 1002 +#define ID_FILE_OPEN40001 40001 +#define ID_FILE_OPENURL 40002 +#define ID_FILE_SAVE40003 40003 +#define ID_FILE_IMAGEPROPERTIES 40004 +#define ID_FILE_PRINT40005 40005 +#define ID_FILE_EXIT 40006 +#define ID_EDIT_UNDO40007 40007 +#define ID_EDIT_UNDOLEVEL 40008 +#define ID_EDIT_COOPY 40009 +#define ID_EDIT_PASTE40010 40010 +#define ID_EDIT_VIEWMIPMAP 40011 +#define ID_EDIT_VIEWIMAGENUMBER 40012 +#define ID_EDIT_NEXTIMAGE 40013 +#define ID_EDIT_C 40014 +#define ID_CONVERT_COLORINDEXED 40015 +#define ID_CONVERT_LUMINANCE 40016 +#define ID_CONVERT_LUMINANCEALPHA 40017 +#define ID_CONVERT_RGB 40018 +#define ID_CONVERT_RGBA 40019 +#define ID_CONVERT_BGR 40020 +#define ID_CONVERT_BGRA 40021 +#define ID_CONVERT_ALLPHA 40022 +#define ID_CONVERT_BATCHCONVERT 40023 +#define ID_CONVERT_UNSIGNEDBYTE 40024 +#define ID_CONVERT_UNSIGNEDBYTE40025 40025 +#define ID_CONVERT_UNSIGNEDSHORT 40026 +#define ID_CONVERT_FLOAT 40027 +#define ID_CONVERT_DOUBLE 40028 +#define ID_CONVERT_HALF 40029 +#define ID_HELP_ABOUT 40030 +#define ID_TOOLS_COUNTCOLORS 40031 +#define ID_TOOLS_BACKGROUNDCOLOR 40032 +#define ID_TOOLS_FILTERS 40033 +#define ID_TOOLS_FLIP 40034 +#define ID_TOOLS_MIRROR 40035 +#define ID_TOOLS_ROTATE 40036 +#define ID_TOOLS_SCALE 40037 +#define ID_TOOLS_SCALEBOX 40038 +#define ID_FILTERS_ALIENIFY 40039 +#define ID_FILTERS_APPLYWAVE 40040 +#define ID_FILTERS_BLUR 40041 +#define ID_FILTERS_EDGEDETECT 40042 +#define ID_FILTERS_EMBOSS 40043 +#define ID_FILTERS_EQUALIZE 40044 +#define ID_FILTERS_GAMMACORRECT 40045 +#define ID_FILTERS_NEGATIVE 40046 +#define ID_FILTERS_NOISE 40047 +#define ID_FILTERS_PIXELIZE 40048 +#define ID_FILTERS_SHARPEN 40049 +#define ID_EDIT_VIEWFACE 40050 +#define ID_EDIT_VIEWBASEIMAGE 40051 +#define ID_CONVERT_ALPHA 40052 +#define ID_CONVERT_UNSIGNEDINT 40053 +#define ID_EDIT_COPY40054 40054 +#define ID_EDIT_PREVIOUSIMAGE 40055 +#define ID_FILTERS_BLURGAUSSIAN 40064 +#define ID_FILTERS_BLURAVERAGE 40065 +#define ID_EDGEDETECT_SOBEL 40066 +#define ID_EDGEDETECT_PREWITT 40067 +#define ID_EDGEDETECT_EMBOSS 40068 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 105 +#define _APS_NEXT_COMMAND_VALUE 40069 +#define _APS_NEXT_CONTROL_VALUE 1003 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/DevIL/include/IL/ilut_config.h b/DevIL/include/IL/ilut_config.h index 5830cf8d..8b187a4e 100755 --- a/DevIL/include/IL/ilut_config.h +++ b/DevIL/include/IL/ilut_config.h @@ -1,26 +1,26 @@ -#ifndef __ILUT_CONFIG_H__ -#define __ILUT_CONFIG_H__ - -//#define IL_USE_PRAGMA_LIBS - -// Supported APIs (ILUT) - -// -// sorry just -// cant get this one to work under windows -// have disabled for the now -// -// will look at it some more later -// -// Kriss -// -#undef ILUT_USE_ALLEGRO - -#undef ILUT_USE_DIRECTX8 -//#define ILUT_USE_DIRECTX9 -//#define ILUT_USE_DIRECTX10 -#define ILUT_USE_OPENGL -//#define ILUT_USE_SDL -#define ILUT_USE_WIN32 - -#endif//__ILUT_CONFIG_H__ +#ifndef __ILUT_CONFIG_H__ +#define __ILUT_CONFIG_H__ + +//#define IL_USE_PRAGMA_LIBS + +// Supported APIs (ILUT) + +// +// sorry just +// cant get this one to work under windows +// have disabled for the now +// +// will look at it some more later +// +// Kriss +// +#undef ILUT_USE_ALLEGRO + +#undef ILUT_USE_DIRECTX8 +//#define ILUT_USE_DIRECTX9 +//#define ILUT_USE_DIRECTX10 +#define ILUT_USE_OPENGL +//#define ILUT_USE_SDL +#define ILUT_USE_WIN32 + +#endif//__ILUT_CONFIG_H__ diff --git a/DevIL/src-ILU/include/ilu_error/ilu_err-french.h b/DevIL/src-ILU/include/ilu_error/ilu_err-french.h index ec38c126..d3b280d3 100644 --- a/DevIL/src-ILU/include/ilu_error/ilu_err-french.h +++ b/DevIL/src-ILU/include/ilu_error/ilu_err-french.h @@ -1,57 +1,57 @@ -//----------------------------------------------------------------------------- -// -// ImageLib Utility Sources -// Copyright (C) 2000-2009 by Denton Woods -// Last modified: 03/03/2009 -// -// Filename: src-ILU/include/ilu_error/ilu_err_french.h -// -// Description: Error functions in French, by Thibaut Cuvelier. -// -//----------------------------------------------------------------------------- - - -#ifndef ILU_ERR_FRENCH_H -#define ILU_ERR_FRENCH_H - -#include "ilu_internal.h" - -ILconst_string iluErrorStringsFrench[IL_FILE_READ_ERROR - IL_INVALID_ENUM + 1] = { - IL_TEXT("énumération invalide"), - IL_TEXT("dépassement de mémoire"), - IL_TEXT("format non supporté"), - IL_TEXT("erreur interne"), - IL_TEXT("valeur illégale"), - IL_TEXT("opération illégale"), - IL_TEXT("valeur de fichier illégale"), - IL_TEXT("en-tête de fichier invalide"), - IL_TEXT("paramètre invalide"), - IL_TEXT("ne peut pas ouvrir le fichier"), - IL_TEXT("extension invalide"), - IL_TEXT("fichier déjà existant"), - IL_TEXT("équivalent hors-format"), - IL_TEXT("stack overflow"), //often used like this in French, so no need to translate - IL_TEXT("stack underflow"), - IL_TEXT("conversion invalide"), - IL_TEXT("mauvaises dimensions"), - IL_TEXT("erreur lors de la lecture du fichier") -}; - -ILconst_string iluLibErrorStringsFrench[IL_LIB_EXR_ERROR - IL_LIB_GIF_ERROR + 1] = { - IL_TEXT("gif : erreur dans la librairie"), //or: gif : erreur dans la bibliothèque (but less used) - IL_TEXT("jpeg : erreur dans la librairie"), - IL_TEXT("png : erreur dans la librairie"), - IL_TEXT("tiff : erreur dans la librairie"), - IL_TEXT("mng : erreur dans la librairie"), - IL_TEXT("jp2 : erreur dans la librairie"), - IL_TEXT("exr : erreur dans la librairie") -}; - -ILconst_string iluMiscErrorStringsFrench[2] = { - IL_TEXT("pas d'erreur"), - IL_TEXT("erreur inconnue") -}; - -#endif//ILU_ERR_FRENCH_H +//----------------------------------------------------------------------------- +// +// ImageLib Utility Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 03/03/2009 +// +// Filename: src-ILU/include/ilu_error/ilu_err_french.h +// +// Description: Error functions in French, by Thibaut Cuvelier. +// +//----------------------------------------------------------------------------- + + +#ifndef ILU_ERR_FRENCH_H +#define ILU_ERR_FRENCH_H + +#include "ilu_internal.h" + +ILconst_string iluErrorStringsFrench[IL_FILE_READ_ERROR - IL_INVALID_ENUM + 1] = { + IL_TEXT("énumération invalide"), + IL_TEXT("dépassement de mémoire"), + IL_TEXT("format non supporté"), + IL_TEXT("erreur interne"), + IL_TEXT("valeur illégale"), + IL_TEXT("opération illégale"), + IL_TEXT("valeur de fichier illégale"), + IL_TEXT("en-tête de fichier invalide"), + IL_TEXT("paramètre invalide"), + IL_TEXT("ne peut pas ouvrir le fichier"), + IL_TEXT("extension invalide"), + IL_TEXT("fichier déjà existant"), + IL_TEXT("équivalent hors-format"), + IL_TEXT("stack overflow"), //often used like this in French, so no need to translate + IL_TEXT("stack underflow"), + IL_TEXT("conversion invalide"), + IL_TEXT("mauvaises dimensions"), + IL_TEXT("erreur lors de la lecture du fichier") +}; + +ILconst_string iluLibErrorStringsFrench[IL_LIB_EXR_ERROR - IL_LIB_GIF_ERROR + 1] = { + IL_TEXT("gif : erreur dans la librairie"), //or: gif : erreur dans la bibliothèque (but less used) + IL_TEXT("jpeg : erreur dans la librairie"), + IL_TEXT("png : erreur dans la librairie"), + IL_TEXT("tiff : erreur dans la librairie"), + IL_TEXT("mng : erreur dans la librairie"), + IL_TEXT("jp2 : erreur dans la librairie"), + IL_TEXT("exr : erreur dans la librairie") +}; + +ILconst_string iluMiscErrorStringsFrench[2] = { + IL_TEXT("pas d'erreur"), + IL_TEXT("erreur inconnue") +}; + +#endif//ILU_ERR_FRENCH_H diff --git a/DevIL/src-ILU/include/ilu_error/ilu_err-italian.h b/DevIL/src-ILU/include/ilu_error/ilu_err-italian.h index 5db2d983..09d7bd18 100644 --- a/DevIL/src-ILU/include/ilu_error/ilu_err-italian.h +++ b/DevIL/src-ILU/include/ilu_error/ilu_err-italian.h @@ -1,57 +1,57 @@ -//----------------------------------------------------------------------------- -// -// ImageLib Utility Sources -// Copyright (C) 2000-2009 by Denton Woods -// Last modified: 15/03/2009 -// -// Filename: src-ILU/include/ilu_error/ilu_err_french.h -// -// Description: Error functions in Italian, by Thibaut Cuvelier. -// -//----------------------------------------------------------------------------- - - -#ifndef ILU_ERR_ITALIAN_H -#define ILU_ERR_ITALIAN_H - -#include "ilu_internal.h" - -ILconst_string iluErrorStringsItalian[IL_FILE_READ_ERROR - IL_INVALID_ENUM + 1] = { - IL_TEXT("insediamento nullo"), - IL_TEXT("raggiungendo di memoria"), - IL_TEXT("configuri non sostenne"), - IL_TEXT("erreur interne"), - IL_TEXT("errore interno"), - IL_TEXT("opération illégale"), - IL_TEXT("operazione illegale"), - IL_TEXT("inebri archivio nullo"), - IL_TEXT("parametro nullo"), - IL_TEXT("non può aprire l'archivio"), - IL_TEXT("dilazione nulla"), - IL_TEXT("archivi già esistendo"), - IL_TEXT("equivalente fuori-configuri"), - IL_TEXT("inondi di batteria"), - IL_TEXT("insufficienza di batteria"), - IL_TEXT("conversione nulla"), - IL_TEXT("cattive misure"), - IL_TEXT("si sbagli alla durata della lettura dell'archivio") -}; - -ILconst_string iluLibErrorStringsItalian[IL_LIB_EXR_ERROR - IL_LIB_GIF_ERROR + 1] = { - IL_TEXT("gif : si sbagli nella libreria"), - IL_TEXT("jpeg : si sbagli nella libreria"), - IL_TEXT("png : si sbagli nella libreria"), - IL_TEXT("tiff : si sbagli nella libreria"), - IL_TEXT("mng : si sbagli nella libreria"), - IL_TEXT("jp2 : si sbagli nella libreria"), - IL_TEXT("exr : si sbagli nella libreria") -}; - -ILconst_string iluMiscErrorStringsItalian[2] = { - IL_TEXT("niente errore"), - IL_TEXT("errore ignoto") -}; - -#endif//ILU_ERR_ITALIAN_H +//----------------------------------------------------------------------------- +// +// ImageLib Utility Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 15/03/2009 +// +// Filename: src-ILU/include/ilu_error/ilu_err_french.h +// +// Description: Error functions in Italian, by Thibaut Cuvelier. +// +//----------------------------------------------------------------------------- + + +#ifndef ILU_ERR_ITALIAN_H +#define ILU_ERR_ITALIAN_H + +#include "ilu_internal.h" + +ILconst_string iluErrorStringsItalian[IL_FILE_READ_ERROR - IL_INVALID_ENUM + 1] = { + IL_TEXT("insediamento nullo"), + IL_TEXT("raggiungendo di memoria"), + IL_TEXT("configuri non sostenne"), + IL_TEXT("erreur interne"), + IL_TEXT("errore interno"), + IL_TEXT("opération illégale"), + IL_TEXT("operazione illegale"), + IL_TEXT("inebri archivio nullo"), + IL_TEXT("parametro nullo"), + IL_TEXT("non può aprire l'archivio"), + IL_TEXT("dilazione nulla"), + IL_TEXT("archivi già esistendo"), + IL_TEXT("equivalente fuori-configuri"), + IL_TEXT("inondi di batteria"), + IL_TEXT("insufficienza di batteria"), + IL_TEXT("conversione nulla"), + IL_TEXT("cattive misure"), + IL_TEXT("si sbagli alla durata della lettura dell'archivio") +}; + +ILconst_string iluLibErrorStringsItalian[IL_LIB_EXR_ERROR - IL_LIB_GIF_ERROR + 1] = { + IL_TEXT("gif : si sbagli nella libreria"), + IL_TEXT("jpeg : si sbagli nella libreria"), + IL_TEXT("png : si sbagli nella libreria"), + IL_TEXT("tiff : si sbagli nella libreria"), + IL_TEXT("mng : si sbagli nella libreria"), + IL_TEXT("jp2 : si sbagli nella libreria"), + IL_TEXT("exr : si sbagli nella libreria") +}; + +ILconst_string iluMiscErrorStringsItalian[2] = { + IL_TEXT("niente errore"), + IL_TEXT("errore ignoto") +}; + +#endif//ILU_ERR_ITALIAN_H diff --git a/DevIL/test/Unzip/NV_UNZIP.H b/DevIL/test/Unzip/NV_UNZIP.H index 8ddbc53b..136e20c6 100644 --- a/DevIL/test/Unzip/NV_UNZIP.H +++ b/DevIL/test/Unzip/NV_UNZIP.H @@ -1,24 +1,24 @@ -/*********************************************************************NVMH1**** -File: -nv_unzip.h - -Copyright (C) 1999, 2000 NVIDIA Corporation -This file is provided without support, instruction, or implied warranty of any -kind. NVIDIA makes no guarantee of its fitness for a particular purpose and is -not liable under any circumstances for any damages or loss whatsoever arising -from the use or inability to use this file or items derived from it. - -Comments: - - -******************************************************************************/ - -#ifndef __nv_unzip_h__ -#define __nv_unzip_h__ - -namespace unzip -{ - extern unsigned char * open(const char * filename, const char * inzipfile, unsigned int * size); -} - +/*********************************************************************NVMH1**** +File: +nv_unzip.h + +Copyright (C) 1999, 2000 NVIDIA Corporation +This file is provided without support, instruction, or implied warranty of any +kind. NVIDIA makes no guarantee of its fitness for a particular purpose and is +not liable under any circumstances for any damages or loss whatsoever arising +from the use or inability to use this file or items derived from it. + +Comments: + + +******************************************************************************/ + +#ifndef __nv_unzip_h__ +#define __nv_unzip_h__ + +namespace unzip +{ + extern unsigned char * open(const char * filename, const char * inzipfile, unsigned int * size); +} + #endif /* __nv_unzip_h__ */ \ No newline at end of file diff --git a/DevIL/test/Unzip/UNZIP.H b/DevIL/test/Unzip/UNZIP.H index 5692cc8d..76692cb7 100644 --- a/DevIL/test/Unzip/UNZIP.H +++ b/DevIL/test/Unzip/UNZIP.H @@ -1,275 +1,275 @@ -/* unzip.h -- IO for uncompress .zip files using zlib - Version 0.15 beta, Mar 19th, 1998, - - Copyright (C) 1998 Gilles Vollant - - This unzip package allow extract file from .ZIP file, compatible with PKZip 2.04g - WinZip, InfoZip tools and compatible. - Encryption and multi volume ZipFile (span) are not supported. - Old compressions used by old PKZip 1.x are not supported - - THIS IS AN ALPHA VERSION. AT THIS STAGE OF DEVELOPPEMENT, SOMES API OR STRUCTURE - CAN CHANGE IN FUTURE VERSION !! - I WAIT FEEDBACK at mail info@winimage.com - Visit also http://www.winimage.com/zLibDll/unzip.htm for evolution - - Condition of use and distribution are the same than zlib : - - 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. - - -*/ -/* for more info about .ZIP format, see - ftp://ftp.cdrom.com/pub/infozip/doc/appnote-970311-iz.zip - PkWare has also a specification at : - ftp://ftp.pkware.com/probdesc.zip */ - -#ifndef _unz_H -#define _unz_H - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef _ZLIB_H -#include "zlib.h" -#endif - -#if defined(STRICTUNZIP) || defined(STRICTZIPUNZIP) -/* like the STRICT of WIN32, we define a pointer that cannot be converted - from (void*) without cast */ -typedef struct TagunzFile__ { int unused; } unzFile__; -typedef unzFile__ *unzFile; -#else -typedef voidp unzFile; -#endif - - -#define UNZ_OK (0) -#define UNZ_END_OF_LIST_OF_FILE (-100) -#define UNZ_ERRNO (Z_ERRNO) -#define UNZ_EOF (0) -#define UNZ_PARAMERROR (-102) -#define UNZ_BADZIPFILE (-103) -#define UNZ_INTERNALERROR (-104) -#define UNZ_CRCERROR (-105) - -/* tm_unz contain date/time info */ -typedef struct tm_unz_s -{ - uInt tm_sec; /* seconds after the minute - [0,59] */ - uInt tm_min; /* minutes after the hour - [0,59] */ - uInt tm_hour; /* hours since midnight - [0,23] */ - uInt tm_mday; /* day of the month - [1,31] */ - uInt tm_mon; /* months since January - [0,11] */ - uInt tm_year; /* years - [1980..2044] */ -} tm_unz; - -/* unz_global_info structure contain global data about the ZIPfile - These data comes from the end of central dir */ -typedef struct unz_global_info_s -{ - uLong number_entry; /* total number of entries in - the central dir on this disk */ - uLong size_comment; /* size of the global comment of the zipfile */ -} unz_global_info; - - -/* unz_file_info contain information about a file in the zipfile */ -typedef struct unz_file_info_s -{ - uLong version; /* version made by 2 bytes */ - uLong version_needed; /* version needed to extract 2 bytes */ - uLong flag; /* general purpose bit flag 2 bytes */ - uLong compression_method; /* compression method 2 bytes */ - uLong dosDate; /* last mod file date in Dos fmt 4 bytes */ - uLong crc; /* crc-32 4 bytes */ - uLong compressed_size; /* compressed size 4 bytes */ - uLong uncompressed_size; /* uncompressed size 4 bytes */ - uLong size_filename; /* filename length 2 bytes */ - uLong size_file_extra; /* extra field length 2 bytes */ - uLong size_file_comment; /* file comment length 2 bytes */ - - uLong disk_num_start; /* disk number start 2 bytes */ - uLong internal_fa; /* internal file attributes 2 bytes */ - uLong external_fa; /* external file attributes 4 bytes */ - - tm_unz tmu_date; -} unz_file_info; - -extern int ZEXPORT unzStringFileNameCompare OF ((const char* fileName1, - const char* fileName2, - int iCaseSensitivity)); -/* - Compare two filename (fileName1,fileName2). - If iCaseSenisivity = 1, comparision is case sensitivity (like strcmp) - If iCaseSenisivity = 2, comparision is not case sensitivity (like strcmpi - or strcasecmp) - If iCaseSenisivity = 0, case sensitivity is defaut of your operating system - (like 1 on Unix, 2 on Windows) -*/ - - -extern unzFile ZEXPORT unzOpen OF((const char *path)); -/* - Open a Zip file. path contain the full pathname (by example, - on a Windows NT computer "c:\\zlib\\zlib111.zip" or on an Unix computer - "zlib/zlib111.zip". - If the zipfile cannot be opened (file don't exist or in not valid), the - return value is NULL. - Else, the return value is a unzFile Handle, usable with other function - of this unzip package. -*/ - -extern int ZEXPORT unzClose OF((unzFile file)); -/* - Close a ZipFile opened with unzipOpen. - If there is files inside the .Zip opened with unzOpenCurrentFile (see later), - these files MUST be closed with unzipCloseCurrentFile before call unzipClose. - return UNZ_OK if there is no problem. */ - -extern int ZEXPORT unzGetGlobalInfo OF((unzFile file, - unz_global_info *pglobal_info)); -/* - Write info about the ZipFile in the *pglobal_info structure. - No preparation of the structure is needed - return UNZ_OK if there is no problem. */ - - -extern int ZEXPORT unzGetGlobalComment OF((unzFile file, - char *szComment, - uLong uSizeBuf)); -/* - Get the global comment string of the ZipFile, in the szComment buffer. - uSizeBuf is the size of the szComment buffer. - return the number of byte copied or an error code <0 -*/ - - -/***************************************************************************/ -/* Unzip package allow you browse the directory of the zipfile */ - -extern int ZEXPORT unzGoToFirstFile OF((unzFile file)); -/* - Set the current file of the zipfile to the first file. - return UNZ_OK if there is no problem -*/ - -extern int ZEXPORT unzGoToNextFile OF((unzFile file)); -/* - Set the current file of the zipfile to the next file. - return UNZ_OK if there is no problem - return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest. -*/ - -extern int ZEXPORT unzLocateFile OF((unzFile file, - const char *szFileName, - int iCaseSensitivity)); -/* - Try locate the file szFileName in the zipfile. - For the iCaseSensitivity signification, see unzStringFileNameCompare - - return value : - UNZ_OK if the file is found. It becomes the current file. - UNZ_END_OF_LIST_OF_FILE if the file is not found -*/ - - -extern int ZEXPORT unzGetCurrentFileInfo OF((unzFile file, - unz_file_info *pfile_info, - char *szFileName, - uLong fileNameBufferSize, - void *extraField, - uLong extraFieldBufferSize, - char *szComment, - uLong commentBufferSize)); -/* - Get Info about the current file - if pfile_info!=NULL, the *pfile_info structure will contain somes info about - the current file - if szFileName!=NULL, the filemane string will be copied in szFileName - (fileNameBufferSize is the size of the buffer) - if extraField!=NULL, the extra field information will be copied in extraField - (extraFieldBufferSize is the size of the buffer). - This is the Central-header version of the extra field - if szComment!=NULL, the comment string of the file will be copied in szComment - (commentBufferSize is the size of the buffer) -*/ - -/***************************************************************************/ -/* for reading the content of the current zipfile, you can open it, read data - from it, and close it (you can close it before reading all the file) - */ - -extern int ZEXPORT unzOpenCurrentFile OF((unzFile file)); -/* - Open for reading data the current file in the zipfile. - If there is no error, the return value is UNZ_OK. -*/ - -extern int ZEXPORT unzCloseCurrentFile OF((unzFile file)); -/* - Close the file in zip opened with unzOpenCurrentFile - Return UNZ_CRCERROR if all the file was read but the CRC is not good -*/ - - -extern int ZEXPORT unzReadCurrentFile OF((unzFile file, - voidp buf, - unsigned len)); -/* - Read bytes from the current file (opened by unzOpenCurrentFile) - buf contain buffer where data must be copied - len the size of buf. - - return the number of byte copied if somes bytes are copied - return 0 if the end of file was reached - return <0 with error code if there is an error - (UNZ_ERRNO for IO error, or zLib error for uncompress error) -*/ - -extern z_off_t ZEXPORT unztell OF((unzFile file)); -/* - Give the current position in uncompressed data -*/ - -extern int ZEXPORT unzeof OF((unzFile file)); -/* - return 1 if the end of file was reached, 0 elsewhere -*/ - -extern int ZEXPORT unzGetLocalExtrafield OF((unzFile file, - voidp buf, - unsigned len)); -/* - Read extra field from the current file (opened by unzOpenCurrentFile) - This is the local-header version of the extra field (sometimes, there is - more info in the local-header version than in the central-header) - - if buf==NULL, it return the size of the local extra field - - if buf!=NULL, len is the size of the buffer, the extra header is copied in - buf. - the return value is the number of bytes copied in buf, or (if <0) - the error code -*/ - -#ifdef __cplusplus -} -#endif - -#endif /* _unz_H */ +/* unzip.h -- IO for uncompress .zip files using zlib + Version 0.15 beta, Mar 19th, 1998, + + Copyright (C) 1998 Gilles Vollant + + This unzip package allow extract file from .ZIP file, compatible with PKZip 2.04g + WinZip, InfoZip tools and compatible. + Encryption and multi volume ZipFile (span) are not supported. + Old compressions used by old PKZip 1.x are not supported + + THIS IS AN ALPHA VERSION. AT THIS STAGE OF DEVELOPPEMENT, SOMES API OR STRUCTURE + CAN CHANGE IN FUTURE VERSION !! + I WAIT FEEDBACK at mail info@winimage.com + Visit also http://www.winimage.com/zLibDll/unzip.htm for evolution + + Condition of use and distribution are the same than zlib : + + 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. + + +*/ +/* for more info about .ZIP format, see + ftp://ftp.cdrom.com/pub/infozip/doc/appnote-970311-iz.zip + PkWare has also a specification at : + ftp://ftp.pkware.com/probdesc.zip */ + +#ifndef _unz_H +#define _unz_H + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef _ZLIB_H +#include "zlib.h" +#endif + +#if defined(STRICTUNZIP) || defined(STRICTZIPUNZIP) +/* like the STRICT of WIN32, we define a pointer that cannot be converted + from (void*) without cast */ +typedef struct TagunzFile__ { int unused; } unzFile__; +typedef unzFile__ *unzFile; +#else +typedef voidp unzFile; +#endif + + +#define UNZ_OK (0) +#define UNZ_END_OF_LIST_OF_FILE (-100) +#define UNZ_ERRNO (Z_ERRNO) +#define UNZ_EOF (0) +#define UNZ_PARAMERROR (-102) +#define UNZ_BADZIPFILE (-103) +#define UNZ_INTERNALERROR (-104) +#define UNZ_CRCERROR (-105) + +/* tm_unz contain date/time info */ +typedef struct tm_unz_s +{ + uInt tm_sec; /* seconds after the minute - [0,59] */ + uInt tm_min; /* minutes after the hour - [0,59] */ + uInt tm_hour; /* hours since midnight - [0,23] */ + uInt tm_mday; /* day of the month - [1,31] */ + uInt tm_mon; /* months since January - [0,11] */ + uInt tm_year; /* years - [1980..2044] */ +} tm_unz; + +/* unz_global_info structure contain global data about the ZIPfile + These data comes from the end of central dir */ +typedef struct unz_global_info_s +{ + uLong number_entry; /* total number of entries in + the central dir on this disk */ + uLong size_comment; /* size of the global comment of the zipfile */ +} unz_global_info; + + +/* unz_file_info contain information about a file in the zipfile */ +typedef struct unz_file_info_s +{ + uLong version; /* version made by 2 bytes */ + uLong version_needed; /* version needed to extract 2 bytes */ + uLong flag; /* general purpose bit flag 2 bytes */ + uLong compression_method; /* compression method 2 bytes */ + uLong dosDate; /* last mod file date in Dos fmt 4 bytes */ + uLong crc; /* crc-32 4 bytes */ + uLong compressed_size; /* compressed size 4 bytes */ + uLong uncompressed_size; /* uncompressed size 4 bytes */ + uLong size_filename; /* filename length 2 bytes */ + uLong size_file_extra; /* extra field length 2 bytes */ + uLong size_file_comment; /* file comment length 2 bytes */ + + uLong disk_num_start; /* disk number start 2 bytes */ + uLong internal_fa; /* internal file attributes 2 bytes */ + uLong external_fa; /* external file attributes 4 bytes */ + + tm_unz tmu_date; +} unz_file_info; + +extern int ZEXPORT unzStringFileNameCompare OF ((const char* fileName1, + const char* fileName2, + int iCaseSensitivity)); +/* + Compare two filename (fileName1,fileName2). + If iCaseSenisivity = 1, comparision is case sensitivity (like strcmp) + If iCaseSenisivity = 2, comparision is not case sensitivity (like strcmpi + or strcasecmp) + If iCaseSenisivity = 0, case sensitivity is defaut of your operating system + (like 1 on Unix, 2 on Windows) +*/ + + +extern unzFile ZEXPORT unzOpen OF((const char *path)); +/* + Open a Zip file. path contain the full pathname (by example, + on a Windows NT computer "c:\\zlib\\zlib111.zip" or on an Unix computer + "zlib/zlib111.zip". + If the zipfile cannot be opened (file don't exist or in not valid), the + return value is NULL. + Else, the return value is a unzFile Handle, usable with other function + of this unzip package. +*/ + +extern int ZEXPORT unzClose OF((unzFile file)); +/* + Close a ZipFile opened with unzipOpen. + If there is files inside the .Zip opened with unzOpenCurrentFile (see later), + these files MUST be closed with unzipCloseCurrentFile before call unzipClose. + return UNZ_OK if there is no problem. */ + +extern int ZEXPORT unzGetGlobalInfo OF((unzFile file, + unz_global_info *pglobal_info)); +/* + Write info about the ZipFile in the *pglobal_info structure. + No preparation of the structure is needed + return UNZ_OK if there is no problem. */ + + +extern int ZEXPORT unzGetGlobalComment OF((unzFile file, + char *szComment, + uLong uSizeBuf)); +/* + Get the global comment string of the ZipFile, in the szComment buffer. + uSizeBuf is the size of the szComment buffer. + return the number of byte copied or an error code <0 +*/ + + +/***************************************************************************/ +/* Unzip package allow you browse the directory of the zipfile */ + +extern int ZEXPORT unzGoToFirstFile OF((unzFile file)); +/* + Set the current file of the zipfile to the first file. + return UNZ_OK if there is no problem +*/ + +extern int ZEXPORT unzGoToNextFile OF((unzFile file)); +/* + Set the current file of the zipfile to the next file. + return UNZ_OK if there is no problem + return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest. +*/ + +extern int ZEXPORT unzLocateFile OF((unzFile file, + const char *szFileName, + int iCaseSensitivity)); +/* + Try locate the file szFileName in the zipfile. + For the iCaseSensitivity signification, see unzStringFileNameCompare + + return value : + UNZ_OK if the file is found. It becomes the current file. + UNZ_END_OF_LIST_OF_FILE if the file is not found +*/ + + +extern int ZEXPORT unzGetCurrentFileInfo OF((unzFile file, + unz_file_info *pfile_info, + char *szFileName, + uLong fileNameBufferSize, + void *extraField, + uLong extraFieldBufferSize, + char *szComment, + uLong commentBufferSize)); +/* + Get Info about the current file + if pfile_info!=NULL, the *pfile_info structure will contain somes info about + the current file + if szFileName!=NULL, the filemane string will be copied in szFileName + (fileNameBufferSize is the size of the buffer) + if extraField!=NULL, the extra field information will be copied in extraField + (extraFieldBufferSize is the size of the buffer). + This is the Central-header version of the extra field + if szComment!=NULL, the comment string of the file will be copied in szComment + (commentBufferSize is the size of the buffer) +*/ + +/***************************************************************************/ +/* for reading the content of the current zipfile, you can open it, read data + from it, and close it (you can close it before reading all the file) + */ + +extern int ZEXPORT unzOpenCurrentFile OF((unzFile file)); +/* + Open for reading data the current file in the zipfile. + If there is no error, the return value is UNZ_OK. +*/ + +extern int ZEXPORT unzCloseCurrentFile OF((unzFile file)); +/* + Close the file in zip opened with unzOpenCurrentFile + Return UNZ_CRCERROR if all the file was read but the CRC is not good +*/ + + +extern int ZEXPORT unzReadCurrentFile OF((unzFile file, + voidp buf, + unsigned len)); +/* + Read bytes from the current file (opened by unzOpenCurrentFile) + buf contain buffer where data must be copied + len the size of buf. + + return the number of byte copied if somes bytes are copied + return 0 if the end of file was reached + return <0 with error code if there is an error + (UNZ_ERRNO for IO error, or zLib error for uncompress error) +*/ + +extern z_off_t ZEXPORT unztell OF((unzFile file)); +/* + Give the current position in uncompressed data +*/ + +extern int ZEXPORT unzeof OF((unzFile file)); +/* + return 1 if the end of file was reached, 0 elsewhere +*/ + +extern int ZEXPORT unzGetLocalExtrafield OF((unzFile file, + voidp buf, + unsigned len)); +/* + Read extra field from the current file (opened by unzOpenCurrentFile) + This is the local-header version of the extra field (sometimes, there is + more info in the local-header version than in the central-header) + + if buf==NULL, it return the size of the local extra field + + if buf!=NULL, len is the size of the buffer, the extra header is copied in + buf. + the return value is the number of bytes copied in buf, or (if <0) + the error code +*/ + +#ifdef __cplusplus +} +#endif + +#endif /* _unz_H */ -- cgit v1.2.1