From: <lab...@us...> - 2019-09-15 00:38:58
|
Revision: 1607 http://sourceforge.net/p/opengtoolkit/svn/1607 Author: labviewer Date: 2019-09-15 00:38:56 +0000 (Sun, 15 Sep 2019) Log Message: ----------- Add an endianess indication routine Modified Paths: -------------- trunk/lvzip/c_source/lvapi.c trunk/lvzip/c_source/lvapi.h trunk/lvzip/c_source/lvutil.c Modified: trunk/lvzip/c_source/lvapi.c =================================================================== --- trunk/lvzip/c_source/lvapi.c 2019-09-14 18:25:52 UTC (rev 1606) +++ trunk/lvzip/c_source/lvapi.c 2019-09-15 00:38:56 UTC (rev 1607) @@ -194,6 +194,17 @@ return version; } + +LibAPI(uInt32) lvzlib_isLittleEndian(void) +{ +#if BigEndian + return FALSE; +#else + return TRUE; +#endif +} + + /* exported zlib deflate and inflate functions */ LibAPI(int) lvzlib_compress(Bytef *dest, uInt32 *destLen, const Bytef *source, uInt32 sourceLen, int level) Modified: trunk/lvzip/c_source/lvapi.h =================================================================== --- trunk/lvzip/c_source/lvapi.h 2019-09-14 18:25:52 UTC (rev 1606) +++ trunk/lvzip/c_source/lvapi.h 2019-09-15 00:38:56 UTC (rev 1607) @@ -31,6 +31,7 @@ #ifndef lvzip_lvapi_h #define lvzip_lvapi_h LibAPI(const char *) lvzlib_zlibVersion(void); +LibAPI(uInt32) lvzlib_isLittleEndian(void); /* exported zlib deflate and inflate functions */ LibAPI(int) lvzlib_compress(Bytef *dest, uInt32 *destLen, const Bytef *source, uInt32 sourceLen, int level); LibAPI(int) lvzlib_uncompress(Bytef *dest, uInt32 *destLen, const Bytef *source, uInt32 sourceLen); Modified: trunk/lvzip/c_source/lvutil.c =================================================================== --- trunk/lvzip/c_source/lvutil.c 2019-09-14 18:25:52 UTC (rev 1606) +++ trunk/lvzip/c_source/lvutil.c 2019-09-15 00:38:56 UTC (rev 1607) @@ -1233,7 +1233,7 @@ } else { - flags |= 0100000; + flags |= 010000; } return flags; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |