OLD | NEW |
1 /* zip.c -- IO on .zip files using zlib | 1 /* zip.c -- IO on .zip files using zlib |
2 Version 1.1, February 14h, 2010 | 2 Version 1.1, February 14h, 2010 |
3 part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html
) | 3 part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html
) |
4 | 4 |
5 Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.
com/zLibDll/minizip.html ) | 5 Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.
com/zLibDll/minizip.html ) |
6 | 6 |
7 Modifications for Zip64 support | 7 Modifications for Zip64 support |
8 Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) | 8 Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) |
9 | 9 |
10 For more info read MiniZip_info.txt | 10 For more info read MiniZip_info.txt |
11 | 11 |
12 Changes | 12 Changes |
13 Oct-2009 - Mathias Svensson - Remove old C style function prototypes | 13 Oct-2009 - Mathias Svensson - Remove old C style function prototypes |
14 Oct-2009 - Mathias Svensson - Added Zip64 Support when creating new file arch
ives | 14 Oct-2009 - Mathias Svensson - Added Zip64 Support when creating new file arch
ives |
15 Oct-2009 - Mathias Svensson - Did some code cleanup and refactoring to get be
tter overview of some functions. | 15 Oct-2009 - Mathias Svensson - Did some code cleanup and refactoring to get be
tter overview of some functions. |
16 Oct-2009 - Mathias Svensson - Added zipRemoveExtraInfoBlock to strip extra fi
eld data from its ZIP64 data | 16 Oct-2009 - Mathias Svensson - Added zipRemoveExtraInfoBlock to strip extra fi
eld data from its ZIP64 data |
17 It is used when recreting zip archive with RAW
when deleting items from a zip. | 17 It is used when recreting zip archive with RAW
when deleting items from a zip. |
18 ZIP64 data is automaticly added to items that n
eeds it, and existing ZIP64 data need to be removed. | 18 ZIP64 data is automaticly added to items that n
eeds it, and existing ZIP64 data need to be removed. |
19 Oct-2009 - Mathias Svensson - Added support for BZIP2 as compression mode (bz
ip2 lib is required) | 19 Oct-2009 - Mathias Svensson - Added support for BZIP2 as compression mode (bz
ip2 lib is required) |
20 Jan-2010 - back to unzip and minizip 1.0 name scheme, with compatibility laye
r | 20 Jan-2010 - back to unzip and minizip 1.0 name scheme, with compatibility laye
r |
21 | 21 |
22 */ | 22 */ |
23 | 23 |
24 | 24 |
25 #include <stdio.h> | 25 #include <stdio.h> |
26 #include <stdlib.h> | 26 #include <stdlib.h> |
27 #include <string.h> | 27 #include <string.h> |
28 #include <time.h> | 28 #include <time.h> |
29 #if defined(USE_SYSTEM_ZLIB) | |
30 #include <zlib.h> | |
31 #else | |
32 #include "third_party/zlib/zlib.h" | 29 #include "third_party/zlib/zlib.h" |
33 #endif | |
34 #include "zip.h" | 30 #include "zip.h" |
35 | 31 |
36 #ifdef STDC | 32 #ifdef STDC |
37 # include <stddef.h> | 33 # include <stddef.h> |
38 # include <string.h> | 34 # include <string.h> |
39 # include <stdlib.h> | 35 # include <stdlib.h> |
40 #endif | 36 #endif |
41 #ifdef NO_ERRNO_H | 37 #ifdef NO_ERRNO_H |
42 extern int errno; | 38 extern int errno; |
43 #else | 39 #else |
(...skipping 1955 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1999 | 1995 |
2000 retVal = ZIP_OK; | 1996 retVal = ZIP_OK; |
2001 } | 1997 } |
2002 else | 1998 else |
2003 retVal = ZIP_ERRNO; | 1999 retVal = ZIP_ERRNO; |
2004 | 2000 |
2005 TRYFREE(pNewHeader); | 2001 TRYFREE(pNewHeader); |
2006 | 2002 |
2007 return retVal; | 2003 return retVal; |
2008 } | 2004 } |
OLD | NEW |