You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(7) |
Feb
(2) |
Mar
(32) |
Apr
(25) |
May
(11) |
Jun
(25) |
Jul
(5) |
Aug
(8) |
Sep
|
Oct
(8) |
Nov
(13) |
Dec
(17) |
2009 |
Jan
(34) |
Feb
(18) |
Mar
(4) |
Apr
|
May
(9) |
Jun
(1) |
Jul
(9) |
Aug
|
Sep
(12) |
Oct
|
Nov
(9) |
Dec
(1) |
2010 |
Jan
(1) |
Feb
(14) |
Mar
|
Apr
|
May
(4) |
Jun
(14) |
Jul
(4) |
Aug
|
Sep
|
Oct
|
Nov
(4) |
Dec
(225) |
2011 |
Jan
(17) |
Feb
|
Mar
|
Apr
(27) |
May
(24) |
Jun
(1) |
Jul
(3) |
Aug
(22) |
Sep
(24) |
Oct
(22) |
Nov
(6) |
Dec
(4) |
2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(6) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(4) |
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
(1) |
Mar
|
Apr
(8) |
May
(21) |
Jun
|
Jul
(2) |
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
(1) |
Oct
|
Nov
|
Dec
(1) |
2017 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(27) |
2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(5) |
Aug
(7) |
Sep
(16) |
Oct
(3) |
Nov
|
Dec
|
From: <lab...@us...> - 2019-08-24 00:36:59
|
Revision: 1587 http://sourceforge.net/p/opengtoolkit/svn/1587 Author: labviewer Date: 2019-08-24 00:36:58 +0000 (Sat, 24 Aug 2019) Log Message: ----------- Fix a crash due to alignment issues in certain LabVIEW versions Modified Paths: -------------- trunk/lvzip/c_source/unzip.c trunk/lvzip/c_source/unzip.h Modified: trunk/lvzip/c_source/unzip.c =================================================================== --- trunk/lvzip/c_source/unzip.c 2019-07-15 21:34:47 UTC (rev 1586) +++ trunk/lvzip/c_source/unzip.c 2019-08-24 00:36:58 UTC (rev 1587) @@ -901,7 +901,6 @@ if (err == UNZ_OK) err = unzGetCurrentFileInfoField(file, &seek, comment, comment_size, file_info.size_file_comment, 1); - if ((err == UNZ_OK) && (pfile_info != NULL)) *pfile_info = file_info; if ((err == UNZ_OK) && (pfile_info_internal != NULL)) Modified: trunk/lvzip/c_source/unzip.h =================================================================== --- trunk/lvzip/c_source/unzip.h 2019-07-15 21:34:47 UTC (rev 1586) +++ trunk/lvzip/c_source/unzip.h 2019-08-24 00:36:58 UTC (rev 1587) @@ -83,14 +83,13 @@ uint16_t size_filename; /* filename length 2 bytes, 34 */ uint16_t size_file_extra; /* extra field length 2 bytes, 36 */ uint16_t size_file_comment; /* file comment length 2 bytes, 38 */ - uint16_t padding1; /* filler1 2 bytes, 40 */ + uint16_t size_file_extra_internal; /* 2 bytes, 40 */ uint32_t disk_num_start; /* disk number start 4 bytes, 44 */ uint16_t internal_fa; /* internal file attributes 2 bytes, 46 */ - uint16_t padding2; /* filler2 2 bytes, 48 */ +// uint16_t padding1; /* filler1 2 bytes, 48 */ uint32_t external_fa; /* external file attributes 4 bytes, 52 */ - uint32_t padding3; /* filler3 4 bytes, 56 */ +// uint32_t padding2; /* filler2 4 bytes, 56 */ uint64_t disk_offset; /* disk offset 8 bytes, 64 */ - uint16_t size_file_extra_internal; /* 2 bytes, 66 */ } unz_file_info64; typedef struct unz_file_info_s @@ -109,7 +108,7 @@ uint16_t disk_num_start; /* disk number start 2 bytes, 32 */ uint16_t internal_fa; /* internal file attributes 2 bytes, 34 */ - uint16_t padding1; /* filler1 2 bytes, 36 */ +// uint16_t padding1; /* filler1 2 bytes, 36 */ uint32_t external_fa; /* external file attributes 4 bytes, 40 */ uint64_t disk_offset; /* disk offset 8 bytes, 48 */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lab...@us...> - 2019-07-15 21:34:48
|
Revision: 1586 http://sourceforge.net/p/opengtoolkit/svn/1586 Author: labviewer Date: 2019-07-15 21:34:47 +0000 (Mon, 15 Jul 2019) Log Message: ----------- Change globalCommet back to a normal C string Modified Paths: -------------- trunk/lvzip/source/lvzip.llb/ZLIB Close Zip Archive.vi trunk/lvzip/source/lvzip.llb/ZLIB Open Write File.vi Modified: trunk/lvzip/source/lvzip.llb/ZLIB Close Zip Archive.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/source/lvzip.llb/ZLIB Open Write File.vi =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lab...@us...> - 2019-07-15 21:33:28
|
Revision: 1585 http://sourceforge.net/p/opengtoolkit/svn/1585 Author: labviewer Date: 2019-07-15 21:33:27 +0000 (Mon, 15 Jul 2019) Log Message: ----------- Change globalCommet back to a normal C string Modified Paths: -------------- trunk/lvzip/c_source/lvapi.c trunk/lvzip/c_source/lvapi.h Modified: trunk/lvzip/c_source/lvapi.c =================================================================== --- trunk/lvzip/c_source/lvapi.c 2019-07-02 18:51:29 UTC (rev 1584) +++ trunk/lvzip/c_source/lvapi.c 2019-07-15 21:33:27 UTC (rev 1585) @@ -362,7 +362,7 @@ * stream: A handle to return the compresses zip archive for memory streams * ****************************************************************************************************/ -LibAPI(MgErr) lvzlib_zipClose(LVRefNum *refnum, const LStrHandle globalComment, LStrHandle *stream) +LibAPI(MgErr) lvzlib_zipClose(LVRefNum *refnum, const char *globalComment, LStrHandle *stream) { zipFile node; MgErr err = lvzlibDisposeRefnum(refnum, &node, ZipMagic); @@ -369,7 +369,7 @@ if (!err) { *refnum = kNotARefNum; - err = LibToMgErr(zipClose2(node, (const char*)LStrBufH(globalComment), VERSIONMADEBY, (voidpf*)stream)); + err = LibToMgErr(zipClose2(node, globalComment, VERSIONMADEBY, (voidpf*)stream)); } return err; } Modified: trunk/lvzip/c_source/lvapi.h =================================================================== --- trunk/lvzip/c_source/lvapi.h 2019-07-02 18:51:29 UTC (rev 1584) +++ trunk/lvzip/c_source/lvapi.h 2019-07-15 21:33:27 UTC (rev 1585) @@ -45,7 +45,7 @@ LibAPI(MgErr) lvzlib_zipWriteInFileInZip(LVRefNum *refnum, const LStrHandle buffer); LibAPI(MgErr) lvzlib_zipCloseFileInZipRaw32(LVRefNum *refnum, uInt32 uncompressedSize, uInt32 crc32); LibAPI(MgErr) lvzlib_zipCloseFileInZipRaw64(LVRefNum *refnum, uInt64 uncompressedSize, uInt32 crc32); -LibAPI(MgErr) lvzlib_zipClose(LVRefNum *refnum, const LStrHandle globalComment, LStrHandle *stream); +LibAPI(MgErr) lvzlib_zipClose(LVRefNum *refnum, const char *globalComment, LStrHandle *stream); /* exported unzip functions */ LibAPI(MgErr) lvzlib_unzOpen(const void *pathname, zlib_filefunc64_def* filefuncs, LVRefNum *refnum); LibAPI(MgErr) lvzlib_unzClose(LVRefNum *refnum, LStrHandle *stream); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lab...@us...> - 2019-07-02 18:51:23
|
Revision: 1584 http://sourceforge.net/p/opengtoolkit/svn/1584 Author: labviewer Date: 2019-07-02 18:51:29 +0000 (Tue, 02 Jul 2019) Log Message: ----------- Update test VIs Modified Paths: -------------- trunk/lvzip/tests/lvzip-test-delete files from archive.vi trunk/lvzip/tests/lvzip-test-memory stream.vi Added Paths: ----------- trunk/lvzip/tests/VI Tree.vi Added: trunk/lvzip/tests/VI Tree.vi =================================================================== (Binary files differ) Index: trunk/lvzip/tests/VI Tree.vi =================================================================== --- trunk/lvzip/tests/VI Tree.vi 2019-07-02 18:51:25 UTC (rev 1583) +++ trunk/lvzip/tests/VI Tree.vi 2019-07-02 18:51:29 UTC (rev 1584) Property changes on: trunk/lvzip/tests/VI Tree.vi ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Modified: trunk/lvzip/tests/lvzip-test-delete files from archive.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/tests/lvzip-test-memory stream.vi =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lab...@us...> - 2019-07-02 18:50:37
|
Revision: 1583 http://sourceforge.net/p/opengtoolkit/svn/1583 Author: labviewer Date: 2019-07-02 18:51:25 +0000 (Tue, 02 Jul 2019) Log Message: ----------- Add extra option to directly retrieve the file info on enumeration functions Modified Paths: -------------- trunk/lvzip/source/lvzip.llb/ZLIB Delete Files From Archive.vi trunk/lvzip/source/lvzip.llb/ZLIB Enumerate File Contents.vi trunk/lvzip/source/lvzip.llb/ZLIB Extract All Files To Dir.vi trunk/lvzip/source/lvzip.llb/ZLIB Extract File.vi trunk/lvzip/source/lvzip.llb/ZLIB Extract Stream.vi trunk/lvzip/source/lvzip.llb/ZLIB Get Current File Info.vi trunk/lvzip/source/lvzip.llb/ZLIB Go To First File.vi trunk/lvzip/source/lvzip.llb/ZLIB Go To Next File.vi trunk/lvzip/source/lvzip.llb/ZLIB Transfer Raw File.vi Added Paths: ----------- trunk/lvzip/source/lvzip.llb/ZLIB Go To First File Only.vi trunk/lvzip/source/lvzip.llb/ZLIB Go To First File w Info.vi trunk/lvzip/source/lvzip.llb/ZLIB Go To Next File Only.vi trunk/lvzip/source/lvzip.llb/ZLIB Go To Next File w Info.vi Modified: trunk/lvzip/source/lvzip.llb/ZLIB Delete Files From Archive.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/source/lvzip.llb/ZLIB Enumerate File Contents.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/source/lvzip.llb/ZLIB Extract All Files To Dir.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/source/lvzip.llb/ZLIB Extract File.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/source/lvzip.llb/ZLIB Extract Stream.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/source/lvzip.llb/ZLIB Get Current File Info.vi =================================================================== (Binary files differ) Added: trunk/lvzip/source/lvzip.llb/ZLIB Go To First File Only.vi =================================================================== (Binary files differ) Index: trunk/lvzip/source/lvzip.llb/ZLIB Go To First File Only.vi =================================================================== --- trunk/lvzip/source/lvzip.llb/ZLIB Go To First File Only.vi 2019-07-02 18:46:36 UTC (rev 1582) +++ trunk/lvzip/source/lvzip.llb/ZLIB Go To First File Only.vi 2019-07-02 18:51:25 UTC (rev 1583) Property changes on: trunk/lvzip/source/lvzip.llb/ZLIB Go To First File Only.vi ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/lvzip/source/lvzip.llb/ZLIB Go To First File w Info.vi =================================================================== (Binary files differ) Index: trunk/lvzip/source/lvzip.llb/ZLIB Go To First File w Info.vi =================================================================== --- trunk/lvzip/source/lvzip.llb/ZLIB Go To First File w Info.vi 2019-07-02 18:46:36 UTC (rev 1582) +++ trunk/lvzip/source/lvzip.llb/ZLIB Go To First File w Info.vi 2019-07-02 18:51:25 UTC (rev 1583) Property changes on: trunk/lvzip/source/lvzip.llb/ZLIB Go To First File w Info.vi ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Modified: trunk/lvzip/source/lvzip.llb/ZLIB Go To First File.vi =================================================================== (Binary files differ) Added: trunk/lvzip/source/lvzip.llb/ZLIB Go To Next File Only.vi =================================================================== (Binary files differ) Index: trunk/lvzip/source/lvzip.llb/ZLIB Go To Next File Only.vi =================================================================== --- trunk/lvzip/source/lvzip.llb/ZLIB Go To Next File Only.vi 2019-07-02 18:46:36 UTC (rev 1582) +++ trunk/lvzip/source/lvzip.llb/ZLIB Go To Next File Only.vi 2019-07-02 18:51:25 UTC (rev 1583) Property changes on: trunk/lvzip/source/lvzip.llb/ZLIB Go To Next File Only.vi ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/lvzip/source/lvzip.llb/ZLIB Go To Next File w Info.vi =================================================================== (Binary files differ) Index: trunk/lvzip/source/lvzip.llb/ZLIB Go To Next File w Info.vi =================================================================== --- trunk/lvzip/source/lvzip.llb/ZLIB Go To Next File w Info.vi 2019-07-02 18:46:36 UTC (rev 1582) +++ trunk/lvzip/source/lvzip.llb/ZLIB Go To Next File w Info.vi 2019-07-02 18:51:25 UTC (rev 1583) Property changes on: trunk/lvzip/source/lvzip.llb/ZLIB Go To Next File w Info.vi ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Modified: trunk/lvzip/source/lvzip.llb/ZLIB Go To Next File.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/source/lvzip.llb/ZLIB Transfer Raw File.vi =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lab...@us...> - 2019-07-02 18:45:39
|
Revision: 1582 http://sourceforge.net/p/opengtoolkit/svn/1582 Author: labviewer Date: 2019-07-02 18:46:36 +0000 (Tue, 02 Jul 2019) Log Message: ----------- Fix error from removing static keyword Modified Paths: -------------- trunk/lvzip/c_source/inffixed.h Modified: trunk/lvzip/c_source/inffixed.h =================================================================== --- trunk/lvzip/c_source/inffixed.h 2019-01-01 20:59:25 UTC (rev 1581) +++ trunk/lvzip/c_source/inffixed.h 2019-07-02 18:46:36 UTC (rev 1582) @@ -7,7 +7,7 @@ subject to change. Applications should only use zlib.h. */ - const code lenfix[512] = { + static const code lenfix[512] = { {96,7,0},{0,8,80},{0,8,16},{20,8,115},{18,7,31},{0,8,112},{0,8,48}, {0,9,192},{16,7,10},{0,8,96},{0,8,32},{0,9,160},{0,8,0},{0,8,128}, {0,8,64},{0,9,224},{16,7,6},{0,8,88},{0,8,24},{0,9,144},{19,7,59}, @@ -84,7 +84,7 @@ {0,9,255} }; - const code distfix[32] = { + static const code distfix[32] = { {16,5,1},{23,5,257},{19,5,17},{27,5,4097},{17,5,5},{25,5,1025}, {21,5,65},{29,5,16385},{16,5,3},{24,5,513},{20,5,33},{28,5,8193}, {18,5,9},{26,5,2049},{22,5,129},{64,5,0},{16,5,2},{23,5,385}, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lab...@us...> - 2018-12-16 16:02:18
|
Revision: 1580 http://sourceforge.net/p/opengtoolkit/svn/1580 Author: labviewer Date: 2018-12-16 16:02:17 +0000 (Sun, 16 Dec 2018) Log Message: ----------- Fix another Macintosh issue and update XCode project file Modified Paths: -------------- trunk/lvzip/c_source/lvutil.c trunk/lvzip/c_source/lvzip.xcodeproj/project.pbxproj trunk/lvzip/c_source/zip.c Modified: trunk/lvzip/c_source/lvutil.c =================================================================== --- trunk/lvzip/c_source/lvutil.c 2018-12-16 15:36:32 UTC (rev 1579) +++ trunk/lvzip/c_source/lvutil.c 2018-12-16 16:02:17 UTC (rev 1580) @@ -429,7 +429,7 @@ #include <string.h> #include <utime.h> -#if Unix || MacOSX +#if usesPosixPath /* seconds between Jan 1 1904 GMT and Jan 1 1970 GMT */ #define dt1970re1904 2082844800L @@ -445,7 +445,8 @@ { *time = sTime + dt1970re1904; } - +#endif +#if Unix || MacOSX static MgErr UnixToLVFileErr(void) { switch (errno) @@ -1520,12 +1521,12 @@ } else { - DEBUGPRINTF(("FSGetCatalogInfo: err = %ld", err)); + DEBUGPRINTF(((CStr)"FSGetCatalogInfo: err = %ld", err)); } } else { - DEBUGPRINTF(("FSMakePathRef: err = %ld", err)); + DEBUGPRINTF(((CStr)"FSMakePathRef: err = %ld", err)); } #elif usesPosixPath err = MakePathDSString(path, &lstr, 0); Modified: trunk/lvzip/c_source/lvzip.xcodeproj/project.pbxproj =================================================================== --- trunk/lvzip/c_source/lvzip.xcodeproj/project.pbxproj 2018-12-16 15:36:32 UTC (rev 1579) +++ trunk/lvzip/c_source/lvzip.xcodeproj/project.pbxproj 2018-12-16 16:02:17 UTC (rev 1580) @@ -51,9 +51,6 @@ 883262811B163FAF003BB2F4 /* aestab.h in Headers */ = {isa = PBXBuildFile; fileRef = 8832626C1B163FAF003BB2F4 /* aestab.h */; }; 883262821B163FAF003BB2F4 /* brg_endian.h in Headers */ = {isa = PBXBuildFile; fileRef = 8832626D1B163FAF003BB2F4 /* brg_endian.h */; }; 883262831B163FAF003BB2F4 /* brg_types.h in Headers */ = {isa = PBXBuildFile; fileRef = 8832626E1B163FAF003BB2F4 /* brg_types.h */; }; - 883262841B163FAF003BB2F4 /* entropy.c in Sources */ = {isa = PBXBuildFile; fileRef = 8832626F1B163FAF003BB2F4 /* entropy.c */; }; - 883262851B163FAF003BB2F4 /* entropy.h in Headers */ = {isa = PBXBuildFile; fileRef = 883262701B163FAF003BB2F4 /* entropy.h */; }; - 883262861B163FAF003BB2F4 /* fileenc.c in Sources */ = {isa = PBXBuildFile; fileRef = 883262711B163FAF003BB2F4 /* fileenc.c */; }; 883262871B163FAF003BB2F4 /* fileenc.h in Headers */ = {isa = PBXBuildFile; fileRef = 883262721B163FAF003BB2F4 /* fileenc.h */; }; 883262881B163FAF003BB2F4 /* hmac.c in Sources */ = {isa = PBXBuildFile; fileRef = 883262731B163FAF003BB2F4 /* hmac.c */; }; 883262891B163FAF003BB2F4 /* hmac.h in Headers */ = {isa = PBXBuildFile; fileRef = 883262741B163FAF003BB2F4 /* hmac.h */; }; @@ -67,7 +64,6 @@ 8832629A1B163FD6003BB2F4 /* bzlib_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 883262911B163FD6003BB2F4 /* bzlib_private.h */; }; 8832629B1B163FD6003BB2F4 /* bzlib.c in Sources */ = {isa = PBXBuildFile; fileRef = 883262921B163FD6003BB2F4 /* bzlib.c */; }; 8832629C1B163FD6003BB2F4 /* bzlib.h in Headers */ = {isa = PBXBuildFile; fileRef = 883262931B163FD6003BB2F4 /* bzlib.h */; }; - 8832629D1B163FD6003BB2F4 /* compress.c in Sources */ = {isa = PBXBuildFile; fileRef = 883262941B163FD6003BB2F4 /* compress.c */; }; 8832629E1B163FD6003BB2F4 /* crctable.c in Sources */ = {isa = PBXBuildFile; fileRef = 883262951B163FD6003BB2F4 /* crctable.c */; }; 8832629F1B163FD6003BB2F4 /* decompress.c in Sources */ = {isa = PBXBuildFile; fileRef = 883262961B163FD6003BB2F4 /* decompress.c */; }; 883262A01B163FD6003BB2F4 /* huffman.c in Sources */ = {isa = PBXBuildFile; fileRef = 883262971B163FD6003BB2F4 /* huffman.c */; }; @@ -75,6 +71,9 @@ 888E743A1ADD96A900C5AEFE /* utf.c in Sources */ = {isa = PBXBuildFile; fileRef = 888E74391ADD96A900C5AEFE /* utf.c */; }; 888E743C1ADD96C200C5AEFE /* utf.h in Headers */ = {isa = PBXBuildFile; fileRef = 888E743B1ADD96C200C5AEFE /* utf.h */; }; 888E743E1ADD96D700C5AEFE /* lvapi.c in Sources */ = {isa = PBXBuildFile; fileRef = 888E743D1ADD96D700C5AEFE /* lvapi.c */; }; + 88FB252521C6954800DCE0D2 /* bzcompress.c in Sources */ = {isa = PBXBuildFile; fileRef = 88FB252421C6954800DCE0D2 /* bzcompress.c */; }; + 88FB252721C6A1CA00DCE0D2 /* crypt.c in Sources */ = {isa = PBXBuildFile; fileRef = 88FB252621C6A1CA00DCE0D2 /* crypt.c */; }; + 88FB252921C6A2A700DCE0D2 /* fileenc.c in Sources */ = {isa = PBXBuildFile; fileRef = 88FB252821C6A2A700DCE0D2 /* fileenc.c */; }; C79368AC0C9ED687006083BF /* iomem.c in Sources */ = {isa = PBXBuildFile; fileRef = C79368AA0C9ED687006083BF /* iomem.c */; }; C79368AD0C9ED687006083BF /* iomem.h in Headers */ = {isa = PBXBuildFile; fileRef = C79368AB0C9ED687006083BF /* iomem.h */; }; /* End PBXBuildFile section */ @@ -125,9 +124,6 @@ 8832626C1B163FAF003BB2F4 /* aestab.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = aestab.h; path = aes/aestab.h; sourceTree = "<group>"; }; 8832626D1B163FAF003BB2F4 /* brg_endian.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = brg_endian.h; path = aes/brg_endian.h; sourceTree = "<group>"; }; 8832626E1B163FAF003BB2F4 /* brg_types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = brg_types.h; path = aes/brg_types.h; sourceTree = "<group>"; }; - 8832626F1B163FAF003BB2F4 /* entropy.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = entropy.c; path = aes/entropy.c; sourceTree = "<group>"; }; - 883262701B163FAF003BB2F4 /* entropy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = entropy.h; path = aes/entropy.h; sourceTree = "<group>"; }; - 883262711B163FAF003BB2F4 /* fileenc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = fileenc.c; path = aes/fileenc.c; sourceTree = "<group>"; }; 883262721B163FAF003BB2F4 /* fileenc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = fileenc.h; path = aes/fileenc.h; sourceTree = "<group>"; }; 883262731B163FAF003BB2F4 /* hmac.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = hmac.c; path = aes/hmac.c; sourceTree = "<group>"; }; 883262741B163FAF003BB2F4 /* hmac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = hmac.h; path = aes/hmac.h; sourceTree = "<group>"; }; @@ -141,7 +137,6 @@ 883262911B163FD6003BB2F4 /* bzlib_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = bzlib_private.h; path = bzip2/bzlib_private.h; sourceTree = "<group>"; }; 883262921B163FD6003BB2F4 /* bzlib.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = bzlib.c; path = bzip2/bzlib.c; sourceTree = "<group>"; }; 883262931B163FD6003BB2F4 /* bzlib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = bzlib.h; path = bzip2/bzlib.h; sourceTree = "<group>"; }; - 883262941B163FD6003BB2F4 /* compress.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = compress.c; path = bzip2/compress.c; sourceTree = "<group>"; }; 883262951B163FD6003BB2F4 /* crctable.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = crctable.c; path = bzip2/crctable.c; sourceTree = "<group>"; }; 883262961B163FD6003BB2F4 /* decompress.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = decompress.c; path = bzip2/decompress.c; sourceTree = "<group>"; }; 883262971B163FD6003BB2F4 /* huffman.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = huffman.c; path = bzip2/huffman.c; sourceTree = "<group>"; }; @@ -150,6 +145,9 @@ 888E74391ADD96A900C5AEFE /* utf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = utf.c; sourceTree = "<group>"; }; 888E743B1ADD96C200C5AEFE /* utf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = utf.h; sourceTree = "<group>"; }; 888E743D1ADD96D700C5AEFE /* lvapi.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = lvapi.c; sourceTree = "<group>"; }; + 88FB252421C6954800DCE0D2 /* bzcompress.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = bzcompress.c; path = bzip2/bzcompress.c; sourceTree = "<group>"; }; + 88FB252621C6A1CA00DCE0D2 /* crypt.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = crypt.c; sourceTree = "<group>"; }; + 88FB252821C6A2A700DCE0D2 /* fileenc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = fileenc.c; path = aes/fileenc.c; sourceTree = "<group>"; }; C79368AA0C9ED687006083BF /* iomem.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = iomem.c; sourceTree = "<group>"; }; C79368AB0C9ED687006083BF /* iomem.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = iomem.h; sourceTree = "<group>"; }; /* End PBXFileReference section */ @@ -189,6 +187,7 @@ 83D3E1B5080D116E00DE332C /* zlib Sources */ = { isa = PBXGroup; children = ( + 88FB252621C6A1CA00DCE0D2 /* crypt.c */, C79368AB0C9ED687006083BF /* iomem.h */, C79368AA0C9ED687006083BF /* iomem.c */, 88521A381AF4145000A9CDF7 /* lvapi.h */, @@ -244,6 +243,7 @@ 883262641B163F5C003BB2F4 /* aes */ = { isa = PBXGroup; children = ( + 88FB252821C6A2A700DCE0D2 /* fileenc.c */, 883262661B163FAF003BB2F4 /* aes_via_ace.h */, 883262671B163FAF003BB2F4 /* aes.h */, 883262681B163FAF003BB2F4 /* aescrypt.c */, @@ -253,9 +253,6 @@ 8832626C1B163FAF003BB2F4 /* aestab.h */, 8832626D1B163FAF003BB2F4 /* brg_endian.h */, 8832626E1B163FAF003BB2F4 /* brg_types.h */, - 8832626F1B163FAF003BB2F4 /* entropy.c */, - 883262701B163FAF003BB2F4 /* entropy.h */, - 883262711B163FAF003BB2F4 /* fileenc.c */, 883262721B163FAF003BB2F4 /* fileenc.h */, 883262731B163FAF003BB2F4 /* hmac.c */, 883262741B163FAF003BB2F4 /* hmac.h */, @@ -273,10 +270,10 @@ isa = PBXGroup; children = ( 883262901B163FD6003BB2F4 /* blocksort.c */, + 88FB252421C6954800DCE0D2 /* bzcompress.c */, 883262911B163FD6003BB2F4 /* bzlib_private.h */, 883262921B163FD6003BB2F4 /* bzlib.c */, 883262931B163FD6003BB2F4 /* bzlib.h */, - 883262941B163FD6003BB2F4 /* compress.c */, 883262951B163FD6003BB2F4 /* crctable.c */, 883262961B163FD6003BB2F4 /* decompress.c */, 883262971B163FD6003BB2F4 /* huffman.c */, @@ -391,22 +388,22 @@ 883262881B163FAF003BB2F4 /* hmac.c in Sources */, 839542C10894F2490020C3E2 /* lvutil.c in Sources */, 839542C30894F2490020C3E2 /* mztools.c in Sources */, + 88FB252721C6A1CA00DCE0D2 /* crypt.c in Sources */, 8832629F1B163FD6003BB2F4 /* decompress.c in Sources */, + 88FB252521C6954800DCE0D2 /* bzcompress.c in Sources */, 839542C70894F2490020C3E2 /* inffast.c in Sources */, 839542C80894F2490020C3E2 /* crc32.c in Sources */, 839542CA0894F2490020C3E2 /* deflate.c in Sources */, - 8832629D1B163FD6003BB2F4 /* compress.c in Sources */, 839542CC0894F2490020C3E2 /* inftrees.c in Sources */, 8832628E1B163FAF003BB2F4 /* sha1.c in Sources */, + 88FB252921C6A2A700DCE0D2 /* fileenc.c in Sources */, 839542D00894F2490020C3E2 /* zutil.c in Sources */, 839542D60894F2490020C3E2 /* compress.c in Sources */, - 883262861B163FAF003BB2F4 /* fileenc.c in Sources */, 888E743E1ADD96D700C5AEFE /* lvapi.c in Sources */, 883262A01B163FD6003BB2F4 /* huffman.c in Sources */, 8832628C1B163FAF003BB2F4 /* pwd2key.c in Sources */, 839542DA0894F2490020C3E2 /* ioapi.c in Sources */, 839542E00894F2490020C3E2 /* zip.c in Sources */, - 883262841B163FAF003BB2F4 /* entropy.c in Sources */, 839542E40894F2490020C3E2 /* unzip.c in Sources */, 839542E50894F2490020C3E2 /* uncompr.c in Sources */, 8832627E1B163FAF003BB2F4 /* aeskey.c in Sources */, @@ -445,6 +442,7 @@ GCC_PREPROCESSOR_DEFINITIONS = ( HAVE_AES, HAVE_BZIP2, + NO_BZ_STDIO, DEBUG, ); GCC_REUSE_STRINGS = NO; @@ -494,6 +492,7 @@ GCC_PREPROCESSOR_DEFINITIONS = ( HAVE_AES, HAVE_BZIP2, + NO_BZ_STDIO, ); GCC_REUSE_STRINGS = NO; GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; @@ -540,6 +539,7 @@ GCC_PREPROCESSOR_DEFINITIONS = ( HAVE_AES, HAVE_BZIP2, + NO_BZ_STDIO, ); GCC_REUSE_STRINGS = NO; GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; Modified: trunk/lvzip/c_source/zip.c =================================================================== --- trunk/lvzip/c_source/zip.c 2018-12-16 15:36:32 UTC (rev 1579) +++ trunk/lvzip/c_source/zip.c 2018-12-16 16:02:17 UTC (rev 1580) @@ -601,7 +601,7 @@ return offset; } -extern zipFile ZEXPORT zipOpen4(const void *path, int append, uint64_t disk_size, const char **globalcomment, +static zipFile ZEXPORT zipOpen4(const void *path, int append, uint64_t disk_size, const char **globalcomment, zlib_filefunc64_32_def *pzlib_filefunc64_32_def) { zip64_internal ziinit; @@ -920,7 +920,7 @@ } #endif -extern int ZEXPORT zipOpenNewFileInZip_internal(zipFile file, +static int ZEXPORT zipOpenNewFileInZip_internal(zipFile file, const char *filename, const zip_fileinfo *zipfi, const void *extrafield_local, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lab...@us...> - 2018-12-16 15:36:34
|
Revision: 1579 http://sourceforge.net/p/opengtoolkit/svn/1579 Author: labviewer Date: 2018-12-16 15:36:32 +0000 (Sun, 16 Dec 2018) Log Message: ----------- A few macintosh fixes Modified Paths: -------------- trunk/lvzip/c_source/crypt.c trunk/lvzip/c_source/lvapi.c trunk/lvzip/c_source/lvutil.c trunk/lvzip/c_source/lvutil.h Modified: trunk/lvzip/c_source/crypt.c =================================================================== --- trunk/lvzip/c_source/crypt.c 2018-12-15 23:26:06 UTC (rev 1578) +++ trunk/lvzip/c_source/crypt.c 2018-12-16 15:36:32 UTC (rev 1579) @@ -85,7 +85,7 @@ /***************************************************************************/ #ifndef NOCRYPT -#if unix +#if defined(unix) || defined(__APPLE_CC__) #ifndef ZCR_SEED2 # define ZCR_SEED2 3141592654UL /* use PI as default pattern */ #endif Modified: trunk/lvzip/c_source/lvapi.c =================================================================== --- trunk/lvzip/c_source/lvapi.c 2018-12-15 23:26:06 UTC (rev 1578) +++ trunk/lvzip/c_source/lvapi.c 2018-12-16 15:36:32 UTC (rev 1579) @@ -31,7 +31,10 @@ #include "zip.h" #include "unzip.h" #include "lvapi.h" + +#ifdef HAVE_BZIP2 #include "bzip2/bzlib.h" +#endif #ifndef VERSIONMADEBY # define VERSIONMADEBY (0x0) /* platform depedent */ @@ -178,7 +181,14 @@ "zlib version: %s, build flags: 0x%lX\n" "minizip version: 1.2.0, September 16th, 2017" "aes version: 2013\n" - "bzip2 version: %s", lvzip_zlibVersion(), lvzip_zlibCompileFlags(), BZ2_bzlibVersion()); +#ifdef HAVE_BZIP2 + "bzip2 version: %s" +#endif + , lvzip_zlibVersion(), lvzip_zlibCompileFlags() +#ifdef HAVE_BZIP2 + , BZ2_bzlibVersion()) +#endif + ; return version; } Modified: trunk/lvzip/c_source/lvutil.c =================================================================== --- trunk/lvzip/c_source/lvutil.c 2018-12-15 23:26:06 UTC (rev 1578) +++ trunk/lvzip/c_source/lvutil.c 2018-12-16 15:36:32 UTC (rev 1579) @@ -107,6 +107,7 @@ #endif #elif MacOSX #include <CoreFoundation/CoreFoundation.h> + #include <CoreServices/CoreServices.h> #include <sys/stat.h> #include <sys/xattr.h> #define ftruncate64 ftruncate Modified: trunk/lvzip/c_source/lvutil.h =================================================================== --- trunk/lvzip/c_source/lvutil.h 2018-12-15 23:26:06 UTC (rev 1578) +++ trunk/lvzip/c_source/lvutil.h 2018-12-16 15:36:32 UTC (rev 1579) @@ -29,8 +29,6 @@ #ifndef _lvUtil_H #define _lvUtil_H -//#include "zlib.h" - #ifdef __cplusplus extern "C" { #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lab...@us...> - 2018-12-15 23:26:07
|
Revision: 1578 http://sourceforge.net/p/opengtoolkit/svn/1578 Author: labviewer Date: 2018-12-15 23:26:06 +0000 (Sat, 15 Dec 2018) Log Message: ----------- Change file info record back to old format for now Modified Paths: -------------- trunk/lvzip/source/lvzip.llb/ZLIB Convert File Info.vi trunk/lvzip/source/lvzip.llb/ZLIB Delete Files From Archive.vi trunk/lvzip/source/lvzip.llb/ZLIB Enumerate File Contents Old.vi trunk/lvzip/source/lvzip.llb/ZLIB Enumerate File Contents.vi trunk/lvzip/source/lvzip.llb/ZLIB Extract All Files To Dir.vi trunk/lvzip/source/lvzip.llb/ZLIB Get Current File Info.vi trunk/lvzip/source/lvzip.llb/ZLIB Go To First File.vi trunk/lvzip/source/lvzip.llb/ZLIB Go To Next File.vi trunk/lvzip/source/lvzip.llb/ZLIB VI Tree.vi Modified: trunk/lvzip/source/lvzip.llb/ZLIB Convert File Info.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/source/lvzip.llb/ZLIB Delete Files From Archive.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/source/lvzip.llb/ZLIB Enumerate File Contents Old.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/source/lvzip.llb/ZLIB Enumerate File Contents.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/source/lvzip.llb/ZLIB Extract All Files To Dir.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/source/lvzip.llb/ZLIB Get Current File Info.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/source/lvzip.llb/ZLIB Go To First File.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/source/lvzip.llb/ZLIB Go To Next File.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/source/lvzip.llb/ZLIB VI Tree.vi =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lab...@us...> - 2018-12-15 23:24:54
|
Revision: 1577 http://sourceforge.net/p/opengtoolkit/svn/1577 Author: labviewer Date: 2018-12-15 23:24:53 +0000 (Sat, 15 Dec 2018) Log Message: ----------- Recompiled shared library files Modified Paths: -------------- trunk/lvzip/RT Images/LinuxRT_arm/liblvzlib.so trunk/lvzip/RT Images/LinuxRT_x64/liblvzlib.so trunk/lvzip/RT Images/Pharlap/lvzlib.dll trunk/lvzip/RT Images/vxworks61/lvzlib.out trunk/lvzip/RT Images/vxworks63/lvzlib.out trunk/lvzip/source/lvzlib.dll trunk/lvzip/source/lvzlib.so trunk/lvzip/source/lvzlib64.dll trunk/lvzip/source/lvzlib64.so Modified: trunk/lvzip/RT Images/LinuxRT_arm/liblvzlib.so =================================================================== (Binary files differ) Modified: trunk/lvzip/RT Images/LinuxRT_x64/liblvzlib.so =================================================================== (Binary files differ) Modified: trunk/lvzip/RT Images/Pharlap/lvzlib.dll =================================================================== (Binary files differ) Modified: trunk/lvzip/RT Images/vxworks61/lvzlib.out =================================================================== (Binary files differ) Modified: trunk/lvzip/RT Images/vxworks63/lvzlib.out =================================================================== (Binary files differ) Modified: trunk/lvzip/source/lvzlib.dll =================================================================== (Binary files differ) Modified: trunk/lvzip/source/lvzlib.so =================================================================== (Binary files differ) Modified: trunk/lvzip/source/lvzlib64.dll =================================================================== (Binary files differ) Modified: trunk/lvzip/source/lvzlib64.so =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lab...@us...> - 2018-12-15 23:21:02
|
Revision: 1576 http://sourceforge.net/p/opengtoolkit/svn/1576 Author: labviewer Date: 2018-12-15 23:21:00 +0000 (Sat, 15 Dec 2018) Log Message: ----------- Some more edits for compilation under Linux and VxWorks Modified Paths: -------------- trunk/lvzip/c_source/.cproject trunk/lvzip/c_source/Makefile.vxworks trunk/lvzip/c_source/aes/brg_endian.h trunk/lvzip/c_source/bzip2/decompress.c trunk/lvzip/c_source/crypt.c trunk/lvzip/c_source/inflate.c trunk/lvzip/c_source/ioapi.h trunk/lvzip/c_source/lvapi.c trunk/lvzip/c_source/lvutil.c trunk/lvzip/c_source/unzip.c trunk/lvzip/c_source/zip.c Modified: trunk/lvzip/c_source/.cproject =================================================================== --- trunk/lvzip/c_source/.cproject 2018-12-15 17:11:39 UTC (rev 1575) +++ trunk/lvzip/c_source/.cproject 2018-12-15 23:21:00 UTC (rev 1576) @@ -40,6 +40,7 @@ <listOptionValue builtIn="false" value="_LARGEFILE64_SOURCE=1"/> <listOptionValue builtIn="false" value="HAVE_AES"/> <listOptionValue builtIn="false" value="HAVE_BZIP2"/> + <listOptionValue builtIn="false" value="BZ_NO_STDIO"/> </option> <option id="gnu.c.compiler.option.dialect.std.1246614591" name="Language standard" superClass="gnu.c.compiler.option.dialect.std" useByScannerDiscovery="true" value="gnu.c.compiler.dialect.default" valueType="enumerated"/> <option id="gnu.c.compiler.option.include.paths.338287776" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath"> @@ -110,6 +111,7 @@ <listOptionValue builtIn="false" value="_LARGEFILE64_SOURCE=1"/> <listOptionValue builtIn="false" value="HAVE_AES"/> <listOptionValue builtIn="false" value="HAVE_BZIP2"/> + <listOptionValue builtIn="false" value="BZ_NO_STDIO"/> </option> <option id="gnu.c.compiler.option.misc.other.362441626" name="Other flags" superClass="gnu.c.compiler.option.misc.other" useByScannerDiscovery="false" value="-c -fmessage-length=0 -march=armv7-a -mfpu=vfpv3 -mfloat-abi=softfp -fvisibility=hidden" valueType="string"/> <option id="gnu.c.compiler.option.misc.pic.717189032" name="Position Independent Code (-fPIC)" superClass="gnu.c.compiler.option.misc.pic" useByScannerDiscovery="false" value="true" valueType="boolean"/> @@ -184,6 +186,7 @@ <listOptionValue builtIn="false" value="_LARGEFILE64_SOURCE=1"/> <listOptionValue builtIn="false" value="HAVE_AES"/> <listOptionValue builtIn="false" value="HAVE_BZIP2"/> + <listOptionValue builtIn="false" value="BZ_NO_STDIO"/> </option> <option id="gnu.c.compiler.option.misc.other.978532756" name="Other flags" superClass="gnu.c.compiler.option.misc.other" useByScannerDiscovery="false" value="-c -fmessage-length=0 -fvisibility=hidden" valueType="string"/> <option id="gnu.c.compiler.option.misc.pic.804388978" name="Position Independent Code (-fPIC)" superClass="gnu.c.compiler.option.misc.pic" useByScannerDiscovery="false" value="true" valueType="boolean"/> @@ -257,6 +260,7 @@ <listOptionValue builtIn="false" value="_LARGEFILE64_SOURCE=1"/> <listOptionValue builtIn="false" value="HAVE_AES"/> <listOptionValue builtIn="false" value="HAVE_BZIP2"/> + <listOptionValue builtIn="false" value="BZ_NO_STDIO"/> </option> <inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1427234924" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/> </tool> Modified: trunk/lvzip/c_source/Makefile.vxworks =================================================================== --- trunk/lvzip/c_source/Makefile.vxworks 2018-12-15 17:11:39 UTC (rev 1575) +++ trunk/lvzip/c_source/Makefile.vxworks 2018-12-15 23:21:00 UTC (rev 1576) @@ -19,12 +19,11 @@ # directory. Make will automatically locate the source file and # compile it. # $(OBJ_DIR)/gzclose.o $(OBJ_DIR)/gzlib.o $(OBJ_DIR)/gzread.o $(OBJ_DIR)/gzwrite.o -OBJECTS := $(OBJ_DIR)/aes/aescrypt.o $(OBJ_DIR)/aes/aeskey.o $(OBJ_DIR)/aes/aestab.o \ - $(OBJ_DIR)/aes/entropy.o $(OBJ_DIR)/aes/filenc.o $(OBJ_DIR)/aes/hmac.o \ - $(OBJ_DIR)/aes/prng.o $(OBJ_DIR)/aes/pwd2key.o $(OBJ_DIR)/aes/sha1.o \ +OBJECTS := $(OBJ_DIR)/aes/aescrypt.o $(OBJ_DIR)/aes/aeskey.o $(OBJ_DIR)/aes/aestab.o $(OBJ_DIR)/aes/fileenc.o \ + $(OBJ_DIR)/aes/hmac.o $(OBJ_DIR)/aes/prng.o $(OBJ_DIR)/aes/pwd2key.o $(OBJ_DIR)/aes/sha1.o \ $(OBJ_DIR)/bzip2/bzlib.o $(OBJ_DIR)/bzip2/blocksort.o $(OBJ_DIR)/bzip2/huffman.o $(OBJ_DIR)/bzip2/crctable.o \ - $(OBJ_DIR)/bzip2/randtable.o $(OBJ_DIR)/bzip2/compress.o $(OBJ_DIR)/bzip2/decompress.o \ - $(OBJ_DIR)/adler32.o $(OBJ_DIR)/compress.o $(OBJ_DIR)/crc32.o $(OBJ_DIR)/deflate.o \ + $(OBJ_DIR)/bzip2/randtable.o $(OBJ_DIR)/bzip2/bzcompress.o $(OBJ_DIR)/bzip2/decompress.o \ + $(OBJ_DIR)/adler32.o $(OBJ_DIR)/compress.o $(OBJ_DIR)/crc32.o $(OBJ_DIR)/crypt.o $(OBJ_DIR)/deflate.o \ $(OBJ_DIR)/inffast.o $(OBJ_DIR)/infback.o $(OBJ_DIR)/inflate.o $(OBJ_DIR)/inftrees.o \ $(OBJ_DIR)/ioapi.o $(OBJ_DIR)/iomem.o $(OBJ_DIR)/lvutil.o $(OBJ_DIR)/lvapi.o \ $(OBJ_DIR)/mztools.o $(OBJ_DIR)/trees.o $(OBJ_DIR)/uncompr.o $(OBJ_DIR)/utf.o \ @@ -75,6 +74,12 @@ @if [ ! -d "$(OBJ_DIR)" ]; then\ mkdir -p $(OBJ_DIR);\ fi + @if [ ! -d "$(OBJ_DIR)/aes" ]; then\ + mkdir -p $(OBJ_DIR)/aes;\ + fi + @if [ ! -d "$(OBJ_DIR)/bzip2" ]; then\ + mkdir -p $(OBJ_DIR)/bzip2;\ + fi clean : rm -f $(OBJECTS) $(PROJECT_TARGETS) $(wildcard $(OBJ_DIR)/*.unstripped) Modified: trunk/lvzip/c_source/aes/brg_endian.h =================================================================== --- trunk/lvzip/c_source/aes/brg_endian.h 2018-12-15 17:11:39 UTC (rev 1575) +++ trunk/lvzip/c_source/aes/brg_endian.h 2018-12-15 23:21:00 UTC (rev 1576) @@ -34,7 +34,7 @@ defined(__pnacl__) # include <machine/endian.h> #elif defined( __linux__ ) || defined( __GNUC__ ) || defined( __GNU_LIBRARY__ ) -# if !defined( __MINGW32__ ) && !defined( _AIX ) +# if !defined( __MINGW32__ ) && !defined( _AIX ) && !defined(__VXWORKS__) # include <endian.h> # if !defined( __BEOS__ ) # include <byteswap.h> Modified: trunk/lvzip/c_source/bzip2/decompress.c =================================================================== --- trunk/lvzip/c_source/bzip2/decompress.c 2018-12-15 17:11:39 UTC (rev 1575) +++ trunk/lvzip/c_source/bzip2/decompress.c 2018-12-15 23:21:00 UTC (rev 1576) @@ -26,11 +26,11 @@ static void makeMaps_d ( DState* s ) { - UChar i; + int i; s->nInUse = 0; for (i = 0; i <= 255; i++) if (s->inUse[i]) { - s->seqToUnseq[s->nInUse] = i; + s->seqToUnseq[s->nInUse] = (UChar)i; s->nInUse++; } } Modified: trunk/lvzip/c_source/crypt.c =================================================================== --- trunk/lvzip/c_source/crypt.c 2018-12-15 17:11:39 UTC (rev 1575) +++ trunk/lvzip/c_source/crypt.c 2018-12-15 23:21:00 UTC (rev 1576) @@ -32,7 +32,7 @@ # include <windows.h> # define RtlGenRandom SystemFunction036 BOOLEAN NTAPI RtlGenRandom(PVOID RandomBuffer, ULONG RandomBufferLength); -#elif VxWorks +#elif defined(__VXWORKS__) #include <random.h> #else # include <sys/stat.h> @@ -40,10 +40,9 @@ # include <unistd.h> # include <dlfcn.h> #endif - #include "zlib.h" #include "crypt.h" -#include "lvutil.h" + /***************************************************************************/ #define CRC32(c, b) ((*(pcrc_32_tab+(((uint32_t)(c) ^ (b)) & 0xff))) ^ ((c) >> 8)) @@ -86,7 +85,7 @@ /***************************************************************************/ #ifndef NOCRYPT -#if Unix +#if unix #ifndef ZCR_SEED2 # define ZCR_SEED2 3141592654UL /* use PI as default pattern */ #endif @@ -111,11 +110,11 @@ } return rlen; } -#elif VxWorks +#elif defined(__VXWORKS__) return read_random(buf, len); #else // Unix int frand; - unsigned int rlen; + unsigned int rlen = 0; static int calls = 0; static void *lib = NULL; if (!lib) Modified: trunk/lvzip/c_source/inflate.c =================================================================== --- trunk/lvzip/c_source/inflate.c 2018-12-15 17:11:39 UTC (rev 1575) +++ trunk/lvzip/c_source/inflate.c 2018-12-15 23:21:00 UTC (rev 1576) @@ -428,10 +428,10 @@ /* check function to use adler32() for zlib or crc32() for gzip */ #ifdef GUNZIP -# define UPDATE(check, buf, len) \ +# define UPDATE_CRC32(check, buf, len) \ (state->flags ? crc32(check, buf, len) : adler32(check, buf, len)) #else -# define UPDATE(check, buf, len) adler32(check, buf, len) +# define UPDATE_CRC32(check, buf, len) adler32(check, buf, len) #endif /* check macros for header crc */ @@ -1201,7 +1201,7 @@ state->total += out; if ((state->wrap & 4) && out) strm->adler = state->check = - UPDATE(state->check, put - out, out); + UPDATE_CRC32(state->check, put - out, out); out = left; if ((state->wrap & 4) && ( #ifdef GUNZIP @@ -1265,8 +1265,7 @@ strm->total_out += out; state->total += out; if ((state->wrap & 4) && out) - strm->adler = state->check = - UPDATE(state->check, strm->next_out - out, out); + strm->adler = state->check = UPDATE_CRC32(state->check, strm->next_out - out, out); strm->data_type = (int)state->bits + (state->last ? 64 : 0) + (state->mode == TYPE ? 128 : 0) + (state->mode == LEN_ || state->mode == COPY_ ? 256 : 0); Modified: trunk/lvzip/c_source/ioapi.h =================================================================== --- trunk/lvzip/c_source/ioapi.h 2018-12-15 17:11:39 UTC (rev 1575) +++ trunk/lvzip/c_source/ioapi.h 2018-12-15 23:21:00 UTC (rev 1576) @@ -37,7 +37,7 @@ # define ZIP_UNUSED #endif -#if defined(USE_FILE32API) +#if defined(USE_FILE32API) || defined(__VXWORKS__) # define fopen64 fopen # define ftello64 ftell # define fseeko64 fseek Modified: trunk/lvzip/c_source/lvapi.c =================================================================== --- trunk/lvzip/c_source/lvapi.c 2018-12-15 17:11:39 UTC (rev 1575) +++ trunk/lvzip/c_source/lvapi.c 2018-12-15 23:21:00 UTC (rev 1576) @@ -456,10 +456,22 @@ #if Win32 #define strcasecmp _stricmp #endif + static int caseInsensitiveNameComparer(unzFile file, const char *filename1, const char *filename2) { Unused(file); +#if VxWorks + int32 c1, c2; + + while (((c1 = *filename1++) == (c2 = *filename2++)) || (tolower(c1) == tolower(c2))) + if(c1 == '\0') + return 0; + c1 = tolower(c1); + c2 = tolower(c2); + return c1 - c2; +#else return strcasecmp(filename1, filename2); +#endif } static int caseSensitiveNameComparer(unzFile file, const char *filename1, const char *filename2) Modified: trunk/lvzip/c_source/lvutil.c =================================================================== --- trunk/lvzip/c_source/lvutil.c 2018-12-15 17:11:39 UTC (rev 1575) +++ trunk/lvzip/c_source/lvutil.c 2018-12-15 23:21:00 UTC (rev 1576) @@ -95,8 +95,6 @@ #include <dirent.h> #include <fcntl.h> #include <unistd.h> - #define ftello64 ftello - #define fseeko64 fseeko #define ftruncate64 ftruncate #ifdef HAVE_ICONV #include <iconv.h> @@ -109,11 +107,8 @@ #endif #elif MacOSX #include <CoreFoundation/CoreFoundation.h> - #include "MacBinaryIII.h" #include <sys/stat.h> #include <sys/xattr.h> - #define ftello64 ftello - #define fseeko64 fseeko #define ftruncate64 ftruncate #if ProcessorType!=kX64 #define MacSpec FSRef @@ -1890,14 +1885,19 @@ LibAPI(MgErr) LVPath_CreateLink(Path path, Path target, uInt32 flags) { +#if !VxWorks MgErr err = mgNoErr; LWStrPtr src = NULL; LWStrPtr tgt = NULL; +#endif if (!FIsAbsPath(path)) return mgArgErr; - err = MakePathDSString(path, &src, 0); +#if VxWorks + return mgNotSupported; +#else + err = MakePathDSString(path, &src, 0); if (!err) { err = MakePathDSString(target, &tgt, 0); @@ -1937,16 +1937,22 @@ DSDisposePtr((UPtr)src); } return err; +#endif } LibAPI(MgErr) LVPath_ReadLink(Path path, Path *target, uInt32 recursive, uInt32 *fileType) { +#if !VxWorks MgErr err = mgNoErr; LWStrPtr src = NULL; +#endif if (!FIsAbsPath(path)) return mgArgErr; +#if VxWorks + return mgNotSupported; +#else err = MakePathDSString(path, &src, 0); if (!err) { @@ -2085,6 +2091,7 @@ DSDisposePtr((UPtr)src); } return err; +#endif } /* @@ -3272,12 +3279,14 @@ static MgErr unix_convert_wtomb(const wchar_t *src, int32 srclen, LStrHandle *dest, uInt32 codePage, char defaultChar, LVBoolean *defaultCharWasUsed) { - size_t dummy, length, size = 2 * srclength; + size_t dummy, length, size = 2 * srclen; wchar_t wdefChar; MgErr err = noErr; if (codePage == CP_UTF8) + { err = wchartoutf8(src, srclen, NULL, &size, 0); + } else { if (defaultChar) @@ -3290,7 +3299,7 @@ if (!err) { uChar *dbuf = LStrBuf(**dest), *dend = LStrBuf(**dest) + size; - wchar_t *sbuf = src, *send = sbuf + length; + const wchar_t *sbuf = src, *send = sbuf + srclen; #ifdef HAVE_WCRTOMB mbstate_t mbs; Modified: trunk/lvzip/c_source/unzip.c =================================================================== --- trunk/lvzip/c_source/unzip.c 2018-12-15 17:11:39 UTC (rev 1575) +++ trunk/lvzip/c_source/unzip.c 2018-12-15 23:21:00 UTC (rev 1576) @@ -40,8 +40,8 @@ # include <compression.h> #endif +#define Z_BZIP2ED 12 #ifdef HAVE_BZIP2 -# define Z_BZIP2ED 12 # include "bzip2/bzlib.h" #endif Modified: trunk/lvzip/c_source/zip.c =================================================================== --- trunk/lvzip/c_source/zip.c 2018-12-15 17:11:39 UTC (rev 1575) +++ trunk/lvzip/c_source/zip.c 2018-12-15 23:21:00 UTC (rev 1576) @@ -39,8 +39,8 @@ # include <compression.h> #endif +#define Z_BZIP2ED 12 #ifdef HAVE_BZIP2 -# define Z_BZIP2ED 12 # include "bzip2/bzlib.h" #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lab...@us...> - 2018-12-14 11:40:33
|
Revision: 1574 http://sourceforge.net/p/opengtoolkit/svn/1574 Author: labviewer Date: 2018-12-14 11:40:31 +0000 (Fri, 14 Dec 2018) Log Message: ----------- Recompiled tests Modified Paths: -------------- trunk/lvzip/tests/lvzip-test-delete files from archive.vi trunk/lvzip/tests/lvzip-test-memory stream.vi Modified: trunk/lvzip/tests/lvzip-test-delete files from archive.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/tests/lvzip-test-memory stream.vi =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lab...@us...> - 2018-12-14 11:39:48
|
Revision: 1573 http://sourceforge.net/p/opengtoolkit/svn/1573 Author: labviewer Date: 2018-12-14 11:39:45 +0000 (Fri, 14 Dec 2018) Log Message: ----------- Update version number for the component description file Modified Paths: -------------- trunk/lvzip/RT Images/Pharlap/lvzlib.dll trunk/lvzip/RT Images/lvzlib_linux-armv7a.cdf trunk/lvzip/RT Images/lvzlib_linux-x64.cdf trunk/lvzip/RT Images/lvzlib_pharlap.cdf trunk/lvzip/RT Images/lvzlib_vxworks61.cdf trunk/lvzip/RT Images/lvzlib_vxworks63.cdf Added Paths: ----------- trunk/lvzip/RT Images/Pharlap/ Removed Paths: ------------- trunk/lvzip/RT Images/pharlap/ Modified: trunk/lvzip/RT Images/Pharlap/lvzlib.dll =================================================================== (Binary files differ) Modified: trunk/lvzip/RT Images/lvzlib_linux-armv7a.cdf =================================================================== --- trunk/lvzip/RT Images/lvzlib_linux-armv7a.cdf 2018-12-14 11:29:17 UTC (rev 1572) +++ trunk/lvzip/RT Images/lvzlib_linux-armv7a.cdf 2018-12-14 11:39:45 UTC (rev 1573) @@ -1,6 +1,6 @@ <?xml version="1.0"?> <?CDF version="1.5"?> -<SOFTPKG NAME="{38D47F1D-07F2-4CA0-89DB-6F89598DA97C}" VERSION="4.1.0" TYPE="VISIBLE"> +<SOFTPKG NAME="{38D47F1D-07F2-4CA0-89DB-6F89598DA97C}" VERSION="4.2.0" TYPE="VISIBLE"> <TITLE>OpenG ZIP Tools</TITLE> <ABSTRACT>Support files neccessary to use the OpenG ZIP library.</ABSTRACT> <IMPLEMENTATION> Modified: trunk/lvzip/RT Images/lvzlib_linux-x64.cdf =================================================================== --- trunk/lvzip/RT Images/lvzlib_linux-x64.cdf 2018-12-14 11:29:17 UTC (rev 1572) +++ trunk/lvzip/RT Images/lvzlib_linux-x64.cdf 2018-12-14 11:39:45 UTC (rev 1573) @@ -1,6 +1,6 @@ <?xml version="1.0"?> <?CDF version="1.5"?> -<SOFTPKG NAME="{38D47F1D-07F2-4CA0-89DB-6F89598DA97C}" VERSION="4.1.0" TYPE="VISIBLE"> +<SOFTPKG NAME="{38D47F1D-07F2-4CA0-89DB-6F89598DA97C}" VERSION="4.2.0" TYPE="VISIBLE"> <TITLE>OpenG ZIP Tools</TITLE> <ABSTRACT>Support files neccessary to use the OpenG ZIP library.</ABSTRACT> <IMPLEMENTATION> Modified: trunk/lvzip/RT Images/lvzlib_pharlap.cdf =================================================================== --- trunk/lvzip/RT Images/lvzlib_pharlap.cdf 2018-12-14 11:29:17 UTC (rev 1572) +++ trunk/lvzip/RT Images/lvzlib_pharlap.cdf 2018-12-14 11:39:45 UTC (rev 1573) @@ -1,11 +1,11 @@ <?xml version="1.0"?> <?CDF version="1.2"?> <!DOCTYPE SOFTPKG SYSTEM "c:\cdf.dtd"> -<SOFTPKG NAME="{38D47F1D-07F2-4CA0-89DB-6F89598DA97C}" VERSION="4.1.0" TYPE="VISIBLE"> +<SOFTPKG NAME="{38D47F1D-07F2-4CA0-89DB-6F89598DA97C}" VERSION="4.2.0" TYPE="VISIBLE"> <TITLE>OpenG ZIP Tools</TITLE> <ABSTRACT>Support files neccessary to use the OpenG ZIP library.</ABSTRACT> <IMPLEMENTATION> <OS VALUE="PharLap" /> - <CODEBASE FILENAME="pharlap/lvzlib.dll" TARGET="/ni-rt/system/lvzlib.dll"/> + <CODEBASE FILENAME="Pharlap/lvzlib.dll" TARGET="/ni-rt/system/lvzlib.dll"/> </IMPLEMENTATION> </SOFTPKG> \ No newline at end of file Modified: trunk/lvzip/RT Images/lvzlib_vxworks61.cdf =================================================================== --- trunk/lvzip/RT Images/lvzlib_vxworks61.cdf 2018-12-14 11:29:17 UTC (rev 1572) +++ trunk/lvzip/RT Images/lvzlib_vxworks61.cdf 2018-12-14 11:39:45 UTC (rev 1573) @@ -1,7 +1,7 @@ <?xml version="1.0"?> <?CDF version="1.2"?> <!DOCTYPE SOFTPKG SYSTEM "c:\cdf.dtd"> -<SOFTPKG NAME="{38D47F1D-07F2-4CA0-89DB-6F89598DA97C}" VERSION="4.1.0" TYPE="VISIBLE"> +<SOFTPKG NAME="{38D47F1D-07F2-4CA0-89DB-6F89598DA97C}" VERSION="4.2.0" TYPE="VISIBLE"> <TITLE>OpenG ZIP Tools</TITLE> <ABSTRACT>Support files neccessary to use the OpenG ZIP library.</ABSTRACT> <IMPLEMENTATION> Modified: trunk/lvzip/RT Images/lvzlib_vxworks63.cdf =================================================================== --- trunk/lvzip/RT Images/lvzlib_vxworks63.cdf 2018-12-14 11:29:17 UTC (rev 1572) +++ trunk/lvzip/RT Images/lvzlib_vxworks63.cdf 2018-12-14 11:39:45 UTC (rev 1573) @@ -1,7 +1,7 @@ <?xml version="1.0"?> <?CDF version="1.2"?> <!DOCTYPE SOFTPKG SYSTEM "c:\cdf.dtd"> -<SOFTPKG NAME="{38D47F1D-07F2-4CA0-89DB-6F89598DA97C}" VERSION="4.1.0" TYPE="VISIBLE"> +<SOFTPKG NAME="{38D47F1D-07F2-4CA0-89DB-6F89598DA97C}" VERSION="4.2.0" TYPE="VISIBLE"> <TITLE>OpenG ZIP Tools</TITLE> <ABSTRACT>Support files neccessary to use the OpenG ZIP library.</ABSTRACT> <IMPLEMENTATION> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lab...@us...> - 2018-12-14 11:29:18
|
Revision: 1572 http://sourceforge.net/p/opengtoolkit/svn/1572 Author: labviewer Date: 2018-12-14 11:29:17 +0000 (Fri, 14 Dec 2018) Log Message: ----------- Add a simple test for the cryptrand function Added Paths: ----------- trunk/lvzip/tests/lvzip-test-random-generaor.vi Added: trunk/lvzip/tests/lvzip-test-random-generaor.vi =================================================================== (Binary files differ) Index: trunk/lvzip/tests/lvzip-test-random-generaor.vi =================================================================== --- trunk/lvzip/tests/lvzip-test-random-generaor.vi 2018-12-14 11:28:34 UTC (rev 1571) +++ trunk/lvzip/tests/lvzip-test-random-generaor.vi 2018-12-14 11:29:17 UTC (rev 1572) Property changes on: trunk/lvzip/tests/lvzip-test-random-generaor.vi ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lab...@us...> - 2018-12-14 11:28:36
|
Revision: 1571 http://sourceforge.net/p/opengtoolkit/svn/1571 Author: labviewer Date: 2018-12-14 11:28:34 +0000 (Fri, 14 Dec 2018) Log Message: ----------- Add an API to call the cryptrand function for testing its operation Added Paths: ----------- trunk/lvzip/source/lvzip.llb/ZLIB Random Buffer.vi Added: trunk/lvzip/source/lvzip.llb/ZLIB Random Buffer.vi =================================================================== (Binary files differ) Index: trunk/lvzip/source/lvzip.llb/ZLIB Random Buffer.vi =================================================================== --- trunk/lvzip/source/lvzip.llb/ZLIB Random Buffer.vi 2018-12-14 11:19:48 UTC (rev 1570) +++ trunk/lvzip/source/lvzip.llb/ZLIB Random Buffer.vi 2018-12-14 11:28:34 UTC (rev 1571) Property changes on: trunk/lvzip/source/lvzip.llb/ZLIB Random Buffer.vi ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lab...@us...> - 2018-12-14 11:19:50
|
Revision: 1570 http://sourceforge.net/p/opengtoolkit/svn/1570 Author: labviewer Date: 2018-12-14 11:19:48 +0000 (Fri, 14 Dec 2018) Log Message: ----------- Add fallback on Linux for when libbsd is not installed Modified Paths: -------------- trunk/lvzip/c_source/README trunk/lvzip/c_source/crypt.c Modified: trunk/lvzip/c_source/README =================================================================== --- trunk/lvzip/c_source/README 2018-12-13 11:34:58 UTC (rev 1569) +++ trunk/lvzip/c_source/README 2018-12-14 11:19:48 UTC (rev 1570) @@ -1,6 +1,6 @@ ZLIB DATA COMPRESSION LIBRARY -zlib 1.2.8 is a general purpose data compression library. All the code is +zlib 1.2.11 is a general purpose data compression library. All the code is thread safe. The data format used by the zlib library is described by RFCs (Request for Comments) 1950 to 1952 in the files http://tools.ietf.org/html/rfc1950 (zlib format), rfc1951 (deflate format) and @@ -84,7 +84,7 @@ Copyright notice: - (C) 1995-2013 Jean-loup Gailly and Mark Adler + (C) 1995-2017 Jean-loup Gailly and Mark Adler This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages Modified: trunk/lvzip/c_source/crypt.c =================================================================== --- trunk/lvzip/c_source/crypt.c 2018-12-13 11:34:58 UTC (rev 1569) +++ trunk/lvzip/c_source/crypt.c 2018-12-14 11:19:48 UTC (rev 1570) @@ -38,6 +38,7 @@ # include <sys/stat.h> # include <fcntl.h> # include <unistd.h> +# include <dlfcn.h> #endif #include "zlib.h" @@ -85,8 +86,13 @@ } /***************************************************************************/ - #ifndef NOCRYPT +#if Unix +#ifndef ZCR_SEED2 +# define ZCR_SEED2 3141592654UL /* use PI as default pattern */ +#endif +typedef void (*arc4random_func)(void *, unsigned int); +#endif unsigned int cryptrand(unsigned char *buf, unsigned int len) { #ifdef _WIN32 @@ -108,8 +114,46 @@ } #elif VxWorks return read_random(buf, len); -#else - arc4random_buf(buf, len); +#else // Unix + int frand; + unsigned int rlen; + static calls = 0; + static void *lib = NULL; + if (!lib) + lib = dlopen("libbsd.so", RTLD_LOCAL); + if (lib) + { + static arc4random_func func = NULL; + if (!func) + { + dlerror(); /* Clear any existing error */ + *(void**)(&func) = dlsym(lib, "arc4random"); + if (!func || dlerror()) + { + func = NULL; + } + } + if (func) + { + (*func)(buf, len); + return len; + } + } + /* arc4random could not be found */ + frand = open("/dev/urandom", O_RDONLY); + if (frand != -1) + { + rlen = (unsigned int)read(frand, buf, len); + close(frand); + } + if (rlen < len) + { + /* Ensure different random header each time */ + if (++calls == 1) + srand((unsigned int)(time(NULL) ^ ZCR_SEED2)); + while (rlen < len) + buf[rlen++] = (unsigned char)(rand() >> 7) & 0xff; + } #endif return len; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lab...@us...> - 2018-12-12 23:32:47
|
Revision: 1568 http://sourceforge.net/p/opengtoolkit/svn/1568 Author: labviewer Date: 2018-12-12 23:32:45 +0000 (Wed, 12 Dec 2018) Log Message: ----------- Remove unneeded files and code from the project and make the code more multiplatform compatible Modified Paths: -------------- trunk/lvzip/c_source/Makefile trunk/lvzip/c_source/aes/brg_types.h trunk/lvzip/c_source/aes/entropy.c trunk/lvzip/c_source/aes/entropy.h trunk/lvzip/c_source/bzip2/bzlib.h trunk/lvzip/c_source/crypt.c trunk/lvzip/c_source/ioapi.c trunk/lvzip/c_source/lvapi.c trunk/lvzip/c_source/lvutil.c trunk/lvzip/c_source/unzip.c trunk/lvzip/c_source/unzip.h trunk/lvzip/c_source/zip.c trunk/lvzip/c_source/zip.h trunk/lvzip/c_source/zlibvc.dsp trunk/lvzip/c_source/zlibvc.vcproj Modified: trunk/lvzip/c_source/Makefile =================================================================== --- trunk/lvzip/c_source/Makefile 2018-12-12 11:22:02 UTC (rev 1567) +++ trunk/lvzip/c_source/Makefile 2018-12-12 23:32:45 UTC (rev 1568) @@ -18,7 +18,7 @@ CC=gcc -CFLAGS=-O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN +CFLAGS=-O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DHAVE_AES -DHAVE_BZIP2 #CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 #CFLAGS=-g -DDEBUG #CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ @@ -25,7 +25,7 @@ # -Wstrict-prototypes -Wmissing-prototypes CINDIR=/usr/local/lv70/cintools -SFLAGS=-O3 -fPIC $(CC_ARCH_SPEC) -fvisibility=hidden -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -L$(CINDIR) +SFLAGS=-O3 -fPIC $(CC_ARCH_SPEC) -fvisibility=hidden -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DHAVE_AES -DHAVE_BZIP2 -DBZ_NO_STDIO -Ibzip2 -L$(CINDIR) LDFLAGS=-Wl,-soname=$(SHAREDLIBM) TEST_LDFLAGS=-L. libz.a LDSHARED=gcc @@ -55,19 +55,19 @@ man3dir = ${mandir}/man3 pkgconfigdir = ${libdir}/pkgconfig -OBJZ = adler32.o crc32.o deflate.o infback.o inffast.o inflate.o inftrees.o trees.o zutil.o +OBJZ = adler32.o crc32.o crypt.o deflate.o infback.o inffast.o inflate.o inftrees.o trees.o zutil.o OBJG = compress.o uncompr.o gzclose.o gzlib.o gzread.o gzwrite.o OBJL = lvutil.o ioapi.o iomem.o mztools.o unzip.o zip.o utf.o -OBJE = aes/aescrypt.o aes/aeskey.o aes/aestab.o aes/entropy.o aes/fileenc.o aes/hmac.o aes/prng.o aes/pwd2key.o aes/sha1.o -OBJ2 = bzip2/blocksort.o bzip2/huffman.o bzip2/crctable.o bzip2/randtable.o bzip2/compress.o bzip2/decompress.o bzip2/bzlib.o +OBJE = aes/aescrypt.o aes/aeskey.o aes/aestab.o aes/fileenc.o aes/hmac.o aes/prng.o aes/pwd2key.o aes/sha1.o +OBJ2 = bzip2/blocksort.o bzip2/huffman.o bzip2/crctable.o bzip2/randtable.o bzip2/bzcompress.o bzip2/decompress.o bzip2/bzlib.o OBJC = $(OBJZ) $(OBJL) $(OBJG) $(OBJ2) $(OBJE) -PIC_OBJZ = adler32.lo crc32.lo deflate.lo infback.lo inffast.lo inflate.lo inftrees.lo trees.lo zutil.lo +PIC_OBJZ = adler32.lo crc32.lo crypt.lo deflate.lo infback.lo inffast.lo inflate.lo inftrees.lo trees.lo zutil.lo PIC_OBJG = compress.lo uncompr.lo gzclose.lo gzlib.lo gzread.lo gzwrite.lo PIC_OBJL = lvapi.lo lvutil.lo ioapi.lo iomem.lo mztools.lo unzip.lo zip.lo utf.lo -PIC_OBJE = aes/aescrypt.lo aes/aeskey.lo aes/aestab.lo aes/entropy.lo aes/fileenc.lo aes/hmac.lo aes/prng.lo aes/pwd2key.lo aes/sha1.lo -PIC_OBJ2 = bzip2/blocksort.lo bzip2/huffman.lo bzip2/crctable.lo bzip2/randtable.lo bzip2/compress.lo bzip2/decompress.lo bzip2/bzlib.lo +PIC_OBJE = aes/aescrypt.lo aes/aeskey.lo aes/aestab.lo aes/fileenc.lo aes/hmac.lo aes/prng.lo aes/pwd2key.lo aes/sha1.lo +PIC_OBJ2 = bzip2/blocksort.lo bzip2/huffman.lo bzip2/crctable.lo bzip2/randtable.lo bzip2/bzcompress.lo bzip2/decompress.lo bzip2/bzlib.lo PIC_OBJC = $(PIC_OBJZ) $(PIC_OBJL) $(PIC_OBJG) $(PIC_OBJ2) $(PIC_OBJE) # to use the asm code: make OBJA=match.o, PIC_OBJA=match.lo @@ -282,6 +282,7 @@ gzclose.o gzlib.o gzread.o gzwrite.o: zlib.h zconf.h gzguts.h compress.o example.o minigzip.o uncompr.o: zlib.h zconf.h crc32.o: zutil.h zlib.h zconf.h crc32.h +crypt.o: zutil.h zlib.h zconf.h crypt.h deflate.o: deflate.h zutil.h zlib.h zconf.h infback.o inflate.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h inffixed.h inffast.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h @@ -292,6 +293,7 @@ gzclose.lo gzlib.lo gzread.lo gzwrite.lo: zlib.h zconf.h gzguts.h compress.lo example.lo minigzip.lo uncompr.lo: zlib.h zconf.h crc32.lo: zutil.h zlib.h zconf.h crc32.h +crypt.lo: zutil.h zlib.h zconf.h crypt.h deflate.lo: deflate.h zutil.h zlib.h zconf.h infback.lo inflate.lo: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h inffixed.h inffast.lo: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h Modified: trunk/lvzip/c_source/aes/brg_types.h =================================================================== --- trunk/lvzip/c_source/aes/brg_types.h 2018-12-12 11:22:02 UTC (rev 1567) +++ trunk/lvzip/c_source/aes/brg_types.h 2018-12-12 23:32:45 UTC (rev 1568) @@ -57,6 +57,7 @@ # define intptr_t unsigned int # define ptrint_t intptr_t #elif defined( __GNUC__ ) && ( __GNUC__ >= 3 ) +# include <stdint.h> # define ptrint_t intptr_t #else # define ptrint_t int Modified: trunk/lvzip/c_source/aes/entropy.c =================================================================== --- trunk/lvzip/c_source/aes/entropy.c 2018-12-12 11:22:02 UTC (rev 1567) +++ trunk/lvzip/c_source/aes/entropy.c 2018-12-12 23:32:45 UTC (rev 1568) @@ -1,5 +1,21 @@ #ifdef _WIN32 -#include <windows.h> +/* `RtlGenRandom` is used over `CryptGenRandom` on Microsoft Windows based systems: + * - `CryptGenRandom` requires pulling in `CryptoAPI` which causes unnecessary + * memory overhead if this API is not being used for other purposes + * - `RtlGenRandom` is thus called directly instead. A detailed explanation + * can be found here: https://blogs.msdn.microsoft.com/michael_howard/2005/01/14/cryptographically-secure-random-number-on-windows-without-using-cryptoapi/ + * + * In spite of the disclaimer on the `RtlGenRandom` documentation page that was + * written back in the Windows XP days, this function is here to stay. The CRT + * function `rand_s()` directly depends on it, so touching it would break many + * applications released since Windows XP. + * + * Also note that Rust, Firefox and BoringSSL (thus, Google Chrome and everything + * based on Chromium) also depend on it, and that libsodium allows the RNG to be + * replaced without patching nor recompiling the library. + */ +# include <windows.h> +# define RtlGenRandom SystemFunction036 #else #include <stdio.h> #include <fcntl.h> @@ -12,21 +28,14 @@ #endif #ifdef _WIN32 +BOOLEAN NTAPI RtlGenRandom(PVOID RandomBuffer, ULONG RandomBufferLength); int entropy_fun(unsigned char buf[], unsigned int len) { - HCRYPTPROV provider; + unsigned int i; unsigned __int64 pentium_tsc[1]; - unsigned int i; - int result = 0; + if (RtlGenRandom(buf, len)) + return len; - if (CryptAcquireContext(&provider, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT | CRYPT_SILENT)) - { - result = CryptGenRandom(provider, len, buf); - CryptReleaseContext(provider, 0); - if (result) - return len; - } - QueryPerformanceCounter((LARGE_INTEGER *)pentium_tsc); for(i = 0; i < 8 && i < len; ++i) Modified: trunk/lvzip/c_source/aes/entropy.h =================================================================== --- trunk/lvzip/c_source/aes/entropy.h 2018-12-12 11:22:02 UTC (rev 1567) +++ trunk/lvzip/c_source/aes/entropy.h 2018-12-12 23:32:45 UTC (rev 1568) @@ -7,7 +7,7 @@ { #endif -int entropy_fun(unsigned char buf[], unsigned int len); +int entropy_fun(unsigned char buf[], unsigned int len); #if defined(__cplusplus) } Modified: trunk/lvzip/c_source/bzip2/bzlib.h =================================================================== --- trunk/lvzip/c_source/bzip2/bzlib.h 2018-12-12 11:22:02 UTC (rev 1567) +++ trunk/lvzip/c_source/bzip2/bzlib.h 2018-12-12 23:32:45 UTC (rev 1568) @@ -1,282 +1,282 @@ - -/*-------------------------------------------------------------*/ -/*--- Public header file for the library. ---*/ -/*--- bzlib.h ---*/ -/*-------------------------------------------------------------*/ - -/* ------------------------------------------------------------------ - This file is part of bzip2/libbzip2, a program and library for - lossless, block-sorting data compression. - - bzip2/libbzip2 version 1.0.6 of 6 September 2010 - Copyright (C) 1996-2010 Julian Seward <js...@bz...> - - Please read the WARNING, DISCLAIMER and PATENTS sections in the - README file. - - This program is released under the terms of the license contained - in the file LICENSE. - ------------------------------------------------------------------ */ - - -#ifndef _BZLIB_H -#define _BZLIB_H - -#ifdef __cplusplus -extern "C" { -#endif - -#define BZ_RUN 0 -#define BZ_FLUSH 1 -#define BZ_FINISH 2 - -#define BZ_OK 0 -#define BZ_RUN_OK 1 -#define BZ_FLUSH_OK 2 -#define BZ_FINISH_OK 3 -#define BZ_STREAM_END 4 -#define BZ_SEQUENCE_ERROR (-1) -#define BZ_PARAM_ERROR (-2) -#define BZ_MEM_ERROR (-3) -#define BZ_DATA_ERROR (-4) -#define BZ_DATA_ERROR_MAGIC (-5) -#define BZ_IO_ERROR (-6) -#define BZ_UNEXPECTED_EOF (-7) -#define BZ_OUTBUFF_FULL (-8) -#define BZ_CONFIG_ERROR (-9) - -typedef - struct { - char *next_in; - unsigned int avail_in; - unsigned int total_in_lo32; - unsigned int total_in_hi32; - - char *next_out; - unsigned int avail_out; - unsigned int total_out_lo32; - unsigned int total_out_hi32; - - void *state; - - void *(*bzalloc)(void *,int,int); - void (*bzfree)(void *,void *); - void *opaque; - } - bz_stream; - - -#ifndef BZ_IMPORT -#define BZ_EXPORT -#endif - -#ifndef BZ_NO_STDIO -/* Need a definitition for FILE */ -#include <stdio.h> -#endif - -#ifdef _WIN32 -# include <windows.h> -# ifdef small - /* windows.h define small to char */ -# undef small -# endif -# ifdef BZ_EXPORT -# define BZ_API(func) WINAPI func -# define BZ_EXTERN extern -# else - /* import windows dll dynamically */ -# define BZ_API(func) (WINAPI * func) -# define BZ_EXTERN -# endif -#else -# define BZ_API(func) func -# define BZ_EXTERN extern -#endif - - -/*-- Core (low-level) library functions --*/ - -BZ_EXTERN int BZ_API(BZ2_bzCompressInit) ( - bz_stream* strm, - int blockSize100k, - int verbosity, - int workFactor - ); - -BZ_EXTERN int BZ_API(BZ2_bzCompress) ( - bz_stream* strm, - int action - ); - -BZ_EXTERN int BZ_API(BZ2_bzCompressEnd) ( - bz_stream* strm - ); - -BZ_EXTERN int BZ_API(BZ2_bzDecompressInit) ( - bz_stream *strm, - int verbosity, - int small - ); - -BZ_EXTERN int BZ_API(BZ2_bzDecompress) ( - bz_stream* strm - ); - -BZ_EXTERN int BZ_API(BZ2_bzDecompressEnd) ( - bz_stream *strm - ); - - - -/*-- High(er) level library functions --*/ -#ifndef BZ_NO_STDIO -#define BZ_MAX_UNUSED 5000 +/*-------------------------------------------------------------*/ +/*--- Public header file for the library. ---*/ +/*--- bzlib.h ---*/ +/*-------------------------------------------------------------*/ +/* ------------------------------------------------------------------ + This file is part of bzip2/libbzip2, a program and library for + lossless, block-sorting data compression. + + bzip2/libbzip2 version 1.0.6 of 6 September 2010 + Copyright (C) 1996-2010 Julian Seward <js...@bz...> + + Please read the WARNING, DISCLAIMER and PATENTS sections in the + README file. + + This program is released under the terms of the license contained + in the file LICENSE. + ------------------------------------------------------------------ */ + + +#ifndef _BZLIB_H +#define _BZLIB_H + +#ifdef __cplusplus +extern "C" { +#endif + +#define BZ_RUN 0 +#define BZ_FLUSH 1 +#define BZ_FINISH 2 + +#define BZ_OK 0 +#define BZ_RUN_OK 1 +#define BZ_FLUSH_OK 2 +#define BZ_FINISH_OK 3 +#define BZ_STREAM_END 4 +#define BZ_SEQUENCE_ERROR (-1) +#define BZ_PARAM_ERROR (-2) +#define BZ_MEM_ERROR (-3) +#define BZ_DATA_ERROR (-4) +#define BZ_DATA_ERROR_MAGIC (-5) +#define BZ_IO_ERROR (-6) +#define BZ_UNEXPECTED_EOF (-7) +#define BZ_OUTBUFF_FULL (-8) +#define BZ_CONFIG_ERROR (-9) + +typedef + struct { + char *next_in; + unsigned int avail_in; + unsigned int total_in_lo32; + unsigned int total_in_hi32; + + char *next_out; + unsigned int avail_out; + unsigned int total_out_lo32; + unsigned int total_out_hi32; + + void *state; + + void *(*bzalloc)(void *,int,int); + void (*bzfree)(void *,void *); + void *opaque; + } + bz_stream; + + +#ifndef BZ_IMPORT +#define BZ_EXPORT +#endif + +#ifndef BZ_NO_STDIO +/* Need a definitition for FILE */ +#include <stdio.h> +#endif + +#ifdef _WIN32 +# include <windows.h> +# ifdef small + /* windows.h define small to char */ +# undef small +# endif +# ifdef BZ_EXPORT +# define BZ_API(func) WINAPI func +# define BZ_EXTERN extern +# else + /* import windows dll dynamically */ +# define BZ_API(func) (WINAPI * func) +# define BZ_EXTERN +# endif +#else +# define BZ_API(func) func +# define BZ_EXTERN extern +#endif + + +/*-- Core (low-level) library functions --*/ + +BZ_EXTERN int BZ_API(BZ2_bzCompressInit) ( + bz_stream* strm, + int blockSize100k, + int verbosity, + int workFactor + ); + +BZ_EXTERN int BZ_API(BZ2_bzCompress) ( + bz_stream* strm, + int action + ); + +BZ_EXTERN int BZ_API(BZ2_bzCompressEnd) ( + bz_stream* strm + ); + +BZ_EXTERN int BZ_API(BZ2_bzDecompressInit) ( + bz_stream *strm, + int verbosity, + int small + ); + +BZ_EXTERN int BZ_API(BZ2_bzDecompress) ( + bz_stream* strm + ); + +BZ_EXTERN int BZ_API(BZ2_bzDecompressEnd) ( + bz_stream *strm + ); + + + +/*-- High(er) level library functions --*/ + +#ifndef BZ_NO_STDIO +#define BZ_MAX_UNUSED 5000 + typedef void BZFILE; - -BZ_EXTERN BZFILE* BZ_API(BZ2_bzReadOpen) ( - int* bzerror, - FILE* f, - int verbosity, - int small, - void* unused, - int nUnused - ); - -BZ_EXTERN void BZ_API(BZ2_bzReadClose) ( - int* bzerror, - BZFILE* b - ); - -BZ_EXTERN void BZ_API(BZ2_bzReadGetUnused) ( - int* bzerror, - BZFILE* b, - void** unused, - int* nUnused - ); - -BZ_EXTERN int BZ_API(BZ2_bzRead) ( - int* bzerror, - BZFILE* b, - void* buf, - int len - ); - -BZ_EXTERN BZFILE* BZ_API(BZ2_bzWriteOpen) ( - int* bzerror, - FILE* f, - int blockSize100k, - int verbosity, - int workFactor - ); - -BZ_EXTERN void BZ_API(BZ2_bzWrite) ( - int* bzerror, - BZFILE* b, - void* buf, - int len - ); - -BZ_EXTERN void BZ_API(BZ2_bzWriteClose) ( - int* bzerror, - BZFILE* b, - int abandon, - unsigned int* nbytes_in, - unsigned int* nbytes_out - ); - -BZ_EXTERN void BZ_API(BZ2_bzWriteClose64) ( - int* bzerror, - BZFILE* b, - int abandon, - unsigned int* nbytes_in_lo32, - unsigned int* nbytes_in_hi32, - unsigned int* nbytes_out_lo32, - unsigned int* nbytes_out_hi32 - ); -#endif - - -/*-- Utility functions --*/ - -BZ_EXTERN int BZ_API(BZ2_bzBuffToBuffCompress) ( - char* dest, - unsigned int* destLen, - char* source, - unsigned int sourceLen, - int blockSize100k, - int verbosity, - int workFactor - ); - -BZ_EXTERN int BZ_API(BZ2_bzBuffToBuffDecompress) ( - char* dest, - unsigned int* destLen, - char* source, - unsigned int sourceLen, - int small, - int verbosity - ); - - -/*-- - Code contributed by Yoshioka Tsuneo (ts...@rr...) - to support better zlib compatibility. - This code is not _officially_ part of libbzip2 (yet); - I haven't tested it, documented it, or considered the - threading-safeness of it. - If this code breaks, please contact both Yoshioka and me. ---*/ - -BZ_EXTERN const char * BZ_API(BZ2_bzlibVersion) ( - void - ); - -#ifndef BZ_NO_STDIO -BZ_EXTERN BZFILE * BZ_API(BZ2_bzopen) ( - const char *path, - const char *mode - ); - -BZ_EXTERN BZFILE * BZ_API(BZ2_bzdopen) ( - int fd, - const char *mode - ); - -BZ_EXTERN int BZ_API(BZ2_bzread) ( - BZFILE* b, - void* buf, - int len - ); - -BZ_EXTERN int BZ_API(BZ2_bzwrite) ( - BZFILE* b, - void* buf, - int len - ); - -BZ_EXTERN int BZ_API(BZ2_bzflush) ( - BZFILE* b - ); - -BZ_EXTERN void BZ_API(BZ2_bzclose) ( - BZFILE* b - ); - -BZ_EXTERN const char * BZ_API(BZ2_bzerror) ( - BZFILE *b, - int *errnum - ); -#endif - -#ifdef __cplusplus -} -#endif - -#endif - -/*-------------------------------------------------------------*/ -/*--- end bzlib.h ---*/ -/*-------------------------------------------------------------*/ + +BZ_EXTERN BZFILE* BZ_API(BZ2_bzReadOpen) ( + int* bzerror, + FILE* f, + int verbosity, + int small, + void* unused, + int nUnused + ); + +BZ_EXTERN void BZ_API(BZ2_bzReadClose) ( + int* bzerror, + BZFILE* b + ); + +BZ_EXTERN void BZ_API(BZ2_bzReadGetUnused) ( + int* bzerror, + BZFILE* b, + void** unused, + int* nUnused + ); + +BZ_EXTERN int BZ_API(BZ2_bzRead) ( + int* bzerror, + BZFILE* b, + void* buf, + int len + ); + +BZ_EXTERN BZFILE* BZ_API(BZ2_bzWriteOpen) ( + int* bzerror, + FILE* f, + int blockSize100k, + int verbosity, + int workFactor + ); + +BZ_EXTERN void BZ_API(BZ2_bzWrite) ( + int* bzerror, + BZFILE* b, + void* buf, + int len + ); + +BZ_EXTERN void BZ_API(BZ2_bzWriteClose) ( + int* bzerror, + BZFILE* b, + int abandon, + unsigned int* nbytes_in, + unsigned int* nbytes_out + ); + +BZ_EXTERN void BZ_API(BZ2_bzWriteClose64) ( + int* bzerror, + BZFILE* b, + int abandon, + unsigned int* nbytes_in_lo32, + unsigned int* nbytes_in_hi32, + unsigned int* nbytes_out_lo32, + unsigned int* nbytes_out_hi32 + ); +#endif + + +/*-- Utility functions --*/ + +BZ_EXTERN int BZ_API(BZ2_bzBuffToBuffCompress) ( + char* dest, + unsigned int* destLen, + char* source, + unsigned int sourceLen, + int blockSize100k, + int verbosity, + int workFactor + ); + +BZ_EXTERN int BZ_API(BZ2_bzBuffToBuffDecompress) ( + char* dest, + unsigned int* destLen, + char* source, + unsigned int sourceLen, + int small, + int verbosity + ); + + +/*-- + Code contributed by Yoshioka Tsuneo (ts...@rr...) + to support better zlib compatibility. + This code is not _officially_ part of libbzip2 (yet); + I haven't tested it, documented it, or considered the + threading-safeness of it. + If this code breaks, please contact both Yoshioka and me. +--*/ + +BZ_EXTERN const char * BZ_API(BZ2_bzlibVersion) ( + void + ); + +#ifndef BZ_NO_STDIO +BZ_EXTERN BZFILE * BZ_API(BZ2_bzopen) ( + const char *path, + const char *mode + ); + +BZ_EXTERN BZFILE * BZ_API(BZ2_bzdopen) ( + int fd, + const char *mode + ); + +BZ_EXTERN int BZ_API(BZ2_bzread) ( + BZFILE* b, + void* buf, + int len + ); + +BZ_EXTERN int BZ_API(BZ2_bzwrite) ( + BZFILE* b, + void* buf, + int len + ); + +BZ_EXTERN int BZ_API(BZ2_bzflush) ( + BZFILE* b + ); + +BZ_EXTERN void BZ_API(BZ2_bzclose) ( + BZFILE* b + ); + +BZ_EXTERN const char * BZ_API(BZ2_bzerror) ( + BZFILE *b, + int *errnum + ); +#endif + +#ifdef __cplusplus +} +#endif + +#endif + +/*-------------------------------------------------------------*/ +/*--- end bzlib.h ---*/ +/*-------------------------------------------------------------*/ Modified: trunk/lvzip/c_source/crypt.c =================================================================== --- trunk/lvzip/c_source/crypt.c 2018-12-12 11:22:02 UTC (rev 1567) +++ trunk/lvzip/c_source/crypt.c 2018-12-12 23:32:45 UTC (rev 1568) @@ -30,7 +30,8 @@ #ifdef _WIN32 # include <windows.h> -# include <wincrypt.h> +# define RtlGenRandom SystemFunction036 +BOOLEAN NTAPI RtlGenRandom(PVOID RandomBuffer, ULONG RandomBufferLength); #else # include <sys/stat.h> # include <fcntl.h> @@ -87,32 +88,26 @@ int cryptrand(unsigned char *buf, unsigned int len) { #ifdef _WIN32 - HCRYPTPROV provider; - unsigned __int64 pentium_tsc[1]; - int rlen = 0; - int result = 0; +#if !EMBEDDED + BOOL result = RtlGenRandom(buf, len); + if (!result) +#endif + { + unsigned __int64 pentium_tsc[1]; + int rlen; - - if (CryptAcquireContext(&provider, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT | CRYPT_SILENT)) - { - result = CryptGenRandom(provider, len, buf); - CryptReleaseContext(provider, 0); - if (result) - return len; - } - - for (rlen = 0; rlen < (int)len; ++rlen) - { - if (rlen % 8 == 0) - QueryPerformanceCounter((LARGE_INTEGER *)pentium_tsc); - buf[rlen] = ((unsigned char*)pentium_tsc)[rlen % 8]; - } - - return rlen; + for (rlen = 0; rlen < (int)len; ++rlen) + { + if (rlen % 8 == 0) + QueryPerformanceCounter((LARGE_INTEGER *)pentium_tsc); + buf[rlen] = ((unsigned char*)pentium_tsc)[rlen % 8]; + } + return rlen; + } #else arc4random_buf(buf, len); +#endif return len; -#endif } int crypthead(const char *passwd, uint8_t *buf, int buf_size, uint32_t *pkeys, Modified: trunk/lvzip/c_source/ioapi.c =================================================================== --- trunk/lvzip/c_source/ioapi.c 2018-12-12 11:22:02 UTC (rev 1567) +++ trunk/lvzip/c_source/ioapi.c 2018-12-12 23:32:45 UTC (rev 1568) @@ -63,6 +63,7 @@ return position; } +#ifndef WIN32 void fill_zlib_filefunc64_32_def_from_filefunc32(zlib_filefunc64_32_def *p_filefunc64_32, const zlib_filefunc_def *p_filefunc32) { p_filefunc64_32->zfile_func64.zopen64_file = NULL; @@ -352,3 +353,4 @@ pzlib_filefunc_def->zerror_file = ferror_file_func; pzlib_filefunc_def->opaque = NULL; } +#endif Modified: trunk/lvzip/c_source/lvapi.c =================================================================== --- trunk/lvzip/c_source/lvapi.c 2018-12-12 11:22:02 UTC (rev 1567) +++ trunk/lvzip/c_source/lvapi.c 2018-12-12 23:32:45 UTC (rev 1568) @@ -183,13 +183,13 @@ LibAPI(int) lvzlib_compress(Bytef *dest, uInt32 *destLen, const Bytef *source, uInt32 sourceLen, int level) { - return compress2(dest, destLen, source, sourceLen, level); + return compress2(dest, (uLong*)destLen, source, (uLong)sourceLen, level); } LibAPI(int) lvzlib_uncompress(Bytef *dest, uInt32 *destLen, const Bytef *source, uInt32 sourceLen) { - return uncompress(dest, destLen, source, sourceLen); + return uncompress(dest, (uLong*)destLen, source, (uLong)sourceLen); } LibAPI(uInt32) lvzlib_crc32(uInt32 crc, const Bytef *buf, uInt32 len) Modified: trunk/lvzip/c_source/lvutil.c =================================================================== --- trunk/lvzip/c_source/lvutil.c 2018-12-12 11:22:02 UTC (rev 1567) +++ trunk/lvzip/c_source/lvutil.c 2018-12-12 23:32:45 UTC (rev 1568) @@ -2810,7 +2810,7 @@ { zlib_filefunc64_def* pzlib_filefunc_def = (zlib_filefunc64_def*)LStrBuf(*filefunc_def); LStrLen(*filefunc_def) = sizeof(zlib_filefunc64_def); -#if Win32 && !defined(EMBEDDED) +#if Win32 fill_win32_filefunc64A(pzlib_filefunc_def); #else fill_fopen64_filefunc(pzlib_filefunc_def); Modified: trunk/lvzip/c_source/unzip.c =================================================================== --- trunk/lvzip/c_source/unzip.c 2018-12-12 11:22:02 UTC (rev 1567) +++ trunk/lvzip/c_source/unzip.c 2018-12-12 23:32:45 UTC (rev 1568) @@ -356,7 +356,11 @@ us.z_filefunc.ztell32_file = NULL; if (pzlib_filefunc64_32_def == NULL) - fill_fopen64_filefunc(&us.z_filefunc.zfile_func64); +#if WIN32 + fill_win32_filefunc64A(&us.z_filefunc.zfile_func64); +#else + fill_fopen64_filefunc(&us.z_filefunc.zfile_func64); +#endif else us.z_filefunc = *pzlib_filefunc64_32_def; @@ -495,6 +499,7 @@ return (unzFile)s; } +#if 0 extern unzFile ZEXPORT unzOpen2(const char *path, zlib_filefunc_def *pzlib_filefunc32_def) { if (pzlib_filefunc32_def != NULL) @@ -505,6 +510,7 @@ } return unzOpenInternal(path, NULL); } +#endif extern unzFile ZEXPORT unzOpen2_64(const void *path, zlib_filefunc64_def *pzlib_filefunc_def) { @@ -905,7 +911,7 @@ unz_file_info64 file_info64; int err = UNZ_OK; - err = unzGetCurrentFileInfoInternal(file, pfile_info ? &file_info64 : NULL, NULL, filename, filename_size, + err = unzGetCurrentFileInfoInternal(file, &file_info64, NULL, filename, filename_size, extrafield, extrafield_size, comment, comment_size); if ((err == UNZ_OK) && (pfile_info != NULL)) Modified: trunk/lvzip/c_source/unzip.h =================================================================== --- trunk/lvzip/c_source/unzip.h 2018-12-12 11:22:02 UTC (rev 1567) +++ trunk/lvzip/c_source/unzip.h 2018-12-12 23:32:45 UTC (rev 1568) @@ -29,7 +29,10 @@ #ifndef _ZLIBIOAPI_H #include "ioapi.h" +#if WIN32 +#include "iowin.h" #endif +#endif #ifdef HAVE_BZIP2 #include "bzlib.h" Modified: trunk/lvzip/c_source/zip.c =================================================================== --- trunk/lvzip/c_source/zip.c 2018-12-12 11:22:02 UTC (rev 1567) +++ trunk/lvzip/c_source/zip.c 2018-12-12 23:32:45 UTC (rev 1568) @@ -622,8 +622,12 @@ ziinit.z_filefunc.ztell32_file = NULL; if (pzlib_filefunc64_32_def == NULL) +#if WIN32 + fill_win32_filefunc64A(&ziinit.z_filefunc.zfile_func64); +#else fill_fopen64_filefunc(&ziinit.z_filefunc.zfile_func64); - else +#endif + else ziinit.z_filefunc = *pzlib_filefunc64_32_def; if (append == APPEND_STATUS_CREATE) @@ -847,19 +851,7 @@ return(zipFile)zi; } -extern zipFile ZEXPORT zipOpen2(const char *path, int append, const char **globalcomment, - zlib_filefunc_def *pzlib_filefunc32_def) -{ - if (pzlib_filefunc32_def != NULL) - { - zlib_filefunc64_32_def zlib_filefunc64_32_def_fill; - fill_zlib_filefunc64_32_def_from_filefunc32(&zlib_filefunc64_32_def_fill,pzlib_filefunc32_def); - return zipOpen4(path, append, 0, globalcomment, &zlib_filefunc64_32_def_fill); - } - return zipOpen4(path, append, 0, globalcomment, NULL); -} - -extern zipFile ZEXPORT zipOpen2_64(const void *path, int append, const char **globalcomment, +extern zipFile ZEXPORT zipOpen3_64(const void *path, int append, uint64_t disk_size, const char **globalcomment, zlib_filefunc64_def *pzlib_filefunc_def) { if (pzlib_filefunc_def != NULL) @@ -868,11 +860,12 @@ zlib_filefunc64_32_def_fill.zfile_func64 = *pzlib_filefunc_def; zlib_filefunc64_32_def_fill.ztell32_file = NULL; zlib_filefunc64_32_def_fill.zseek32_file = NULL; - return zipOpen4(path, append, 0, globalcomment, &zlib_filefunc64_32_def_fill); + return zipOpen4(path, append, disk_size, globalcomment, &zlib_filefunc64_32_def_fill); } - return zipOpen4(path, append, 0, globalcomment, NULL); + return zipOpen4(path, append, disk_size, globalcomment, NULL); } +#if 0 extern zipFile ZEXPORT zipOpen3(const char *path, int append, uint64_t disk_size, const char **globalcomment, zlib_filefunc_def *pzlib_filefunc32_def) { @@ -885,7 +878,19 @@ return zipOpen4(path, append, disk_size, globalcomment, NULL); } -extern zipFile ZEXPORT zipOpen3_64(const void *path, int append, uint64_t disk_size, const char **globalcomment, +extern zipFile ZEXPORT zipOpen2(const char *path, int append, const char **globalcomment, + zlib_filefunc_def *pzlib_filefunc32_def) +{ + if (pzlib_filefunc32_def != NULL) + { + zlib_filefunc64_32_def zlib_filefunc64_32_def_fill; + fill_zlib_filefunc64_32_def_from_filefunc32(&zlib_filefunc64_32_def_fill,pzlib_filefunc32_def); + return zipOpen4(path, append, 0, globalcomment, &zlib_filefunc64_32_def_fill); + } + return zipOpen4(path, append, 0, globalcomment, NULL); +} + +extern zipFile ZEXPORT zipOpen2_64(const void *path, int append, const char **globalcomment, zlib_filefunc64_def *pzlib_filefunc_def) { if (pzlib_filefunc_def != NULL) @@ -894,9 +899,9 @@ zlib_filefunc64_32_def_fill.zfile_func64 = *pzlib_filefunc_def; zlib_filefunc64_32_def_fill.ztell32_file = NULL; zlib_filefunc64_32_def_fill.zseek32_file = NULL; - return zipOpen4(path, append, disk_size, globalcomment, &zlib_filefunc64_32_def_fill); + return zipOpen4(path, append, 0, globalcomment, &zlib_filefunc64_32_def_fill); } - return zipOpen4(path, append, disk_size, globalcomment, NULL); + return zipOpen4(path, append, 0, globalcomment, NULL); } extern zipFile ZEXPORT zipOpen(const char *path, int append) @@ -908,6 +913,7 @@ { return zipOpen3(path, append, 0, NULL, NULL); } +#endif extern int ZEXPORT zipOpenNewFileInZip_internal(zipFile file, const char *filename, Modified: trunk/lvzip/c_source/zip.h =================================================================== --- trunk/lvzip/c_source/zip.h 2018-12-12 11:22:02 UTC (rev 1567) +++ trunk/lvzip/c_source/zip.h 2018-12-12 23:32:45 UTC (rev 1568) @@ -27,6 +27,9 @@ #ifndef _ZLIBIOAPI_H # include "ioapi.h" +# if WIN32 +# include "iowin.h" +# endif #endif #ifdef HAVE_BZIP2 Modified: trunk/lvzip/c_source/zlibvc.dsp =================================================================== --- trunk/lvzip/c_source/zlibvc.dsp 2018-12-12 11:22:02 UTC (rev 1567) +++ trunk/lvzip/c_source/zlibvc.dsp 2018-12-12 23:32:45 UTC (rev 1568) @@ -115,7 +115,7 @@ LIB32=link.exe -lib CPP=cl.exe # ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "NO_vsnprintf" /D "HAVE_BZIP2" /D "BZ_NO_STDIO" /D "EMBEDDED" /FD /c -# ADD CPP /nologo /MD /W3 /O2 /I "bzip2" /D "WIN32" /D "NDEBUG" /D "NO_vsnprintf" /D "HAVE_AES" /D "HAVE_BZIP2" /D "BZ_NO_STDIO" /D "EMBEDDED" /FR /FD /c +# ADD CPP /nologo /MT /W3 /O2 /I "bzip2" /D "WIN32" /D "NDEBUG" /D "NO_vsnprintf" /D "HAVE_AES" /D "HAVE_BZIP2" /D "BZ_NO_STDIO" /D "EMBEDDED" /FR /FD /c # SUBTRACT CPP /YX /Yc /Yu MTL=midl.exe # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 @@ -128,7 +128,8 @@ # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 /nologo /subsystem:windows /dll /pdb:none /machine:I386 -# ADD LINK32 advapi32.lib user32.lib kernel32.lib /nologo /subsystem:windows /dll /pdb:none /machine:I386 /out:"Win32_DLL_Embedded\lvzlib.dll" +# ADD LINK32 advapi32.lib msvcrt.lib user32.lib kernel32.lib /nologo /subsystem:windows /dll /pdb:none /machine:I386 /out:"Win32_DLL_Embedded\lvzlib.dll" +# SUBTRACT LINK32 /nodefaultlib !ELSEIF "$(CFG)" == "zlibvc - Win32 DLL ASM Release" @@ -423,6 +424,10 @@ # End Source File # Begin Source File +SOURCE=.\gzguts.h +# End Source File +# Begin Source File + SOURCE=.\inffast.h # End Source File # Begin Source File @@ -451,6 +456,10 @@ # End Source File # Begin Source File +SOURCE=.\lvapi.h +# End Source File +# Begin Source File + SOURCE=.\lvutil.h # End Source File # Begin Source File @@ -729,18 +738,6 @@ # End Source File # Begin Source File -SOURCE=.\aes\aes_ni.c -# End Source File -# Begin Source File - -SOURCE=.\aes\aes_ni.h -# End Source File -# Begin Source File - -SOURCE=.\aes\aes_via_ace.h -# End Source File -# Begin Source File - SOURCE=.\aes\aescrypt.c # End Source File # Begin Source File @@ -769,14 +766,6 @@ # End Source File # Begin Source File -SOURCE=.\aes\entropy.c -# End Source File -# Begin Source File - -SOURCE=.\aes\entropy.h -# End Source File -# Begin Source File - SOURCE=.\aes\fileenc.c # End Source File # Begin Source File Modified: trunk/lvzip/c_source/zlibvc.vcproj =================================================================== --- trunk/lvzip/c_source/zlibvc.vcproj 2018-12-12 11:22:02 UTC (rev 1567) +++ trunk/lvzip/c_source/zlibvc.vcproj 2018-12-12 23:32:45 UTC (rev 1568) @@ -2625,14 +2625,6 @@ > </File> <File - RelativePath=".\aes\entropy.c" - > - </File> - <File - RelativePath=".\aes\entropy.h" - > - </File> - <File RelativePath=".\aes\fileenc.c" > </File> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lab...@us...> - 2018-12-12 11:22:04
|
Revision: 1567 http://sourceforge.net/p/opengtoolkit/svn/1567 Author: labviewer Date: 2018-12-12 11:22:02 +0000 (Wed, 12 Dec 2018) Log Message: ----------- minor edit for MSC 6 Modified Paths: -------------- trunk/lvzip/c_source/zlib.h trunk/lvzip/c_source/zlibvc.dsp Modified: trunk/lvzip/c_source/zlib.h =================================================================== --- trunk/lvzip/c_source/zlib.h 2018-12-12 11:01:51 UTC (rev 1566) +++ trunk/lvzip/c_source/zlib.h 2018-12-12 11:22:02 UTC (rev 1567) @@ -1780,21 +1780,6 @@ unsigned char FAR *window, const char *version, int stream_size)); -//#ifdef Z_PREFIX_SET -//# define lvzip_deflateInit(strm, level) \ -// deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream)) -//# define lvzip_inflateInit(strm) \ -// inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream)) -//# define lvzip_deflateInit2(strm, level, method, windowBits, memLevel, strategy) \ -// deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\ -// (strategy), ZLIB_VERSION, (int)sizeof(z_stream)) -//# define lvzip_inflateInit2(strm, windowBits) \ -// inflateInit2_((strm), (windowBits), ZLIB_VERSION, \ -// (int)sizeof(z_stream)) -//# define lvzip_inflateBackInit(strm, windowBits, window) \ -// inflateBackInit_((strm), (windowBits), (window), \ -// ZLIB_VERSION, (int)sizeof(z_stream)) -//#else # define deflateInit(strm, level) \ deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream)) # define inflateInit(strm) \ @@ -1808,7 +1793,6 @@ # define inflateBackInit(strm, windowBits, window) \ inflateBackInit_((strm), (windowBits), (window), \ ZLIB_VERSION, (int)sizeof(z_stream)) -//#endif #ifndef Z_SOLO Modified: trunk/lvzip/c_source/zlibvc.dsp =================================================================== --- trunk/lvzip/c_source/zlibvc.dsp 2018-12-12 11:01:51 UTC (rev 1566) +++ trunk/lvzip/c_source/zlibvc.dsp 2018-12-12 11:22:02 UTC (rev 1567) @@ -50,7 +50,7 @@ LIB32=link.exe -lib CPP=cl.exe # ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "NO_vsnprintf" /D "HAVE_AES" /D "HAVE_BZIP2" /D "BZ_NO_STDIO" /FD /c -# ADD CPP /nologo /MD /W3 /O2 /I "bzip2" /D "WIN32" /D "NDEBUG" /D "NO_vsnprintf" /D "HAVE_AES" /D "HAVE_BZIP2" /D "BZ_NO_STDIO" /D "ZLIB_DLL" /FD /c +# ADD CPP /nologo /MD /W3 /O2 /I "bzip2" /D "WIN32" /D "NDEBUG" /D "NO_vsnprintf" /D "HAVE_AES" /D "HAVE_BZIP2" /D "BZ_NO_STDIO" /FD /c # SUBTRACT CPP /YX /Yc /Yu MTL=midl.exe # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 @@ -63,7 +63,7 @@ # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 /nologo /subsystem:windows /dll /pdb:none /machine:I386 -# ADD LINK32 user32.lib kernel32.lib /nologo /subsystem:windows /dll /pdb:none /machine:I386 /out:"Win32_DLL_Release\lvzlib.dll" +# ADD LINK32 advapi32.lib user32.lib kernel32.lib ole32.lib /nologo /subsystem:windows /dll /pdb:none /machine:I386 /out:"Win32_DLL_Release\lvzlib.dll" !ELSEIF "$(CFG)" == "zlibvc - Win32 DLL Debug" @@ -82,7 +82,7 @@ LIB32=link.exe -lib CPP=cl.exe # ADD BASE CPP /nologo /MDd /W3 /Od /D "WIN32" /D "_DEBUG" /D "NO_vsnprintf" /D "HAVE_AES" /D "HAVE_BZIP2" /D "BZ_NO_STDIO" /FD /c -# ADD CPP /nologo /MDd /W3 /ZI /Od /D "WIN32" /D "_DEBUG" /D "NO_vsnprintf" /D "HAVE_AES" /D "HAVE_BZIP2" /D "BZ_NO_STDIO" /D "ZLIB_DLL" /FR /FD /c +# ADD CPP /nologo /MDd /W3 /ZI /Od /I "bzip2" /D "WIN32" /D "_DEBUG" /D "NO_vsnprintf" /D "HAVE_AES" /D "HAVE_BZIP2" /D "BZ_NO_STDIO" /FR /FD /c # SUBTRACT CPP /YX /Yc /Yu MTL=midl.exe # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 @@ -95,7 +95,7 @@ # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 /nologo /subsystem:windows /dll /debug /machine:I386 -# ADD LINK32 user32.lib kernel32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /nodefaultlib:"msvcrt" /out:"Win32_DLL_Debug\lvzlib.dll" +# ADD LINK32 advapi32.lib user32.lib kernel32.lib ole32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /nodefaultlib:"msvcrt" /out:"Win32_DLL_Debug\lvzlib.dll" # SUBTRACT LINK32 /incremental:no !ELSEIF "$(CFG)" == "zlibvc - Win32 DLL Embedded" @@ -115,7 +115,7 @@ LIB32=link.exe -lib CPP=cl.exe # ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "NO_vsnprintf" /D "HAVE_BZIP2" /D "BZ_NO_STDIO" /D "EMBEDDED" /FD /c -# ADD CPP /nologo /MD /W3 /O2 /I "bzip2" /D "WIN32" /D "NDEBUG" /D "NO_vsnprintf" /D "HAVE_BZIP2" /D "HAVE_AES" /D "EMBEDDED" /D "ZLIB_DLL" /FR /FD /c +# ADD CPP /nologo /MD /W3 /O2 /I "bzip2" /D "WIN32" /D "NDEBUG" /D "NO_vsnprintf" /D "HAVE_AES" /D "HAVE_BZIP2" /D "BZ_NO_STDIO" /D "EMBEDDED" /FR /FD /c # SUBTRACT CPP /YX /Yc /Yu MTL=midl.exe # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lab...@us...> - 2018-12-12 11:01:53
|
Revision: 1566 http://sourceforge.net/p/opengtoolkit/svn/1566 Author: labviewer Date: 2018-12-12 11:01:51 +0000 (Wed, 12 Dec 2018) Log Message: ----------- Various cleanups for to make everything compile in MSC 6.0 too Modified Paths: -------------- trunk/lvzip/c_source/crypt.c trunk/lvzip/c_source/ioapi.h trunk/lvzip/c_source/iomem.c trunk/lvzip/c_source/iowin.c trunk/lvzip/c_source/lvapi.c trunk/lvzip/c_source/lvapi.h trunk/lvzip/c_source/lvutil.c trunk/lvzip/c_source/mztools.c trunk/lvzip/c_source/mztools.h trunk/lvzip/c_source/unzip.c trunk/lvzip/c_source/zalias.h trunk/lvzip/c_source/zconf.h trunk/lvzip/c_source/zip.c trunk/lvzip/c_source/zlib.h trunk/lvzip/c_source/zlibvc.dsp trunk/lvzip/c_source/zlibvc.vcproj Modified: trunk/lvzip/c_source/crypt.c =================================================================== --- trunk/lvzip/c_source/crypt.c 2018-12-12 11:00:57 UTC (rev 1565) +++ trunk/lvzip/c_source/crypt.c 2018-12-12 11:01:51 UTC (rev 1566) @@ -26,7 +26,6 @@ #include <stdio.h> #include <stdlib.h> -#include <stdint.h> #include <time.h> #ifdef _WIN32 Modified: trunk/lvzip/c_source/ioapi.h =================================================================== --- trunk/lvzip/c_source/ioapi.h 2018-12-12 11:00:57 UTC (rev 1565) +++ trunk/lvzip/c_source/ioapi.h 2018-12-12 11:01:51 UTC (rev 1566) @@ -18,7 +18,6 @@ #include <stdio.h> #include <stdlib.h> -#include <stdint.h> #include "zlib.h" Modified: trunk/lvzip/c_source/iomem.c =================================================================== --- trunk/lvzip/c_source/iomem.c 2018-12-12 11:00:57 UTC (rev 1565) +++ trunk/lvzip/c_source/iomem.c 2018-12-12 11:01:51 UTC (rev 1566) @@ -134,9 +134,9 @@ return mFullErr; if (offset + *size > 0x7FFFFFFF) - *size = (uLong)(0x7FFFFFFF - offset); + *size = 0x7FFFFFFF - offset; - if ((uint32_t)DSGetHandleSize((UHandle)handle) < (offset + *size + sizeof(int32))) + if ((uInt32)DSGetHandleSize((UHandle)handle) < (offset + *size + sizeof(int32))) { MgErr err = fEOF; Modified: trunk/lvzip/c_source/iowin.c =================================================================== --- trunk/lvzip/c_source/iowin.c 2018-12-12 11:00:57 UTC (rev 1565) +++ trunk/lvzip/c_source/iowin.c 2018-12-12 11:01:51 UTC (rev 1566) @@ -157,7 +157,7 @@ { if (diskFilename[i] != '.') continue; - swprintf(&diskFilename[i], w32fiow->filenameLength - i, L".z%02d", number_disk + 1); + swnprintf(&diskFilename[i], w32fiow->filenameLength - i, L".z%02d", number_disk + 1); break; } if (i >= 0) Modified: trunk/lvzip/c_source/lvapi.c =================================================================== --- trunk/lvzip/c_source/lvapi.c 2018-12-12 11:00:57 UTC (rev 1565) +++ trunk/lvzip/c_source/lvapi.c 2018-12-12 11:01:51 UTC (rev 1566) @@ -180,14 +180,14 @@ return version; } -LibAPI(int) lvzlib_compress(Bytef *dest, uLongf *destLen, - const Bytef *source, uLong sourceLen, int level) +LibAPI(int) lvzlib_compress(Bytef *dest, uInt32 *destLen, + const Bytef *source, uInt32 sourceLen, int level) { return compress2(dest, destLen, source, sourceLen, level); } -LibAPI(int) lvzlib_uncompress(Bytef *dest, uLongf *destLen, - const Bytef *source, uLong sourceLen) +LibAPI(int) lvzlib_uncompress(Bytef *dest, uInt32 *destLen, + const Bytef *source, uInt32 sourceLen) { return uncompress(dest, destLen, source, sourceLen); } @@ -236,7 +236,7 @@ LibAPI(MgErr) lvzlib_zipOpenNewFileInZip(LVRefNum *refnum, LStrHandle filename, const zip_fileinfo* zipfi, const LStrHandle extrafield_local, const LStrHandle extrafield_global, LStrHandle comment, int method, int level, int raw, int windowBits, - int memLevel, int strategy, const char* password, uLong crcForCrypting, uLong version, uLong flags, int zip64) + int memLevel, int strategy, const char* password, uInt32 crcForCrypting, uInt32 version, uInt32 flags, int zip64) { zipFile node; MgErr err = lvzlibGetRefnum(refnum, &node, ZipMagic); Modified: trunk/lvzip/c_source/lvapi.h =================================================================== --- trunk/lvzip/c_source/lvapi.h 2018-12-12 11:00:57 UTC (rev 1565) +++ trunk/lvzip/c_source/lvapi.h 2018-12-12 11:01:51 UTC (rev 1566) @@ -31,14 +31,14 @@ #ifndef lvzip_lvapi_h #define lvzip_lvapi_h LibAPI(const char *) lvzlib_zlibVersion(void); -LibAPI(int) lvzlib_compress(Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen, int level); -LibAPI(int) lvzlib_uncompress(Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen); +LibAPI(int) lvzlib_compress(Bytef *dest, uInt32 *destLen, const Bytef *source, uInt32 sourceLen, int level); +LibAPI(int) lvzlib_uncompress(Bytef *dest, uInt32 *destLen, const Bytef *source, uInt32 sourceLen); LibAPI(uInt32) lvzlib_crc32(uInt32 crc, const Bytef *buf, uInt32 len); LibAPI(MgErr) lvzlib_zipOpen(const void *pathname, int append, LStrHandle *globalcomment, zlib_filefunc64_def* filefuncs, LVRefNum *refnum); LibAPI(MgErr) lvzlib_zipOpenNewFileInZip(LVRefNum *refnum, LStrHandle filename, const zip_fileinfo* zipfi, const LStrHandle extrafield_local, const LStrHandle extrafield_global, LStrHandle comment, int method, int level, int raw, int windowBits, - int memLevel, int strategy, const char* password, uLong crcForCrypting, uLong version, uLong flags, int zip64); + int memLevel, int strategy, const char* password, uInt32 crcForCrypting, uInt32 version, uInt32 flags, int zip64); LibAPI(MgErr) lvzlib_zipWriteInFileInZip(LVRefNum *refnum, const LStrHandle buffer); LibAPI(MgErr) lvzlib_zipCloseFileInZipRaw32(LVRefNum *refnum, uInt32 uncompressedSize, uInt32 crc32); LibAPI(MgErr) lvzlib_zipCloseFileInZipRaw64(LVRefNum *refnum, uInt64 uncompressedSize, uInt32 crc32); Modified: trunk/lvzip/c_source/lvutil.c =================================================================== --- trunk/lvzip/c_source/lvutil.c 2018-12-12 11:00:57 UTC (rev 1565) +++ trunk/lvzip/c_source/lvutil.c 2018-12-12 11:01:51 UTC (rev 1566) @@ -687,6 +687,7 @@ return noErr; } +#if !EMBEDDED LibAPI(MgErr) Win32ResolveShortCut(UStrPtr wStr, UStrPtr *wTgt, Bool32 recursive, DWORD *dwAttrs) { HRESULT err = noErr; @@ -940,6 +941,7 @@ return err; } #endif +#endif LibAPI(MgErr) LVPath_ListDirectory(Path folderPath, LStrArrHdl *nameArr, FileInfoArrHdl *typeArr) { Modified: trunk/lvzip/c_source/mztools.c =================================================================== --- trunk/lvzip/c_source/mztools.c 2018-12-12 11:00:57 UTC (rev 1565) +++ trunk/lvzip/c_source/mztools.c 2018-12-12 11:01:51 UTC (rev 1566) @@ -28,7 +28,7 @@ WRITE_16((unsigned char*)(buff) + 2, (n) >> 16); \ } while(0) -ZEXTERN int ZEXPORT unzRepair(const char* file, const char* fileOut, const char* fileOutTmp, uLong* nRecovered, uLong* bytesRecovered) +extern int ZEXPORT unzRepair(const char* file, const char* fileOut, const char* fileOutTmp, uLong* nRecovered, uLong* bytesRecovered) { int err = Z_OK; FILE* fpZip = fopen(file, "rb"); Modified: trunk/lvzip/c_source/mztools.h =================================================================== --- trunk/lvzip/c_source/mztools.h 2018-12-12 11:00:57 UTC (rev 1565) +++ trunk/lvzip/c_source/mztools.h 2018-12-12 11:01:51 UTC (rev 1566) @@ -22,7 +22,7 @@ fileOut: output file after recovery fileOutTmp: temporary file name used for recovery */ -ZEXTERN int ZEXPORT unzRepair OF((const char* file, const char* fileOut, const char* fileOutTmp, uLong* nRecovered, uLong* bytesRecovered)); +extern int ZEXPORT unzRepair OF((const char* file, const char* fileOut, const char* fileOutTmp, uLong* nRecovered, uLong* bytesRecovered)); #ifdef __cplusplus Modified: trunk/lvzip/c_source/unzip.c =================================================================== --- trunk/lvzip/c_source/unzip.c 2018-12-12 11:00:57 UTC (rev 1565) +++ trunk/lvzip/c_source/unzip.c 2018-12-12 11:01:51 UTC (rev 1566) @@ -19,7 +19,6 @@ #include <stdio.h> #include <stdlib.h> -#include <stdint.h> #include <string.h> #include <errno.h> Modified: trunk/lvzip/c_source/zalias.h =================================================================== --- trunk/lvzip/c_source/zalias.h 2018-12-12 11:00:57 UTC (rev 1565) +++ trunk/lvzip/c_source/zalias.h 2018-12-12 11:01:51 UTC (rev 1566) @@ -50,8 +50,8 @@ #define deflateBound lvzip_deflateBound #define deflateCopy lvzip_deflateCopy #define deflateEnd lvzip_deflateEnd -#define deflateInit lvzip_deflateInit -#define deflateInit2 lvzip_deflateInit2 +#define deflateInit_ lvzip_deflateInit +#define deflateInit2_ lvzip_deflateInit2 #define deflateParams lvzip_deflateParams #define deflatePrime lvzip_deflatePrime #define deflateReset lvzip_deflateReset @@ -64,13 +64,13 @@ #define inflate_table lvzip_inflate_table #define inflateBack lvzip_inflateBack #define inflateBackEnd lvzip_inflateBackEnd -#define inflateBackInit lvzip_inflateBackInit +#define inflateBackInit_ lvzip_inflateBackInit #define inflateCopy lvzip_inflateCopy #define inflateEnd lvzip_inflateEnd #define inflateGetHeader lvzip_inflateGetHeader #define inflate_fast lvzip_inflate_fast -#define inflateInit lvzip_inflateInit -#define inflateInit2 lvzip_inflateInit2 +#define inflateInit_ lvzip_inflateInit +#define inflateInit2_ lvzip_inflateInit2 #define inflateMark lvzip_inflateMark #define inflatePrime lvzip_inflatePrime #define inflateReset lvzip_inflateReset @@ -178,3 +178,19 @@ #define gzoffset64 lvzip_gzoffset64 #define gcrc32_combine lvzip_gcrc32_combine #define gcrc32_combine64 lvzip_gcrc32_combine64 + +/* Do some standard C type finicking for compilers that do not support the _t standard types */ +#if defined(_MSC_VER) && (_MSC_VER < 1300) +typedef char int8_t; +typedef unsigned char uint8_t; +typedef short int16_t; +typedef unsigned short uint16_t; +typedef int int32_t; +typedef unsigned int uint32_t; +typedef __int64 int64_t; +typedef unsigned __int64 uint64_t; +typedef int ssize_t; +typedef unsigned int size_t; +#else +#include <stdint.h> +#endif Modified: trunk/lvzip/c_source/zconf.h =================================================================== --- trunk/lvzip/c_source/zconf.h 2018-12-12 11:00:57 UTC (rev 1565) +++ trunk/lvzip/c_source/zconf.h 2018-12-12 11:01:51 UTC (rev 1566) @@ -512,7 +512,14 @@ # else # define z_off64_t z_off_t # endif -#endif +#endif + +/* Microsoft used a non standard function signature for old MSC compilers */ +#if defined(_MSC_VER) && (_MSC_VER < 1300) +#define swnprintf _snwprintf +#else +#define swnprintf swprintf +#endif /* MVS linker does not support external names larger than 8 bytes */ #if defined(__MVS__) Modified: trunk/lvzip/c_source/zip.c =================================================================== --- trunk/lvzip/c_source/zip.c 2018-12-12 11:00:57 UTC (rev 1565) +++ trunk/lvzip/c_source/zip.c 2018-12-12 11:01:51 UTC (rev 1566) @@ -17,7 +17,6 @@ #include <stdio.h> #include <stdlib.h> -#include <stdint.h> #include <string.h> #include <errno.h> Modified: trunk/lvzip/c_source/zlib.h =================================================================== --- trunk/lvzip/c_source/zlib.h 2018-12-12 11:00:57 UTC (rev 1565) +++ trunk/lvzip/c_source/zlib.h 2018-12-12 11:01:51 UTC (rev 1566) @@ -31,8 +31,6 @@ #ifndef ZLIB_H #define ZLIB_H -#include <stdint.h> - #include "zalias.h" #include "zconf.h" @@ -1782,21 +1780,21 @@ unsigned char FAR *window, const char *version, int stream_size)); -#ifdef Z_PREFIX_SET -# define lvzip_deflateInit(strm, level) \ - deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream)) -# define lvzip_inflateInit(strm) \ - inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream)) -# define lvzip_deflateInit2(strm, level, method, windowBits, memLevel, strategy) \ - deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\ - (strategy), ZLIB_VERSION, (int)sizeof(z_stream)) -# define lvzip_inflateInit2(strm, windowBits) \ - inflateInit2_((strm), (windowBits), ZLIB_VERSION, \ - (int)sizeof(z_stream)) -# define lvzip_inflateBackInit(strm, windowBits, window) \ - inflateBackInit_((strm), (windowBits), (window), \ - ZLIB_VERSION, (int)sizeof(z_stream)) -#else +//#ifdef Z_PREFIX_SET +//# define lvzip_deflateInit(strm, level) \ +// deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream)) +//# define lvzip_inflateInit(strm) \ +// inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream)) +//# define lvzip_deflateInit2(strm, level, method, windowBits, memLevel, strategy) \ +// deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\ +// (strategy), ZLIB_VERSION, (int)sizeof(z_stream)) +//# define lvzip_inflateInit2(strm, windowBits) \ +// inflateInit2_((strm), (windowBits), ZLIB_VERSION, \ +// (int)sizeof(z_stream)) +//# define lvzip_inflateBackInit(strm, windowBits, window) \ +// inflateBackInit_((strm), (windowBits), (window), \ +// ZLIB_VERSION, (int)sizeof(z_stream)) +//#else # define deflateInit(strm, level) \ deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream)) # define inflateInit(strm) \ @@ -1810,7 +1808,7 @@ # define inflateBackInit(strm, windowBits, window) \ inflateBackInit_((strm), (windowBits), (window), \ ZLIB_VERSION, (int)sizeof(z_stream)) -#endif +//#endif #ifndef Z_SOLO Modified: trunk/lvzip/c_source/zlibvc.dsp =================================================================== --- trunk/lvzip/c_source/zlibvc.dsp 2018-12-12 11:00:57 UTC (rev 1565) +++ trunk/lvzip/c_source/zlibvc.dsp 2018-12-12 11:01:51 UTC (rev 1566) @@ -50,7 +50,7 @@ LIB32=link.exe -lib CPP=cl.exe # ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "NO_vsnprintf" /D "HAVE_AES" /D "HAVE_BZIP2" /D "BZ_NO_STDIO" /FD /c -# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "NO_vsnprintf" /D "HAVE_AES" /D "HAVE_BZIP2" /D "BZ_NO_STDIO" /D "ZLIB_DLL" /FD /c +# ADD CPP /nologo /MD /W3 /O2 /I "bzip2" /D "WIN32" /D "NDEBUG" /D "NO_vsnprintf" /D "HAVE_AES" /D "HAVE_BZIP2" /D "BZ_NO_STDIO" /D "ZLIB_DLL" /FD /c # SUBTRACT CPP /YX /Yc /Yu MTL=midl.exe # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 @@ -115,7 +115,7 @@ LIB32=link.exe -lib CPP=cl.exe # ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "NO_vsnprintf" /D "HAVE_BZIP2" /D "BZ_NO_STDIO" /D "EMBEDDED" /FD /c -# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "NO_vsnprintf" /D "HAVE_BZIP2" /D "BZ_NO_STDIO" /D "EMBEDDED" /D "ZLIB_DLL" /FD /c +# ADD CPP /nologo /MD /W3 /O2 /I "bzip2" /D "WIN32" /D "NDEBUG" /D "NO_vsnprintf" /D "HAVE_BZIP2" /D "HAVE_AES" /D "EMBEDDED" /D "ZLIB_DLL" /FR /FD /c # SUBTRACT CPP /YX /Yc /Yu MTL=midl.exe # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 @@ -128,7 +128,7 @@ # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 /nologo /subsystem:windows /dll /pdb:none /machine:I386 -# ADD LINK32 user32.lib kernel32.lib /nologo /subsystem:windows /dll /pdb:none /machine:I386 /out:"Win32_DLL_Embedded\lvzlib.dll" +# ADD LINK32 advapi32.lib user32.lib kernel32.lib /nologo /subsystem:windows /dll /pdb:none /machine:I386 /out:"Win32_DLL_Embedded\lvzlib.dll" !ELSEIF "$(CFG)" == "zlibvc - Win32 DLL ASM Release" @@ -325,6 +325,10 @@ # End Source File # Begin Source File +SOURCE=.\crypt.c +# End Source File +# Begin Source File + SOURCE=.\deflate.c # End Source File # Begin Source File @@ -391,6 +395,10 @@ # End Source File # Begin Source File +SOURCE=.\utf.c +# End Source File +# Begin Source File + SOURCE=.\zip.c # End Source File # Begin Source File @@ -463,6 +471,10 @@ # End Source File # Begin Source File +SOURCE=.\utf.h +# End Source File +# Begin Source File + SOURCE=.\zalias.h # End Source File # Begin Source File @@ -509,6 +521,8 @@ # PROP Exclude_From_Build 1 +!ELSEIF "$(CFG)" == "zlibvc - Win32 DLL Embedded" + !ELSEIF "$(CFG)" == "zlibvc - Win32 DLL ASM Release" # Begin Custom Build - Assembling... @@ -574,6 +588,8 @@ # PROP Exclude_From_Build 1 +!ELSEIF "$(CFG)" == "zlibvc - Win32 DLL Embedded" + !ELSEIF "$(CFG)" == "zlibvc - Win32 DLL ASM Release" # PROP BASE Exclude_From_Build 1 @@ -608,6 +624,8 @@ # PROP Exclude_From_Build 1 +!ELSEIF "$(CFG)" == "zlibvc - Win32 DLL Embedded" + !ELSEIF "$(CFG)" == "zlibvc - Win32 DLL ASM Release" # Begin Custom Build - Assembling... @@ -662,8 +680,144 @@ # End Source File # End Group +# Begin Group "bzip2" + +# PROP Default_Filter "" # Begin Source File +SOURCE=.\bzip2\blocksort.c +# End Source File +# Begin Source File + +SOURCE=.\bzip2\bzcompress.c +# End Source File +# Begin Source File + +SOURCE=.\bzip2\bzlib.c +# End Source File +# Begin Source File + +SOURCE=.\bzip2\bzlib.h +# End Source File +# Begin Source File + +SOURCE=.\bzip2\bzlib_private.h +# End Source File +# Begin Source File + +SOURCE=.\bzip2\crctable.c +# End Source File +# Begin Source File + +SOURCE=.\bzip2\decompress.c +# End Source File +# Begin Source File + +SOURCE=.\bzip2\huffman.c +# End Source File +# Begin Source File + +SOURCE=.\bzip2\randtable.c +# End Source File +# End Group +# Begin Group "AES" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\aes\aes.h +# End Source File +# Begin Source File + +SOURCE=.\aes\aes_ni.c +# End Source File +# Begin Source File + +SOURCE=.\aes\aes_ni.h +# End Source File +# Begin Source File + +SOURCE=.\aes\aes_via_ace.h +# End Source File +# Begin Source File + +SOURCE=.\aes\aescrypt.c +# End Source File +# Begin Source File + +SOURCE=.\aes\aeskey.c +# End Source File +# Begin Source File + +SOURCE=.\aes\aesopt.h +# End Source File +# Begin Source File + +SOURCE=.\aes\aestab.c +# End Source File +# Begin Source File + +SOURCE=.\aes\aestab.h +# End Source File +# Begin Source File + +SOURCE=.\aes\brg_endian.h +# End Source File +# Begin Source File + +SOURCE=.\aes\brg_types.h +# End Source File +# Begin Source File + +SOURCE=.\aes\entropy.c +# End Source File +# Begin Source File + +SOURCE=.\aes\entropy.h +# End Source File +# Begin Source File + +SOURCE=.\aes\fileenc.c +# End Source File +# Begin Source File + +SOURCE=.\aes\fileenc.h +# End Source File +# Begin Source File + +SOURCE=.\aes\hmac.c +# End Source File +# Begin Source File + +SOURCE=.\aes\hmac.h +# End Source File +# Begin Source File + +SOURCE=.\aes\prng.c +# End Source File +# Begin Source File + +SOURCE=.\aes\prng.h +# End Source File +# Begin Source File + +SOURCE=.\aes\pwd2key.c +# End Source File +# Begin Source File + +SOURCE=.\aes\pwd2key.h +# End Source File +# Begin Source File + +SOURCE=.\aes\sha1.c +# End Source File +# Begin Source File + +SOURCE=.\aes\sha1.h +# End Source File +# End Group +# Begin Source File + SOURCE=..\..\cintools\labview.lib # End Source File # End Target Modified: trunk/lvzip/c_source/zlibvc.vcproj =================================================================== --- trunk/lvzip/c_source/zlibvc.vcproj 2018-12-12 11:00:57 UTC (rev 1565) +++ trunk/lvzip/c_source/zlibvc.vcproj 2018-12-12 11:01:51 UTC (rev 1566) @@ -590,7 +590,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="bzip2" - PreprocessorDefinitions="WIN32;NDEBUG;NO_vsnprintf;HAVE_BZIP2;BZ_NO_STDIO;EMBEDDED;_CRT_SECURE_NO_WARNINGS" + PreprocessorDefinitions="WIN32;NDEBUG;NO_vsnprintf;HAVE_AES;HAVE_BZIP2;BZ_NO_STDIO;EMBEDDED;_CRT_SECURE_NO_WARNINGS" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -2681,6 +2681,10 @@ > </File> <File + RelativePath=".\bzip2\bzcompress.c" + > + </File> + <File RelativePath=".\bzip2\bzlib.c" > </File> @@ -2693,82 +2697,6 @@ > </File> <File - RelativePath=".\bzip2\compress.c" - > - <FileConfiguration - Name="static Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - ObjectFile="$(IntDir)\$(InputName)1.obj" - XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc" - /> - </FileConfiguration> - <FileConfiguration - Name="static Release|x64" - > - <Tool - Name="VCCLCompilerTool" - ObjectFile="$(IntDir)\$(InputName)1.obj" - XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc" - /> - </FileConfiguration> - <FileConfiguration - Name="DLL Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - ObjectFile="$(IntDir)\$(InputName)1.obj" - XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc" - /> - </FileConfiguration> - <FileConfiguration - Name="DLL Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - ObjectFile="$(IntDir)\$(InputName)1.obj" - XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc" - /> - </FileConfiguration> - <FileConfiguration - Name="DLL Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - ObjectFile="$(IntDir)\$(InputName)1.obj" - XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc" - /> - </FileConfiguration> - <FileConfiguration - Name="DLL Release|x64" - > - <Tool - Name="VCCLCompilerTool" - ObjectFile="$(IntDir)\$(InputName)1.obj" - XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc" - /> - </FileConfiguration> - <FileConfiguration - Name="DLL Embedded|Win32" - > - <Tool - Name="VCCLCompilerTool" - ObjectFile="$(IntDir)\$(InputName)1.obj" - XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc" - /> - </FileConfiguration> - <FileConfiguration - Name="DLL Embedded|x64" - > - <Tool - Name="VCCLCompilerTool" - ObjectFile="$(IntDir)\$(InputName)1.obj" - XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc" - /> - </FileConfiguration> - </File> - <File RelativePath=".\bzip2\crctable.c" > </File> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lab...@us...> - 2018-12-12 11:00:08
|
Revision: 1564 http://sourceforge.net/p/opengtoolkit/svn/1564 Author: labviewer Date: 2018-12-12 11:00:05 +0000 (Wed, 12 Dec 2018) Log Message: ----------- Add standard C integer defines for old MS compilers Modified Paths: -------------- trunk/lvzip/c_source/aes/brg_types.h Modified: trunk/lvzip/c_source/aes/brg_types.h =================================================================== --- trunk/lvzip/c_source/aes/brg_types.h 2018-12-12 00:50:01 UTC (rev 1563) +++ trunk/lvzip/c_source/aes/brg_types.h 2018-12-12 11:00:05 UTC (rev 1564) @@ -1,191 +1,204 @@ -/* ---------------------------------------------------------------------------- -Copyright (c) 1998-2013, Brian Gladman, Worcester, UK. All rights reserved. - -The redistribution and use of this software (with or without changes) -is allowed without the payment of fees or royalties provided that: - - source code distributions include the above copyright notice, this - list of conditions and the following disclaimer; - - binary distributions include the above copyright notice, this list - of conditions and the following disclaimer in their documentation. - -This software is provided 'as is' with no explicit or implied warranties -in respect of its operation, including, but not limited to, correctness -and fitness for purpose. ---------------------------------------------------------------------------- -Issue Date: 20/12/2007 - - The unsigned integer types defined here are of the form uint_<nn>t where - <nn> is the length of the type; for example, the unsigned 32-bit type is - 'uint32_t'. These are NOT the same as the 'C99 integer types' that are - defined in the inttypes.h and stdint.h headers since attempts to use these - types have shown that support for them is still highly variable. However, - since the latter are of the form uint<nn>_t, a regular expression search - and replace (in VC++ search on 'uint_{:z}t' and replace with 'uint\1_t') - can be used to convert the types used here to the C99 standard types. -*/ - -#ifndef _BRG_TYPES_H -#define _BRG_TYPES_H - -#if defined(__cplusplus) -extern "C" { -#endif - -#include <limits.h> -#include <stdint.h> - -#if defined( _MSC_VER ) && ( _MSC_VER >= 1300 ) -# include <stddef.h> -# define ptrint_t intptr_t -#elif defined( __ECOS__ ) -# define intptr_t unsigned int -# define ptrint_t intptr_t -#elif defined( __GNUC__ ) && ( __GNUC__ >= 3 ) -# define ptrint_t intptr_t -#else -# define ptrint_t int -#endif - -#ifndef BRG_UI32 -# define BRG_UI32 -# if UINT_MAX == 4294967295u -# define li_32(h) 0x##h##u -# elif ULONG_MAX == 4294967295u -# define li_32(h) 0x##h##ul -# elif defined( _CRAY ) -# error This code needs 32-bit data types, which Cray machines do not provide -# else -# error Please define uint32_t as a 32-bit unsigned integer type in brg_types.h -# endif -#endif - -#ifndef BRG_UI64 -# if defined( __BORLANDC__ ) && !defined( __MSDOS__ ) -# define BRG_UI64 -# define li_64(h) 0x##h##ui64 -# elif defined( _MSC_VER ) && ( _MSC_VER < 1300 ) /* 1300 == VC++ 7.0 */ -# define BRG_UI64 -# define li_64(h) 0x##h##ui64 -# elif defined( __sun ) && defined( ULONG_MAX ) && ULONG_MAX == 0xfffffffful -# define BRG_UI64 -# define li_64(h) 0x##h##ull -# elif defined( __MVS__ ) -# define BRG_UI64 -# define li_64(h) 0x##h##ull -# elif defined( UINT_MAX ) && UINT_MAX > 4294967295u -# if UINT_MAX == 18446744073709551615u -# define BRG_UI64 -# define li_64(h) 0x##h##u -# endif -# elif defined( ULONG_MAX ) && ULONG_MAX > 4294967295u -# if ULONG_MAX == 18446744073709551615ul -# define BRG_UI64 -# define li_64(h) 0x##h##ul -# endif -# elif defined( ULLONG_MAX ) && ULLONG_MAX > 4294967295u -# if ULLONG_MAX == 18446744073709551615ull -# define BRG_UI64 -# define li_64(h) 0x##h##ull -# endif -# elif defined( ULONG_LONG_MAX ) && ULONG_LONG_MAX > 4294967295u -# if ULONG_LONG_MAX == 18446744073709551615ull -# define BRG_UI64 -# define li_64(h) 0x##h##ull -# endif -# endif -#endif - -#if !defined( BRG_UI64 ) -# if defined( NEED_UINT_64T ) -# error Please define uint64_t as an unsigned 64 bit type in brg_types.h -# endif -#endif - -#ifndef RETURN_VALUES -# define RETURN_VALUES -# if defined( DLL_EXPORT ) -# if defined( _MSC_VER ) || defined ( __INTEL_COMPILER ) -# define VOID_RETURN __declspec( dllexport ) void __stdcall -# define INT_RETURN __declspec( dllexport ) int __stdcall -# elif defined( __GNUC__ ) -# define VOID_RETURN __declspec( __dllexport__ ) void -# define INT_RETURN __declspec( __dllexport__ ) int -# else -# error Use of the DLL is only available on the Microsoft, Intel and GCC compilers -# endif -# elif defined( DLL_IMPORT ) -# if defined( _MSC_VER ) || defined ( __INTEL_COMPILER ) -# define VOID_RETURN __declspec( dllimport ) void __stdcall -# define INT_RETURN __declspec( dllimport ) int __stdcall -# elif defined( __GNUC__ ) -# define VOID_RETURN __declspec( __dllimport__ ) void -# define INT_RETURN __declspec( __dllimport__ ) int -# else -# error Use of the DLL is only available on the Microsoft, Intel and GCC compilers -# endif -# elif defined( __WATCOMC__ ) -# define VOID_RETURN void __cdecl -# define INT_RETURN int __cdecl -# else -# define VOID_RETURN void -# define INT_RETURN int -# endif -#endif - -/* These defines are used to detect and set the memory alignment of pointers. - Note that offsets are in bytes. - - ALIGN_OFFSET(x,n) return the positive or zero offset of - the memory addressed by the pointer 'x' - from an address that is aligned on an - 'n' byte boundary ('n' is a power of 2) - - ALIGN_FLOOR(x,n) return a pointer that points to memory - that is aligned on an 'n' byte boundary - and is not higher than the memory address - pointed to by 'x' ('n' is a power of 2) - - ALIGN_CEIL(x,n) return a pointer that points to memory - that is aligned on an 'n' byte boundary - and is not lower than the memory address - pointed to by 'x' ('n' is a power of 2) -*/ - -#define ALIGN_OFFSET(x,n) (((ptrint_t)(x)) & ((n) - 1)) -#define ALIGN_FLOOR(x,n) ((uint8_t*)(x) - ( ((ptrint_t)(x)) & ((n) - 1))) -#define ALIGN_CEIL(x,n) ((uint8_t*)(x) + (-((ptrint_t)(x)) & ((n) - 1))) - -/* These defines are used to declare buffers in a way that allows - faster operations on longer variables to be used. In all these - defines 'size' must be a power of 2 and >= 8. NOTE that the - buffer size is in bytes but the type length is in bits - - UNIT_TYPEDEF(x,size) declares a variable 'x' of length - 'size' bits - - BUFR_TYPEDEF(x,size,bsize) declares a buffer 'x' of length 'bsize' - bytes defined as an array of variables - each of 'size' bits (bsize must be a - multiple of size / 8) - - UNIT_CAST(x,size) casts a variable to a type of - length 'size' bits - - UPTR_CAST(x,size) casts a pointer to a pointer to a - varaiable of length 'size' bits -*/ - -#define UI_TYPE(size) uint##size##_t -#define UNIT_TYPEDEF(x,size) typedef UI_TYPE(size) x -#define BUFR_TYPEDEF(x,size,bsize) typedef UI_TYPE(size) x[bsize / (size >> 3)] -#define UNIT_CAST(x,size) ((UI_TYPE(size) )(x)) -#define UPTR_CAST(x,size) ((UI_TYPE(size)*)(x)) - -#if defined(__cplusplus) -} -#endif - -#endif +/* +--------------------------------------------------------------------------- +Copyright (c) 1998-2013, Brian Gladman, Worcester, UK. All rights reserved. + +The redistribution and use of this software (with or without changes) +is allowed without the payment of fees or royalties provided that: + + source code distributions include the above copyright notice, this + list of conditions and the following disclaimer; + + binary distributions include the above copyright notice, this list + of conditions and the following disclaimer in their documentation. + +This software is provided 'as is' with no explicit or implied warranties +in respect of its operation, including, but not limited to, correctness +and fitness for purpose. +--------------------------------------------------------------------------- +Issue Date: 20/12/2007 + + The unsigned integer types defined here are of the form uint_<nn>t where + <nn> is the length of the type; for example, the unsigned 32-bit type is + 'uint32_t'. These are NOT the same as the 'C99 integer types' that are + defined in the inttypes.h and stdint.h headers since attempts to use these + types have shown that support for them is still highly variable. However, + since the latter are of the form uint<nn>_t, a regular expression search + and replace (in VC++ search on 'uint_{:z}t' and replace with 'uint\1_t') + can be used to convert the types used here to the C99 standard types. +*/ + +#ifndef _BRG_TYPES_H +#define _BRG_TYPES_H + +#if defined(__cplusplus) +extern "C" { +#endif + +#include <limits.h> + +#if defined( _MSC_VER ) +# include <stddef.h> +# define ptrint_t intptr_t +# if ( _MSC_VER >= 1300 ) +# include <stdint.h> +# else +typedef char int8_t; +typedef unsigned char uint8_t; +typedef short int16_t; +typedef unsigned short uint16_t; +typedef int int32_t; +typedef unsigned int uint32_t; +typedef __int64 int64_t; +typedef unsigned __int64 uint64_t; +typedef int ssize_t; +typedef unsigned int size_t; +# endif +#elif defined( __ECOS__ ) +# define intptr_t unsigned int +# define ptrint_t intptr_t +#elif defined( __GNUC__ ) && ( __GNUC__ >= 3 ) +# define ptrint_t intptr_t +#else +# define ptrint_t int +#endif + +#ifndef BRG_UI32 +# define BRG_UI32 +# if UINT_MAX == 4294967295u +# define li_32(h) 0x##h##u +# elif ULONG_MAX == 4294967295u +# define li_32(h) 0x##h##ul +# elif defined( _CRAY ) +# error This code needs 32-bit data types, which Cray machines do not provide +# else +# error Please define uint32_t as a 32-bit unsigned integer type in brg_types.h +# endif +#endif + +#ifndef BRG_UI64 +# if defined( __BORLANDC__ ) && !defined( __MSDOS__ ) +# define BRG_UI64 +# define li_64(h) 0x##h##ui64 +# elif defined( _MSC_VER ) && ( _MSC_VER < 1300 ) /* 1300 == VC++ 7.0 */ +# define BRG_UI64 +# define li_64(h) 0x##h##ui64 +# elif defined( __sun ) && defined( ULONG_MAX ) && ULONG_MAX == 0xfffffffful +# define BRG_UI64 +# define li_64(h) 0x##h##ull +# elif defined( __MVS__ ) +# define BRG_UI64 +# define li_64(h) 0x##h##ull +# elif defined( UINT_MAX ) && UINT_MAX > 4294967295u +# if UINT_MAX == 18446744073709551615u +# define BRG_UI64 +# define li_64(h) 0x##h##u +# endif +# elif defined( ULONG_MAX ) && ULONG_MAX > 4294967295u +# if ULONG_MAX == 18446744073709551615ul +# define BRG_UI64 +# define li_64(h) 0x##h##ul +# endif +# elif defined( ULLONG_MAX ) && ULLONG_MAX > 4294967295u +# if ULLONG_MAX == 18446744073709551615ull +# define BRG_UI64 +# define li_64(h) 0x##h##ull +# endif +# elif defined( ULONG_LONG_MAX ) && ULONG_LONG_MAX > 4294967295u +# if ULONG_LONG_MAX == 18446744073709551615ull +# define BRG_UI64 +# define li_64(h) 0x##h##ull +# endif +# endif +#endif + +#if !defined( BRG_UI64 ) +# if defined( NEED_UINT_64T ) +# error Please define uint64_t as an unsigned 64 bit type in brg_types.h +# endif +#endif + +#ifndef RETURN_VALUES +# define RETURN_VALUES +# if defined( DLL_EXPORT ) +# if defined( _MSC_VER ) || defined ( __INTEL_COMPILER ) +# define VOID_RETURN __declspec( dllexport ) void __stdcall +# define INT_RETURN __declspec( dllexport ) int __stdcall +# elif defined( __GNUC__ ) +# define VOID_RETURN __declspec( __dllexport__ ) void +# define INT_RETURN __declspec( __dllexport__ ) int +# else +# error Use of the DLL is only available on the Microsoft, Intel and GCC compilers +# endif +# elif defined( DLL_IMPORT ) +# if defined( _MSC_VER ) || defined ( __INTEL_COMPILER ) +# define VOID_RETURN __declspec( dllimport ) void __stdcall +# define INT_RETURN __declspec( dllimport ) int __stdcall +# elif defined( __GNUC__ ) +# define VOID_RETURN __declspec( __dllimport__ ) void +# define INT_RETURN __declspec( __dllimport__ ) int +# else +# error Use of the DLL is only available on the Microsoft, Intel and GCC compilers +# endif +# elif defined( __WATCOMC__ ) +# define VOID_RETURN void __cdecl +# define INT_RETURN int __cdecl +# else +# define VOID_RETURN void +# define INT_RETURN int +# endif +#endif + +/* These defines are used to detect and set the memory alignment of pointers. + Note that offsets are in bytes. + + ALIGN_OFFSET(x,n) return the positive or zero offset of + the memory addressed by the pointer 'x' + from an address that is aligned on an + 'n' byte boundary ('n' is a power of 2) + + ALIGN_FLOOR(x,n) return a pointer that points to memory + that is aligned on an 'n' byte boundary + and is not higher than the memory address + pointed to by 'x' ('n' is a power of 2) + + ALIGN_CEIL(x,n) return a pointer that points to memory + that is aligned on an 'n' byte boundary + and is not lower than the memory address + pointed to by 'x' ('n' is a power of 2) +*/ + +#define ALIGN_OFFSET(x,n) (((ptrint_t)(x)) & ((n) - 1)) +#define ALIGN_FLOOR(x,n) ((uint8_t*)(x) - ( ((ptrint_t)(x)) & ((n) - 1))) +#define ALIGN_CEIL(x,n) ((uint8_t*)(x) + (-((ptrint_t)(x)) & ((n) - 1))) + +/* These defines are used to declare buffers in a way that allows + faster operations on longer variables to be used. In all these + defines 'size' must be a power of 2 and >= 8. NOTE that the + buffer size is in bytes but the type length is in bits + + UNIT_TYPEDEF(x,size) declares a variable 'x' of length + 'size' bits + + BUFR_TYPEDEF(x,size,bsize) declares a buffer 'x' of length 'bsize' + bytes defined as an array of variables + each of 'size' bits (bsize must be a + multiple of size / 8) + + UNIT_CAST(x,size) casts a variable to a type of + length 'size' bits + + UPTR_CAST(x,size) casts a pointer to a pointer to a + varaiable of length 'size' bits +*/ + +#define UI_TYPE(size) uint##size##_t +#define UNIT_TYPEDEF(x,size) typedef UI_TYPE(size) x +#define BUFR_TYPEDEF(x,size,bsize) typedef UI_TYPE(size) x[bsize / (size >> 3)] +#define UNIT_CAST(x,size) ((UI_TYPE(size) )(x)) +#define UPTR_CAST(x,size) ((UI_TYPE(size)*)(x)) + +#if defined(__cplusplus) +} +#endif + +#endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lab...@us...> - 2018-12-12 00:50:02
|
Revision: 1563 http://sourceforge.net/p/opengtoolkit/svn/1563 Author: labviewer Date: 2018-12-12 00:50:01 +0000 (Wed, 12 Dec 2018) Log Message: ----------- Some more platform specific corrections Modified Paths: -------------- trunk/lvzip/c_source/lvapi.c trunk/lvzip/c_source/lvapi.h trunk/lvzip/c_source/lvutil.c trunk/lvzip/c_source/lvutil.h trunk/lvzip/c_source/unzip.c trunk/lvzip/c_source/zlibvc.vcproj Modified: trunk/lvzip/c_source/lvapi.c =================================================================== --- trunk/lvzip/c_source/lvapi.c 2018-12-11 20:26:07 UTC (rev 1562) +++ trunk/lvzip/c_source/lvapi.c 2018-12-12 00:50:01 UTC (rev 1563) @@ -24,7 +24,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include <string.h> -#include <mbstring.h> #define ZLIB_INTERNAL #include "zlib.h" #include "lvutil.h" @@ -78,12 +77,6 @@ static MagicCookieJar gCookieJar = NULL; -#if 0 -LibAPI(const char *) lvzlib_disposeRefnum(uptr_t *refnum) -{ - -} -#endif static int32 lvzlipCleanup(UPtr ptr) { FileNode *pNode = (FileNode*)ptr; @@ -448,13 +441,24 @@ * always work as intended for case insensitive comparison since only the normal * ASCII 7Bit alpha characters will be compared case insensitive, not any extended * characters or multibyte characters. + * 0 - platform specific + * 1 - case sensitive + * 2 - case insensitive * ****************************************************************************************************/ +#if Win32 +#define strcasecmp _stricmp +#endif static int caseInsensitiveNameComparer(unzFile file, const char *filename1, const char *filename2) { - return _mbsicmp((const unsigned char*)filename1, (const unsigned char*)filename2); + return strcasecmp(filename1, filename2); } +static int caseSensitiveNameComparer(unzFile file, const char *filename1, const char *filename2) +{ + return strcmp(filename1, filename2); +} + LibAPI(MgErr) lvzlib_unzLocateFile(LVRefNum *refnum, LStrHandle fileName, int iCaseSensitivity) { unzFile node; @@ -464,13 +468,26 @@ err = ZeroTerminateLString(&fileName); if (!err) { - err = LibToMgErr(unzLocateFile(node, (const char*)LStrBufH(fileName), iCaseSensitivity ? caseInsensitiveNameComparer : NULL)); + unzFileNameComparer filename_compare_func = NULL; + if ( +#if Mac || MSWin || VxWorks + !iCaseSensitivity || +#endif + iCaseSensitivity == 2) + { + filename_compare_func = caseInsensitiveNameComparer; + } + else + { + filename_compare_func = caseSensitiveNameComparer; + } + err = LibToMgErr(unzLocateFile(node, (const char*)LStrBufH(fileName), filename_compare_func)); } } return err; } -static MgErr RetrieveFileInfo(unzFile node, LStrHandle *fileName, uint16_t sizeFileName, LStrHandle *extraField, uint16_t sizeExtraField, LStrHandle *comment, uint16_t sizeComment) +static MgErr RetrieveFileInfo(unzFile node, unz_file_info *pfile_info, LStrHandle *fileName, uint16_t sizeFileName, LStrHandle *extraField, uint16_t sizeExtraField, LStrHandle *comment, uint16_t sizeComment) { MgErr err = NumericArrayResize(uB, 1, (UHandle*)extraField, sizeExtraField); if (!err) @@ -481,7 +498,7 @@ err = NumericArrayResize(uB, 1, (UHandle*)comment, sizeComment); if (!err) { - err = LibToMgErr(unzGetCurrentFileInfo64(node, NULL, (char*)LStrBuf(**fileName), sizeFileName, LStrBuf(**extraField), sizeExtraField, (char*)LStrBuf(**comment), sizeComment)); + err = LibToMgErr(unzGetCurrentFileInfo(node, pfile_info, (char*)LStrBuf(**fileName), sizeFileName, LStrBuf(**extraField), sizeExtraField, (char*)LStrBuf(**comment), sizeComment)); if (!err) { LStrLen(**extraField) = sizeExtraField; @@ -518,7 +535,7 @@ err = LibToMgErr(unzGetCurrentFileInfo(node, pfile_info, NULL, 0, NULL, 0, NULL, 0)); if (!err) { - err = RetrieveFileInfo(node, fileName, pfile_info->size_filename, extraField, pfile_info->size_file_extra, comment, pfile_info->size_file_comment); + err = RetrieveFileInfo(node, NULL, fileName, pfile_info->size_filename, extraField, pfile_info->size_file_extra, comment, pfile_info->size_file_comment); } } return err; @@ -534,7 +551,7 @@ err = LibToMgErr(unzGetCurrentFileInfo64(node, pfile_info, NULL, 0, NULL, 0, NULL, 0)); if (!err) { - err = RetrieveFileInfo(node, fileName, pfile_info->size_filename, extraField, pfile_info->size_file_extra, comment, pfile_info->size_file_comment); + err = RetrieveFileInfo(node, NULL, fileName, pfile_info->size_filename, extraField, pfile_info->size_file_extra, comment, pfile_info->size_file_comment); } } return err; @@ -659,6 +676,22 @@ return err; } +LibAPI(MgErr) lvzlib_unzGoToFirstFile2_32(LVRefNum *refnum, unz_file_info *pfile_info, LStrHandle *fileName, LStrHandle *extraField, LStrHandle *comment) +{ + unzFile node; + MgErr err = lvzlibGetRefnum(refnum, &node, UnzMagic); + if (!err) + { + unz_file_info64 file_info64; + err = LibToMgErr(unzGoToFirstFile2(node, &file_info64, NULL, 0, NULL, 0, NULL, 0)); + if (!err) + { + err = RetrieveFileInfo(node, pfile_info, fileName, file_info64.size_filename, extraField, file_info64.size_file_extra, comment, file_info64.size_file_comment); + } + } + return err; +} + LibAPI(MgErr) lvzlib_unzGoToFirstFile2_64(LVRefNum *refnum, unz_file_info64 *pfile_info, LStrHandle *fileName, LStrHandle *extraField, LStrHandle *comment) { unzFile node; @@ -668,7 +701,7 @@ err = LibToMgErr(unzGoToFirstFile2(node, pfile_info, NULL, 0, NULL, 0, NULL, 0)); if (!err) { - err = RetrieveFileInfo(node, fileName, pfile_info->size_filename, extraField, pfile_info->size_file_extra, comment, pfile_info->size_file_comment); + err = RetrieveFileInfo(node, NULL, fileName, pfile_info->size_filename, extraField, pfile_info->size_file_extra, comment, pfile_info->size_file_comment); } } return err; @@ -693,6 +726,22 @@ return err; } +LibAPI(MgErr) lvzlib_unzGoToNextFile2_32(LVRefNum *refnum, unz_file_info *pfile_info, LStrHandle *fileName, LStrHandle *extraField, LStrHandle *comment) +{ + unzFile node; + MgErr err = lvzlibGetRefnum(refnum, &node, UnzMagic); + if (!err) + { + unz_file_info64 file_info64; + err = LibToMgErr(unzGoToNextFile2(node, &file_info64, NULL, 0, NULL, 0, NULL, 0)); + if (!err) + { + err = RetrieveFileInfo(node, pfile_info, fileName, file_info64.size_filename, extraField, file_info64.size_file_extra, comment, file_info64.size_file_comment); + } + } + return err; +} + LibAPI(MgErr) lvzlib_unzGoToNextFile2_64(LVRefNum *refnum, unz_file_info64 *pfile_info, LStrHandle *fileName, LStrHandle *extraField, LStrHandle *comment) { unzFile node; @@ -702,7 +751,7 @@ err = LibToMgErr(unzGoToNextFile2(node, pfile_info, NULL, 0, NULL, 0, NULL, 0)); if (!err) { - err = RetrieveFileInfo(node, fileName, pfile_info->size_filename, extraField, pfile_info->size_file_extra, comment, pfile_info->size_file_comment); + err = RetrieveFileInfo(node, NULL, fileName, pfile_info->size_filename, extraField, pfile_info->size_file_extra, comment, pfile_info->size_file_comment); } } return err; Modified: trunk/lvzip/c_source/lvapi.h =================================================================== --- trunk/lvzip/c_source/lvapi.h 2018-12-11 20:26:07 UTC (rev 1562) +++ trunk/lvzip/c_source/lvapi.h 2018-12-12 00:50:01 UTC (rev 1563) @@ -55,8 +55,10 @@ LibAPI(MgErr) lvzlib_unzReadCurrentFile(LVRefNum *refnum, LStrHandle buffer); LibAPI(MgErr) lvzlib_unzCloseCurrentFile(LVRefNum *refnum); LibAPI(MgErr) lvzlib_unzGoToFirstFile(LVRefNum *refnum); +LibAPI(MgErr) lvzlib_unzGoToFirstFile2_32(LVRefNum *refnum, unz_file_info *pfile_info, LStrHandle *fileName, LStrHandle *extraField, LStrHandle *comment); LibAPI(MgErr) lvzlib_unzGoToFirstFile2_64(LVRefNum *refnum, unz_file_info64 *pfile_info, LStrHandle *fileName, LStrHandle *extraField, LStrHandle *comment); LibAPI(MgErr) lvzlib_unzGoToNextFile(LVRefNum *refnum); +LibAPI(MgErr) lvzlib_unzGoToNextFile2_32(LVRefNum *refnum, unz_file_info *pfile_info, LStrHandle *fileName, LStrHandle *extraField, LStrHandle *comment); LibAPI(MgErr) lvzlib_unzGoToNextFile2_64(LVRefNum *refnum, unz_file_info64 *pfile_info, LStrHandle *fileName, LStrHandle *extraField, LStrHandle *comment); LibAPI(MgErr) lvzlib_unzGoToFilePos32(LVRefNum *refnum, unz_file_pos *pos); LibAPI(MgErr) lvzlib_unzGoToFilePos64(LVRefNum *refnum, unz64_file_pos *pos); Modified: trunk/lvzip/c_source/lvutil.c =================================================================== --- trunk/lvzip/c_source/lvutil.c 2018-12-11 20:26:07 UTC (rev 1562) +++ trunk/lvzip/c_source/lvutil.c 2018-12-12 00:50:01 UTC (rev 1563) @@ -487,7 +487,7 @@ #if Unix || MacOSX || defined(EMBEDDED) #define LWStrPtr LStrPtr - +/* wstr is filled with an 8 bit local encoded string from the path, which could be UTF8 on Linux and MacOSX systems */ static int32 MakePathDSString(Path path, LWStrPtr *lstr, int32 reserve) { int32 pathLen = -1; @@ -507,7 +507,7 @@ } #elif usesWinPath #define LWStrPtr UStrPtr - +/* wstr is filled with a Windows UTF16LE string from the path */ static int32 MakePathDSString(Path path, LWStrPtr *wstr, int32 reserve) { int32 pathLen = -1; @@ -540,7 +540,7 @@ len = 6; off = 1; } - *wstr = (UStrPtr)DSNewPClr(sizeof(int32) + sizeof(wchar_t) * (len + pathLen + reserve + 1)); + *wstr = (LWStrPtr)DSNewPClr(sizeof(int32) + sizeof(wchar_t) * (len + pathLen + reserve + 1)); if (*wstr) { if (buf[0] && buf[1] == ':') @@ -1566,13 +1566,11 @@ { DIR *dirp; struct dirent *dp; - struct direntpath dppath; - struct dirent *dpp = (struct dirent *)&dppath; if (!(dirp = opendir((const char*)lstr->str))) return UnixToLVFileErr(); - for (dp = readdir_r(dirp, dpp); dp; dp = readdir_r(dirp, dpp)) + for (dp = readdir(dirp); dp; dp = readdir(dirp)) count++; closedir(dirp); fileInfo->size = count - 2; Modified: trunk/lvzip/c_source/lvutil.h =================================================================== --- trunk/lvzip/c_source/lvutil.h 2018-12-11 20:26:07 UTC (rev 1562) +++ trunk/lvzip/c_source/lvutil.h 2018-12-12 00:50:01 UTC (rev 1563) @@ -455,10 +455,10 @@ uInt32 cdate; /**< creation date */ uInt32 mdate; /**< last modification date */ Bool32 folder; /**< indicates whether path refers to a folder */ - Bool32 isInvisible; /**< indicates whether the file is visible in File Dialog */ + Bool32 isInvisible; /**< indicates whether the file is visible in File Dialog */ struct { int16 v, h; - } location; /**< system specific geographical location */ + } location; /**< system specific geographical location */ Str255 owner; /**< owner (in pascal string form) of file or folder */ Str255 group; /**< group (in pascal string form) of file or folder */ } FInfoRec, *FInfoPtr; Modified: trunk/lvzip/c_source/unzip.c =================================================================== --- trunk/lvzip/c_source/unzip.c 2018-12-11 20:26:07 UTC (rev 1562) +++ trunk/lvzip/c_source/unzip.c 2018-12-12 00:50:01 UTC (rev 1563) @@ -906,7 +906,7 @@ unz_file_info64 file_info64; int err = UNZ_OK; - err = unzGetCurrentFileInfoInternal(file, &file_info64, NULL, filename, filename_size, + err = unzGetCurrentFileInfoInternal(file, pfile_info ? &file_info64 : NULL, NULL, filename, filename_size, extrafield, extrafield_size, comment, comment_size); if ((err == UNZ_OK) && (pfile_info != NULL)) Modified: trunk/lvzip/c_source/zlibvc.vcproj =================================================================== --- trunk/lvzip/c_source/zlibvc.vcproj 2018-12-11 20:26:07 UTC (rev 1562) +++ trunk/lvzip/c_source/zlibvc.vcproj 2018-12-12 00:50:01 UTC (rev 1563) @@ -393,7 +393,7 @@ <Tool Name="VCCLCompilerTool" Optimization="2" - InlineFunctionExpansion="1" + InlineFunctionExpansion="0" AdditionalIncludeDirectories="bzip2" PreprocessorDefinitions="WIN32;NDEBUG;NO_vsnprintf;HAVE_AES;HAVE_BZIP2;BZ_NO_STDIO;_CRT_SECURE_NO_WARNINGS" StringPooling="true" @@ -491,7 +491,7 @@ <Tool Name="VCCLCompilerTool" Optimization="2" - InlineFunctionExpansion="1" + InlineFunctionExpansion="0" AdditionalIncludeDirectories="bzip2" PreprocessorDefinitions="WIN32;NDEBUG;NO_vsnprintf;HAVE_AES;HAVE_BZIP2;BZ_NO_STDIO;_CRT_SECURE_NO_WARNINGS" StringPooling="true" @@ -1933,34 +1933,6 @@ <File RelativePath=".\utf.c" > - <FileConfiguration - Name="DLL Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - /> - </FileConfiguration> - <FileConfiguration - Name="DLL Release|x64" - > - <Tool - Name="VCCLCompilerTool" - /> - </FileConfiguration> - <FileConfiguration - Name="DLL Embedded|Win32" - > - <Tool - Name="VCCLCompilerTool" - /> - </FileConfiguration> - <FileConfiguration - Name="DLL Embedded|x64" - > - <Tool - Name="VCCLCompilerTool" - /> - </FileConfiguration> </File> <File RelativePath="zip.c" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lab...@us...> - 2018-12-11 20:26:09
|
Revision: 1562 http://sourceforge.net/p/opengtoolkit/svn/1562 Author: labviewer Date: 2018-12-11 20:26:07 +0000 (Tue, 11 Dec 2018) Log Message: ----------- Revert change to the Unzip File Info data structure Modified Paths: -------------- trunk/lvzip/source/LICENSE.txt trunk/lvzip/source/lvzip.llb/ZLIB Convert File Info.vi trunk/lvzip/source/lvzip.llb/ZLIB Copy Raw File.vi trunk/lvzip/source/lvzip.llb/ZLIB Delete Files From Archive.vi trunk/lvzip/source/lvzip.llb/ZLIB Enumerate File Contents Old.vi trunk/lvzip/source/lvzip.llb/ZLIB Enumerate File Contents.vi trunk/lvzip/source/lvzip.llb/ZLIB Extract All Files To Dir.vi trunk/lvzip/source/lvzip.llb/ZLIB Extract File.vi trunk/lvzip/source/lvzip.llb/ZLIB Extract Stream.vi trunk/lvzip/source/lvzip.llb/ZLIB File Info.ctl trunk/lvzip/source/lvzip.llb/ZLIB Get Current File Info Old.vi trunk/lvzip/source/lvzip.llb/ZLIB Get Current File Info.vi trunk/lvzip/source/lvzip.llb/ZLIB Get File.vi trunk/lvzip/source/lvzip.llb/ZLIB Go To First File.vi trunk/lvzip/source/lvzip.llb/ZLIB Go To Next File.vi trunk/lvzip/source/lvzip.llb/ZLIB Move Raw File.vi trunk/lvzip/source/lvzip.llb/ZLIB Open Write File.vi trunk/lvzip/source/lvzip.llb/ZLIB Store File.vi trunk/lvzip/source/lvzip.llb/ZLIB Store Stream.vi trunk/lvzip/source/lvzip.llb/ZLIB VI Tree.vi trunk/lvzip/source/lvzlib.dll trunk/lvzip/source/lvzlib64.dll trunk/lvzip/source/opengdoc.txt trunk/lvzip/source/readme.txt Modified: trunk/lvzip/source/LICENSE.txt =================================================================== --- trunk/lvzip/source/LICENSE.txt 2018-12-11 20:19:11 UTC (rev 1561) +++ trunk/lvzip/source/LICENSE.txt 2018-12-11 20:26:07 UTC (rev 1562) @@ -40,7 +40,7 @@ following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - * Neither the name of SciWare, James Kring, Inc., nor the names of its contributors may be used to endorse + * Neither the name of OpenG, LavaG, nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, Modified: trunk/lvzip/source/lvzip.llb/ZLIB Convert File Info.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/source/lvzip.llb/ZLIB Copy Raw File.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/source/lvzip.llb/ZLIB Delete Files From Archive.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/source/lvzip.llb/ZLIB Enumerate File Contents Old.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/source/lvzip.llb/ZLIB Enumerate File Contents.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/source/lvzip.llb/ZLIB Extract All Files To Dir.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/source/lvzip.llb/ZLIB Extract File.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/source/lvzip.llb/ZLIB Extract Stream.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/source/lvzip.llb/ZLIB File Info.ctl =================================================================== (Binary files differ) Modified: trunk/lvzip/source/lvzip.llb/ZLIB Get Current File Info Old.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/source/lvzip.llb/ZLIB Get Current File Info.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/source/lvzip.llb/ZLIB Get File.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/source/lvzip.llb/ZLIB Go To First File.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/source/lvzip.llb/ZLIB Go To Next File.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/source/lvzip.llb/ZLIB Move Raw File.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/source/lvzip.llb/ZLIB Open Write File.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/source/lvzip.llb/ZLIB Store File.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/source/lvzip.llb/ZLIB Store Stream.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/source/lvzip.llb/ZLIB VI Tree.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/source/lvzlib.dll =================================================================== (Binary files differ) Modified: trunk/lvzip/source/lvzlib64.dll =================================================================== (Binary files differ) Modified: trunk/lvzip/source/opengdoc.txt =================================================================== --- trunk/lvzip/source/opengdoc.txt 2018-12-11 20:19:11 UTC (rev 1561) +++ trunk/lvzip/source/opengdoc.txt 2018-12-11 20:26:07 UTC (rev 1562) @@ -23,7 +23,7 @@ Description -The core of this libray is an external shared library consisting basically of the version 1.2.3 release of zlib and the version 1.0.1e of the zip library from Gilles Vollant. +The core of this libray is an external shared library consisting basically of the version 1.2.11 release of zlib and the version 1.2.0 of the zip library from Gilles Vollant with modifications from The current version supports most types of ZIP files with exception of the newest proprietary format created by the latest version of Winzip. It also supports adding files with password, and extracting password protected files. One specific point to watch for, if you start to work on the Advanced level of things is that the file reference created by the two Open functions are very different. So you can't open a file with ZLIB Open ZIP Archive and pass this refnum to any of the decompress functions and vice-versa. @@ -38,7 +38,13 @@ Copyrights -Copyright (C) 1995-2004 Mark Adler, Jean-loup Gailly -Copyright (C) 1998-2004 Gilles Vollant +Copyright (C) 1995-2017 Mark Adler, Jean-loup Gailly +Copyright (C) 2004 Xavier Roche +Copyright (C) 1998-2010 Gilles Vollant +Copyright (C) 2007-2008 Even Rouault +Copyright (C) 2009-2010 Mathias Svensson +Copyright (C) 2012-2017 Nathan Moinvaziri +Copyright (c) 1998-2013 Brian Gladman, Worcester, UK +Copyright (C) 1996-2010 Julian R Seward Copyright (C) 2002-2009 Jim Kring, Christoph Salzmann -Copyright (C) 2002-2015 Rolf Kalbermatter +Copyright (C) 2002-2018 Rolf Kalbermatter Modified: trunk/lvzip/source/readme.txt =================================================================== --- trunk/lvzip/source/readme.txt 2018-12-11 20:19:11 UTC (rev 1561) +++ trunk/lvzip/source/readme.txt 2018-12-11 20:26:07 UTC (rev 1562) @@ -1,7 +1,7 @@ -LabVIEW ZIP library, version 4.1.0 +LabVIEW ZIP library, version 4.2.0 ---------------------------------- -Copyright 2002-2015 Rolf Kalbermatter +Copyright 2002-2018 Rolf Kalbermatter Please read this document before you upgrade from a version of LVZIP @@ -11,6 +11,27 @@ in comparison to earlier versions which might require you to slightly redo your project. + + +Release 4.2.0, Released: Dec. 08, 2018 +====================================== + +New features: +------------- +1) Removed limit of 2GB for individual files in an archive +2) Support for AES encryption in ZIP archives, when compressing with encryption, AES is always used. + Decoding supports both the old style crypt as well as AES depending on how the archive was encrypted. +3) Added functions that support symbolic link handling, but these are not yet used in the ZIP archive. + +Bug Fixes: +---------- +1) Several fixes to 64 bit operations + +Upgrades: +---------- +1) Upgraded to zlib 1.2.1 and minizip 1.2.0 from Nathan Moinvaziri + + Release 4.1.0, Released: Mar. 05, 2015 ====================================== @@ -24,7 +45,7 @@ 3) Added support for Windows and Linux 64 bit platforms 4) Added support for all NI-Linux RT platforrms -Bug fixes: +Upgrades: ---------- 1) Upgraded to zlib 1.2.8 and included minizip This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lab...@us...> - 2018-12-11 20:19:12
|
Revision: 1561 http://sourceforge.net/p/opengtoolkit/svn/1561 Author: labviewer Date: 2018-12-11 20:19:11 +0000 (Tue, 11 Dec 2018) Log Message: ----------- Add some comments as to what code is used on what platform compile Modified Paths: -------------- trunk/lvzip/c_source/lvutil.c Modified: trunk/lvzip/c_source/lvutil.c =================================================================== --- trunk/lvzip/c_source/lvutil.c 2018-12-11 12:18:11 UTC (rev 1560) +++ trunk/lvzip/c_source/lvutil.c 2018-12-11 20:19:11 UTC (rev 1561) @@ -132,7 +132,7 @@ #if usesHFSPath #define kPathSeperator ':' -typedef SInt16 FileRefNum; +typedef FSIORefNum FileRefNum; #elif usesPosixPath #define kPathSeperator '/' typedef FILE* FileRefNum; @@ -770,7 +770,7 @@ return HRESULTToLVErr(err); } -static BOOL ModifyBackupPrivilege(BOOL fEnable) +static BOOL Win32ModifyBackupPrivilege(BOOL fEnable) { HANDLE handle; BOOL success = OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES, &handle); @@ -806,7 +806,7 @@ } // Need to acquire backup privileges in order to be able to retrieve a handle to a directory below or call symlink kernel entry points - ModifyBackupPrivilege(TRUE); + Win32ModifyBackupPrivilege(TRUE); while (!err && *dwAttrs & FILE_ATTRIBUTE_REPARSE_POINT) { // Open the link file or directory @@ -913,7 +913,7 @@ } } } - ModifyBackupPrivilege(FALSE); + Win32ModifyBackupPrivilege(FALSE); if (buffer) DSDisposePtr((UPtr)buffer); if (tempPath) @@ -1187,10 +1187,12 @@ LibAPI(MgErr) LVPath_HasResourceFork(Path path, LVBoolean *hasResFork, uInt32 *sizeLow, uInt32 *sizeHigh) { MgErr err = mgNoErr; +#if Mac #if usesHFSPath FSRef ref; -#elif MacOSX +#else LStrHandle lstr = NULL; +#endif #else Unused(path); #endif @@ -1201,7 +1203,8 @@ if (sizeHigh) *sizeHigh = 0; -#if usesHFSPath +#if Mac +#if usesHFSPath // 32-Bit MacOSX err = FSMakePathRef(path, &ref); if (!err) { @@ -1222,7 +1225,7 @@ *sizeHigh = Hi32(catalogInfo.rsrcLogicalSize); } } -#elif MacOSX +#else // 64-Bit MacOSX err = LVPath_ToText(path, &lstr); if (!err) { @@ -1240,6 +1243,7 @@ DSDisposeHandle((UHandle)lstr); } #endif +#endif return err; } @@ -1250,19 +1254,19 @@ LStrHandle comment) { MgErr err = mgNoErr; -#if Win32 && !defined(EMBEDDED) +#if Win32 && !defined(EMBEDDED) // Windows LWStrPtr lstr = NULL; HANDLE handle = NULL; WIN32_FIND_DATAW fi = {0}; uInt64 count = 0; -#elif usesHFSPath +#elif usesHFSPath // MacOS and MacOSX 32-Bit FSRef ref; -#elif usesPosixPath +#elif usesPosixPath // Unix, VxWorks, and MacOSX 64-Bit LWStrPtr lstr = NULL; struct stat statbuf; struct utimbuf buf; uInt64 count = 0; -#else +#else // Pharlap ETS FInfoRec infoRec; #endif @@ -1624,14 +1628,14 @@ LibAPI(MgErr) LVPath_EncodeMacbinary(Path srcPath, Path dstPath) { #if MacOS && !MacOSX - MacSpec srcFSSpec; - MacSpec dstFSSpec; + FSSpec srcFSSpec; + FScSpec dstFSSpec; MgErr err; - err = MakeMacSpec(srcPath, &srcFSSpec); + err = MakeFSSpec(srcPath, &srcFSSpec); if (!err) { - err = MakeMacSpec(dstPath, &dstFSSpec); + err = MakeFSSpec(dstPath, &dstFSSpec); if (!err) err = OSErrToLVErr(EncodeMacbinaryFiles(&srcFSSpec, &dstFSSpec)); } @@ -1646,14 +1650,14 @@ LibAPI(MgErr) LVPath_DecodeMacbinary(Path srcPath, Path dstPath) { #if MacOS && !MacOSX - MacSpec srcFSSpec; - MacSpec dstFSSpec; + FSSpec srcFSSpec; + FSSpec dstFSSpec; MgErr err; - err = MakeMacSpec(srcPath, &srcFSSpec); + err = MakeFSSpec(srcPath, &srcFSSpec); if (!err) { - err = MakeMacSpec(dstPath, &dstFSSpec); + err = MakeFSSpec(dstPath, &dstFSSpec); if (!err) err = OSErrToLVErr(DecodeMacBinaryFiles(&srcFSSpec, &dstFSSpec)); } @@ -1664,7 +1668,10 @@ return mgNotSupported; #endif } - +/* + These two APIs will use the platform specific path syntax except for the + MacOSX 32-bit plaform where it will use posix format +*/ LibAPI(MgErr) LVPath_ToText(Path path, LStrHandle *str) { int32 pathLen = -1; @@ -1907,7 +1914,7 @@ if (!err) { // Need to acquire backup privileges in order to be able to call symlink kernel entry points - ModifyBackupPrivilege(TRUE); + Win32ModifyBackupPrivilege(TRUE); if (flags & kLinkHard) { err = Win32CreateHardLinkW(UStrBuf(src), UStrBuf(tgt), NULL); @@ -1916,7 +1923,7 @@ { err = Win32CreateSymbolicLinkW(UStrBuf(src), UStrBuf(tgt), flags & kLinkDir ? SYMBOLIC_LINK_FLAG_DIRECTORY : 0); } - ModifyBackupPrivilege(FALSE); + Win32ModifyBackupPrivilege(FALSE); } #else err = mgNotSupported; @@ -2076,7 +2083,13 @@ return err; } - +/* + The lvfile internal functions work on the same file object as the LabVIEW internal functions. + This is the file handle or file descriptor that a LabVIEW File Refnum wraps. + MacOS and MacOSX 32-Bit: FSIORefNum (int) + Windows: HANDLE + Unix: FILE* +*/ static MgErr lvfile_CloseFile(FileRefNum ioRefNum) { MgErr err = mgNoErr; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lab...@us...> - 2018-12-11 12:18:12
|
Revision: 1560 http://sourceforge.net/p/opengtoolkit/svn/1560 Author: labviewer Date: 2018-12-11 12:18:11 +0000 (Tue, 11 Dec 2018) Log Message: ----------- Some more updates to the C code to improve file information Modified Paths: -------------- trunk/lvzip/c_source/iomem.c trunk/lvzip/c_source/iomem.h trunk/lvzip/c_source/iowin.c trunk/lvzip/c_source/lvapi.c trunk/lvzip/c_source/lvapi.h trunk/lvzip/c_source/lvutil.c trunk/lvzip/c_source/lvutil.h trunk/lvzip/c_source/utf.c trunk/lvzip/c_source/zalias.h Modified: trunk/lvzip/c_source/iomem.c =================================================================== --- trunk/lvzip/c_source/iomem.c 2018-12-09 22:18:17 UTC (rev 1559) +++ trunk/lvzip/c_source/iomem.c 2018-12-11 12:18:11 UTC (rev 1560) @@ -1,7 +1,28 @@ -/* iomem.c -- Memory base function header for compress/uncompress .zip - files using zlib + zip or unzip API +/* + iomem.c -- Memory base function header for compress/uncompress .zip files + using zlib + zip or unzip API - Copyright (C) 2007 Rolf Kalbermatter + Copyright (C) 2007-2018 Rolf Kalbermatter + + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the + following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the + following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the + following disclaimer in the documentation and/or other materials provided with the distribution. + * Neither the name of SciWare, James Kring, Inc., nor the names of its contributors may be used to endorse + or promote products derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "zutil.h" Modified: trunk/lvzip/c_source/iomem.h =================================================================== --- trunk/lvzip/c_source/iomem.h 2018-12-09 22:18:17 UTC (rev 1559) +++ trunk/lvzip/c_source/iomem.h 2018-12-11 12:18:11 UTC (rev 1560) @@ -1,5 +1,7 @@ /* iomem.h -- IO base function header for compress/uncompress .zip files using zlib + zip or unzip API + + Copyright (C) 2009-2018 Rolf Kalbermatter */ #include <stdlib.h> Modified: trunk/lvzip/c_source/iowin.c =================================================================== --- trunk/lvzip/c_source/iowin.c 2018-12-09 22:18:17 UTC (rev 1559) +++ trunk/lvzip/c_source/iowin.c 2018-12-11 12:18:11 UTC (rev 1560) @@ -1,14 +1,16 @@ -/* iowin32.c -- IO base function header for compress/uncompress .zip - Version 1.1, February 14h, 2010 - part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) +/* + iowin32.c -- IO base function header for compress/uncompress .zip + + Version 1.1, February 14h, 2010 - Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) + part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) - Modifications for Zip64 support - Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) + Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) - For more info read MiniZip_info.txt + Modifications for Zip64 support + Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) + For more info read MiniZip_info.txt */ #include <stdlib.h> Modified: trunk/lvzip/c_source/lvapi.c =================================================================== --- trunk/lvzip/c_source/lvapi.c 2018-12-09 22:18:17 UTC (rev 1559) +++ trunk/lvzip/c_source/lvapi.c 2018-12-11 12:18:11 UTC (rev 1560) @@ -1,6 +1,27 @@ -/* lvapi.c -- LabVIEW interface for LabVIEW ZIP library +/* + lvapi.c -- LabVIEW interface for LabVIEW ZIP library - Copyright (C) 2009-2015 Rolf Kalbermatter + Copyright (C) 2009-2018 Rolf Kalbermatter + + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the + following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the + following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the + following disclaimer in the documentation and/or other materials provided with the distribution. + * Neither the name of SciWare, James Kring, Inc., nor the names of its contributors may be used to endorse + or promote products derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include <string.h> #include <mbstring.h> @@ -153,11 +174,16 @@ return err; } -static char version[250]; +static char version[250] = {0}; LibAPI(const char *) lvzlib_zlibVersion(void) { - snprintf(version, sizeof(version), "LabVIEW ZIP library, version: 4.1\nzlib version: %s", zlibVersion()); + if (!version[0]) + snprintf(version, sizeof(version), "LabVIEW ZIP library, version: 4.2, Dec 2018\n" + "zlib version: %s, build flags: 0x%lX\n" + "minizip version: 1.2.0, September 16th, 2017" + "aes version: 2013\n" + "bzip2 version: %s", lvzip_zlibVersion(), lvzip_zlibCompileFlags(), BZ2_bzlibVersion()); return version; } @@ -633,7 +659,7 @@ return err; } -LibAPI(MgErr) lvzlib_unzGoToFirstFile2(LVRefNum *refnum, unz_file_info64 *pfile_info, LStrHandle *fileName, LStrHandle *extraField, LStrHandle *comment) +LibAPI(MgErr) lvzlib_unzGoToFirstFile2_64(LVRefNum *refnum, unz_file_info64 *pfile_info, LStrHandle *fileName, LStrHandle *extraField, LStrHandle *comment) { unzFile node; MgErr err = lvzlibGetRefnum(refnum, &node, UnzMagic); @@ -667,7 +693,7 @@ return err; } -LibAPI(MgErr) lvzlib_unzGoToNextFile2(LVRefNum *refnum, unz_file_info64 *pfile_info, LStrHandle *fileName, LStrHandle *extraField, LStrHandle *comment) +LibAPI(MgErr) lvzlib_unzGoToNextFile2_64(LVRefNum *refnum, unz_file_info64 *pfile_info, LStrHandle *fileName, LStrHandle *extraField, LStrHandle *comment) { unzFile node; MgErr err = lvzlibGetRefnum(refnum, &node, UnzMagic); Modified: trunk/lvzip/c_source/lvapi.h =================================================================== --- trunk/lvzip/c_source/lvapi.h 2018-12-09 22:18:17 UTC (rev 1559) +++ trunk/lvzip/c_source/lvapi.h 2018-12-11 12:18:11 UTC (rev 1560) @@ -1,6 +1,27 @@ -/* lvapi.c -- LabVIEW interface for LabVIEW ZIP library +/* + lvapi.c -- LabVIEW interface for LabVIEW ZIP library - Copyright (C) 2009-2015 Rolf Kalbermatter + Copyright (C) 2009-2018 Rolf Kalbermatter + + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the + following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the + following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the + following disclaimer in the documentation and/or other materials provided with the distribution. + * Neither the name of SciWare, James Kring, Inc., nor the names of its contributors may be used to endorse + or promote products derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "lvutil.h" #include "zlib.h" @@ -34,9 +55,9 @@ LibAPI(MgErr) lvzlib_unzReadCurrentFile(LVRefNum *refnum, LStrHandle buffer); LibAPI(MgErr) lvzlib_unzCloseCurrentFile(LVRefNum *refnum); LibAPI(MgErr) lvzlib_unzGoToFirstFile(LVRefNum *refnum); -LibAPI(MgErr) lvzlib_unzGoToFirstFile64(LVRefNum *refnum, unz_file_info64 *pfile_info, LStrHandle *fileName, LStrHandle *extraField, LStrHandle *comment); +LibAPI(MgErr) lvzlib_unzGoToFirstFile2_64(LVRefNum *refnum, unz_file_info64 *pfile_info, LStrHandle *fileName, LStrHandle *extraField, LStrHandle *comment); LibAPI(MgErr) lvzlib_unzGoToNextFile(LVRefNum *refnum); -LibAPI(MgErr) lvzlib_unzGoToNextFile64(LVRefNum *refnum, unz_file_info64 *pfile_info, LStrHandle *fileName, LStrHandle *extraField, LStrHandle *comment); +LibAPI(MgErr) lvzlib_unzGoToNextFile2_64(LVRefNum *refnum, unz_file_info64 *pfile_info, LStrHandle *fileName, LStrHandle *extraField, LStrHandle *comment); LibAPI(MgErr) lvzlib_unzGoToFilePos32(LVRefNum *refnum, unz_file_pos *pos); LibAPI(MgErr) lvzlib_unzGoToFilePos64(LVRefNum *refnum, unz64_file_pos *pos); LibAPI(MgErr) lvzlib_unzGetFilePos32(LVRefNum *refnum, unz_file_pos *pos); Modified: trunk/lvzip/c_source/lvutil.c =================================================================== --- trunk/lvzip/c_source/lvutil.c 2018-12-09 22:18:17 UTC (rev 1559) +++ trunk/lvzip/c_source/lvutil.c 2018-12-11 12:18:11 UTC (rev 1560) @@ -1,9 +1,29 @@ -/* lvutil.c -- support functions for LabVIEW ZIP library +/* + lvutil.c -- support functions for LabVIEW ZIP library - Version 1.13, March 15, 2013 Version 1.25, Dec 07, 2018 Copyright (C) 2002-2018 Rolf Kalbermatter + + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the + following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the + following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the + following disclaimer in the documentation and/or other materials provided with the distribution. + * Neither the name of SciWare, James Kring, Inc., nor the names of its contributors may be used to endorse + or promote products derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #define ZLIB_INTERNAL @@ -106,9 +126,9 @@ #endif #endif -#define usesHFSPath MacOS && ProcessorType!=kX64 -#define usesPosixPath Unix || (MacOSX && ProcessorType==kX64) -#define usesWinPath Win32 +#define usesHFSPath MacOS && ProcessorType != kX64 +#define usesPosixPath Unix || (MacOSX && ProcessorType == kX64) +#define usesWinPath Win32 #if usesHFSPath #define kPathSeperator ':' @@ -1246,7 +1266,7 @@ FInfoRec infoRec; #endif - if (!path || !comment) + if (!FIsAbsPath(path) || !comment) return mgArgErr; #if Win32 && !defined(EMBEDDED) @@ -1254,7 +1274,8 @@ if (err) return err; - if (FDepth(path) == 1) + /* Find First file fails with empty path (desktop) or volume letter alone */ + if (FDepth(path) <= 1) { *isDirectory = TRUE; fi.ftCreationTime.dwLowDateTime = fi.ftCreationTime.dwHighDateTime = 0; @@ -1278,18 +1299,29 @@ { if (write) { - Win32ConvertFromLVTime(fileInfo->cDate, &fi.ftCreationTime); + Win32ConvertFromLVTime(fileInfo->cDate, &fi.ftCreationTime); Win32ConvertFromLVTime(fileInfo->mDate, &fi.ftLastWriteTime); - if (!SetFileTime(handle, &fi.ftCreationTime, &fi.ftLastAccessTime, &fi.ftLastWriteTime)) + handle = CreateFileW(UStrBuf(lstr), GENERIC_WRITE, FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL); + if (handle != INVALID_HANDLE_VALUE) + { + if (!SetFileTime(handle, &fi.ftCreationTime, &fi.ftLastAccessTime, &fi.ftLastWriteTime)) + err = Win32GetLVFileErr(); + CloseHandle(handle); + } + else err = Win32GetLVFileErr(); - fi.dwFileAttributes = GetFileAttributesA((LPCSTR)lstr->str); - if (fi.dwFileAttributes != INVALID_FILE_ATTRIBUTES) + + if (!err) { - if (fileInfo->flags & 0x4000) - fi.dwFileAttributes |= FILE_ATTRIBUTE_HIDDEN; - else - fi.dwFileAttributes &= ~FILE_ATTRIBUTE_HIDDEN; - SetFileAttributesW(UStrBuf(lstr), fi.dwFileAttributes); + fi.dwFileAttributes = GetFileAttributesW(UStrBuf(lstr)); + if (fi.dwFileAttributes != INVALID_FILE_ATTRIBUTES) + { + if (fileInfo->flags & 0x4000) + fi.dwFileAttributes |= FILE_ATTRIBUTE_HIDDEN; + else + fi.dwFileAttributes &= ~FILE_ATTRIBUTE_HIDDEN; + SetFileAttributesW(UStrBuf(lstr), fi.dwFileAttributes); + } } } else @@ -1302,27 +1334,55 @@ fileInfo->flags = (fi.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN) ? 0x4000 : 0; if (*isDirectory) { - count = 1; + if (!FDepth(path)) + { + DWORD drives = GetLogicalDrives(); + int drive; - wcscpy(UStrBuf(lstr) + UStrLen(lstr), L"\\*.*"); - if (!err) + count = 0; + for (drive = 1; drive <= 26; drive++) + { + if (drives & 01) + { + count++; + } + drives /= 2; + } + } + else { - handle = FindFirstFileW(UStrBuf(lstr), &fi); - if (handle == INVALID_HANDLE_VALUE) - count = 0; - else - while (FindNextFileW(handle, &fi)) - count++; - FindClose(handle); + count = 1; - if (FDepth(path) == 1) - fileInfo->size = count; - else - fileInfo->size = count - 2; + wcscpy(UStrBuf(lstr) + UStrLen(lstr), L"\\*.*"); + if (!err) + { + handle = FindFirstFileW(UStrBuf(lstr), &fi); + if (handle == INVALID_HANDLE_VALUE) + count = 0; + else + while (FindNextFileW(handle, &fi)) + count++; + FindClose(handle); + } } + if (FDepth(path) <= 1) + fileInfo->size = count; + else + fileInfo->size = count - 2; } else { + uInt32 type = HasRezExt(path); + if (type) + { + fileInfo->type = type; + fileInfo->creator = kLVCreatorType; + } + else + { + fileInfo->type = kUnknownFileType; + fileInfo->creator = kUnknownCreator; + } fileInfo->size = Quad(fi.nFileSizeHigh, fi.nFileSizeLow); } } @@ -1484,8 +1544,17 @@ } else { - fileInfo->type = kUnknownFileType; - fileInfo->creator = kUnknownCreator; + int32 type = HasRezExt(path); + if (type) + { + fileInfo->type = type; + fileInfo->creator = kLVCreatorType; + } + else + { + fileInfo->type = kUnknownFileType; + fileInfo->creator = kUnknownCreator; + } UnixConvertToLVTime(statbuf.st_ctime, &fileInfo->cDate); UnixConvertToLVTime(statbuf.st_mtime, &fileInfo->mDate); fileInfo->rfSize = 0; @@ -1493,11 +1562,13 @@ { DIR *dirp; struct dirent *dp; + struct direntpath dppath; + struct dirent *dpp = (struct dirent *)&dppath; if (!(dirp = opendir((const char*)lstr->str))) return UnixToLVFileErr(); - for (dp = readdir(dirp); dp; dp = readdir(dirp)) + for (dp = readdir_r(dirp, dpp); dp; dp = readdir_r(dirp, dpp)) count++; closedir(dirp); fileInfo->size = count - 2; @@ -1504,6 +1575,9 @@ } else { + /* Try to determine LabVIEW file types based on file ending? */ + // fileInfo->type = kUnknownFileType; + // fileInfo->creator = kLVCreatorType; fileInfo->size = statbuf.st_size; } } Modified: trunk/lvzip/c_source/lvutil.h =================================================================== --- trunk/lvzip/c_source/lvutil.h 2018-12-09 22:18:17 UTC (rev 1559) +++ trunk/lvzip/c_source/lvutil.h 2018-12-11 12:18:11 UTC (rev 1560) @@ -1,8 +1,29 @@ -/* lvutil.h -- support functions for macbinary +/* + lvutil.h -- support functions for LabVIEW integration - Version 1.9, Sept 17th, 2007 + Version 1.17, Dec 8th, 2018 - Copyright (C) 2002-2007 Rolf Kalbermatter + Copyright (C) 2002-2018 Rolf Kalbermatter + + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the + following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the + following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the + following disclaimer in the documentation and/or other materials provided with the distribution. + * Neither the name of SciWare, James Kring, Inc., nor the names of its contributors may be used to endorse + or promote products derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #define test #ifndef _lvUtil_H @@ -394,8 +415,8 @@ typedef struct { uInt32 type; /* handled by LabVIEW Type & Creator */ uInt32 creator; /* handled by LabVIEW Type & Creator */ - uInt64 size; /* not modified, use EOF */ - uInt64 rfSize; /* Mac only, not modified, use EOF */ + uInt64 size; + uInt64 rfSize; uInt32 cDate; uInt32 mDate; uInt16 flags; @@ -407,10 +428,10 @@ typedef enum _FMFileType { - kInvalidType =0, - kUnknownFileType=RTToL('?','?','?','?'), - kTextFileType =RTToL('T','E','X','T'), - kLinkFileType =RTToL('s','l','n','k'), + kInvalidType = 0, + kUnknownFileType= RTToL('?','?','?','?'), + kTextFileType = RTToL('T','E','X','T'), + kLinkFileType = RTToL('s','l','n','k'), /** Typical directory types */ kHardDiskDirType= RTToL('h','d','s','k'), kFloppyDirType = RTToL('f','l','p','y'), @@ -549,6 +570,7 @@ Path FNotAPath(Path); Bool32 FIsAPath(Path path); Bool32 FIsAbsPath(Path path); +Bool32 FIsEmptyPath(Path path); MgErr FTextToPath(UPtr str, int32 len, Path* path); MgErr FPathToText(Path path, LStrPtr lstr); MgErr FPathToPath(Path *p); @@ -572,7 +594,8 @@ MgErr FMRead(File fd, int32 inCount, int32* outCount, UPtr buffer); MgErr FMWrite(File fd, int32 inCount, int32* outCount, UPtr buffer); MgErr FListDir(ConstPath path, FDirEntHandle list, FMListDetails **); -int32 PStrHasRezExt(PStr str); +uInt32 PStrHasRezExt(PStr str); +uInt32 HasRezExt(Path path); int32 DbgPrintf(CStr fmt, ...); Modified: trunk/lvzip/c_source/utf.c =================================================================== --- trunk/lvzip/c_source/utf.c 2018-12-09 22:18:17 UTC (rev 1559) +++ trunk/lvzip/c_source/utf.c 2018-12-11 12:18:11 UTC (rev 1560) @@ -1,3 +1,28 @@ +/* + utf.c - Support routines for Unicode text format conversions between the different sizes + + Copyright (C) 2015-2018 Rolf Kalbermatter + + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the + following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the + following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the + following disclaimer in the documentation and/or other materials provided with the distribution. + * Neither the name of SciWare, James Kring, Inc., nor the names of its contributors may be used to endorse + or promote products derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ #include "zlib.h" #include "lvutil.h" #include "utf.h" Modified: trunk/lvzip/c_source/zalias.h =================================================================== --- trunk/lvzip/c_source/zalias.h 2018-12-09 22:18:17 UTC (rev 1559) +++ trunk/lvzip/c_source/zalias.h 2018-12-11 12:18:11 UTC (rev 1560) @@ -1,3 +1,33 @@ +/* + zalias.h -- name aliasing for all the zlib and minizip library functions to avoid name clashes in the VxWorks + implementation. VxWorks seems to only use a single gloabal symbol table where all the exported functions of the + process and any loaded shared library are placed into. Since the LabVIEW runtime contains a subset of the zlib + and minizip library for its own ZIP functionality, loading of this shared library silently fails if it uses the + same exported symbols. This was found and reported by some NI developer after I asked about why the cRIO shared + library would not work at all, so the solution is to rename all the symbols here to avoid any name clashes. + + Copyright (C) 2007-2018 Rolf Kalbermatter + + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the + following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the + following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the + following disclaimer in the documentation and/or other materials provided with the distribution. + * Neither the name of SciWare, James Kring, Inc., nor the names of its contributors may be used to endorse + or promote products derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ #define Z_PREFIX_SET #define _dist_code lvzip__dist_code #define _length_code lvzip__length_code @@ -60,6 +90,7 @@ #define unzClose lvzip_unzClose #define unzClose2 lvzip_unzClose2 #define unzCloseCurrentFile lvzip_unzCloseCurrentFile +#define unzEndOfFile lvzip_unzEndOfFile #define unzGetCurrentFileInfo lvzip_unzGetCurrentFileInfo #define unzGetCurrentFileInfo64 lvzip_unzGetCurrentFileInfo64 #define unzGetCurrentFileZStreamPos64 lvzip_unzGetCurrentFileZStreamPos64 @@ -91,9 +122,10 @@ #define unzSetOffset lvzip_unzSetOffset #define unzSetOffset64 lvzip_unzSetOffset64 #define unzStringFileNameCompare lvzip_unzStringFileNameCompare -#define unztell lvzip_unztell -#define unztell64 lvzip_unztell64 -#define unzeof lvzip_unzeof +#define unzSeek lvzip_unzSeek +#define unzSeek64 lvzip_unzSeek64 +#define unzTell lvzip_unzTell +#define unzTell64 lvzip_unzTell64 #define zipClose lvzip_zipClose #define zipClose2 lvzip_zipClose2 #define zipCloseFileInZip lvzip_zipCloseFileInZip @@ -104,6 +136,7 @@ #define zipOpen2 lvzip_zipOpen2 #define zipOpen2_64 lvzip_zipOpen2_64 #define zipOpen3 lvzip_zipOpen3 +#define zipOpen3_64 lvzip_zipOpen3_64 #define zipOpenNewFileInZip lvzip_zipOpenNewFileInZip #define zipOpenNewFileInZip64 lvzip_zipOpenNewFileInZip64 #define zipOpenNewFileInZip2 lvzip_zipOpenNewFileInZip2 @@ -112,6 +145,7 @@ #define zipOpenNewFileInZip3_64 lvzip_zipOpenNewFileInZip3_64 #define zipOpenNewFileInZip4 lvzip_zipOpenNewFileInZip4 #define zipOpenNewFileInZip4_64 lvzip_zipOpenNewFileInZip4_64 +#define zipOpenNewFileInZip5 lvzip_zipOpenNewFileInZip5 #define zipRemoveExtraInfoBlock lvzip_zipRemoveExtraInfoBlock #define zipWriteInFileInZip lvzip_zipWriteInFileInZip #define gzopen lvzip_gzopen @@ -142,5 +176,5 @@ #define gztell64 lvzip_gztell64 #define gzoffset lvzip_gzoffset #define gzoffset64 lvzip_gzoffset64 -#define gcrc32_combine lvzip_crc32_combine -#define gcrc32_combine64 lvzip_crc32_combine64 +#define gcrc32_combine lvzip_gcrc32_combine +#define gcrc32_combine64 lvzip_gcrc32_combine64 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lab...@us...> - 2018-12-09 22:18:19
|
Revision: 1559 http://sourceforge.net/p/opengtoolkit/svn/1559 Author: labviewer Date: 2018-12-09 22:18:17 +0000 (Sun, 09 Dec 2018) Log Message: ----------- Add summary of al licenses used in this library Added Paths: ----------- trunk/lvzip/source/LICENSE.txt Added: trunk/lvzip/source/LICENSE.txt =================================================================== --- trunk/lvzip/source/LICENSE.txt (rev 0) +++ trunk/lvzip/source/LICENSE.txt 2018-12-09 22:18:17 UTC (rev 1559) @@ -0,0 +1,163 @@ +LabVIEW VIs are provided under the following license: + +Copyright (C) 2002-2018 Rolf Kalbermatter rol...@gm... +Copyright (C) 2002 Jim Kring ji...@ji... + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the +following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the + following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the + following disclaimer in the documentation and/or other materials provided with the distribution. + * Neither the name of SciWare, James Kring, Inc., nor the names of its contributors may be used to endorse + or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +============================================================================== +The shared library contains code under following licenses: + + +The LabVIEW specific extensions are under the BSD 3-clause license: + + Copyright (C) 2004-2018 Rolf Kalbermatter, rol...@gm... + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the +following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the + following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the + following disclaimer in the documentation and/or other materials provided with the distribution. + * Neither the name of SciWare, James Kring, Inc., nor the names of its contributors may be used to endorse + or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +--------------------------------------------------------------------------- +The ZLIB library part itself is under the ZLIB license: + + version 1.2.11, January 15th, 2017 + + Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler + + 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. + + Jean-loup Gailly Mark Adler + jl...@gz... ma...@al... + + With additional code from Xavier Roche, Copyright 2004 + + The data format used by the zlib library is described by RFCs (Request for + Comments) 1950 to 1952 in the files http://tools.ietf.org/html/rfc1950 + (zlib format), rfc1951 (deflate format) and rfc1952 (gzip format). + +--------------------------------------------------------------------------- +The MiniZIP part is under the ZLIB license with following copyrights: + + Version 1.2.0, September 16th, 2017 + sample part of the MiniZip project + + Copyright (C) 2012-2017 Nathan Moinvaziri + https://github.com/nmoinvaz/minizip + Copyright (C) 2009-2010 Mathias Svensson + Modifications for Zip64 support + http://result42.com + Copyright (C) 2007-2008 Even Rouault + Modifications of Unzip for Zip64 + Copyright (C) 1998-2010 Gilles Vollant + http://www.winimage.com/zLibDll/minizip.html + + This program is distributed under the terms of the same license as zlib. + See the accompanying license text above for the full text of that license. + +--------------------------------------------------------------------------- + +The AES encryption code is under the following license: + + Copyright (c) 1998-2013, Brian Gladman, Worcester, UK. All rights reserved. + +The redistribution and use of this software (with or without changes) +is allowed without the payment of fees or royalties provided that: + + source code distributions include the above copyright notice, this + list of conditions and the following disclaimer; + + binary distributions include the above copyright notice, this list + of conditions and the following disclaimer in their documentation. + +This software is provided 'as is' with no explicit or implied warranties +in respect of its operation, including, but not limited to, correctness +and fitness for purpose. + +--------------------------------------------------------------------------- +The BZIP2 part is under the following license: + +This program, "bzip2", the associated library "libbzip2", and all +documentation, are copyright (C) 1996-2010 Julian R Seward. All +rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. 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. + +3. Altered source versions must be plainly marked as such, and must + not be misrepresented as being the original software. + +4. The name of the author may not be used to endorse or promote + products derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS +OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Julian Seward, js...@bz... +bzip2/libbzip2 version 1.0.6 of 6 September 2010 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |