diff --git a/harbour/ChangeLog b/harbour/ChangeLog index f2214e8c6a..0cf8708bc9 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,43 @@ The license applies to all entries newer than 2009-04-28. */ +2011-04-24 10:06 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * utils/hbmk2/hbmk2.prg + ! fixed "cross-talk" in compiler options between C and C++ + build passes + + + contrib/hbqt/qtsql/doc/en + ! add missing dir causing doc gen errors + + * contrib/hbmlzo/3rd/minilzo/README.LZO + * contrib/hbmlzo/3rd/minilzo/lzoconf.h + * contrib/hbmlzo/3rd/minilzo/minilzo.c + * contrib/hbmlzo/3rd/minilzo/minilzo.h + * contrib/hbmlzo/3rd/minilzo/COPYING + * contrib/hbmlzo/3rd/minilzo/minilzo.hbp + * contrib/hbmlzo/3rd/minilzo/lzodefs.h + + update to 2.05 [Tamas Tevesz] + + * contrib/hbqt/qtsql/hbqtsql.hbc + ! deleted GUI related settingd + + * contrib/hbqt/qtsql/qth/filelist.hbm + * sorted + + * contrib/hbqt/qtsql/hbqtsql.hbm + * contrib/hbqt/qtsql/qth/QSqlField.qth + * contrib/hbqt/qtsql/qth/QSqlRelationalTableModel.qth + * contrib/hbqt/qtsql/qth/QSqlDatabase.qth + * contrib/hbqt/qtsql/qth/QSqlQuery.qth + * contrib/hbqt/qtsql/qth/QSqlQueryModel.qth + * contrib/hbqt/qtsql/qth/QSqlIndex.qth + * contrib/hbqt/qtsql/qth/QSqlTableModel.qth + * contrib/hbqt/qtsql/qth/QSqlError.qth + * contrib/hbqt/qtsql/qth/QSqlDriver.qth + * contrib/hbqt/qtsql/qth/QSqlRecord.qth + * contrib/hbqt/qtsql/qth/QSqlResult.qth + * deleted EOL/EOF spaces + 2011-04-23 23:25 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/hbqt/gtqtc/gtqtc.cpp * contrib/hbqt/gtqtc/gtqtc.h diff --git a/harbour/contrib/hbmlzo/3rd/minilzo/COPYING b/harbour/contrib/hbmlzo/3rd/minilzo/COPYING index 5ee49f42e9..d159169d10 100644 --- a/harbour/contrib/hbmlzo/3rd/minilzo/COPYING +++ b/harbour/contrib/hbmlzo/3rd/minilzo/COPYING @@ -1,8 +1,8 @@ GNU GENERAL PUBLIC LICENSE Version 2, June 1991 - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @@ -15,7 +15,7 @@ software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to +the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not @@ -55,7 +55,7 @@ patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. - + GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION @@ -110,7 +110,7 @@ above, provided that you also meet all of these conditions: License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) - + These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in @@ -168,7 +168,7 @@ access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. - + 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is @@ -225,7 +225,7 @@ impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. - + 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License @@ -278,7 +278,7 @@ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS - + How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest @@ -291,7 +291,7 @@ convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. - Copyright (C) 19yy + Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -303,17 +303,16 @@ the "copyright" line and a pointer to where the full notice is found. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: - Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. @@ -336,5 +335,5 @@ necessary. Here is a sample; alter the names: This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General +library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. diff --git a/harbour/contrib/hbmlzo/3rd/minilzo/README.LZO b/harbour/contrib/hbmlzo/3rd/minilzo/README.LZO index a065efe7fa..c0bf7eee8c 100644 --- a/harbour/contrib/hbmlzo/3rd/minilzo/README.LZO +++ b/harbour/contrib/hbmlzo/3rd/minilzo/README.LZO @@ -6,8 +6,8 @@ Author : Markus Franz Xaver Johannes Oberhumer http://www.oberhumer.com/opensource/lzo/ - Version : 2.04 - Date : 31 Oct 2010 + Version : 2.05 + Date : 23 Apr 2011 I've created miniLZO for projects where it is inconvenient to include (or require) the full LZO source code just because you @@ -26,8 +26,8 @@ minilzo.c to your Makefile and #include minilzo.h from your program. Note: you also must distribute this file ('README.LZO') with your project. - minilzo.o compiles to about 6 kB (using gcc or Visual C on a i386), and - the sources are about 30 kB when packed with zip - so there's no more + minilzo.o compiles to about 6 KiB (using gcc or Visual C on an i386), and + the sources are about 30 KiB when packed with zip - so there's no more excuse that your application doesn't support data compression :-) For more information, documentation, example programs and other support @@ -50,14 +50,14 @@ If you are running on a very unusual architecture and lzo_init() fails then you should first recompile with '-DLZO_DEBUG' to see what causes the failure. - The most probable case is something like 'sizeof(char *) != sizeof(long)'. + The most probable case is something like 'sizeof(void *) != sizeof(size_t)'. After identifying the problem you can compile by adding some defines - like '-DSIZEOF_CHAR_P=8' to your Makefile. + like '-DSIZEOF_VOID_P=8' to your Makefile. The best solution is (of course) using Autoconf - if your project uses Autoconf anyway just add '-DMINILZO_HAVE_CONFIG_H' to your compiler flags when compiling minilzo.c. See the LZO distribution for an example - how to set up configure.in. + how to set up configure.ac. Appendix B: list of public functions available in miniLZO @@ -87,7 +87,7 @@ lzo_memset() - Appendix C: suggested macros for 'configure.in' when using Autoconf + Appendix C: suggested macros for 'configure.ac' when using Autoconf ------------------------------------------------------------------- Checks for typedefs and structures AC_CHECK_TYPE(ptrdiff_t,long) @@ -110,8 +110,9 @@ Appendix D: Copyright --------------------- - LZO and miniLZO are Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, - 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Markus Franz Xaver Oberhumer + LZO and miniLZO are Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, + 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 + Markus Franz Xaver Oberhumer . LZO and miniLZO are distributed under the terms of the GNU General Public License (GPL). See the file COPYING. diff --git a/harbour/contrib/hbmlzo/3rd/minilzo/lzoconf.h b/harbour/contrib/hbmlzo/3rd/minilzo/lzoconf.h index d6125e8714..1d0fe14fcd 100644 --- a/harbour/contrib/hbmlzo/3rd/minilzo/lzoconf.h +++ b/harbour/contrib/hbmlzo/3rd/minilzo/lzoconf.h @@ -1,7 +1,8 @@ -/* lzoconf.h -- configuration for the LZO real-time data compression library +/* lzoconf.h -- configuration of the LZO data compression library This file is part of the LZO real-time data compression library. + Copyright (C) 2011 Markus Franz Xaver Johannes Oberhumer Copyright (C) 2010 Markus Franz Xaver Johannes Oberhumer Copyright (C) 2009 Markus Franz Xaver Johannes Oberhumer Copyright (C) 2008 Markus Franz Xaver Johannes Oberhumer @@ -43,9 +44,9 @@ #ifndef __LZOCONF_H_INCLUDED #define __LZOCONF_H_INCLUDED 1 -#define LZO_VERSION 0x2040 -#define LZO_VERSION_STRING "2.04" -#define LZO_VERSION_DATE "Oct 31 2010" +#define LZO_VERSION 0x2050 +#define LZO_VERSION_STRING "2.05" +#define LZO_VERSION_DATE "Apr 23 2011" /* internal Autoconf configuration file - only used when building LZO */ #if defined(LZO_HAVE_CONFIG_H) @@ -159,6 +160,27 @@ extern "C" { # endif #endif +/* Integral types with exactly 64 bits. */ +#if !defined(LZO_UINT64_MAX) +# if (LZO_UINT_MAX >= LZO_0xffffffffL) +# if ((((LZO_UINT_MAX) >> 31) >> 31) == 3) +# define lzo_uint64 lzo_uint +# define lzo_int64 lzo_int +# define LZO_UINT64_MAX LZO_UINT_MAX +# define LZO_INT64_MAX LZO_INT_MAX +# define LZO_INT64_MIN LZO_INT_MIN +# endif +# elif (ULONG_MAX >= LZO_0xffffffffL) +# if ((((ULONG_MAX) >> 31) >> 31) == 3) + typedef unsigned long lzo_uint64; + typedef long lzo_int64; +# define LZO_UINT64_MAX ULONG_MAX +# define LZO_INT64_MAX LONG_MAX +# define LZO_INT64_MIN LONG_MIN +# endif +# endif +#endif + /* The larger type of lzo_uint and lzo_uint32. */ #if (LZO_UINT_MAX >= LZO_UINT32_MAX) # define lzo_xint lzo_uint @@ -186,6 +208,10 @@ extern "C" { #define lzo_ushortp unsigned short __LZO_MMODEL * #define lzo_uint32p lzo_uint32 __LZO_MMODEL * #define lzo_int32p lzo_int32 __LZO_MMODEL * +#if defined(LZO_UINT64_MAX) +#define lzo_uint64p lzo_uint64 __LZO_MMODEL * +#define lzo_int64p lzo_int64 __LZO_MMODEL * +#endif #define lzo_uintp lzo_uint __LZO_MMODEL * #define lzo_intp lzo_int __LZO_MMODEL * #define lzo_xintp lzo_xint __LZO_MMODEL * @@ -308,7 +334,7 @@ struct lzo_callback_t */ #define LZO_E_OK 0 #define LZO_E_ERROR (-1) -#define LZO_E_OUT_OF_MEMORY (-2) /* [not used right now] */ +#define LZO_E_OUT_OF_MEMORY (-2) /* [lzo_alloc_func_t failure] */ #define LZO_E_NOT_COMPRESSIBLE (-3) /* [not used right now] */ #define LZO_E_INPUT_OVERRUN (-4) #define LZO_E_OUTPUT_OVERRUN (-5) @@ -316,6 +342,7 @@ struct lzo_callback_t #define LZO_E_EOF_NOT_FOUND (-7) #define LZO_E_INPUT_NOT_CONSUMED (-8) #define LZO_E_NOT_YET_IMPLEMENTED (-9) /* [not used right now] */ +#define LZO_E_INVALID_ARGUMENT (-10) #ifndef lzo_sizeof_dict_t diff --git a/harbour/contrib/hbmlzo/3rd/minilzo/lzodefs.h b/harbour/contrib/hbmlzo/3rd/minilzo/lzodefs.h index 190013fecf..0e40e332a8 100644 --- a/harbour/contrib/hbmlzo/3rd/minilzo/lzodefs.h +++ b/harbour/contrib/hbmlzo/3rd/minilzo/lzodefs.h @@ -2,6 +2,7 @@ This file is part of the LZO real-time data compression library. + Copyright (C) 2011 Markus Franz Xaver Johannes Oberhumer Copyright (C) 2010 Markus Franz Xaver Johannes Oberhumer Copyright (C) 2009 Markus Franz Xaver Johannes Oberhumer Copyright (C) 2008 Markus Franz Xaver Johannes Oberhumer @@ -487,7 +488,7 @@ # if defined(__clang_major__) && defined(__clang_minor__) && defined(__clang_patchlevel__) # define LZO_CC_CLANG_CLANG (__clang_major__ * 0x10000L + __clang_minor__ * 0x100 + __clang_patchlevel__) # else -# define LZO_CC_CLANG_CLANG 0x020700L +# define LZO_CC_CLANG_CLANG 0x010000L # endif # define LZO_CC_CLANG LZO_CC_CLANG_GNUC # define LZO_INFO_CC "clang" diff --git a/harbour/contrib/hbmlzo/3rd/minilzo/minilzo.c b/harbour/contrib/hbmlzo/3rd/minilzo/minilzo.c index 6ae8d73537..25a1f68b3b 100644 --- a/harbour/contrib/hbmlzo/3rd/minilzo/minilzo.c +++ b/harbour/contrib/hbmlzo/3rd/minilzo/minilzo.c @@ -2,6 +2,7 @@ This file is part of the LZO real-time data compression library. + Copyright (C) 2011 Markus Franz Xaver Johannes Oberhumer Copyright (C) 2010 Markus Franz Xaver Johannes Oberhumer Copyright (C) 2009 Markus Franz Xaver Johannes Oberhumer Copyright (C) 2008 Markus Franz Xaver Johannes Oberhumer @@ -507,7 +508,7 @@ # if defined(__clang_major__) && defined(__clang_minor__) && defined(__clang_patchlevel__) # define LZO_CC_CLANG_CLANG (__clang_major__ * 0x10000L + __clang_minor__ * 0x100 + __clang_patchlevel__) # else -# define LZO_CC_CLANG_CLANG 0x020700L +# define LZO_CC_CLANG_CLANG 0x010000L # endif # define LZO_CC_CLANG LZO_CC_CLANG_GNUC # define LZO_INFO_CC "clang" @@ -1873,7 +1874,7 @@ extern "C" { #undef LZO_HAVE_CONFIG_H #include "minilzo.h" -#if !defined(MINILZO_VERSION) || (MINILZO_VERSION != 0x2040) +#if !defined(MINILZO_VERSION) || (MINILZO_VERSION != 0x2050) # error "version mismatch in miniLZO source files" #endif @@ -2111,7 +2112,6 @@ LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_uintptr_t) >= sizeof(lzo_voidp)) #endif #endif -#if 1 && !(LZO_CFG_NO_UNALIGNED) #if 1 && (LZO_ARCH_AMD64 || LZO_ARCH_I386 || LZO_ARCH_POWERPC) # if (LZO_SIZEOF_SHORT == 2) # define LZO_UNALIGNED_OK_2 1 @@ -2120,23 +2120,60 @@ LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_uintptr_t) >= sizeof(lzo_voidp)) # define LZO_UNALIGNED_OK_4 1 # endif #endif +#if 1 && (LZO_ARCH_AMD64) +# if defined(LZO_UINT64_MAX) +# define LZO_UNALIGNED_OK_8 1 +# endif +#endif +#if (LZO_CFG_NO_UNALIGNED) +# undef LZO_UNALIGNED_OK_2 +# undef LZO_UNALIGNED_OK_4 +# undef LZO_UNALIGNED_OK_8 #endif +#undef UA_GET16 +#undef UA_SET16 +#undef UA_COPY16 +#undef UA_GET32 +#undef UA_SET32 +#undef UA_COPY32 +#undef UA_GET64 +#undef UA_SET64 +#undef UA_COPY64 #if defined(LZO_UNALIGNED_OK_2) - LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(short) == 2) -#endif -#if defined(LZO_UNALIGNED_OK_4) - LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_uint32) == 4) -#elif defined(LZO_ALIGNED_OK_4) - LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_uint32) == 4) -#endif - -#undef COPY4 -#if defined(LZO_UNALIGNED_OK_4) || defined(LZO_ALIGNED_OK_4) -# if 1 && defined(ACC_UA_COPY32) -# define COPY4(d,s) ACC_UA_COPY32(d,s) + LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(unsigned short) == 2) +# if 1 && defined(ACC_UA_COPY16) +# define UA_GET16 ACC_UA_GET16 +# define UA_SET16 ACC_UA_SET16 +# define UA_COPY16 ACC_UA_COPY16 # else -# define COPY4(d,s) (* (__lzo_ua_volatile lzo_uint32p)(__lzo_ua_volatile lzo_voidp)(d) = * (__lzo_ua_volatile const lzo_uint32p)(__lzo_ua_volatile const lzo_voidp)(s)) +# define UA_GET16(p) (* (__lzo_ua_volatile const lzo_ushortp) (__lzo_ua_volatile const lzo_voidp) (p)) +# define UA_SET16(p,v) ((* (__lzo_ua_volatile lzo_ushortp) (__lzo_ua_volatile lzo_voidp) (p)) = (unsigned short) (v)) +# define UA_COPY16(d,s) UA_SET16(d, UA_GET16(s)) +# endif +#endif +#if defined(LZO_UNALIGNED_OK_4) || defined(LZO_ALIGNED_OK_4) + LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_uint32) == 4) +# if 1 && defined(ACC_UA_COPY32) +# define UA_GET32 ACC_UA_GET32 +# define UA_SET32 ACC_UA_SET32 +# define UA_COPY32 ACC_UA_COPY32 +# else +# define UA_GET32(p) (* (__lzo_ua_volatile const lzo_uint32p) (__lzo_ua_volatile const lzo_voidp) (p)) +# define UA_SET32(p,v) ((* (__lzo_ua_volatile lzo_uint32p) (__lzo_ua_volatile lzo_voidp) (p)) = (lzo_uint32) (v)) +# define UA_COPY32(d,s) UA_SET32(d, UA_GET32(s)) +# endif +#endif +#if defined(LZO_UNALIGNED_OK_8) + LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_uint64) == 8) +# if 1 && defined(ACC_UA_COPY64) +# define UA_GET64 ACC_UA_GET64 +# define UA_SET64 ACC_UA_SET64 +# define UA_COPY64 ACC_UA_COPY64 +# else +# define UA_GET64(p) (* (__lzo_ua_volatile const lzo_uint64p) (__lzo_ua_volatile const lzo_voidp) (p)) +# define UA_SET64(p,v) ((* (__lzo_ua_volatile lzo_uint64p) (__lzo_ua_volatile lzo_voidp) (p)) = (lzo_uint64) (v)) +# define UA_COPY64(d,s) UA_SET64(d, UA_GET64(s)) # endif #endif @@ -2208,6 +2245,10 @@ typedef union lzo_uint a_lzo_uint; lzo_int32 a_lzo_int32; lzo_uint32 a_lzo_uint32; +#if defined(LZO_UINT64_MAX) + lzo_int64 a_lzo_int64; + lzo_uint64 a_lzo_uint64; +#endif ptrdiff_t a_ptrdiff_t; lzo_uintptr_t a_lzo_uintptr_t; lzo_voidp a_lzo_voidp; @@ -2229,11 +2270,16 @@ lzo_full_align_t; #endif +#ifndef LZO_DETERMINISTIC #define LZO_DETERMINISTIC 1 +#endif +#ifndef LZO_DICT_USE_PTR #define LZO_DICT_USE_PTR 1 #if 0 && (LZO_ARCH_I086) # undef LZO_DICT_USE_PTR +# define LZO_DICT_USE_PTR 0 +#endif #endif #if (LZO_DICT_USE_PTR) @@ -2296,7 +2342,7 @@ static const char __lzo_copyright[] = #else "\r\n\n" "LZO data compression library.\n" - "$Copyright: LZO Copyright (C) 1996-2010 Markus Franz Xaver Johannes Oberhumer\n" + "$Copyright: LZO Copyright (C) 1996-2011 Markus Franz Xaver Johannes Oberhumer\n" "\n" "http://www.oberhumer.com $\n\n" "$Id: LZO version: v" LZO_VERSION_STRING ", " LZO_VERSION_DATE " $\n" @@ -2496,6 +2542,11 @@ LZOLIB_PUBLIC(lzo_hvoid_p, lzo_hmemset) (lzo_hvoid_p s, int c, lzo_hsize_t len) ACCCHK_ASSERT_IS_UNSIGNED_T(lzo_uint32) ACCCHK_ASSERT((LZO_UINT32_C(1) << (int)(8*sizeof(LZO_UINT32_C(1))-1)) > 0) ACCCHK_ASSERT(sizeof(lzo_uint32) >= 4) +#if defined(LZO_UINT64_MAX) + ACCCHK_ASSERT(sizeof(lzo_uint64) == 8) + ACCCHK_ASSERT_IS_SIGNED_T(lzo_int64) + ACCCHK_ASSERT_IS_UNSIGNED_T(lzo_uint64) +#endif #if !defined(__LZO_UINTPTR_T_IS_POINTER) ACCCHK_ASSERT_IS_UNSIGNED_T(lzo_uintptr_t) @@ -2510,6 +2561,77 @@ LZOLIB_PUBLIC(lzo_hvoid_p, lzo_hmemset) (lzo_hvoid_p s, int c, lzo_hsize_t len) #endif #undef ACCCHK_ASSERT +#if 0 +#define WANT_lzo_bitops_clz32 1 +#define WANT_lzo_bitops_clz64 1 +#endif +#define WANT_lzo_bitops_ctz32 1 +#define WANT_lzo_bitops_ctz64 1 + +#if (defined(_WIN32) || defined(_WIN64)) && ((LZO_CC_INTELC && (__INTEL_COMPILER >= 1000)) || (LZO_CC_MSC && (_MSC_VER >= 1400))) +#include +#if !defined(lzo_bitops_clz32) && defined(WANT_lzo_bitops_clz32) && 0 +#pragma intrinsic(_BitScanReverse) +static __lzo_inline unsigned lzo_bitops_clz32(lzo_uint32 v) +{ + unsigned long r; + (void) _BitScanReverse(&r, v); + return (unsigned) r; +} +#define lzo_bitops_clz32 lzo_bitops_clz32 +#endif +#if !defined(lzo_bitops_clz64) && defined(WANT_lzo_bitops_clz64) && defined(LZO_UINT64_MAX) && 0 +#pragma intrinsic(_BitScanReverse64) +static __lzo_inline unsigned lzo_bitops_clz64(lzo_uint64 v) +{ + unsigned long r; + (void) _BitScanReverse64(&r, v); + return (unsigned) r; +} +#define lzo_bitops_clz64 lzo_bitops_clz64 +#endif +#if !defined(lzo_bitops_ctz32) && defined(WANT_lzo_bitops_ctz32) +#pragma intrinsic(_BitScanForward) +static __lzo_inline unsigned lzo_bitops_ctz32(lzo_uint32 v) +{ + unsigned long r; + (void) _BitScanForward(&r, v); + return (unsigned) r; +} +#define lzo_bitops_ctz32 lzo_bitops_ctz32 +#endif +#if !defined(lzo_bitops_ctz64) && defined(WANT_lzo_bitops_ctz64) && defined(LZO_UINT64_MAX) +#pragma intrinsic(_BitScanForward64) +static __lzo_inline unsigned lzo_bitops_ctz64(lzo_uint64 v) +{ + unsigned long r; + (void) _BitScanForward64(&r, v); + return (unsigned) r; +} +#define lzo_bitops_ctz64 lzo_bitops_ctz64 +#endif + +#elif (LZO_CC_CLANG || (LZO_CC_GNUC >= 0x030400ul) || (LZO_CC_INTELC && (__INTEL_COMPILER >= 1000)) || LZO_CC_LLVM) +#if !defined(lzo_bitops_clz32) && defined(WANT_lzo_bitops_clz32) +#define lzo_bitops_clz32(v) ((unsigned) __builtin_clz(v)) +#endif +#if !defined(lzo_bitops_clz64) && defined(WANT_lzo_bitops_clz64) && defined(LZO_UINT64_MAX) +#define lzo_bitops_clz64(v) ((unsigned) __builtin_clzll(v)) +#endif +#if !defined(lzo_bitops_ctz32) && defined(WANT_lzo_bitops_ctz32) +#define lzo_bitops_ctz32(v) ((unsigned) __builtin_ctz(v)) +#endif +#if !defined(lzo_bitops_ctz64) && defined(WANT_lzo_bitops_ctz64) && defined(LZO_UINT64_MAX) +#define lzo_bitops_ctz64(v) ((unsigned) __builtin_ctzll(v)) +#endif +#if !defined(lzo_bitops_popcount32) && defined(WANT_lzo_bitops_popcount32) +#define lzo_bitops_popcount32(v) ((unsigned) __builtin_popcount(v)) +#endif +#if !defined(lzo_bitops_popcount32) && defined(WANT_lzo_bitops_popcount64) && defined(LZO_UINT64_MAX) +#define lzo_bitops_popcount64(v) ((unsigned) __builtin_popcountll(v)) +#endif +#endif + #if 0 #define u2p(ptr,off) ((lzo_voidp) (((lzo_bytep)(lzo_voidp)(ptr)) + (off))) #else @@ -2524,7 +2646,10 @@ _lzo_config_check(void) { lzo_bool r = 1; union { - lzo_xint a[2]; unsigned char b[2*sizeof(lzo_xint)]; + lzo_xint a[2]; unsigned char b[2*LZO_MAX(8,sizeof(lzo_xint))]; +#if defined(LZO_UNALIGNED_OK_8) + lzo_uint64 c[2]; +#endif unsigned short x[2]; lzo_uint32 y[2]; lzo_uint z[2]; } u; lzo_voidp p; @@ -2555,6 +2680,36 @@ _lzo_config_check(void) p = u2p(&u, 1); r &= ((* (lzo_uint32p) p) == 0); #endif +#if defined(LZO_UNALIGNED_OK_8) + u.c[0] = u.c[1] = 0; + u.b[0] = 5; u.b[sizeof(lzo_uint64) + 1] = 6; + p = u2p(&u, 1); + r &= ((* (lzo_uint64p) p) == 0); +#endif +#if defined(lzo_bitops_clz32) + { unsigned i; lzo_uint32 v = 1; + for (i = 0; i < 31; i++, v <<= 1) + r &= lzo_bitops_clz32(v) == 31 - i; + } +#endif +#if defined(lzo_bitops_clz64) + { unsigned i; lzo_uint64 v = 1; + for (i = 0; i < 63; i++, v <<= 1) + r &= lzo_bitops_clz64(v) == 63 - i; + } +#endif +#if defined(lzo_bitops_ctz32) + { unsigned i; lzo_uint32 v = 1; + for (i = 0; i < 31; i++, v <<= 1) + r &= lzo_bitops_ctz32(v) == i; + } +#endif +#if defined(lzo_bitops_ctz64) + { unsigned i; lzo_uint64 v = 1; + for (i = 0; i < 63; i++, v <<= 1) + r &= lzo_bitops_ctz64(v) == i; + } +#endif #endif return r == 1 ? LZO_E_OK : LZO_E_ERROR; @@ -2624,10 +2779,24 @@ int __far __pascal LibMain ( int a, short b, short c, long d ) #if !defined(MINILZO_CFG_SKIP_LZO1X_1_COMPRESS) +#if 1 && defined(UA_GET32) +#undef LZO_DICT_USE_PTR +#define LZO_DICT_USE_PTR 0 +#undef lzo_dict_t +#define lzo_dict_t unsigned short +#endif + #define LZO_NEED_DICT_H 1 +#ifndef D_BITS #define D_BITS 14 +#endif #define D_INDEX1(d,p) d = DM(DMUL(0x21,DX3(p,5,5,6)) >> 5) #define D_INDEX2(d,p) d = (d & (D_MASK & 0x7ff)) ^ (D_HIGH | 0x1f) +#if 1 +#define DINDEX(dv,p) DM(((DMUL(0x1824429d,dv)) >> (32-D_BITS))) +#else +#define DINDEX(dv,p) DM((dv) + ((dv) >> (32-D_BITS))) +#endif #ifndef __LZO_CONFIG1X_H #define __LZO_CONFIG1X_H 1 @@ -2845,11 +3014,11 @@ DVAL_ASSERT(lzo_xint dv, const lzo_bytep p) #endif #endif -#if defined(LZO_DICT_USE_PTR) +#if (LZO_DICT_USE_PTR) # define DENTRY(p,in) (p) # define GINDEX(m_pos,m_off,dict,dindex,in) m_pos = dict[dindex] #else -# define DENTRY(p,in) ((lzo_uint) ((p)-(in))) +# define DENTRY(p,in) ((lzo_dict_t) pd(p, in)) # define GINDEX(m_pos,m_off,dict,dindex,in) m_off = dict[dindex] #endif @@ -2870,7 +3039,7 @@ DVAL_ASSERT(lzo_xint dv, const lzo_bytep p) #endif -#if defined(LZO_DICT_USE_PTR) +#if (LZO_DICT_USE_PTR) #define LZO_CHECK_MPOS_DET(m_pos,m_off,in,ip,max_offset) \ (m_pos == NULL || (m_off = pd(ip, m_pos)) > max_offset) @@ -2896,7 +3065,7 @@ DVAL_ASSERT(lzo_xint dv, const lzo_bytep p) #endif -#if defined(LZO_DETERMINISTIC) +#if (LZO_DETERMINISTIC) # define LZO_CHECK_MPOS LZO_CHECK_MPOS_DET #else # define LZO_CHECK_MPOS LZO_CHECK_MPOS_NON_DET @@ -2912,37 +3081,113 @@ DVAL_ASSERT(lzo_xint dv, const lzo_bytep p) #endif -#define do_compress _lzo1x_1_do_compress +#define LZO_DETERMINISTIC !(LZO_DICT_USE_PTR) + +#ifndef DO_COMPRESS #define DO_COMPRESS lzo1x_1_compress +#endif #if 1 && defined(DO_COMPRESS) && !defined(do_compress) # define do_compress LZO_CPP_ECONCAT2(DO_COMPRESS,_core) #endif +#if defined(UA_GET64) +# define WANT_lzo_bitops_ctz64 1 +#elif defined(UA_GET32) +# define WANT_lzo_bitops_ctz32 1 +#endif + +#if (defined(_WIN32) || defined(_WIN64)) && ((LZO_CC_INTELC && (__INTEL_COMPILER >= 1000)) || (LZO_CC_MSC && (_MSC_VER >= 1400))) +#include +#if !defined(lzo_bitops_clz32) && defined(WANT_lzo_bitops_clz32) && 0 +#pragma intrinsic(_BitScanReverse) +static __lzo_inline unsigned lzo_bitops_clz32(lzo_uint32 v) +{ + unsigned long r; + (void) _BitScanReverse(&r, v); + return (unsigned) r; +} +#define lzo_bitops_clz32 lzo_bitops_clz32 +#endif +#if !defined(lzo_bitops_clz64) && defined(WANT_lzo_bitops_clz64) && defined(LZO_UINT64_MAX) && 0 +#pragma intrinsic(_BitScanReverse64) +static __lzo_inline unsigned lzo_bitops_clz64(lzo_uint64 v) +{ + unsigned long r; + (void) _BitScanReverse64(&r, v); + return (unsigned) r; +} +#define lzo_bitops_clz64 lzo_bitops_clz64 +#endif +#if !defined(lzo_bitops_ctz32) && defined(WANT_lzo_bitops_ctz32) +#pragma intrinsic(_BitScanForward) +static __lzo_inline unsigned lzo_bitops_ctz32(lzo_uint32 v) +{ + unsigned long r; + (void) _BitScanForward(&r, v); + return (unsigned) r; +} +#define lzo_bitops_ctz32 lzo_bitops_ctz32 +#endif +#if !defined(lzo_bitops_ctz64) && defined(WANT_lzo_bitops_ctz64) && defined(LZO_UINT64_MAX) +#pragma intrinsic(_BitScanForward64) +static __lzo_inline unsigned lzo_bitops_ctz64(lzo_uint64 v) +{ + unsigned long r; + (void) _BitScanForward64(&r, v); + return (unsigned) r; +} +#define lzo_bitops_ctz64 lzo_bitops_ctz64 +#endif + +#elif (LZO_CC_CLANG || (LZO_CC_GNUC >= 0x030400ul) || (LZO_CC_INTELC && (__INTEL_COMPILER >= 1000)) || LZO_CC_LLVM) +#if !defined(lzo_bitops_clz32) && defined(WANT_lzo_bitops_clz32) +#define lzo_bitops_clz32(v) ((unsigned) __builtin_clz(v)) +#endif +#if !defined(lzo_bitops_clz64) && defined(WANT_lzo_bitops_clz64) && defined(LZO_UINT64_MAX) +#define lzo_bitops_clz64(v) ((unsigned) __builtin_clzll(v)) +#endif +#if !defined(lzo_bitops_ctz32) && defined(WANT_lzo_bitops_ctz32) +#define lzo_bitops_ctz32(v) ((unsigned) __builtin_ctz(v)) +#endif +#if !defined(lzo_bitops_ctz64) && defined(WANT_lzo_bitops_ctz64) && defined(LZO_UINT64_MAX) +#define lzo_bitops_ctz64(v) ((unsigned) __builtin_ctzll(v)) +#endif +#if !defined(lzo_bitops_popcount32) && defined(WANT_lzo_bitops_popcount32) +#define lzo_bitops_popcount32(v) ((unsigned) __builtin_popcount(v)) +#endif +#if !defined(lzo_bitops_popcount32) && defined(WANT_lzo_bitops_popcount64) && defined(LZO_UINT64_MAX) +#define lzo_bitops_popcount64(v) ((unsigned) __builtin_popcountll(v)) +#endif +#endif + static __lzo_noinline lzo_uint do_compress ( const lzo_bytep in , lzo_uint in_len, lzo_bytep out, lzo_uintp out_len, - lzo_voidp wrkmem ) + lzo_uint ti, lzo_voidp wrkmem) { register const lzo_bytep ip; lzo_bytep op; const lzo_bytep const in_end = in + in_len; - const lzo_bytep const ip_end = in + in_len - M2_MAX_LEN - 5; + const lzo_bytep const ip_end = in + in_len - 20; const lzo_bytep ii; lzo_dict_p const dict = (lzo_dict_p) wrkmem; op = out; ip = in; - ii = ip; + ii = ip - ti; - ip += 4; + ip += ti < 4 ? 4 - ti : 0; for (;;) { - register const lzo_bytep m_pos; + const lzo_bytep m_pos; +#if !(LZO_DETERMINISTIC) LZO_DEFINE_UNINITIALIZED_VAR(lzo_uint, m_off, 0); lzo_uint m_len; lzo_uint dindex; - +next: + if __lzo_unlikely(ip >= ip_end) + break; DINDEX1(dindex,ip); GINDEX(m_pos,m_off,dict,dindex,in); if (LZO_CHECK_MPOS_NON_DET(m_pos,m_off,in,ip,M4_MAX_OFFSET)) @@ -2960,196 +3205,226 @@ do_compress ( const lzo_bytep in , lzo_uint in_len, goto literal; try_match: -#if 1 && defined(LZO_UNALIGNED_OK_2) - if (* (const lzo_ushortp) (const lzo_voidp) m_pos != * (const lzo_ushortp) (const lzo_voidp) ip) +#if defined(UA_GET32) + if (UA_GET32(m_pos) != UA_GET32(ip)) #else - if (m_pos[0] != ip[0] || m_pos[1] != ip[1]) + if (m_pos[0] != ip[0] || m_pos[1] != ip[1] || m_pos[2] != ip[2] || m_pos[3] != ip[3]) #endif { - } - else - { - if __lzo_likely(m_pos[2] == ip[2]) - { -#if 0 - if (m_off <= M2_MAX_OFFSET) - goto match; - if (lit <= 3) - goto match; - if (lit == 3) - { - assert(op - 2 > out); op[-2] |= LZO_BYTE(3); - *op++ = *ii++; *op++ = *ii++; *op++ = *ii++; - goto code_match; - } - if (m_pos[3] == ip[3]) -#endif - goto match; - } - else - { -#if 0 -#if 0 - if (m_off <= M1_MAX_OFFSET && lit > 0 && lit <= 3) -#else - if (m_off <= M1_MAX_OFFSET && lit == 3) -#endif - { - register lzo_uint t; - - t = lit; - assert(op - 2 > out); op[-2] |= LZO_BYTE(t); - do *op++ = *ii++; while (--t > 0); - assert(ii == ip); - m_off -= 1; - *op++ = LZO_BYTE(M1_MARKER | ((m_off & 3) << 2)); - *op++ = LZO_BYTE(m_off >> 2); - ip += 2; - goto match_done; - } -#endif - } - } - literal: + UPDATE_I(dict,0,dindex,ip,in); + ip += 1 + ((ip - ii) >> 5); + continue; + } UPDATE_I(dict,0,dindex,ip,in); - ++ip; +#else + lzo_uint m_off; + lzo_uint m_len; + { + lzo_uint32 dv; + lzo_uint dindex; +literal: + ip += 1 + ((ip - ii) >> 5); +next: if __lzo_unlikely(ip >= ip_end) break; - continue; - -match: + dv = UA_GET32(ip); + dindex = DINDEX(dv,ip); + GINDEX(m_off,m_pos,in+dict,dindex,in); UPDATE_I(dict,0,dindex,ip,in); - if (pd(ip,ii) > 0) - { - register lzo_uint t = pd(ip,ii); + if __lzo_unlikely(dv != UA_GET32(m_pos)) + goto literal; + } +#endif + { + register lzo_uint t = pd(ip,ii); + if (t != 0) + { if (t <= 3) { - assert(op - 2 > out); op[-2] |= LZO_BYTE(t); +#if defined(UA_COPY32) + UA_COPY32(op, ii); + op += t; +#else + { do *op++ = *ii++; while (--t > 0); } +#endif } - else if (t <= 18) +#if defined(UA_COPY32) || defined(UA_COPY64) + else if (t <= 16) + { *op++ = LZO_BYTE(t - 3); +#if defined(UA_COPY64) + UA_COPY64(op, ii); + UA_COPY64(op+8, ii+8); +#else + UA_COPY32(op, ii); + UA_COPY32(op+4, ii+4); + UA_COPY32(op+8, ii+8); + UA_COPY32(op+12, ii+12); +#endif + op += t; + } +#endif else { - register lzo_uint tt = t - 18; - - *op++ = 0; - while (tt > 255) + if (t <= 18) + *op++ = LZO_BYTE(t - 3); + else { - tt -= 255; + register lzo_uint tt = t - 18; *op++ = 0; + while __lzo_unlikely(tt > 255) + { + tt -= 255; +#if 1 && (LZO_CC_MSC && (_MSC_VER >= 1400)) + * (volatile unsigned char *) op++ = 0; +#else + *op++ = 0; +#endif + } + assert(tt > 0); + *op++ = LZO_BYTE(tt); } - assert(tt > 0); - *op++ = LZO_BYTE(tt); +#if defined(UA_COPY32) || defined(UA_COPY64) + do { +#if defined(UA_COPY64) + UA_COPY64(op, ii); + UA_COPY64(op+8, ii+8); +#else + UA_COPY32(op, ii); + UA_COPY32(op+4, ii+4); + UA_COPY32(op+8, ii+8); + UA_COPY32(op+12, ii+12); +#endif + op += 16; ii += 16; t -= 16; + } while (t >= 16); if (t > 0) +#endif + { do *op++ = *ii++; while (--t > 0); } } - do *op++ = *ii++; while (--t > 0); } - - assert(ii == ip); - ip += 3; - if (m_pos[3] != *ip++ || m_pos[4] != *ip++ || m_pos[5] != *ip++ || - m_pos[6] != *ip++ || m_pos[7] != *ip++ || m_pos[8] != *ip++ -#ifdef LZO1Y - || m_pos[ 9] != *ip++ || m_pos[10] != *ip++ || m_pos[11] != *ip++ - || m_pos[12] != *ip++ || m_pos[13] != *ip++ || m_pos[14] != *ip++ -#endif - ) + } + m_len = 4; { - --ip; - m_len = pd(ip, ii); - assert(m_len >= 3); assert(m_len <= M2_MAX_LEN); - - if (m_off <= M2_MAX_OFFSET) - { - m_off -= 1; -#if defined(LZO1X) - *op++ = LZO_BYTE(((m_len - 1) << 5) | ((m_off & 7) << 2)); - *op++ = LZO_BYTE(m_off >> 3); -#elif defined(LZO1Y) - *op++ = LZO_BYTE(((m_len + 1) << 4) | ((m_off & 3) << 2)); - *op++ = LZO_BYTE(m_off >> 2); +#if defined(UA_GET64) + lzo_uint64 v; + v = UA_GET64(ip + m_len) ^ UA_GET64(m_pos + m_len); + if __lzo_unlikely(v == 0) { + do { + m_len += 8; + v = UA_GET64(ip + m_len) ^ UA_GET64(m_pos + m_len); + if __lzo_unlikely(ip + m_len >= ip_end) + goto m_len_done; + } while (v == 0); + } +#if (LZO_ABI_LITTLE_ENDIAN) && defined(lzo_bitops_ctz64) + m_len += lzo_bitops_ctz64(v) / CHAR_BIT; +#elif (LZO_ABI_LITTLE_ENDIAN) + if ((v & UCHAR_MAX) == 0) do { + v >>= CHAR_BIT; + m_len += 1; + } while ((v & UCHAR_MAX) == 0); +#else + if (ip[m_len] == m_pos[m_len]) do { + m_len += 1; + } while (ip[m_len] == m_pos[m_len]); #endif - } - else if (m_off <= M3_MAX_OFFSET) - { - m_off -= 1; +#elif defined(UA_GET32) + lzo_uint32 v; + v = UA_GET32(ip + m_len) ^ UA_GET32(m_pos + m_len); + if __lzo_unlikely(v == 0) { + do { + m_len += 4; + v = UA_GET32(ip + m_len) ^ UA_GET32(m_pos + m_len); + if __lzo_unlikely(ip + m_len >= ip_end) + goto m_len_done; + } while (v == 0); + } +#if (LZO_ABI_LITTLE_ENDIAN) && defined(lzo_bitops_ctz32) + m_len += lzo_bitops_ctz32(v) / CHAR_BIT; +#elif (LZO_ABI_LITTLE_ENDIAN) + if ((v & UCHAR_MAX) == 0) do { + v >>= CHAR_BIT; + m_len += 1; + } while ((v & UCHAR_MAX) == 0); +#else + if (ip[m_len] == m_pos[m_len]) do { + m_len += 1; + } while (ip[m_len] == m_pos[m_len]); +#endif +#else + if __lzo_unlikely(ip[m_len] == m_pos[m_len]) { + do { + m_len += 1; + if __lzo_unlikely(ip + m_len >= ip_end) + goto m_len_done; + } while (ip[m_len] == m_pos[m_len]); + } +#endif + } +m_len_done: + m_off = pd(ip,m_pos); + ip += m_len; + ii = ip; + if (m_len <= M2_MAX_LEN && m_off <= M2_MAX_OFFSET) + { + m_off -= 1; +#if defined(LZO1X) + *op++ = LZO_BYTE(((m_len - 1) << 5) | ((m_off & 7) << 2)); + *op++ = LZO_BYTE(m_off >> 3); +#elif defined(LZO1Y) + *op++ = LZO_BYTE(((m_len + 1) << 4) | ((m_off & 3) << 2)); + *op++ = LZO_BYTE(m_off >> 2); +#endif + } + else if (m_off <= M3_MAX_OFFSET) + { + m_off -= 1; + if (m_len <= M3_MAX_LEN) *op++ = LZO_BYTE(M3_MARKER | (m_len - 2)); - goto m3_m4_offset; - } else -#if defined(LZO1X) { - m_off -= 0x4000; - assert(m_off > 0); assert(m_off <= 0x7fff); - *op++ = LZO_BYTE(M4_MARKER | - ((m_off & 0x4000) >> 11) | (m_len - 2)); - goto m3_m4_offset; - } -#elif defined(LZO1Y) - goto m4_match; + m_len -= M3_MAX_LEN; + *op++ = M3_MARKER | 0; + while __lzo_unlikely(m_len > 255) + { + m_len -= 255; +#if 1 && (LZO_CC_MSC && (_MSC_VER >= 1400)) + * (volatile unsigned char *) op++ = 0; +#else + *op++ = 0; #endif + } + *op++ = LZO_BYTE(m_len); + } + *op++ = LZO_BYTE(m_off << 2); + *op++ = LZO_BYTE(m_off >> 6); } else { - { - const lzo_bytep end = in_end; - const lzo_bytep m = m_pos + M2_MAX_LEN + 1; - while (ip < end && *m == *ip) - m++, ip++; - m_len = pd(ip, ii); - } - assert(m_len > M2_MAX_LEN); - - if (m_off <= M3_MAX_OFFSET) - { - m_off -= 1; - if (m_len <= 33) - *op++ = LZO_BYTE(M3_MARKER | (m_len - 2)); - else - { - m_len -= 33; - *op++ = M3_MARKER | 0; - goto m3_m4_len; - } - } + m_off -= 0x4000; + if (m_len <= M4_MAX_LEN) + *op++ = LZO_BYTE(M4_MARKER | ((m_off >> 11) & 8) | (m_len - 2)); else { -#if defined(LZO1Y) -m4_match: -#endif - m_off -= 0x4000; - assert(m_off > 0); assert(m_off <= 0x7fff); - if (m_len <= M4_MAX_LEN) - *op++ = LZO_BYTE(M4_MARKER | - ((m_off & 0x4000) >> 11) | (m_len - 2)); - else + m_len -= M4_MAX_LEN; + *op++ = LZO_BYTE(M4_MARKER | ((m_off >> 11) & 8)); + while __lzo_unlikely(m_len > 255) { - m_len -= M4_MAX_LEN; - *op++ = LZO_BYTE(M4_MARKER | ((m_off & 0x4000) >> 11)); -m3_m4_len: - while (m_len > 255) - { - m_len -= 255; - *op++ = 0; - } - assert(m_len > 0); - *op++ = LZO_BYTE(m_len); + m_len -= 255; +#if 1 && (LZO_CC_MSC && (_MSC_VER >= 1400)) + * (volatile unsigned char *) op++ = 0; +#else + *op++ = 0; +#endif } + *op++ = LZO_BYTE(m_len); } - -m3_m4_offset: - *op++ = LZO_BYTE((m_off & 63) << 2); + *op++ = LZO_BYTE(m_off << 2); *op++ = LZO_BYTE(m_off >> 6); } - -#if 0 -match_done: -#endif - ii = ip; - if __lzo_unlikely(ip >= ip_end) - break; + goto next; } *out_len = pd(op, out); @@ -3161,16 +3436,30 @@ DO_COMPRESS ( const lzo_bytep in , lzo_uint in_len, lzo_bytep out, lzo_uintp out_len, lzo_voidp wrkmem ) { + const lzo_bytep ip = in; lzo_bytep op = out; - lzo_uint t; + lzo_uint l = in_len; + lzo_uint t = 0; - if __lzo_unlikely(in_len <= M2_MAX_LEN + 5) - t = in_len; - else + while (l > 20) { - t = do_compress(in,in_len,op,out_len,wrkmem); + lzo_uint ll = l; + lzo_uintptr_t ll_end; +#if 0 || (LZO_DETERMINISTIC) + ll = LZO_MIN(ll, 49152); +#endif + ll_end = (lzo_uintptr_t)ip + ll; + if ((ll_end + ((t + ll) >> 5)) <= ll_end || (const lzo_bytep)(ll_end + ((t + ll) >> 5)) <= ip + ll) + break; +#if (LZO_DETERMINISTIC) + lzo_memset(wrkmem, 0, ((lzo_uint)1 << D_BITS) * sizeof(lzo_dict_t)); +#endif + t = do_compress(ip,ll,op,out_len,t,wrkmem); + ip += ll; op += *out_len; + l -= ll; } + t += l; if (t > 0) { @@ -3190,7 +3479,12 @@ DO_COMPRESS ( const lzo_bytep in , lzo_uint in_len, while (tt > 255) { tt -= 255; +#if 1 && (LZO_CC_MSC && (_MSC_VER >= 1400)) + + * (volatile unsigned char *) op++ = 0; +#else *op++ = 0; +#endif } assert(tt > 0); *op++ = LZO_BYTE(tt); @@ -3381,19 +3675,36 @@ DO_DECOMPRESS ( const lzo_bytep in , lzo_uint in_len, t += 15 + *ip++; } assert(t > 0); NEED_OP(t+3); NEED_IP(t+4); -#if defined(LZO_UNALIGNED_OK_4) || defined(LZO_ALIGNED_OK_4) +#if defined(LZO_UNALIGNED_OK_8) && defined(LZO_UNALIGNED_OK_4) + t += 3; + if (t >= 8) do + { + UA_COPY64(op,ip); + op += 8; ip += 8; t -= 8; + } while (t >= 8); + if (t >= 4) + { + UA_COPY32(op,ip); + op += 4; ip += 4; t -= 4; + } + if (t > 0) + { + *op++ = *ip++; + if (t > 1) { *op++ = *ip++; if (t > 2) { *op++ = *ip++; } } + } +#elif defined(LZO_UNALIGNED_OK_4) || defined(LZO_ALIGNED_OK_4) #if !defined(LZO_UNALIGNED_OK_4) if (PTR_ALIGNED2_4(op,ip)) { #endif - COPY4(op,ip); + UA_COPY32(op,ip); op += 4; ip += 4; if (--t > 0) { if (t >= 4) { do { - COPY4(op,ip); + UA_COPY32(op,ip); op += 4; ip += 4; t -= 4; } while (t >= 4); if (t > 0) do *op++ = *ip++; while (--t > 0); @@ -3406,7 +3717,7 @@ DO_DECOMPRESS ( const lzo_bytep in , lzo_uint in_len, else #endif #endif -#if !defined(LZO_UNALIGNED_OK_4) +#if !defined(LZO_UNALIGNED_OK_4) && !defined(LZO_UNALIGNED_OK_8) { *op++ = *ip++; *op++ = *ip++; *op++ = *ip++; do *op++ = *ip++; while (--t > 0); @@ -3527,7 +3838,7 @@ match: } #elif defined(LZO_UNALIGNED_OK_2) && defined(LZO_ABI_LITTLE_ENDIAN) m_pos = op - 1; - m_pos -= (* (const lzo_ushortp) (const lzo_voidp) ip) >> 2; + m_pos -= UA_GET16(ip) >> 2; #else m_pos = op - 1; m_pos -= (ip[0] >> 2) + (ip[1] << 6); @@ -3572,7 +3883,7 @@ match: #if defined(LZO1Z) m_pos -= (ip[0] << 6) + (ip[1] >> 2); #elif defined(LZO_UNALIGNED_OK_2) && defined(LZO_ABI_LITTLE_ENDIAN) - m_pos -= (* (const lzo_ushortp) (const lzo_voidp) ip) >> 2; + m_pos -= UA_GET16(ip) >> 2; #else m_pos -= (ip[0] >> 2) + (ip[1] << 6); #endif @@ -3620,7 +3931,28 @@ match: #else TEST_LB(m_pos); assert(t > 0); NEED_OP(t+3-1); -#if defined(LZO_UNALIGNED_OK_4) || defined(LZO_ALIGNED_OK_4) +#if defined(LZO_UNALIGNED_OK_8) && defined(LZO_UNALIGNED_OK_4) + if (op - m_pos >= 8) + { + t += (3 - 1); + if (t >= 8) do + { + UA_COPY64(op,m_pos); + op += 8; m_pos += 8; t -= 8; + } while (t >= 8); + if (t >= 4) + { + UA_COPY32(op,m_pos); + op += 4; m_pos += 4; t -= 4; + } + if (t > 0) + { + *op++ = m_pos[0]; + if (t > 1) { *op++ = m_pos[1]; if (t > 2) { *op++ = m_pos[2]; } } + } + } + else +#elif defined(LZO_UNALIGNED_OK_4) || defined(LZO_ALIGNED_OK_4) #if !defined(LZO_UNALIGNED_OK_4) if (t >= 2 * 4 - (3 - 1) && PTR_ALIGNED2_4(op,m_pos)) { @@ -3629,10 +3961,10 @@ match: if (t >= 2 * 4 - (3 - 1) && (op - m_pos) >= 4) { #endif - COPY4(op,m_pos); + UA_COPY32(op,m_pos); op += 4; m_pos += 4; t -= 4 - (3 - 1); do { - COPY4(op,m_pos); + UA_COPY32(op,m_pos); op += 4; m_pos += 4; t -= 4; } while (t >= 4); if (t > 0) do *op++ = *m_pos++; while (--t > 0); @@ -3869,19 +4201,36 @@ DO_DECOMPRESS ( const lzo_bytep in , lzo_uint in_len, t += 15 + *ip++; } assert(t > 0); NEED_OP(t+3); NEED_IP(t+4); -#if defined(LZO_UNALIGNED_OK_4) || defined(LZO_ALIGNED_OK_4) +#if defined(LZO_UNALIGNED_OK_8) && defined(LZO_UNALIGNED_OK_4) + t += 3; + if (t >= 8) do + { + UA_COPY64(op,ip); + op += 8; ip += 8; t -= 8; + } while (t >= 8); + if (t >= 4) + { + UA_COPY32(op,ip); + op += 4; ip += 4; t -= 4; + } + if (t > 0) + { + *op++ = *ip++; + if (t > 1) { *op++ = *ip++; if (t > 2) { *op++ = *ip++; } } + } +#elif defined(LZO_UNALIGNED_OK_4) || defined(LZO_ALIGNED_OK_4) #if !defined(LZO_UNALIGNED_OK_4) if (PTR_ALIGNED2_4(op,ip)) { #endif - COPY4(op,ip); + UA_COPY32(op,ip); op += 4; ip += 4; if (--t > 0) { if (t >= 4) { do { - COPY4(op,ip); + UA_COPY32(op,ip); op += 4; ip += 4; t -= 4; } while (t >= 4); if (t > 0) do *op++ = *ip++; while (--t > 0); @@ -3894,7 +4243,7 @@ DO_DECOMPRESS ( const lzo_bytep in , lzo_uint in_len, else #endif #endif -#if !defined(LZO_UNALIGNED_OK_4) +#if !defined(LZO_UNALIGNED_OK_4) && !defined(LZO_UNALIGNED_OK_8) { *op++ = *ip++; *op++ = *ip++; *op++ = *ip++; do *op++ = *ip++; while (--t > 0); @@ -4015,7 +4364,7 @@ match: } #elif defined(LZO_UNALIGNED_OK_2) && defined(LZO_ABI_LITTLE_ENDIAN) m_pos = op - 1; - m_pos -= (* (const lzo_ushortp) (const lzo_voidp) ip) >> 2; + m_pos -= UA_GET16(ip) >> 2; #else m_pos = op - 1; m_pos -= (ip[0] >> 2) + (ip[1] << 6); @@ -4060,7 +4409,7 @@ match: #if defined(LZO1Z) m_pos -= (ip[0] << 6) + (ip[1] >> 2); #elif defined(LZO_UNALIGNED_OK_2) && defined(LZO_ABI_LITTLE_ENDIAN) - m_pos -= (* (const lzo_ushortp) (const lzo_voidp) ip) >> 2; + m_pos -= UA_GET16(ip) >> 2; #else m_pos -= (ip[0] >> 2) + (ip[1] << 6); #endif @@ -4108,7 +4457,28 @@ match: #else TEST_LB(m_pos); assert(t > 0); NEED_OP(t+3-1); -#if defined(LZO_UNALIGNED_OK_4) || defined(LZO_ALIGNED_OK_4) +#if defined(LZO_UNALIGNED_OK_8) && defined(LZO_UNALIGNED_OK_4) + if (op - m_pos >= 8) + { + t += (3 - 1); + if (t >= 8) do + { + UA_COPY64(op,m_pos); + op += 8; m_pos += 8; t -= 8; + } while (t >= 8); + if (t >= 4) + { + UA_COPY32(op,m_pos); + op += 4; m_pos += 4; t -= 4; + } + if (t > 0) + { + *op++ = m_pos[0]; + if (t > 1) { *op++ = m_pos[1]; if (t > 2) { *op++ = m_pos[2]; } } + } + } + else +#elif defined(LZO_UNALIGNED_OK_4) || defined(LZO_ALIGNED_OK_4) #if !defined(LZO_UNALIGNED_OK_4) if (t >= 2 * 4 - (3 - 1) && PTR_ALIGNED2_4(op,m_pos)) { @@ -4117,10 +4487,10 @@ match: if (t >= 2 * 4 - (3 - 1) && (op - m_pos) >= 4) { #endif - COPY4(op,m_pos); + UA_COPY32(op,m_pos); op += 4; m_pos += 4; t -= 4 - (3 - 1); do { - COPY4(op,m_pos); + UA_COPY32(op,m_pos); op += 4; m_pos += 4; t -= 4; } while (t >= 4); if (t > 0) do *op++ = *m_pos++; while (--t > 0); diff --git a/harbour/contrib/hbmlzo/3rd/minilzo/minilzo.h b/harbour/contrib/hbmlzo/3rd/minilzo/minilzo.h index bd8ad65ada..74fefa9fe2 100644 --- a/harbour/contrib/hbmlzo/3rd/minilzo/minilzo.h +++ b/harbour/contrib/hbmlzo/3rd/minilzo/minilzo.h @@ -2,6 +2,7 @@ This file is part of the LZO real-time data compression library. + Copyright (C) 2011 Markus Franz Xaver Johannes Oberhumer Copyright (C) 2010 Markus Franz Xaver Johannes Oberhumer Copyright (C) 2009 Markus Franz Xaver Johannes Oberhumer Copyright (C) 2008 Markus Franz Xaver Johannes Oberhumer @@ -49,7 +50,7 @@ #ifndef __MINILZO_H #define __MINILZO_H 1 -#define MINILZO_VERSION 0x2040 +#define MINILZO_VERSION 0x2050 #ifdef __LZOCONF_H # error "you cannot use both LZO and miniLZO" diff --git a/harbour/contrib/hbmlzo/3rd/minilzo/minilzo.hbp b/harbour/contrib/hbmlzo/3rd/minilzo/minilzo.hbp index 242143d5f4..a4b8849eda 100644 --- a/harbour/contrib/hbmlzo/3rd/minilzo/minilzo.hbp +++ b/harbour/contrib/hbmlzo/3rd/minilzo/minilzo.hbp @@ -13,8 +13,8 @@ minilzo.c # ORIGIN http://www.oberhumer.com/opensource/lzo/ -# VER 2.04 -# URL http://www.oberhumer.com/opensource/lzo/download/minilzo-2.04.tar.gz +# VER 2.05 +# URL http://www.oberhumer.com/opensource/lzo/download/minilzo-2.05.tar.gz # DIFF # # MAP COPYING diff --git a/harbour/contrib/hbqt/qtsql/hbqtsql.hbc b/harbour/contrib/hbqt/qtsql/hbqtsql.hbc index de807e0e88..14764b2bad 100644 --- a/harbour/contrib/hbqt/qtsql/hbqtsql.hbc +++ b/harbour/contrib/hbqt/qtsql/hbqtsql.hbc @@ -18,6 +18,3 @@ libs=../qtcore/hbqtcore.hbc {HB_STATIC_QT&allwin}libs=${_HB_DYNPREF}${hb_name}s${_HB_DYNSUFF} {HB_STATIC_QT&linux|beos}libs=${_HB_DYNPREF}${hb_name}${_HB_DYNSUFF} {HB_STATIC_QT&(allwin|linux|beos)}libs=QtSql - -gui=yes -gt=gtnul diff --git a/harbour/contrib/hbqt/qtsql/hbqtsql.hbm b/harbour/contrib/hbqt/qtsql/hbqtsql.hbm index 78791f8d2f..c55037af67 100644 --- a/harbour/contrib/hbqt/qtsql/hbqtsql.hbm +++ b/harbour/contrib/hbqt/qtsql/hbqtsql.hbm @@ -8,5 +8,4 @@ qth/filelist.hbm hbqtsql.hbx - ../qtcore/hbqtcore.hbc diff --git a/harbour/contrib/hbqt/qtsql/qth/QSqlDatabase.qth b/harbour/contrib/hbqt/qtsql/qth/QSqlDatabase.qth index e0e9bd0e30..370c72f679 100644 --- a/harbour/contrib/hbqt/qtsql/qth/QSqlDatabase.qth +++ b/harbour/contrib/hbqt/qtsql/qth/QSqlDatabase.qth @@ -56,9 +56,9 @@ QObject = no -Inherit = -Type = -New = +Inherit = +Type = +New = @@ -133,6 +133,3 @@ void removeDatabase ( const QString & connectionName ) - - - diff --git a/harbour/contrib/hbqt/qtsql/qth/QSqlDriver.qth b/harbour/contrib/hbqt/qtsql/qth/QSqlDriver.qth index 9d837c42d4..188cbcb828 100644 --- a/harbour/contrib/hbqt/qtsql/qth/QSqlDriver.qth +++ b/harbour/contrib/hbqt/qtsql/qth/QSqlDriver.qth @@ -55,10 +55,10 @@ ; -QObject = +QObject = Inherit = QObject -Type = -New = +Type = +New = @@ -117,6 +117,3 @@ void notification ( const QString & name ) - - - diff --git a/harbour/contrib/hbqt/qtsql/qth/QSqlError.qth b/harbour/contrib/hbqt/qtsql/qth/QSqlError.qth index 297e5d9e58..655a75739c 100644 --- a/harbour/contrib/hbqt/qtsql/qth/QSqlError.qth +++ b/harbour/contrib/hbqt/qtsql/qth/QSqlError.qth @@ -56,9 +56,9 @@ QObject = no -Inherit = -Type = -New = +Inherit = +Type = +New = @@ -101,6 +101,3 @@ ErrorType type () const - - - diff --git a/harbour/contrib/hbqt/qtsql/qth/QSqlField.qth b/harbour/contrib/hbqt/qtsql/qth/QSqlField.qth index 2a13adda6d..4a9d4668bf 100644 --- a/harbour/contrib/hbqt/qtsql/qth/QSqlField.qth +++ b/harbour/contrib/hbqt/qtsql/qth/QSqlField.qth @@ -56,9 +56,9 @@ QObject = no -Inherit = -Type = -New = +Inherit = +Type = +New = @@ -115,6 +115,3 @@ QVariant value () cons - - - diff --git a/harbour/contrib/hbqt/qtsql/qth/QSqlIndex.qth b/harbour/contrib/hbqt/qtsql/qth/QSqlIndex.qth index 51a99069fc..eb675b6311 100644 --- a/harbour/contrib/hbqt/qtsql/qth/QSqlIndex.qth +++ b/harbour/contrib/hbqt/qtsql/qth/QSqlIndex.qth @@ -57,8 +57,8 @@ QObject = no Inherit = QSqlRecord -Type = -New = +Type = +New = @@ -98,6 +98,3 @@ void setName ( const QString & name ) - - - diff --git a/harbour/contrib/hbqt/qtsql/qth/QSqlQuery.qth b/harbour/contrib/hbqt/qtsql/qth/QSqlQuery.qth index 31caafe7f4..a91cdffcd4 100644 --- a/harbour/contrib/hbqt/qtsql/qth/QSqlQuery.qth +++ b/harbour/contrib/hbqt/qtsql/qth/QSqlQuery.qth @@ -56,9 +56,9 @@ QObject = no -Inherit = -Type = -New = +Inherit = +Type = +New = @@ -147,6 +147,3 @@ QVariant value ( int index ) const - - - diff --git a/harbour/contrib/hbqt/qtsql/qth/QSqlQueryModel.qth b/harbour/contrib/hbqt/qtsql/qth/QSqlQueryModel.qth index a29ece4bc5..e25aa217c9 100644 --- a/harbour/contrib/hbqt/qtsql/qth/QSqlQueryModel.qth +++ b/harbour/contrib/hbqt/qtsql/qth/QSqlQueryModel.qth @@ -55,10 +55,10 @@ ; -QObject = +QObject = Inherit = QAbstractTableModel -Type = -New = +Type = +New = @@ -71,7 +71,7 @@ New = /* * QSqlQueryModel ( QObject * parent = 0 ) * virtual ~QSqlQueryModel () - * + * */ HB_FUNC( QT_QSQLQUERYMODEL ) { @@ -108,6 +108,3 @@ void setQuery ( const QString & query, const QSqlDatabase & db = QSqlDatabase() - - - diff --git a/harbour/contrib/hbqt/qtsql/qth/QSqlRecord.qth b/harbour/contrib/hbqt/qtsql/qth/QSqlRecord.qth index 0ddbb52bc0..79e5869bc6 100644 --- a/harbour/contrib/hbqt/qtsql/qth/QSqlRecord.qth +++ b/harbour/contrib/hbqt/qtsql/qth/QSqlRecord.qth @@ -56,9 +56,9 @@ QObject = no -Inherit = -Type = -New = +Inherit = +Type = +New = @@ -115,6 +115,3 @@ QVariant value ( const QString & name ) const - - - diff --git a/harbour/contrib/hbqt/qtsql/qth/QSqlRelationalTableModel.qth b/harbour/contrib/hbqt/qtsql/qth/QSqlRelationalTableModel.qth index a05b692dbc..700028845f 100644 --- a/harbour/contrib/hbqt/qtsql/qth/QSqlRelationalTableModel.qth +++ b/harbour/contrib/hbqt/qtsql/qth/QSqlRelationalTableModel.qth @@ -55,10 +55,10 @@ ; -QObject = +QObject = Inherit = QSqlTableModel -Type = -New = +Type = +New = @@ -94,6 +94,3 @@ virtual void setRelation ( int column, const QSqlRelation & relation ) - - - diff --git a/harbour/contrib/hbqt/qtsql/qth/QSqlResult.qth b/harbour/contrib/hbqt/qtsql/qth/QSqlResult.qth index 52da406cf9..c36064172f 100644 --- a/harbour/contrib/hbqt/qtsql/qth/QSqlResult.qth +++ b/harbour/contrib/hbqt/qtsql/qth/QSqlResult.qth @@ -56,9 +56,9 @@ QObject = no -Inherit = -Type = -New = +Inherit = +Type = +New = @@ -66,7 +66,7 @@ New = /* - * + * */ HB_FUNC( QT_QSQLRESULT ) { @@ -89,6 +89,3 @@ virtual QVariant handle () const - - - diff --git a/harbour/contrib/hbqt/qtsql/qth/QSqlTableModel.qth b/harbour/contrib/hbqt/qtsql/qth/QSqlTableModel.qth index e11bca6913..731238106b 100644 --- a/harbour/contrib/hbqt/qtsql/qth/QSqlTableModel.qth +++ b/harbour/contrib/hbqt/qtsql/qth/QSqlTableModel.qth @@ -55,10 +55,10 @@ ; -QObject = +QObject = Inherit = QSqlQueryModel -Type = -New = +Type = +New = @@ -119,6 +119,3 @@ void primeInsert ( int row, QSqlRecord & record ) - - - diff --git a/harbour/contrib/hbqt/qtsql/qth/filelist.hbm b/harbour/contrib/hbqt/qtsql/qth/filelist.hbm index 5e050e8dff..b7dded9e42 100644 --- a/harbour/contrib/hbqt/qtsql/qth/filelist.hbm +++ b/harbour/contrib/hbqt/qtsql/qth/filelist.hbm @@ -7,16 +7,13 @@ -pflag=-qthdocdir=../doc/ QSqlDatabase.qth -QSqlQuery.qth -QSqlError.qth -QSqlIndex.qth -QSqlRecord.qth QSqlDriver.qth -QSqlResult.qth +QSqlError.qth QSqlField.qth +QSqlIndex.qth +QSqlQuery.qth QSqlQueryModel.qth -QSqlTableModel.qth +QSqlRecord.qth QSqlRelationalTableModel.qth - - - +QSqlResult.qth +QSqlTableModel.qth diff --git a/harbour/utils/hbmk2/hbmk2.prg b/harbour/utils/hbmk2/hbmk2.prg index 58ae5e2da8..f230117f66 100644 --- a/harbour/utils/hbmk2/hbmk2.prg +++ b/harbour/utils/hbmk2/hbmk2.prg @@ -863,6 +863,7 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel ) LOCAL cCommand LOCAL aCommand LOCAL cOpt_CompC + LOCAL cOpt_CompCPass LOCAL cOpt_CompCLoop LOCAL cOpt_Link LOCAL cOpt_Res @@ -5919,22 +5920,23 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel ) /* Order is significant */ tmp4 := iif( tmp3 == _CCOMP_PASS_C .AND. ( hbmk[ _HBMK_lCPP ] == NIL .OR. ! hbmk[ _HBMK_lCPP ] ), hbmk[ _HBMK_aOPTCX ], hbmk[ _HBMK_aOPTCPPX ] ) - cOpt_CompC := StrTran( cOpt_CompC, "{FC}" , iif( hbmk[ _HBMK_lBLDFLGC ], hb_Version( HB_VERSION_FLAG_C ) + " ", "" ) +; - GetEnv( "HB_USER_CFLAGS" ) +; - iif( ! Empty( hbmk[ _HBMK_aOPTC ] ), " " + ArrayToList( hbmk[ _HBMK_aOPTC ] ), "" ) +; - iif( ! Empty( tmp4 ), " " + ArrayToList( tmp4 ), "" ) +; - iif( ! Empty( hbmk[ _HBMK_aOPTCUSER ] ), " " + ArrayToList( hbmk[ _HBMK_aOPTCUSER ] ), "" ) ) - cOpt_CompC := StrTran( cOpt_CompC, "{OD}" , FNameEscape( hb_FNameDir( hbmk[ _HBMK_cPROGNAME ] ), nOpt_Esc, nOpt_FNF ) ) - cOpt_CompC := StrTran( cOpt_CompC, "{DI}" , FNameEscape( l_cHB_INSTALL_INC, nOpt_Esc, nOpt_FNF ) ) + cOpt_CompCPass := cOpt_CompC + cOpt_CompCPass := StrTran( cOpt_CompCPass, "{FC}" , iif( hbmk[ _HBMK_lBLDFLGC ], hb_Version( HB_VERSION_FLAG_C ) + " ", "" ) +; + GetEnv( "HB_USER_CFLAGS" ) +; + iif( ! Empty( hbmk[ _HBMK_aOPTC ] ), " " + ArrayToList( hbmk[ _HBMK_aOPTC ] ), "" ) +; + iif( ! Empty( tmp4 ), " " + ArrayToList( tmp4 ), "" ) +; + iif( ! Empty( hbmk[ _HBMK_aOPTCUSER ] ), " " + ArrayToList( hbmk[ _HBMK_aOPTCUSER ] ), "" ) ) + cOpt_CompCPass := StrTran( cOpt_CompCPass, "{OD}" , FNameEscape( hb_FNameDir( hbmk[ _HBMK_cPROGNAME ] ), nOpt_Esc, nOpt_FNF ) ) + cOpt_CompCPass := StrTran( cOpt_CompCPass, "{DI}" , FNameEscape( l_cHB_INSTALL_INC, nOpt_Esc, nOpt_FNF ) ) - IF "{IC}" $ cOpt_CompC + IF "{IC}" $ cOpt_CompCPass aThreads := {} FOR EACH aTO_DO IN ArraySplit( l_aCGEN_TO_DO, l_nJOBS ) IF hb_mtvm() .AND. Len( aTO_DO:__enumBase() ) > 1 - AAdd( aThreads, hb_threadStart( @CompileCLoop(), hbmk, aTO_DO, cBin_CompCGEN, cOpt_CompC, cObjExt, nOpt_Esc, nOpt_FNF, aTO_DO:__enumIndex(), Len( aTO_DO:__enumBase() ) ) ) + AAdd( aThreads, hb_threadStart( @CompileCLoop(), hbmk, aTO_DO, cBin_CompCGEN, cOpt_CompCPass, cObjExt, nOpt_Esc, nOpt_FNF, aTO_DO:__enumIndex(), Len( aTO_DO:__enumBase() ) ) ) ELSE - IF ! CompileCLoop( hbmk, aTO_DO, cBin_CompCGEN, cOpt_CompC, cObjExt, nOpt_Esc, nOpt_FNF, 0, 0 ) + IF ! CompileCLoop( hbmk, aTO_DO, cBin_CompCGEN, cOpt_CompCPass, cObjExt, nOpt_Esc, nOpt_FNF, 0, 0 ) IF ! hbmk[ _HBMK_lIGNOREERROR ] hbmk[ _HBMK_nErrorLevel ] := _ERRLEV_COMPC EXIT @@ -5954,8 +5956,8 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel ) NEXT ENDIF ELSE - cOpt_CompC := StrTran( cOpt_CompC, "{OO}" , FNameEscape( hb_FNameExtSet( hbmk[ _HBMK_cPROGNAME ], cObjExt ), nOpt_Esc, nOpt_FNF ) ) - cOpt_CompC := StrTran( cOpt_CompC, "{OW}" , FNameEscape( hbmk[ _HBMK_cWorkDir ], nOpt_Esc, nOpt_FNF ) ) + cOpt_CompCPass := StrTran( cOpt_CompCPass, "{OO}" , FNameEscape( hb_FNameExtSet( hbmk[ _HBMK_cPROGNAME ], cObjExt ), nOpt_Esc, nOpt_FNF ) ) + cOpt_CompCPass := StrTran( cOpt_CompCPass, "{OW}" , FNameEscape( hbmk[ _HBMK_cWorkDir ], nOpt_Esc, nOpt_FNF ) ) IF lCHD_Comp tmp2 := hb_DirSepAdd( hb_PathRelativize( hb_PathNormalize( PathMakeAbsolute( hbmk[ _HBMK_cWorkDir ], hb_cwd() ) ), hb_cwd(), .T. ) ) @@ -5979,9 +5981,9 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel ) FOR EACH tmp1 IN tmp tmp1 := hb_PathNormalize( PathMakeAbsolute( tmp1, tmp2 ) ) NEXT - cOpt_CompCLoop := AllTrim( StrTran( cOpt_CompC, "{LC}" , ArrayToList( tmp,, nOpt_Esc, nOpt_FNF ) ) ) + cOpt_CompCLoop := AllTrim( StrTran( cOpt_CompCPass, "{LC}" , ArrayToList( tmp,, nOpt_Esc, nOpt_FNF ) ) ) ELSE - cOpt_CompCLoop := AllTrim( StrTran( cOpt_CompC, "{LC}" , ArrayToList( aTO_DO,, nOpt_Esc, nOpt_FNF ) ) ) + cOpt_CompCLoop := AllTrim( StrTran( cOpt_CompCPass, "{LC}" , ArrayToList( aTO_DO,, nOpt_Esc, nOpt_FNF ) ) ) ENDIF /* Handle moving the whole command line to a script, if requested. */