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...> - 2018-12-09 21:09:34
|
Revision: 1558 http://sourceforge.net/p/opengtoolkit/svn/1558 Author: labviewer Date: 2018-12-09 21:09:30 +0000 (Sun, 09 Dec 2018) Log Message: ----------- Add unzGotToFirstFile2 and unzGoToNextFile2 function for optimization Modified Paths: -------------- trunk/lvzip/source/fileutil.llb/FILE Copy Fork From File.vi trunk/lvzip/source/fileutil.llb/FILE Copy Fork To File.vi trunk/lvzip/source/fileutil.llb/FILE Create Link.vi trunk/lvzip/source/fileutil.llb/FILE Get Directory Content.vi trunk/lvzip/source/fileutil.llb/FILE Has Resource Fork.vi trunk/lvzip/source/fileutil.llb/FILE Open File Refnum.vi trunk/lvzip/source/fileutil.llb/FILE Read Link Target.vi trunk/lvzip/source/fileutil.llb/FILE Resource File Info.vi trunk/lvzip/source/fileutil.llb/FILE Size Padding.vi trunk/lvzip/source/fileutil.llb/FILE VI Tree.vi trunk/lvzip/source/lvzip.llb/ZLIB Close Read File.vi trunk/lvzip/source/lvzip.llb/ZLIB Close Zip Archive.vi trunk/lvzip/source/lvzip.llb/ZLIB Compress Directory.vi trunk/lvzip/source/lvzip.llb/ZLIB Compress Files.vi 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 Deflate.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 Old.vi trunk/lvzip/source/lvzip.llb/ZLIB Get Current File Info.vi trunk/lvzip/source/lvzip.llb/ZLIB Get Global 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 Inflate.vi trunk/lvzip/source/lvzip.llb/ZLIB Open Unzip Archive.vi trunk/lvzip/source/lvzip.llb/ZLIB Open Unzip Stream.vi trunk/lvzip/source/lvzip.llb/ZLIB Open Write File.vi trunk/lvzip/source/lvzip.llb/ZLIB Open Zip Archive.vi trunk/lvzip/source/lvzip.llb/ZLIB Open Zip Stream.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 Uncompress File Info.ctl trunk/lvzip/source/lvzip.llb/ZLIB VI Tree.vi Modified: trunk/lvzip/source/fileutil.llb/FILE Copy Fork From File.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/source/fileutil.llb/FILE Copy Fork To File.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/source/fileutil.llb/FILE Create Link.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/source/fileutil.llb/FILE Get Directory Content.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/source/fileutil.llb/FILE Has Resource Fork.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/source/fileutil.llb/FILE Open File Refnum.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/source/fileutil.llb/FILE Read Link Target.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/source/fileutil.llb/FILE Resource File Info.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/source/fileutil.llb/FILE Size Padding.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/source/fileutil.llb/FILE VI Tree.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/source/lvzip.llb/ZLIB Close Read File.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/source/lvzip.llb/ZLIB Close Zip Archive.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/source/lvzip.llb/ZLIB Compress Directory.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/source/lvzip.llb/ZLIB Compress Files.vi =================================================================== (Binary files differ) 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 Deflate.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 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 Global 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 Inflate.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/source/lvzip.llb/ZLIB Open Unzip Archive.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/source/lvzip.llb/ZLIB Open Unzip Stream.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 Open Zip Archive.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/source/lvzip.llb/ZLIB Open Zip Stream.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 Uncompress File Info.ctl =================================================================== (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-09 21:01:19
|
Revision: 1557 http://sourceforge.net/p/opengtoolkit/svn/1557 Author: labviewer Date: 2018-12-09 21:01:17 +0000 (Sun, 09 Dec 2018) Log Message: ----------- Optimize Add GotToFirstFile2 and GoToNextFile2 function Modified Paths: -------------- trunk/lvzip/c_source/lvapi.c trunk/lvzip/c_source/lvapi.h trunk/lvzip/c_source/unzip.h trunk/lvzip/c_source/zalias.h Modified: trunk/lvzip/c_source/lvapi.c =================================================================== --- trunk/lvzip/c_source/lvapi.c 2018-12-09 16:18:48 UTC (rev 1556) +++ trunk/lvzip/c_source/lvapi.c 2018-12-09 21:01:17 UTC (rev 1557) @@ -444,6 +444,30 @@ return err; } +static MgErr RetrieveFileInfo(unzFile node, 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) + { + err = NumericArrayResize(uB, 1, (UHandle*)fileName, sizeFileName); + if (!err) + { + 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)); + if (!err) + { + LStrLen(**extraField) = sizeExtraField; + LStrLen(**fileName) = sizeFileName; + LStrLen(**comment) = sizeComment; + } + } + } + } + return err; +} + /**************************************************************************************************** * * Retrieve the file information for the currently selected file entry @@ -468,26 +492,7 @@ err = LibToMgErr(unzGetCurrentFileInfo(node, pfile_info, NULL, 0, NULL, 0, NULL, 0)); if (!err) { - err = NumericArrayResize(uB, 1, (UHandle*)extraField, pfile_info->size_file_extra); - if (!err) - { - err = NumericArrayResize(uB, 1, (UHandle*)fileName, pfile_info->size_filename); - if (!err) - { - err = NumericArrayResize(uB, 1, (UHandle*)comment, pfile_info->size_file_comment); - if (!err) - { - err = LibToMgErr(unzGetCurrentFileInfo(node, pfile_info, (char*)LStrBuf(**fileName), pfile_info->size_filename, - LStrBuf(**extraField), pfile_info->size_file_extra, (char*)LStrBuf(**comment), pfile_info->size_file_comment)); - if (!err) - { - LStrLen(**extraField) = pfile_info->size_file_extra; - LStrLen(**fileName) = pfile_info->size_filename; - LStrLen(**comment) = pfile_info->size_file_comment; - } - } - } - } + err = RetrieveFileInfo(node, fileName, pfile_info->size_filename, extraField, pfile_info->size_file_extra, comment, pfile_info->size_file_comment); } } return err; @@ -503,26 +508,7 @@ err = LibToMgErr(unzGetCurrentFileInfo64(node, pfile_info, NULL, 0, NULL, 0, NULL, 0)); if (!err) { - err = NumericArrayResize(uB, 1, (UHandle*)extraField, pfile_info->size_file_extra); - if (!err) - { - err = NumericArrayResize(uB, 1, (UHandle*)fileName, pfile_info->size_filename); - if (!err) - { - err = NumericArrayResize(uB, 1, (UHandle*)comment, pfile_info->size_file_comment); - if (!err) - { - err = LibToMgErr(unzGetCurrentFileInfo64(node, pfile_info, (char*)LStrBuf(**fileName), pfile_info->size_filename, - LStrBuf(**extraField), pfile_info->size_file_extra, (char*)LStrBuf(**comment), pfile_info->size_file_comment)); - if (!err) - { - LStrLen(**extraField) = pfile_info->size_file_extra; - LStrLen(**fileName) = pfile_info->size_filename; - LStrLen(**comment) = pfile_info->size_file_comment; - } - } - } - } + err = RetrieveFileInfo(node, fileName, pfile_info->size_filename, extraField, pfile_info->size_file_extra, comment, pfile_info->size_file_comment); } } return err; @@ -647,6 +633,21 @@ return err; } +LibAPI(MgErr) lvzlib_unzGoToFirstFile2(LVRefNum *refnum, unz_file_info64 *pfile_info, LStrHandle *fileName, LStrHandle *extraField, LStrHandle *comment) +{ + unzFile node; + MgErr err = lvzlibGetRefnum(refnum, &node, UnzMagic); + if (!err) + { + 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); + } + } + return err; +} + /**************************************************************************************************** * * Positions the pointer to the next file entre in the archive @@ -666,6 +667,21 @@ return err; } +LibAPI(MgErr) lvzlib_unzGoToNextFile2(LVRefNum *refnum, unz_file_info64 *pfile_info, LStrHandle *fileName, LStrHandle *extraField, LStrHandle *comment) +{ + unzFile node; + MgErr err = lvzlibGetRefnum(refnum, &node, UnzMagic); + if (!err) + { + 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); + } + } + return err; +} + /**************************************************************************************************** * * Low level function to position the current read pointer at a specific location inside the archive Modified: trunk/lvzip/c_source/lvapi.h =================================================================== --- trunk/lvzip/c_source/lvapi.h 2018-12-09 16:18:48 UTC (rev 1556) +++ trunk/lvzip/c_source/lvapi.h 2018-12-09 21:01:17 UTC (rev 1557) @@ -34,7 +34,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_unzGoToNextFile(LVRefNum *refnum); +LibAPI(MgErr) lvzlib_unzGoToNextFile64(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/unzip.h =================================================================== --- trunk/lvzip/c_source/unzip.h 2018-12-09 16:18:48 UTC (rev 1556) +++ trunk/lvzip/c_source/unzip.h 2018-12-09 21:01:17 UTC (rev 1557) @@ -75,46 +75,47 @@ /* unz_file_info contain information about a file in the zipfile */ typedef struct unz_file_info64_s { - uint16_t version; /* version made by 2 bytes */ - uint16_t version_needed; /* version needed to extract 2 bytes */ - uint16_t flag; /* general purpose bit flag 2 bytes */ - uint16_t compression_method; /* compression method 2 bytes */ - uint32_t dos_date; /* last mod file date in Dos fmt 4 bytes */ - uint32_t crc; /* crc-32 4 bytes */ - uint64_t compressed_size; /* compressed size 8 bytes */ - uint64_t uncompressed_size; /* uncompressed size 8 bytes */ - uint16_t size_filename; /* filename length 2 bytes */ - uint16_t size_file_extra; /* extra field length 2 bytes */ - uint16_t size_file_comment; /* file comment length 2 bytes */ - - uint32_t disk_num_start; /* disk number start 4 bytes */ - uint16_t internal_fa; /* internal file attributes 2 bytes */ - uint32_t external_fa; /* external file attributes 4 bytes */ - - uint64_t disk_offset; - - uint16_t size_file_extra_internal; + uint16_t version; /* version made by 2 bytes, 2 */ + uint16_t version_needed; /* version needed to extract 2 bytes, 4 */ + uint16_t flag; /* general purpose bit flag 2 bytes, 6 */ + uint16_t compression_method; /* compression method 2 bytes, 8 */ + uint32_t dos_date; /* last mod file date in Dos fmt 4 bytes, 12 */ + uint32_t crc; /* crc-32 4 bytes, 16 */ + uint64_t compressed_size; /* compressed size 8 bytes, 24 */ + uint64_t uncompressed_size; /* uncompressed size 8 bytes, 32 */ + 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 */ + 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 */ + uint32_t external_fa; /* external file attributes 4 bytes, 52 */ + uint32_t padding3; /* filler3 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 { - uint16_t version; /* version made by 2 bytes */ - uint16_t version_needed; /* version needed to extract 2 bytes */ - uint16_t flag; /* general purpose bit flag 2 bytes */ - uint16_t compression_method; /* compression method 2 bytes */ - uint32_t dos_date; /* last mod file date in Dos fmt 4 bytes */ - uint32_t crc; /* crc-32 4 bytes */ - uint32_t compressed_size; /* compressed size 4 bytes */ - uint32_t uncompressed_size; /* uncompressed size 4 bytes */ - uint16_t size_filename; /* filename length 2 bytes */ - uint16_t size_file_extra; /* extra field length 2 bytes */ - uint16_t size_file_comment; /* file comment length 2 bytes */ + uint16_t version; /* version made by 2 bytes, 2 */ + uint16_t version_needed; /* version needed to extract 2 bytes, 4 */ + uint16_t flag; /* general purpose bit flag 2 bytes, 6 */ + uint16_t compression_method; /* compression method 2 bytes, 8 */ + uint32_t dos_date; /* last mod file date in Dos fmt 4 bytes, 12 */ + uint32_t crc; /* crc-32 4 bytes, 16 */ + uint32_t compressed_size; /* compressed size 4 bytes, 20 */ + uint32_t uncompressed_size; /* uncompressed size 4 bytes, 24 */ + uint16_t size_filename; /* filename length 2 bytes, 26 */ + uint16_t size_file_extra; /* extra field length 2 bytes, 28 */ + uint16_t size_file_comment; /* file comment length 2 bytes, 30 */ + + 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 */ + uint32_t external_fa; /* external file attributes 4 bytes, 40 */ - uint16_t disk_num_start; /* disk number start 2 bytes */ - uint16_t internal_fa; /* internal file attributes 2 bytes */ - uint32_t external_fa; /* external file attributes 4 bytes */ - - uint64_t disk_offset; + uint64_t disk_offset; /* disk offset 8 bytes, 48 */ } unz_file_info; /***************************************************************************/ Modified: trunk/lvzip/c_source/zalias.h =================================================================== --- trunk/lvzip/c_source/zalias.h 2018-12-09 16:18:48 UTC (rev 1556) +++ trunk/lvzip/c_source/zalias.h 2018-12-09 21:01:17 UTC (rev 1557) @@ -74,7 +74,9 @@ #define unzGoToFilePos lvzip_unzGoToFilePos #define unzGoToFilePos64 lvzip_unzGoToFilePos64 #define unzGoToFirstFile lvzip_unzGoToFirstFile +#define unzGoToFirstFile2 lvzip_unzGoToFirstFile2 #define unzGoToNextFile lvzip_unzGoToNextFile +#define unzGoToNextFile2 lvzip_unzGoToNextFile2 #define unzLocateFile lvzip_unzLocateFile #define unzOpen lvzip_unzOpen #define unzOpen64 lvzip_unzOpen64 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lab...@us...> - 2018-12-09 16:18:49
|
Revision: 1556 http://sourceforge.net/p/opengtoolkit/svn/1556 Author: labviewer Date: 2018-12-09 16:18:48 +0000 (Sun, 09 Dec 2018) Log Message: ----------- Support functions for symbolic link recompiled and updated Modified Paths: -------------- trunk/lvzip/source/fileutil.llb/FILE Copy Fork From File.vi trunk/lvzip/source/fileutil.llb/FILE Get Directory Content.vi trunk/lvzip/source/fileutil.llb/FILE Read Link Target.vi trunk/lvzip/source/macbin.llb/MACBIN Resource File Info.vi Added Paths: ----------- trunk/lvzip/source/fileutil.llb/FILE Create Link.vi trunk/lvzip/source/fileutil.llb/FILE VI Tree.vi Modified: trunk/lvzip/source/fileutil.llb/FILE Copy Fork From File.vi =================================================================== (Binary files differ) Added: trunk/lvzip/source/fileutil.llb/FILE Create Link.vi =================================================================== (Binary files differ) Index: trunk/lvzip/source/fileutil.llb/FILE Create Link.vi =================================================================== --- trunk/lvzip/source/fileutil.llb/FILE Create Link.vi 2018-12-09 16:17:42 UTC (rev 1555) +++ trunk/lvzip/source/fileutil.llb/FILE Create Link.vi 2018-12-09 16:18:48 UTC (rev 1556) Property changes on: trunk/lvzip/source/fileutil.llb/FILE Create Link.vi ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Modified: trunk/lvzip/source/fileutil.llb/FILE Get Directory Content.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/source/fileutil.llb/FILE Read Link Target.vi =================================================================== (Binary files differ) Added: trunk/lvzip/source/fileutil.llb/FILE VI Tree.vi =================================================================== (Binary files differ) Index: trunk/lvzip/source/fileutil.llb/FILE VI Tree.vi =================================================================== --- trunk/lvzip/source/fileutil.llb/FILE VI Tree.vi 2018-12-09 16:17:42 UTC (rev 1555) +++ trunk/lvzip/source/fileutil.llb/FILE VI Tree.vi 2018-12-09 16:18:48 UTC (rev 1556) Property changes on: trunk/lvzip/source/fileutil.llb/FILE VI Tree.vi ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Modified: trunk/lvzip/source/macbin.llb/MACBIN Resource File Info.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-09 16:17:45
|
Revision: 1555 http://sourceforge.net/p/opengtoolkit/svn/1555 Author: labviewer Date: 2018-12-09 16:17:42 +0000 (Sun, 09 Dec 2018) Log Message: ----------- Update tests from recompilation and minor improvements Modified Paths: -------------- trunk/lvzip/tests/lvzip-test add to empty archive.vi trunk/lvzip/tests/lvzip-test-delete files from archive.vi trunk/lvzip/tests/lvzip-test-encoding.vi trunk/lvzip/tests/lvzip-test-lg bin files.vi trunk/lvzip/tests/lvzip-test-memory stream.vi trunk/lvzip/tests/lvzip-test-sm text files.vi trunk/lvzip/tests/lvzip-test-string compress.vi Modified: trunk/lvzip/tests/lvzip-test add to empty archive.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/tests/lvzip-test-delete files from archive.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/tests/lvzip-test-encoding.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/tests/lvzip-test-lg bin files.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/tests/lvzip-test-memory stream.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/tests/lvzip-test-sm text files.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/tests/lvzip-test-string compress.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-09 16:16:49
|
Revision: 1554 http://sourceforge.net/p/opengtoolkit/svn/1554 Author: labviewer Date: 2018-12-09 16:16:47 +0000 (Sun, 09 Dec 2018) Log Message: ----------- Update VI library to adapt to new Minizip 1.2 version Modified Paths: -------------- trunk/lvzip/source/lvzip.llb/ZLIB Close Read File.vi trunk/lvzip/source/lvzip.llb/ZLIB Close Unzip Archive.vi trunk/lvzip/source/lvzip.llb/ZLIB Close Zip Archive.vi trunk/lvzip/source/lvzip.llb/ZLIB Compress Directory.vi trunk/lvzip/source/lvzip.llb/ZLIB Compress File Info.ctl trunk/lvzip/source/lvzip.llb/ZLIB Compress Files.vi trunk/lvzip/source/lvzip.llb/ZLIB Convert File Info.vi trunk/lvzip/source/lvzip.llb/ZLIB Deflate.vi 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 File Info.ctl trunk/lvzip/source/lvzip.llb/ZLIB File Information.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 Inflate.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 Uncompress File Info.ctl trunk/lvzip/source/lvzip.llb/ZLIB VI Tree.vi trunk/lvzip/source/lvzlib.dll trunk/lvzip/source/lvzlib64.dll Modified: trunk/lvzip/source/lvzip.llb/ZLIB Close Read File.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/source/lvzip.llb/ZLIB Close Unzip Archive.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/source/lvzip.llb/ZLIB Close Zip Archive.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/source/lvzip.llb/ZLIB Compress Directory.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/source/lvzip.llb/ZLIB Compress File Info.ctl =================================================================== (Binary files differ) Modified: trunk/lvzip/source/lvzip.llb/ZLIB Compress Files.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/source/lvzip.llb/ZLIB Convert File Info.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/source/lvzip.llb/ZLIB Deflate.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.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 File Information.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 Inflate.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 Uncompress File Info.ctl =================================================================== (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) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lab...@us...> - 2018-12-09 16:15:04
|
Revision: 1553 http://sourceforge.net/p/opengtoolkit/svn/1553 Author: labviewer Date: 2018-12-09 16:15:03 +0000 (Sun, 09 Dec 2018) Log Message: ----------- Fix several small errors caused by new code Modified Paths: -------------- trunk/lvzip/c_source/compress.c trunk/lvzip/c_source/deflate.c trunk/lvzip/c_source/inflate.c trunk/lvzip/c_source/lvapi.c trunk/lvzip/c_source/lvapi.h trunk/lvzip/c_source/lvutil.c trunk/lvzip/c_source/trees.c trunk/lvzip/c_source/uncompr.c trunk/lvzip/c_source/zalias.h trunk/lvzip/c_source/zlib.h trunk/lvzip/c_source/zlibvc.vcproj Modified: trunk/lvzip/c_source/compress.c =================================================================== --- trunk/lvzip/c_source/compress.c 2018-12-09 16:12:42 UTC (rev 1552) +++ trunk/lvzip/c_source/compress.c 2018-12-09 16:15:03 UTC (rev 1553) @@ -53,7 +53,7 @@ err = deflate(&stream, sourceLen ? Z_NO_FLUSH : Z_FINISH); } while (err == Z_OK); - *destLen = stream.total_out; + *destLen = (uLongf)stream.total_out; deflateEnd(&stream); return err == Z_STREAM_END ? Z_OK : err; } Modified: trunk/lvzip/c_source/deflate.c =================================================================== --- trunk/lvzip/c_source/deflate.c 2018-12-09 16:12:42 UTC (rev 1552) +++ trunk/lvzip/c_source/deflate.c 2018-12-09 16:15:03 UTC (rev 1553) @@ -198,8 +198,7 @@ * bit values at the expense of memory usage). We slide even when level == 0 to * keep the hash table consistent if we switch back to level > 0 later. */ -local void slide_hash(s) - deflate_state *s; +local void slide_hash(deflate_state *s) { unsigned n, m; Posf *p; @@ -338,8 +337,7 @@ /* ========================================================================= * Check for a valid deflate stream state. Return 0 if ok, 1 if not. */ -local int deflateStateCheck (strm) - z_streamp strm; +local int deflateStateCheck(z_streamp strm) { deflate_state *s; if (strm == Z_NULL || Modified: trunk/lvzip/c_source/inflate.c =================================================================== --- trunk/lvzip/c_source/inflate.c 2018-12-09 16:12:42 UTC (rev 1552) +++ trunk/lvzip/c_source/inflate.c 2018-12-09 16:15:03 UTC (rev 1553) @@ -115,8 +115,7 @@ return 0; } -int ZEXPORT inflateResetKeep(strm) -z_streamp strm; +int ZEXPORT inflateResetKeep(z_streamp strm) { struct inflate_state FAR *state; @@ -140,8 +139,7 @@ return Z_OK; } -int ZEXPORT inflateReset(strm) -z_streamp strm; +int ZEXPORT inflateReset(z_streamp strm) { struct inflate_state FAR *state; @@ -153,9 +151,7 @@ return inflateResetKeep(strm); } -int ZEXPORT inflateReset2(strm, windowBits) -z_streamp strm; -int windowBits; +int ZEXPORT inflateReset2(z_streamp strm, int windowBits) { int wrap; struct inflate_state FAR *state; @@ -191,11 +187,7 @@ return inflateReset(strm); } -int ZEXPORT inflateInit2_(strm, windowBits, version, stream_size) -z_streamp strm; -int windowBits; -const char *version; -int stream_size; +int ZEXPORT inflateInit2_(z_streamp strm, int windowBits, const char *version, int stream_size) { int ret; struct inflate_state FAR *state; @@ -235,18 +227,12 @@ return ret; } -int ZEXPORT inflateInit_(strm, version, stream_size) -z_streamp strm; -const char *version; -int stream_size; +int ZEXPORT inflateInit_(z_streamp strm, const char *version, int stream_size) { return inflateInit2_(strm, DEF_WBITS, version, stream_size); } -int ZEXPORT inflatePrime(strm, bits, value) -z_streamp strm; -int bits; -int value; +int ZEXPORT inflatePrime(z_streamp strm, int bits, int value) { struct inflate_state FAR *state; @@ -274,8 +260,7 @@ used for threaded applications, since the rewriting of the tables and virgin may not be thread-safe. */ -local void fixedtables(state) -struct inflate_state FAR *state; +local void fixedtables(struct inflate_state FAR *state) { #ifdef BUILDFIXED static int virgin = 1; @@ -392,10 +377,7 @@ output will fall in the output data, making match copies simpler and faster. The advantage may be dependent on the size of the processor's data caches. */ -local int updatewindow(strm, end, copy) -z_streamp strm; -const Bytef *end; -unsigned copy; +local int updatewindow(z_streamp strm, const Bytef *end, unsigned copy) { struct inflate_state FAR *state; unsigned dist; @@ -618,9 +600,7 @@ will return Z_BUF_ERROR if it has not reached the end of the stream. */ -int ZEXPORT inflate(strm, flush) -z_streamp strm; -int flush; +int ZEXPORT inflate(z_streamp strm, int flush) { struct inflate_state FAR *state; z_const unsigned char FAR *next; /* next input */ @@ -1273,8 +1253,7 @@ return ret; } -int ZEXPORT inflateEnd(strm) -z_streamp strm; +int ZEXPORT inflateEnd(z_streamp strm) { struct inflate_state FAR *state; if (inflateStateCheck(strm)) @@ -1287,10 +1266,7 @@ return Z_OK; } -int ZEXPORT inflateGetDictionary(strm, dictionary, dictLength) -z_streamp strm; -Bytef *dictionary; -uInt *dictLength; +int ZEXPORT inflateGetDictionary(z_streamp strm, Bytef *dictionary, uInt *dictLength) { struct inflate_state FAR *state; @@ -1310,10 +1286,7 @@ return Z_OK; } -int ZEXPORT inflateSetDictionary(strm, dictionary, dictLength) -z_streamp strm; -const Bytef *dictionary; -uInt dictLength; +int ZEXPORT inflateSetDictionary(z_streamp strm, const Bytef *dictionary, uInt dictLength) { struct inflate_state FAR *state; unsigned long dictid; @@ -1345,9 +1318,7 @@ return Z_OK; } -int ZEXPORT inflateGetHeader(strm, head) -z_streamp strm; -gz_headerp head; +int ZEXPORT inflateGetHeader(z_streamp strm, gz_headerp head) { struct inflate_state FAR *state; @@ -1373,10 +1344,7 @@ called again with more data and the *have state. *have is initialized to zero for the first call. */ -local unsigned syncsearch(have, buf, len) -unsigned FAR *have; -const unsigned char FAR *buf; -unsigned len; +local unsigned syncsearch(unsigned FAR *have, const unsigned char FAR *buf, unsigned len) { unsigned got; unsigned next; @@ -1396,11 +1364,10 @@ return next; } -int ZEXPORT inflateSync(strm) -z_streamp strm; +int ZEXPORT inflateSync(z_streamp strm) { unsigned len; /* number of bytes to look at or looked at */ - unsigned long in, out; /* temporary to save total_in and total_out */ + uint64_t in, out; /* temporary to save total_in and total_out */ unsigned char buf[4]; /* to restore bit buffer to byte string */ struct inflate_state FAR *state; @@ -1447,8 +1414,7 @@ block. When decompressing, PPP checks that at the end of input packet, inflate is waiting for these length bytes. */ -int ZEXPORT inflateSyncPoint(strm) -z_streamp strm; +int ZEXPORT inflateSyncPoint(z_streamp strm) { struct inflate_state FAR *state; @@ -1457,9 +1423,7 @@ return state->mode == STORED && state->bits == 0; } -int ZEXPORT inflateCopy(dest, source) -z_streamp dest; -z_streamp source; +int ZEXPORT inflateCopy(z_streamp dest, z_streamp source) { struct inflate_state FAR *state; struct inflate_state FAR *copy; @@ -1504,9 +1468,7 @@ return Z_OK; } -int ZEXPORT inflateUndermine(strm, subvert) -z_streamp strm; -int subvert; +int ZEXPORT inflateUndermine(z_streamp strm, int subvert) { struct inflate_state FAR *state; Modified: trunk/lvzip/c_source/lvapi.c =================================================================== --- trunk/lvzip/c_source/lvapi.c 2018-12-09 16:12:42 UTC (rev 1552) +++ trunk/lvzip/c_source/lvapi.c 2018-12-09 16:15:03 UTC (rev 1553) @@ -2,12 +2,13 @@ Copyright (C) 2009-2015 Rolf Kalbermatter */ +#include <string.h> +#include <mbstring.h> #define ZLIB_INTERNAL #include "zlib.h" #include "lvutil.h" #include "zip.h" #include "unzip.h" -#include <string.h> #include "lvapi.h" #ifndef VERSIONMADEBY @@ -180,7 +181,7 @@ LibAPI(MgErr) lvzlib_zipOpen(const void *pathname, int append, LStrHandle *globalcomment, zlib_filefunc64_def* filefuncs, LVRefNum *refnum) { - zipcharpc comment; + const char *comment; zipFile node = zipOpen3_64(pathname, append, 0, &comment, filefuncs); *refnum = kNotARefNum; @@ -229,10 +230,10 @@ if (!err) { err = LibToMgErr(zipOpenNewFileInZip4_64(node, (const char*)LStrBufH(filename), zipfi, - LStrBufH(extrafield_local), LStrLenH(extrafield_local), - LStrBufH(extrafield_global), LStrLenH(extrafield_global), - (const char*)LStrBufH(comment), method, level, raw, windowBits, memLevel, - strategy, password[0] ? password : NULL, crcForCrypting, version, flags, zip64)); + LStrBufH(extrafield_local), (uint16_t)LStrLenH(extrafield_local), + LStrBufH(extrafield_global), (uint16_t)LStrLenH(extrafield_global), + (const char*)LStrBufH(comment), (uint16_t)method, level, raw, windowBits, memLevel, + strategy, password[0] ? password : NULL, crcForCrypting, (uint16_t)version, (uint16_t)flags, zip64)); } } } @@ -291,7 +292,7 @@ if (err) comment = globalComment; } - retval = zipClose2(node, (const char*)LStrBufH(comment), stream); + retval = zipClose2(node, (const char*)LStrBufH(comment), VERSIONMADEBY, (voidpf*)stream); if (comment) DSDisposeHandle((UHandle)comment); if (!err && retval) @@ -334,7 +335,7 @@ * refnum: An archive extraction file reference * ****************************************************************************************************/ -LibAPI(MgErr) lvzlib_unzClose(LVRefNum *refnum) +LibAPI(MgErr) lvzlib_unzClose(LVRefNum *refnum, LStrHandle *stream) { unzFile node; MgErr err = lvzlibDisposeRefnum(refnum, &node, UnzMagic); @@ -341,7 +342,7 @@ if (!err) { *refnum = kNotARefNum; - err = LibToMgErr(unzClose(node)); + err = LibToMgErr(unzClose2(node, (voidpf*)stream)); } return err; } @@ -423,6 +424,11 @@ * characters or multibyte characters. * ****************************************************************************************************/ +static int caseInsensitiveNameComparer(unzFile file, const char *filename1, const char *filename2) +{ + return _mbsicmp((const unsigned char*)filename1, (const unsigned char*)filename2); +} + LibAPI(MgErr) lvzlib_unzLocateFile(LVRefNum *refnum, LStrHandle fileName, int iCaseSensitivity) { unzFile node; @@ -432,7 +438,7 @@ err = ZeroTerminateLString(&fileName); if (!err) { - err = LibToMgErr(unzLocateFile(node, (const char*)LStrBufH(fileName), iCaseSensitivity)); + err = LibToMgErr(unzLocateFile(node, (const char*)LStrBufH(fileName), iCaseSensitivity ? caseInsensitiveNameComparer : NULL)); } } return err; Modified: trunk/lvzip/c_source/lvapi.h =================================================================== --- trunk/lvzip/c_source/lvapi.h 2018-12-09 16:12:42 UTC (rev 1552) +++ trunk/lvzip/c_source/lvapi.h 2018-12-09 16:15:03 UTC (rev 1553) @@ -23,7 +23,7 @@ LibAPI(MgErr) lvzlib_zipCloseFileInZipRaw64(LVRefNum *refnum, uInt64 uncompressedSize, uInt32 crc32); LibAPI(MgErr) lvzlib_zipClose(LVRefNum *refnum, const LStrHandle globalComment, LStrHandle *stream); LibAPI(MgErr) lvzlib_unzOpen(const void *pathname, zlib_filefunc64_def* filefuncs, LVRefNum *refnum); -LibAPI(MgErr) lvzlib_unzClose(LVRefNum *refnum); +LibAPI(MgErr) lvzlib_unzClose(LVRefNum *refnum, LStrHandle *stream); LibAPI(MgErr) lvzlib_unzGetGlobalInfo32(LVRefNum *refnum, LStrHandle *comment, uInt32 *nEntry); LibAPI(MgErr) lvzlib_unzGetGlobalInfo64(LVRefNum *refnum, LStrHandle *comment, uInt64 *nEntry); LibAPI(MgErr) lvzlib_unzLocateFile(LVRefNum *refnum, LStrHandle fileName, int iCaseSensitivity); Modified: trunk/lvzip/c_source/lvutil.c =================================================================== --- trunk/lvzip/c_source/lvutil.c 2018-12-09 16:12:42 UTC (rev 1552) +++ trunk/lvzip/c_source/lvutil.c 2018-12-09 16:15:03 UTC (rev 1553) @@ -1706,7 +1706,7 @@ } if (hFile != INVALID_HANDLE_VALUE) { - int32 length = wcslen(lpTargetFileName) + 1, offset = 0; + int32 length = (int32)wcslen(lpTargetFileName) + 1, offset = 0; WCHAR namebuf[MAX_PATH + 6]; DWORD bytes = (DWORD)(REPARSE_DATA_BUFFER_HEADER_SIZE + length * sizeof(WCHAR) * 2 + 20); PREPARSE_DATA_BUFFER buffer = (PREPARSE_DATA_BUFFER)DSNewPClr(bytes); Modified: trunk/lvzip/c_source/trees.c =================================================================== --- trunk/lvzip/c_source/trees.c 2018-12-09 16:12:42 UTC (rev 1552) +++ trunk/lvzip/c_source/trees.c 2018-12-09 16:15:03 UTC (rev 1553) @@ -376,8 +376,7 @@ /* =========================================================================== * Initialize the tree data structures for a new zlib stream. */ -void ZLIB_INTERNAL _tr_init(s) - deflate_state *s; +void ZLIB_INTERNAL _tr_init(deflate_state *s) { tr_static_init(); @@ -404,8 +403,7 @@ /* =========================================================================== * Initialize a new block. */ -local void init_block(s) - deflate_state *s; +local void init_block(deflate_state *s) { int n; /* iterates over tree elements */ @@ -448,10 +446,7 @@ * when the heap property is re-established (each father smaller than its * two sons). */ -local void pqdownheap(s, tree, k) - deflate_state *s; - ct_data *tree; /* the tree to restore */ - int k; /* node to move down */ +local void pqdownheap(deflate_state *s, ct_data *tree /* the tree to restore */, int k /* node to move down */) { int v = s->heap[k]; int j = k << 1; /* left son of k */ @@ -483,9 +478,7 @@ * The length opt_len is updated; static_len is also updated if stree is * not null. */ -local void gen_bitlen(s, desc) - deflate_state *s; - tree_desc *desc; /* the tree descriptor */ +local void gen_bitlen(deflate_state *s, tree_desc *desc /* the tree descriptor */) { ct_data *tree = desc->dyn_tree; int max_code = desc->max_code; @@ -569,10 +562,11 @@ * OUT assertion: the field code is set for all tree elements of non * zero code length. */ -local void gen_codes (tree, max_code, bl_count) - ct_data *tree; /* the tree to decorate */ - int max_code; /* largest code with non zero frequency */ - ushf *bl_count; /* number of codes at each bit length */ +local void gen_codes ( + ct_data *tree, /* the tree to decorate */ + int max_code, /* largest code with non zero frequency */ + ushf *bl_count /* number of codes at each bit length */ +) { ush next_code[MAX_BITS+1]; /* next code value for each bit length */ unsigned code = 0; /* running code value */ @@ -612,9 +606,7 @@ * and corresponding code. The length opt_len is updated; static_len is * also updated if stree is not null. The field max_code is set. */ -local void build_tree(s, desc) - deflate_state *s; - tree_desc *desc; /* the tree descriptor */ +local void build_tree(deflate_state *s, tree_desc *desc /* the tree descriptor */) { ct_data *tree = desc->dyn_tree; const ct_data *stree = desc->stat_desc->static_tree; @@ -700,10 +692,11 @@ * Scan a literal or distance tree to determine the frequencies of the codes * in the bit length tree. */ -local void scan_tree (s, tree, max_code) - deflate_state *s; - ct_data *tree; /* the tree to be scanned */ - int max_code; /* and its largest code of non zero frequency */ +local void scan_tree ( + deflate_state *s, + ct_data *tree, /* the tree to be scanned */ + int max_code /* and its largest code of non zero frequency */ +) { int n; /* iterates over all tree elements */ int prevlen = -1; /* last emitted length */ @@ -745,10 +738,11 @@ * Send a literal or distance tree in compressed form, using the codes in * bl_tree. */ -local void send_tree (s, tree, max_code) - deflate_state *s; - ct_data *tree; /* the tree to be scanned */ - int max_code; /* and its largest code of non zero frequency */ +local void send_tree ( + deflate_state *s, + ct_data *tree, /* the tree to be scanned */ + int max_code /* and its largest code of non zero frequency */ +) { int n; /* iterates over all tree elements */ int prevlen = -1; /* last emitted length */ @@ -796,8 +790,7 @@ * Construct the Huffman tree for the bit lengths and return the index in * bl_order of the last bit length code to send. */ -local int build_bl_tree(s) - deflate_state *s; +local int build_bl_tree(deflate_state *s) { int max_blindex; /* index of last bit length code of non zero freq */ @@ -831,9 +824,7 @@ * lengths of the bit length codes, the literal tree and the distance tree. * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4. */ -local void send_all_trees(s, lcodes, dcodes, blcodes) - deflate_state *s; - int lcodes, dcodes, blcodes; /* number of codes for each tree */ +local void send_all_trees(deflate_state *s, int lcodes, int dcodes, int blcodes /* number of codes for each tree */) { int rank; /* index in bl_order */ @@ -860,13 +851,14 @@ /* =========================================================================== * Send a stored block */ -void ZLIB_INTERNAL _tr_stored_block(s, buf, stored_len, last) - deflate_state *s; - charf *buf; /* input block */ - ulg stored_len; /* length of input block */ - int last; /* one if this is the last block for a file */ +void ZLIB_INTERNAL _tr_stored_block( + deflate_state *s, + charf *buf, /* input block */ + ulg stored_len, /* length of input block */ + int last /* one if this is the last block for a file */ +) { - send_bits(s, (STORED_BLOCK<<1)+last, 3); /* send block type */ + send_bits(s, (STORED_BLOCK << 1) + last, 3); /* send block type */ bi_windup(s); /* align on byte boundary */ put_short(s, (ush)stored_len); put_short(s, (ush)~stored_len); @@ -883,8 +875,7 @@ /* =========================================================================== * Flush the bits in the bit buffer to pending output (leaves at most 7 bits) */ -void ZLIB_INTERNAL _tr_flush_bits(s) - deflate_state *s; +void ZLIB_INTERNAL _tr_flush_bits(deflate_state *s) { bi_flush(s); } @@ -893,8 +884,7 @@ * Send one empty static block to give enough lookahead for inflate. * This takes 10 bits, of which 7 may remain in the bit buffer. */ -void ZLIB_INTERNAL _tr_align(s) - deflate_state *s; +void ZLIB_INTERNAL _tr_align(deflate_state *s) { send_bits(s, STATIC_TREES<<1, 3); send_code(s, END_BLOCK, static_ltree); @@ -908,11 +898,12 @@ * Determine the best encoding for the current block: dynamic trees, static * trees or store, and write out the encoded block. */ -void ZLIB_INTERNAL _tr_flush_block(s, buf, stored_len, last) - deflate_state *s; - charf *buf; /* input block, or NULL if too old */ - ulg stored_len; /* length of input block */ - int last; /* one if this is the last block for a file */ +void ZLIB_INTERNAL _tr_flush_block( + deflate_state *s, + charf *buf, /* input block, or NULL if too old */ + ulg stored_len, /* length of input block */ + int last /* one if this is the last block for a file */ +) { ulg opt_lenb, static_lenb; /* opt_len and static_len in bytes */ int max_blindex = 0; /* index of last bit length code of non zero freq */ @@ -1011,10 +1002,11 @@ * Save the match info and tally the frequency counts. Return true if * the current block must be flushed. */ -int ZLIB_INTERNAL _tr_tally (s, dist, lc) - deflate_state *s; - unsigned dist; /* distance of matched string */ - unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */ +int ZLIB_INTERNAL _tr_tally ( + deflate_state *s, + unsigned dist, /* distance of matched string */ + unsigned lc /* match length-MIN_MATCH or unmatched char (if dist==0) */ +) { s->d_buf[s->last_lit] = (ush)dist; s->l_buf[s->last_lit++] = (uch)lc; @@ -1061,10 +1053,11 @@ /* =========================================================================== * Send the block data compressed using the given Huffman trees */ -local void compress_block(s, ltree, dtree) - deflate_state *s; - const ct_data *ltree; /* literal tree */ - const ct_data *dtree; /* distance tree */ +local void compress_block( + deflate_state *s, + const ct_data *ltree, /* literal tree */ + const ct_data *dtree /* distance tree */ +) { unsigned dist; /* distance of matched string */ int lc; /* match length or unmatched char (if dist == 0) */ @@ -1121,8 +1114,7 @@ * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}). * IN assertion: the fields Freq of dyn_ltree are set. */ -local int detect_data_type(s) - deflate_state *s; +local int detect_data_type(deflate_state *s) { /* black_mask is the bit mask of black-listed bytes * set bits 0..6, 14..25, and 28..31 @@ -1155,9 +1147,10 @@ * method would use a table) * IN assertion: 1 <= len <= 15 */ -local unsigned bi_reverse(code, len) - unsigned code; /* the value to invert */ - int len; /* its bit length */ +local unsigned bi_reverse( + unsigned code, /* the value to invert */ + int len /* its bit length */ +) { register unsigned res = 0; do { @@ -1170,8 +1163,7 @@ /* =========================================================================== * Flush the bit buffer, keeping at most 7 bits in it. */ -local void bi_flush(s) - deflate_state *s; +local void bi_flush(deflate_state *s) { if (s->bi_valid == 16) { put_short(s, s->bi_buf); @@ -1187,8 +1179,7 @@ /* =========================================================================== * Flush the bit buffer and align the output on a byte boundary */ -local void bi_windup(s) - deflate_state *s; +local void bi_windup(deflate_state *s) { if (s->bi_valid > 8) { put_short(s, s->bi_buf); Modified: trunk/lvzip/c_source/uncompr.c =================================================================== --- trunk/lvzip/c_source/uncompr.c 2018-12-09 16:12:42 UTC (rev 1552) +++ trunk/lvzip/c_source/uncompr.c 2018-12-09 16:15:03 UTC (rev 1553) @@ -68,7 +68,7 @@ *sourceLen -= len + stream.avail_in; if (dest != buf) - *destLen = stream.total_out; + *destLen = (uLongf)stream.total_out; else if (stream.total_out && err == Z_BUF_ERROR) left = 1; Modified: trunk/lvzip/c_source/zalias.h =================================================================== --- trunk/lvzip/c_source/zalias.h 2018-12-09 16:12:42 UTC (rev 1552) +++ trunk/lvzip/c_source/zalias.h 2018-12-09 16:15:03 UTC (rev 1553) @@ -58,6 +58,7 @@ #define zlibVersion lvzip_zlibVersion #define unzClose lvzip_unzClose +#define unzClose2 lvzip_unzClose2 #define unzCloseCurrentFile lvzip_unzCloseCurrentFile #define unzGetCurrentFileInfo lvzip_unzGetCurrentFileInfo #define unzGetCurrentFileInfo64 lvzip_unzGetCurrentFileInfo64 Modified: trunk/lvzip/c_source/zlib.h =================================================================== --- trunk/lvzip/c_source/zlib.h 2018-12-09 16:12:42 UTC (rev 1552) +++ trunk/lvzip/c_source/zlib.h 2018-12-09 16:15:03 UTC (rev 1553) @@ -31,6 +31,8 @@ #ifndef ZLIB_H #define ZLIB_H +#include <stdint.h> + #include "zalias.h" #include "zconf.h" @@ -45,6 +47,10 @@ #define ZLIB_VER_REVISION 11 #define ZLIB_VER_SUBREVISION 0 +#if defined(_MSC_VER) +#pragma warning(disable: 4100 4101 4127) +#endif + /* The 'zlib' compression library provides in-memory compression and decompression functions, including integrity checks of the uncompressed data. @@ -87,11 +93,11 @@ typedef struct z_stream_s { z_const Bytef *next_in; /* next input byte */ uInt avail_in; /* number of bytes available at next_in */ - uLong total_in; /* total number of input bytes read so far */ + uint64_t total_in; /* total number of input bytes read so far */ Bytef *next_out; /* next output byte will go here */ uInt avail_out; /* remaining free space at next_out */ - uLong total_out; /* total number of bytes output so far */ + uint64_t total_out; /* total number of bytes output so far */ z_const char *msg; /* last error message, NULL if no error */ struct internal_state FAR *state; /* not visible by applications */ Modified: trunk/lvzip/c_source/zlibvc.vcproj =================================================================== --- trunk/lvzip/c_source/zlibvc.vcproj 2018-12-09 16:12:42 UTC (rev 1552) +++ trunk/lvzip/c_source/zlibvc.vcproj 2018-12-09 16:15:03 UTC (rev 1553) @@ -294,6 +294,7 @@ Optimization="0" AdditionalIncludeDirectories="bzip2" PreprocessorDefinitions="WIN32;_DEBUG;NO_vsnprintf;HAVE_AES;HAVE_BZIP2;BZ_NO_STDIO;_CRT_SECURE_NO_WARNINGS" + GeneratePreprocessedFile="0" RuntimeLibrary="3" PrecompiledHeaderFile="$(IntDir)\zlibvc.pch" AssemblerListingLocation="$(IntDir)\" @@ -1658,10 +1659,6 @@ </FileConfiguration> </File> <File - RelativePath=".\minishared.c" - > - </File> - <File RelativePath="mztools.c" > <FileConfiguration @@ -1938,7 +1935,6 @@ > <FileConfiguration Name="DLL Release|Win32" - ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" @@ -1946,7 +1942,6 @@ </FileConfiguration> <FileConfiguration Name="DLL Release|x64" - ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" @@ -1954,7 +1949,6 @@ </FileConfiguration> <FileConfiguration Name="DLL Embedded|Win32" - ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" @@ -1962,7 +1956,6 @@ </FileConfiguration> <FileConfiguration Name="DLL Embedded|x64" - ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" @@ -2231,10 +2224,6 @@ > </File> <File - RelativePath=".\minishared.h" - > - </File> - <File RelativePath="mztools.h" > </File> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lab...@us...> - 2018-12-09 16:12:44
|
Revision: 1552 http://sourceforge.net/p/opengtoolkit/svn/1552 Author: labviewer Date: 2018-12-09 16:12:42 +0000 (Sun, 09 Dec 2018) Log Message: ----------- Add MSC specific warning suppression Modified Paths: -------------- trunk/lvzip/c_source/bzip2/bzlib_private.h Modified: trunk/lvzip/c_source/bzip2/bzlib_private.h =================================================================== --- trunk/lvzip/c_source/bzip2/bzlib_private.h 2018-12-09 16:11:37 UTC (rev 1551) +++ trunk/lvzip/c_source/bzip2/bzlib_private.h 2018-12-09 16:12:42 UTC (rev 1552) @@ -32,8 +32,10 @@ #include "bzlib.h" +#if defined(_MSC_VER) +#pragma warning(disable: 4100 4101 4127) +#endif - /*-- General stuff. --*/ #define BZ_VERSION "1.0.6, 6-Sept-2010" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lab...@us...> - 2018-12-09 16:11:38
|
Revision: 1551 http://sourceforge.net/p/opengtoolkit/svn/1551 Author: labviewer Date: 2018-12-09 16:11:37 +0000 (Sun, 09 Dec 2018) Log Message: ----------- Disable Intel Intrinsic AES support since VS2005 doesn't support it Modified Paths: -------------- trunk/lvzip/c_source/aes/aescrypt.c trunk/lvzip/c_source/aes/aeskey.c trunk/lvzip/c_source/aes/aesopt.h Added Paths: ----------- trunk/lvzip/c_source/aes/aes_ni.c trunk/lvzip/c_source/aes/aes_ni.h Added: trunk/lvzip/c_source/aes/aes_ni.c =================================================================== --- trunk/lvzip/c_source/aes/aes_ni.c (rev 0) +++ trunk/lvzip/c_source/aes/aes_ni.c 2018-12-09 16:11:37 UTC (rev 1551) @@ -0,0 +1,687 @@ +/* +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: 09/09/2014 +*/ + +#include "aes_ni.h" + +#if defined( USE_INTEL_AES_IF_PRESENT ) + +#if defined(_MSC_VER) + +#include <intrin.h> +#pragma intrinsic(__cpuid) +#define INLINE __inline + +INLINE int has_aes_ni(void) +{ + static int test = -1; + if(test < 0) + { + int cpu_info[4]; + __cpuid(cpu_info, 1); + test = cpu_info[2] & 0x02000000; + } + return test; +} + +#elif defined( __GNUC__ ) + +#include <cpuid.h> + +#if !defined(__clang__) +#pragma GCC target ("ssse3") +#pragma GCC target ("sse4.1") +#pragma GCC target ("aes") +#endif + +#include <x86intrin.h> +#define INLINE static __inline + +INLINE int has_aes_ni() +{ + static int test = -1; + if(test < 0) + { + unsigned int a, b, c, d; + if(!__get_cpuid(1, &a, &b, &c, &d)) + test = 0; + else + test = (c & 0x2000000); + } + return test; +} + +#else +#error AES New Instructions require Microsoft, Intel, GNU C, or CLANG +#endif + +INLINE __m128i aes_128_assist(__m128i t1, __m128i t2) +{ + __m128i t3; + t2 = _mm_shuffle_epi32(t2, 0xff); + t3 = _mm_slli_si128(t1, 0x4); + t1 = _mm_xor_si128(t1, t3); + t3 = _mm_slli_si128(t3, 0x4); + t1 = _mm_xor_si128(t1, t3); + t3 = _mm_slli_si128(t3, 0x4); + t1 = _mm_xor_si128(t1, t3); + t1 = _mm_xor_si128(t1, t2); + return t1; +} + +AES_RETURN aes_ni(encrypt_key128)(const unsigned char *key, aes_encrypt_ctx cx[1]) +{ + __m128i t1, t2; + __m128i *ks = (__m128i*)cx->ks; + + if(!has_aes_ni()) + { + return aes_xi(encrypt_key128)(key, cx); + } + + t1 = _mm_loadu_si128((__m128i*)key); + + ks[0] = t1; + + t2 = _mm_aeskeygenassist_si128(t1, 0x1); + t1 = aes_128_assist(t1, t2); + ks[1] = t1; + + t2 = _mm_aeskeygenassist_si128(t1, 0x2); + t1 = aes_128_assist(t1, t2); + ks[2] = t1; + + t2 = _mm_aeskeygenassist_si128(t1, 0x4); + t1 = aes_128_assist(t1, t2); + ks[3] = t1; + + t2 = _mm_aeskeygenassist_si128(t1, 0x8); + t1 = aes_128_assist(t1, t2); + ks[4] = t1; + + t2 = _mm_aeskeygenassist_si128(t1, 0x10); + t1 = aes_128_assist(t1, t2); + ks[5] = t1; + + t2 = _mm_aeskeygenassist_si128(t1, 0x20); + t1 = aes_128_assist(t1, t2); + ks[6] = t1; + + t2 = _mm_aeskeygenassist_si128(t1, 0x40); + t1 = aes_128_assist(t1, t2); + ks[7] = t1; + + t2 = _mm_aeskeygenassist_si128(t1, 0x80); + t1 = aes_128_assist(t1, t2); + ks[8] = t1; + + t2 = _mm_aeskeygenassist_si128(t1, 0x1b); + t1 = aes_128_assist(t1, t2); + ks[9] = t1; + + t2 = _mm_aeskeygenassist_si128(t1, 0x36); + t1 = aes_128_assist(t1, t2); + ks[10] = t1; + + cx->inf.l = 0; + cx->inf.b[0] = 10 * 16; + return EXIT_SUCCESS; +} + +INLINE void aes_192_assist(__m128i* t1, __m128i * t2, __m128i * t3) +{ + __m128i t4; + *t2 = _mm_shuffle_epi32(*t2, 0x55); + t4 = _mm_slli_si128(*t1, 0x4); + *t1 = _mm_xor_si128(*t1, t4); + t4 = _mm_slli_si128(t4, 0x4); + *t1 = _mm_xor_si128(*t1, t4); + t4 = _mm_slli_si128(t4, 0x4); + *t1 = _mm_xor_si128(*t1, t4); + *t1 = _mm_xor_si128(*t1, *t2); + *t2 = _mm_shuffle_epi32(*t1, 0xff); + t4 = _mm_slli_si128(*t3, 0x4); + *t3 = _mm_xor_si128(*t3, t4); + *t3 = _mm_xor_si128(*t3, *t2); +} + +AES_RETURN aes_ni(encrypt_key192)(const unsigned char *key, aes_encrypt_ctx cx[1]) +{ + __m128i t1, t2, t3; + __m128i *ks = (__m128i*)cx->ks; + + if(!has_aes_ni()) + { + return aes_xi(encrypt_key192)(key, cx); + } + + t1 = _mm_loadu_si128((__m128i*)key); + t3 = _mm_loadu_si128((__m128i*)(key + 16)); + + ks[0] = t1; + ks[1] = t3; + + t2 = _mm_aeskeygenassist_si128(t3, 0x1); + aes_192_assist(&t1, &t2, &t3); + + ks[1] = _mm_castpd_si128(_mm_shuffle_pd(_mm_castsi128_pd(ks[1]), _mm_castsi128_pd(t1), 0)); + ks[2] = _mm_castpd_si128(_mm_shuffle_pd(_mm_castsi128_pd(t1), _mm_castsi128_pd(t3), 1)); + + t2 = _mm_aeskeygenassist_si128(t3, 0x2); + aes_192_assist(&t1, &t2, &t3); + ks[3] = t1; + ks[4] = t3; + + t2 = _mm_aeskeygenassist_si128(t3, 0x4); + aes_192_assist(&t1, &t2, &t3); + ks[4] = _mm_castpd_si128(_mm_shuffle_pd(_mm_castsi128_pd(ks[4]), _mm_castsi128_pd(t1), 0)); + ks[5] = _mm_castpd_si128(_mm_shuffle_pd(_mm_castsi128_pd(t1), _mm_castsi128_pd(t3), 1)); + + t2 = _mm_aeskeygenassist_si128(t3, 0x8); + aes_192_assist(&t1, &t2, &t3); + ks[6] = t1; + ks[7] = t3; + + t2 = _mm_aeskeygenassist_si128(t3, 0x10); + aes_192_assist(&t1, &t2, &t3); + ks[7] = _mm_castpd_si128(_mm_shuffle_pd(_mm_castsi128_pd(ks[7]), _mm_castsi128_pd(t1), 0)); + ks[8] = _mm_castpd_si128(_mm_shuffle_pd(_mm_castsi128_pd(t1), _mm_castsi128_pd(t3), 1)); + + t2 = _mm_aeskeygenassist_si128(t3, 0x20); + aes_192_assist(&t1, &t2, &t3); + ks[9] = t1; + ks[10] = t3; + + t2 = _mm_aeskeygenassist_si128(t3, 0x40); + aes_192_assist(&t1, &t2, &t3); + ks[10] = _mm_castpd_si128(_mm_shuffle_pd(_mm_castsi128_pd(ks[10]), _mm_castsi128_pd(t1), 0)); + ks[11] = _mm_castpd_si128(_mm_shuffle_pd(_mm_castsi128_pd(t1), _mm_castsi128_pd(t3), 1)); + + t2 = _mm_aeskeygenassist_si128(t3, 0x80); + aes_192_assist(&t1, &t2, &t3); + ks[12] = t1; + + cx->inf.l = 0; + cx->inf.b[0] = 12 * 16; + return EXIT_SUCCESS; +} + +INLINE void aes_256_assist1(__m128i* t1, __m128i * t2) +{ + __m128i t4; + *t2 = _mm_shuffle_epi32(*t2, 0xff); + t4 = _mm_slli_si128(*t1, 0x4); + *t1 = _mm_xor_si128(*t1, t4); + t4 = _mm_slli_si128(t4, 0x4); + *t1 = _mm_xor_si128(*t1, t4); + t4 = _mm_slli_si128(t4, 0x4); + *t1 = _mm_xor_si128(*t1, t4); + *t1 = _mm_xor_si128(*t1, *t2); +} + +INLINE void aes_256_assist2(__m128i* t1, __m128i * t3) +{ + __m128i t2, t4; + t4 = _mm_aeskeygenassist_si128(*t1, 0x0); + t2 = _mm_shuffle_epi32(t4, 0xaa); + t4 = _mm_slli_si128(*t3, 0x4); + *t3 = _mm_xor_si128(*t3, t4); + t4 = _mm_slli_si128(t4, 0x4); + *t3 = _mm_xor_si128(*t3, t4); + t4 = _mm_slli_si128(t4, 0x4); + *t3 = _mm_xor_si128(*t3, t4); + *t3 = _mm_xor_si128(*t3, t2); +} + +AES_RETURN aes_ni(encrypt_key256)(const unsigned char *key, aes_encrypt_ctx cx[1]) +{ + __m128i t1, t2, t3; + __m128i *ks = (__m128i*)cx->ks; + + if(!has_aes_ni()) + { + return aes_xi(encrypt_key256)(key, cx); + } + + t1 = _mm_loadu_si128((__m128i*)key); + t3 = _mm_loadu_si128((__m128i*)(key + 16)); + + ks[0] = t1; + ks[1] = t3; + + t2 = _mm_aeskeygenassist_si128(t3, 0x01); + aes_256_assist1(&t1, &t2); + ks[2] = t1; + aes_256_assist2(&t1, &t3); + ks[3] = t3; + + t2 = _mm_aeskeygenassist_si128(t3, 0x02); + aes_256_assist1(&t1, &t2); + ks[4] = t1; + aes_256_assist2(&t1, &t3); + ks[5] = t3; + + t2 = _mm_aeskeygenassist_si128(t3, 0x04); + aes_256_assist1(&t1, &t2); + ks[6] = t1; + aes_256_assist2(&t1, &t3); + ks[7] = t3; + + t2 = _mm_aeskeygenassist_si128(t3, 0x08); + aes_256_assist1(&t1, &t2); + ks[8] = t1; + aes_256_assist2(&t1, &t3); + ks[9] = t3; + + t2 = _mm_aeskeygenassist_si128(t3, 0x10); + aes_256_assist1(&t1, &t2); + ks[10] = t1; + aes_256_assist2(&t1, &t3); + ks[11] = t3; + + t2 = _mm_aeskeygenassist_si128(t3, 0x20); + aes_256_assist1(&t1, &t2); + ks[12] = t1; + aes_256_assist2(&t1, &t3); + ks[13] = t3; + + t2 = _mm_aeskeygenassist_si128(t3, 0x40); + aes_256_assist1(&t1, &t2); + ks[14] = t1; + + cx->inf.l = 0; + cx->inf.b[0] = 14 * 16; + return EXIT_SUCCESS; +} + +INLINE void enc_to_dec(aes_decrypt_ctx cx[1]) +{ + __m128i *ks = (__m128i*)cx->ks; + int j; + + for( j = 1 ; j < (cx->inf.b[0] >> 4) ; ++j ) + ks[j] = _mm_aesimc_si128(ks[j]); +} + +AES_RETURN aes_ni(decrypt_key128)(const unsigned char *key, aes_decrypt_ctx cx[1]) +{ + if(!has_aes_ni()) + { + return aes_xi(decrypt_key128)(key, cx); + } + + if(aes_ni(encrypt_key128)(key, (aes_encrypt_ctx*)cx) == EXIT_SUCCESS) + { + enc_to_dec(cx); + return EXIT_SUCCESS; + } + else + return EXIT_FAILURE; + +} + +AES_RETURN aes_ni(decrypt_key192)(const unsigned char *key, aes_decrypt_ctx cx[1]) +{ + if(!has_aes_ni()) + { + return aes_xi(decrypt_key192)(key, cx); + } + + if(aes_ni(encrypt_key192)(key, (aes_encrypt_ctx*)cx) == EXIT_SUCCESS) + { + enc_to_dec(cx); + return EXIT_SUCCESS; + } + else + return EXIT_FAILURE; +} + +AES_RETURN aes_ni(decrypt_key256)(const unsigned char *key, aes_decrypt_ctx cx[1]) +{ + if(!has_aes_ni()) + { + return aes_xi(decrypt_key256)(key, cx); + } + + if(aes_ni(encrypt_key256)(key, (aes_encrypt_ctx*)cx) == EXIT_SUCCESS) + { + enc_to_dec(cx); + return EXIT_SUCCESS; + } + else + return EXIT_FAILURE; +} + +AES_RETURN aes_ni(encrypt)(const unsigned char *in, unsigned char *out, const aes_encrypt_ctx cx[1]) +{ + __m128i *key = (__m128i*)cx->ks, t; + + if(cx->inf.b[0] != 10 * 16 && cx->inf.b[0] != 12 * 16 && cx->inf.b[0] != 14 * 16) + return EXIT_FAILURE; + + if(!has_aes_ni()) + { + return aes_xi(encrypt)(in, out, cx); + } + + t = _mm_xor_si128(_mm_loadu_si128((__m128i*)in), *(__m128i*)key); + + switch(cx->inf.b[0]) + { + case 14 * 16: + t = _mm_aesenc_si128(t, *(__m128i*)++key); + t = _mm_aesenc_si128(t, *(__m128i*)++key); + case 12 * 16: + t = _mm_aesenc_si128(t, *(__m128i*)++key); + t = _mm_aesenc_si128(t, *(__m128i*)++key); + case 10 * 16: + t = _mm_aesenc_si128(t, *(__m128i*)++key); + t = _mm_aesenc_si128(t, *(__m128i*)++key); + t = _mm_aesenc_si128(t, *(__m128i*)++key); + t = _mm_aesenc_si128(t, *(__m128i*)++key); + t = _mm_aesenc_si128(t, *(__m128i*)++key); + t = _mm_aesenc_si128(t, *(__m128i*)++key); + t = _mm_aesenc_si128(t, *(__m128i*)++key); + t = _mm_aesenc_si128(t, *(__m128i*)++key); + t = _mm_aesenc_si128(t, *(__m128i*)++key); + t = _mm_aesenclast_si128(t, *(__m128i*)++key); + } + + _mm_storeu_si128(&((__m128i*)out)[0], t); + return EXIT_SUCCESS; +} + +AES_RETURN aes_ni(decrypt)(const unsigned char *in, unsigned char *out, const aes_decrypt_ctx cx[1]) +{ + __m128i *key = (__m128i*)cx->ks + (cx->inf.b[0] >> 4), t; + + if(cx->inf.b[0] != 10 * 16 && cx->inf.b[0] != 12 * 16 && cx->inf.b[0] != 14 * 16) + return EXIT_FAILURE; + + if(!has_aes_ni()) + { + return aes_xi(decrypt)(in, out, cx); + } + + t = _mm_xor_si128(_mm_loadu_si128((__m128i*)in), *(__m128i*)key); + + switch(cx->inf.b[0]) + { + case 14 * 16: + t = _mm_aesdec_si128(t, *(__m128i*)--key); + t = _mm_aesdec_si128(t, *(__m128i*)--key); + case 12 * 16: + t = _mm_aesdec_si128(t, *(__m128i*)--key); + t = _mm_aesdec_si128(t, *(__m128i*)--key); + case 10 * 16: + t = _mm_aesdec_si128(t, *(__m128i*)--key); + t = _mm_aesdec_si128(t, *(__m128i*)--key); + t = _mm_aesdec_si128(t, *(__m128i*)--key); + t = _mm_aesdec_si128(t, *(__m128i*)--key); + t = _mm_aesdec_si128(t, *(__m128i*)--key); + t = _mm_aesdec_si128(t, *(__m128i*)--key); + t = _mm_aesdec_si128(t, *(__m128i*)--key); + t = _mm_aesdec_si128(t, *(__m128i*)--key); + t = _mm_aesdec_si128(t, *(__m128i*)--key); + t = _mm_aesdeclast_si128(t, *(__m128i*)--key); + } + + _mm_storeu_si128((__m128i*)out, t); + return EXIT_SUCCESS; +} + +#ifdef ADD_AESNI_MODE_CALLS +#ifdef USE_AES_CONTEXT + +AES_RETURN aes_CBC_encrypt(const unsigned char *in, + unsigned char *out, + unsigned char ivec[16], + unsigned long length, + const aes_encrypt_ctx cx[1]) +{ + __m128i feedback, data, *key = (__m128i*)cx->ks; + int number_of_rounds = cx->inf.b[0] >> 4, j; + unsigned long i; + + if(number_of_rounds != 10 && number_of_rounds != 12 && number_of_rounds != 14) + return EXIT_FAILURE; + + if(!has_aes_ni()) + { + return aes_cbc_encrypt(in, out, length, ivec, cx); + } + + if(length % 16) + length = length / 16 + 1; + else length /= 16; + feedback = _mm_loadu_si128((__m128i*)ivec); + for(i = 0; i < length; i++) + { + data = _mm_loadu_si128(&((__m128i*)in)[i]); + feedback = _mm_xor_si128(data, feedback); + feedback = _mm_xor_si128(feedback, ((__m128i*)key)[0]); + for(j = 1; j <number_of_rounds; j++) + feedback = _mm_aesenc_si128(feedback, ((__m128i*)key)[j]); + feedback = _mm_aesenclast_si128(feedback, ((__m128i*)key)[j]); + _mm_storeu_si128(&((__m128i*)out)[i], feedback); + } + return EXIT_SUCCESS; +} + +AES_RETURN aes_CBC_decrypt(const unsigned char *in, + unsigned char *out, + unsigned char ivec[16], + unsigned long length, + const aes_decrypt_ctx cx[1]) +{ + __m128i data, feedback, last_in, *key = (__m128i*)cx->ks; + int number_of_rounds = cx->inf.b[0] >> 4, j; + unsigned long i; + + if(number_of_rounds != 10 && number_of_rounds != 12 && number_of_rounds != 14) + return EXIT_FAILURE; + + if(!has_aes_ni()) + { + return aes_cbc_decrypt(in, out, length, ivec, cx); + } + + if(length % 16) + length = length / 16 + 1; + else length /= 16; + feedback = _mm_loadu_si128((__m128i*)ivec); + for(i = 0; i < length; i++) + { + last_in = _mm_loadu_si128(&((__m128i*)in)[i]); + data = _mm_xor_si128(last_in, ((__m128i*)key)[number_of_rounds]); + for(j = number_of_rounds - 1; j > 0; j--) + { + data = _mm_aesdec_si128(data, ((__m128i*)key)[j]); + } + data = _mm_aesdeclast_si128(data, ((__m128i*)key)[0]); + data = _mm_xor_si128(data, feedback); + _mm_storeu_si128(&((__m128i*)out)[i], data); + feedback = last_in; + } + return EXIT_SUCCESS; +} + +static void ctr_inc(unsigned char *ctr_blk) +{ + uint32_t c; + + c = *(uint32_t*)(ctr_blk + 8); + c++; + *(uint32_t*)(ctr_blk + 8) = c; + + if(!c) + *(uint32_t*)(ctr_blk + 12) = *(uint32_t*)(ctr_blk + 12) + 1; +} + +AES_RETURN AES_CTR_encrypt(const unsigned char *in, + unsigned char *out, + const unsigned char ivec[8], + const unsigned char nonce[4], + unsigned long length, + const aes_encrypt_ctx cx[1]) +{ + __m128i ctr_block = { 0 }, *key = (__m128i*)cx->ks, tmp, ONE, BSWAP_EPI64; + int number_of_rounds = cx->inf.b[0] >> 4, j; + unsigned long i; + + if(number_of_rounds != 10 && number_of_rounds != 12 && number_of_rounds != 14) + return EXIT_FAILURE; + + if(!has_aes_ni()) + { + unsigned char ctr_blk[16]; + *(uint64_t*)ctr_blk = *(uint64_t*)ivec; + *(uint32_t*)(ctr_blk + 8) = *(uint32_t*)nonce; + return aes_ctr_crypt(in, out, length, (unsigned char*)ctr_blk, ctr_inc, cx); + } + + if(length % 16) + length = length / 16 + 1; + else length /= 16; + ONE = _mm_set_epi32(0, 1, 0, 0); + BSWAP_EPI64 = _mm_setr_epi8(7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8); +#ifdef _MSC_VER + ctr_block = _mm_insert_epi64(ctr_block, *(long long*)ivec, 1); +#else + ctr_block = _mm_set_epi64(*(__m64*)ivec, *(__m64*)&ctr_block); +#endif + ctr_block = _mm_insert_epi32(ctr_block, *(long*)nonce, 1); + ctr_block = _mm_srli_si128(ctr_block, 4); + ctr_block = _mm_shuffle_epi8(ctr_block, BSWAP_EPI64); + ctr_block = _mm_add_epi64(ctr_block, ONE); + for(i = 0; i < length; i++) + { + tmp = _mm_shuffle_epi8(ctr_block, BSWAP_EPI64); + ctr_block = _mm_add_epi64(ctr_block, ONE); + tmp = _mm_xor_si128(tmp, ((__m128i*)key)[0]); + for(j = 1; j <number_of_rounds; j++) + { + tmp = _mm_aesenc_si128(tmp, ((__m128i*)key)[j]); + }; + tmp = _mm_aesenclast_si128(tmp, ((__m128i*)key)[j]); + tmp = _mm_xor_si128(tmp, _mm_loadu_si128(&((__m128i*)in)[i])); + _mm_storeu_si128(&((__m128i*)out)[i], tmp); + } + return EXIT_SUCCESS; +} + +#else + +void aes_CBC_encrypt(const unsigned char *in, + unsigned char *out, + unsigned char ivec[16], + unsigned long length, + unsigned char *key, + int number_of_rounds) +{ + __m128i feedback, data; + unsigned long i; + int j; + if(length % 16) + length = length / 16 + 1; + else length /= 16; + feedback = _mm_loadu_si128((__m128i*)ivec); + for(i = 0; i < length; i++) + { + data = _mm_loadu_si128(&((__m128i*)in)[i]); + feedback = _mm_xor_si128(data, feedback); + feedback = _mm_xor_si128(feedback, ((__m128i*)key)[0]); + for(j = 1; j <number_of_rounds; j++) + feedback = _mm_aesenc_si128(feedback, ((__m128i*)key)[j]); + feedback = _mm_aesenclast_si128(feedback, ((__m128i*)key)[j]); + _mm_storeu_si128(&((__m128i*)out)[i], feedback); + } +} + +void aes_CBC_decrypt(const unsigned char *in, + unsigned char *out, + unsigned char ivec[16], + unsigned long length, + unsigned char *key, + int number_of_rounds) +{ + __m128i data, feedback, last_in; + unsigned long i; + int j; + if(length % 16) + length = length / 16 + 1; + else length /= 16; + feedback = _mm_loadu_si128((__m128i*)ivec); + for(i = 0; i < length; i++) + { + last_in = _mm_loadu_si128(&((__m128i*)in)[i]); + data = _mm_xor_si128(last_in, ((__m128i*)key)[0]); + for(j = 1; j <number_of_rounds; j++) + { + data = _mm_aesdec_si128(data, ((__m128i*)key)[j]); + } + data = _mm_aesdeclast_si128(data, ((__m128i*)key)[j]); + data = _mm_xor_si128(data, feedback); + _mm_storeu_si128(&((__m128i*)out)[i], data); + feedback = last_in; + } +} + +void AES_CTR_encrypt(const unsigned char *in, + unsigned char *out, + const unsigned char ivec[8], + const unsigned char nonce[4], + unsigned long length, + const unsigned char *key, + int number_of_rounds) +{ + __m128i ctr_block = { 0 }, tmp, ONE, BSWAP_EPI64; + unsigned long i; + int j; + if(length % 16) + length = length / 16 + 1; + else length /= 16; + ONE = _mm_set_epi32(0, 1, 0, 0); + BSWAP_EPI64 = _mm_setr_epi8(7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8); +#ifdef _MSC_VER + ctr_block = _mm_insert_epi64(ctr_block, *(long long*)ivec, 1); +#else + ctr_block = _mm_set_epi64(*(__m64*)ivec, *(__m64*)&ctr_block); +#endif + ctr_block = _mm_insert_epi32(ctr_block, *(long*)nonce, 1); + ctr_block = _mm_srli_si128(ctr_block, 4); + ctr_block = _mm_shuffle_epi8(ctr_block, BSWAP_EPI64); + ctr_block = _mm_add_epi64(ctr_block, ONE); + for(i = 0; i < length; i++) + { + tmp = _mm_shuffle_epi8(ctr_block, BSWAP_EPI64); + ctr_block = _mm_add_epi64(ctr_block, ONE); + tmp = _mm_xor_si128(tmp, ((__m128i*)key)[0]); + for(j = 1; j <number_of_rounds; j++) + { + tmp = _mm_aesenc_si128(tmp, ((__m128i*)key)[j]); + }; + tmp = _mm_aesenclast_si128(tmp, ((__m128i*)key)[j]); + tmp = _mm_xor_si128(tmp, _mm_loadu_si128(&((__m128i*)in)[i])); + _mm_storeu_si128(&((__m128i*)out)[i], tmp); + } +} +#endif +#endif + +#endif Added: trunk/lvzip/c_source/aes/aes_ni.h =================================================================== --- trunk/lvzip/c_source/aes/aes_ni.h (rev 0) +++ trunk/lvzip/c_source/aes/aes_ni.h 2018-12-09 16:11:37 UTC (rev 1551) @@ -0,0 +1,59 @@ +/* +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: 13/11/2013 +*/ + +#ifndef AES_NI_H +#define AES_NI_H + +#define USE_AES_CONTEXT + +#include "aesopt.h" + +#if defined( USE_INTEL_AES_IF_PRESENT ) + +/* map names in C code to make them internal ('name' -> 'aes_name_i') */ +#define aes_xi(x) aes_ ## x ## _i + +/* map names here to provide the external API ('name' -> 'aes_name') */ +#define aes_ni(x) aes_ ## x + +AES_RETURN aes_ni(encrypt_key128)(const unsigned char *key, aes_encrypt_ctx cx[1]); +AES_RETURN aes_ni(encrypt_key192)(const unsigned char *key, aes_encrypt_ctx cx[1]); +AES_RETURN aes_ni(encrypt_key256)(const unsigned char *key, aes_encrypt_ctx cx[1]); + +AES_RETURN aes_ni(decrypt_key128)(const unsigned char *key, aes_decrypt_ctx cx[1]); +AES_RETURN aes_ni(decrypt_key192)(const unsigned char *key, aes_decrypt_ctx cx[1]); +AES_RETURN aes_ni(decrypt_key256)(const unsigned char *key, aes_decrypt_ctx cx[1]); + +AES_RETURN aes_ni(encrypt)(const unsigned char *in, unsigned char *out, const aes_encrypt_ctx cx[1]); +AES_RETURN aes_ni(decrypt)(const unsigned char *in, unsigned char *out, const aes_decrypt_ctx cx[1]); + +AES_RETURN aes_xi(encrypt_key128)(const unsigned char *key, aes_encrypt_ctx cx[1]); +AES_RETURN aes_xi(encrypt_key192)(const unsigned char *key, aes_encrypt_ctx cx[1]); +AES_RETURN aes_xi(encrypt_key256)(const unsigned char *key, aes_encrypt_ctx cx[1]); + +AES_RETURN aes_xi(decrypt_key128)(const unsigned char *key, aes_decrypt_ctx cx[1]); +AES_RETURN aes_xi(decrypt_key192)(const unsigned char *key, aes_decrypt_ctx cx[1]); +AES_RETURN aes_xi(decrypt_key256)(const unsigned char *key, aes_decrypt_ctx cx[1]); + +AES_RETURN aes_xi(encrypt)(const unsigned char *in, unsigned char *out, const aes_encrypt_ctx cx[1]); +AES_RETURN aes_xi(decrypt)(const unsigned char *in, unsigned char *out, const aes_decrypt_ctx cx[1]); + +#endif + +#endif Modified: trunk/lvzip/c_source/aes/aescrypt.c =================================================================== --- trunk/lvzip/c_source/aes/aescrypt.c 2018-12-09 14:12:54 UTC (rev 1550) +++ trunk/lvzip/c_source/aes/aescrypt.c 2018-12-09 16:11:37 UTC (rev 1551) @@ -227,8 +227,9 @@ #endif AES_RETURN aes_xi(decrypt)(const unsigned char *in, unsigned char *out, const aes_decrypt_ctx cx[1]) -{ uint32_t locals(b0, b1); -#if defined( dec_imvars ) +{ + uint32_t locals(b0, b1); +#if defined (dec_imvars) dec_imvars; /* declare variables for inv_mcol() if needed */ #endif const uint32_t *kp; Modified: trunk/lvzip/c_source/aes/aeskey.c =================================================================== --- trunk/lvzip/c_source/aes/aeskey.c 2018-12-09 14:12:54 UTC (rev 1550) +++ trunk/lvzip/c_source/aes/aeskey.c 2018-12-09 16:11:37 UTC (rev 1551) @@ -67,9 +67,7 @@ # undef DEC_KS_UNROLL # endif #endif - #if (FUNCS_IN_C & ENC_KEYING_IN_C) - #if defined(AES_128) || defined( AES_VAR ) #define ke4(k,i) \ Modified: trunk/lvzip/c_source/aes/aesopt.h =================================================================== --- trunk/lvzip/c_source/aes/aesopt.h 2018-12-09 14:12:54 UTC (rev 1550) +++ trunk/lvzip/c_source/aes/aesopt.h 2018-12-09 16:11:37 UTC (rev 1551) @@ -188,7 +188,7 @@ built */ -#if 1 && defined( INTEL_AES_POSSIBLE ) && !defined( USE_INTEL_AES_IF_PRESENT ) +#if 0 && defined( INTEL_AES_POSSIBLE ) && !defined( USE_INTEL_AES_IF_PRESENT ) # define USE_INTEL_AES_IF_PRESENT #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lab...@us...> - 2018-11-19 11:07:57
|
Revision: 1548 http://sourceforge.net/p/opengtoolkit/svn/1548 Author: labviewer Date: 2018-11-19 11:07:55 +0000 (Mon, 19 Nov 2018) Log Message: ----------- Update VI package builder script for fix done in 2014 Modified Paths: -------------- trunk/string/source/.vipb Modified: trunk/string/source/.vipb =================================================================== --- trunk/string/source/.vipb 2017-09-28 08:17:55 UTC (rev 1547) +++ trunk/string/source/.vipb 2018-11-19 11:07:55 UTC (rev 1548) @@ -1,7 +1,7 @@ <VI_Package_Builder_Settings Version="0.3" Created_Date="2010-12-07 17:22:49" Modified_Date="2011-12-13 14:30:51" Creator="Jonathon Green" Comments="" ID="4c281d383bac75c0fd1d56a228e22ed3"> <Library_General_Settings> <Package_File_Name>oglib_string</Package_File_Name> - <Library_Version>4.1.0.13</Library_Version> + <Library_Version>4.2.0.14</Library_Version> <Auto_Increment_Version>false</Auto_Increment_Version> <Library_Source_Folder>.</Library_Source_Folder> <Library_Output_Folder>..</Library_Output_Folder> @@ -36,15 +36,7 @@ <Copyright>2002-2007 Jim Kring; 2002 Cal-Bay Systems; 2004 Paul Sullivan; 2004 Michael C. Ashe; 2005-2006 MKS Instruments, Inc. (author: Doug Femec); 2010-2011 Jonathon Green; 2011 Shaun Rumbell; 2011 Darin.K; 2011 Wouter Geelen; 2011 Fabiola De la Cueva; 2011 Phillip Brooks; 2011 Jonas Mellroth; 2011 Ed Dickens</Copyright> <Packager>OpenG.org</Packager> <URL>http://wiki.openg.org/Oglib_string</URL> - <Release_Notes>[MOD] 3303663 - Format Variant Into String__ogtk.vi doesn't handle Timestamp -[MOD] 3292424 - Update Trim Whitespace with Fast Trim -[FIX] 3275381 - "Slice String__ogtk.vi" has Input or RHS of Connector Pane -[FIX] 1958939 - "Scan Variant from String" missing description -[MOD] 3275249 - Update OpenG Comment -[FIX] 3386135 - OpenG Comment not Merge VI in palette -[MOD] 1914597 - Format Variant Into String missing DAQ, DAQmx, and VISA type -[MOD] 921506 - "Format Variant Into String" should accept RefNums -[NEW] 3419755 - Create new String To Character Array VI</Release_Notes> + <Release_Notes>[MOD] String to 1D Array.vi worked wrong when ignore duplicate delimiters is set to true</Release_Notes> </Description> <Destinations> <Toolkit_VIs> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lab...@us...> - 2017-09-28 08:17:58
|
Revision: 1547 http://sourceforge.net/p/opengtoolkit/svn/1547 Author: labviewer Date: 2017-09-28 08:17:55 +0000 (Thu, 28 Sep 2017) Log Message: ----------- Updated entire package Modified Paths: -------------- trunk/lvpipe/build ogpipe 61.vi trunk/lvpipe/build_support/pipes.rev trunk/lvpipe/built/ogpipe/ogpipe.llb/OGPIPE - VI TREE__ogtk.vi trunk/lvpipe/built/ogpipe/ogpipe.llb/OGPIPE Close Pipe__ogtk.vi trunk/lvpipe/built/ogpipe/ogpipe.llb/OGPIPE Execute System Command__ogtk.vi trunk/lvpipe/built/ogpipe/ogpipe.llb/OGPIPE Kill Process__ogtk.vi trunk/lvpipe/built/ogpipe/ogpipe.llb/OGPIPE Open Pipe__ogtk.vi trunk/lvpipe/built/ogpipe/ogpipe.llb/OGPIPE Open System Command__ogtk.vi trunk/lvpipe/built/ogpipe/ogpipe.llb/OGPIPE Read From Pipe__ogtk.vi trunk/lvpipe/built/ogpipe/ogpipe.llb/OGPIPE RefNum__ogtk.ctl trunk/lvpipe/built/ogpipe/ogpipe.llb/OGPIPE Write To Pipe__ogtk.vi trunk/lvpipe/built/ogpipe/ogpipes.dll trunk/lvpipe/built/ogpipe.log trunk/lvpipe/c_source/pipes.c trunk/lvpipe/c_source/pipes.h trunk/lvpipe/c_source/pipes.rc trunk/lvpipe/change-log.txt trunk/lvpipe/ogpipe 61.spec trunk/lvpipe/ogpipe.ogbld trunk/lvpipe/source/ogpipe.llb/OGPIPE - VI TREE.vi trunk/lvpipe/source/ogpipe.llb/OGPIPE Close Pipe.vi trunk/lvpipe/source/ogpipe.llb/OGPIPE Execute System Command.vi trunk/lvpipe/source/ogpipe.llb/OGPIPE Kill Process.vi trunk/lvpipe/source/ogpipe.llb/OGPIPE Open Pipe.vi trunk/lvpipe/source/ogpipe.llb/OGPIPE Open System Command.vi trunk/lvpipe/source/ogpipe.llb/OGPIPE Read From Pipe.vi trunk/lvpipe/source/ogpipe.llb/OGPIPE RefNum.ctl trunk/lvpipe/source/ogpipe.llb/OGPIPE Write To Pipe.vi trunk/lvpipe/tests/PipeClient.vi trunk/lvpipe/tests/Simple Pipe Test.vi trunk/lvpipe/tests/System Command (cmd.exe) Test.vi trunk/lvpipe/tests/System Command Pipe Python Test.vi trunk/lvpipe/tests/System Command Pipe Test.vi Added Paths: ----------- trunk/lvpipe/PostInstall.vi trunk/lvpipe/PreUninstall.vi trunk/lvpipe/build ogpipe 70.vi trunk/lvpipe/built/ogpipe/ogpipe.llb/OGPIPE Open System Command As User__ogtk.vi trunk/lvpipe/built/ogpipe/ogpipes64.dll trunk/lvpipe/ogpipe.ogpb trunk/lvpipe/source/ogpipe.llb/OGPIPE Open System Command As User.vi trunk/lvpipe/source/ogpipes.dll trunk/lvpipe/source/ogpipes64.dll trunk/lvpipe/source/readme.txt trunk/lvpipe/tests/Start Plink.vi Removed Paths: ------------- trunk/lvpipe/source/ogpipes.dll Added: trunk/lvpipe/PostInstall.vi =================================================================== (Binary files differ) Index: trunk/lvpipe/PostInstall.vi =================================================================== --- trunk/lvpipe/PostInstall.vi 2017-04-10 21:54:22 UTC (rev 1546) +++ trunk/lvpipe/PostInstall.vi 2017-09-28 08:17:55 UTC (rev 1547) Property changes on: trunk/lvpipe/PostInstall.vi ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/lvpipe/PreUninstall.vi =================================================================== (Binary files differ) Index: trunk/lvpipe/PreUninstall.vi =================================================================== --- trunk/lvpipe/PreUninstall.vi 2017-04-10 21:54:22 UTC (rev 1546) +++ trunk/lvpipe/PreUninstall.vi 2017-09-28 08:17:55 UTC (rev 1547) Property changes on: trunk/lvpipe/PreUninstall.vi ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Modified: trunk/lvpipe/build ogpipe 61.vi =================================================================== (Binary files differ) Added: trunk/lvpipe/build ogpipe 70.vi =================================================================== (Binary files differ) Index: trunk/lvpipe/build ogpipe 70.vi =================================================================== --- trunk/lvpipe/build ogpipe 70.vi 2017-04-10 21:54:22 UTC (rev 1546) +++ trunk/lvpipe/build ogpipe 70.vi 2017-09-28 08:17:55 UTC (rev 1547) Property changes on: trunk/lvpipe/build ogpipe 70.vi ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Modified: trunk/lvpipe/build_support/pipes.rev =================================================================== --- trunk/lvpipe/build_support/pipes.rev 2017-04-10 21:54:22 UTC (rev 1546) +++ trunk/lvpipe/build_support/pipes.rev 2017-09-28 08:17:55 UTC (rev 1547) @@ -1,8 +1,8 @@ [ogpipe.ogbld] Version=0.0.0 -Build_Number=13 -Build_Date="02-Apr-10 8:20:31" +Build_Number=16 +Build_Date="28-9-2017 00:00:19" Status=OK Warnings=0 -Log_File=/C/Work/OpenG/opengtoolkit/pipe/built/ogpipe.log +Log_File="/P/Work/OpenG/Openg Toolkit/lvpipe/built/ogpipe.log" Modified: trunk/lvpipe/built/ogpipe/ogpipe.llb/OGPIPE - VI TREE__ogtk.vi =================================================================== (Binary files differ) Modified: trunk/lvpipe/built/ogpipe/ogpipe.llb/OGPIPE Close Pipe__ogtk.vi =================================================================== (Binary files differ) Modified: trunk/lvpipe/built/ogpipe/ogpipe.llb/OGPIPE Execute System Command__ogtk.vi =================================================================== (Binary files differ) Modified: trunk/lvpipe/built/ogpipe/ogpipe.llb/OGPIPE Kill Process__ogtk.vi =================================================================== (Binary files differ) Modified: trunk/lvpipe/built/ogpipe/ogpipe.llb/OGPIPE Open Pipe__ogtk.vi =================================================================== (Binary files differ) Added: trunk/lvpipe/built/ogpipe/ogpipe.llb/OGPIPE Open System Command As User__ogtk.vi =================================================================== (Binary files differ) Index: trunk/lvpipe/built/ogpipe/ogpipe.llb/OGPIPE Open System Command As User__ogtk.vi =================================================================== --- trunk/lvpipe/built/ogpipe/ogpipe.llb/OGPIPE Open System Command As User__ogtk.vi 2017-04-10 21:54:22 UTC (rev 1546) +++ trunk/lvpipe/built/ogpipe/ogpipe.llb/OGPIPE Open System Command As User__ogtk.vi 2017-09-28 08:17:55 UTC (rev 1547) Property changes on: trunk/lvpipe/built/ogpipe/ogpipe.llb/OGPIPE Open System Command As User__ogtk.vi ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Modified: trunk/lvpipe/built/ogpipe/ogpipe.llb/OGPIPE Open System Command__ogtk.vi =================================================================== (Binary files differ) Modified: trunk/lvpipe/built/ogpipe/ogpipe.llb/OGPIPE Read From Pipe__ogtk.vi =================================================================== (Binary files differ) Modified: trunk/lvpipe/built/ogpipe/ogpipe.llb/OGPIPE RefNum__ogtk.ctl =================================================================== (Binary files differ) Modified: trunk/lvpipe/built/ogpipe/ogpipe.llb/OGPIPE Write To Pipe__ogtk.vi =================================================================== (Binary files differ) Modified: trunk/lvpipe/built/ogpipe/ogpipes.dll =================================================================== (Binary files differ) Added: trunk/lvpipe/built/ogpipe/ogpipes64.dll =================================================================== (Binary files differ) Index: trunk/lvpipe/built/ogpipe/ogpipes64.dll =================================================================== --- trunk/lvpipe/built/ogpipe/ogpipes64.dll 2017-04-10 21:54:22 UTC (rev 1546) +++ trunk/lvpipe/built/ogpipe/ogpipes64.dll 2017-09-28 08:17:55 UTC (rev 1547) Property changes on: trunk/lvpipe/built/ogpipe/ogpipes64.dll ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Modified: trunk/lvpipe/built/ogpipe.log =================================================================== --- trunk/lvpipe/built/ogpipe.log 2017-04-10 21:54:22 UTC (rev 1546) +++ trunk/lvpipe/built/ogpipe.log 2017-09-28 08:17:55 UTC (rev 1547) @@ -1,52 +1,54 @@ -*** 08:20:31.2 : Build started [02-Apr-10] File: ogpipe.ogbld +*** 00:00:19.7 : Build started [28-9-2017] File: ogpipe.ogbld ->>> 08:20:31.2 : DEAB Read Build File started +>>> 00:00:19.7 : DEAB Read Build File started ->>> 08:20:31.4 : Load Call-Back VI(s) started +>>> 00:00:19.9 : Load Call-Back VI(s) started ->>> 08:20:31.4 : DEAB Expand & Verify TL&D VI Paths started +>>> 00:00:20.1 : DEAB Expand & Verify TL&D VI Paths started ->>> 08:20:31.5 : Load VIs into Memory started +>>> 00:00:20.2 : Load VIs into Memory started -9 VIs have been loaded +11 VIs have been loaded ->>> 08:20:31.8 : Test VIs need be Unloaded started +>>> 00:00:20.3 : Test VIs need be Unloaded started ->>> 08:20:31.8 : Test for VI Unsaved Changes started +>>> 00:00:20.4 : Test for VI Unsaved Changes started ->>> 08:20:31.9 : Generate Resources Copy Info started +>>> 00:00:20.4 : Generate Resources Copy Info started ->>> 08:20:31.9 : Generate VI Building Info started +>>> 00:00:20.5 : Generate VI Building Info started ->>> 08:20:32.1 : Revise Ambiguous VIs Destination started +>>> 00:00:20.6 : Revise Ambiguous VIs Destination started ->>> 08:20:32.1 : Verify if Sources can be Removed started +>>> 00:00:20.7 : Verify if Sources can be Removed started ->>> 08:20:32.2 : Create Target Dirs and LLBs started +>>> 00:00:20.7 : Create Target Dirs and LLBs started ->>> 08:20:32.3 : Set VI Properties started +>>> 00:00:20.8 : Set VI Properties started ->>> 08:20:32.3 : Save VIs to Destination started +>>> 00:00:20.9 : Set Custom VI Properties started -9 VIs have been saved +>>> 00:00:20.9 : Save VIs to Destination started ->>> 08:20:33.4 : UnLoad Top-Level and Dynamic VIs started +10 VIs have been saved ->>> 08:20:33.5 : Copy Resource Files and Relink VIs started +>>> 00:00:21.2 : UnLoad Top-Level and Dynamic VIs started +>>> 00:00:21.3 : Copy Resource Files and Relink VIs started + 1 Resource files have been copied ->>> 08:20:34.2 : Set Top Level VIs in LLBs started +>>> 00:00:21.5 : Set Top Level VIs in LLBs started ->>> 08:20:34.3 : Convert LLBs to EXEs started +>>> 00:00:21.5 : Convert LLBs to EXEs started ->>> 08:20:34.3 : Copy Support Files started +>>> 00:00:21.6 : Copy Support Files started 2 Support files have been copied -*** 08:20:34.4 : Build finished +*** 00:00:21.7 : Build finished ######################### @@ -60,7 +62,7 @@ VIs not included to build ######################### -None +1 : C:\Program Files (x86)\National Instruments\LabVIEW 7.0\user.lib\_OpenG.lib\error\error.llb\Build Error Cluster__ogtk.vi ############################# Modified: trunk/lvpipe/c_source/pipes.c =================================================================== --- trunk/lvpipe/c_source/pipes.c 2017-04-10 21:54:22 UTC (rev 1546) +++ trunk/lvpipe/c_source/pipes.c 2017-09-28 08:17:55 UTC (rev 1547) @@ -1,9 +1,9 @@ /* * Pipe shared library for LabVIEW * - * Copyright (C) 2004 Rolf Kalbermatter, r.k...@hc... + * Copyright (C) 2004-2017 Rolf Kalbermatter, rol...@ka... * - * Please visit http://www.OpenG.org to learn about the + * Please visit https://lavag.org/forum/45-openg/ to learn about the * Open Source LabVIEW software movement. * * This library is free software; you can redistribute it and/or @@ -23,61 +23,12 @@ #include <stdio.h> #include <io.h> #include <fcntl.h> +#include <signal.h> #include "extcode.h" #include "hosttype.h" #include "pipes.h" -#if defined(_DEBUG) - #if Win32 - #if defined(_CVI_DEBUG_) - #define DoDebugger() - #elif _MSC_VER >= 1400 - #define DoDebugger() __debugbreak() - #else - #define DoDebugger() {__asm int 3} - #endif - #elif MacOS - #define DoDebugger() Debugger() - #else - #define DoDebugger() - #endif - #define DEBUGPRINTF(args) DbgPrintf args -#else - #define DoDebugger() - #define DEBUGPRINTF(args) -/* long DebugPrintf(char* fmt, ...); - long DebugPrintf(char* fmt, ...) - { - return 0; - } -*/ -#endif -#if defined(PIPES_EXPORTS) -#define LibAPI __declspec(dllexport) __cdecl -#else -#define LibAPI __declspec(dllimport) __cdecl -#endif - -typedef enum -{ - kNone, - kReadMode, - kWriteMode, - kReadWriteMode -} Modes; - -MgErr LibAPI PipeOpen(CStr name, uInt16 mode, LVRefNum *refnum); -MgErr LibAPI PipeOpenCmd(CStr name, uInt16 mode, LVRefNum *refnumIn, LVRefNum *refnumOut, - LVRefNum *refnumErr, uInt32 *processID); -MgErr LibAPI PipeOpenCmdAsUser(CStr username, CStr password, CStr cmd, uInt16 mode, - LVRefNum *refnumIn, LVRefNum *refnumOut, LVRefNum *refnumErr, uInt32 *processID); -MgErr LibAPI PipeClose(LVRefNum *refnum); -MgErr LibAPI PipeRead(LVRefNum *refnum, uInt32 offset, uInt32 *bytesRead, LStrHandle data, uInt32 *eof); -MgErr LibAPI PipeWrite(LVRefNum *refnum, uInt32 offset, uInt32 *bytesWritten, LStrHandle data); - -MgErr LibAPI KillProcess(uInt32 pid, int32 exitCode); - #if defined(MSWin) #define STANDARD_IN STD_INPUT_HANDLE #define STANDARD_OUT STD_OUTPUT_HANDLE @@ -107,7 +58,7 @@ static MgErr closeRefnum(LVRefNum refnum); -MgErr LibAPI PipeOpen(CStr name, uInt16 mode, LVRefNum *refnum) +LibAPI(MgErr) PipeOpen(CStr name, uInt16 mode, LVRefNum *refnum) { MgErr err = noErr; #if defined(MSWin) @@ -219,12 +170,12 @@ } -MgErr LibAPI PipeOpenCmd(CStr cmd, uInt16 mode, LVRefNum *refnumIn, LVRefNum *refnumOut, LVRefNum *refnumErr, uInt32 *processID) +LibAPI(MgErr) PipeOpenCmd(CStr cmd, uInt16 mode, LVRefNum *refnumIn, LVRefNum *refnumOut, LVRefNum *refnumErr, uInt32 *processID) { return PipeOpenCmdAsUser(NULL, NULL, cmd, mode, refnumIn, refnumOut, refnumErr, processID); } -MgErr LibAPI PipeOpenCmdAsUser(CStr username, CStr password, CStr cmd, uInt16 mode, LVRefNum *refnumIn, LVRefNum *refnumOut, LVRefNum *refnumErr, uInt32 *processID) +LibAPI(MgErr) PipeOpenCmdAsUser(CStr username, CStr password, CStr cmd, uInt16 mode, LVRefNum *refnumIn, LVRefNum *refnumOut, LVRefNum *refnumErr, uInt32 *processID) { MgErr err = dvOpenErr; #if defined(MSWin) @@ -293,10 +244,25 @@ return err; } -MgErr LibAPI KillProcess(uInt32 pid, int32 exitCode) +LibAPI(MgErr) ExecuteCommand(CStr command, CStr verb, CStr param, uInt32 *processID) { MgErr err = noErr; #if defined(MSWin) + err = (int32)ShellExecuteA(NULL, verb, command, param[0] ? param : NULL, NULL, SW_HIDE); + if (err <= 32) + err = Win32ToLVErr(err); + else + err = noErr; +#elif Unix + err = mgNotSupported; +#endif + return err; +} + +LibAPI(MgErr) KillProcess(uInt32 pid, int32 exitCode) +{ + MgErr err = noErr; +#if defined(MSWin) HANDLE handle; HANDLE hToken; LUID sedebugnameValue; @@ -337,7 +303,7 @@ return err; } -MgErr LibAPI PipeClose(LVRefNum *refnum) +LibAPI(MgErr) PipeClose(LVRefNum *refnum) { pipe_handle fd; MgErr err = accessRefnum(*refnum, &fd); @@ -349,7 +315,7 @@ return err; } -MgErr LibAPI PipeRead(LVRefNum *refnum, uInt32 offset, uInt32 *bytesRead, LStrHandle data, uInt32 *eof) +LibAPI(MgErr) PipeRead(LVRefNum *refnum, uInt32 offset, uInt32 *bytesRead, uInt16 mode, LStrHandle data, uInt32 *eof, LVRefNum *context) { pipe_handle fd; MgErr err = accessRefnum(*refnum, &fd); @@ -426,7 +392,7 @@ return err; } -MgErr LibAPI PipeWrite(LVRefNum *refnum, uInt32 offset, uInt32 *bytesWritten, LStrHandle data) +LibAPI(MgErr) PipeWrite(LVRefNum *refnum, uInt32 offset, uInt32 *bytesWritten, LStrHandle data) { pipe_handle fd; MgErr err = accessRefnum(*refnum, &fd); @@ -456,44 +422,110 @@ static const WORD MAX_CONSOLE_LINES = 500; -MgErr LibAPI InitializeStandardIO(std_handle *stdIn, std_handle *stdOut, std_handle *stdErr) +LibAPI(MgErr) InitializeStandardIO(uInt32 processID, LVRefNum *refnumIn, LVRefNum *refnumOut, LVRefNum *refnumErr) { MgErr err = noErr; #if defined(MSWin) + BOOL retVal; int hConHandle; - HANDLE lStdHandle; + HANDLE stdHandle; CONSOLE_SCREEN_BUFFER_INFO coninfo; FILE *fp; - // allocate a console for this app - AllocConsole(); + if (processID) + { + retVal = AttachConsole(processID); + if (!retVal) + { + // if we called AttachConsole() and there was an ERROR_ACCESS_DENIED error, we already had + // a console and can continue with that + err = Win32ToLVErr(GetLastError()); + if (err && err != fNoPerm) + return err; + } + } + else + { + // allocate a console for this app, if we already created one then the function will return with an error + retVal = AllocConsole(); + if (!retVal) + { + err = Win32ToLVErr(GetLastError()); + } + } + stdHandle = GetStdHandle(STD_OUTPUT_HANDLE); + if (stdHandle == INVALID_HANDLE_VALUE || stdHandle == NULL) + { + // handle could not be retrieved or console doesn't have a standard output handle + if (!err) + FreeConsole(); + return fIOErr; + } + // set the screen buffer to be big enough to let us scroll text - GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &coninfo); + GetConsoleScreenBufferInfo(stdHandle, &coninfo); coninfo.dwSize.Y = MAX_CONSOLE_LINES; - SetConsoleScreenBufferSize(GetStdHandle(STD_OUTPUT_HANDLE), coninfo.dwSize); + SetConsoleScreenBufferSize(stdHandle, coninfo.dwSize); - // redirect unbuffered STDOUT to the console - lStdHandle = GetStdHandle(STD_OUTPUT_HANDLE); - hConHandle = _open_osfhandle((intptr_t)lStdHandle, _O_TEXT); - fp = _fdopen( hConHandle, "w" ); - *stdout = *fp; - setvbuf( stdout, NULL, _IONBF, 0 ); + if (refnumOut) + { + *refnumOut = kNotAMagicCookie; - // redirect unbuffered STDIN to the console - lStdHandle = GetStdHandle(STD_INPUT_HANDLE); - hConHandle = _open_osfhandle((intptr_t)lStdHandle, _O_TEXT); - fp = _fdopen( hConHandle, "r" ); - *stdin = *fp; - setvbuf( stdin, NULL, _IONBF, 0 ); + // redirect unbuffered STDOUT to the console + hConHandle = _open_osfhandle((intptr_t)stdHandle, _O_TEXT); + if (hConHandle != -1) + { + fp = _fdopen(hConHandle, "w"); + if (fp != 0) + { + setvbuf(fp, NULL, _IONBF, 0); + } + } + err = createRefnum(stdHandle, refnumOut); + } - // redirect unbuffered STDERR to the console - lStdHandle = GetStdHandle(STD_ERROR_HANDLE); - hConHandle = _open_osfhandle((intptr_t)lStdHandle, _O_TEXT); - fp = _fdopen( hConHandle, "w" ); - *stderr = *fp; - setvbuf( stderr, NULL, _IONBF, 0 ); + if (refnumIn) + { + *refnumIn = kNotAMagicCookie; + + // redirect unbuffered STDIN to the console + stdHandle = GetStdHandle(STD_INPUT_HANDLE); + if (stdHandle != INVALID_HANDLE_VALUE && stdHandle != NULL) + { + hConHandle = _open_osfhandle((intptr_t)stdHandle, _O_TEXT); + if (hConHandle != -1) + { + fp = _fdopen(hConHandle, "r"); + if (fp != 0) + { + setvbuf(fp, NULL, _IONBF, 0); + } + } + err = createRefnum(stdHandle, refnumIn); + } + } + if (refnumErr) + { + *refnumErr = kNotAMagicCookie; + + // redirect unbuffered STDERR to the console + stdHandle = GetStdHandle(STD_ERROR_HANDLE); + if (stdHandle != INVALID_HANDLE_VALUE && stdHandle != NULL) + { + hConHandle = _open_osfhandle((intptr_t)stdHandle, _O_TEXT); + if (hConHandle != -1) + { + fp = _fdopen(hConHandle, "w"); + if (fp != 0) + { + setvbuf(stderr, NULL, _IONBF, 0); + } + } + err = createRefnum(stdHandle, refnumErr); + } + } // make cout, wcout, cin, wcin, wcerr, cerr, wclog and clog // point to console as well // ios::sync_with_stdio(); @@ -744,7 +776,7 @@ /* We can't really support execution under a different user easily */ if (username || *username || password || *password) - return mgArgErr; + return mgNotSupported; /* parse command line into arguments */ while (*cmdline != '\0' && i < 64) @@ -838,55 +870,61 @@ }; static struct errentry errtable[] = { - {ERROR_INVALID_FUNCTION, mgArgErr }, /* 1 */ - {ERROR_FILE_NOT_FOUND, fNotFound }, /* 2 */ - {ERROR_PATH_NOT_FOUND, fNotFound }, /* 3 */ - {ERROR_TOO_MANY_OPEN_FILES, fTMFOpen }, /* 4 */ - {ERROR_ACCESS_DENIED, fNoPerm }, /* 5 */ - {ERROR_INVALID_HANDLE, mgArgErr }, /* 6 */ - {ERROR_ARENA_TRASHED, mFullErr }, /* 7 */ - {ERROR_NOT_ENOUGH_MEMORY, mFullErr }, /* 8 */ - {ERROR_INVALID_BLOCK, mFullErr }, /* 9 */ - {ERROR_BAD_ENVIRONMENT, fNotEnabled }, /* 10 */ - {ERROR_BAD_FORMAT, fNotEnabled }, /* 11 */ - {ERROR_INVALID_ACCESS, mgArgErr }, /* 12 */ - {ERROR_INVALID_DATA, mgArgErr }, /* 13 */ - {ERROR_INVALID_DRIVE, fNotFound }, /* 15 */ - {ERROR_CURRENT_DIRECTORY, fNoPerm }, /* 16 */ - {ERROR_NOT_SAME_DEVICE, fIOErr }, /* 17 */ - {ERROR_NO_MORE_FILES, fNotFound }, /* 18 */ - {ERROR_LOCK_VIOLATION, fNoPerm }, /* 33 */ - {ERROR_BAD_NETPATH, fNotFound }, /* 53 */ - {ERROR_NETWORK_ACCESS_DENIED, fNoPerm }, /* 65 */ - {ERROR_BAD_NET_NAME, fNotFound }, /* 67 */ - {ERROR_FILE_EXISTS, fDupPath }, /* 80 */ - {ERROR_CANNOT_MAKE, fNoPerm }, /* 82 */ - {ERROR_FAIL_I24, fNoPerm }, /* 83 */ - {ERROR_INVALID_PARAMETER, mgArgErr }, /* 87 */ - {ERROR_NO_PROC_SLOTS, mFullErr }, /* 89 */ - {ERROR_DRIVE_LOCKED, fNoPerm }, /* 108 */ - {ERROR_BROKEN_PIPE, fIOErr }, /* 109 */ - {ERROR_DISK_FULL, fDiskFull }, /* 112 */ - {ERROR_INVALID_TARGET_HANDLE, mgArgErr }, /* 114 */ - {ERROR_INVALID_HANDLE, mgArgErr }, /* 124 */ - {ERROR_WAIT_NO_CHILDREN, fNotEnabled }, /* 128 */ - {ERROR_CHILD_NOT_COMPLETE, fNotEnabled }, /* 129 */ - {ERROR_DIRECT_ACCESS_HANDLE, mgArgErr }, /* 130 */ - {ERROR_NEGATIVE_SEEK, mgArgErr }, /* 131 */ - {ERROR_SEEK_ON_DEVICE, fNoPerm }, /* 132 */ - {ERROR_DIR_NOT_EMPTY, fNoPerm }, /* 145 */ - {ERROR_NOT_LOCKED, fNoPerm }, /* 158 */ - {ERROR_BAD_PATHNAME, fNotFound }, /* 161 */ - {ERROR_MAX_THRDS_REACHED, mFullErr }, /* 164 */ - {ERROR_LOCK_FAILED, fNoPerm }, /* 167 */ - {ERROR_ALREADY_EXISTS, fDupPath }, /* 183 */ - {ERROR_FILENAME_EXCED_RANGE, fNotFound }, /* 206 */ - {ERROR_NESTING_NOT_ALLOWED, mFullErr }, /* 215 */ - {ERROR_PIPE_BUSY, ncBusyErr }, /* 231 */ - {ERROR_NO_DATA, fEOF }, /* 232 */ - {ERROR_PIPE_NOT_CONNECTED, ncNotConnectedErr }, /* 233 */ - {ERROR_MORE_DATA, ncInProgress }, /* 234 */ - {ERROR_NOT_ENOUGH_QUOTA, mFullErr } /* 1816 */ + {ERROR_INVALID_FUNCTION, mgArgErr }, /* 1 */ + {ERROR_FILE_NOT_FOUND, fNotFound }, /* 2 */ + {ERROR_PATH_NOT_FOUND, fNotFound }, /* 3 */ + {ERROR_TOO_MANY_OPEN_FILES, fTMFOpen }, /* 4 */ + {ERROR_ACCESS_DENIED, fNoPerm }, /* 5 */ + {ERROR_INVALID_HANDLE, mgArgErr }, /* 6 */ + {ERROR_ARENA_TRASHED, mFullErr }, /* 7 */ + {ERROR_NOT_ENOUGH_MEMORY, mFullErr }, /* 8 */ + {ERROR_INVALID_BLOCK, mFullErr }, /* 9 */ + {ERROR_BAD_ENVIRONMENT, fNotEnabled }, /* 10 */ + {ERROR_BAD_FORMAT, fNotEnabled }, /* 11 */ + {ERROR_INVALID_ACCESS, mgArgErr }, /* 12 */ + {ERROR_INVALID_DATA, mgArgErr }, /* 13 */ + {ERROR_INVALID_DRIVE, fNotFound }, /* 15 */ + {ERROR_CURRENT_DIRECTORY, fNoPerm }, /* 16 */ + {ERROR_NOT_SAME_DEVICE, fIOErr }, /* 17 */ + {ERROR_NO_MORE_FILES, fNotFound }, /* 18 */ + {SE_ERR_SHARE, fNoPerm }, /* 26 */ + {SE_ERR_ASSOCINCOMPLETE, fNotFound }, /* 27 */ + {SE_ERR_DDETIMEOUT, fIOErr }, /* 28 */ + {SE_ERR_DDEFAIL, fIOErr }, /* 29 */ + {SE_ERR_DDEBUSY, fIOErr }, /* 30 */ + {SE_ERR_NOASSOC, fNotFound }, /* 31 */ + {SE_ERR_DLLNOTFOUND, fNotFound }, /* 32 */ + {ERROR_LOCK_VIOLATION, fNoPerm }, /* 33 */ + {ERROR_BAD_NETPATH, fNotFound }, /* 53 */ + {ERROR_NETWORK_ACCESS_DENIED, fNoPerm }, /* 65 */ + {ERROR_BAD_NET_NAME, fNotFound }, /* 67 */ + {ERROR_FILE_EXISTS, fDupPath }, /* 80 */ + {ERROR_CANNOT_MAKE, fNoPerm }, /* 82 */ + {ERROR_FAIL_I24, fNoPerm }, /* 83 */ + {ERROR_INVALID_PARAMETER, mgArgErr }, /* 87 */ + {ERROR_NO_PROC_SLOTS, mFullErr }, /* 89 */ + {ERROR_DRIVE_LOCKED, fNoPerm }, /* 108 */ + {ERROR_BROKEN_PIPE, fIOErr }, /* 109 */ + {ERROR_DISK_FULL, fDiskFull }, /* 112 */ + {ERROR_INVALID_TARGET_HANDLE, mgArgErr }, /* 114 */ + {ERROR_WAIT_NO_CHILDREN, fNotEnabled }, /* 128 */ + {ERROR_CHILD_NOT_COMPLETE, fNotEnabled }, /* 129 */ + {ERROR_DIRECT_ACCESS_HANDLE, mgArgErr }, /* 130 */ + {ERROR_NEGATIVE_SEEK, mgArgErr }, /* 131 */ + {ERROR_SEEK_ON_DEVICE, fNoPerm }, /* 132 */ + {ERROR_DIR_NOT_EMPTY, fNoPerm }, /* 145 */ + {ERROR_NOT_LOCKED, fNoPerm }, /* 158 */ + {ERROR_BAD_PATHNAME, fNotFound }, /* 161 */ + {ERROR_MAX_THRDS_REACHED, mFullErr }, /* 164 */ + {ERROR_LOCK_FAILED, fNoPerm }, /* 167 */ + {ERROR_ALREADY_EXISTS, fDupPath }, /* 183 */ + {ERROR_FILENAME_EXCED_RANGE, fNotFound }, /* 206 */ + {ERROR_NESTING_NOT_ALLOWED, mFullErr }, /* 215 */ + {ERROR_PIPE_BUSY, ncBusyErr }, /* 231 */ + {ERROR_NO_DATA, fEOF }, /* 232 */ + {ERROR_PIPE_NOT_CONNECTED, ncNotConnectedErr }, /* 233 */ + {ERROR_MORE_DATA, ncInProgress }, /* 234 */ + {ERROR_NOT_ENOUGH_QUOTA, mFullErr } /* 1816 */ }; /* The following two constants must be the minimum and maximum Modified: trunk/lvpipe/c_source/pipes.h =================================================================== --- trunk/lvpipe/c_source/pipes.h 2017-04-10 21:54:22 UTC (rev 1546) +++ trunk/lvpipe/c_source/pipes.h 2017-09-28 08:17:55 UTC (rev 1547) @@ -35,3 +35,55 @@ typedef int32 (*CleanupProcPtr)(UPtr); int32 RTSetCleanupProc(CleanupProcPtr, UPtr, int32); +#if defined(_DEBUG) + #if Win32 + #if defined(_CVI_DEBUG_) + #define DoDebugger() + #elif _MSC_VER >= 1400 + #define DoDebugger() __debugbreak() + #else + #define DoDebugger() {__asm int 3} + #endif + #elif MacOS + #define DoDebugger() Debugger() + #else + #define DoDebugger() + #endif + #define DEBUGPRINTF(args) DbgPrintf args +#else + #define DoDebugger() + #define DEBUGPRINTF(args) +/* long DebugPrintf(char* fmt, ...); + long DebugPrintf(char* fmt, ...) + { + return 0; + } +*/ +#endif + +#if defined(PIPES_EXPORTS) +#define LibAPI(type) __declspec(dllexport) type __cdecl +#else +#define LibAPI(type) __declspec(dllimport) type __cdecl +#endif + +typedef enum +{ + kNone, + kReadMode, + kWriteMode, + kReadWriteMode +} Modes; + +LibAPI(MgErr) PipeOpen(CStr name, uInt16 mode, LVRefNum *refnum); +LibAPI(MgErr) PipeOpenCmd(CStr command, uInt16 mode, LVRefNum *refnumIn, LVRefNum *refnumOut, + LVRefNum *refnumErr, uInt32 *processID); +LibAPI(MgErr) PipeOpenCmdAsUser(CStr username, CStr password, CStr command, uInt16 mode, + LVRefNum *refnumIn, LVRefNum *refnumOut, LVRefNum *refnumErr, uInt32 *processID); +LibAPI(MgErr) PipeClose(LVRefNum *refnum); +LibAPI(MgErr) PipeRead(LVRefNum *refnum, uInt32 offset, uInt32 *bytesRead, uInt16 mode, LStrHandle data, uInt32 *eof, LVRefNum *context); +LibAPI(MgErr) PipeWrite(LVRefNum *refnum, uInt32 offset, uInt32 *bytesWritten, LStrHandle data); +LibAPI(MgErr) InitializeStandardIO(uInt32 processID, LVRefNum *refnumIn, LVRefNum *refnumOut, LVRefNum *refnumErr); + +LibAPI(MgErr) ExecuteCommand(CStr command, CStr verb, CStr param, uInt32 *processID); +LibAPI(MgErr) KillProcess(uInt32 pid, int32 exitCode); Modified: trunk/lvpipe/c_source/pipes.rc =================================================================== --- trunk/lvpipe/c_source/pipes.rc 2017-04-10 21:54:22 UTC (rev 1546) +++ trunk/lvpipe/c_source/pipes.rc 2017-09-28 08:17:55 UTC (rev 1547) @@ -2,8 +2,8 @@ #define IDR_VERSION1 1 IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE - FILEVERSION 1,2,0,11 - PRODUCTVERSION 1,2,0,11 + FILEVERSION 1,2,0,13 + PRODUCTVERSION 1,2,0,13 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK FILEFLAGS 0 FILEOS VOS_DOS_WINDOWS32 @@ -17,12 +17,12 @@ BEGIN VALUE "FileDescription", "OpenG Pipe support library\0" - VALUE "FileVersion", "1.2.0.11\0" + VALUE "FileVersion", "1.2.0.13\0" VALUE "InternalName", "ogpipes\0" VALUE "OriginalFilename", "ogpipes.dll\0" VALUE "ProductName", "ogpipes.dll\0" VALUE "Comments","LabVIEW support library to implement pipe operations\0" - VALUE "LegalCopyright", "(C) 2004-2016 Rolf Kalbermatter\0" + VALUE "LegalCopyright", "(C) 2004-2017 Rolf Kalbermatter\0" END END BLOCK "VarFileInfo" Modified: trunk/lvpipe/change-log.txt =================================================================== --- trunk/lvpipe/change-log.txt 2017-04-10 21:54:22 UTC (rev 1546) +++ trunk/lvpipe/change-log.txt 2017-09-28 08:17:55 UTC (rev 1547) @@ -1,6 +1,11 @@ +-= oglib_pipe-1.2.0-1.ogp =- + +[NEW] Added Open System Command As User.vi +[MOD] Change the implementation of the refnum in the DLL so it also works for 64 bit + -= oglib_pipe-1.0-1.ogp =- -[NEW] Added kill process function +[NEW] Added Kill Process,vi function [MOD] changed Create Commmand process to allow for no pipes to open to create only a process that can be killed later through its ID. Modified: trunk/lvpipe/ogpipe 61.spec =================================================================== --- trunk/lvpipe/ogpipe 61.spec 2017-04-10 21:54:22 UTC (rev 1546) +++ trunk/lvpipe/ogpipe 61.spec 2017-09-28 08:17:55 UTC (rev 1547) @@ -20,7 +20,7 @@ AutoReqProv=FALSE [Platform] -Exclusive_LabVIEW_Version= >=6.1 +Exclusive_LabVIEW_Version= >=7.0 Exclusive_LabVIEW_System=All Exclusive_OS=All @@ -49,8 +49,9 @@ Target Dir=<user.lib>/_OpenG.lib/ogpipe Exclusive_OS=Windows NT, Windows 9x Replace Mode=Always -Num Files=1 +Num Files=2 File 0=ogpipes.dll +File 0=ogpipes64.dll [File Group 2] Source Dir=built/ogpipe @@ -59,6 +60,7 @@ Replace Mode=Always Num Files=1 File 0=ogpipes.so +File 0=ogpipes64.so [File Group 1] Source Dir="Dynamic Palette MNUs" Modified: trunk/lvpipe/ogpipe.ogbld =================================================================== --- trunk/lvpipe/ogpipe.ogbld 2017-04-10 21:54:22 UTC (rev 1546) +++ trunk/lvpipe/ogpipe.ogbld 2017-09-28 08:17:55 UTC (rev 1547) @@ -85,3 +85,4 @@ Recursive=FALSE Exclude=FALSE SourceFile 1=ogpipes.* +SourceFile 2=ogpipes64.* Added: trunk/lvpipe/ogpipe.ogpb =================================================================== --- trunk/lvpipe/ogpipe.ogpb (rev 0) +++ trunk/lvpipe/ogpipe.ogpb 2017-09-28 08:17:55 UTC (rev 1547) @@ -0,0 +1,114 @@ +[OGPB Header] +File Version=1.0.0 + +[Package Name] +Name=oglib_pipe +Version=1.1.0 +Release=1 +Display Name="OpenG Pipe Library" + +[Description] +Description="The pipe package contains several routines for supporting pipe communication.\0D\0AThis is typically used for interprocess communication. It also has a function start an external command line utility and redirect its standard IO to pipes to use them for communication with that utility from within LabVIEW." +Summary="OpenG Pipe Tools" +License="BSD (VIs), LGPL (Shared Library)" +Copyright="2004 - 2017 Rolf Kalbermatter" +Distribution="OpenG Toolkit" +Vendor=OpenG.org +URL=http://openg.org/ogpipe +Packager="Rolf Kalbermatter <rol...@ka...>" +Release Notes="Version 1.1: First official release." +Demo=FALSE +System Package=FALSE +Sub Package=FALSE +close labview before install=FALSE +restart labview after install=FALSE +skip mass compile after install=FALSE + +[Package Info] +Icon=ogpipe.bmp +License File="" + +[Platform] +Exclusive_LabVIEW_Version=>=7.0 +Exclusive_LabVIEW_System=All +Exclusive_OS=All + +[Script VIs] +Source Dir="" +PreInstall="" +PostInstall=PostInstall.vi +PreUninstall=PreUninstall.vi +PostUninstall="" +Verify="" +PreBuild="" +PostBuild="" + +[Dependencies] +AutoReqProv=FALSE +Requires=oglib_error>=2.0,oglib_file>=2.5 +Conflicts="" + +[Files] +Num File Groups=5 +Source Dir="" +Target Dir="" +Passwords.<size(s)>=0 +Documentation="" +NameMode=2 +PPFix=ogtk +Doc Groups="" + +[File Group 0] +Source Dir=source +DirMode=0 +NameMode=0 +PPFix="" +Target Dir=<OpenG.lib>/ogpipe +Replace Mode=Always +Num Files=1 +File 0=readme.txt + +[File Group 1] +Source Dir=built/ogpipe/ogpipe.llb +DirMode=0 +NameMode=0 +PPFix="" +Target Dir=<OpenG.lib>/ogpipe/ogpipe.llb +Replace Mode=Always +Num Files=2 +File 0=*.vi +File 1=*.ctl + +[File Group 2] +Source Dir=source +DirMode=0 +NameMode=0 +PPFix="" +Target Dir=<OpenG.lib>/ogpipe +Replace Mode=Always +Exclusive_OS="Windows NT,Windows 9x,Windows x64" +Num Files=1 +File 0=*.dll + +[File Group 3] +Source Dir=source +DirMode=0 +NameMode=0 +PPFix="" +Target Dir=<OpenG.lib>/ogpipe +Replace Mode=Always +Exclusive_OS="Linux,Linux x64" +Num Files=1 +File 0=*.so + +[File Group 4] +Source Dir=source +DirMode=0 +NameMode=0 +PPFix="" +Target Dir=<OpenG.lib>/ogpipe +Replace Mode=Always +Exclusive_OS="Mac OS>=10" +Num Files=1 +File 0=ogpipe.framework.zip + Modified: trunk/lvpipe/source/ogpipe.llb/OGPIPE - VI TREE.vi =================================================================== (Binary files differ) Modified: trunk/lvpipe/source/ogpipe.llb/OGPIPE Close Pipe.vi =================================================================== (Binary files differ) Modified: trunk/lvpipe/source/ogpipe.llb/OGPIPE Execute System Command.vi =================================================================== (Binary files differ) Modified: trunk/lvpipe/source/ogpipe.llb/OGPIPE Kill Process.vi =================================================================== (Binary files differ) Modified: trunk/lvpipe/source/ogpipe.llb/OGPIPE Open Pipe.vi =================================================================== (Binary files differ) Added: trunk/lvpipe/source/ogpipe.llb/OGPIPE Open System Command As User.vi =================================================================== (Binary files differ) Index: trunk/lvpipe/source/ogpipe.llb/OGPIPE Open System Command As User.vi =================================================================== --- trunk/lvpipe/source/ogpipe.llb/OGPIPE Open System Command As User.vi 2017-04-10 21:54:22 UTC (rev 1546) +++ trunk/lvpipe/source/ogpipe.llb/OGPIPE Open System Command As User.vi 2017-09-28 08:17:55 UTC (rev 1547) Property changes on: trunk/lvpipe/source/ogpipe.llb/OGPIPE Open System Command As User.vi ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Modified: trunk/lvpipe/source/ogpipe.llb/OGPIPE Open System Command.vi =================================================================== (Binary files differ) Modified: trunk/lvpipe/source/ogpipe.llb/OGPIPE Read From Pipe.vi =================================================================== (Binary files differ) Modified: trunk/lvpipe/source/ogpipe.llb/OGPIPE RefNum.ctl =================================================================== (Binary files differ) Modified: trunk/lvpipe/source/ogpipe.llb/OGPIPE Write To Pipe.vi =================================================================== (Binary files differ) Deleted: trunk/lvpipe/source/ogpipes.dll =================================================================== (Binary files differ) Added: trunk/lvpipe/source/ogpipes.dll =================================================================== (Binary files differ) Index: trunk/lvpipe/source/ogpipes.dll =================================================================== --- trunk/lvpipe/source/ogpipes.dll 2017-04-10 21:54:22 UTC (rev 1546) +++ trunk/lvpipe/source/ogpipes.dll 2017-09-28 08:17:55 UTC (rev 1547) Property changes on: trunk/lvpipe/source/ogpipes.dll ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/lvpipe/source/ogpipes64.dll =================================================================== (Binary files differ) Index: trunk/lvpipe/source/ogpipes64.dll =================================================================== --- trunk/lvpipe/source/ogpipes64.dll 2017-04-10 21:54:22 UTC (rev 1546) +++ trunk/lvpipe/source/ogpipes64.dll 2017-09-28 08:17:55 UTC (rev 1547) Property changes on: trunk/lvpipe/source/ogpipes64.dll ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/lvpipe/source/readme.txt =================================================================== --- trunk/lvpipe/source/readme.txt (rev 0) +++ trunk/lvpipe/source/readme.txt 2017-09-28 08:17:55 UTC (rev 1547) @@ -0,0 +1,16 @@ +LabVIEW Pipe library, version 1.1.0 +---------------------------------- + +Copyright 2002-2017 Rolf Kalbermatter + + + +Release 1.1.0, Released: Oct. 05, 2017 +====================================== +First official release for a library which allows to support pipes in a LabVIEW application. +Pipes are communication channels which are well known from Unix systems. Under Unix standard-IO +of command line tools can be redirected to pipes and then used from other programs to read from +and write to them. + +With this library this functionality is also available under Windows. In addition the library +also supports named pipes, which are sometimes used for interapplication communication. \ No newline at end of file Modified: trunk/lvpipe/tests/PipeClient.vi =================================================================== (Binary files differ) Modified: trunk/lvpipe/tests/Simple Pipe Test.vi =================================================================== (Binary files differ) Added: trunk/lvpipe/tests/Start Plink.vi =================================================================== (Binary files differ) Index: trunk/lvpipe/tests/Start Plink.vi =================================================================== --- trunk/lvpipe/tests/Start Plink.vi 2017-04-10 21:54:22 UTC (rev 1546) +++ trunk/lvpipe/tests/Start Plink.vi 2017-09-28 08:17:55 UTC (rev 1547) Property changes on: trunk/lvpipe/tests/Start Plink.vi ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Modified: trunk/lvpipe/tests/System Command (cmd.exe) Test.vi =================================================================== (Binary files differ) Modified: trunk/lvpipe/tests/System Command Pipe Python Test.vi =================================================================== (Binary files differ) Modified: trunk/lvpipe/tests/System Command Pipe Test.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...> - 2017-04-10 21:54:24
|
Revision: 1546 http://sourceforge.net/p/opengtoolkit/svn/1546 Author: labviewer Date: 2017-04-10 21:54:22 +0000 (Mon, 10 Apr 2017) Log Message: ----------- Adapt VI interface to new DLL interface Modified Paths: -------------- trunk/lvpipe/source/ogpipe.llb/OGPIPE - VI TREE.vi trunk/lvpipe/source/ogpipe.llb/OGPIPE Close Pipe.vi trunk/lvpipe/source/ogpipe.llb/OGPIPE Execute System Command.vi trunk/lvpipe/source/ogpipe.llb/OGPIPE Open Pipe.vi trunk/lvpipe/source/ogpipe.llb/OGPIPE Open System Command.vi trunk/lvpipe/source/ogpipe.llb/OGPIPE Read From Pipe.vi trunk/lvpipe/source/ogpipe.llb/OGPIPE Write To Pipe.vi trunk/lvpipe/source/ogpipes.dll Removed Paths: ------------- trunk/lvpipe/source/ogpipe.llb/OGPIPE Open Pipe__ogtk.vi Modified: trunk/lvpipe/source/ogpipe.llb/OGPIPE - VI TREE.vi =================================================================== (Binary files differ) Modified: trunk/lvpipe/source/ogpipe.llb/OGPIPE Close Pipe.vi =================================================================== (Binary files differ) Modified: trunk/lvpipe/source/ogpipe.llb/OGPIPE Execute System Command.vi =================================================================== (Binary files differ) Modified: trunk/lvpipe/source/ogpipe.llb/OGPIPE Open Pipe.vi =================================================================== (Binary files differ) Deleted: trunk/lvpipe/source/ogpipe.llb/OGPIPE Open Pipe__ogtk.vi =================================================================== (Binary files differ) Modified: trunk/lvpipe/source/ogpipe.llb/OGPIPE Open System Command.vi =================================================================== (Binary files differ) Modified: trunk/lvpipe/source/ogpipe.llb/OGPIPE Read From Pipe.vi =================================================================== (Binary files differ) Modified: trunk/lvpipe/source/ogpipe.llb/OGPIPE Write To Pipe.vi =================================================================== (Binary files differ) Modified: trunk/lvpipe/source/ogpipes.dll =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lab...@us...> - 2017-04-10 21:53:36
|
Revision: 1545 http://sourceforge.net/p/opengtoolkit/svn/1545 Author: labviewer Date: 2017-04-10 21:53:34 +0000 (Mon, 10 Apr 2017) Log Message: ----------- Minor code improvement Modified Paths: -------------- trunk/lvpipe/c_source/pipes.c trunk/lvpipe/c_source/pipes.vcproj Modified: trunk/lvpipe/c_source/pipes.c =================================================================== --- trunk/lvpipe/c_source/pipes.c 2017-01-26 20:50:21 UTC (rev 1544) +++ trunk/lvpipe/c_source/pipes.c 2017-04-10 21:53:34 UTC (rev 1545) @@ -27,7 +27,7 @@ #include "hosttype.h" #include "pipes.h" -#if defined(DEBUG) +#if defined(_DEBUG) #if Win32 #if defined(_CVI_DEBUG_) #define DoDebugger() @@ -59,7 +59,8 @@ #define LibAPI __declspec(dllimport) __cdecl #endif -typedef enum { +typedef enum +{ kNone, kReadMode, kWriteMode, @@ -383,8 +384,7 @@ err = Win32ToLVErr(ret); *bytesRead = 0; } - - if (*bytesRead) + else if (*bytesRead) { /* There are some bytes to read, so try to read as much as possible now! */ if (!ReadFile(fd, LStrBuf(*data) + offset, bytesReq - offset, bytesRead, NULL)) @@ -616,6 +616,7 @@ if (!err) CloseHandle(fd); closeRefnum(*lvpipe); + *lvpipe = kNotAMagicCookie; } #elif defined(Unix) if (rmpipe) @@ -629,11 +630,11 @@ if (!err) close(fd); closeRefnum(*lvpipe); + *lvpipe = kNotAMagicCookie; } #else return mgNotImplementd #endif - *lvpipe = kNotAMagicCookie; return err; } Modified: trunk/lvpipe/c_source/pipes.vcproj =================================================================== --- trunk/lvpipe/c_source/pipes.vcproj 2017-01-26 20:50:21 UTC (rev 1544) +++ trunk/lvpipe/c_source/pipes.vcproj 2017-04-10 21:53:34 UTC (rev 1545) @@ -443,10 +443,6 @@ /> </FileConfiguration> </File> - <File - RelativePath=".\pipes.h" - > - </File> </Filter> <Filter Name="Resource Files" @@ -493,6 +489,10 @@ Name="Header Files" Filter="h;hpp;hxx;hm;inl" > + <File + RelativePath=".\pipes.h" + > + </File> </Filter> </Files> <Globals> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lab...@us...> - 2016-12-08 11:05:39
|
Revision: 1543 http://sourceforge.net/p/opengtoolkit/svn/1543 Author: labviewer Date: 2016-12-08 11:05:37 +0000 (Thu, 08 Dec 2016) Log Message: ----------- Allow for dynamic loading of SymbolicLink API Modified Paths: -------------- trunk/lvzip/c_source/lvutil.c trunk/lvzip/c_source/lvutil.h trunk/lvzip/c_source/zlibvc.vcproj Modified: trunk/lvzip/c_source/lvutil.c =================================================================== --- trunk/lvzip/c_source/lvutil.c 2016-12-04 23:36:48 UTC (rev 1542) +++ trunk/lvzip/c_source/lvutil.c 2016-12-08 11:05:37 UTC (rev 1543) @@ -6,9 +6,9 @@ */ #define ZLIB_INTERNAL +#include "lvutil.h" #include "zlib.h" #include "ioapi.h" -#include "lvutil.h" #include "iomem.h" #include "utf.h" #if Unix @@ -381,6 +381,7 @@ case ERROR_SHARING_VIOLATION: return fNoPerm; case ERROR_ALREADY_EXISTS: case ERROR_FILE_EXISTS: return fDupPath; + case ERROR_NOT_SUPPORTED: return mgNotSupported; case ERROR_NO_MORE_FILES: return mgNoErr; } return fIOErr; /* fIOErr generally signifies some unknown file error */ @@ -1595,6 +1596,48 @@ return err; } +#if Win32 +typedef BOOL (WINAPI *tCreateHardLinkW)(LPCWSTR lpFileName, LPCWSTR lpExistingFileName, LPSECURITY_ATTRIBUTES lpSecurityAttributes); +BOOL Win32CreateHardLinkW(LPCWSTR lpFileName, LPCWSTR lpExistingFileName, LPSECURITY_ATTRIBUTES lpSecurityAttributes) +{ + static tCreateHardLinkW pCreateHardLinkW = NULL; + if (!pCreateHardLinkW) + { + HMODULE hLib = LoadLibrary("kernel32.dll"); + if (hLib) + { + pCreateHardLinkW = (tCreateHardLinkW)GetProcAddress(hLib, "CreateHardLinkW"); + } + } + if (pCreateHardLinkW) + { + return pCreateHardLinkW(lpFileName, lpExistingFileName, lpSecurityAttributes); + } + SetLastError(ERROR_NOT_SUPPORTED); + return FALSE; +} + +typedef BOOL (WINAPI *tCreateSymbolicLinkW)(LPCWSTR lpSymlinkFileName, LPCWSTR lpTargetFileName, DWORD dwFlags); +BOOL Win32CreateSymbolicLinkW(LPCWSTR lpSymlinkFileName, LPCWSTR lpTargetFileName, DWORD dwFlags) +{ + static tCreateSymbolicLinkW pCreateSymbolicLinkW = NULL; + if (!pCreateSymbolicLinkW) + { + HMODULE hLib = LoadLibrary("kernel32.dll"); + if (hLib) + { + pCreateSymbolicLinkW = (tCreateSymbolicLinkW)GetProcAddress(hLib, "CreateSymbolicLinkW"); + } + } + if (pCreateSymbolicLinkW) + { + return pCreateSymbolicLinkW(lpSymlinkFileName, lpTargetFileName, dwFlags); + } + SetLastError(ERROR_NOT_SUPPORTED); + return FALSE; +} +#endif + LibAPI(MgErr) LVPath_CreateLink(Path path, uInt32 flags, Path target) { MgErr err = mgNoErr; @@ -1621,7 +1664,7 @@ if (symlink((const char*)LStrBuf(src), (const char*)LStrBuf(tgt))) err = UnixToLVFileErr(); } -#elif Win32 +#elif Win32 && !EMBEDDED if (FExists(target)) { FInfoRec finfo; @@ -1636,13 +1679,15 @@ if (flags & kLinkHard) { if (flags & kLinkDir) + { err = mgNotSupported; - else if (!CreateHardLinkW(UStrBuf(src), UStrBuf(tgt), NULL)) + } + else if (!Win32CreateHardLinkW(UStrBuf(src), UStrBuf(tgt), NULL)) { err = Win32ToLVFileErr(); } } - else if (!CreateSymbolicLinkW(UStrBuf(src), UStrBuf(tgt), flags & kLinkDir ? SYMBOLIC_LINK_FLAG_DIRECTORY : 0)) + else if (!Win32CreateSymbolicLinkW(UStrBuf(src), UStrBuf(tgt), flags & kLinkDir ? SYMBOLIC_LINK_FLAG_DIRECTORY : 0)) { err = Win32ToLVFileErr(); } @@ -1774,7 +1819,7 @@ if (!err) { LStrHandle handle = NULL; - err = WideCStrToMultiByte((LPCWCHAR)wTgt, -1, &handle, CP_ACP, 0, NULL); + err = WideCStrToMultiByte((LPCWSTR)wTgt, -1, &handle, CP_ACP, 0, NULL); if (!err) err = FTextToPath(LStrBuf(*handle), LStrLen(*handle), target); if (handle) @@ -2566,7 +2611,7 @@ #endif } -LibAPI(uInt32) determine_codepage(uLong *flags, LStrHandle string) +LibAPI(uInt32) determine_codepage(uInt32 *flags, LStrHandle string) { uInt32 cp = Hi16(*flags); if (!cp) Modified: trunk/lvzip/c_source/lvutil.h =================================================================== --- trunk/lvzip/c_source/lvutil.h 2016-12-04 23:36:48 UTC (rev 1542) +++ trunk/lvzip/c_source/lvutil.h 2016-12-08 11:05:37 UTC (rev 1543) @@ -65,6 +65,7 @@ #define DEBUG 1 #endif #define BigEndian 0 + #define _WIN32_WINNT 0x0501 #elif defined(linux) || defined(__linux) || defined(__linux__) #if defined(i386) #define ProcessorType kX86 @@ -618,7 +619,7 @@ /**************************/ /* Version string of the zlib library */ -LibAPI(void) DLLVersion OF((uChar* Version)); +LibAPI(void) DLLVersion(uChar* Version); /* Convert the path into a string representation for the current platform */ LibAPI(MgErr) LVPath_ToText(Path path, LStrHandle *str); @@ -680,14 +681,14 @@ uInt16 str[1]; } UString, *UStrPtr, **UStrHandle; -#define UStrLen(s) LStrLen(s) * sizeof(uInt16) / sizeof(wchar_t) +#define UStrLen(s) (int32)(LStrLen(s) * sizeof(uInt16) / sizeof(wchar_t)) #define UStrLenSet(s, l) LStrLen(s) = l * sizeof(wchar_t) / sizeof(uInt16) #define UStrBuf(s) ((wchar_t*)(LStrBuf(s))) LibAPI(MgErr) ZeroTerminateLString(LStrHandle *dest); LibAPI(uInt32) GetCurrentCodePage(LVBoolean acp); -LibAPI(uInt32) determine_codepage(uLong *flags, LStrHandle string); +LibAPI(uInt32) determine_codepage(uInt32 *flags, LStrHandle string); LibAPI(MgErr) MultiByteCStrToWideString(ConstCStr src, int32 srclen, UStrHandle *dest, uInt32 codePage); LibAPI(MgErr) MultiByteToWideString(const LStrHandle src, UStrHandle *dest, uInt32 codePage); LibAPI(MgErr) WideStringToMultiByte(const UStrHandle src, LStrHandle *dest, uInt32 codePage, char defaultChar, LVBoolean *defaultCharWasUsed); Modified: trunk/lvzip/c_source/zlibvc.vcproj =================================================================== --- trunk/lvzip/c_source/zlibvc.vcproj 2016-12-04 23:36:48 UTC (rev 1542) +++ trunk/lvzip/c_source/zlibvc.vcproj 2016-12-08 11:05:37 UTC (rev 1543) @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="Windows-1252"?> <VisualStudioProject ProjectType="Visual C++" - Version="8.00" + Version="8,00" Name="zlibvc" ProjectGUID="{FF990D80-DB65-4107-B10C-5F7ACEF6F01B}" RootNamespace="zlibvc" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lab...@us...> - 2016-09-20 21:14:23
|
Revision: 1541 http://sourceforge.net/p/opengtoolkit/svn/1541 Author: labviewer Date: 2016-09-20 21:14:21 +0000 (Tue, 20 Sep 2016) Log Message: ----------- cleanup project Modified Paths: -------------- trunk/lvpipe/c_source/pipes.dsw trunk/lvpipe/c_source/pipes.sln trunk/lvpipe/c_source/pipes.vcproj Added Paths: ----------- trunk/lvpipe/c_source/client.c trunk/lvpipe/c_source/client.dsp trunk/lvpipe/c_source/client.vcproj trunk/lvpipe/c_source/server.c trunk/lvpipe/c_source/server.vcproj Removed Paths: ------------- trunk/lvpipe/c_source/client/ trunk/lvpipe/c_source/pipes.ncb trunk/lvpipe/c_source/pipes.suo trunk/lvpipe/c_source/pipes.vcproj.KANTOOR1.rkalbermatter.user trunk/lvpipe/c_source/server/ Property Changed: ---------------- trunk/lvpipe/c_source/ Index: trunk/lvpipe/c_source =================================================================== --- trunk/lvpipe/c_source 2016-09-20 20:53:05 UTC (rev 1540) +++ trunk/lvpipe/c_source 2016-09-20 21:14:21 UTC (rev 1541) Property changes on: trunk/lvpipe/c_source ___________________________________________________________________ Added: svn:ignore ## -0,0 +1,3 ## +*.ncb +*.suo +*.user Added: trunk/lvpipe/c_source/client.c =================================================================== --- trunk/lvpipe/c_source/client.c (rev 0) +++ trunk/lvpipe/c_source/client.c 2016-09-20 21:14:21 UTC (rev 1541) @@ -0,0 +1,86 @@ +#include "extcode.h" +#include "hosttype.h" +#include <stdio.h> + +#if defined(DEBUG) + #if Win32 + #if defined(_CVI_DEBUG_) + #define DoDebugger() + #elif _MSC_VER >= 1400 + #define DoDebugger() __debugbreak() + #else + #define DoDebugger() {__asm int 3} + #endif + #elif MacOS + #define DoDebugger() Debugger() + #else + #define DoDebugger() + #endif + #define DEBUGPRINTF(args) DbgPrintf args +#else + #define DoDebugger() + #define DEBUGPRINTF(args) +/* long DebugPrintf(char* fmt, ...); + long DebugPrintf(char* fmt, ...) + { + return 0; + } +*/ +#endif + +#define BUFSIZE 4096 + +VOID main(VOID) +{ + CHAR chBuf[BUFSIZE]; + DWORD err, dwRead, dwWritten; + HANDLE hStdin, hStdout, hStderr; + BOOL fSuccess; + + DoDebugger(); + + hStdout = GetStdHandle(STD_OUTPUT_HANDLE); + hStdin = GetStdHandle(STD_INPUT_HANDLE); + hStderr = GetStdHandle(STD_ERROR_HANDLE); + if ((hStdout == INVALID_HANDLE_VALUE) || (hStdin == INVALID_HANDLE_VALUE)) + ExitProcess(1); + + // Write welcome message to standard output. + sprintf_s(chBuf, BUFSIZE, "Standard IO loopback test program\r\n3. Sep. 2016\r\n"); + fSuccess = WriteFile(hStdout, chBuf, (DWORD)strlen(chBuf), &dwWritten, NULL); + if (fSuccess) + { + for (;;) + { + // Read from standard input. + fSuccess = ReadFile(hStdin, chBuf, BUFSIZE, &dwRead, NULL); + if (!fSuccess || dwRead == 0) + { + err = GetLastError(); + if (err != ERROR_BROKEN_PIPE && hStderr != INVALID_HANDLE_VALUE) + { + sprintf_s(chBuf, BUFSIZE, "error = %d, dwRead = %d\r\n", err, dwRead); + WriteFile(hStderr, chBuf, (DWORD)strlen(chBuf), &dwWritten, NULL); + } + break; + } + + // Write to standard output. + fSuccess = WriteFile(hStdout, chBuf, dwRead, &dwWritten, NULL); + if (!fSuccess) + { + err = GetLastError(); + if (err != ERROR_BROKEN_PIPE && hStderr != INVALID_HANDLE_VALUE) + { + sprintf_s(chBuf, BUFSIZE, "error = %d, dwRead = %d\r\n", err, dwRead); + WriteFile(hStderr, chBuf, (DWORD)strlen(chBuf), &dwWritten, NULL); + } + break; + } + } + } + else + { + ExitProcess(2); + } +} \ No newline at end of file Added: trunk/lvpipe/c_source/client.dsp =================================================================== --- trunk/lvpipe/c_source/client.dsp (rev 0) +++ trunk/lvpipe/c_source/client.dsp 2016-09-20 21:14:21 UTC (rev 1541) @@ -0,0 +1,100 @@ +# Microsoft Developer Studio Project File - Name="client" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=client - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "client.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "client.mak" CFG="client - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "client - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "client - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "client - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "client - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "client - Win32 Release" +# Name "client - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\client.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project Added: trunk/lvpipe/c_source/client.vcproj =================================================================== --- trunk/lvpipe/c_source/client.vcproj (rev 0) +++ trunk/lvpipe/c_source/client.vcproj 2016-09-20 21:14:21 UTC (rev 1541) @@ -0,0 +1,434 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="8.00" + Name="client" + ProjectGUID="{E1BF5C82-C33B-41EF-9C9C-36F8B94FF432}" + RootNamespace="client" + > + <Platforms> + <Platform + Name="Win32" + /> + <Platform + Name="x64" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="$(PlatformName)/$(ProjectName)/$(ConfigurationName)" + IntermediateDirectory="$(PlatformName)/$(ProjectName)/$(ConfigurationName)" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + TypeLibraryName="$(IntDir)/client.tlb" + HeaderFileName="" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="..\..\cintools" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + MinimalRebuild="true" + ExceptionHandling="0" + BasicRuntimeChecks="3" + RuntimeLibrary="1" + PrecompiledHeaderFile="$(IntDir)/client.pch" + WarningLevel="3" + SuppressStartupBanner="true" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="_DEBUG" + Culture="1033" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + OutputFile="$(OutDir)/client.exe" + LinkIncremental="2" + SuppressStartupBanner="true" + GenerateDebugInformation="true" + ProgramDatabaseFile="$(IntDir)/client.pdb" + SubSystem="1" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + SuppressStartupBanner="true" + OutputFile="$(IntDir)/client.bsc" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Debug|x64" + OutputDirectory="$(PlatformName)/$(ProjectName)/$(ConfigurationName)" + IntermediateDirectory="$(PlatformName)/$(ProjectName)/$(ConfigurationName)" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + TargetEnvironment="3" + TypeLibraryName="$(IntDir)/client.tlb" + HeaderFileName="" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="..\..\cintools" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + MinimalRebuild="true" + ExceptionHandling="0" + BasicRuntimeChecks="3" + RuntimeLibrary="1" + PrecompiledHeaderFile="$(IntDir)/client.pch" + WarningLevel="3" + SuppressStartupBanner="true" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="_DEBUG" + Culture="1033" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + OutputFile="$(OutDir)/client.exe" + LinkIncremental="2" + SuppressStartupBanner="true" + GenerateDebugInformation="true" + ProgramDatabaseFile="$(IntDir)/client.pdb" + SubSystem="1" + TargetMachine="17" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + SuppressStartupBanner="true" + OutputFile="$(IntDir)/client.bsc" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="$(PlatformName)/$(ProjectName)/$(ConfigurationName)" + IntermediateDirectory="$(PlatformName)/$(ProjectName)/$(ConfigurationName)" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + TypeLibraryName="$(IntDir)/client.tlb" + HeaderFileName="" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + AdditionalIncludeDirectories="..\..\cintools" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + StringPooling="true" + ExceptionHandling="0" + RuntimeLibrary="0" + EnableFunctionLevelLinking="true" + PrecompiledHeaderFile="$(IntDir)/client.pch" + WarningLevel="3" + SuppressStartupBanner="true" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="1033" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + OutputFile="$(OutDir)/client.exe" + LinkIncremental="1" + SuppressStartupBanner="true" + ProgramDatabaseFile="$(IntDir)/client.pdb" + SubSystem="1" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + SuppressStartupBanner="true" + OutputFile="$(IntDir)/client.bsc" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|x64" + OutputDirectory="$(PlatformName)/$(ProjectName)/$(ConfigurationName)" + IntermediateDirectory="$(PlatformName)/$(ProjectName)/$(ConfigurationName)" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + TargetEnvironment="3" + TypeLibraryName="$(IntDir)/client.tlb" + HeaderFileName="" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + AdditionalIncludeDirectories="..\..\cintools" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + StringPooling="true" + ExceptionHandling="0" + RuntimeLibrary="0" + EnableFunctionLevelLinking="true" + PrecompiledHeaderFile="$(IntDir)/client.pch" + WarningLevel="3" + SuppressStartupBanner="true" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="1033" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + OutputFile="$(OutDir)/client.exe" + LinkIncremental="1" + SuppressStartupBanner="true" + ProgramDatabaseFile="$(IntDir)/client.pdb" + SubSystem="1" + TargetMachine="17" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + SuppressStartupBanner="true" + OutputFile="$(IntDir)/client.bsc" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Source Files" + Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" + > + <File + RelativePath="client.c" + > + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + PreprocessorDefinitions="" + /> + </FileConfiguration> + <FileConfiguration + Name="Debug|x64" + > + <Tool + Name="VCCLCompilerTool" + PreprocessorDefinitions="" + /> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32" + > + <Tool + Name="VCCLCompilerTool" + PreprocessorDefinitions="" + /> + </FileConfiguration> + <FileConfiguration + Name="Release|x64" + > + <Tool + Name="VCCLCompilerTool" + PreprocessorDefinitions="" + /> + </FileConfiguration> + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl" + > + </Filter> + <Filter + Name="Resource Files" + Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" + > + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> Modified: trunk/lvpipe/c_source/pipes.dsw =================================================================== --- trunk/lvpipe/c_source/pipes.dsw 2016-09-20 20:53:05 UTC (rev 1540) +++ trunk/lvpipe/c_source/pipes.dsw 2016-09-20 21:14:21 UTC (rev 1541) @@ -3,7 +3,7 @@ ############################################################################### -Project: "client"=.\client\client.dsp - Package Owner=<4> +Project: "client"=.\client.dsp - Package Owner=<4> Package=<5> {{{ Deleted: trunk/lvpipe/c_source/pipes.ncb =================================================================== (Binary files differ) Modified: trunk/lvpipe/c_source/pipes.sln =================================================================== --- trunk/lvpipe/c_source/pipes.sln 2016-09-20 20:53:05 UTC (rev 1540) +++ trunk/lvpipe/c_source/pipes.sln 2016-09-20 21:14:21 UTC (rev 1541) @@ -1,9 +1,9 @@ Microsoft Visual Studio Solution File, Format Version 9.00 # Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "client", "client\client.vcproj", "{E1BF5C82-C33B-41EF-9C9C-36F8B94FF432}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "client", "client.vcproj", "{E1BF5C82-C33B-41EF-9C9C-36F8B94FF432}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "server", "server\server.vcproj", "{CDEFAF54-3451-4EF9-A58D-A762E8C9D17D}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "server", "server.vcproj", "{CDEFAF54-3451-4EF9-A58D-A762E8C9D17D}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pipes", "pipes.vcproj", "{E68A2364-C20D-4724-81CA-CC78007D493B}" EndProject Deleted: trunk/lvpipe/c_source/pipes.suo =================================================================== (Binary files differ) Modified: trunk/lvpipe/c_source/pipes.vcproj =================================================================== --- trunk/lvpipe/c_source/pipes.vcproj 2016-09-20 20:53:05 UTC (rev 1540) +++ trunk/lvpipe/c_source/pipes.vcproj 2016-09-20 21:14:21 UTC (rev 1541) @@ -19,8 +19,8 @@ <Configurations> <Configuration Name="Debug|Win32" - OutputDirectory="$(PlatformName)/$(ConfigurationName)" - IntermediateDirectory="$(PlatformName)/$(ConfigurationName)" + OutputDirectory="$(PlatformName)/$(ProjectName)/$(ConfigurationName)" + IntermediateDirectory="$(PlatformName)/$(ProjectName)/$(ConfigurationName)" ConfigurationType="2" InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops" UseOfMFC="0" @@ -45,18 +45,18 @@ MkTypLibCompatible="true" SuppressStartupBanner="true" TargetEnvironment="1" - TypeLibraryName=".\Debug/pipes.tlb" + TypeLibraryName="$(IntDir)/pipes.tlb" HeaderFileName="" /> <Tool Name="VCCLCompilerTool" Optimization="0" - AdditionalIncludeDirectories="D:\Development\000xxx_Product_Lua4LabVIEW\csource\cintools" + AdditionalIncludeDirectories="..\..\cintools" PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;PIPES_EXPORTS" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" - PrecompiledHeaderFile=".\Debug/pipes.pch" + PrecompiledHeaderFile="$(IntDir)/pipes.pch" WarningLevel="3" SuppressStartupBanner="true" DebugInformationFormat="4" @@ -79,10 +79,10 @@ OutputFile="$(OutDir)/ogpipes.dll" LinkIncremental="2" SuppressStartupBanner="true" - AdditionalLibraryDirectories="D:\Development\000xxx_Product_Lua4LabVIEW\csource\cintools" + AdditionalLibraryDirectories="..\..\cintools" IgnoreDefaultLibraryNames="msvcrt" GenerateDebugInformation="true" - ProgramDatabaseFile=".\Debug/ogpipes.pdb" + ProgramDatabaseFile="$(IntDir)/ogpipes.pdb" ImportLibrary="$(OutDir)/ogpipes.lib" TargetMachine="1" /> @@ -98,7 +98,7 @@ <Tool Name="VCBscMakeTool" SuppressStartupBanner="true" - OutputFile=".\Debug/pipes.bsc" + OutputFile="$(IntDir)/pipes.bsc" /> <Tool Name="VCFxCopTool" @@ -115,8 +115,8 @@ </Configuration> <Configuration Name="Debug|x64" - OutputDirectory="$(PlatformName)/$(ConfigurationName)" - IntermediateDirectory="$(PlatformName)/$(ConfigurationName)" + OutputDirectory="$(PlatformName)/$(ProjectName)/$(ConfigurationName)" + IntermediateDirectory="$(PlatformName)/$(ProjectName)/$(ConfigurationName)" ConfigurationType="2" InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops" UseOfMFC="0" @@ -141,13 +141,13 @@ MkTypLibCompatible="true" SuppressStartupBanner="true" TargetEnvironment="3" - TypeLibraryName=".\Debug/pipes.tlb" + TypeLibraryName="$(IntDir)/pipes.tlb" HeaderFileName="" /> <Tool Name="VCCLCompilerTool" Optimization="0" - AdditionalIncludeDirectories="D:\Development\000xxx_Product_Lua4LabVIEW\csource\cintools" + AdditionalIncludeDirectories="..\..\cintools" PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;PIPES_EXPORTS" MinimalRebuild="true" BasicRuntimeChecks="0" @@ -175,7 +175,7 @@ OutputFile="$(OutDir)/ogpipes.dll" LinkIncremental="2" SuppressStartupBanner="true" - AdditionalLibraryDirectories="D:\Development\000xxx_Product_Lua4LabVIEW\csource\cintools" + AdditionalLibraryDirectories="..\..\cintools" IgnoreDefaultLibraryNames="msvcrt" GenerateDebugInformation="true" ProgramDatabaseFile="$(IntDir)/ogpipes.pdb" @@ -194,7 +194,7 @@ <Tool Name="VCBscMakeTool" SuppressStartupBanner="true" - OutputFile=".\Debug/pipes.bsc" + OutputFile="$(IntDir)/pipes.bsc" /> <Tool Name="VCFxCopTool" @@ -211,8 +211,8 @@ </Configuration> <Configuration Name="Release|Win32" - OutputDirectory="$(PlatformName)/$(ConfigurationName)" - IntermediateDirectory="$(PlatformName)/$(ConfigurationName)" + OutputDirectory="$(PlatformName)/$(ProjectName)/$(ConfigurationName)" + IntermediateDirectory="$(PlatformName)/$(ProjectName)/$(ConfigurationName)" ConfigurationType="2" InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops" UseOfMFC="0" @@ -237,19 +237,19 @@ MkTypLibCompatible="true" SuppressStartupBanner="true" TargetEnvironment="1" - TypeLibraryName=".\Release/pipes.tlb" + TypeLibraryName="$(IntDir)/pipes.tlb" HeaderFileName="" /> <Tool Name="VCCLCompilerTool" Optimization="2" InlineFunctionExpansion="1" - AdditionalIncludeDirectories="D:\Development\000xxx_Product_Lua4LabVIEW\csource\cintools" + AdditionalIncludeDirectories="..\..\cintools" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PIPES_EXPORTS" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" - PrecompiledHeaderFile=".\Release/pipes.pch" + PrecompiledHeaderFile="$(IntDir)/pipes.pch" WarningLevel="3" SuppressStartupBanner="true" CompileAs="1" @@ -271,7 +271,7 @@ OutputFile="$(OutDir)/ogpipes.dll" LinkIncremental="1" SuppressStartupBanner="true" - AdditionalLibraryDirectories="D:\Development\000xxx_Product_Lua4LabVIEW\csource\cintools" + AdditionalLibraryDirectories="..\..\cintools" ImportLibrary="$(OutDir)/ogpipes.lib" TargetMachine="1" /> @@ -287,7 +287,7 @@ <Tool Name="VCBscMakeTool" SuppressStartupBanner="true" - OutputFile=".\Release/pipes.bsc" + OutputFile="$(IntDir)/pipes.bsc" /> <Tool Name="VCFxCopTool" @@ -304,8 +304,8 @@ </Configuration> <Configuration Name="Release|x64" - OutputDirectory="$(PlatformName)/$(ConfigurationName)" - IntermediateDirectory="$(PlatformName)/$(ConfigurationName)" + OutputDirectory="$(PlatformName)/$(ProjectName)/$(ConfigurationName)" + IntermediateDirectory="$(PlatformName)/$(ProjectName)/$(ConfigurationName)" ConfigurationType="2" InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops" UseOfMFC="0" @@ -330,19 +330,19 @@ MkTypLibCompatible="true" SuppressStartupBanner="true" TargetEnvironment="3" - TypeLibraryName=".\Release/pipes.tlb" + TypeLibraryName="$(IntDir)/pipes.tlb" HeaderFileName="" /> <Tool Name="VCCLCompilerTool" Optimization="2" InlineFunctionExpansion="1" - AdditionalIncludeDirectories="D:\Development\000xxx_Product_Lua4LabVIEW\csource\cintools" + AdditionalIncludeDirectories="..\..\cintools" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PIPES_EXPORTS" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" - PrecompiledHeaderFile=".\Release/pipes.pch" + PrecompiledHeaderFile="$(IntDir)/pipes.pch" WarningLevel="3" SuppressStartupBanner="true" CompileAs="1" @@ -364,7 +364,7 @@ OutputFile="$(OutDir)/ogpipes.dll" LinkIncremental="1" SuppressStartupBanner="true" - AdditionalLibraryDirectories="D:\Development\000xxx_Product_Lua4LabVIEW\csource\cintools" + AdditionalLibraryDirectories="..\..\cintools" ImportLibrary="$(OutDir)/ogpipes.lib" TargetMachine="17" /> @@ -380,7 +380,7 @@ <Tool Name="VCBscMakeTool" SuppressStartupBanner="true" - OutputFile=".\Release/pipes.bsc" + OutputFile="$(IntDir)/pipes.bsc" /> <Tool Name="VCFxCopTool" Deleted: trunk/lvpipe/c_source/pipes.vcproj.KANTOOR1.rkalbermatter.user =================================================================== --- trunk/lvpipe/c_source/pipes.vcproj.KANTOOR1.rkalbermatter.user 2016-09-20 20:53:05 UTC (rev 1540) +++ trunk/lvpipe/c_source/pipes.vcproj.KANTOOR1.rkalbermatter.user 2016-09-20 21:14:21 UTC (rev 1541) @@ -1,121 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?> -<VisualStudioUserFile - ProjectType="Visual C++" - Version="8,00" - ShowAllFiles="false" - > - <Configurations> - <Configuration - Name="Debug|Win32" - > - <DebugSettings - Command="" - WorkingDirectory="" - CommandArguments="" - Attach="false" - DebuggerType="3" - Remote="1" - RemoteMachine="WS-L017" - RemoteCommand="" - HttpUrl="" - PDBPath="" - SQLDebugging="" - Environment="" - EnvironmentMerge="true" - DebuggerFlavor="" - MPIRunCommand="" - MPIRunArguments="" - MPIRunWorkingDirectory="" - ApplicationCommand="" - ApplicationArguments="" - ShimCommand="" - MPIAcceptMode="" - MPIAcceptFilter="" - /> - </Configuration> - <Configuration - Name="Debug|x64" - > - <DebugSettings - Command="" - WorkingDirectory="" - CommandArguments="" - Attach="false" - DebuggerType="3" - Remote="1" - RemoteMachine="WS-L017" - RemoteCommand="" - HttpUrl="" - PDBPath="" - SQLDebugging="" - Environment="" - EnvironmentMerge="true" - DebuggerFlavor="" - MPIRunCommand="" - MPIRunArguments="" - MPIRunWorkingDirectory="" - ApplicationCommand="" - ApplicationArguments="" - ShimCommand="" - MPIAcceptMode="" - MPIAcceptFilter="" - /> - </Configuration> - <Configuration - Name="Release|Win32" - > - <DebugSettings - Command="" - WorkingDirectory="" - CommandArguments="" - Attach="false" - DebuggerType="3" - Remote="1" - RemoteMachine="WS-L017" - RemoteCommand="" - HttpUrl="" - PDBPath="" - SQLDebugging="" - Environment="" - EnvironmentMerge="true" - DebuggerFlavor="" - MPIRunCommand="" - MPIRunArguments="" - MPIRunWorkingDirectory="" - ApplicationCommand="" - ApplicationArguments="" - ShimCommand="" - MPIAcceptMode="" - MPIAcceptFilter="" - /> - </Configuration> - <Configuration - Name="Release|x64" - > - <DebugSettings - Command="" - WorkingDirectory="" - CommandArguments="" - Attach="false" - DebuggerType="3" - Remote="1" - RemoteMachine="WS-L017" - RemoteCommand="" - HttpUrl="" - PDBPath="" - SQLDebugging="" - Environment="" - EnvironmentMerge="true" - DebuggerFlavor="" - MPIRunCommand="" - MPIRunArguments="" - MPIRunWorkingDirectory="" - ApplicationCommand="" - ApplicationArguments="" - ShimCommand="" - MPIAcceptMode="" - MPIAcceptFilter="" - /> - </Configuration> - </Configurations> -</VisualStudioUserFile> Added: trunk/lvpipe/c_source/server.c =================================================================== --- trunk/lvpipe/c_source/server.c (rev 0) +++ trunk/lvpipe/c_source/server.c 2016-09-20 21:14:21 UTC (rev 1541) @@ -0,0 +1,47 @@ +#include "extcode.h" +#include "hosttype.h" +#include <stdio.h> + +#define BUFSIZE 4096 + +int main(int argc, char* argv[]) +{ + HANDLE handle = CreateNamedPipeW(L"\\\\.\\pipe\\opengtest", PIPE_ACCESS_DUPLEX, PIPE_TYPE_BYTE | PIPE_READMODE_BYTE | PIPE_WAIT, + PIPE_UNLIMITED_INSTANCES, 1024, 1024, NMPWAIT_USE_DEFAULT_WAIT, NULL); + if (handle != INVALID_HANDLE_VALUE) + { + BOOL fSuccess; + DWORD err, dwRead, dwWritten; + CHAR chBuf[BUFSIZE]; + + while (TRUE) + { + // Read from named pipe + fSuccess = ReadFile(handle, chBuf, BUFSIZE, &dwRead, NULL); + if (!fSuccess || dwRead == 0) + { + err = GetLastError(); + if (err != ERROR_BROKEN_PIPE) + { + printf("Error reading pipe, error code: %x", err); + } + break; + } + + // Write to named pipe + fSuccess = WriteFile(handle, chBuf, dwRead, &dwWritten, NULL); + if (!fSuccess) + { + err = GetLastError(); + if (err != ERROR_BROKEN_PIPE) + { + printf("Error writing pipe, error code: %x", err); + } + break; + } + } + CloseHandle(handle); + } + return 0; +} + Added: trunk/lvpipe/c_source/server.vcproj =================================================================== --- trunk/lvpipe/c_source/server.vcproj (rev 0) +++ trunk/lvpipe/c_source/server.vcproj 2016-09-20 21:14:21 UTC (rev 1541) @@ -0,0 +1,199 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="8.00" + Name="server" + ProjectGUID="{CDEFAF54-3451-4EF9-A58D-A762E8C9D17D}" + RootNamespace="server" + Keyword="Win32Proj" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="$(PlatformName)/$(ProjectName)/$(ConfigurationName)" + IntermediateDirectory="$(PlatformName)/$(ProjectName)/$(ConfigurationName)" + ConfigurationType="1" + CharacterSet="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="..\..\cintools" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + LinkIncremental="2" + GenerateDebugInformation="true" + SubSystem="1" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="$(PlatformName)/$(ProjectName)/$(ConfigurationName)" + IntermediateDirectory="$(PlatformName)/$(ProjectName)/$(ConfigurationName)" + ConfigurationType="1" + CharacterSet="1" + WholeProgramOptimization="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + AdditionalIncludeDirectories="..\..\cintools" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + RuntimeLibrary="2" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + LinkIncremental="1" + GenerateDebugInformation="true" + SubSystem="1" + OptimizeReferences="2" + EnableCOMDATFolding="2" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Source Files" + Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + <File + RelativePath=".\server.c" + > + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl;inc;xsd" + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + </Filter> + <Filter + Name="Resource Files" + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" + > + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lab...@us...> - 2016-08-28 14:22:22
|
Revision: 1539 http://sourceforge.net/p/opengtoolkit/svn/1539 Author: labviewer Date: 2016-08-28 14:22:20 +0000 (Sun, 28 Aug 2016) Log Message: ----------- Revert last commit changing these files to LV2014 Modified Paths: -------------- trunk/lvzip/tests/lvzip-test-memory stream.vi trunk/lvzip/tests/lvzip-test-sm text files.vi trunk/lvzip/tests/lvzip-test-string compress.vi Modified: trunk/lvzip/tests/lvzip-test-memory stream.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/tests/lvzip-test-sm text files.vi =================================================================== (Binary files differ) Modified: trunk/lvzip/tests/lvzip-test-string compress.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...> - 2016-03-10 11:04:08
|
Revision: 1538 http://sourceforge.net/p/opengtoolkit/svn/1538 Author: labviewer Date: 2016-03-10 11:04:06 +0000 (Thu, 10 Mar 2016) Log Message: ----------- Add HTML source for project website on labpython.sourceforge.net Added Paths: ----------- trunk/labpython/HTML/ trunk/labpython/HTML/cgi-bin/ trunk/labpython/HTML/htdocs/ trunk/labpython/HTML/htdocs/images/ trunk/labpython/HTML/htdocs/images/LabPython.gif trunk/labpython/HTML/htdocs/images/PYTHON Close Session.vi.gif trunk/labpython/HTML/htdocs/images/PYTHON Compile Script.vi.gif trunk/labpython/HTML/htdocs/images/PYTHON Execute Script.vi.gif trunk/labpython/HTML/htdocs/images/PYTHON Get Data.vi.gif trunk/labpython/HTML/htdocs/images/PYTHON Get Variables.vi.gif trunk/labpython/HTML/htdocs/images/PYTHON Get Version and Types.vi.gif trunk/labpython/HTML/htdocs/images/PYTHON New Session.vi.gif trunk/labpython/HTML/htdocs/images/PYTHON Set Data.vi.gif trunk/labpython/HTML/htdocs/images/PYTHON Set Script Text.vi.gif trunk/labpython/HTML/htdocs/images/PYTHON Set Server Path.vi.gif trunk/labpython/HTML/htdocs/images/Python 2.2 Script Node.vi.gif trunk/labpython/HTML/htdocs/images/dir.mnu.png trunk/labpython/HTML/htdocs/images/drop-scriptnode.gif trunk/labpython/HTML/htdocs/images/scriptnode-example.png trunk/labpython/HTML/htdocs/images/select-scriptnode.gif trunk/labpython/HTML/htdocs/index.html trunk/labpython/HTML/htdocs/palette.html trunk/labpython/HTML/htdocs/scriptnode.html Added: trunk/labpython/HTML/htdocs/images/LabPython.gif =================================================================== (Binary files differ) Index: trunk/labpython/HTML/htdocs/images/LabPython.gif =================================================================== --- trunk/labpython/HTML/htdocs/images/LabPython.gif 2015-09-06 14:34:37 UTC (rev 1537) +++ trunk/labpython/HTML/htdocs/images/LabPython.gif 2016-03-10 11:04:06 UTC (rev 1538) Property changes on: trunk/labpython/HTML/htdocs/images/LabPython.gif ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/labpython/HTML/htdocs/images/PYTHON Close Session.vi.gif =================================================================== (Binary files differ) Index: trunk/labpython/HTML/htdocs/images/PYTHON Close Session.vi.gif =================================================================== --- trunk/labpython/HTML/htdocs/images/PYTHON Close Session.vi.gif 2015-09-06 14:34:37 UTC (rev 1537) +++ trunk/labpython/HTML/htdocs/images/PYTHON Close Session.vi.gif 2016-03-10 11:04:06 UTC (rev 1538) Property changes on: trunk/labpython/HTML/htdocs/images/PYTHON Close Session.vi.gif ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/labpython/HTML/htdocs/images/PYTHON Compile Script.vi.gif =================================================================== (Binary files differ) Index: trunk/labpython/HTML/htdocs/images/PYTHON Compile Script.vi.gif =================================================================== --- trunk/labpython/HTML/htdocs/images/PYTHON Compile Script.vi.gif 2015-09-06 14:34:37 UTC (rev 1537) +++ trunk/labpython/HTML/htdocs/images/PYTHON Compile Script.vi.gif 2016-03-10 11:04:06 UTC (rev 1538) Property changes on: trunk/labpython/HTML/htdocs/images/PYTHON Compile Script.vi.gif ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/labpython/HTML/htdocs/images/PYTHON Execute Script.vi.gif =================================================================== (Binary files differ) Index: trunk/labpython/HTML/htdocs/images/PYTHON Execute Script.vi.gif =================================================================== --- trunk/labpython/HTML/htdocs/images/PYTHON Execute Script.vi.gif 2015-09-06 14:34:37 UTC (rev 1537) +++ trunk/labpython/HTML/htdocs/images/PYTHON Execute Script.vi.gif 2016-03-10 11:04:06 UTC (rev 1538) Property changes on: trunk/labpython/HTML/htdocs/images/PYTHON Execute Script.vi.gif ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/labpython/HTML/htdocs/images/PYTHON Get Data.vi.gif =================================================================== (Binary files differ) Index: trunk/labpython/HTML/htdocs/images/PYTHON Get Data.vi.gif =================================================================== --- trunk/labpython/HTML/htdocs/images/PYTHON Get Data.vi.gif 2015-09-06 14:34:37 UTC (rev 1537) +++ trunk/labpython/HTML/htdocs/images/PYTHON Get Data.vi.gif 2016-03-10 11:04:06 UTC (rev 1538) Property changes on: trunk/labpython/HTML/htdocs/images/PYTHON Get Data.vi.gif ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/labpython/HTML/htdocs/images/PYTHON Get Variables.vi.gif =================================================================== (Binary files differ) Index: trunk/labpython/HTML/htdocs/images/PYTHON Get Variables.vi.gif =================================================================== --- trunk/labpython/HTML/htdocs/images/PYTHON Get Variables.vi.gif 2015-09-06 14:34:37 UTC (rev 1537) +++ trunk/labpython/HTML/htdocs/images/PYTHON Get Variables.vi.gif 2016-03-10 11:04:06 UTC (rev 1538) Property changes on: trunk/labpython/HTML/htdocs/images/PYTHON Get Variables.vi.gif ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/labpython/HTML/htdocs/images/PYTHON Get Version and Types.vi.gif =================================================================== (Binary files differ) Index: trunk/labpython/HTML/htdocs/images/PYTHON Get Version and Types.vi.gif =================================================================== --- trunk/labpython/HTML/htdocs/images/PYTHON Get Version and Types.vi.gif 2015-09-06 14:34:37 UTC (rev 1537) +++ trunk/labpython/HTML/htdocs/images/PYTHON Get Version and Types.vi.gif 2016-03-10 11:04:06 UTC (rev 1538) Property changes on: trunk/labpython/HTML/htdocs/images/PYTHON Get Version and Types.vi.gif ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/labpython/HTML/htdocs/images/PYTHON New Session.vi.gif =================================================================== (Binary files differ) Index: trunk/labpython/HTML/htdocs/images/PYTHON New Session.vi.gif =================================================================== --- trunk/labpython/HTML/htdocs/images/PYTHON New Session.vi.gif 2015-09-06 14:34:37 UTC (rev 1537) +++ trunk/labpython/HTML/htdocs/images/PYTHON New Session.vi.gif 2016-03-10 11:04:06 UTC (rev 1538) Property changes on: trunk/labpython/HTML/htdocs/images/PYTHON New Session.vi.gif ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/labpython/HTML/htdocs/images/PYTHON Set Data.vi.gif =================================================================== (Binary files differ) Index: trunk/labpython/HTML/htdocs/images/PYTHON Set Data.vi.gif =================================================================== --- trunk/labpython/HTML/htdocs/images/PYTHON Set Data.vi.gif 2015-09-06 14:34:37 UTC (rev 1537) +++ trunk/labpython/HTML/htdocs/images/PYTHON Set Data.vi.gif 2016-03-10 11:04:06 UTC (rev 1538) Property changes on: trunk/labpython/HTML/htdocs/images/PYTHON Set Data.vi.gif ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/labpython/HTML/htdocs/images/PYTHON Set Script Text.vi.gif =================================================================== (Binary files differ) Index: trunk/labpython/HTML/htdocs/images/PYTHON Set Script Text.vi.gif =================================================================== --- trunk/labpython/HTML/htdocs/images/PYTHON Set Script Text.vi.gif 2015-09-06 14:34:37 UTC (rev 1537) +++ trunk/labpython/HTML/htdocs/images/PYTHON Set Script Text.vi.gif 2016-03-10 11:04:06 UTC (rev 1538) Property changes on: trunk/labpython/HTML/htdocs/images/PYTHON Set Script Text.vi.gif ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/labpython/HTML/htdocs/images/PYTHON Set Server Path.vi.gif =================================================================== (Binary files differ) Index: trunk/labpython/HTML/htdocs/images/PYTHON Set Server Path.vi.gif =================================================================== --- trunk/labpython/HTML/htdocs/images/PYTHON Set Server Path.vi.gif 2015-09-06 14:34:37 UTC (rev 1537) +++ trunk/labpython/HTML/htdocs/images/PYTHON Set Server Path.vi.gif 2016-03-10 11:04:06 UTC (rev 1538) Property changes on: trunk/labpython/HTML/htdocs/images/PYTHON Set Server Path.vi.gif ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/labpython/HTML/htdocs/images/Python 2.2 Script Node.vi.gif =================================================================== (Binary files differ) Index: trunk/labpython/HTML/htdocs/images/Python 2.2 Script Node.vi.gif =================================================================== --- trunk/labpython/HTML/htdocs/images/Python 2.2 Script Node.vi.gif 2015-09-06 14:34:37 UTC (rev 1537) +++ trunk/labpython/HTML/htdocs/images/Python 2.2 Script Node.vi.gif 2016-03-10 11:04:06 UTC (rev 1538) Property changes on: trunk/labpython/HTML/htdocs/images/Python 2.2 Script Node.vi.gif ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/labpython/HTML/htdocs/images/dir.mnu.png =================================================================== (Binary files differ) Index: trunk/labpython/HTML/htdocs/images/dir.mnu.png =================================================================== --- trunk/labpython/HTML/htdocs/images/dir.mnu.png 2015-09-06 14:34:37 UTC (rev 1537) +++ trunk/labpython/HTML/htdocs/images/dir.mnu.png 2016-03-10 11:04:06 UTC (rev 1538) Property changes on: trunk/labpython/HTML/htdocs/images/dir.mnu.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/labpython/HTML/htdocs/images/drop-scriptnode.gif =================================================================== (Binary files differ) Index: trunk/labpython/HTML/htdocs/images/drop-scriptnode.gif =================================================================== --- trunk/labpython/HTML/htdocs/images/drop-scriptnode.gif 2015-09-06 14:34:37 UTC (rev 1537) +++ trunk/labpython/HTML/htdocs/images/drop-scriptnode.gif 2016-03-10 11:04:06 UTC (rev 1538) Property changes on: trunk/labpython/HTML/htdocs/images/drop-scriptnode.gif ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/labpython/HTML/htdocs/images/scriptnode-example.png =================================================================== (Binary files differ) Index: trunk/labpython/HTML/htdocs/images/scriptnode-example.png =================================================================== --- trunk/labpython/HTML/htdocs/images/scriptnode-example.png 2015-09-06 14:34:37 UTC (rev 1537) +++ trunk/labpython/HTML/htdocs/images/scriptnode-example.png 2016-03-10 11:04:06 UTC (rev 1538) Property changes on: trunk/labpython/HTML/htdocs/images/scriptnode-example.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/labpython/HTML/htdocs/images/select-scriptnode.gif =================================================================== (Binary files differ) Index: trunk/labpython/HTML/htdocs/images/select-scriptnode.gif =================================================================== --- trunk/labpython/HTML/htdocs/images/select-scriptnode.gif 2015-09-06 14:34:37 UTC (rev 1537) +++ trunk/labpython/HTML/htdocs/images/select-scriptnode.gif 2016-03-10 11:04:06 UTC (rev 1538) Property changes on: trunk/labpython/HTML/htdocs/images/select-scriptnode.gif ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/labpython/HTML/htdocs/index.html =================================================================== --- trunk/labpython/HTML/htdocs/index.html (rev 0) +++ trunk/labpython/HTML/htdocs/index.html 2016-03-10 11:04:06 UTC (rev 1538) @@ -0,0 +1,19 @@ +<HTML> +<p align="center"><img src="images/LabPython.gif"></p> +<H2 align="center">LabPython - Open Source Python Tools for LabVIEW™</H2> +<img src="images/dir.mnu.png" width="248" height="195"> + +<H3><a href="palette.html">Palette</a></H3> +<H3><a href="scriptnode.html">Script Node</a></H3> +<H3><a href="https://sourceforge.net/projects/opengtoolkit/files/lib_python/">Download LabPython from SourceForge.net</a></H3> +<H3><a href="http://www.python.org/download/">Download Python 2.x from Python.org</a></H3> +<H3><a href="http://lists.sourceforge.net/lists/listinfo/labpython-users">LabPython + Users Mailing List</a> - Join the mailing list to communicate with other users</H3> +<p> </p> +The latest source code and binary packages have moved to the OpenG Toolkit project in this link: +<H3><a href="https://sourceforge.net/projects/opengtoolkit">OpenG Toolkit on Sourceforge</a> - home of the largest Open Source + LabVIEW™ development community</H3> +<p> </p> +<p><a href="http://sourceforge.net"><img src="http://sourceforge.net/sflogo.php?group_id=61043&type=2" width="125" height="37" border="0" alt="SourceForge.net Logo"></a> +</p> +</HTML> Added: trunk/labpython/HTML/htdocs/palette.html =================================================================== --- trunk/labpython/HTML/htdocs/palette.html (rev 0) +++ trunk/labpython/HTML/htdocs/palette.html 2016-03-10 11:04:06 UTC (rev 1538) @@ -0,0 +1,85 @@ +<HTML> +<p><a href="/"><== Back</a></p> +<H2>Palette</H2> +<img src="images/dir.mnu.png" width="248" height="195"> + +<H3>Python 2.2 Script Node.vi</H3> +<img src="images/Python 2.2 Script Node.vi.gif"> +<BR> +<a href="scriptnode.html">Dropping</a> this node on the diagram places a script node preconfigured to use the Python script node interface library there. This script node can be operated similarily to the HIQ and Matlab script node. +<BR> +<BR> +<BR> +<H3>PYTHON New Session.vi</H3> +<img src="images/PYTHON New Session.vi.gif"> +<BR> +This function makes sure the Python shared library is properly loaded and then creates a session context which is used to store the input and output variables, the human readable and compiled script, and any error state information which might occur during execution on this session refnum. +<BR> +<BR> +<BR> +<H3>PYTHON Compile Script.vi</H3> +<img src="images/PYTHON Compile Script.vi.gif"> +<BR> +This function compiles the previously assigned script text into a code stream. No evaluation is performed and therefore no input variables need to have been assigned at this point. A once compiled script can immediately get evaluated when you call the PYTHON Execute.vi. +<BR> +<BR> +<BR> +<H3>PYTHON Close Session.vi</H3> +<img src="images/PYTHON Close Session.vi.gif"> +<BR> +Closes a Python script session and disposes of any resources assigned to this session. +<BR> +<BR> +<BR> +<H3>PYTHON Execute Script.vi</H3> +<img src="images/PYTHON Execute Script.vi.gif"> +<BR> +This function compiles the previously assigned script text, if this hasn't already be done and then evaluates the compiled script. Before calling this you should have assigned all necessary input variables to this session, as they are required during evalution of the compiled script. +This function can be called multiple times for the same script with new assignments to only the input variables which have changed and the compiled script will then each time be reevaluated. +<BR> +<BR> +<BR> +<H3>PYTHON Set Server Path.vi</H3> +<img src="images/PYTHON Set Server Path.vi.gif"> +<BR> +This function configures the interface to use a particular Python shared library. +<BR> +<BR> +<BR> +<H3>PYTHON Set Script Text.vi</H3> +<img src="images/PYTHON Set Script Text.vi.gif"> +<BR> +This function assigns the script text to the specified session. Each session can only contain one script at any one time. Assigning a new script clears any previously created script, compiled script and variable data. +<BR> +<BR> +<BR> +<H3>PYTHON Set Data.vi</H3> +<img src="images/PYTHON Set Data.vi.gif"> +<BR> + +<BR> +<BR> +<BR> +<H3>PYTHON Get Data.vi</H3> +<img src="images/PYTHON Get Data.vi.gif"> +<BR> + +<BR> +<BR> +<BR> +<H3>PYTHON Get Version and Types.vi</H3> +<img src="images/PYTHON Get Version and Types.vi.gif"> +<BR> +This function returns a version string indicating the Python version implemented in the Python shared library server, (Date and Time when the shared library was created), and [the compiler used to create that shared library]. + +<BR> +<BR> +<BR> +<H3>PYTHON Get Variables.vi</H3> +<img src="images/PYTHON Get Variables.vi.gif"> +<BR> +This function retrieves a list of all currently defined local variables and their type. Locale variables can have been set previously with the PYTHON Set <type> Data.vi functions and/or been generated or updated by a previous call to PYTHON Execute Script.vi. +<BR> +<BR> +<BR> +</HTML> Added: trunk/labpython/HTML/htdocs/scriptnode.html =================================================================== --- trunk/labpython/HTML/htdocs/scriptnode.html (rev 0) +++ trunk/labpython/HTML/htdocs/scriptnode.html 2016-03-10 11:04:06 UTC (rev 1538) @@ -0,0 +1,13 @@ +<HTML> +<p><a href="/"><== Back</a></p> +<H2>Script Node</H2> +<img src="images/dir.mnu.png"> +<H3>Step 1 - Select</H3> +<p><img src="images/select-scriptnode.gif" width="672" height="549"></p> +<p> </p> +<H3>Step 2 - Drop</H3> +<p><img src="images/drop-scriptnode.gif" width="672" height="549"></p> +<p> </p> +<h3>Step 3 - Python Fun! :-)</h3> +<h3><img src="images/scriptnode-example.png" width="882" height="470"></h3> +</HTML> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lab...@us...> - 2015-09-06 14:34:40
|
Revision: 1537 http://sourceforge.net/p/opengtoolkit/svn/1537 Author: labviewer Date: 2015-09-06 14:34:37 +0000 (Sun, 06 Sep 2015) Log Message: ----------- Update Read Link function for MacOSX Modified Paths: -------------- trunk/lvzip/c_source/lvutil.c trunk/lvzip/c_source/lvutil.h trunk/lvzip/source/fileutil.llb/FILE Get Directory Content.vi Added Paths: ----------- trunk/lvzip/source/fileutil.llb/FILE Read Link Target.vi Property Changed: ---------------- trunk/lvzip/c_source/ Index: trunk/lvzip/c_source =================================================================== --- trunk/lvzip/c_source 2015-07-31 23:16:09 UTC (rev 1536) +++ trunk/lvzip/c_source 2015-09-06 14:34:37 UTC (rev 1537) Property changes on: trunk/lvzip/c_source ___________________________________________________________________ Modified: svn:ignore ## -4,3 +4,4 ## .opt .plg .o +Build Modified: trunk/lvzip/c_source/lvutil.c =================================================================== --- trunk/lvzip/c_source/lvutil.c 2015-07-31 23:16:09 UTC (rev 1536) +++ trunk/lvzip/c_source/lvutil.c 2015-09-06 14:34:37 UTC (rev 1537) @@ -103,10 +103,13 @@ #define usesWinPath Win32 #if usesHFSPath +#define kPathSeperator ':' typedef SInt16 FileRefNum; #elif usesPosixPath +#define kPathSeperator '/' typedef FILE* FileRefNum; #elif usesWinPath +#define kPathSeperator '\' typedef HANDLE FileRefNum; #endif @@ -978,6 +981,10 @@ if (!err) err = ConvertToPosixPath(*str, str, false); #endif + if (LStrBuf(**str)[LStrLen(**str) - 1] == kPathSeperator) + { + LStrLen(**str)--; + } } } return err; @@ -1061,7 +1068,7 @@ return err; } -LibAPI(MgErr) LVPath_ReadLink(Path path, Path *target) +LibAPI(MgErr) LVPath_ReadLink(Path path, Path *target, int32 *fileType) { MgErr err = mgNoErr; LStrHandle src = NULL; @@ -1074,7 +1081,7 @@ { #if MacOSX || Unix struct stat st; - char *buf = NULL; + char *buf = NULL, *ptr = NULL; int len = 0; if (lstat((const char*)LStrBuf(*src), &st)) @@ -1104,13 +1111,72 @@ } else if (retval < len) { - err = LVPath_FromText((CStr)buf, retval, target, LV_FALSE); - free(buf); - break; + /* Is the link target a relative path */ + if (buf[0] != '/') + { + ptr = realloc(buf, retval + LStrLen(*src) + 1); + if (ptr) + { + buf = ptr; + memmove(buf + LStrLen(*src) + 1, buf, retval); + memmove(buf, LStrBuf(*src), LStrLen(*src)); + buf[LStrLen(*src)] = '/'; + retval += LStrLen(*src) + 1; + } + else + { + err = mFullErr; + } + } + if (!err) + { + err = LVPath_FromText((CStr)buf, retval, target, LV_FALSE); + if (!err && fileType) + { + if (lstat(buf, &st)) + { + err = UnixToLVFileErr(); + } + else if (S_ISLNK(st.st_mode)) + { + if (stat(buf, &st)) + { + err = UnixToLVFileErr(); + } + else + { + *fileType = S_ISDIR(st.st_mode) ? kIsLink : kIsLink | kIsFile; + } + } + else + { + if (!S_ISDIR(st.st_mode)) + { + *fileType = kIsFile; + } + } + } + break; + } } - len += len; - buf = realloc(buf, len); + else // retval >= len + { + len += len; + ptr = realloc(buf, len); + if (!ptr) + { + err = mFullErr; + } + else + { + buf = ptr; + } + } } + if (buf) + { + free(buf); + } #elif Win32 WIN32_FILE_ATTRIBUTE_DATA data; BOOL ret = GetFileAttributesExA(LStrBuf(*src), GetFileExInfoStandard, &data); Modified: trunk/lvzip/c_source/lvutil.h =================================================================== --- trunk/lvzip/c_source/lvutil.h 2015-07-31 23:16:09 UTC (rev 1536) +++ trunk/lvzip/c_source/lvutil.h 2015-09-06 14:34:37 UTC (rev 1537) @@ -404,7 +404,8 @@ typedef enum _FMFileType { kInvalidType =0, kUnknownFileType=RTToL('?','?','?','?'), - kTextFileType =RTToL('T','E','X','T'), + 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'), @@ -629,7 +630,7 @@ /* Create and read a link */ LibAPI(MgErr) LVPath_CreateLink(Path path, uInt32 flags, Path target); -LibAPI(MgErr) LVPath_ReadLink(Path path, Path *target); +LibAPI(MgErr) LVPath_ReadLink(Path path, Path *target, int32 *fileType); /* Legacy functions not supported on Mac OSX and all non-Mac platforms */ LibAPI(MgErr) LVPath_EncodeMacbinary(Path srcFileName, Path dstFileName); Modified: trunk/lvzip/source/fileutil.llb/FILE Get Directory Content.vi =================================================================== (Binary files differ) Added: trunk/lvzip/source/fileutil.llb/FILE Read Link Target.vi =================================================================== (Binary files differ) Index: trunk/lvzip/source/fileutil.llb/FILE Read Link Target.vi =================================================================== --- trunk/lvzip/source/fileutil.llb/FILE Read Link Target.vi 2015-07-31 23:16:09 UTC (rev 1536) +++ trunk/lvzip/source/fileutil.llb/FILE Read Link Target.vi 2015-09-06 14:34:37 UTC (rev 1537) Property changes on: trunk/lvzip/source/fileutil.llb/FILE Read Link Target.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...> - 2015-07-31 23:16:11
|
Revision: 1536 http://sourceforge.net/p/opengtoolkit/svn/1536 Author: labviewer Date: 2015-07-31 23:16:09 +0000 (Fri, 31 Jul 2015) Log Message: ----------- Fix the definition of the macro Modified Paths: -------------- trunk/labpython/c source/lvsnapi.h Modified: trunk/labpython/c source/lvsnapi.h =================================================================== --- trunk/labpython/c source/lvsnapi.h 2015-07-29 21:02:00 UTC (rev 1535) +++ trunk/labpython/c source/lvsnapi.h 2015-07-31 23:16:09 UTC (rev 1536) @@ -101,22 +101,17 @@ #define lvsnFAILURE 0 #define kMaxErrStringLength 0x400 -typedef struct { +typedef struct +{ int32 len; LStrHandle elm[4]; } **LStrArrayHdl; -#if !defined(NIPrivatePtr) - #if defined(LV_PRIVATE_POINTER) - #define NIPrivatePtr(p) LV_PRIVATE_POINTER(p) // LV 8.5 - LV 2011 - #elif defined(PrivatP) - #define NIPrivatePtr(p) PrivatP(p) // <= LV 8.2.1 - #else - #error Unsupported cintools headers - #endif +#if !defined(LV_PRIVATE_POINTER) + #define LV_PRIVATE_POINTER(p) PrivateP(p) // >= LV 8.5 #endif -NIPrivatePtr(lvsnInstance); +LV_PRIVATE_POINTER(lvsnInstance); /********************************************************************************/ /* */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lab...@us...> - 2015-07-29 21:02:02
|
Revision: 1535 http://sourceforge.net/p/opengtoolkit/svn/1535 Author: labviewer Date: 2015-07-29 21:02:00 +0000 (Wed, 29 Jul 2015) Log Message: ----------- Edit source code to work with newer cintools and Python headers Modified Paths: -------------- trunk/labpython/c source/dynlib.c trunk/labpython/c source/dynlib.h trunk/labpython/c source/lvpython.c trunk/labpython/c source/lvpython.h trunk/labpython/c source/lvsnapi.h trunk/labpython/c source/pyimport.c trunk/labpython/c source/pytscript.c Added Paths: ----------- trunk/labpython/c source/lvpython.sln trunk/labpython/c source/lvpython.vcproj trunk/labpython/c source/pytscript.vcproj Modified: trunk/labpython/c source/dynlib.c =================================================================== --- trunk/labpython/c source/dynlib.c 2015-05-27 18:39:26 UTC (rev 1534) +++ trunk/labpython/c source/dynlib.c 2015-07-29 21:02:00 UTC (rev 1535) @@ -27,12 +27,12 @@ #include "dynlib.h" -ExtLib LoadExternalLib(CStr path) { +ExtLib LoadExternalLib(ConstCStr path) { #if MSWin - return (ExtLib)LoadLibrary(path); -#elif Mac + return (ExtLib)LoadLibraryA((LPCSTR)path); +#elif FragInterface return NULL; -#elif Unix +#elif DLInterface return (ExtLib)dlopen ((char*)path, RTLD_LAZY); #else return NULL; @@ -42,9 +42,9 @@ Bool32 FreeExternalLib(ExtLib lib) { #if MSWin return FreeLibrary(lib); -#elif Mac +#elif FragInterface return FALSE; -#elif Unix +#elif DLInterface return dlclose(lib); #else return FALSE; @@ -54,9 +54,9 @@ ProcPtr LoadExternalSym(ExtLib lib, CStr name) { #if MSWin return (ProcPtr)GetProcAddress(lib, name); -#elif Mac +#elif FragInterface return NULL; -#elif Unix +#elif DLInterface return (ProcPtr)dlsym(lib, (char*)name); #else return NULL; Modified: trunk/labpython/c source/dynlib.h =================================================================== --- trunk/labpython/c source/dynlib.h 2015-05-27 18:39:26 UTC (rev 1534) +++ trunk/labpython/c source/dynlib.h 2015-07-29 21:02:00 UTC (rev 1535) @@ -10,16 +10,22 @@ #include "extcode.h" #include "hosttype.h" -#if Unix +#if Unix || MacOSX +#define DLInterface 1 +#elif Mac +#define FragInterface 1 +#endif + +#if DLInterface # include <dlfcn.h> -#elif Mac +#elif FragInterface # include <CodeFragments.h> #endif #if MSWin #define IMPORT_DECORATION _imp__ typedef HMODULE ExtLib; -#elif Unix +#elif DLInterface #define IMPORT_DECORATION _ typedef void* ExtLib; #else /* Mac */ @@ -28,7 +34,7 @@ typedef int32 (*ProcPtr) (int32); -ExtLib LoadExternalLib(CStr path); +ExtLib LoadExternalLib(ConstCStr path); Bool32 FreeExternalLib(ExtLib lib); ProcPtr LoadExternalSym(ExtLib lib, CStr name); Bool32 LoadFuncIfNeeded(ExtLib lib, ProcPtr *ptr, CStr name); Modified: trunk/labpython/c source/lvpython.c =================================================================== --- trunk/labpython/c source/lvpython.c 2015-05-27 18:39:26 UTC (rev 1534) +++ trunk/labpython/c source/lvpython.c 2015-07-29 21:02:00 UTC (rev 1535) @@ -121,8 +121,8 @@ #ifdef PY_NO_IMPORT_LIB extern long * _Py_RefTotal_Ptr; extern PyObject * _Py_NoneStruct_Ptr; -extern PyIntObject * _Py_ZeroStruct_Ptr; -extern PyIntObject * _Py_TrueStruct_Ptr; +extern PyObject * _Py_FalseStruct_Ptr; +extern PyObject * _Py_TrueStruct_Ptr; extern PyTypeObject * PyComplex_Type_Ptr; extern PyTypeObject * PyFloat_Type_Ptr; extern PyTypeObject * PyInt_Type_Ptr; @@ -643,7 +643,7 @@ PyObject *kl, *key, *val; CStr str; - num = PyDict_Size(session->dl); + num = (int32)PyDict_Size(session->dl); if (SetArraySize(&varTypes[kTDString], 0, 1L, (UHandle*)&names, num)) { goto errOut; @@ -943,7 +943,7 @@ if (PyObject_TypeCheckNew(mess, PyString_Type)) { CStr t = (CStr)PyString_AsString(mess); - rest = Min(PyString_Size(mess), rest); + rest = Min((int32)PyString_Size(mess), rest); StrNCpy(p, t, rest); } /* else if (PyTuple_Check(mess)) { @@ -962,7 +962,7 @@ /* new style errors. `mess' is an instance */ if ((v = PyObject_GetAttrString(mess, "offset"))) { - if (v && v != Py_NonePtr) { + if (Py_isValidObject(v)) { long hold = PyInt_AsLong(v); if (hold >= 0 && !PyErr_Occurred()) *eStart = (int32)hold; @@ -970,8 +970,8 @@ PyObject_Decref(v); } if ((v = PyObject_GetAttrString(mess, "text"))) { - if (v && v != Py_NonePtr) { - rest = Min(PyString_Size(v), rest); + if (Py_isValidObject(v)) { + rest = Min((int32)PyString_Size(v), rest); StrNCpy(eText, (CStr)PyString_AsString(v), rest); } PyObject_Decref(v); @@ -1027,14 +1027,14 @@ static MgErr PyArray_Attributes(PyObject *value, int32 *elms, int32 *dims) { if (PyObject_TypeCheckNew(value, PyList_Type)) { - *elms = PyList_Size(value); + *elms = (int32)PyList_Size(value); *dims = 1; if (*elms) { PyObject *item = PyList_GetItem(value, 0); /* item is borrowed reference */ if (PyObject_TypeCheckNew(item, PyList_Type)) { - *elms *= PyList_Size(item); + *elms *= (int32)PyList_Size(item); if (*elms) { PyObject *o = PyList_GetItem(item, 0); if (o && PyObject_TypeCheckNew(o, PyList_Type)) { @@ -1092,7 +1092,7 @@ for (i = 0; i < lvDims; i++, sp++) { if (i < dims) { - *sp = PyList_Size(list); + *sp = (int32)PyList_Size(list); list = PyList_GetItem(list, 0); } else { @@ -1294,7 +1294,7 @@ return mgArgErr; } - if ((len = PyString_Size(s))) { + if ((len = (int32)PyString_Size(s))) { LStrHandle lstr = NULL; switch (lvType = TDType(tdp, off)) { Modified: trunk/labpython/c source/lvpython.h =================================================================== --- trunk/labpython/c source/lvpython.h 2015-05-27 18:39:26 UTC (rev 1534) +++ trunk/labpython/c source/lvpython.h 2015-07-29 21:02:00 UTC (rev 1535) @@ -80,8 +80,7 @@ #define PyObject_Decref(op) Py_DECREF(op) #endif #define Py_NonePtr _Py_NoneStruct_Ptr - #define Py_ZeroPtr _Py_ZeroStruct_Ptr - #define Py_FalsePtr _Py_ZeroStruct_Ptr + #define Py_FalsePtr _Py_FalseStruct_Ptr #define Py_TruePtr _Py_TrueStruct_Ptr #else #define PyObject_TypeCheckNew(value, type) \ @@ -91,7 +90,6 @@ #define PyObject_Decref(op) Py_DECREF(op) #define Py_NonePtr Py_None - #define Py_ZeroPtr Py_Zero #define Py_FalsePtr Py_False #define Py_TruePtr Py_True #endif @@ -107,6 +105,8 @@ # define PyChangePath(token, path) TRUE #endif +#define Py_isValidObject(o) (o && o != Py_NonePtr) + lvsnAPI(Bool32) pysnSetServerPath(CStr token, Path path); lvsnAPI(Bool32) pysnScriptVariables(lvsnInstance inst, LStrArrayHdl names, LStrArrayHdl types); lvsnAPI(Bool32) pysnServerSupportTypes(LStrHandle version, LStrArrayHdl names); Added: trunk/labpython/c source/lvpython.sln =================================================================== --- trunk/labpython/c source/lvpython.sln (rev 0) +++ trunk/labpython/c source/lvpython.sln 2015-07-29 21:02:00 UTC (rev 1535) @@ -0,0 +1,36 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lvpython", "lvpython.vcproj", "{FBFD36E7-7B72-4CC2-A22C-A1A97979560F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pytscript", "pytscript.vcproj", "{1B7C04D4-BC53-4E86-A452-5B8BF62F53C5}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {FBFD36E7-7B72-4CC2-A22C-A1A97979560F}.Debug|Win32.ActiveCfg = Debug|Win32 + {FBFD36E7-7B72-4CC2-A22C-A1A97979560F}.Debug|Win32.Build.0 = Debug|Win32 + {FBFD36E7-7B72-4CC2-A22C-A1A97979560F}.Debug|x64.ActiveCfg = Debug|x64 + {FBFD36E7-7B72-4CC2-A22C-A1A97979560F}.Debug|x64.Build.0 = Debug|x64 + {FBFD36E7-7B72-4CC2-A22C-A1A97979560F}.Release|Win32.ActiveCfg = Release|Win32 + {FBFD36E7-7B72-4CC2-A22C-A1A97979560F}.Release|Win32.Build.0 = Release|Win32 + {FBFD36E7-7B72-4CC2-A22C-A1A97979560F}.Release|x64.ActiveCfg = Release|x64 + {FBFD36E7-7B72-4CC2-A22C-A1A97979560F}.Release|x64.Build.0 = Release|x64 + {1B7C04D4-BC53-4E86-A452-5B8BF62F53C5}.Debug|Win32.ActiveCfg = Debug|Win32 + {1B7C04D4-BC53-4E86-A452-5B8BF62F53C5}.Debug|Win32.Build.0 = Debug|Win32 + {1B7C04D4-BC53-4E86-A452-5B8BF62F53C5}.Debug|x64.ActiveCfg = Debug|x64 + {1B7C04D4-BC53-4E86-A452-5B8BF62F53C5}.Debug|x64.Build.0 = Debug|x64 + {1B7C04D4-BC53-4E86-A452-5B8BF62F53C5}.Release|Win32.ActiveCfg = Release|Win32 + {1B7C04D4-BC53-4E86-A452-5B8BF62F53C5}.Release|Win32.Build.0 = Release|Win32 + {1B7C04D4-BC53-4E86-A452-5B8BF62F53C5}.Release|x64.ActiveCfg = Release|x64 + {1B7C04D4-BC53-4E86-A452-5B8BF62F53C5}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal Added: trunk/labpython/c source/lvpython.vcproj =================================================================== --- trunk/labpython/c source/lvpython.vcproj (rev 0) +++ trunk/labpython/c source/lvpython.vcproj 2015-07-29 21:02:00 UTC (rev 1535) @@ -0,0 +1,621 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="8.00" + Name="lvpython" + ProjectGUID="{FBFD36E7-7B72-4CC2-A22C-A1A97979560F}" + RootNamespace="lvpython" + > + <Platforms> + <Platform + Name="Win32" + /> + <Platform + Name="x64" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Release|Win32" + OutputDirectory="$(PlatformName)\$(ProjectName)\$(ConfigurationName)" + IntermediateDirectory="$(PlatformName)\$(ProjectName)\$(ConfigurationName)" + ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="NDEBUG" + MkTypLibCompatible="true" + SuppressStartupBanner="true" + TargetEnvironment="1" + TypeLibraryName=".\Release/lvpython.tlb" + HeaderFileName="" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + AdditionalIncludeDirectories=""../../cintools";C:\Python-2.7.9\include" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PYTHONWRAP_EXPORTS" + StringPooling="true" + RuntimeLibrary="0" + EnableFunctionLevelLinking="true" + PrecompiledHeaderFile="" + AssemblerListingLocation="$(IntDir)/" + ObjectFile="$(IntDir)/" + ProgramDataBaseFileName="$(IntDir)/" + WarningLevel="3" + WarnAsError="false" + SuppressStartupBanner="true" + Detect64BitPortabilityProblems="true" + CompileAs="1" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="1033" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="labviewv.lib" + OutputFile="$(OutDir)\$(ProjectName).dll" + LinkIncremental="1" + SuppressStartupBanner="true" + AdditionalLibraryDirectories=""../../cintools"" + ProgramDatabaseFile="$(IntDir)/lvpython.pdb" + ImportLibrary="$(OutDir)/lvpython.lib" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + SuppressStartupBanner="true" + OutputFile=".\Release/lvpython.bsc" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|x64" + OutputDirectory="$(PlatformName)\$(ProjectName)\$(ConfigurationName)" + IntermediateDirectory="$(PlatformName)\$(ProjectName)\$(ConfigurationName)" + ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="NDEBUG" + MkTypLibCompatible="true" + SuppressStartupBanner="true" + TargetEnvironment="3" + TypeLibraryName=".\Release/lvpython.tlb" + HeaderFileName="" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + AdditionalIncludeDirectories=""../../cintools";C:\Python-2.7.9\include" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PYTHONWRAP_EXPORTS" + StringPooling="true" + RuntimeLibrary="0" + EnableFunctionLevelLinking="true" + AssemblerListingLocation="$(IntDir)/" + ObjectFile="$(IntDir)/" + ProgramDataBaseFileName="$(IntDir)/" + WarningLevel="3" + SuppressStartupBanner="true" + Detect64BitPortabilityProblems="true" + CompileAs="1" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="1033" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="labview64.lib" + OutputFile="$(OutDir)\$(ProjectName).dll" + LinkIncremental="1" + SuppressStartupBanner="true" + AdditionalLibraryDirectories=""../../cintools"" + ProgramDatabaseFile="$(IntDir)/lvpython.pdb" + ImportLibrary="$(OutDir)/lvpython.lib" + TargetMachine="17" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + SuppressStartupBanner="true" + OutputFile=".\Release/lvpython.bsc" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Debug|Win32" + OutputDirectory="$(PlatformName)\$(ProjectName)\$(ConfigurationName)" + IntermediateDirectory="$(PlatformName)\$(ProjectName)\$(ConfigurationName)" + ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="_DEBUG" + MkTypLibCompatible="true" + SuppressStartupBanner="true" + TargetEnvironment="1" + TypeLibraryName=".\Debug/lvpython.tlb" + HeaderFileName="" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories=""../../cintools";C:\Python-2.7.9\include" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;PYTHONWRAP_EXPORTS" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="1" + AssemblerListingLocation="$(IntDir)/" + ObjectFile="$(IntDir)/" + ProgramDataBaseFileName="$(IntDir)/" + WarningLevel="3" + WarnAsError="false" + SuppressStartupBanner="true" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="4" + CompileAs="1" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="_DEBUG" + Culture="1033" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="labviewv.lib" + OutputFile="$(OutDir)\$(ProjectName).dll" + LinkIncremental="2" + SuppressStartupBanner="true" + AdditionalLibraryDirectories=""../../cintools"" + GenerateDebugInformation="true" + ProgramDatabaseFile="$(IntDir)/lvpython.pdb" + ImportLibrary="$(OutDir)/lvpython.lib" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + VerboseOutput="true" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + SuppressStartupBanner="true" + OutputFile=".\Debug/lvpython.bsc" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Debug|x64" + OutputDirectory="$(PlatformName)\$(ProjectName)\$(ConfigurationName)" + IntermediateDirectory="$(PlatformName)\$(ProjectName)\$(ConfigurationName)" + ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="_DEBUG" + MkTypLibCompatible="true" + SuppressStartupBanner="true" + TargetEnvironment="3" + TypeLibraryName=".\Debug/lvpython.tlb" + HeaderFileName="" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories=""../../cintools";C:\Python-2.7.9\include" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;PYTHONWRAP_EXPORTS" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="1" + AssemblerListingLocation="$(IntDir)\" + ObjectFile="$(IntDir)\" + ProgramDataBaseFileName="$(IntDir)\" + WarningLevel="3" + SuppressStartupBanner="true" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="3" + CompileAs="1" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="_DEBUG" + Culture="1033" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="labview64.lib" + OutputFile="$(OutDir)\$(ProjectName).dll" + LinkIncremental="2" + SuppressStartupBanner="true" + AdditionalLibraryDirectories=""../../cintools"" + GenerateDebugInformation="true" + ProgramDatabaseFile="$(IntDir)/lvpython.pdb" + ImportLibrary="$(OutDir)/lvpython.lib" + TargetMachine="17" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + VerboseOutput="true" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + SuppressStartupBanner="true" + OutputFile=".\Debug/lvpython.bsc" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Source Files" + Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" + > + <File + RelativePath="dynlib.c" + > + <FileConfiguration + Name="Release|Win32" + > + <Tool + Name="VCCLCompilerTool" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + /> + </FileConfiguration> + <FileConfiguration + Name="Release|x64" + > + <Tool + Name="VCCLCompilerTool" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + /> + </FileConfiguration> + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + /> + </FileConfiguration> + <FileConfiguration + Name="Debug|x64" + > + <Tool + Name="VCCLCompilerTool" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + /> + </FileConfiguration> + </File> + <File + RelativePath="lvpython.c" + > + <FileConfiguration + Name="Release|Win32" + > + <Tool + Name="VCCLCompilerTool" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + /> + </FileConfiguration> + <FileConfiguration + Name="Release|x64" + > + <Tool + Name="VCCLCompilerTool" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + /> + </FileConfiguration> + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + /> + </FileConfiguration> + <FileConfiguration + Name="Debug|x64" + > + <Tool + Name="VCCLCompilerTool" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + /> + </FileConfiguration> + </File> + <File + RelativePath="pyimport.c" + > + <FileConfiguration + Name="Release|Win32" + > + <Tool + Name="VCCLCompilerTool" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + /> + </FileConfiguration> + <FileConfiguration + Name="Release|x64" + > + <Tool + Name="VCCLCompilerTool" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + /> + </FileConfiguration> + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + /> + </FileConfiguration> + <FileConfiguration + Name="Debug|x64" + > + <Tool + Name="VCCLCompilerTool" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + /> + </FileConfiguration> + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl" + > + <File + RelativePath="dynlib.h" + > + </File> + <File + RelativePath="lvpython.h" + > + </File> + <File + RelativePath="lvsnapi.h" + > + </File> + <File + RelativePath="lvtypedef.h" + > + </File> + <File + RelativePath="pytscript.h" + > + </File> + </Filter> + <Filter + Name="Resource Files" + Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" + > + <File + RelativePath="python.ico" + > + </File> + <File + RelativePath="pytscript.rc" + > + <FileConfiguration + Name="Release|Win32" + > + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="" + /> + </FileConfiguration> + <FileConfiguration + Name="Release|x64" + > + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="" + /> + </FileConfiguration> + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="" + /> + </FileConfiguration> + <FileConfiguration + Name="Debug|x64" + > + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="" + /> + </FileConfiguration> + </File> + <File + RelativePath="Resource.h" + > + </File> + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> Modified: trunk/labpython/c source/lvsnapi.h =================================================================== --- trunk/labpython/c source/lvsnapi.h 2015-05-27 18:39:26 UTC (rev 1534) +++ trunk/labpython/c source/lvsnapi.h 2015-07-29 21:02:00 UTC (rev 1535) @@ -46,7 +46,11 @@ #if MSWin # ifdef _DEBUG # define DEBUG 1 -# define Debugger() {__asm{int 3}} +# if ProcessorType==kX64 +# define Debugger() __debugbreak() +# else +# define Debugger() {__asm{int 3}} +# endif # define DebugPrintf DbgPrintf # else # define DEBUG 0 @@ -102,8 +106,18 @@ LStrHandle elm[4]; } **LStrArrayHdl; -PrivateP(lvsnInstance); +#if !defined(NIPrivatePtr) + #if defined(LV_PRIVATE_POINTER) + #define NIPrivatePtr(p) LV_PRIVATE_POINTER(p) // LV 8.5 - LV 2011 + #elif defined(PrivatP) + #define NIPrivatePtr(p) PrivatP(p) // <= LV 8.2.1 + #else + #error Unsupported cintools headers + #endif +#endif +NIPrivatePtr(lvsnInstance); + /********************************************************************************/ /* */ /* Function prototypes */ Modified: trunk/labpython/c source/pyimport.c =================================================================== --- trunk/labpython/c source/pyimport.c 2015-05-27 18:39:26 UTC (rev 1534) +++ trunk/labpython/c source/pyimport.c 2015-07-29 21:02:00 UTC (rev 1535) @@ -97,7 +97,7 @@ DefineExtFunc(gLib, PyObject*, PyDict_New, (void), ()); DefineExtFunc(gLib, PyObject*, PyDict_GetItem, (PyObject *o, PyObject *k), (o,k)); DefineExtFunc(gLib, PyObject*, PyDict_GetItemString, (PyObject *o, const char* k), (o,k)); -DefineExtFunc(gLib, int, PyDict_Size, (PyObject *o), (o)); +DefineExtFunc(gLib, Py_ssize_t, PyDict_Size, (PyObject *o), (o)); DefineExtFunc(gLib, PyObject*, PyDict_Keys, (PyObject *o), (o)); DefineExtFunc(gLib, PyObject*, PyDict_Values, (PyObject *o), (o)); DefineExtFuncVoid(gLib, PyEval_InitThreads, (void), ()); @@ -116,24 +116,24 @@ DefineExtFunc(gLib, PyObject*, PyImport_AddModule, (const char *n), (n)); DefineExtFunc(gLib, PyObject*, PyInt_FromLong, (long l), (l)); DefineExtFunc(gLib, long, PyInt_AsLong, (PyObject *o), (o)); -DefineExtFunc(gLib, PyObject*, PyList_New, (int s), (s)); -DefineExtFunc(gLib, PyObject*, PyList_GetItem, (PyObject *o, int i), (o,i)); -DefineExtFunc(gLib, int, PyList_SetItem, (PyObject *l, int i, PyObject *o), (l,i,o)); -DefineExtFunc(gLib, int, PyList_Size, (PyObject *l), (l)); +DefineExtFunc(gLib, PyObject*, PyList_New, (Py_ssize_t size), (size)); +DefineExtFunc(gLib, PyObject*, PyList_GetItem, (PyObject *o, Py_ssize_t i), (o,i)); +DefineExtFunc(gLib, int, PyList_SetItem, (PyObject *l, Py_ssize_t i, PyObject *o), (l,i,o)); +DefineExtFunc(gLib, Py_ssize_t, PyList_Size, (PyObject *l), (l)); DefineExtFunc(gLib, long, PyLong_AsLong, (PyObject *o), (o)); DefineExtFunc(gLib, PyObject*, PyLong_FromDouble, (double d), (d)); DefineExtFunc(gLib, PyObject*, PyModule_GetDict, (PyObject *o), (o)); -//DefineExtFunc(gLib, PyObject*, PyNumber_Long, (PyObject *o), (o)); -//DefineExtFunc(gLib, PyObject*, PyNumber_Float, (PyObject *o), (o)); -//DefineExtFunc(gLib, int, PyNumber_Check, (PyObject *o), (o)); -//DefineExtFunc(gLib, int, PyObject_AsCharBuffer, (PyObject *o, const char **a, int *l), (o,a,l)); +DefineExtFunc(gLib, PyObject*, PyNumber_Long, (PyObject *o), (o)); +DefineExtFunc(gLib, PyObject*, PyNumber_Float, (PyObject *o), (o)); +DefineExtFunc(gLib, int, PyNumber_Check, (PyObject *o), (o)); +DefineExtFunc(gLib, int, PyObject_AsCharBuffer, (PyObject *o, const char **a, Py_ssize_t *l), (o,a,l)); DefineExtFunc(gLib, PyObject*, PyObject_GetAttrString, (PyObject *o, const char *a), (o,a)); DefineExtFunc(gLib, PyObject*, PyObject_Str, (PyObject *o), (o)); DefineExtFunc(gLib, PyObject*, PyObject_Type, (PyObject *o), (o)); DefineExtFunc(gLib, PyObject*, PyString_FromString, (const char* s), (s)); -DefineExtFunc(gLib, PyObject*, PyString_FromStringAndSize, (const char* s, int i), (s,i)); +DefineExtFunc(gLib, PyObject*, PyString_FromStringAndSize, (const char* s, Py_ssize_t i), (s,i)); DefineExtFunc(gLib, char*, PyString_AsString, (PyObject* o), (o)); -DefineExtFunc(gLib, int, PyString_Size, (PyObject* o), (o)); +DefineExtFunc(gLib, Py_ssize_t, PyString_Size, (PyObject* o), (o)); DefineExtFunc(gLib, PyThreadState*, PyThreadState_Swap, (PyThreadState *t), (t)); DefineExtFunc(gLib, int, PyType_IsSubtype, (PyTypeObject *o1, PyTypeObject *o2), (o1, o2)); @@ -146,8 +146,9 @@ long * _Py_RefTotal_Ptr = NULL; PyObject * _Py_NoneStruct_Ptr = NULL; -PyIntObject * _Py_ZeroStruct_Ptr = NULL; -PyIntObject * _Py_TrueStruct_Ptr = NULL; +PyObject * _Py_FalseStruct_Ptr = NULL; +PyObject * _Py_ZeroStruct_Ptr = NULL; +PyObject * _Py_TrueStruct_Ptr = NULL; PyTypeObject * PyComplex_Type_Ptr = NULL; PyTypeObject * PyFloat_Type_Ptr = NULL; PyTypeObject * PyInt_Type_Ptr = NULL; @@ -215,8 +216,13 @@ } #endif LoadExtData(gLib, PyObject, _Py_NoneStruct); - LoadExtData(gLib, PyIntObject, _Py_ZeroStruct); - LoadExtData(gLib, PyIntObject, _Py_TrueStruct); + LoadExtDataNoFail(gLib, PyObject, _Py_FalseStruct); + if (!_Py_FalseStruct_Ptr) + { + LoadExtData(gLib, PyObject, _Py_ZeroStruct); + _Py_FalseStruct_Ptr = _Py_ZeroStruct_Ptr; + } + LoadExtData(gLib, PyObject, _Py_TrueStruct); LoadExtData(gLib, PyTypeObject, PyComplex_Type); LoadExtData(gLib, PyTypeObject, PyFloat_Type); LoadExtData(gLib, PyTypeObject, PyInt_Type); Modified: trunk/labpython/c source/pytscript.c =================================================================== --- trunk/labpython/c source/pytscript.c 2015-05-27 18:39:26 UTC (rev 1534) +++ trunk/labpython/c source/pytscript.c 2015-07-29 21:02:00 UTC (rev 1535) @@ -84,6 +84,8 @@ static uChar LVPythonLib[] = "\014lvpython.dll"; #elif Unix static uChar LVPythonLib[] = "\013lvpython.so"; +#elif MacOSX +static uChar LVPythonLib[] = "\013lvpython.framework"; #elif Mac static uChar LVPythonLib[] = "\016lvpython.shlib"; #endif Added: trunk/labpython/c source/pytscript.vcproj =================================================================== --- trunk/labpython/c source/pytscript.vcproj (rev 0) +++ trunk/labpython/c source/pytscript.vcproj 2015-07-29 21:02:00 UTC (rev 1535) @@ -0,0 +1,405 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="8.00" + Name="pytscript" + ProjectGUID="{1B7C04D4-BC53-4E86-A452-5B8BF62F53C5}" + RootNamespace="pytscript" + Keyword="Win32Proj" + > + <Platforms> + <Platform + Name="Win32" + /> + <Platform + Name="x64" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="$(PlatformName)\$(ProjectName)\$(ConfigurationName)" + IntermediateDirectory="$(PlatformName)\$(ProjectName)\$(ConfigurationName)" + ConfigurationType="2" + CharacterSet="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="../../cintools" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;PYTSCRIPT_EXPORTS" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="labviewv.lib" + LinkIncremental="2" + AdditionalLibraryDirectories="../../cintools" + GenerateDebugInformation="true" + SubSystem="2" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Debug|x64" + OutputDirectory="$(PlatformName)\$(ProjectName)\$(ConfigurationName)" + IntermediateDirectory="$(PlatformName)\$(ProjectName)\$(ConfigurationName)" + ConfigurationType="2" + CharacterSet="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + TargetEnvironment="3" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="../../cintools" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;PYTSCRIPT_EXPORTS" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="labview64.lib" + LinkIncremental="2" + AdditionalLibraryDirectories="../../cintools" + GenerateDebugInformation="true" + SubSystem="2" + TargetMachine="17" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="$(PlatformName)\$(ProjectName)\$(ConfigurationName)" + IntermediateDirectory="$(PlatformName)\$(ProjectName)\$(ConfigurationName)" + ConfigurationType="2" + CharacterSet="1" + WholeProgramOptimization="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + AdditionalIncludeDirectories="../../cintools" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PYTSCRIPT_EXPORTS" + RuntimeLibrary="2" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="labviewv.lib" + LinkIncremental="1" + AdditionalLibraryDirectories="../../cintools" + GenerateDebugInformation="true" + SubSystem="2" + OptimizeReferences="2" + EnableCOMDATFolding="2" + TargetMachine="1" + Profile="false" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|x64" + OutputDirectory="$(PlatformName)\$(ProjectName)\$(ConfigurationName)" + IntermediateDirectory="$(PlatformName)\$(ProjectName)\$(ConfigurationName)" + ConfigurationType="2" + CharacterSet="1" + WholeProgramOptimization="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + TargetEnvironment="3" + /> + <Tool + Name="VCCLCompilerTool" + AdditionalIncludeDirectories="../../cintools" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PYTSCRIPT_EXPORTS" + RuntimeLibrary="2" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="labview64.lib" + LinkIncremental="1" + AdditionalLibraryDirectories="../../cintools" + GenerateDebugInformation="true" + SubSystem="2" + OptimizeReferences="2" + EnableCOMDATFolding="2" + TargetMachine="17" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Source Files" + Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + <File + RelativePath=".\dynlib.c" + > + </File> + <File + RelativePath=".\pytscript.c" + > + </File> + <File + RelativePath=".\pytscript.def" + > + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl;inc;xsd" + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + <File + RelativePath=".\dynlib.h" + > + </File> + <File + RelativePath=".\lvpython.h" + > + </File> + <File + RelativePath=".\lvsnapi.h" + > + </File> + <File + RelativePath=".\lvtypedef.h" + > + </File> + <File + RelativePath=".\pytscript.h" + > + </File> + </Filter> + <Filter + Name="Resource Files" + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" + > + <File + RelativePath=".\python.ico" + > + </File> + <File + RelativePath=".\pytscript.rc" + > + </File> + <File + RelativePath=".\Resource.h" + > + </File> + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lab...@us...> - 2015-05-27 18:39:29
|
Revision: 1534 http://sourceforge.net/p/opengtoolkit/svn/1534 Author: labviewer Date: 2015-05-27 18:39:26 +0000 (Wed, 27 May 2015) Log Message: ----------- Add AES and BZIP2 files to project Modified Paths: -------------- trunk/lvzip/c_source/aes/entropy.c trunk/lvzip/c_source/aes/pwd2key.c trunk/lvzip/c_source/bzip2/bzlib.c trunk/lvzip/c_source/lvutil.c trunk/lvzip/c_source/lvzip.xcodeproj/project.pbxproj trunk/lvzip/c_source/mztools.c trunk/lvzip/c_source/mztools.h trunk/lvzip/c_source/unzip.c trunk/lvzip/c_source/zip.c trunk/lvzip/source/lvzlib.framework.zip Modified: trunk/lvzip/c_source/aes/entropy.c =================================================================== --- trunk/lvzip/c_source/aes/entropy.c 2015-05-27 17:17:08 UTC (rev 1533) +++ trunk/lvzip/c_source/aes/entropy.c 2015-05-27 18:39:26 UTC (rev 1534) @@ -4,6 +4,7 @@ #include <stdio.h> #include <fcntl.h> #endif +#include "entropy.h" #if defined(__cplusplus) extern "C" Modified: trunk/lvzip/c_source/aes/pwd2key.c =================================================================== --- trunk/lvzip/c_source/aes/pwd2key.c 2015-05-27 17:17:08 UTC (rev 1533) +++ trunk/lvzip/c_source/aes/pwd2key.c 2015-05-27 18:39:26 UTC (rev 1534) @@ -35,6 +35,7 @@ #include <memory.h> #include "hmac.h" +#include "pwd2key.h" #if defined(__cplusplus) extern "C" Modified: trunk/lvzip/c_source/bzip2/bzlib.c =================================================================== --- trunk/lvzip/c_source/bzip2/bzlib.c 2015-05-27 17:17:08 UTC (rev 1533) +++ trunk/lvzip/c_source/bzip2/bzlib.c 2015-05-27 18:39:26 UTC (rev 1534) @@ -99,14 +99,14 @@ /*---------------------------------------------------*/ static -void* default_bzalloc ( void* opaque, Int32 items, Int32 size ) +void* default_bzalloc(void* opaque, Int32 items, Int32 size) { - void* v = malloc ( items * size ); + void* v = malloc (items * size); return v; } static -void default_bzfree ( void* opaque, void* addr ) +void default_bzfree(void* opaque, void* addr) { if (addr != NULL) free ( addr ); } Modified: trunk/lvzip/c_source/lvutil.c =================================================================== --- trunk/lvzip/c_source/lvutil.c 2015-05-27 17:17:08 UTC (rev 1533) +++ trunk/lvzip/c_source/lvutil.c 2015-05-27 18:39:26 UTC (rev 1534) @@ -111,11 +111,14 @@ #endif #if HAVE_BZIP2 +void bz_internal_error(int errcode); void bz_internal_error(int errcode) { // if we have a debug build then print the error in the LabVIEW debug console #if DEBUG - DbgPrintf("BZIP2 internal error %ld occurred!!", errcode); + DbgPrintf((CStr)"BZIP2 internal error %ld occurred!!", errcode); +#else + Unused(errcode); #endif } #endif @@ -1820,7 +1823,7 @@ #endif if (!err) { - err = FNewRefNum(path, (File)ioRefNum, refnum); + err = FNewRefNum(path, (File)(ioRefNum), refnum); } if (err) { Modified: trunk/lvzip/c_source/lvzip.xcodeproj/project.pbxproj =================================================================== --- trunk/lvzip/c_source/lvzip.xcodeproj/project.pbxproj 2015-05-27 17:17:08 UTC (rev 1533) +++ trunk/lvzip/c_source/lvzip.xcodeproj/project.pbxproj 2015-05-27 18:39:26 UTC (rev 1534) @@ -42,6 +42,36 @@ 839542EF0894F2490020C3E2 /* gvmat32c.c in Sources */ = {isa = PBXBuildFile; fileRef = 839542B80894F2490020C3E2 /* gvmat32c.c */; }; 839542F10894F2490020C3E2 /* adler32.c in Sources */ = {isa = PBXBuildFile; fileRef = 839542BA0894F2490020C3E2 /* adler32.c */; }; 83D3E26D080D117700DE332C /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 83D3E26C080D117700DE332C /* Carbon.framework */; }; + 8832627B1B163FAF003BB2F4 /* aes_via_ace.h in Headers */ = {isa = PBXBuildFile; fileRef = 883262661B163FAF003BB2F4 /* aes_via_ace.h */; }; + 8832627C1B163FAF003BB2F4 /* aes.h in Headers */ = {isa = PBXBuildFile; fileRef = 883262671B163FAF003BB2F4 /* aes.h */; }; + 8832627D1B163FAF003BB2F4 /* aescrypt.c in Sources */ = {isa = PBXBuildFile; fileRef = 883262681B163FAF003BB2F4 /* aescrypt.c */; }; + 8832627E1B163FAF003BB2F4 /* aeskey.c in Sources */ = {isa = PBXBuildFile; fileRef = 883262691B163FAF003BB2F4 /* aeskey.c */; }; + 8832627F1B163FAF003BB2F4 /* aesopt.h in Headers */ = {isa = PBXBuildFile; fileRef = 8832626A1B163FAF003BB2F4 /* aesopt.h */; }; + 883262801B163FAF003BB2F4 /* aestab.c in Sources */ = {isa = PBXBuildFile; fileRef = 8832626B1B163FAF003BB2F4 /* aestab.c */; }; + 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 */; }; + 8832628A1B163FAF003BB2F4 /* prng.c in Sources */ = {isa = PBXBuildFile; fileRef = 883262751B163FAF003BB2F4 /* prng.c */; }; + 8832628B1B163FAF003BB2F4 /* prng.h in Headers */ = {isa = PBXBuildFile; fileRef = 883262761B163FAF003BB2F4 /* prng.h */; }; + 8832628C1B163FAF003BB2F4 /* pwd2key.c in Sources */ = {isa = PBXBuildFile; fileRef = 883262771B163FAF003BB2F4 /* pwd2key.c */; }; + 8832628D1B163FAF003BB2F4 /* pwd2key.h in Headers */ = {isa = PBXBuildFile; fileRef = 883262781B163FAF003BB2F4 /* pwd2key.h */; }; + 8832628E1B163FAF003BB2F4 /* sha1.c in Sources */ = {isa = PBXBuildFile; fileRef = 883262791B163FAF003BB2F4 /* sha1.c */; }; + 8832628F1B163FAF003BB2F4 /* sha1.h in Headers */ = {isa = PBXBuildFile; fileRef = 8832627A1B163FAF003BB2F4 /* sha1.h */; }; + 883262991B163FD6003BB2F4 /* blocksort.c in Sources */ = {isa = PBXBuildFile; fileRef = 883262901B163FD6003BB2F4 /* blocksort.c */; }; + 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 */; }; + 883262A11B163FD6003BB2F4 /* randtable.c in Sources */ = {isa = PBXBuildFile; fileRef = 883262981B163FD6003BB2F4 /* randtable.c */; }; 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 */; }; @@ -86,6 +116,36 @@ 839542BA0894F2490020C3E2 /* adler32.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = adler32.c; sourceTree = "<group>"; }; 83D3E1AF080D116E00DE332C /* lvzlib.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = lvzlib.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 83D3E26C080D117700DE332C /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; }; + 883262661B163FAF003BB2F4 /* aes_via_ace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = aes_via_ace.h; path = aes/aes_via_ace.h; sourceTree = "<group>"; }; + 883262671B163FAF003BB2F4 /* aes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = aes.h; path = aes/aes.h; sourceTree = "<group>"; }; + 883262681B163FAF003BB2F4 /* aescrypt.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = aescrypt.c; path = aes/aescrypt.c; sourceTree = "<group>"; }; + 883262691B163FAF003BB2F4 /* aeskey.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = aeskey.c; path = aes/aeskey.c; sourceTree = "<group>"; }; + 8832626A1B163FAF003BB2F4 /* aesopt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = aesopt.h; path = aes/aesopt.h; sourceTree = "<group>"; }; + 8832626B1B163FAF003BB2F4 /* aestab.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = aestab.c; path = aes/aestab.c; sourceTree = "<group>"; }; + 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>"; }; + 883262751B163FAF003BB2F4 /* prng.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = prng.c; path = aes/prng.c; sourceTree = "<group>"; }; + 883262761B163FAF003BB2F4 /* prng.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = prng.h; path = aes/prng.h; sourceTree = "<group>"; }; + 883262771B163FAF003BB2F4 /* pwd2key.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pwd2key.c; path = aes/pwd2key.c; sourceTree = "<group>"; }; + 883262781B163FAF003BB2F4 /* pwd2key.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = pwd2key.h; path = aes/pwd2key.h; sourceTree = "<group>"; }; + 883262791B163FAF003BB2F4 /* sha1.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sha1.c; path = aes/sha1.c; sourceTree = "<group>"; }; + 8832627A1B163FAF003BB2F4 /* sha1.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sha1.h; path = aes/sha1.h; sourceTree = "<group>"; }; + 883262901B163FD6003BB2F4 /* blocksort.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = blocksort.c; path = bzip2/blocksort.c; sourceTree = "<group>"; }; + 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>"; }; + 883262981B163FD6003BB2F4 /* randtable.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = randtable.c; path = bzip2/randtable.c; sourceTree = "<group>"; }; 88521A381AF4145000A9CDF7 /* lvapi.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = lvapi.h; sourceTree = "<group>"; }; 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>"; }; @@ -110,8 +170,8 @@ 83D3E18C080D116E00DE332C = { isa = PBXGroup; children = ( - C79368AA0C9ED687006083BF /* iomem.c */, - C79368AB0C9ED687006083BF /* iomem.h */, + 883262651B163F70003BB2F4 /* bzip2 */, + 883262641B163F5C003BB2F4 /* aes */, 83D3E1B5080D116E00DE332C /* zlib Sources */, 83D3E26B080D117700DE332C /* Frameworks */, 83D3E19A080D116E00DE332C /* Products */, @@ -129,6 +189,8 @@ 83D3E1B5080D116E00DE332C /* zlib Sources */ = { isa = PBXGroup; children = ( + C79368AB0C9ED687006083BF /* iomem.h */, + C79368AA0C9ED687006083BF /* iomem.c */, 88521A381AF4145000A9CDF7 /* lvapi.h */, 888E743D1ADD96D700C5AEFE /* lvapi.c */, 888E743B1ADD96C200C5AEFE /* utf.h */, @@ -179,6 +241,50 @@ name = Frameworks; sourceTree = "<group>"; }; + 883262641B163F5C003BB2F4 /* aes */ = { + isa = PBXGroup; + children = ( + 883262661B163FAF003BB2F4 /* aes_via_ace.h */, + 883262671B163FAF003BB2F4 /* aes.h */, + 883262681B163FAF003BB2F4 /* aescrypt.c */, + 883262691B163FAF003BB2F4 /* aeskey.c */, + 8832626A1B163FAF003BB2F4 /* aesopt.h */, + 8832626B1B163FAF003BB2F4 /* aestab.c */, + 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 */, + 883262751B163FAF003BB2F4 /* prng.c */, + 883262761B163FAF003BB2F4 /* prng.h */, + 883262771B163FAF003BB2F4 /* pwd2key.c */, + 883262781B163FAF003BB2F4 /* pwd2key.h */, + 883262791B163FAF003BB2F4 /* sha1.c */, + 8832627A1B163FAF003BB2F4 /* sha1.h */, + ); + name = aes; + sourceTree = "<group>"; + }; + 883262651B163F70003BB2F4 /* bzip2 */ = { + isa = PBXGroup; + children = ( + 883262901B163FD6003BB2F4 /* blocksort.c */, + 883262911B163FD6003BB2F4 /* bzlib_private.h */, + 883262921B163FD6003BB2F4 /* bzlib.c */, + 883262931B163FD6003BB2F4 /* bzlib.h */, + 883262941B163FD6003BB2F4 /* compress.c */, + 883262951B163FD6003BB2F4 /* crctable.c */, + 883262961B163FD6003BB2F4 /* decompress.c */, + 883262971B163FD6003BB2F4 /* huffman.c */, + 883262981B163FD6003BB2F4 /* randtable.c */, + ); + name = bzip2; + sourceTree = "<group>"; + }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ @@ -187,22 +293,36 @@ buildActionMask = 2147483647; files = ( 839542C00894F2490020C3E2 /* lvutil.h in Headers */, + 8832627B1B163FAF003BB2F4 /* aes_via_ace.h in Headers */, 839542C60894F2490020C3E2 /* inffast.h in Headers */, 839542C90894F2490020C3E2 /* crc32.h in Headers */, 839542CB0894F2490020C3E2 /* crypt.h in Headers */, + 8832627F1B163FAF003BB2F4 /* aesopt.h in Headers */, 839542CD0894F2490020C3E2 /* inflate.h in Headers */, 839542CE0894F2490020C3E2 /* deflate.h in Headers */, + 883262831B163FAF003BB2F4 /* brg_types.h in Headers */, 888E743C1ADD96C200C5AEFE /* utf.h in Headers */, + 8832627C1B163FAF003BB2F4 /* aes.h in Headers */, 839542CF0894F2490020C3E2 /* zutil.h in Headers */, 839542D90894F2490020C3E2 /* ioapi.h in Headers */, 839542DB0894F2490020C3E2 /* inftrees.h in Headers */, 839542DD0894F2490020C3E2 /* zlib.h in Headers */, + 8832628B1B163FAF003BB2F4 /* prng.h in Headers */, + 8832629C1B163FD6003BB2F4 /* bzlib.h in Headers */, 839542DF0894F2490020C3E2 /* zip.h in Headers */, + 883262821B163FAF003BB2F4 /* brg_endian.h in Headers */, + 8832628D1B163FAF003BB2F4 /* pwd2key.h in Headers */, 839542E20894F2490020C3E2 /* zconf.h in Headers */, + 883262851B163FAF003BB2F4 /* entropy.h in Headers */, 839542E30894F2490020C3E2 /* unzip.h in Headers */, 839542E60894F2490020C3E2 /* trees.h in Headers */, 839542E80894F2490020C3E2 /* mztools.h in Headers */, 839542EC0894F2490020C3E2 /* inffixed.h in Headers */, + 8832628F1B163FAF003BB2F4 /* sha1.h in Headers */, + 883262871B163FAF003BB2F4 /* fileenc.h in Headers */, + 883262811B163FAF003BB2F4 /* aestab.h in Headers */, + 883262891B163FAF003BB2F4 /* hmac.h in Headers */, + 8832629A1B163FD6003BB2F4 /* bzlib_private.h in Headers */, C79368AD0C9ED687006083BF /* iomem.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; @@ -267,25 +387,41 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 8832628A1B163FAF003BB2F4 /* prng.c in Sources */, + 883262881B163FAF003BB2F4 /* hmac.c in Sources */, 839542C10894F2490020C3E2 /* lvutil.c in Sources */, 839542C30894F2490020C3E2 /* mztools.c in Sources */, + 8832629F1B163FD6003BB2F4 /* decompress.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 */, 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 */, 888E743A1ADD96A900C5AEFE /* utf.c in Sources */, 839542E70894F2490020C3E2 /* trees.c in Sources */, 839542EB0894F2490020C3E2 /* inflate.c in Sources */, 839542ED0894F2490020C3E2 /* infback.c in Sources */, 839542EF0894F2490020C3E2 /* gvmat32c.c in Sources */, 839542F10894F2490020C3E2 /* adler32.c in Sources */, + 8832629B1B163FD6003BB2F4 /* bzlib.c in Sources */, + 8832627D1B163FAF003BB2F4 /* aescrypt.c in Sources */, + 883262991B163FD6003BB2F4 /* blocksort.c in Sources */, + 8832629E1B163FD6003BB2F4 /* crctable.c in Sources */, + 883262A11B163FD6003BB2F4 /* randtable.c in Sources */, + 883262801B163FAF003BB2F4 /* aestab.c in Sources */, C79368AC0C9ED687006083BF /* iomem.c in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -306,7 +442,11 @@ GCC_ENABLE_FIX_AND_CONTINUE = YES; GCC_GENERATE_DEBUGGING_SYMBOLS = YES; GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = DEBUG; + GCC_PREPROCESSOR_DEFINITIONS = ( + HAVE_AES, + HAVE_BZIP2, + DEBUG, + ); GCC_REUSE_STRINGS = NO; GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = NO; @@ -350,7 +490,11 @@ GCC_ENABLE_CPP_EXCEPTIONS = NO; GCC_ENABLE_CPP_RTTI = NO; GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_OPTIMIZATION_LEVEL = 0; + GCC_OPTIMIZATION_LEVEL = 3; + GCC_PREPROCESSOR_DEFINITIONS = ( + HAVE_AES, + HAVE_BZIP2, + ); GCC_REUSE_STRINGS = NO; GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = NO; @@ -393,6 +537,10 @@ GCC_ENABLE_CPP_EXCEPTIONS = NO; GCC_ENABLE_CPP_RTTI = NO; GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + HAVE_AES, + HAVE_BZIP2, + ); GCC_REUSE_STRINGS = NO; GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = NO; @@ -431,6 +579,7 @@ "ADDITIONAL_SDKS[arch=i386]" = ""; ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; GCC_CHAR_IS_UNSIGNED_CHAR = YES; + GCC_SYMBOLS_PRIVATE_EXTERN = YES; HEADER_SEARCH_PATHS = ( "$(inherited)", /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, @@ -441,6 +590,7 @@ MACH_O_TYPE = mh_dylib; MACOSX_DEPLOYMENT_TARGET = 10.7; ONLY_ACTIVE_ARCH = NO; + OTHER_CFLAGS = ""; SDKROOT = macosx10.8; }; name = Development; @@ -450,6 +600,7 @@ buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; GCC_CHAR_IS_UNSIGNED_CHAR = YES; + GCC_SYMBOLS_PRIVATE_EXTERN = YES; HEADER_SEARCH_PATHS = ( "$(inherited)", /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, @@ -460,6 +611,7 @@ MACH_O_TYPE = mh_dylib; MACOSX_DEPLOYMENT_TARGET = 10.7; ONLY_ACTIVE_ARCH = NO; + OTHER_CFLAGS = ""; SDKROOT = macosx10.8; }; name = Deployment; @@ -470,6 +622,7 @@ "ADDITIONAL_SDKS[arch=*]" = ""; ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; GCC_CHAR_IS_UNSIGNED_CHAR = YES; + GCC_SYMBOLS_PRIVATE_EXTERN = YES; HEADER_SEARCH_PATHS = ( "$(inherited)", /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, @@ -480,6 +633,7 @@ MACH_O_TYPE = mh_dylib; MACOSX_DEPLOYMENT_TARGET = 10.7; ONLY_ACTIVE_ARCH = NO; + OTHER_CFLAGS = ""; SDKROOT = macosx10.8; }; name = Default; Modified: trunk/lvzip/c_source/mztools.c =================================================================== --- trunk/lvzip/c_source/mztools.c 2015-05-27 17:17:08 UTC (rev 1533) +++ trunk/lvzip/c_source/mztools.c 2015-05-27 18:39:26 UTC (rev 1534) @@ -10,6 +10,7 @@ #include <string.h> #include "zlib.h" #include "unzip.h" +#include "mztools.h" #define READ_8(adr) ((unsigned char)*(adr)) #define READ_16(adr) ( READ_8(adr) | (READ_8(adr+1) << 8) ) @@ -27,12 +28,7 @@ WRITE_16((unsigned char*)(buff) + 2, (n) >> 16); \ } while(0) -ZEXTERN int ZEXPORT unzRepair(file, fileOut, fileOutTmp, nRecovered, bytesRecovered) -const char* file; -const char* fileOut; -const char* fileOutTmp; -uLong* nRecovered; -uLong* bytesRecovered; +ZEXTERN 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 2015-05-27 17:17:08 UTC (rev 1533) +++ trunk/lvzip/c_source/mztools.h 2015-05-27 18:39:26 UTC (rev 1534) @@ -22,11 +22,7 @@ fileOut: output file after recovery fileOutTmp: temporary file name used for recovery */ -extern int ZEXPORT unzRepair(const char* file, - const char* fileOut, - const char* fileOutTmp, - uLong* nRecovered, - uLong* bytesRecovered); +ZEXTERN 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 2015-05-27 17:17:08 UTC (rev 1533) +++ trunk/lvzip/c_source/unzip.c 2015-05-27 18:39:26 UTC (rev 1534) @@ -227,15 +227,15 @@ local int unz64local_getByte OF(( const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, - int *pi)); + uLong *pi)); -local int unz64local_getByte(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, int *pi) +local int unz64local_getByte(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, uLong *pi) { unsigned char c; - int err = (int)ZREAD64(*pzlib_filefunc_def,filestream,&c,1); - if (err==1) + int err = (int)ZREAD64(*pzlib_filefunc_def, filestream, &c,1 ); + if (err == 1) { - *pi = (int)c; + *pi = (uLong)c; return UNZ_OK; } else @@ -260,18 +260,17 @@ voidpf filestream, uLong *pX) { - uLong x ; - int i = 0; + uLong x, i = 0 ; int err; - err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); + err = unz64local_getByte(pzlib_filefunc_def, filestream, &i); x = (uLong)i; if (err==UNZ_OK) - err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); - x |= ((uLong)i)<<8; + err = unz64local_getByte(pzlib_filefunc_def, filestream, &i); + x |= ((uLong)i) << 8; - if (err==UNZ_OK) + if (err == UNZ_OK) *pX = x; else *pX = 0; @@ -287,26 +286,25 @@ voidpf filestream, uLong *pX) { - uLong x ; - int i = 0; + uLong x, i = 0 ; int err; - err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); - x = (uLong)i; + err = unz64local_getByte(pzlib_filefunc_def, filestream,&i); + x = i; - if (err==UNZ_OK) - err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); - x |= ((uLong)i)<<8; + if (err == UNZ_OK) + err = unz64local_getByte(pzlib_filefunc_def, filestream, &i); + x |= i << 8; - if (err==UNZ_OK) - err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); - x |= ((uLong)i)<<16; + if (err == UNZ_OK) + err = unz64local_getByte(pzlib_filefunc_def, filestream, &i); + x |= i << 16; - if (err==UNZ_OK) - err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); - x += ((uLong)i)<<24; + if (err == UNZ_OK) + err = unz64local_getByte(pzlib_filefunc_def, filestream, &i); + x |= i << 24; - if (err==UNZ_OK) + if (err == UNZ_OK) *pX = x; else *pX = 0; @@ -324,41 +322,41 @@ ZPOS64_T *pX) { ZPOS64_T x ; - int i = 0; + uLong i = 0; int err; - err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); + err = unz64local_getByte(pzlib_filefunc_def, filestream, &i); x = (ZPOS64_T)i; - if (err==UNZ_OK) - err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); - x |= ((ZPOS64_T)i)<<8; + if (err == UNZ_OK) + err = unz64local_getByte(pzlib_filefunc_def, filestream, &i); + x |= ((ZPOS64_T)i) << 8; - if (err==UNZ_OK) - err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); - x |= ((ZPOS64_T)i)<<16; + if (err == UNZ_OK) + err = unz64local_getByte(pzlib_filefunc_def, filestream, &i); + x |= ((ZPOS64_T)i) << 16; - if (err==UNZ_OK) - err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); - x |= ((ZPOS64_T)i)<<24; + if (err == UNZ_OK) + err = unz64local_getByte(pzlib_filefunc_def, filestream, &i); + x |= ((ZPOS64_T)i) << 24; - if (err==UNZ_OK) - err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); - x |= ((ZPOS64_T)i)<<32; + if (err == UNZ_OK) + err = unz64local_getByte(pzlib_filefunc_def, filestream, &i); + x |= ((ZPOS64_T)i) << 32; - if (err==UNZ_OK) - err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); - x |= ((ZPOS64_T)i)<<40; + if (err == UNZ_OK) + err = unz64local_getByte(pzlib_filefunc_def, filestream, &i); + x |= ((ZPOS64_T)i) << 40; - if (err==UNZ_OK) - err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); - x |= ((ZPOS64_T)i)<<48; + if (err == UNZ_OK) + err = unz64local_getByte(pzlib_filefunc_def, filestream, &i); + x |= ((ZPOS64_T)i) << 48; - if (err==UNZ_OK) - err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); - x |= ((ZPOS64_T)i)<<56; + if (err == UNZ_OK) + err = unz64local_getByte(pzlib_filefunc_def, filestream, &i); + x |= ((ZPOS64_T)i) << 56; - if (err==UNZ_OK) + if (err == UNZ_OK) *pX = x; else *pX = 0; @@ -370,19 +368,19 @@ { for (;;) { - char c1=*(fileName1++); - char c2=*(fileName2++); - if ((c1>='a') && (c1<='z')) + char c1 = *(fileName1++); + char c2 = *(fileName2++); + if ((c1 >= 'a') && (c1 <= 'z')) c1 -= 0x20; - if ((c2>='a') && (c2<='z')) + if ((c2 >= 'a') && (c2 <= 'z')) c2 -= 0x20; - if (c1=='\0') + if (c1 == '\0') return ((c2=='\0') ? 0 : -1); - if (c2=='\0') + if (c2 == '\0') return 1; - if (c1<c2) + if (c1 < c2) return -1; - if (c1>c2) + if (c1 > c2) return 1; } } @@ -1762,7 +1760,7 @@ if (ZREAD64(s->z_filefunc, s->filestream, passverify, AES_PWVERIFYSIZE) != AES_PWVERIFYSIZE) return UNZ_INTERNALERROR; - fcrypt_init(s->cur_file_info_internal.aes_encryption_mode, password, (unsigned long)strlen(password), saltvalue, + fcrypt_init(s->cur_file_info_internal.aes_encryption_mode, (const unsigned char)password, (unsigned long)strlen(password), saltvalue, passverify, &s->pfile_in_zip_read->aes_ctx); pfile_in_zip_read_info->rest_read_compressed -= saltlength + AES_PWVERIFYSIZE; @@ -1894,7 +1892,7 @@ #ifdef HAVE_AES if (s->cur_file_info.compression_method == AES_METHOD) { - fcrypt_decrypt(pfile_in_zip_read_info->read_buffer, uReadThis, &s->pfile_in_zip_read->aes_ctx); + fcrypt_decrypt((const unsigned char)pfile_in_zip_read_info->read_buffer, uReadThis, &s->pfile_in_zip_read->aes_ctx); } else #endif Modified: trunk/lvzip/c_source/zip.c =================================================================== --- trunk/lvzip/c_source/zip.c 2015-05-27 17:17:08 UTC (rev 1533) +++ trunk/lvzip/c_source/zip.c 2015-05-27 18:39:26 UTC (rev 1534) @@ -1446,7 +1446,7 @@ prng_rand(saltvalue, saltlength, zi->ci.aes_rng); prng_end(zi->ci.aes_rng); - fcrypt_init(AES_ENCRYPTIONMODE, password, (unsigned long)strlen(password), saltvalue, passverify, &zi->ci.aes_ctx); + fcrypt_init(AES_ENCRYPTIONMODE, (const unsigned char)password, (unsigned long)strlen(password), saltvalue, passverify, &zi->ci.aes_ctx); if (ZWRITE64(zi->z_filefunc, zi->filestream, saltvalue, saltlength) != saltlength) err = ZIP_ERRNO; @@ -1860,10 +1860,10 @@ zi->ci.stream_initialised = 0; } #ifdef HAVE_BZIP2 - else if((zi->ci.compression_method == Z_BZIP2ED)) + else if (zi->ci.compression_method == Z_BZIP2ED) { int tmperr = BZ2_bzCompressEnd(&zi->ci.bstream); - if (err==ZIP_OK) + if (err == ZIP_OK) err = tmperr; zi->ci.stream_initialised = 0; } Modified: trunk/lvzip/source/lvzlib.framework.zip =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lab...@us...> - 2015-05-27 17:17:11
|
Revision: 1533 http://sourceforge.net/p/opengtoolkit/svn/1533 Author: labviewer Date: 2015-05-27 17:17:08 +0000 (Wed, 27 May 2015) Log Message: ----------- Some cosmetic changes from the Mac Modified Paths: -------------- trunk/lvzip/c_source/iomem.c trunk/lvzip/c_source/lvzip.xcodeproj/project.pbxproj trunk/lvzip/c_source/unzip.h trunk/lvzip/c_source/zip.c Modified: trunk/lvzip/c_source/iomem.c =================================================================== --- trunk/lvzip/c_source/iomem.c 2015-05-27 15:22:25 UTC (rev 1532) +++ trunk/lvzip/c_source/iomem.c 2015-05-27 17:17:08 UTC (rev 1533) @@ -58,10 +58,7 @@ int error; } MEMORY_IO; -voidpf ZCALLBACK mem_open_file_func (opaque, filename, mode) - voidpf opaque; - const void* filename; - int mode; +voidpf ZCALLBACK mem_open_file_func (voidpf opaque, const void* filename, int mode) { MEMORY_IO *memio = malloc(sizeof(MEMORY_IO)); Unused(opaque); @@ -72,18 +69,17 @@ memio->mode = mode; memio->error = 0; -/* if (opaque && !(mode & ZLIB_FILEFUNC_MODE_CREATE)) - memio->pos = LStrLen(*(LStrHandle)opaque); */ + if (opaque && !(mode & ZLIB_FILEFUNC_MODE_CREATE)) + memio->pos = LStrLen(*(LStrHandle)opaque); } return memio; } -voidpf ZCALLBACK mem_opendisk_file_func (opaque, stream, number_disk, mode) - voidpf opaque; - voidpf stream; - int number_disk; - int mode; +voidpf ZCALLBACK mem_opendisk_file_func (voidpf opaque, voidpf stream, int number_disk, int mode) { + Unused(opaque); + Unused(number_disk); + Unused(mode); if (stream) { MEMORY_IO* mem = (MEMORY_IO*)stream; @@ -92,11 +88,7 @@ return NULL; } -uLong ZCALLBACK mem_read_file_func (opaque, stream, buf, size) - voidpf opaque; - voidpf stream; - void* buf; - uLong size; +uLong ZCALLBACK mem_read_file_func (voidpf opaque, voidpf stream, void* buf, uLong size) { if (stream && opaque) { @@ -152,11 +144,7 @@ return mgNoErr; } -uLong ZCALLBACK mem_write_file_func (opaque, stream, buf, size) - voidpf opaque; - voidpf stream; - const void* buf; - uLong size; +uLong ZCALLBACK mem_write_file_func (voidpf opaque, voidpf stream, const void* buf, uLong size) { MEMORY_IO* mem = (MEMORY_IO*)stream; ZPOS64_T len = size; @@ -175,9 +163,7 @@ return 0; } -ZPOS64_T ZCALLBACK mem_tell_file_func (opaque, stream) - voidpf opaque; - voidpf stream; +ZPOS64_T ZCALLBACK mem_tell_file_func (voidpf opaque, voidpf stream) { Unused(opaque); if (stream != NULL) @@ -187,11 +173,7 @@ return -1; } -long ZCALLBACK mem_seek_file_func (opaque, stream, offset, origin) - voidpf opaque; - voidpf stream; - ZPOS64_T offset; - int origin; +long ZCALLBACK mem_seek_file_func (voidpf opaque, voidpf stream, ZPOS64_T offset, int origin) { if (stream != NULL) { @@ -224,10 +206,7 @@ return -1; } -int ZCALLBACK mem_close_file_func (opaque, stream, output) - voidpf opaque; - voidpf stream; - voidpf output; +int ZCALLBACK mem_close_file_func (voidpf opaque, voidpf stream, voidpf output) { int ret = -1; UHandle s = (UHandle)opaque; @@ -257,22 +236,18 @@ return ret; } -int ZCALLBACK mem_error_file_func (opaque, stream) - voidpf opaque; - voidpf stream; +int ZCALLBACK mem_error_file_func (voidpf opaque, voidpf stream) { - int ret=-1; + int ret = -1; Unused(opaque); - if (stream!=NULL) + if (stream != NULL) { ret = ((MEMORY_IO*)stream)->error; } return ret; } -void fill_mem_filefunc (pzlib_filefunc_def, memory) - zlib_filefunc64_def* pzlib_filefunc_def; - LStrHandle *memory; +void fill_mem_filefunc (zlib_filefunc64_def* pzlib_filefunc_def, LStrHandle *memory) { pzlib_filefunc_def->zopen64_file = mem_open_file_func; pzlib_filefunc_def->zopendisk64_file = mem_opendisk_file_func; Modified: trunk/lvzip/c_source/lvzip.xcodeproj/project.pbxproj =================================================================== --- trunk/lvzip/c_source/lvzip.xcodeproj/project.pbxproj 2015-05-27 15:22:25 UTC (rev 1532) +++ trunk/lvzip/c_source/lvzip.xcodeproj/project.pbxproj 2015-05-27 17:17:08 UTC (rev 1533) @@ -210,9 +210,9 @@ /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ - 83D3E1AE080D116E00DE332C /* OSX DLL */ = { + 83D3E1AE080D116E00DE332C /* LVZIP Framework */ = { isa = PBXNativeTarget; - buildConfigurationList = C77CC6B40C9C7C6500886AB2 /* Build configuration list for PBXNativeTarget "OSX DLL" */; + buildConfigurationList = C77CC6B40C9C7C6500886AB2 /* Build configuration list for PBXNativeTarget "LVZIP Framework" */; buildPhases = ( 83D3E1A9080D116E00DE332C /* Headers */, 83D3E1AA080D116E00DE332C /* Sources */, @@ -223,7 +223,7 @@ ); dependencies = ( ); - name = "OSX DLL"; + name = "LVZIP Framework"; productName = "OSX DLL"; productReference = 83D3E1AF080D116E00DE332C /* lvzlib.framework */; productType = "com.apple.product-type.framework"; @@ -247,7 +247,7 @@ projectDirPath = ""; projectRoot = ""; targets = ( - 83D3E1AE080D116E00DE332C /* OSX DLL */, + 83D3E1AE080D116E00DE332C /* LVZIP Framework */, ); }; /* End PBXProject section */ @@ -487,7 +487,7 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - C77CC6B40C9C7C6500886AB2 /* Build configuration list for PBXNativeTarget "OSX DLL" */ = { + C77CC6B40C9C7C6500886AB2 /* Build configuration list for PBXNativeTarget "LVZIP Framework" */ = { isa = XCConfigurationList; buildConfigurations = ( C77CC6B50C9C7C6500886AB2 /* Development */, Modified: trunk/lvzip/c_source/unzip.h =================================================================== --- trunk/lvzip/c_source/unzip.h 2015-05-27 15:22:25 UTC (rev 1532) +++ trunk/lvzip/c_source/unzip.h 2015-05-27 17:17:08 UTC (rev 1533) @@ -229,12 +229,16 @@ /* Unzip package allow you browse the directory of the zipfile */ ZEXTERN int ZEXPORT unzGoToFirstFile OF((unzFile file)); +ZEXTERN int ZEXPORT unzGoToFirstFile2 OF((unzFile file, unz_file_info64 *pfile_info, char *filename, + uLong filename_size, void *extrafield, uLong extrafield_size, char *comment, uLong comment_size)); /* Set the current file of the zipfile to the first file. return UNZ_OK if there is no problem */ ZEXTERN int ZEXPORT unzGoToNextFile OF((unzFile file)); +ZEXTERN int ZEXPORT unzGoToNextFile2 OF((unzFile file, unz_file_info64 *pfile_info, char *filename, + uLong filename_size, void *extrafield, uLong extrafield_size, char *comment, uLong comment_size)); /* Set the current file of the zipfile to the next file. return UNZ_OK if there is no problem Modified: trunk/lvzip/c_source/zip.c =================================================================== --- trunk/lvzip/c_source/zip.c 2015-05-27 15:22:25 UTC (rev 1532) +++ trunk/lvzip/c_source/zip.c 2015-05-27 17:17:08 UTC (rev 1533) @@ -1852,7 +1852,7 @@ #endif if (!zi->ci.raw) { - if ((zi->ci.compression_method == Z_DEFLATED)) + if (zi->ci.compression_method == Z_DEFLATED) { int tmp_err = deflateEnd(&zi->ci.stream); if (err == ZIP_OK) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lab...@us...> - 2015-05-27 15:22:27
|
Revision: 1532 http://sourceforge.net/p/opengtoolkit/svn/1532 Author: labviewer Date: 2015-05-27 15:22:25 +0000 (Wed, 27 May 2015) Log Message: ----------- Update project files for Unix systems Modified Paths: -------------- trunk/lvzip/c_source/.cproject trunk/lvzip/c_source/Makefile trunk/lvzip/c_source/aes/entropy.c trunk/lvzip/c_source/zip.c Modified: trunk/lvzip/c_source/.cproject =================================================================== --- trunk/lvzip/c_source/.cproject 2015-05-27 13:31:38 UTC (rev 1531) +++ trunk/lvzip/c_source/.cproject 2015-05-27 15:22:25 UTC (rev 1532) @@ -63,7 +63,7 @@ </toolChain> </folderInfo> <sourceEntries> - <entry excluding="iowin.h|iowin.c|minizip.c|miniunz.c|minigzip.c|gzwrite.c|gzread.c|gzlib.c|gzguts.h|gzclose.c|gvmat64.asm|gvmat32.asm|inffasx64.asm|inffas32.asm|MacBinaryIII.h|MacBinaryIII.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/> + <entry excluding="bzip2/bzip2.c|bzip2/dlltest.c|iowin.h|iowin.c|minizip.c|miniunz.c|minigzip.c|gzwrite.c|gzread.c|gzlib.c|gzguts.h|gzclose.c|gvmat64.asm|gvmat32.asm|inffasx64.asm|inffas32.asm|MacBinaryIII.h|MacBinaryIII.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/> </sourceEntries> </configuration> </storageModule> @@ -136,7 +136,7 @@ </toolChain> </folderInfo> <sourceEntries> - <entry excluding="iowin.h|iowin.c|minizip.c|miniunz.c|minigzip.c|gzwrite.c|gzread.c|gzlib.c|gzguts.h|gzclose.c|gvmat64.asm|gvmat32.asm|inffasx64.asm|inffas32.asm|MacBinaryIII.h|MacBinaryIII.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/> + <entry excluding="bzip2/bzip2.c|bzip2/dlltest.c|iowin.h|iowin.c|minizip.c|miniunz.c|minigzip.c|gzwrite.c|gzread.c|gzlib.c|gzguts.h|gzclose.c|gvmat64.asm|gvmat32.asm|inffasx64.asm|inffas32.asm|MacBinaryIII.h|MacBinaryIII.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/> </sourceEntries> </configuration> </storageModule> @@ -204,7 +204,7 @@ </toolChain> </folderInfo> <sourceEntries> - <entry excluding="iowin.h|iowin.c|minizip.c|miniunz.c|minigzip.c|gzwrite.c|gzread.c|gzlib.c|gzguts.h|gzclose.c|gvmat64.asm|gvmat32.asm|inffasx64.asm|inffas32.asm|MacBinaryIII.h|MacBinaryIII.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/> + <entry excluding="bzip2/bzip2.c|bzip2/dlltest.c|iowin.h|iowin.c|minizip.c|miniunz.c|minigzip.c|gzwrite.c|gzread.c|gzlib.c|gzguts.h|gzclose.c|gvmat64.asm|gvmat32.asm|inffasx64.asm|inffas32.asm|MacBinaryIII.h|MacBinaryIII.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/> </sourceEntries> </configuration> </storageModule> @@ -276,7 +276,7 @@ </toolChain> </folderInfo> <sourceEntries> - <entry excluding="iowin.h|iowin.c|minizip.c|miniunz.c|minigzip.c|gzwrite.c|gzread.c|gzlib.c|gzguts.h|gzclose.c|gvmat64.asm|gvmat32.asm|inffasx64.asm|inffas32.asm|MacBinaryIII.h|MacBinaryIII.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/> + <entry excluding="bzip2/bzip2.c|bzip2/dlltest.c|iowin.h|iowin.c|minizip.c|miniunz.c|minigzip.c|gzwrite.c|gzread.c|gzlib.c|gzguts.h|gzclose.c|gvmat64.asm|gvmat32.asm|inffasx64.asm|inffas32.asm|MacBinaryIII.h|MacBinaryIII.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/> </sourceEntries> </configuration> </storageModule> @@ -344,7 +344,7 @@ </toolChain> </folderInfo> <sourceEntries> - <entry excluding="iowin.h|iowin.c|minizip.c|miniunz.c|minigzip.c|gzwrite.c|gzread.c|gzlib.c|gzguts.h|gzclose.c|gvmat64.asm|gvmat32.asm|inffasx64.asm|inffas32.asm|MacBinaryIII.h|MacBinaryIII.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/> + <entry excluding="bzip2/bzip2.c|bzip2/dlltest.c|iowin.h|iowin.c|minizip.c|miniunz.c|minigzip.c|gzwrite.c|gzread.c|gzlib.c|gzguts.h|gzclose.c|gvmat64.asm|gvmat32.asm|inffasx64.asm|inffas32.asm|MacBinaryIII.h|MacBinaryIII.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/> </sourceEntries> </configuration> </storageModule> @@ -406,7 +406,7 @@ </toolChain> </folderInfo> <sourceEntries> - <entry excluding="iowin.h|iowin.c|minizip.c|miniunz.c|minigzip.c|gzwrite.c|gzread.c|gzlib.c|gzguts.h|gzclose.c|gvmat64.asm|gvmat32.asm|inffasx64.asm|inffas32.asm|MacBinaryIII.h|MacBinaryIII.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/> + <entry excluding="bzip2/bzip2.c|bzip2/dlltest.c|iowin.h|iowin.c|minizip.c|miniunz.c|minigzip.c|gzwrite.c|gzread.c|gzlib.c|gzguts.h|gzclose.c|gvmat64.asm|gvmat32.asm|inffasx64.asm|inffas32.asm|MacBinaryIII.h|MacBinaryIII.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/> </sourceEntries> </configuration> </storageModule> Modified: trunk/lvzip/c_source/Makefile =================================================================== --- trunk/lvzip/c_source/Makefile 2015-05-27 13:31:38 UTC (rev 1531) +++ trunk/lvzip/c_source/Makefile 2015-05-27 15:22:25 UTC (rev 1532) @@ -18,7 +18,6 @@ CC=gcc - CFLAGS=-O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN #CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 #CFLAGS=-g -DDEBUG @@ -27,15 +26,15 @@ CINDIR=/usr/local/lv70/cintools SFLAGS=-O3 -fPIC $(CC_ARCH_SPEC) -fvisibility=hidden -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -L$(CINDIR) -LDFLAGS= +LDFLAGS=-Wl,-soname=$(SHAREDLIBM) TEST_LDFLAGS=-L. libz.a LDSHARED=gcc CPP=gcc -E STATICLIB=lvzlib.a -SHAREDLIB=lvzlib.so.1 -SHAREDLIBV=lvzlib.so -SHAREDLIBM= +SHAREDLIB=liblvzlib.so +SHAREDLIBV=liblvzlib.so.4 +SHAREDLIBM=lvzlib.so LIBS=$(STATICLIB) $(SHAREDLIBV) AR=ar @@ -59,7 +58,7 @@ OBJZ = adler32.o crc32.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/filenc.o aes/hmac.o aes/prng.o aes/pwd2key.o aes/sha1.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 OBJC = $(OBJZ) $(OBJL) $(OBJG) $(OBJ2) $(OBJE) @@ -67,7 +66,7 @@ PIC_OBJZ = adler32.lo crc32.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/filenc.lo aes/hmac.lo aes/prng.lo aes/pwd2key.lo aes/sha1.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_OBJC = $(PIC_OBJZ) $(PIC_OBJL) $(PIC_OBJG) $(PIC_OBJ2) $(PIC_OBJE) @@ -77,15 +76,15 @@ OBJS = $(OBJC) $(OBJA) -PIC_OBJS = $(PIC_OBJC) $(PIC_OBJA) +PIC_OBJS = $(patsubst %,$(ODIR)/%,$(PIC_OBJC)) $(patsubst %,$(ODIR)/%,$(PIC_OBJA)) all: static all64 linux32: clean - $(MAKE) $(SHAREDLIBV) ARCH_DIR=./Linux_x86 CC_ARCH_SPEC="-m32" + $(MAKE) $(SHAREDLIBV) ODIR=./Linux_x86 CC_ARCH_SPEC="-m32" linux64: clean - $(MAKE) $(SHAREDLIBV) ARCH_DIR=./Linux_x64 CC_ARCH_SPEC="-m64" + $(MAKE) $(SHAREDLIBV) ODIR=./Linux_x64 CC_ARCH_SPEC="-m64" static: example$(EXE) minigzip$(EXE) @@ -166,18 +165,17 @@ .SUFFIXES: .lo -.c.lo: - -@mkdir $(ARCH_DIR) 2>/dev/null || test -d $(ARCH_DIR) - -@mkdir $(ARCH_DIR)/aes 2>/dev/null || test -d $(ARCH_DIR)/aes - -@mkdir $(ARCH_DIR)/bzip2 2>/dev/null || test -d $(ARCH_DIR)/bzip2 - $(CC) $(SFLAGS) -DPIC -c -o $(ARCH_DIR)/$*.o $< - -@mv $(ARCH_DIR)/$*.o $(ARCH_DIR)/$@ +$(ODIR)/%.lo: %.c + -@mkdir $(ODIR) 2>/dev/null || test -d $(ODIR) + -@mkdir $(ODIR)/aes 2>/dev/null || test -d $(ODIR)/aes + -@mkdir $(ODIR)/bzip2 2>/dev/null || test -d $(ODIR)/bzip2 + $(CC) $(SFLAGS) -DPIC -c -o $(ODIR)/$*.lo $< placebo $(SHAREDLIBV): $(PIC_OBJS) - $(LDSHARED) $(SFLAGS) -shared -o $@ $(PIC_OBJS) $(LDSHAREDLIBC) $(LDFLAGS) - rm -f $(SHAREDLIB) $(SHAREDLIBM) -# ln -s $@ $(SHAREDLIB) -# ln -s $@ $(SHAREDLIBM) + $(LDSHARED) $(SFLAGS) -shared -o $(ODIR)/$@ $(PIC_OBJS) $(LDSHAREDLIBC) $(LDFLAGS) + rm -f $(ODIR)/$(SHAREDLIB) $(ODIR)/$(SHAREDLIBM) +# ln -s $(ODIR)/$@ $(ODIR)/$(SHAREDLIB) +# ln -s $(ODIR)/$@ $(ODIR)/$(SHAREDLIBM) example$(EXE): example.o $(STATICLIB) $(CC) $(CFLAGS) -o $@ example.o $(TEST_LDFLAGS) @@ -260,7 +258,7 @@ infcover \ libz.* foo.gz so_locations \ _match.s maketree contrib/infback9/*.o - rm -rf $(ARCH_DIR)/*.lo + rm -rf *.lo rm -f *.gcda *.gcno *.gcov rm -f contrib/infback9/*.gcda contrib/infback9/*.gcno contrib/infback9/*.gcov Modified: trunk/lvzip/c_source/aes/entropy.c =================================================================== --- trunk/lvzip/c_source/aes/entropy.c 2015-05-27 13:31:38 UTC (rev 1531) +++ trunk/lvzip/c_source/aes/entropy.c 2015-05-27 15:22:25 UTC (rev 1532) @@ -1,6 +1,7 @@ #ifdef _WIN32 #include <windows.h> #else +#include <stdio.h> #include <fcntl.h> #endif @@ -35,12 +36,12 @@ #else int entropy_fun(unsigned char buf[], unsigned int len) { - int frand = open("/dev/random", O_RDONLY); + FILE *frand = fopen("/dev/random", "r"); int rlen = 0; - if (frand != -1) + if (frand != NULL) { - rlen = read(frand, buf, len); - close(frand); + rlen = fread(buf, sizeof(unsigned char), len, frand); + fclose(frand); } return rlen; } Modified: trunk/lvzip/c_source/zip.c =================================================================== --- trunk/lvzip/c_source/zip.c 2015-05-27 13:31:38 UTC (rev 1531) +++ trunk/lvzip/c_source/zip.c 2015-05-27 15:22:25 UTC (rev 1532) @@ -843,7 +843,7 @@ if (err == ZIP_OK) { err = zip64local_SearchCentralDir64(&pziinit->z_filefunc, pziinit->filestream, ¢ral_pos); - if (err = ZIP_OK) + if (err == ZIP_OK) { ZPOS64_T sizeEndOfCentralDirectory; if (ZSEEK64(pziinit->z_filefunc, pziinit->filestream, central_pos, ZLIB_FILEFUNC_SEEK_SET) != 0) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lab...@us...> - 2015-05-27 13:31:41
|
Revision: 1531 http://sourceforge.net/p/opengtoolkit/svn/1531 Author: labviewer Date: 2015-05-27 13:31:38 +0000 (Wed, 27 May 2015) Log Message: ----------- Fix some linux compilation issues Modified Paths: -------------- trunk/lvzip/c_source/Makefile trunk/lvzip/c_source/Makefile.vxworks trunk/lvzip/c_source/aes/entropy.c trunk/lvzip/c_source/lvutil.c Modified: trunk/lvzip/c_source/Makefile =================================================================== --- trunk/lvzip/c_source/Makefile 2015-05-27 11:25:40 UTC (rev 1530) +++ trunk/lvzip/c_source/Makefile 2015-05-27 13:31:38 UTC (rev 1531) @@ -18,6 +18,7 @@ CC=gcc + CFLAGS=-O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN #CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 #CFLAGS=-g -DDEBUG @@ -25,7 +26,7 @@ # -Wstrict-prototypes -Wmissing-prototypes CINDIR=/usr/local/lv70/cintools -SFLAGS=-O3 -fPIC -m64 -fvisibility=hidden -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -L$(CINDIR) +SFLAGS=-O3 -fPIC $(CC_ARCH_SPEC) -fvisibility=hidden -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -L$(CINDIR) LDFLAGS= TEST_LDFLAGS=-L. libz.a LDSHARED=gcc @@ -58,12 +59,17 @@ OBJZ = adler32.o crc32.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 -OBJC = $(OBJZ) $(OBJL) $(OBJG) +OBJE = aes/aescrypt.o aes/aeskey.o aes/aestab.o aes/entropy.o aes/filenc.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 +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_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_OBJC = $(PIC_OBJZ) $(PIC_OBJL) $(PIC_OBJG) +PIC_OBJE = aes/aescrypt.lo aes/aeskey.lo aes/aestab.lo aes/entropy.lo aes/filenc.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_OBJC = $(PIC_OBJZ) $(PIC_OBJL) $(PIC_OBJG) $(PIC_OBJ2) $(PIC_OBJE) # to use the asm code: make OBJA=match.o, PIC_OBJA=match.lo OBJA = @@ -73,9 +79,14 @@ PIC_OBJS = $(PIC_OBJC) $(PIC_OBJA) -#all: static all64 -all: clean $(SHAREDLIBV) +all: static all64 +linux32: clean + $(MAKE) $(SHAREDLIBV) ARCH_DIR=./Linux_x86 CC_ARCH_SPEC="-m32" + +linux64: clean + $(MAKE) $(SHAREDLIBV) ARCH_DIR=./Linux_x64 CC_ARCH_SPEC="-m64" + static: example$(EXE) minigzip$(EXE) shared: examplesh$(EXE) minigzipsh$(EXE) @@ -156,16 +167,17 @@ .SUFFIXES: .lo .c.lo: - -@mkdir objs 2>/dev/null || test -d objs - $(CC) $(SFLAGS) -DPIC -c -o objs/$*.o $< - -@mv objs/$*.o $@ + -@mkdir $(ARCH_DIR) 2>/dev/null || test -d $(ARCH_DIR) + -@mkdir $(ARCH_DIR)/aes 2>/dev/null || test -d $(ARCH_DIR)/aes + -@mkdir $(ARCH_DIR)/bzip2 2>/dev/null || test -d $(ARCH_DIR)/bzip2 + $(CC) $(SFLAGS) -DPIC -c -o $(ARCH_DIR)/$*.o $< + -@mv $(ARCH_DIR)/$*.o $(ARCH_DIR)/$@ placebo $(SHAREDLIBV): $(PIC_OBJS) $(LDSHARED) $(SFLAGS) -shared -o $@ $(PIC_OBJS) $(LDSHAREDLIBC) $(LDFLAGS) rm -f $(SHAREDLIB) $(SHAREDLIBM) # ln -s $@ $(SHAREDLIB) # ln -s $@ $(SHAREDLIBM) - -@rmdir objs example$(EXE): example.o $(STATICLIB) $(CC) $(CFLAGS) -o $@ example.o $(TEST_LDFLAGS) @@ -248,7 +260,7 @@ infcover \ libz.* foo.gz so_locations \ _match.s maketree contrib/infback9/*.o - rm -rf objs + rm -rf $(ARCH_DIR)/*.lo rm -f *.gcda *.gcno *.gcov rm -f contrib/infback9/*.gcda contrib/infback9/*.gcno contrib/infback9/*.gcov Modified: trunk/lvzip/c_source/Makefile.vxworks =================================================================== --- trunk/lvzip/c_source/Makefile.vxworks 2015-05-27 11:25:40 UTC (rev 1530) +++ trunk/lvzip/c_source/Makefile.vxworks 2015-05-27 13:31:38 UTC (rev 1531) @@ -19,11 +19,16 @@ # 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)/adler32.o $(OBJ_DIR)/compress.o $(OBJ_DIR)/crc32.o $(OBJ_DIR)/deflate.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 \ + $(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)/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 \ - $(OBJ_DIR)/unzip.o $(OBJ_DIR)/zip.o $(OBJ_DIR)/zutil.o + $(OBJ_DIR)/unzip.o $(OBJ_DIR)/zip.o $(OBJ_DIR)/zutil.o # This is the name of the output shared library. PROJECT_TARGETS := $(OBJ_DIR)/lvzlib.out Modified: trunk/lvzip/c_source/aes/entropy.c =================================================================== --- trunk/lvzip/c_source/aes/entropy.c 2015-05-27 11:25:40 UTC (rev 1530) +++ trunk/lvzip/c_source/aes/entropy.c 2015-05-27 13:31:38 UTC (rev 1531) @@ -1,48 +1,49 @@ -#ifdef _WIN32 -#include <windows.h> -#endif +#ifdef _WIN32 +#include <windows.h> +#else +#include <fcntl.h> +#endif #if defined(__cplusplus) extern "C" { #endif - -#ifdef _WIN32 -int entropy_fun(unsigned char buf[], unsigned int len) -{ - HCRYPTPROV provider; - unsigned __int64 pentium_tsc[1]; - unsigned int i; - int result = 0; - - - 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) - buf[i] = ((unsigned char*)pentium_tsc)[i]; - - return i; -} -#else -int entropy_fun(unsigned char buf[], unsigned int len) -{ + +#ifdef _WIN32 +int entropy_fun(unsigned char buf[], unsigned int len) +{ + HCRYPTPROV provider; + unsigned __int64 pentium_tsc[1]; + unsigned int i; + int result = 0; + + 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) + buf[i] = ((unsigned char*)pentium_tsc)[i]; + + return i; +} +#else +int entropy_fun(unsigned char buf[], unsigned int len) +{ int frand = open("/dev/random", O_RDONLY); int rlen = 0; if (frand != -1) { rlen = read(frand, buf, len); - close(frand); - } - return rlen; -} + close(frand); + } + return rlen; +} #endif #if defined(__cplusplus) Modified: trunk/lvzip/c_source/lvutil.c =================================================================== --- trunk/lvzip/c_source/lvutil.c 2015-05-27 11:25:40 UTC (rev 1530) +++ trunk/lvzip/c_source/lvutil.c 2015-05-27 13:31:38 UTC (rev 1531) @@ -111,14 +111,14 @@ #endif #if HAVE_BZIP2 -void bz_internal_error(int errcode) -{ - // if we have a debug build then print the error in the LabVIEW debug console -#if DEBUG - DbgPrintf("BZIP2 internal error %ld occurred!!", errcode); -#endif -} +void bz_internal_error(int errcode) +{ + // if we have a debug build then print the error in the LabVIEW debug console +#if DEBUG + DbgPrintf("BZIP2 internal error %ld occurred!!", errcode); #endif +} +#endif #if MacOS #if usesHFSPath @@ -1680,7 +1680,7 @@ return mgNotSupported; } else -#endif + #endif { switch (openMode) { @@ -1710,11 +1710,19 @@ return mgArgErr; } - err = MakePathDSString(path, &lstr, strlen(namedResourceFork)); - if (!err && rsrc) + #if MacOSX + if (rsrc) { - strcpy((char*)(LStrBuf(lstr) + LStrLen(lstr)), namedResourceFork); + err = MakePathDSString(path, &lstr, strlen(namedResourceFork)); + if (!err) + { + strcpy((char*)(LStrBuf(lstr) + LStrLen(lstr)), namedResourceFork); + } } + else + #else + err = MakePathDSString(path, &lstr, 0); + #endif if (err) return err; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lab...@us...> - 2015-05-27 11:25:43
|
Revision: 1530 http://sourceforge.net/p/opengtoolkit/svn/1530 Author: labviewer Date: 2015-05-27 11:25:40 +0000 (Wed, 27 May 2015) Log Message: ----------- Fix some minor 64 bit implicit conversion warnings Modified Paths: -------------- trunk/lvzip/c_source/bzip2/compress.c trunk/lvzip/c_source/crypt.h trunk/lvzip/c_source/ioapi.c trunk/lvzip/c_source/iowin.c trunk/lvzip/c_source/zip.c Modified: trunk/lvzip/c_source/bzip2/compress.c =================================================================== --- trunk/lvzip/c_source/bzip2/compress.c 2015-05-27 11:12:39 UTC (rev 1529) +++ trunk/lvzip/c_source/bzip2/compress.c 2015-05-27 11:25:40 UTC (rev 1530) @@ -202,7 +202,7 @@ *ryy_j = rtmp2; }; yy[0] = rtmp; - j = ryy_j - &(yy[0]); + j = (Int32)(ryy_j - &(yy[0])); mtfv[wr] = j+1; wr++; s->mtfFreq[j+1]++; } Modified: trunk/lvzip/c_source/crypt.h =================================================================== --- trunk/lvzip/c_source/crypt.h 2015-05-27 11:12:39 UTC (rev 1529) +++ trunk/lvzip/c_source/crypt.h 2015-05-27 11:25:40 UTC (rev 1530) @@ -34,7 +34,7 @@ /*********************************************************************** * Return the next byte in the pseudo-random sequence */ -static int decrypt_byte(unsigned long* pkeys, const z_crc_t* pcrc_32_tab) +static int decrypt_byte(unsigned long* pkeys /*, const z_crc_t* pcrc_32_tab*/) { unsigned temp; /* POTENTIAL BUG: temp*(temp^1) may overflow in an * unpredictable manner on 16-bit systems; not a problem @@ -75,10 +75,10 @@ } #define zdecode(pkeys,pcrc_32_tab,c) \ - (update_keys(pkeys,pcrc_32_tab,c ^= decrypt_byte(pkeys,pcrc_32_tab))) + (update_keys(pkeys,pcrc_32_tab,c ^= decrypt_byte(pkeys /*,pcrc_32_tab*/))) #define zencode(pkeys,pcrc_32_tab,c,t) \ - (t=decrypt_byte(pkeys,pcrc_32_tab), update_keys(pkeys,pcrc_32_tab,c), t^(c)) + (t=decrypt_byte(pkeys /*,pcrc_32_tab*/), update_keys(pkeys,pcrc_32_tab,c), t^(c)) #ifdef INCLUDECRYPTINGCODE_IFCRYPTALLOWED Modified: trunk/lvzip/c_source/ioapi.c =================================================================== --- trunk/lvzip/c_source/ioapi.c 2015-05-27 11:12:39 UTC (rev 1529) +++ trunk/lvzip/c_source/ioapi.c 2015-05-27 11:25:40 UTC (rev 1530) @@ -114,7 +114,7 @@ return NULL; ioposix = (FILE_IOPOSIX*)malloc(sizeof(FILE_IOPOSIX)); ioposix->file = file; - ioposix->filenameLength = strlen(filename) + 1; + ioposix->filenameLength = (int)strlen(filename) + 1; ioposix->filename = (char*)malloc(ioposix->filenameLength * sizeof(char)); memcpy(ioposix->filename, filename, ioposix->filenameLength); return (voidpf)ioposix; Modified: trunk/lvzip/c_source/iowin.c =================================================================== --- trunk/lvzip/c_source/iowin.c 2015-05-27 11:12:39 UTC (rev 1529) +++ trunk/lvzip/c_source/iowin.c 2015-05-27 11:25:40 UTC (rev 1530) @@ -83,13 +83,13 @@ if ((hFile != NULL) && (hFile != INVALID_HANDLE_VALUE)) { - int len = wcslen(filename); + size_t len = wcslen(filename); w32fiow = (WIN32FILE_IOWIN *)malloc(sizeof(WIN32FILE_IOWIN) + len); if (w32fiow) { w32fiow->hf = hFile; w32fiow->error = 0; - w32fiow->filenameLength = len; + w32fiow->filenameLength = (int)len; wcsncpy(w32fiow->filename, filename, len + 1); } else Modified: trunk/lvzip/c_source/zip.c =================================================================== --- trunk/lvzip/c_source/zip.c 2015-05-27 11:12:39 UTC (rev 1529) +++ trunk/lvzip/c_source/zip.c 2015-05-27 11:25:40 UTC (rev 1530) @@ -1463,16 +1463,16 @@ zi->ci.pcrc_32_tab = get_crc_table(); /*init_keys(password,zi->ci.keys,zi->ci.pcrc_32_tab);*/ - sizeHead = crypthead(password,bufHead,RAND_HEAD_LEN,zi->ci.keys,zi->ci.pcrc_32_tab,crcForCrypting); + sizeHead = crypthead(password, bufHead, RAND_HEAD_LEN, zi->ci.keys, zi->ci.pcrc_32_tab, crcForCrypting); zi->ci.crypt_header_size = sizeHead; - if (ZWRITE64(zi->z_filefunc,zi->filestream,bufHead,sizeHead) != sizeHead) + if (ZWRITE64(zi->z_filefunc, zi->filestream, bufHead, sizeHead) != sizeHead) err = ZIP_ERRNO; } #endif } - if (err==Z_OK) + if (err == Z_OK) zi->in_opened_file_inzip = 1; return err; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lab...@us...> - 2015-05-15 13:44:40
|
Revision: 1526 http://sourceforge.net/p/opengtoolkit/svn/1526 Author: labviewer Date: 2015-05-15 13:44:37 +0000 (Fri, 15 May 2015) Log Message: ----------- Fix a few MacOSX issues Modified Paths: -------------- trunk/lvzip/c_source/lvutil.c Modified: trunk/lvzip/c_source/lvutil.c =================================================================== --- trunk/lvzip/c_source/lvutil.c 2015-05-06 17:23:50 UTC (rev 1525) +++ trunk/lvzip/c_source/lvutil.c 2015-05-15 13:44:37 UTC (rev 1526) @@ -1066,7 +1066,7 @@ { err = UnixToLVFileErr(); } - else + else if (S_ISLNK(st.st_mode)) { len = st.st_size + 1; buf = malloc(len); @@ -1075,6 +1075,10 @@ err = mFullErr; } } + else + { + err = mgArgErr; + } while (!err) { @@ -1535,6 +1539,10 @@ return err; } +#if MacOSX && usesPosixPath +static char *namedResourceFork = "/..namedfork/rsrc"; +#endif + LibAPI(MgErr) LVFile_OpenFile(LVRefNum *refnum, Path path, uInt8 rsrc, uInt32 openMode, uInt32 denyMode) { MgErr err; @@ -1663,10 +1671,10 @@ return mgArgErr; } - err = MakePathDSString(path, &lstr, 5); + err = MakePathDSString(path, &lstr, strlen(namedResourceFork)); if (!err && rsrc) { - strcpy((char*)(LStrBuf(lstr) + LStrLen(lstr)), "/rsrc"); + strcpy((char*)(LStrBuf(lstr) + LStrLen(lstr)), namedResourceFork); } if (err) return err; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |