diff options
author | iddqd <iddqd@yandex-team.com> | 2024-06-07 13:22:53 +0300 |
---|---|---|
committer | iddqd <iddqd@yandex-team.com> | 2024-06-07 13:41:05 +0300 |
commit | 89aed776bc90bfaf56bab8fb2d4cd1a47a6c8c86 (patch) | |
tree | e209172bf3b27e9063a2f3f11020ea4586c11e56 | |
parent | 327232940ecda2082cbcd9551049456522bbaffe (diff) | |
download | ydb-89aed776bc90bfaf56bab8fb2d4cd1a47a6c8c86.tar.gz |
Revert commit rXXXXXX, temporary add library/cpp/streams/factory/open_by_signature to export
6c14e61e6b845e2aa92a25daf61de10267e9e8a0
93 files changed, 0 insertions, 15044 deletions
diff --git a/contrib/libs/minilzo/lzo_crc.c b/contrib/libs/minilzo/lzo_crc.c deleted file mode 100644 index 19e40239df..0000000000 --- a/contrib/libs/minilzo/lzo_crc.c +++ /dev/null @@ -1,154 +0,0 @@ -/* lzo_crc.c -- crc checksum for the the LZO library - - This file is part of the LZO real-time data compression library. - - Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer - All Rights Reserved. - - The LZO library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of - the License, or (at your option) any later version. - - The LZO library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - 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 the LZO library; see the file COPYING. - If not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - Markus F.X.J. Oberhumer - <markus@oberhumer.com> - http://www.oberhumer.com/opensource/lzo/ - */ - - -#include "protect.h" -#include "lzoconf.h" - - -/*********************************************************************** -// crc32 checksum -// adapted from free code by Mark Adler <madler@alumni.caltech.edu> -// see http://www.zlib.org/ -************************************************************************/ - -static const lzo_uint32_t lzo_crc32_table[256] = { - 0x00000000L, 0x77073096L, 0xee0e612cL, 0x990951baL, 0x076dc419L, - 0x706af48fL, 0xe963a535L, 0x9e6495a3L, 0x0edb8832L, 0x79dcb8a4L, - 0xe0d5e91eL, 0x97d2d988L, 0x09b64c2bL, 0x7eb17cbdL, 0xe7b82d07L, - 0x90bf1d91L, 0x1db71064L, 0x6ab020f2L, 0xf3b97148L, 0x84be41deL, - 0x1adad47dL, 0x6ddde4ebL, 0xf4d4b551L, 0x83d385c7L, 0x136c9856L, - 0x646ba8c0L, 0xfd62f97aL, 0x8a65c9ecL, 0x14015c4fL, 0x63066cd9L, - 0xfa0f3d63L, 0x8d080df5L, 0x3b6e20c8L, 0x4c69105eL, 0xd56041e4L, - 0xa2677172L, 0x3c03e4d1L, 0x4b04d447L, 0xd20d85fdL, 0xa50ab56bL, - 0x35b5a8faL, 0x42b2986cL, 0xdbbbc9d6L, 0xacbcf940L, 0x32d86ce3L, - 0x45df5c75L, 0xdcd60dcfL, 0xabd13d59L, 0x26d930acL, 0x51de003aL, - 0xc8d75180L, 0xbfd06116L, 0x21b4f4b5L, 0x56b3c423L, 0xcfba9599L, - 0xb8bda50fL, 0x2802b89eL, 0x5f058808L, 0xc60cd9b2L, 0xb10be924L, - 0x2f6f7c87L, 0x58684c11L, 0xc1611dabL, 0xb6662d3dL, 0x76dc4190L, - 0x01db7106L, 0x98d220bcL, 0xefd5102aL, 0x71b18589L, 0x06b6b51fL, - 0x9fbfe4a5L, 0xe8b8d433L, 0x7807c9a2L, 0x0f00f934L, 0x9609a88eL, - 0xe10e9818L, 0x7f6a0dbbL, 0x086d3d2dL, 0x91646c97L, 0xe6635c01L, - 0x6b6b51f4L, 0x1c6c6162L, 0x856530d8L, 0xf262004eL, 0x6c0695edL, - 0x1b01a57bL, 0x8208f4c1L, 0xf50fc457L, 0x65b0d9c6L, 0x12b7e950L, - 0x8bbeb8eaL, 0xfcb9887cL, 0x62dd1ddfL, 0x15da2d49L, 0x8cd37cf3L, - 0xfbd44c65L, 0x4db26158L, 0x3ab551ceL, 0xa3bc0074L, 0xd4bb30e2L, - 0x4adfa541L, 0x3dd895d7L, 0xa4d1c46dL, 0xd3d6f4fbL, 0x4369e96aL, - 0x346ed9fcL, 0xad678846L, 0xda60b8d0L, 0x44042d73L, 0x33031de5L, - 0xaa0a4c5fL, 0xdd0d7cc9L, 0x5005713cL, 0x270241aaL, 0xbe0b1010L, - 0xc90c2086L, 0x5768b525L, 0x206f85b3L, 0xb966d409L, 0xce61e49fL, - 0x5edef90eL, 0x29d9c998L, 0xb0d09822L, 0xc7d7a8b4L, 0x59b33d17L, - 0x2eb40d81L, 0xb7bd5c3bL, 0xc0ba6cadL, 0xedb88320L, 0x9abfb3b6L, - 0x03b6e20cL, 0x74b1d29aL, 0xead54739L, 0x9dd277afL, 0x04db2615L, - 0x73dc1683L, 0xe3630b12L, 0x94643b84L, 0x0d6d6a3eL, 0x7a6a5aa8L, - 0xe40ecf0bL, 0x9309ff9dL, 0x0a00ae27L, 0x7d079eb1L, 0xf00f9344L, - 0x8708a3d2L, 0x1e01f268L, 0x6906c2feL, 0xf762575dL, 0x806567cbL, - 0x196c3671L, 0x6e6b06e7L, 0xfed41b76L, 0x89d32be0L, 0x10da7a5aL, - 0x67dd4accL, 0xf9b9df6fL, 0x8ebeeff9L, 0x17b7be43L, 0x60b08ed5L, - 0xd6d6a3e8L, 0xa1d1937eL, 0x38d8c2c4L, 0x4fdff252L, 0xd1bb67f1L, - 0xa6bc5767L, 0x3fb506ddL, 0x48b2364bL, 0xd80d2bdaL, 0xaf0a1b4cL, - 0x36034af6L, 0x41047a60L, 0xdf60efc3L, 0xa867df55L, 0x316e8eefL, - 0x4669be79L, 0xcb61b38cL, 0xbc66831aL, 0x256fd2a0L, 0x5268e236L, - 0xcc0c7795L, 0xbb0b4703L, 0x220216b9L, 0x5505262fL, 0xc5ba3bbeL, - 0xb2bd0b28L, 0x2bb45a92L, 0x5cb36a04L, 0xc2d7ffa7L, 0xb5d0cf31L, - 0x2cd99e8bL, 0x5bdeae1dL, 0x9b64c2b0L, 0xec63f226L, 0x756aa39cL, - 0x026d930aL, 0x9c0906a9L, 0xeb0e363fL, 0x72076785L, 0x05005713L, - 0x95bf4a82L, 0xe2b87a14L, 0x7bb12baeL, 0x0cb61b38L, 0x92d28e9bL, - 0xe5d5be0dL, 0x7cdcefb7L, 0x0bdbdf21L, 0x86d3d2d4L, 0xf1d4e242L, - 0x68ddb3f8L, 0x1fda836eL, 0x81be16cdL, 0xf6b9265bL, 0x6fb077e1L, - 0x18b74777L, 0x88085ae6L, 0xff0f6a70L, 0x66063bcaL, 0x11010b5cL, - 0x8f659effL, 0xf862ae69L, 0x616bffd3L, 0x166ccf45L, 0xa00ae278L, - 0xd70dd2eeL, 0x4e048354L, 0x3903b3c2L, 0xa7672661L, 0xd06016f7L, - 0x4969474dL, 0x3e6e77dbL, 0xaed16a4aL, 0xd9d65adcL, 0x40df0b66L, - 0x37d83bf0L, 0xa9bcae53L, 0xdebb9ec5L, 0x47b2cf7fL, 0x30b5ffe9L, - 0xbdbdf21cL, 0xcabac28aL, 0x53b39330L, 0x24b4a3a6L, 0xbad03605L, - 0xcdd70693L, 0x54de5729L, 0x23d967bfL, 0xb3667a2eL, 0xc4614ab8L, - 0x5d681b02L, 0x2a6f2b94L, 0xb40bbe37L, 0xc30c8ea1L, 0x5a05df1bL, - 0x2d02ef8dL -}; - - -LZO_PUBLIC(const lzo_uint32_tp) -lzo_get_crc32_table(void) -{ - return lzo_crc32_table; -} - - -#if 1 -#define LZO_DO1(buf,i) \ - crc = table[((unsigned)crc ^ buf[i]) & 0xff] ^ (crc >> 8) -#else -#define LZO_DO1(buf,i) \ - crc = table[(unsigned char)((unsigned char)crc ^ buf[i])] ^ (crc >> 8) -#endif -#define LZO_DO2(buf,i) LZO_DO1(buf,i); LZO_DO1(buf,i+1) -#define LZO_DO4(buf,i) LZO_DO2(buf,i); LZO_DO2(buf,i+2) -#define LZO_DO8(buf,i) LZO_DO4(buf,i); LZO_DO4(buf,i+4) -#define LZO_DO16(buf,i) LZO_DO8(buf,i); LZO_DO8(buf,i+8) - - -LZO_PUBLIC(lzo_uint32_t) -lzo_crc32(lzo_uint32_t c, const lzo_bytep buf, lzo_uint len) -{ - lzo_uint32_t crc; -#undef table -#if 1 -# define table lzo_crc32_table -#else - const lzo_uint32_t * table = lzo_crc32_table; -#endif - - if (buf == NULL) - return 0; - - crc = (c & LZO_UINT32_C(0xffffffff)) ^ LZO_UINT32_C(0xffffffff); - if (len >= 16) do - { - LZO_DO16(buf,0); - buf += 16; - len -= 16; - } while (len >= 16); - if (len != 0) do - { - LZO_DO1(buf,0); - buf += 1; - len -= 1; - } while (len > 0); - - return crc ^ LZO_UINT32_C(0xffffffff); -#undef table -} - -#undef LZO_DO1 -#undef LZO_DO2 -#undef LZO_DO4 -#undef LZO_DO8 -#undef LZO_DO16 - - -/* vim:set ts=4 sw=4 et: */ diff --git a/contrib/libs/minilzo/lzoconf.h b/contrib/libs/minilzo/lzoconf.h deleted file mode 100644 index c713c4291e..0000000000 --- a/contrib/libs/minilzo/lzoconf.h +++ /dev/null @@ -1,453 +0,0 @@ -/* lzoconf.h -- configuration of the LZO data compression library - - This file is part of the LZO real-time data compression library. - - Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer - All Rights Reserved. - - The LZO library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of - the License, or (at your option) any later version. - - The LZO library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - 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 the LZO library; see the file COPYING. - If not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - Markus F.X.J. Oberhumer - <markus@oberhumer.com> - http://www.oberhumer.com/opensource/lzo/ - */ - - -#ifndef __LZOCONF_H_INCLUDED -#define __LZOCONF_H_INCLUDED 1 - -#define LZO_VERSION 0x2090 -#define LZO_VERSION_STRING "2.09" -#define LZO_VERSION_DATE "Feb 04 2015" - -/* internal Autoconf configuration file - only used when building LZO */ -#if defined(LZO_HAVE_CONFIG_H) -#error # include <config.h> -#endif -#include <limits.h> -#include <stddef.h> - - -/*********************************************************************** -// LZO requires a conforming <limits.h> -************************************************************************/ - -#if !defined(CHAR_BIT) || (CHAR_BIT != 8) -# error "invalid CHAR_BIT" -#endif -#if !defined(UCHAR_MAX) || !defined(USHRT_MAX) || !defined(UINT_MAX) || !defined(ULONG_MAX) -# error "check your compiler installation" -#endif -#if (USHRT_MAX < 1) || (UINT_MAX < 1) || (ULONG_MAX < 1) -# error "your limits.h macros are broken" -#endif - -/* get OS and architecture defines */ -#ifndef __LZODEFS_H_INCLUDED -#include "lzodefs.h" -#endif - - -#ifdef __cplusplus -extern "C" { -#endif - - -/*********************************************************************** -// some core defines -************************************************************************/ - -/* memory checkers */ -#if !defined(__LZO_CHECKER) -# if defined(__BOUNDS_CHECKING_ON) -# define __LZO_CHECKER 1 -# elif defined(__CHECKER__) -# define __LZO_CHECKER 1 -# elif defined(__INSURE__) -# define __LZO_CHECKER 1 -# elif defined(__PURIFY__) -# define __LZO_CHECKER 1 -# endif -#endif - - -/*********************************************************************** -// integral and pointer types -************************************************************************/ - -/* lzo_uint must match size_t */ -#if !defined(LZO_UINT_MAX) -# if (LZO_ABI_LLP64) -# if (LZO_OS_WIN64) - typedef unsigned __int64 lzo_uint; - typedef __int64 lzo_int; -# define LZO_TYPEOF_LZO_INT LZO_TYPEOF___INT64 -# else - typedef lzo_ullong_t lzo_uint; - typedef lzo_llong_t lzo_int; -# define LZO_TYPEOF_LZO_INT LZO_TYPEOF_LONG_LONG -# endif -# define LZO_SIZEOF_LZO_INT 8 -# define LZO_UINT_MAX 0xffffffffffffffffull -# define LZO_INT_MAX 9223372036854775807LL -# define LZO_INT_MIN (-1LL - LZO_INT_MAX) -# elif (LZO_ABI_IP32L64) /* MIPS R5900 */ - typedef unsigned int lzo_uint; - typedef int lzo_int; -# define LZO_SIZEOF_LZO_INT LZO_SIZEOF_INT -# define LZO_TYPEOF_LZO_INT LZO_TYPEOF_INT -# define LZO_UINT_MAX UINT_MAX -# define LZO_INT_MAX INT_MAX -# define LZO_INT_MIN INT_MIN -# elif (ULONG_MAX >= LZO_0xffffffffL) - typedef unsigned long lzo_uint; - typedef long lzo_int; -# define LZO_SIZEOF_LZO_INT LZO_SIZEOF_LONG -# define LZO_TYPEOF_LZO_INT LZO_TYPEOF_LONG -# define LZO_UINT_MAX ULONG_MAX -# define LZO_INT_MAX LONG_MAX -# define LZO_INT_MIN LONG_MIN -# else -# error "lzo_uint" -# endif -#endif - -/* The larger type of lzo_uint and lzo_uint32_t. */ -#if (LZO_SIZEOF_LZO_INT >= 4) -# define lzo_xint lzo_uint -#else -# define lzo_xint lzo_uint32_t -#endif - -typedef int lzo_bool; - -/* sanity checks */ -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int) == LZO_SIZEOF_LZO_INT) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_uint) == LZO_SIZEOF_LZO_INT) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_xint) >= sizeof(lzo_uint)) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_xint) >= sizeof(lzo_uint32_t)) - -#ifndef __LZO_MMODEL -#define __LZO_MMODEL /*empty*/ -#endif - -/* no typedef here because of const-pointer issues */ -#define lzo_bytep unsigned char __LZO_MMODEL * -#define lzo_charp char __LZO_MMODEL * -#define lzo_voidp void __LZO_MMODEL * -#define lzo_shortp short __LZO_MMODEL * -#define lzo_ushortp unsigned short __LZO_MMODEL * -#define lzo_intp lzo_int __LZO_MMODEL * -#define lzo_uintp lzo_uint __LZO_MMODEL * -#define lzo_xintp lzo_xint __LZO_MMODEL * -#define lzo_voidpp lzo_voidp __LZO_MMODEL * -#define lzo_bytepp lzo_bytep __LZO_MMODEL * - -#define lzo_int8_tp lzo_int8_t __LZO_MMODEL * -#define lzo_uint8_tp lzo_uint8_t __LZO_MMODEL * -#define lzo_int16_tp lzo_int16_t __LZO_MMODEL * -#define lzo_uint16_tp lzo_uint16_t __LZO_MMODEL * -#define lzo_int32_tp lzo_int32_t __LZO_MMODEL * -#define lzo_uint32_tp lzo_uint32_t __LZO_MMODEL * -#if defined(lzo_int64_t) -#define lzo_int64_tp lzo_int64_t __LZO_MMODEL * -#define lzo_uint64_tp lzo_uint64_t __LZO_MMODEL * -#endif - -/* Older LZO versions used to support ancient systems and memory models - * such as 16-bit MSDOS with __huge pointers or Cray PVP, but these - * obsolete configurations are not supported any longer. - */ -#if defined(__LZO_MMODEL_HUGE) -#error "__LZO_MMODEL_HUGE memory model is unsupported" -#endif -#if (LZO_MM_PVP) -#error "LZO_MM_PVP memory model is unsupported" -#endif -#if (LZO_SIZEOF_INT < 4) -#error "LZO_SIZEOF_INT < 4 is unsupported" -#endif -#if (__LZO_UINTPTR_T_IS_POINTER) -#error "__LZO_UINTPTR_T_IS_POINTER is unsupported" -#endif -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(int) >= 4) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_uint) >= 4) -/* Strange configurations where sizeof(lzo_uint) != sizeof(size_t) should - * work but have not received much testing lately, so be strict here. - */ -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_uint) == sizeof(size_t)) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_uint) == sizeof(ptrdiff_t)) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_uint) == sizeof(lzo_uintptr_t)) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(void *) == sizeof(lzo_uintptr_t)) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(char *) == sizeof(lzo_uintptr_t)) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(long *) == sizeof(lzo_uintptr_t)) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(void *) == sizeof(lzo_voidp)) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(char *) == sizeof(lzo_bytep)) - - -/*********************************************************************** -// function types -************************************************************************/ - -/* name mangling */ -#if !defined(__LZO_EXTERN_C) -# ifdef __cplusplus -# define __LZO_EXTERN_C extern "C" -# else -# define __LZO_EXTERN_C extern -# endif -#endif - -/* calling convention */ -#if !defined(__LZO_CDECL) -# define __LZO_CDECL __lzo_cdecl -#endif - -/* DLL export information */ -#if !defined(__LZO_EXPORT1) -# define __LZO_EXPORT1 /*empty*/ -#endif -#if !defined(__LZO_EXPORT2) -# define __LZO_EXPORT2 /*empty*/ -#endif - -/* __cdecl calling convention for public C and assembly functions */ -#if !defined(LZO_PUBLIC) -# define LZO_PUBLIC(r) __LZO_EXPORT1 r __LZO_EXPORT2 __LZO_CDECL -#endif -#if !defined(LZO_EXTERN) -# define LZO_EXTERN(r) __LZO_EXTERN_C LZO_PUBLIC(r) -#endif -#if !defined(LZO_PRIVATE) -# define LZO_PRIVATE(r) static r __LZO_CDECL -#endif - -/* function types */ -typedef int -(__LZO_CDECL *lzo_compress_t) ( const lzo_bytep src, lzo_uint src_len, - lzo_bytep dst, lzo_uintp dst_len, - lzo_voidp wrkmem ); - -typedef int -(__LZO_CDECL *lzo_decompress_t) ( const lzo_bytep src, lzo_uint src_len, - lzo_bytep dst, lzo_uintp dst_len, - lzo_voidp wrkmem ); - -typedef int -(__LZO_CDECL *lzo_optimize_t) ( lzo_bytep src, lzo_uint src_len, - lzo_bytep dst, lzo_uintp dst_len, - lzo_voidp wrkmem ); - -typedef int -(__LZO_CDECL *lzo_compress_dict_t)(const lzo_bytep src, lzo_uint src_len, - lzo_bytep dst, lzo_uintp dst_len, - lzo_voidp wrkmem, - const lzo_bytep dict, lzo_uint dict_len ); - -typedef int -(__LZO_CDECL *lzo_decompress_dict_t)(const lzo_bytep src, lzo_uint src_len, - lzo_bytep dst, lzo_uintp dst_len, - lzo_voidp wrkmem, - const lzo_bytep dict, lzo_uint dict_len ); - - -/* Callback interface. Currently only the progress indicator ("nprogress") - * is used, but this may change in a future release. */ - -struct lzo_callback_t; -typedef struct lzo_callback_t lzo_callback_t; -#define lzo_callback_p lzo_callback_t __LZO_MMODEL * - -/* malloc & free function types */ -typedef lzo_voidp (__LZO_CDECL *lzo_alloc_func_t) - (lzo_callback_p self, lzo_uint items, lzo_uint size); -typedef void (__LZO_CDECL *lzo_free_func_t) - (lzo_callback_p self, lzo_voidp ptr); - -/* a progress indicator callback function */ -typedef void (__LZO_CDECL *lzo_progress_func_t) - (lzo_callback_p, lzo_uint, lzo_uint, int); - -struct lzo_callback_t -{ - /* custom allocators (set to 0 to disable) */ - lzo_alloc_func_t nalloc; /* [not used right now] */ - lzo_free_func_t nfree; /* [not used right now] */ - - /* a progress indicator callback function (set to 0 to disable) */ - lzo_progress_func_t nprogress; - - /* INFO: the first parameter "self" of the nalloc/nfree/nprogress - * callbacks points back to this struct, so you are free to store - * some extra info in the following variables. */ - lzo_voidp user1; - lzo_xint user2; - lzo_xint user3; -}; - - -/*********************************************************************** -// error codes and prototypes -************************************************************************/ - -/* Error codes for the compression/decompression functions. Negative - * values are errors, positive values will be used for special but - * normal events. - */ -#define LZO_E_OK 0 -#define LZO_E_ERROR (-1) -#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) -#define LZO_E_LOOKBEHIND_OVERRUN (-6) -#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) -#define LZO_E_INVALID_ALIGNMENT (-11) /* pointer argument is not properly aligned */ -#define LZO_E_OUTPUT_NOT_CONSUMED (-12) -#define LZO_E_INTERNAL_ERROR (-99) - - -#ifndef lzo_sizeof_dict_t -# define lzo_sizeof_dict_t ((unsigned)sizeof(lzo_bytep)) -#endif - -/* lzo_init() should be the first function you call. - * Check the return code ! - * - * lzo_init() is a macro to allow checking that the library and the - * compiler's view of various types are consistent. - */ -#define lzo_init() __lzo_init_v2(LZO_VERSION,(int)sizeof(short),(int)sizeof(int),\ - (int)sizeof(long),(int)sizeof(lzo_uint32_t),(int)sizeof(lzo_uint),\ - (int)lzo_sizeof_dict_t,(int)sizeof(char *),(int)sizeof(lzo_voidp),\ - (int)sizeof(lzo_callback_t)) -LZO_EXTERN(int) __lzo_init_v2(unsigned,int,int,int,int,int,int,int,int,int); - -/* version functions (useful for shared libraries) */ -LZO_EXTERN(unsigned) lzo_version(void); -LZO_EXTERN(const char *) lzo_version_string(void); -LZO_EXTERN(const char *) lzo_version_date(void); -LZO_EXTERN(const lzo_charp) _lzo_version_string(void); -LZO_EXTERN(const lzo_charp) _lzo_version_date(void); - -/* string functions */ -LZO_EXTERN(int) - lzo_memcmp(const lzo_voidp a, const lzo_voidp b, lzo_uint len); -LZO_EXTERN(lzo_voidp) - lzo_memcpy(lzo_voidp dst, const lzo_voidp src, lzo_uint len); -LZO_EXTERN(lzo_voidp) - lzo_memmove(lzo_voidp dst, const lzo_voidp src, lzo_uint len); -LZO_EXTERN(lzo_voidp) - lzo_memset(lzo_voidp buf, int c, lzo_uint len); - -/* checksum functions */ -LZO_EXTERN(lzo_uint32_t) - lzo_adler32(lzo_uint32_t c, const lzo_bytep buf, lzo_uint len); -LZO_EXTERN(lzo_uint32_t) - lzo_crc32(lzo_uint32_t c, const lzo_bytep buf, lzo_uint len); -LZO_EXTERN(const lzo_uint32_tp) - lzo_get_crc32_table(void); - -/* misc. */ -LZO_EXTERN(int) _lzo_config_check(void); -typedef union { - lzo_voidp a00; lzo_bytep a01; lzo_uint a02; lzo_xint a03; lzo_uintptr_t a04; - void *a05; unsigned char *a06; unsigned long a07; size_t a08; ptrdiff_t a09; -#if defined(lzo_int64_t) - lzo_uint64_t a10; -#endif -} lzo_align_t; - -/* align a char pointer on a boundary that is a multiple of 'size' */ -LZO_EXTERN(unsigned) __lzo_align_gap(const lzo_voidp p, lzo_uint size); -#define LZO_PTR_ALIGN_UP(p,size) \ - ((p) + (lzo_uint) __lzo_align_gap((const lzo_voidp)(p),(lzo_uint)(size))) - - -/*********************************************************************** -// deprecated macros - only for backward compatibility -************************************************************************/ - -/* deprecated - use 'lzo_bytep' instead of 'lzo_byte *' */ -#define lzo_byte unsigned char -/* deprecated type names */ -#define lzo_int32 lzo_int32_t -#define lzo_uint32 lzo_uint32_t -#define lzo_int32p lzo_int32_t __LZO_MMODEL * -#define lzo_uint32p lzo_uint32_t __LZO_MMODEL * -#define LZO_INT32_MAX LZO_INT32_C(2147483647) -#define LZO_UINT32_MAX LZO_UINT32_C(4294967295) -#if defined(lzo_int64_t) -#define lzo_int64 lzo_int64_t -#define lzo_uint64 lzo_uint64_t -#define lzo_int64p lzo_int64_t __LZO_MMODEL * -#define lzo_uint64p lzo_uint64_t __LZO_MMODEL * -#define LZO_INT64_MAX LZO_INT64_C(9223372036854775807) -#define LZO_UINT64_MAX LZO_UINT64_C(18446744073709551615) -#endif -/* deprecated types */ -typedef union { lzo_bytep a; lzo_uint b; } __lzo_pu_u; -typedef union { lzo_bytep a; lzo_uint32_t b; } __lzo_pu32_u; -/* deprecated defines */ -#if !defined(LZO_SIZEOF_LZO_UINT) -# define LZO_SIZEOF_LZO_UINT LZO_SIZEOF_LZO_INT -#endif - -#if defined(LZO_CFG_COMPAT) - -#define __LZOCONF_H 1 - -#if defined(LZO_ARCH_I086) -# define __LZO_i386 1 -#elif defined(LZO_ARCH_I386) -# define __LZO_i386 1 -#endif - -#if defined(LZO_OS_DOS16) -# define __LZO_DOS 1 -# define __LZO_DOS16 1 -#elif defined(LZO_OS_DOS32) -# define __LZO_DOS 1 -#elif defined(LZO_OS_WIN16) -# define __LZO_WIN 1 -# define __LZO_WIN16 1 -#elif defined(LZO_OS_WIN32) -# define __LZO_WIN 1 -#endif - -#define __LZO_CMODEL /*empty*/ -#define __LZO_DMODEL /*empty*/ -#define __LZO_ENTRY __LZO_CDECL -#define LZO_EXTERN_CDECL LZO_EXTERN -#define LZO_ALIGN LZO_PTR_ALIGN_UP - -#define lzo_compress_asm_t lzo_compress_t -#define lzo_decompress_asm_t lzo_decompress_t - -#endif /* LZO_CFG_COMPAT */ - - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* already included */ - - -/* vim:set ts=4 sw=4 et: */ diff --git a/contrib/libs/minilzo/lzodefs.h b/contrib/libs/minilzo/lzodefs.h deleted file mode 100644 index 1535c1e205..0000000000 --- a/contrib/libs/minilzo/lzodefs.h +++ /dev/null @@ -1,3134 +0,0 @@ -/* lzodefs.h -- architecture, OS and compiler specific defines - - This file is part of the LZO real-time data compression library. - - Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer - All Rights Reserved. - - The LZO library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of - the License, or (at your option) any later version. - - The LZO library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - 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 the LZO library; see the file COPYING. - If not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - Markus F.X.J. Oberhumer - <markus@oberhumer.com> - http://www.oberhumer.com/opensource/lzo/ - */ - - -#ifndef __LZODEFS_H_INCLUDED -#define __LZODEFS_H_INCLUDED 1 - -#if defined(__CYGWIN32__) && !defined(__CYGWIN__) -# define __CYGWIN__ __CYGWIN32__ -#endif -#if 1 && defined(__INTERIX) && defined(__GNUC__) && !defined(_ALL_SOURCE) -# define _ALL_SOURCE 1 -#endif -#if defined(__mips__) && defined(__R5900__) -# if !defined(__LONG_MAX__) -# define __LONG_MAX__ 9223372036854775807L -# endif -#endif -#if !defined(LZO_CFG_NO_DISABLE_WUNDEF) -#if defined(__ARMCC_VERSION) -# pragma diag_suppress 193 -#elif defined(__clang__) && defined(__clang_minor__) -# pragma clang diagnostic ignored "-Wundef" -#elif defined(__INTEL_COMPILER) -# pragma warning(disable: 193) -#elif defined(__KEIL__) && defined(__C166__) -# pragma warning disable = 322 -#elif defined(__GNUC__) && defined(__GNUC_MINOR__) && !defined(__PATHSCALE__) -# if ((__GNUC__-0) >= 5 || ((__GNUC__-0) == 4 && (__GNUC_MINOR__-0) >= 2)) -# pragma GCC diagnostic ignored "-Wundef" -# endif -#elif defined(_MSC_VER) && !defined(__clang__) && !defined(__INTEL_COMPILER) && !defined(__MWERKS__) -# if ((_MSC_VER-0) >= 1300) -# pragma warning(disable: 4668) -# endif -#endif -#endif -#if 0 && defined(__POCC__) && defined(_WIN32) -# if (__POCC__ >= 400) -# pragma warn(disable: 2216) -# endif -#endif -#if 0 && defined(__WATCOMC__) -# if (__WATCOMC__ >= 1050) && (__WATCOMC__ < 1060) -# pragma warning 203 9 -# endif -#endif -#if defined(__BORLANDC__) && defined(__MSDOS__) && !defined(__FLAT__) -# pragma option -h -#endif -#if !(LZO_CFG_NO_DISABLE_WCRTNONSTDC) -#ifndef _CRT_NONSTDC_NO_DEPRECATE -#define _CRT_NONSTDC_NO_DEPRECATE 1 -#endif -#ifndef _CRT_NONSTDC_NO_WARNINGS -#define _CRT_NONSTDC_NO_WARNINGS 1 -#endif -#ifndef _CRT_SECURE_NO_DEPRECATE -#define _CRT_SECURE_NO_DEPRECATE 1 -#endif -#ifndef _CRT_SECURE_NO_WARNINGS -#define _CRT_SECURE_NO_WARNINGS 1 -#endif -#endif -#if 0 -#define LZO_0xffffUL 0xfffful -#define LZO_0xffffffffUL 0xfffffffful -#else -#define LZO_0xffffUL 65535ul -#define LZO_0xffffffffUL 4294967295ul -#endif -#define LZO_0xffffL LZO_0xffffUL -#define LZO_0xffffffffL LZO_0xffffffffUL -#if (LZO_0xffffL == LZO_0xffffffffL) -# error "your preprocessor is broken 1" -#endif -#if (16ul * 16384ul != 262144ul) -# error "your preprocessor is broken 2" -#endif -#if 0 -#if (32767 >= 4294967295ul) -# error "your preprocessor is broken 3" -#endif -#if (65535u >= 4294967295ul) -# error "your preprocessor is broken 4" -#endif -#endif -#if defined(__COUNTER__) -# ifndef LZO_CFG_USE_COUNTER -# define LZO_CFG_USE_COUNTER 1 -# endif -#else -# undef LZO_CFG_USE_COUNTER -#endif -#if (UINT_MAX == LZO_0xffffL) -#if defined(__ZTC__) && defined(__I86__) && !defined(__OS2__) -# if !defined(MSDOS) -# define MSDOS 1 -# endif -# if !defined(_MSDOS) -# define _MSDOS 1 -# endif -#elif 0 && defined(__VERSION) && defined(MB_LEN_MAX) -# if (__VERSION == 520) && (MB_LEN_MAX == 1) -# if !defined(__AZTEC_C__) -# define __AZTEC_C__ __VERSION -# endif -# if !defined(__DOS__) -# define __DOS__ 1 -# endif -# endif -#endif -#endif -#if defined(_MSC_VER) && defined(M_I86HM) && (UINT_MAX == LZO_0xffffL) -# define ptrdiff_t long -# define _PTRDIFF_T_DEFINED 1 -#endif -#if (UINT_MAX == LZO_0xffffL) -# undef __LZO_RENAME_A -# undef __LZO_RENAME_B -# if defined(__AZTEC_C__) && defined(__DOS__) -# define __LZO_RENAME_A 1 -# elif defined(_MSC_VER) && defined(MSDOS) -# if (_MSC_VER < 600) -# define __LZO_RENAME_A 1 -# elif (_MSC_VER < 700) -# define __LZO_RENAME_B 1 -# endif -# elif defined(__TSC__) && defined(__OS2__) -# define __LZO_RENAME_A 1 -# elif defined(__MSDOS__) && defined(__TURBOC__) && (__TURBOC__ < 0x0410) -# define __LZO_RENAME_A 1 -# elif defined(__PACIFIC__) && defined(DOS) -# if !defined(__far) -# define __far far -# endif -# if !defined(__near) -# define __near near -# endif -# endif -# if defined(__LZO_RENAME_A) -# if !defined(__cdecl) -# define __cdecl cdecl -# endif -# if !defined(__far) -# define __far far -# endif -# if !defined(__huge) -# define __huge huge -# endif -# if !defined(__near) -# define __near near -# endif -# if !defined(__pascal) -# define __pascal pascal -# endif -# if !defined(__huge) -# define __huge huge -# endif -# elif defined(__LZO_RENAME_B) -# if !defined(__cdecl) -# define __cdecl _cdecl -# endif -# if !defined(__far) -# define __far _far -# endif -# if !defined(__huge) -# define __huge _huge -# endif -# if !defined(__near) -# define __near _near -# endif -# if !defined(__pascal) -# define __pascal _pascal -# endif -# elif (defined(__PUREC__) || defined(__TURBOC__)) && defined(__TOS__) -# if !defined(__cdecl) -# define __cdecl cdecl -# endif -# if !defined(__pascal) -# define __pascal pascal -# endif -# endif -# undef __LZO_RENAME_A -# undef __LZO_RENAME_B -#endif -#if (UINT_MAX == LZO_0xffffL) -#if defined(__AZTEC_C__) && defined(__DOS__) -# define LZO_BROKEN_CDECL_ALT_SYNTAX 1 -#elif defined(_MSC_VER) && defined(MSDOS) -# if (_MSC_VER < 600) -# define LZO_BROKEN_INTEGRAL_CONSTANTS 1 -# endif -# if (_MSC_VER < 700) -# define LZO_BROKEN_INTEGRAL_PROMOTION 1 -# define LZO_BROKEN_SIZEOF 1 -# endif -#elif defined(__PACIFIC__) && defined(DOS) -# define LZO_BROKEN_INTEGRAL_CONSTANTS 1 -#elif defined(__TURBOC__) && defined(__MSDOS__) -# if (__TURBOC__ < 0x0150) -# define LZO_BROKEN_CDECL_ALT_SYNTAX 1 -# define LZO_BROKEN_INTEGRAL_CONSTANTS 1 -# define LZO_BROKEN_INTEGRAL_PROMOTION 1 -# endif -# if (__TURBOC__ < 0x0200) -# define LZO_BROKEN_SIZEOF 1 -# endif -# if (__TURBOC__ < 0x0400) && defined(__cplusplus) -# define LZO_BROKEN_CDECL_ALT_SYNTAX 1 -# endif -#elif (defined(__PUREC__) || defined(__TURBOC__)) && defined(__TOS__) -# define LZO_BROKEN_CDECL_ALT_SYNTAX 1 -# define LZO_BROKEN_SIZEOF 1 -#endif -#endif -#if defined(__WATCOMC__) && (__WATCOMC__ < 900) -# define LZO_BROKEN_INTEGRAL_CONSTANTS 1 -#endif -#if defined(_CRAY) && defined(_CRAY1) -# define LZO_BROKEN_SIGNED_RIGHT_SHIFT 1 -#endif -#define LZO_PP_STRINGIZE(x) #x -#define LZO_PP_MACRO_EXPAND(x) LZO_PP_STRINGIZE(x) -#define LZO_PP_CONCAT0() /*empty*/ -#define LZO_PP_CONCAT1(a) a -#define LZO_PP_CONCAT2(a,b) a ## b -#define LZO_PP_CONCAT3(a,b,c) a ## b ## c -#define LZO_PP_CONCAT4(a,b,c,d) a ## b ## c ## d -#define LZO_PP_CONCAT5(a,b,c,d,e) a ## b ## c ## d ## e -#define LZO_PP_CONCAT6(a,b,c,d,e,f) a ## b ## c ## d ## e ## f -#define LZO_PP_CONCAT7(a,b,c,d,e,f,g) a ## b ## c ## d ## e ## f ## g -#define LZO_PP_ECONCAT0() LZO_PP_CONCAT0() -#define LZO_PP_ECONCAT1(a) LZO_PP_CONCAT1(a) -#define LZO_PP_ECONCAT2(a,b) LZO_PP_CONCAT2(a,b) -#define LZO_PP_ECONCAT3(a,b,c) LZO_PP_CONCAT3(a,b,c) -#define LZO_PP_ECONCAT4(a,b,c,d) LZO_PP_CONCAT4(a,b,c,d) -#define LZO_PP_ECONCAT5(a,b,c,d,e) LZO_PP_CONCAT5(a,b,c,d,e) -#define LZO_PP_ECONCAT6(a,b,c,d,e,f) LZO_PP_CONCAT6(a,b,c,d,e,f) -#define LZO_PP_ECONCAT7(a,b,c,d,e,f,g) LZO_PP_CONCAT7(a,b,c,d,e,f,g) -#define LZO_PP_EMPTY /*empty*/ -#define LZO_PP_EMPTY0() /*empty*/ -#define LZO_PP_EMPTY1(a) /*empty*/ -#define LZO_PP_EMPTY2(a,b) /*empty*/ -#define LZO_PP_EMPTY3(a,b,c) /*empty*/ -#define LZO_PP_EMPTY4(a,b,c,d) /*empty*/ -#define LZO_PP_EMPTY5(a,b,c,d,e) /*empty*/ -#define LZO_PP_EMPTY6(a,b,c,d,e,f) /*empty*/ -#define LZO_PP_EMPTY7(a,b,c,d,e,f,g) /*empty*/ -#if 1 -#define LZO_CPP_STRINGIZE(x) #x -#define LZO_CPP_MACRO_EXPAND(x) LZO_CPP_STRINGIZE(x) -#define LZO_CPP_CONCAT2(a,b) a ## b -#define LZO_CPP_CONCAT3(a,b,c) a ## b ## c -#define LZO_CPP_CONCAT4(a,b,c,d) a ## b ## c ## d -#define LZO_CPP_CONCAT5(a,b,c,d,e) a ## b ## c ## d ## e -#define LZO_CPP_CONCAT6(a,b,c,d,e,f) a ## b ## c ## d ## e ## f -#define LZO_CPP_CONCAT7(a,b,c,d,e,f,g) a ## b ## c ## d ## e ## f ## g -#define LZO_CPP_ECONCAT2(a,b) LZO_CPP_CONCAT2(a,b) -#define LZO_CPP_ECONCAT3(a,b,c) LZO_CPP_CONCAT3(a,b,c) -#define LZO_CPP_ECONCAT4(a,b,c,d) LZO_CPP_CONCAT4(a,b,c,d) -#define LZO_CPP_ECONCAT5(a,b,c,d,e) LZO_CPP_CONCAT5(a,b,c,d,e) -#define LZO_CPP_ECONCAT6(a,b,c,d,e,f) LZO_CPP_CONCAT6(a,b,c,d,e,f) -#define LZO_CPP_ECONCAT7(a,b,c,d,e,f,g) LZO_CPP_CONCAT7(a,b,c,d,e,f,g) -#endif -#define __LZO_MASK_GEN(o,b) (((((o) << ((b)-!!(b))) - (o)) << 1) + (o)*!!(b)) -#if 1 && defined(__cplusplus) -# if !defined(__STDC_CONSTANT_MACROS) -# define __STDC_CONSTANT_MACROS 1 -# endif -# if !defined(__STDC_LIMIT_MACROS) -# define __STDC_LIMIT_MACROS 1 -# endif -#endif -#if defined(__cplusplus) -# define LZO_EXTERN_C extern "C" -# define LZO_EXTERN_C_BEGIN extern "C" { -# define LZO_EXTERN_C_END } -#else -# define LZO_EXTERN_C extern -# define LZO_EXTERN_C_BEGIN /*empty*/ -# define LZO_EXTERN_C_END /*empty*/ -#endif -#if !defined(__LZO_OS_OVERRIDE) -#if (LZO_OS_FREESTANDING) -# define LZO_INFO_OS "freestanding" -#elif (LZO_OS_EMBEDDED) -# define LZO_INFO_OS "embedded" -#elif 1 && defined(__IAR_SYSTEMS_ICC__) -# define LZO_OS_EMBEDDED 1 -# define LZO_INFO_OS "embedded" -#elif defined(__CYGWIN__) && defined(__GNUC__) -# define LZO_OS_CYGWIN 1 -# define LZO_INFO_OS "cygwin" -#elif defined(__EMX__) && defined(__GNUC__) -# define LZO_OS_EMX 1 -# define LZO_INFO_OS "emx" -#elif defined(__BEOS__) -# define LZO_OS_BEOS 1 -# define LZO_INFO_OS "beos" -#elif defined(__Lynx__) -# define LZO_OS_LYNXOS 1 -# define LZO_INFO_OS "lynxos" -#elif defined(__OS400__) -# define LZO_OS_OS400 1 -# define LZO_INFO_OS "os400" -#elif defined(__QNX__) -# define LZO_OS_QNX 1 -# define LZO_INFO_OS "qnx" -#elif defined(__BORLANDC__) && defined(__DPMI32__) && (__BORLANDC__ >= 0x0460) -# define LZO_OS_DOS32 1 -# define LZO_INFO_OS "dos32" -#elif defined(__BORLANDC__) && defined(__DPMI16__) -# define LZO_OS_DOS16 1 -# define LZO_INFO_OS "dos16" -#elif defined(__ZTC__) && defined(DOS386) -# define LZO_OS_DOS32 1 -# define LZO_INFO_OS "dos32" -#elif defined(__OS2__) || defined(__OS2V2__) -# if (UINT_MAX == LZO_0xffffL) -# define LZO_OS_OS216 1 -# define LZO_INFO_OS "os216" -# elif (UINT_MAX == LZO_0xffffffffL) -# define LZO_OS_OS2 1 -# define LZO_INFO_OS "os2" -# else -# error "check your limits.h header" -# endif -#elif defined(__WIN64__) || defined(_WIN64) || defined(WIN64) -# define LZO_OS_WIN64 1 -# define LZO_INFO_OS "win64" -#elif defined(__WIN32__) || defined(_WIN32) || defined(WIN32) || defined(__WINDOWS_386__) -# define LZO_OS_WIN32 1 -# define LZO_INFO_OS "win32" -#elif defined(__MWERKS__) && defined(__INTEL__) -# define LZO_OS_WIN32 1 -# define LZO_INFO_OS "win32" -#elif defined(__WINDOWS__) || defined(_WINDOWS) || defined(_Windows) -# if (UINT_MAX == LZO_0xffffL) -# define LZO_OS_WIN16 1 -# define LZO_INFO_OS "win16" -# elif (UINT_MAX == LZO_0xffffffffL) -# define LZO_OS_WIN32 1 -# define LZO_INFO_OS "win32" -# else -# error "check your limits.h header" -# endif -#elif defined(__DOS__) || defined(__MSDOS__) || defined(_MSDOS) || defined(MSDOS) || (defined(__PACIFIC__) && defined(DOS)) -# if (UINT_MAX == LZO_0xffffL) -# define LZO_OS_DOS16 1 -# define LZO_INFO_OS "dos16" -# elif (UINT_MAX == LZO_0xffffffffL) -# define LZO_OS_DOS32 1 -# define LZO_INFO_OS "dos32" -# else -# error "check your limits.h header" -# endif -#elif defined(__WATCOMC__) -# if defined(__NT__) && (UINT_MAX == LZO_0xffffL) -# define LZO_OS_DOS16 1 -# define LZO_INFO_OS "dos16" -# elif defined(__NT__) && (__WATCOMC__ < 1100) -# define LZO_OS_WIN32 1 -# define LZO_INFO_OS "win32" -# elif defined(__linux__) || defined(__LINUX__) -# define LZO_OS_POSIX 1 -# define LZO_INFO_OS "posix" -# else -# error "please specify a target using the -bt compiler option" -# endif -#elif defined(__palmos__) -# define LZO_OS_PALMOS 1 -# define LZO_INFO_OS "palmos" -#elif defined(__TOS__) || defined(__atarist__) -# define LZO_OS_TOS 1 -# define LZO_INFO_OS "tos" -#elif defined(macintosh) && !defined(__arm__) && !defined(__i386__) && !defined(__ppc__) && !defined(__x64_64__) -# define LZO_OS_MACCLASSIC 1 -# define LZO_INFO_OS "macclassic" -#elif defined(__VMS) -# define LZO_OS_VMS 1 -# define LZO_INFO_OS "vms" -#elif (defined(__mips__) && defined(__R5900__)) || defined(__MIPS_PSX2__) -# define LZO_OS_CONSOLE 1 -# define LZO_OS_CONSOLE_PS2 1 -# define LZO_INFO_OS "console" -# define LZO_INFO_OS_CONSOLE "ps2" -#elif defined(__mips__) && defined(__psp__) -# define LZO_OS_CONSOLE 1 -# define LZO_OS_CONSOLE_PSP 1 -# define LZO_INFO_OS "console" -# define LZO_INFO_OS_CONSOLE "psp" -#else -# define LZO_OS_POSIX 1 -# define LZO_INFO_OS "posix" -#endif -#if (LZO_OS_POSIX) -# if defined(_AIX) || defined(__AIX__) || defined(__aix__) -# define LZO_OS_POSIX_AIX 1 -# define LZO_INFO_OS_POSIX "aix" -# elif defined(__FreeBSD__) -# define LZO_OS_POSIX_FREEBSD 1 -# define LZO_INFO_OS_POSIX "freebsd" -# elif defined(__hpux__) || defined(__hpux) -# define LZO_OS_POSIX_HPUX 1 -# define LZO_INFO_OS_POSIX "hpux" -# elif defined(__INTERIX) -# define LZO_OS_POSIX_INTERIX 1 -# define LZO_INFO_OS_POSIX "interix" -# elif defined(__IRIX__) || defined(__irix__) -# define LZO_OS_POSIX_IRIX 1 -# define LZO_INFO_OS_POSIX "irix" -# elif defined(__linux__) || defined(__linux) || defined(__LINUX__) -# define LZO_OS_POSIX_LINUX 1 -# define LZO_INFO_OS_POSIX "linux" -# elif defined(__APPLE__) && defined(__MACH__) -# if ((__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__-0) >= 20000) -# define LZO_OS_POSIX_DARWIN 1040 -# define LZO_INFO_OS_POSIX "darwin_iphone" -# elif ((__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__-0) >= 1040) -# define LZO_OS_POSIX_DARWIN __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ -# define LZO_INFO_OS_POSIX "darwin" -# else -# define LZO_OS_POSIX_DARWIN 1 -# define LZO_INFO_OS_POSIX "darwin" -# endif -# define LZO_OS_POSIX_MACOSX LZO_OS_POSIX_DARWIN -# elif defined(__minix__) || defined(__minix) -# define LZO_OS_POSIX_MINIX 1 -# define LZO_INFO_OS_POSIX "minix" -# elif defined(__NetBSD__) -# define LZO_OS_POSIX_NETBSD 1 -# define LZO_INFO_OS_POSIX "netbsd" -# elif defined(__OpenBSD__) -# define LZO_OS_POSIX_OPENBSD 1 -# define LZO_INFO_OS_POSIX "openbsd" -# elif defined(__osf__) -# define LZO_OS_POSIX_OSF 1 -# define LZO_INFO_OS_POSIX "osf" -# elif defined(__solaris__) || defined(__sun) -# if defined(__SVR4) || defined(__svr4__) -# define LZO_OS_POSIX_SOLARIS 1 -# define LZO_INFO_OS_POSIX "solaris" -# else -# define LZO_OS_POSIX_SUNOS 1 -# define LZO_INFO_OS_POSIX "sunos" -# endif -# elif defined(__ultrix__) || defined(__ultrix) -# define LZO_OS_POSIX_ULTRIX 1 -# define LZO_INFO_OS_POSIX "ultrix" -# elif defined(_UNICOS) -# define LZO_OS_POSIX_UNICOS 1 -# define LZO_INFO_OS_POSIX "unicos" -# else -# define LZO_OS_POSIX_UNKNOWN 1 -# define LZO_INFO_OS_POSIX "unknown" -# endif -#endif -#endif -#if (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16) -# if (UINT_MAX != LZO_0xffffL) -# error "unexpected configuration - check your compiler defines" -# endif -# if (ULONG_MAX != LZO_0xffffffffL) -# error "unexpected configuration - check your compiler defines" -# endif -#endif -#if (LZO_OS_DOS32 || LZO_OS_OS2 || LZO_OS_WIN32 || LZO_OS_WIN64) -# if (UINT_MAX != LZO_0xffffffffL) -# error "unexpected configuration - check your compiler defines" -# endif -# if (ULONG_MAX != LZO_0xffffffffL) -# error "unexpected configuration - check your compiler defines" -# endif -#endif -#if defined(CIL) && defined(_GNUCC) && defined(__GNUC__) -# define LZO_CC_CILLY 1 -# define LZO_INFO_CC "Cilly" -# if defined(__CILLY__) -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__CILLY__) -# else -# define LZO_INFO_CCVER "unknown" -# endif -#elif 0 && defined(SDCC) && defined(__VERSION__) && !defined(__GNUC__) -# define LZO_CC_SDCC 1 -# define LZO_INFO_CC "sdcc" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(SDCC) -#elif defined(__PATHSCALE__) && defined(__PATHCC_PATCHLEVEL__) -# define LZO_CC_PATHSCALE (__PATHCC__ * 0x10000L + (__PATHCC_MINOR__-0) * 0x100 + (__PATHCC_PATCHLEVEL__-0)) -# define LZO_INFO_CC "Pathscale C" -# define LZO_INFO_CCVER __PATHSCALE__ -# if defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__) -# define LZO_CC_PATHSCALE_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0)) -# endif -#elif defined(__INTEL_COMPILER) && ((__INTEL_COMPILER-0) > 0) -# define LZO_CC_INTELC __INTEL_COMPILER -# define LZO_INFO_CC "Intel C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__INTEL_COMPILER) -# if defined(_MSC_VER) && ((_MSC_VER-0) > 0) -# define LZO_CC_INTELC_MSC _MSC_VER -# elif defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__) -# define LZO_CC_INTELC_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0)) -# endif -#elif defined(__POCC__) && defined(_WIN32) -# define LZO_CC_PELLESC 1 -# define LZO_INFO_CC "Pelles C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__POCC__) -#elif defined(__ARMCC_VERSION) && defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__) -# if defined(__GNUC_PATCHLEVEL__) -# define LZO_CC_ARMCC_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0)) -# else -# define LZO_CC_ARMCC_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100) -# endif -# define LZO_CC_ARMCC __ARMCC_VERSION -# define LZO_INFO_CC "ARM C Compiler" -# define LZO_INFO_CCVER __VERSION__ -#elif defined(__clang__) && defined(__llvm__) && defined(__VERSION__) -# if defined(__clang_major__) && defined(__clang_minor__) && defined(__clang_patchlevel__) -# define LZO_CC_CLANG (__clang_major__ * 0x10000L + (__clang_minor__-0) * 0x100 + (__clang_patchlevel__-0)) -# else -# define LZO_CC_CLANG 0x010000L -# endif -# if defined(_MSC_VER) && ((_MSC_VER-0) > 0) -# define LZO_CC_CLANG_MSC _MSC_VER -# elif defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__) -# define LZO_CC_CLANG_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0)) -# endif -# define LZO_INFO_CC "clang" -# define LZO_INFO_CCVER __VERSION__ -#elif defined(__llvm__) && defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__) -# if defined(__GNUC_PATCHLEVEL__) -# define LZO_CC_LLVM_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0)) -# else -# define LZO_CC_LLVM_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100) -# endif -# define LZO_CC_LLVM LZO_CC_LLVM_GNUC -# define LZO_INFO_CC "llvm-gcc" -# define LZO_INFO_CCVER __VERSION__ -#elif defined(__ACK__) && defined(_ACK) -# define LZO_CC_ACK 1 -# define LZO_INFO_CC "Amsterdam Compiler Kit C" -# define LZO_INFO_CCVER "unknown" -#elif defined(__ARMCC_VERSION) && !defined(__GNUC__) -# define LZO_CC_ARMCC __ARMCC_VERSION -# define LZO_CC_ARMCC_ARMCC __ARMCC_VERSION -# define LZO_INFO_CC "ARM C Compiler" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__ARMCC_VERSION) -#elif defined(__AZTEC_C__) -# define LZO_CC_AZTECC 1 -# define LZO_INFO_CC "Aztec C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__AZTEC_C__) -#elif defined(__CODEGEARC__) -# define LZO_CC_CODEGEARC 1 -# define LZO_INFO_CC "CodeGear C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__CODEGEARC__) -#elif defined(__BORLANDC__) -# define LZO_CC_BORLANDC 1 -# define LZO_INFO_CC "Borland C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__BORLANDC__) -#elif defined(_CRAYC) && defined(_RELEASE) -# define LZO_CC_CRAYC 1 -# define LZO_INFO_CC "Cray C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(_RELEASE) -#elif defined(__DMC__) && defined(__SC__) -# define LZO_CC_DMC 1 -# define LZO_INFO_CC "Digital Mars C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__DMC__) -#elif defined(__DECC) -# define LZO_CC_DECC 1 -# define LZO_INFO_CC "DEC C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__DECC) -#elif (defined(__ghs) || defined(__ghs__)) && defined(__GHS_VERSION_NUMBER) && ((__GHS_VERSION_NUMBER-0) > 0) -# define LZO_CC_GHS 1 -# define LZO_INFO_CC "Green Hills C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__GHS_VERSION_NUMBER) -# if defined(_MSC_VER) && ((_MSC_VER-0) > 0) -# define LZO_CC_GHS_MSC _MSC_VER -# elif defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__) -# define LZO_CC_GHS_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0)) -# endif -#elif defined(__HIGHC__) -# define LZO_CC_HIGHC 1 -# define LZO_INFO_CC "MetaWare High C" -# define LZO_INFO_CCVER "unknown" -#elif defined(__HP_aCC) && ((__HP_aCC-0) > 0) -# define LZO_CC_HPACC __HP_aCC -# define LZO_INFO_CC "HP aCC" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__HP_aCC) -#elif defined(__IAR_SYSTEMS_ICC__) -# define LZO_CC_IARC 1 -# define LZO_INFO_CC "IAR C" -# if defined(__VER__) -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__VER__) -# else -# define LZO_INFO_CCVER "unknown" -# endif -#elif defined(__IBMC__) && ((__IBMC__-0) > 0) -# define LZO_CC_IBMC __IBMC__ -# define LZO_INFO_CC "IBM C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__IBMC__) -#elif defined(__IBMCPP__) && ((__IBMCPP__-0) > 0) -# define LZO_CC_IBMC __IBMCPP__ -# define LZO_INFO_CC "IBM C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__IBMCPP__) -#elif defined(__KEIL__) && defined(__C166__) -# define LZO_CC_KEILC 1 -# define LZO_INFO_CC "Keil C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__C166__) -#elif defined(__LCC__) && defined(_WIN32) && defined(__LCCOPTIMLEVEL) -# define LZO_CC_LCCWIN32 1 -# define LZO_INFO_CC "lcc-win32" -# define LZO_INFO_CCVER "unknown" -#elif defined(__LCC__) -# define LZO_CC_LCC 1 -# define LZO_INFO_CC "lcc" -# if defined(__LCC_VERSION__) -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__LCC_VERSION__) -# else -# define LZO_INFO_CCVER "unknown" -# endif -#elif defined(__MWERKS__) && ((__MWERKS__-0) > 0) -# define LZO_CC_MWERKS __MWERKS__ -# define LZO_INFO_CC "Metrowerks C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__MWERKS__) -#elif (defined(__NDPC__) || defined(__NDPX__)) && defined(__i386) -# define LZO_CC_NDPC 1 -# define LZO_INFO_CC "Microway NDP C" -# define LZO_INFO_CCVER "unknown" -#elif defined(__PACIFIC__) -# define LZO_CC_PACIFICC 1 -# define LZO_INFO_CC "Pacific C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__PACIFIC__) -#elif defined(__PGI) && defined(__PGIC__) && defined(__PGIC_MINOR__) -# if defined(__PGIC_PATCHLEVEL__) -# define LZO_CC_PGI (__PGIC__ * 0x10000L + (__PGIC_MINOR__-0) * 0x100 + (__PGIC_PATCHLEVEL__-0)) -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__PGIC__) "." LZO_PP_MACRO_EXPAND(__PGIC_MINOR__) "." LZO_PP_MACRO_EXPAND(__PGIC_PATCHLEVEL__) -# else -# define LZO_CC_PGI (__PGIC__ * 0x10000L + (__PGIC_MINOR__-0) * 0x100) -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__PGIC__) "." LZO_PP_MACRO_EXPAND(__PGIC_MINOR__) ".0" -# endif -# define LZO_INFO_CC "Portland Group PGI C" -#elif defined(__PGI) && (defined(__linux__) || defined(__WIN32__)) -# define LZO_CC_PGI 1 -# define LZO_INFO_CC "Portland Group PGI C" -# define LZO_INFO_CCVER "unknown" -#elif defined(__PUREC__) && defined(__TOS__) -# define LZO_CC_PUREC 1 -# define LZO_INFO_CC "Pure C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__PUREC__) -#elif defined(__SC__) && defined(__ZTC__) -# define LZO_CC_SYMANTECC 1 -# define LZO_INFO_CC "Symantec C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__SC__) -#elif defined(__SUNPRO_C) -# define LZO_INFO_CC "SunPro C" -# if ((__SUNPRO_C-0) > 0) -# define LZO_CC_SUNPROC __SUNPRO_C -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__SUNPRO_C) -# else -# define LZO_CC_SUNPROC 1 -# define LZO_INFO_CCVER "unknown" -# endif -#elif defined(__SUNPRO_CC) -# define LZO_INFO_CC "SunPro C" -# if ((__SUNPRO_CC-0) > 0) -# define LZO_CC_SUNPROC __SUNPRO_CC -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__SUNPRO_CC) -# else -# define LZO_CC_SUNPROC 1 -# define LZO_INFO_CCVER "unknown" -# endif -#elif defined(__TINYC__) -# define LZO_CC_TINYC 1 -# define LZO_INFO_CC "Tiny C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__TINYC__) -#elif defined(__TSC__) -# define LZO_CC_TOPSPEEDC 1 -# define LZO_INFO_CC "TopSpeed C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__TSC__) -#elif defined(__WATCOMC__) -# define LZO_CC_WATCOMC 1 -# define LZO_INFO_CC "Watcom C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__WATCOMC__) -#elif defined(__TURBOC__) -# define LZO_CC_TURBOC 1 -# define LZO_INFO_CC "Turbo C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__TURBOC__) -#elif defined(__ZTC__) -# define LZO_CC_ZORTECHC 1 -# define LZO_INFO_CC "Zortech C" -# if ((__ZTC__-0) == 0x310) -# define LZO_INFO_CCVER "0x310" -# else -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__ZTC__) -# endif -#elif defined(__GNUC__) && defined(__VERSION__) -# if defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__) -# define LZO_CC_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0)) -# elif defined(__GNUC_MINOR__) -# define LZO_CC_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100) -# else -# define LZO_CC_GNUC (__GNUC__ * 0x10000L) -# endif -# define LZO_INFO_CC "gcc" -# define LZO_INFO_CCVER __VERSION__ -#elif defined(_MSC_VER) && ((_MSC_VER-0) > 0) -# define LZO_CC_MSC _MSC_VER -# define LZO_INFO_CC "Microsoft C" -# if defined(_MSC_FULL_VER) -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(_MSC_VER) "." LZO_PP_MACRO_EXPAND(_MSC_FULL_VER) -# else -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(_MSC_VER) -# endif -#else -# define LZO_CC_UNKNOWN 1 -# define LZO_INFO_CC "unknown" -# define LZO_INFO_CCVER "unknown" -#endif -#if (LZO_CC_GNUC) && defined(__OPEN64__) -# if defined(__OPENCC__) && defined(__OPENCC_MINOR__) && defined(__OPENCC_PATCHLEVEL__) -# define LZO_CC_OPEN64 (__OPENCC__ * 0x10000L + (__OPENCC_MINOR__-0) * 0x100 + (__OPENCC_PATCHLEVEL__-0)) -# define LZO_CC_OPEN64_GNUC LZO_CC_GNUC -# endif -#endif -#if (LZO_CC_GNUC) && defined(__PCC__) -# if defined(__PCC__) && defined(__PCC_MINOR__) && defined(__PCC_MINORMINOR__) -# define LZO_CC_PCC (__PCC__ * 0x10000L + (__PCC_MINOR__-0) * 0x100 + (__PCC_MINORMINOR__-0)) -# define LZO_CC_PCC_GNUC LZO_CC_GNUC -# endif -#endif -#if 0 && (LZO_CC_MSC && (_MSC_VER >= 1200)) && !defined(_MSC_FULL_VER) -# error "LZO_CC_MSC: _MSC_FULL_VER is not defined" -#endif -#if !defined(__LZO_ARCH_OVERRIDE) && !(LZO_ARCH_GENERIC) && defined(_CRAY) -# if (UINT_MAX > LZO_0xffffffffL) && defined(_CRAY) -# if defined(_CRAYMPP) || defined(_CRAYT3D) || defined(_CRAYT3E) -# define LZO_ARCH_CRAY_MPP 1 -# elif defined(_CRAY1) -# define LZO_ARCH_CRAY_PVP 1 -# endif -# endif -#endif -#if !defined(__LZO_ARCH_OVERRIDE) -#if (LZO_ARCH_GENERIC) -# define LZO_INFO_ARCH "generic" -#elif (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16) -# define LZO_ARCH_I086 1 -# define LZO_INFO_ARCH "i086" -#elif defined(__aarch64__) -# define LZO_ARCH_ARM64 1 -# define LZO_INFO_ARCH "arm64" -#elif defined(__alpha__) || defined(__alpha) || defined(_M_ALPHA) -# define LZO_ARCH_ALPHA 1 -# define LZO_INFO_ARCH "alpha" -#elif (LZO_ARCH_CRAY_MPP) && (defined(_CRAYT3D) || defined(_CRAYT3E)) -# define LZO_ARCH_ALPHA 1 -# define LZO_INFO_ARCH "alpha" -#elif defined(__amd64__) || defined(__x86_64__) || defined(_M_AMD64) -# define LZO_ARCH_AMD64 1 -# define LZO_INFO_ARCH "amd64" -#elif defined(__arm__) || defined(_M_ARM) -# define LZO_ARCH_ARM 1 -# define LZO_INFO_ARCH "arm" -#elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCARM__) -# define LZO_ARCH_ARM 1 -# define LZO_INFO_ARCH "arm" -#elif (UINT_MAX <= LZO_0xffffL) && defined(__AVR__) -# define LZO_ARCH_AVR 1 -# define LZO_INFO_ARCH "avr" -#elif defined(__avr32__) || defined(__AVR32__) -# define LZO_ARCH_AVR32 1 -# define LZO_INFO_ARCH "avr32" -#elif defined(__bfin__) -# define LZO_ARCH_BLACKFIN 1 -# define LZO_INFO_ARCH "blackfin" -#elif (UINT_MAX == LZO_0xffffL) && defined(__C166__) -# define LZO_ARCH_C166 1 -# define LZO_INFO_ARCH "c166" -#elif defined(__cris__) -# define LZO_ARCH_CRIS 1 -# define LZO_INFO_ARCH "cris" -#elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCEZ80__) -# define LZO_ARCH_EZ80 1 -# define LZO_INFO_ARCH "ez80" -#elif defined(__H8300__) || defined(__H8300H__) || defined(__H8300S__) || defined(__H8300SX__) -# define LZO_ARCH_H8300 1 -# define LZO_INFO_ARCH "h8300" -#elif defined(__hppa__) || defined(__hppa) -# define LZO_ARCH_HPPA 1 -# define LZO_INFO_ARCH "hppa" -#elif defined(__386__) || defined(__i386__) || defined(__i386) || defined(_M_IX86) || defined(_M_I386) -# define LZO_ARCH_I386 1 -# define LZO_ARCH_IA32 1 -# define LZO_INFO_ARCH "i386" -#elif (LZO_CC_ZORTECHC && defined(__I86__)) -# define LZO_ARCH_I386 1 -# define LZO_ARCH_IA32 1 -# define LZO_INFO_ARCH "i386" -#elif (LZO_OS_DOS32 && LZO_CC_HIGHC) && defined(_I386) -# define LZO_ARCH_I386 1 -# define LZO_ARCH_IA32 1 -# define LZO_INFO_ARCH "i386" -#elif defined(__ia64__) || defined(__ia64) || defined(_M_IA64) -# define LZO_ARCH_IA64 1 -# define LZO_INFO_ARCH "ia64" -#elif (UINT_MAX == LZO_0xffffL) && defined(__m32c__) -# define LZO_ARCH_M16C 1 -# define LZO_INFO_ARCH "m16c" -#elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCM16C__) -# define LZO_ARCH_M16C 1 -# define LZO_INFO_ARCH "m16c" -#elif defined(__m32r__) -# define LZO_ARCH_M32R 1 -# define LZO_INFO_ARCH "m32r" -#elif (LZO_OS_TOS) || defined(__m68k__) || defined(__m68000__) || defined(__mc68000__) || defined(__mc68020__) || defined(_M_M68K) -# define LZO_ARCH_M68K 1 -# define LZO_INFO_ARCH "m68k" -#elif (UINT_MAX == LZO_0xffffL) && defined(__C251__) -# define LZO_ARCH_MCS251 1 -# define LZO_INFO_ARCH "mcs251" -#elif (UINT_MAX == LZO_0xffffL) && defined(__C51__) -# define LZO_ARCH_MCS51 1 -# define LZO_INFO_ARCH "mcs51" -#elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICC8051__) -# define LZO_ARCH_MCS51 1 -# define LZO_INFO_ARCH "mcs51" -#elif defined(__mips__) || defined(__mips) || defined(_MIPS_ARCH) || defined(_M_MRX000) -# define LZO_ARCH_MIPS 1 -# define LZO_INFO_ARCH "mips" -#elif (UINT_MAX == LZO_0xffffL) && defined(__MSP430__) -# define LZO_ARCH_MSP430 1 -# define LZO_INFO_ARCH "msp430" -#elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICC430__) -# define LZO_ARCH_MSP430 1 -# define LZO_INFO_ARCH "msp430" -#elif defined(__powerpc__) || defined(__powerpc) || defined(__ppc__) || defined(__PPC__) || defined(_M_PPC) || defined(_ARCH_PPC) || defined(_ARCH_PWR) -# define LZO_ARCH_POWERPC 1 -# define LZO_INFO_ARCH "powerpc" -#elif defined(__s390__) || defined(__s390) || defined(__s390x__) || defined(__s390x) -# define LZO_ARCH_S390 1 -# define LZO_INFO_ARCH "s390" -#elif defined(__sh__) || defined(_M_SH) -# define LZO_ARCH_SH 1 -# define LZO_INFO_ARCH "sh" -#elif defined(__sparc__) || defined(__sparc) || defined(__sparcv8) -# define LZO_ARCH_SPARC 1 -# define LZO_INFO_ARCH "sparc" -#elif defined(__SPU__) -# define LZO_ARCH_SPU 1 -# define LZO_INFO_ARCH "spu" -#elif (UINT_MAX == LZO_0xffffL) && defined(__z80) -# define LZO_ARCH_Z80 1 -# define LZO_INFO_ARCH "z80" -#elif (LZO_ARCH_CRAY_PVP) -# if defined(_CRAYSV1) -# define LZO_ARCH_CRAY_SV1 1 -# define LZO_INFO_ARCH "cray_sv1" -# elif (_ADDR64) -# define LZO_ARCH_CRAY_T90 1 -# define LZO_INFO_ARCH "cray_t90" -# elif (_ADDR32) -# define LZO_ARCH_CRAY_YMP 1 -# define LZO_INFO_ARCH "cray_ymp" -# else -# define LZO_ARCH_CRAY_XMP 1 -# define LZO_INFO_ARCH "cray_xmp" -# endif -#else -# define LZO_ARCH_UNKNOWN 1 -# define LZO_INFO_ARCH "unknown" -#endif -#endif -#if !defined(LZO_ARCH_ARM_THUMB2) -#if (LZO_ARCH_ARM) -# if defined(__ARM_ARCH_ISA_THUMB) -# if ((__ARM_ARCH_ISA_THUMB)+0 >= 2) -# define LZO_ARCH_ARM_THUMB2 1 -# endif -# elif 1 && defined(__thumb2__) -# define LZO_ARCH_ARM_THUMB2 1 -# elif 1 && defined(__TARGET_ARCH_THUMB) && ((__TARGET_ARCH_THUMB)+0 >= 4) -# define LZO_ARCH_ARM_THUMB2 1 -# endif -#endif -#endif -#if 1 && (LZO_ARCH_UNKNOWN) && (LZO_OS_DOS32 || LZO_OS_OS2) -# error "FIXME - missing define for CPU architecture" -#endif -#if 1 && (LZO_ARCH_UNKNOWN) && (LZO_OS_WIN32) -# error "FIXME - missing LZO_OS_WIN32 define for CPU architecture" -#endif -#if 1 && (LZO_ARCH_UNKNOWN) && (LZO_OS_WIN64) -# error "FIXME - missing LZO_OS_WIN64 define for CPU architecture" -#endif -#if (LZO_OS_OS216 || LZO_OS_WIN16) -# define LZO_ARCH_I086PM 1 -#elif 1 && (LZO_OS_DOS16 && defined(BLX286)) -# define LZO_ARCH_I086PM 1 -#elif 1 && (LZO_OS_DOS16 && defined(DOSX286)) -# define LZO_ARCH_I086PM 1 -#elif 1 && (LZO_OS_DOS16 && LZO_CC_BORLANDC && defined(__DPMI16__)) -# define LZO_ARCH_I086PM 1 -#endif -#if (LZO_ARCH_AMD64 && !LZO_ARCH_X64) -# define LZO_ARCH_X64 1 -#elif (!LZO_ARCH_AMD64 && LZO_ARCH_X64) && defined(__LZO_ARCH_OVERRIDE) -# define LZO_ARCH_AMD64 1 -#endif -#if (LZO_ARCH_ARM64 && !LZO_ARCH_AARCH64) -# define LZO_ARCH_AARCH64 1 -#elif (!LZO_ARCH_ARM64 && LZO_ARCH_AARCH64) && defined(__LZO_ARCH_OVERRIDE) -# define LZO_ARCH_ARM64 1 -#endif -#if (LZO_ARCH_I386 && !LZO_ARCH_X86) -# define LZO_ARCH_X86 1 -#elif (!LZO_ARCH_I386 && LZO_ARCH_X86) && defined(__LZO_ARCH_OVERRIDE) -# define LZO_ARCH_I386 1 -#endif -#if (LZO_ARCH_AMD64 && !LZO_ARCH_X64) || (!LZO_ARCH_AMD64 && LZO_ARCH_X64) -# error "unexpected configuration - check your compiler defines" -#endif -#if (LZO_ARCH_ARM64 && !LZO_ARCH_AARCH64) || (!LZO_ARCH_ARM64 && LZO_ARCH_AARCH64) -# error "unexpected configuration - check your compiler defines" -#endif -#if (LZO_ARCH_I386 && !LZO_ARCH_X86) || (!LZO_ARCH_I386 && LZO_ARCH_X86) -# error "unexpected configuration - check your compiler defines" -#endif -#if (LZO_ARCH_ARM_THUMB1 && !LZO_ARCH_ARM) -# error "unexpected configuration - check your compiler defines" -#endif -#if (LZO_ARCH_ARM_THUMB2 && !LZO_ARCH_ARM) -# error "unexpected configuration - check your compiler defines" -#endif -#if (LZO_ARCH_ARM_THUMB1 && LZO_ARCH_ARM_THUMB2) -# error "unexpected configuration - check your compiler defines" -#endif -#if (LZO_ARCH_I086PM && !LZO_ARCH_I086) -# error "unexpected configuration - check your compiler defines" -#endif -#if (LZO_ARCH_I086) -# if (UINT_MAX != LZO_0xffffL) -# error "unexpected configuration - check your compiler defines" -# endif -# if (ULONG_MAX != LZO_0xffffffffL) -# error "unexpected configuration - check your compiler defines" -# endif -#endif -#if (LZO_ARCH_I386) -# if (UINT_MAX != LZO_0xffffL) && defined(__i386_int16__) -# error "unexpected configuration - check your compiler defines" -# endif -# if (UINT_MAX != LZO_0xffffffffL) && !defined(__i386_int16__) -# error "unexpected configuration - check your compiler defines" -# endif -# if (ULONG_MAX != LZO_0xffffffffL) -# error "unexpected configuration - check your compiler defines" -# endif -#endif -#if (LZO_ARCH_AMD64 || LZO_ARCH_I386) -# if !defined(LZO_TARGET_FEATURE_SSE2) -# if defined(__SSE2__) -# define LZO_TARGET_FEATURE_SSE2 1 -# elif defined(_MSC_VER) && (defined(_M_IX86_FP) && ((_M_IX86_FP)+0 >= 2)) -# define LZO_TARGET_FEATURE_SSE2 1 -# elif (LZO_CC_INTELC_MSC || LZO_CC_MSC) && defined(_M_AMD64) -# define LZO_TARGET_FEATURE_SSE2 1 -# endif -# endif -# if !defined(LZO_TARGET_FEATURE_SSSE3) -# if (LZO_TARGET_FEATURE_SSE2) -# if defined(__SSSE3__) -# define LZO_TARGET_FEATURE_SSSE3 1 -# elif defined(_MSC_VER) && defined(__AVX__) -# define LZO_TARGET_FEATURE_SSSE3 1 -# endif -# endif -# endif -# if !defined(LZO_TARGET_FEATURE_SSE4_2) -# if (LZO_TARGET_FEATURE_SSSE3) -# if defined(__SSE4_2__) -# define LZO_TARGET_FEATURE_SSE4_2 1 -# endif -# endif -# endif -# if !defined(LZO_TARGET_FEATURE_AVX) -# if (LZO_TARGET_FEATURE_SSSE3) -# if defined(__AVX__) -# define LZO_TARGET_FEATURE_AVX 1 -# endif -# endif -# endif -# if !defined(LZO_TARGET_FEATURE_AVX2) -# if (LZO_TARGET_FEATURE_AVX) -# if defined(__AVX2__) -# define LZO_TARGET_FEATURE_AVX2 1 -# endif -# endif -# endif -#endif -#if (LZO_TARGET_FEATURE_SSSE3 && !(LZO_TARGET_FEATURE_SSE2)) -# error "unexpected configuration - check your compiler defines" -#endif -#if (LZO_TARGET_FEATURE_SSE4_2 && !(LZO_TARGET_FEATURE_SSSE3)) -# error "unexpected configuration - check your compiler defines" -#endif -#if (LZO_TARGET_FEATURE_AVX && !(LZO_TARGET_FEATURE_SSSE3)) -# error "unexpected configuration - check your compiler defines" -#endif -#if (LZO_TARGET_FEATURE_AVX2 && !(LZO_TARGET_FEATURE_AVX)) -# error "unexpected configuration - check your compiler defines" -#endif -#if (LZO_ARCH_ARM) -# if !defined(LZO_TARGET_FEATURE_NEON) -# if defined(__ARM_NEON) && ((__ARM_NEON)+0) -# define LZO_TARGET_FEATURE_NEON 1 -# elif 1 && defined(__ARM_NEON__) && ((__ARM_NEON__)+0) -# define LZO_TARGET_FEATURE_NEON 1 -# elif 1 && defined(__TARGET_FEATURE_NEON) && ((__TARGET_FEATURE_NEON)+0) -# define LZO_TARGET_FEATURE_NEON 1 -# endif -# endif -#elif (LZO_ARCH_ARM64) -# if !defined(LZO_TARGET_FEATURE_NEON) -# if 1 -# define LZO_TARGET_FEATURE_NEON 1 -# endif -# endif -#endif -#if 0 -#elif !defined(__LZO_MM_OVERRIDE) -#if (LZO_ARCH_I086) -#if (UINT_MAX != LZO_0xffffL) -# error "unexpected configuration - check your compiler defines" -#endif -#if defined(__TINY__) || defined(M_I86TM) || defined(_M_I86TM) -# define LZO_MM_TINY 1 -#elif defined(__HUGE__) || defined(_HUGE_) || defined(M_I86HM) || defined(_M_I86HM) -# define LZO_MM_HUGE 1 -#elif defined(__SMALL__) || defined(M_I86SM) || defined(_M_I86SM) || defined(SMALL_MODEL) -# define LZO_MM_SMALL 1 -#elif defined(__MEDIUM__) || defined(M_I86MM) || defined(_M_I86MM) -# define LZO_MM_MEDIUM 1 -#elif defined(__COMPACT__) || defined(M_I86CM) || defined(_M_I86CM) -# define LZO_MM_COMPACT 1 -#elif defined(__LARGE__) || defined(M_I86LM) || defined(_M_I86LM) || defined(LARGE_MODEL) -# define LZO_MM_LARGE 1 -#elif (LZO_CC_AZTECC) -# if defined(_LARGE_CODE) && defined(_LARGE_DATA) -# define LZO_MM_LARGE 1 -# elif defined(_LARGE_CODE) -# define LZO_MM_MEDIUM 1 -# elif defined(_LARGE_DATA) -# define LZO_MM_COMPACT 1 -# else -# define LZO_MM_SMALL 1 -# endif -#elif (LZO_CC_ZORTECHC && defined(__VCM__)) -# define LZO_MM_LARGE 1 -#else -# error "unknown LZO_ARCH_I086 memory model" -#endif -#if (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16) -#define LZO_HAVE_MM_HUGE_PTR 1 -#define LZO_HAVE_MM_HUGE_ARRAY 1 -#if (LZO_MM_TINY) -# undef LZO_HAVE_MM_HUGE_ARRAY -#endif -#if (LZO_CC_AZTECC || LZO_CC_PACIFICC || LZO_CC_ZORTECHC) -# undef LZO_HAVE_MM_HUGE_PTR -# undef LZO_HAVE_MM_HUGE_ARRAY -#elif (LZO_CC_DMC || LZO_CC_SYMANTECC) -# undef LZO_HAVE_MM_HUGE_ARRAY -#elif (LZO_CC_MSC && defined(_QC)) -# undef LZO_HAVE_MM_HUGE_ARRAY -# if (_MSC_VER < 600) -# undef LZO_HAVE_MM_HUGE_PTR -# endif -#elif (LZO_CC_TURBOC && (__TURBOC__ < 0x0295)) -# undef LZO_HAVE_MM_HUGE_ARRAY -#endif -#if (LZO_ARCH_I086PM) && !(LZO_HAVE_MM_HUGE_PTR) -# if (LZO_OS_DOS16) -# error "unexpected configuration - check your compiler defines" -# elif (LZO_CC_ZORTECHC) -# else -# error "unexpected configuration - check your compiler defines" -# endif -#endif -#ifdef __cplusplus -extern "C" { -#endif -#if (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0200)) - extern void __near __cdecl _AHSHIFT(void); -# define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT) -#elif (LZO_CC_DMC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC) - extern void __near __cdecl _AHSHIFT(void); -# define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT) -#elif (LZO_CC_MSC || LZO_CC_TOPSPEEDC) - extern void __near __cdecl _AHSHIFT(void); -# define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT) -#elif (LZO_CC_TURBOC && (__TURBOC__ >= 0x0295)) - extern void __near __cdecl _AHSHIFT(void); -# define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT) -#elif ((LZO_CC_AZTECC || LZO_CC_PACIFICC || LZO_CC_TURBOC) && LZO_OS_DOS16) -# define LZO_MM_AHSHIFT 12 -#elif (LZO_CC_WATCOMC) - extern unsigned char _HShift; -# define LZO_MM_AHSHIFT ((unsigned) _HShift) -#else -# error "FIXME - implement LZO_MM_AHSHIFT" -#endif -#ifdef __cplusplus -} -#endif -#endif -#elif (LZO_ARCH_C166) -#if !defined(__MODEL__) -# error "FIXME - LZO_ARCH_C166 __MODEL__" -#elif ((__MODEL__) == 0) -# define LZO_MM_SMALL 1 -#elif ((__MODEL__) == 1) -# define LZO_MM_SMALL 1 -#elif ((__MODEL__) == 2) -# define LZO_MM_LARGE 1 -#elif ((__MODEL__) == 3) -# define LZO_MM_TINY 1 -#elif ((__MODEL__) == 4) -# define LZO_MM_XTINY 1 -#elif ((__MODEL__) == 5) -# define LZO_MM_XSMALL 1 -#else -# error "FIXME - LZO_ARCH_C166 __MODEL__" -#endif -#elif (LZO_ARCH_MCS251) -#if !defined(__MODEL__) -# error "FIXME - LZO_ARCH_MCS251 __MODEL__" -#elif ((__MODEL__) == 0) -# define LZO_MM_SMALL 1 -#elif ((__MODEL__) == 2) -# define LZO_MM_LARGE 1 -#elif ((__MODEL__) == 3) -# define LZO_MM_TINY 1 -#elif ((__MODEL__) == 4) -# define LZO_MM_XTINY 1 -#elif ((__MODEL__) == 5) -# define LZO_MM_XSMALL 1 -#else -# error "FIXME - LZO_ARCH_MCS251 __MODEL__" -#endif -#elif (LZO_ARCH_MCS51) -#if !defined(__MODEL__) -# error "FIXME - LZO_ARCH_MCS51 __MODEL__" -#elif ((__MODEL__) == 1) -# define LZO_MM_SMALL 1 -#elif ((__MODEL__) == 2) -# define LZO_MM_LARGE 1 -#elif ((__MODEL__) == 3) -# define LZO_MM_TINY 1 -#elif ((__MODEL__) == 4) -# define LZO_MM_XTINY 1 -#elif ((__MODEL__) == 5) -# define LZO_MM_XSMALL 1 -#else -# error "FIXME - LZO_ARCH_MCS51 __MODEL__" -#endif -#elif (LZO_ARCH_CRAY_PVP) -# define LZO_MM_PVP 1 -#else -# define LZO_MM_FLAT 1 -#endif -#if (LZO_MM_COMPACT) -# define LZO_INFO_MM "compact" -#elif (LZO_MM_FLAT) -# define LZO_INFO_MM "flat" -#elif (LZO_MM_HUGE) -# define LZO_INFO_MM "huge" -#elif (LZO_MM_LARGE) -# define LZO_INFO_MM "large" -#elif (LZO_MM_MEDIUM) -# define LZO_INFO_MM "medium" -#elif (LZO_MM_PVP) -# define LZO_INFO_MM "pvp" -#elif (LZO_MM_SMALL) -# define LZO_INFO_MM "small" -#elif (LZO_MM_TINY) -# define LZO_INFO_MM "tiny" -#else -# error "unknown memory model" -#endif -#endif -#if !defined(__lzo_gnuc_extension__) -#if (LZO_CC_GNUC >= 0x020800ul) -# define __lzo_gnuc_extension__ __extension__ -#elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) -# define __lzo_gnuc_extension__ __extension__ -#elif (LZO_CC_IBMC >= 600) -# define __lzo_gnuc_extension__ __extension__ -#else -#endif -#endif -#if !defined(__lzo_gnuc_extension__) -# define __lzo_gnuc_extension__ /*empty*/ -#endif -#if !defined(lzo_has_builtin) -#if (LZO_CC_CLANG) && defined(__has_builtin) -# define lzo_has_builtin __has_builtin -#endif -#endif -#if !defined(lzo_has_builtin) -# define lzo_has_builtin(x) 0 -#endif -#if !defined(lzo_has_attribute) -#if (LZO_CC_CLANG) && defined(__has_attribute) -# define lzo_has_attribute __has_attribute -#endif -#endif -#if !defined(lzo_has_attribute) -# define lzo_has_attribute(x) 0 -#endif -#if !defined(lzo_has_declspec_attribute) -#if (LZO_CC_CLANG) && defined(__has_declspec_attribute) -# define lzo_has_declspec_attribute __has_declspec_attribute -#endif -#endif -#if !defined(lzo_has_declspec_attribute) -# define lzo_has_declspec_attribute(x) 0 -#endif -#if !defined(lzo_has_feature) -#if (LZO_CC_CLANG) && defined(__has_feature) -# define lzo_has_feature __has_feature -#endif -#endif -#if !defined(lzo_has_feature) -# define lzo_has_feature(x) 0 -#endif -#if !defined(lzo_has_extension) -#if (LZO_CC_CLANG) && defined(__has_extension) -# define lzo_has_extension __has_extension -#elif (LZO_CC_CLANG) && defined(__has_feature) -# define lzo_has_extension __has_feature -#endif -#endif -#if !defined(lzo_has_extension) -# define lzo_has_extension 0 -#endif -#if !defined(LZO_CFG_USE_NEW_STYLE_CASTS) && defined(__cplusplus) && 0 -# if (LZO_CC_GNUC && (LZO_CC_GNUC < 0x020800ul)) -# define LZO_CFG_USE_NEW_STYLE_CASTS 0 -# elif (LZO_CC_INTELC && (__INTEL_COMPILER < 1200)) -# define LZO_CFG_USE_NEW_STYLE_CASTS 0 -# else -# define LZO_CFG_USE_NEW_STYLE_CASTS 1 -# endif -#endif -#if !defined(LZO_CFG_USE_NEW_STYLE_CASTS) -# define LZO_CFG_USE_NEW_STYLE_CASTS 0 -#endif -#if !defined(__cplusplus) -# if defined(LZO_CFG_USE_NEW_STYLE_CASTS) -# undef LZO_CFG_USE_NEW_STYLE_CASTS -# endif -# define LZO_CFG_USE_NEW_STYLE_CASTS 0 -#endif -#if !defined(LZO_REINTERPRET_CAST) -# if (LZO_CFG_USE_NEW_STYLE_CASTS) -# define LZO_REINTERPRET_CAST(t,e) (reinterpret_cast<t> (e)) -# endif -#endif -#if !defined(LZO_REINTERPRET_CAST) -# define LZO_REINTERPRET_CAST(t,e) ((t) (e)) -#endif -#if !defined(LZO_STATIC_CAST) -# if (LZO_CFG_USE_NEW_STYLE_CASTS) -# define LZO_STATIC_CAST(t,e) (static_cast<t> (e)) -# endif -#endif -#if !defined(LZO_STATIC_CAST) -# define LZO_STATIC_CAST(t,e) ((t) (e)) -#endif -#if !defined(LZO_STATIC_CAST2) -# define LZO_STATIC_CAST2(t1,t2,e) LZO_STATIC_CAST(t1, LZO_STATIC_CAST(t2, e)) -#endif -#if !defined(LZO_UNCONST_CAST) -# if (LZO_CFG_USE_NEW_STYLE_CASTS) -# define LZO_UNCONST_CAST(t,e) (const_cast<t> (e)) -# elif (LZO_HAVE_MM_HUGE_PTR) -# define LZO_UNCONST_CAST(t,e) ((t) (e)) -# elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE) -# define LZO_UNCONST_CAST(t,e) ((t) ((void *) ((lzo_uintptr_t) ((const void *) (e))))) -# endif -#endif -#if !defined(LZO_UNCONST_CAST) -# define LZO_UNCONST_CAST(t,e) ((t) ((void *) ((const void *) (e)))) -#endif -#if !defined(LZO_UNCONST_VOLATILE_CAST) -# if (LZO_CFG_USE_NEW_STYLE_CASTS) -# define LZO_UNCONST_VOLATILE_CAST(t,e) (const_cast<t> (e)) -# elif (LZO_HAVE_MM_HUGE_PTR) -# define LZO_UNCONST_VOLATILE_CAST(t,e) ((t) (e)) -# elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE) -# define LZO_UNCONST_VOLATILE_CAST(t,e) ((t) ((volatile void *) ((lzo_uintptr_t) ((volatile const void *) (e))))) -# endif -#endif -#if !defined(LZO_UNCONST_VOLATILE_CAST) -# define LZO_UNCONST_VOLATILE_CAST(t,e) ((t) ((volatile void *) ((volatile const void *) (e)))) -#endif -#if !defined(LZO_UNVOLATILE_CAST) -# if (LZO_CFG_USE_NEW_STYLE_CASTS) -# define LZO_UNVOLATILE_CAST(t,e) (const_cast<t> (e)) -# elif (LZO_HAVE_MM_HUGE_PTR) -# define LZO_UNVOLATILE_CAST(t,e) ((t) (e)) -# elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE) -# define LZO_UNVOLATILE_CAST(t,e) ((t) ((void *) ((lzo_uintptr_t) ((volatile void *) (e))))) -# endif -#endif -#if !defined(LZO_UNVOLATILE_CAST) -# define LZO_UNVOLATILE_CAST(t,e) ((t) ((void *) ((volatile void *) (e)))) -#endif -#if !defined(LZO_UNVOLATILE_CONST_CAST) -# if (LZO_CFG_USE_NEW_STYLE_CASTS) -# define LZO_UNVOLATILE_CONST_CAST(t,e) (const_cast<t> (e)) -# elif (LZO_HAVE_MM_HUGE_PTR) -# define LZO_UNVOLATILE_CONST_CAST(t,e) ((t) (e)) -# elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE) -# define LZO_UNVOLATILE_CONST_CAST(t,e) ((t) ((const void *) ((lzo_uintptr_t) ((volatile const void *) (e))))) -# endif -#endif -#if !defined(LZO_UNVOLATILE_CONST_CAST) -# define LZO_UNVOLATILE_CONST_CAST(t,e) ((t) ((const void *) ((volatile const void *) (e)))) -#endif -#if !defined(LZO_PCAST) -# if (LZO_HAVE_MM_HUGE_PTR) -# define LZO_PCAST(t,e) ((t) (e)) -# endif -#endif -#if !defined(LZO_PCAST) -# define LZO_PCAST(t,e) LZO_STATIC_CAST(t, LZO_STATIC_CAST(void *, e)) -#endif -#if !defined(LZO_CCAST) -# if (LZO_HAVE_MM_HUGE_PTR) -# define LZO_CCAST(t,e) ((t) (e)) -# endif -#endif -#if !defined(LZO_CCAST) -# define LZO_CCAST(t,e) LZO_STATIC_CAST(t, LZO_STATIC_CAST(const void *, e)) -#endif -#if !defined(LZO_ICONV) -# define LZO_ICONV(t,e) LZO_STATIC_CAST(t, e) -#endif -#if !defined(LZO_ICAST) -# define LZO_ICAST(t,e) LZO_STATIC_CAST(t, e) -#endif -#if !defined(LZO_ITRUNC) -# define LZO_ITRUNC(t,e) LZO_STATIC_CAST(t, e) -#endif -#if !defined(__lzo_cte) -# if (LZO_CC_MSC || LZO_CC_WATCOMC) -# define __lzo_cte(e) ((void)0,(e)) -# elif 1 -# define __lzo_cte(e) ((void)0,(e)) -# endif -#endif -#if !defined(__lzo_cte) -# define __lzo_cte(e) (e) -#endif -#if !defined(LZO_BLOCK_BEGIN) -# define LZO_BLOCK_BEGIN do { -# define LZO_BLOCK_END } while __lzo_cte(0) -#endif -#if !defined(LZO_UNUSED) -# if (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0600)) -# define LZO_UNUSED(var) ((void) &var) -# elif (LZO_CC_BORLANDC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PELLESC || LZO_CC_TURBOC) -# define LZO_UNUSED(var) if (&var) ; else -# elif (LZO_CC_CLANG && (LZO_CC_CLANG >= 0x030200ul)) -# define LZO_UNUSED(var) ((void) &var) -# elif (LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE) -# define LZO_UNUSED(var) ((void) var) -# elif (LZO_CC_MSC && (_MSC_VER < 900)) -# define LZO_UNUSED(var) if (&var) ; else -# elif (LZO_CC_KEILC) -# define LZO_UNUSED(var) {extern int lzo_unused__[1-2*!(sizeof(var)>0)]; (void)lzo_unused__;} -# elif (LZO_CC_PACIFICC) -# define LZO_UNUSED(var) ((void) sizeof(var)) -# elif (LZO_CC_WATCOMC) && defined(__cplusplus) -# define LZO_UNUSED(var) ((void) var) -# else -# define LZO_UNUSED(var) ((void) &var) -# endif -#endif -#if !defined(LZO_UNUSED_FUNC) -# if (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0600)) -# define LZO_UNUSED_FUNC(func) ((void) func) -# elif (LZO_CC_BORLANDC || LZO_CC_NDPC || LZO_CC_TURBOC) -# define LZO_UNUSED_FUNC(func) if (func) ; else -# elif (LZO_CC_CLANG || LZO_CC_LLVM) -# define LZO_UNUSED_FUNC(func) ((void) &func) -# elif (LZO_CC_MSC && (_MSC_VER < 900)) -# define LZO_UNUSED_FUNC(func) if (func) ; else -# elif (LZO_CC_MSC) -# define LZO_UNUSED_FUNC(func) ((void) &func) -# elif (LZO_CC_KEILC || LZO_CC_PELLESC) -# define LZO_UNUSED_FUNC(func) {extern int lzo_unused__[1-2*!(sizeof((int)func)>0)]; (void)lzo_unused__;} -# else -# define LZO_UNUSED_FUNC(func) ((void) func) -# endif -#endif -#if !defined(LZO_UNUSED_LABEL) -# if (LZO_CC_CLANG >= 0x020800ul) -# define LZO_UNUSED_LABEL(l) (__lzo_gnuc_extension__ ((void) ((const void *) &&l))) -# elif (LZO_CC_ARMCC || LZO_CC_CLANG || LZO_CC_INTELC || LZO_CC_WATCOMC) -# define LZO_UNUSED_LABEL(l) if __lzo_cte(0) goto l -# else -# define LZO_UNUSED_LABEL(l) switch (0) case 1:goto l -# endif -#endif -#if !defined(LZO_DEFINE_UNINITIALIZED_VAR) -# if 0 -# define LZO_DEFINE_UNINITIALIZED_VAR(type,var,init) type var -# elif 0 && (LZO_CC_GNUC) -# define LZO_DEFINE_UNINITIALIZED_VAR(type,var,init) type var = var -# else -# define LZO_DEFINE_UNINITIALIZED_VAR(type,var,init) type var = init -# endif -#endif -#if !defined(__lzo_inline) -#if (LZO_CC_TURBOC && (__TURBOC__ <= 0x0295)) -#elif defined(__cplusplus) -# define __lzo_inline inline -#elif defined(__STDC_VERSION__) && (__STDC_VERSION__-0 >= 199901L) -# define __lzo_inline inline -#elif (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0550)) -# define __lzo_inline __inline -#elif (LZO_CC_ARMCC_GNUC || LZO_CC_CILLY || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || LZO_CC_PGI) -# define __lzo_inline __inline__ -#elif (LZO_CC_DMC) -# define __lzo_inline __inline -#elif (LZO_CC_GHS) -# define __lzo_inline __inline__ -#elif (LZO_CC_IBMC >= 600) -# define __lzo_inline __inline__ -#elif (LZO_CC_INTELC) -# define __lzo_inline __inline -#elif (LZO_CC_MWERKS && (__MWERKS__ >= 0x2405)) -# define __lzo_inline __inline -#elif (LZO_CC_MSC && (_MSC_VER >= 900)) -# define __lzo_inline __inline -#elif (LZO_CC_SUNPROC >= 0x5100) -# define __lzo_inline __inline__ -#endif -#endif -#if defined(__lzo_inline) -# ifndef __lzo_HAVE_inline -# define __lzo_HAVE_inline 1 -# endif -#else -# define __lzo_inline /*empty*/ -#endif -#if !defined(__lzo_forceinline) -#if (LZO_CC_GNUC >= 0x030200ul) -# define __lzo_forceinline __inline__ __attribute__((__always_inline__)) -#elif (LZO_CC_IBMC >= 700) -# define __lzo_forceinline __inline__ __attribute__((__always_inline__)) -#elif (LZO_CC_INTELC_MSC && (__INTEL_COMPILER >= 450)) -# define __lzo_forceinline __forceinline -#elif (LZO_CC_INTELC_GNUC && (__INTEL_COMPILER >= 800)) -# define __lzo_forceinline __inline__ __attribute__((__always_inline__)) -#elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) -# define __lzo_forceinline __inline__ __attribute__((__always_inline__)) -#elif (LZO_CC_MSC && (_MSC_VER >= 1200)) -# define __lzo_forceinline __forceinline -#elif (LZO_CC_PGI >= 0x0d0a00ul) -# define __lzo_forceinline __inline__ __attribute__((__always_inline__)) -#elif (LZO_CC_SUNPROC >= 0x5100) -# define __lzo_forceinline __inline__ __attribute__((__always_inline__)) -#endif -#endif -#if defined(__lzo_forceinline) -# ifndef __lzo_HAVE_forceinline -# define __lzo_HAVE_forceinline 1 -# endif -#else -# define __lzo_forceinline __lzo_inline -#endif -#if !defined(__lzo_noinline) -#if 1 && (LZO_ARCH_I386) && (LZO_CC_GNUC >= 0x040000ul) && (LZO_CC_GNUC < 0x040003ul) -# define __lzo_noinline __attribute__((__noinline__,__used__)) -#elif (LZO_CC_GNUC >= 0x030200ul) -# define __lzo_noinline __attribute__((__noinline__)) -#elif (LZO_CC_IBMC >= 700) -# define __lzo_noinline __attribute__((__noinline__)) -#elif (LZO_CC_INTELC_MSC && (__INTEL_COMPILER >= 600)) -# define __lzo_noinline __declspec(noinline) -#elif (LZO_CC_INTELC_GNUC && (__INTEL_COMPILER >= 800)) -# define __lzo_noinline __attribute__((__noinline__)) -#elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) -# define __lzo_noinline __attribute__((__noinline__)) -#elif (LZO_CC_MSC && (_MSC_VER >= 1300)) -# define __lzo_noinline __declspec(noinline) -#elif (LZO_CC_MWERKS && (__MWERKS__ >= 0x3200) && (LZO_OS_WIN32 || LZO_OS_WIN64)) -# if defined(__cplusplus) -# else -# define __lzo_noinline __declspec(noinline) -# endif -#elif (LZO_CC_PGI >= 0x0d0a00ul) -# define __lzo_noinline __attribute__((__noinline__)) -#elif (LZO_CC_SUNPROC >= 0x5100) -# define __lzo_noinline __attribute__((__noinline__)) -#endif -#endif -#if defined(__lzo_noinline) -# ifndef __lzo_HAVE_noinline -# define __lzo_HAVE_noinline 1 -# endif -#else -# define __lzo_noinline /*empty*/ -#endif -#if (__lzo_HAVE_forceinline || __lzo_HAVE_noinline) && !(__lzo_HAVE_inline) -# error "unexpected configuration - check your compiler defines" -#endif -#if !defined(__lzo_static_inline) -#if (LZO_CC_IBMC) -# define __lzo_static_inline __lzo_gnuc_extension__ static __lzo_inline -#endif -#endif -#if !defined(__lzo_static_inline) -# define __lzo_static_inline static __lzo_inline -#endif -#if !defined(__lzo_static_forceinline) -#if (LZO_CC_IBMC) -# define __lzo_static_forceinline __lzo_gnuc_extension__ static __lzo_forceinline -#endif -#endif -#if !defined(__lzo_static_forceinline) -# define __lzo_static_forceinline static __lzo_forceinline -#endif -#if !defined(__lzo_static_noinline) -#if (LZO_CC_IBMC) -# define __lzo_static_noinline __lzo_gnuc_extension__ static __lzo_noinline -#endif -#endif -#if !defined(__lzo_static_noinline) -# define __lzo_static_noinline static __lzo_noinline -#endif -#if !defined(__lzo_c99_extern_inline) -#if defined(__GNUC_GNU_INLINE__) -# define __lzo_c99_extern_inline __lzo_inline -#elif defined(__GNUC_STDC_INLINE__) -# define __lzo_c99_extern_inline extern __lzo_inline -#elif defined(__STDC_VERSION__) && (__STDC_VERSION__-0 >= 199901L) -# define __lzo_c99_extern_inline extern __lzo_inline -#endif -#if !defined(__lzo_c99_extern_inline) && (__lzo_HAVE_inline) -# define __lzo_c99_extern_inline __lzo_inline -#endif -#endif -#if defined(__lzo_c99_extern_inline) -# ifndef __lzo_HAVE_c99_extern_inline -# define __lzo_HAVE_c99_extern_inline 1 -# endif -#else -# define __lzo_c99_extern_inline /*empty*/ -#endif -#if !defined(__lzo_may_alias) -#if (LZO_CC_GNUC >= 0x030400ul) -# define __lzo_may_alias __attribute__((__may_alias__)) -#elif (LZO_CC_CLANG >= 0x020900ul) -# define __lzo_may_alias __attribute__((__may_alias__)) -#elif (LZO_CC_INTELC_GNUC && (__INTEL_COMPILER >= 1210)) && 0 -# define __lzo_may_alias __attribute__((__may_alias__)) -#elif (LZO_CC_PGI >= 0x0d0a00ul) && 0 -# define __lzo_may_alias __attribute__((__may_alias__)) -#endif -#endif -#if defined(__lzo_may_alias) -# ifndef __lzo_HAVE_may_alias -# define __lzo_HAVE_may_alias 1 -# endif -#else -# define __lzo_may_alias /*empty*/ -#endif -#if !defined(__lzo_noreturn) -#if (LZO_CC_GNUC >= 0x020700ul) -# define __lzo_noreturn __attribute__((__noreturn__)) -#elif (LZO_CC_IBMC >= 700) -# define __lzo_noreturn __attribute__((__noreturn__)) -#elif (LZO_CC_INTELC_MSC && (__INTEL_COMPILER >= 450)) -# define __lzo_noreturn __declspec(noreturn) -#elif (LZO_CC_INTELC_GNUC && (__INTEL_COMPILER >= 600)) -# define __lzo_noreturn __attribute__((__noreturn__)) -#elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) -# define __lzo_noreturn __attribute__((__noreturn__)) -#elif (LZO_CC_MSC && (_MSC_VER >= 1200)) -# define __lzo_noreturn __declspec(noreturn) -#elif (LZO_CC_PGI >= 0x0d0a00ul) -# define __lzo_noreturn __attribute__((__noreturn__)) -#endif -#endif -#if defined(__lzo_noreturn) -# ifndef __lzo_HAVE_noreturn -# define __lzo_HAVE_noreturn 1 -# endif -#else -# define __lzo_noreturn /*empty*/ -#endif -#if !defined(__lzo_nothrow) -#if (LZO_CC_GNUC >= 0x030300ul) -# define __lzo_nothrow __attribute__((__nothrow__)) -#elif (LZO_CC_INTELC_MSC && (__INTEL_COMPILER >= 450)) && defined(__cplusplus) -# define __lzo_nothrow __declspec(nothrow) -#elif (LZO_CC_INTELC_GNUC && (__INTEL_COMPILER >= 900)) -# define __lzo_nothrow __attribute__((__nothrow__)) -#elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) -# define __lzo_nothrow __attribute__((__nothrow__)) -#elif (LZO_CC_MSC && (_MSC_VER >= 1200)) && defined(__cplusplus) -# define __lzo_nothrow __declspec(nothrow) -#endif -#endif -#if defined(__lzo_nothrow) -# ifndef __lzo_HAVE_nothrow -# define __lzo_HAVE_nothrow 1 -# endif -#else -# define __lzo_nothrow /*empty*/ -#endif -#if !defined(__lzo_restrict) -#if (LZO_CC_GNUC >= 0x030400ul) -# define __lzo_restrict __restrict__ -#elif (LZO_CC_IBMC >= 800) && !defined(__cplusplus) -# define __lzo_restrict __restrict__ -#elif (LZO_CC_IBMC >= 1210) -# define __lzo_restrict __restrict__ -#elif (LZO_CC_INTELC_MSC && (__INTEL_COMPILER >= 600)) -#elif (LZO_CC_INTELC_GNUC && (__INTEL_COMPILER >= 600)) -# define __lzo_restrict __restrict__ -#elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_LLVM) -# define __lzo_restrict __restrict__ -#elif (LZO_CC_MSC && (_MSC_VER >= 1400)) -# define __lzo_restrict __restrict -#elif (LZO_CC_PGI >= 0x0d0a00ul) -# define __lzo_restrict __restrict__ -#endif -#endif -#if defined(__lzo_restrict) -# ifndef __lzo_HAVE_restrict -# define __lzo_HAVE_restrict 1 -# endif -#else -# define __lzo_restrict /*empty*/ -#endif -#if !defined(__lzo_alignof) -#if (LZO_CC_ARMCC || LZO_CC_CILLY || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || LZO_CC_PGI) -# define __lzo_alignof(e) __alignof__(e) -#elif (LZO_CC_GHS) && !defined(__cplusplus) -# define __lzo_alignof(e) __alignof__(e) -#elif (LZO_CC_IBMC >= 600) -# define __lzo_alignof(e) (__lzo_gnuc_extension__ __alignof__(e)) -#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 700)) -# define __lzo_alignof(e) __alignof__(e) -#elif (LZO_CC_MSC && (_MSC_VER >= 1300)) -# define __lzo_alignof(e) __alignof(e) -#elif (LZO_CC_SUNPROC >= 0x5100) -# define __lzo_alignof(e) __alignof__(e) -#endif -#endif -#if defined(__lzo_alignof) -# ifndef __lzo_HAVE_alignof -# define __lzo_HAVE_alignof 1 -# endif -#endif -#if !defined(__lzo_struct_packed) -#if (LZO_CC_CLANG && (LZO_CC_CLANG < 0x020800ul)) && defined(__cplusplus) -#elif (LZO_CC_GNUC && (LZO_CC_GNUC < 0x020700ul)) -#elif (LZO_CC_GNUC && (LZO_CC_GNUC < 0x020800ul)) && defined(__cplusplus) -#elif (LZO_CC_PCC && (LZO_CC_PCC < 0x010100ul)) -#elif (LZO_CC_SUNPROC && (LZO_CC_SUNPROC < 0x5110)) && !defined(__cplusplus) -#elif (LZO_CC_GNUC >= 0x030400ul) && !(LZO_CC_PCC_GNUC) && (LZO_ARCH_AMD64 || LZO_ARCH_I386) -# define __lzo_struct_packed(s) struct s { -# define __lzo_struct_packed_end() } __attribute__((__gcc_struct__,__packed__)); -# define __lzo_struct_packed_ma_end() } __lzo_may_alias __attribute__((__gcc_struct__,__packed__)); -#elif (LZO_CC_ARMCC || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_INTELC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || (LZO_CC_PGI >= 0x0d0a00ul) || (LZO_CC_SUNPROC >= 0x5100)) -# define __lzo_struct_packed(s) struct s { -# define __lzo_struct_packed_end() } __attribute__((__packed__)); -# define __lzo_struct_packed_ma_end() } __lzo_may_alias __attribute__((__packed__)); -#elif (LZO_CC_IBMC >= 700) -# define __lzo_struct_packed(s) __lzo_gnuc_extension__ struct s { -# define __lzo_struct_packed_end() } __attribute__((__packed__)); -# define __lzo_struct_packed_ma_end() } __lzo_may_alias __attribute__((__packed__)); -#elif (LZO_CC_INTELC_MSC) || (LZO_CC_MSC && (_MSC_VER >= 1300)) -# define __lzo_struct_packed(s) __pragma(pack(push,1)) struct s { -# define __lzo_struct_packed_end() } __pragma(pack(pop)); -#elif (LZO_CC_WATCOMC && (__WATCOMC__ >= 900)) -# define __lzo_struct_packed(s) _Packed struct s { -# define __lzo_struct_packed_end() }; -#endif -#endif -#if defined(__lzo_struct_packed) && !defined(__lzo_struct_packed_ma) -# define __lzo_struct_packed_ma(s) __lzo_struct_packed(s) -#endif -#if defined(__lzo_struct_packed_end) && !defined(__lzo_struct_packed_ma_end) -# define __lzo_struct_packed_ma_end() __lzo_struct_packed_end() -#endif -#if !defined(__lzo_byte_struct) -#if defined(__lzo_struct_packed) -# define __lzo_byte_struct(s,n) __lzo_struct_packed(s) unsigned char a[n]; __lzo_struct_packed_end() -# define __lzo_byte_struct_ma(s,n) __lzo_struct_packed_ma(s) unsigned char a[n]; __lzo_struct_packed_ma_end() -#elif (LZO_CC_CILLY || LZO_CC_CLANG || LZO_CC_PGI || (LZO_CC_SUNPROC >= 0x5100)) -# define __lzo_byte_struct(s,n) struct s { unsigned char a[n]; } __attribute__((__packed__)); -# define __lzo_byte_struct_ma(s,n) struct s { unsigned char a[n]; } __lzo_may_alias __attribute__((__packed__)); -#endif -#endif -#if defined(__lzo_byte_struct) && !defined(__lzo_byte_struct_ma) -# define __lzo_byte_struct_ma(s,n) __lzo_byte_struct(s,n) -#endif -#if !defined(__lzo_struct_align16) && (__lzo_HAVE_alignof) -#if (LZO_CC_GNUC && (LZO_CC_GNUC < 0x030000ul)) -#elif (LZO_CC_CLANG && (LZO_CC_CLANG < 0x020800ul)) && defined(__cplusplus) -#elif (LZO_CC_CILLY || LZO_CC_PCC) -#elif (LZO_CC_INTELC_MSC) || (LZO_CC_MSC && (_MSC_VER >= 1300)) -# define __lzo_struct_align16(s) struct __declspec(align(16)) s { -# define __lzo_struct_align16_end() }; -# define __lzo_struct_align32(s) struct __declspec(align(32)) s { -# define __lzo_struct_align32_end() }; -# define __lzo_struct_align64(s) struct __declspec(align(64)) s { -# define __lzo_struct_align64_end() }; -#elif (LZO_CC_ARMCC || LZO_CC_CLANG || LZO_CC_GNUC || (LZO_CC_IBMC >= 700) || LZO_CC_INTELC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE) -# define __lzo_struct_align16(s) struct s { -# define __lzo_struct_align16_end() } __attribute__((__aligned__(16))); -# define __lzo_struct_align32(s) struct s { -# define __lzo_struct_align32_end() } __attribute__((__aligned__(32))); -# define __lzo_struct_align64(s) struct s { -# define __lzo_struct_align64_end() } __attribute__((__aligned__(64))); -#endif -#endif -#if !defined(__lzo_union_um) -#if (LZO_CC_CLANG && (LZO_CC_CLANG < 0x020800ul)) && defined(__cplusplus) -#elif (LZO_CC_GNUC && (LZO_CC_GNUC < 0x020700ul)) -#elif (LZO_CC_GNUC && (LZO_CC_GNUC < 0x020800ul)) && defined(__cplusplus) -#elif (LZO_CC_INTELC_GNUC && (__INTEL_COMPILER < 810)) -#elif (LZO_CC_PCC && (LZO_CC_PCC < 0x010100ul)) -#elif (LZO_CC_SUNPROC && (LZO_CC_SUNPROC < 0x5110)) && !defined(__cplusplus) -#elif (LZO_CC_ARMCC || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_INTELC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || (LZO_CC_PGI >= 0x0d0a00ul) || (LZO_CC_SUNPROC >= 0x5100)) -# define __lzo_union_am(s) union s { -# define __lzo_union_am_end() } __lzo_may_alias; -# define __lzo_union_um(s) union s { -# define __lzo_union_um_end() } __lzo_may_alias __attribute__((__packed__)); -#elif (LZO_CC_IBMC >= 700) -# define __lzo_union_am(s) __lzo_gnuc_extension__ union s { -# define __lzo_union_am_end() } __lzo_may_alias; -# define __lzo_union_um(s) __lzo_gnuc_extension__ union s { -# define __lzo_union_um_end() } __lzo_may_alias __attribute__((__packed__)); -#elif (LZO_CC_INTELC_MSC) || (LZO_CC_MSC && (_MSC_VER >= 1300)) -# define __lzo_union_um(s) __pragma(pack(push,1)) union s { -# define __lzo_union_um_end() } __pragma(pack(pop)); -#elif (LZO_CC_WATCOMC && (__WATCOMC__ >= 900)) -# define __lzo_union_um(s) _Packed union s { -# define __lzo_union_um_end() }; -#endif -#endif -#if !defined(__lzo_union_am) -# define __lzo_union_am(s) union s { -# define __lzo_union_am_end() }; -#endif -#if !defined(__lzo_constructor) -#if (LZO_CC_GNUC >= 0x030400ul) -# define __lzo_constructor __attribute__((__constructor__,__used__)) -#elif (LZO_CC_GNUC >= 0x020700ul) -# define __lzo_constructor __attribute__((__constructor__)) -#elif (LZO_CC_INTELC_GNUC && (__INTEL_COMPILER >= 800)) -# define __lzo_constructor __attribute__((__constructor__,__used__)) -#elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) -# define __lzo_constructor __attribute__((__constructor__)) -#endif -#endif -#if defined(__lzo_constructor) -# ifndef __lzo_HAVE_constructor -# define __lzo_HAVE_constructor 1 -# endif -#endif -#if !defined(__lzo_destructor) -#if (LZO_CC_GNUC >= 0x030400ul) -# define __lzo_destructor __attribute__((__destructor__,__used__)) -#elif (LZO_CC_GNUC >= 0x020700ul) -# define __lzo_destructor __attribute__((__destructor__)) -#elif (LZO_CC_INTELC_GNUC && (__INTEL_COMPILER >= 800)) -# define __lzo_destructor __attribute__((__destructor__,__used__)) -#elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) -# define __lzo_destructor __attribute__((__destructor__)) -#endif -#endif -#if defined(__lzo_destructor) -# ifndef __lzo_HAVE_destructor -# define __lzo_HAVE_destructor 1 -# endif -#endif -#if (__lzo_HAVE_destructor) && !(__lzo_HAVE_constructor) -# error "unexpected configuration - check your compiler defines" -#endif -#if !defined(__lzo_likely) && !defined(__lzo_unlikely) -#if (LZO_CC_GNUC >= 0x030200ul) -# define __lzo_likely(e) (__builtin_expect(!!(e),1)) -# define __lzo_unlikely(e) (__builtin_expect(!!(e),0)) -#elif (LZO_CC_IBMC >= 1010) -# define __lzo_likely(e) (__builtin_expect(!!(e),1)) -# define __lzo_unlikely(e) (__builtin_expect(!!(e),0)) -#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 800)) -# define __lzo_likely(e) (__builtin_expect(!!(e),1)) -# define __lzo_unlikely(e) (__builtin_expect(!!(e),0)) -#elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) -# define __lzo_likely(e) (__builtin_expect(!!(e),1)) -# define __lzo_unlikely(e) (__builtin_expect(!!(e),0)) -#endif -#endif -#if defined(__lzo_likely) -# ifndef __lzo_HAVE_likely -# define __lzo_HAVE_likely 1 -# endif -#else -# define __lzo_likely(e) (e) -#endif -#if defined(__lzo_very_likely) -# ifndef __lzo_HAVE_very_likely -# define __lzo_HAVE_very_likely 1 -# endif -#else -# define __lzo_very_likely(e) __lzo_likely(e) -#endif -#if defined(__lzo_unlikely) -# ifndef __lzo_HAVE_unlikely -# define __lzo_HAVE_unlikely 1 -# endif -#else -# define __lzo_unlikely(e) (e) -#endif -#if defined(__lzo_very_unlikely) -# ifndef __lzo_HAVE_very_unlikely -# define __lzo_HAVE_very_unlikely 1 -# endif -#else -# define __lzo_very_unlikely(e) __lzo_unlikely(e) -#endif -#if !defined(__lzo_loop_forever) -# if (LZO_CC_IBMC) -# define __lzo_loop_forever() LZO_BLOCK_BEGIN for (;;) { ; } LZO_BLOCK_END -# else -# define __lzo_loop_forever() do { ; } while __lzo_cte(1) -# endif -#endif -#if !defined(__lzo_unreachable) -#if (LZO_CC_CLANG && (LZO_CC_CLANG >= 0x020800ul)) && lzo_has_builtin(__builtin_unreachable) -# define __lzo_unreachable() __builtin_unreachable(); -#elif (LZO_CC_GNUC >= 0x040500ul) -# define __lzo_unreachable() __builtin_unreachable(); -#elif (LZO_CC_INTELC_GNUC && (__INTEL_COMPILER >= 1300)) && 1 -# define __lzo_unreachable() __builtin_unreachable(); -#endif -#endif -#if defined(__lzo_unreachable) -# ifndef __lzo_HAVE_unreachable -# define __lzo_HAVE_unreachable 1 -# endif -#else -# if 0 -# define __lzo_unreachable() ((void)0); -# else -# define __lzo_unreachable() __lzo_loop_forever(); -# endif -#endif -#if !defined(lzo_unused_funcs_impl) -# if 1 && (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || (LZO_CC_GNUC >= 0x020700ul) || LZO_CC_INTELC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || LZO_CC_PGI) -# define lzo_unused_funcs_impl(r,f) static r __attribute__((__unused__)) f -# elif 1 && (LZO_CC_BORLANDC || LZO_CC_GNUC) -# define lzo_unused_funcs_impl(r,f) static r f -# else -# define lzo_unused_funcs_impl(r,f) __lzo_static_forceinline r f -# endif -#endif -#ifndef __LZO_CTA_NAME -#if (LZO_CFG_USE_COUNTER) -# define __LZO_CTA_NAME(a) LZO_PP_ECONCAT2(a,__COUNTER__) -#else -# define __LZO_CTA_NAME(a) LZO_PP_ECONCAT2(a,__LINE__) -#endif -#endif -#if !defined(LZO_COMPILE_TIME_ASSERT_HEADER) -# if (LZO_CC_AZTECC || LZO_CC_ZORTECHC) -# define LZO_COMPILE_TIME_ASSERT_HEADER(e) LZO_EXTERN_C_BEGIN extern int __LZO_CTA_NAME(lzo_cta__)[1-!(e)]; LZO_EXTERN_C_END -# elif (LZO_CC_DMC || LZO_CC_SYMANTECC) -# define LZO_COMPILE_TIME_ASSERT_HEADER(e) LZO_EXTERN_C_BEGIN extern int __LZO_CTA_NAME(lzo_cta__)[1u-2*!(e)]; LZO_EXTERN_C_END -# elif (LZO_CC_TURBOC && (__TURBOC__ == 0x0295)) -# define LZO_COMPILE_TIME_ASSERT_HEADER(e) LZO_EXTERN_C_BEGIN extern int __LZO_CTA_NAME(lzo_cta__)[1-!(e)]; LZO_EXTERN_C_END -# elif (LZO_CC_CLANG && (LZO_CC_CLANG < 0x020900ul)) && defined(__cplusplus) -# define LZO_COMPILE_TIME_ASSERT_HEADER(e) LZO_EXTERN_C_BEGIN int __LZO_CTA_NAME(lzo_cta_f__)(int [1-2*!(e)]); LZO_EXTERN_C_END -# elif (LZO_CC_GNUC) && defined(__CHECKER__) && defined(__SPARSE_CHECKER__) -# define LZO_COMPILE_TIME_ASSERT_HEADER(e) LZO_EXTERN_C_BEGIN enum {__LZO_CTA_NAME(lzo_cta_e__)=1/!!(e)} __attribute__((__unused__)); LZO_EXTERN_C_END -# else -# define LZO_COMPILE_TIME_ASSERT_HEADER(e) LZO_EXTERN_C_BEGIN extern int __LZO_CTA_NAME(lzo_cta__)[1-2*!(e)]; LZO_EXTERN_C_END -# endif -#endif -#if !defined(LZO_COMPILE_TIME_ASSERT) -# if (LZO_CC_AZTECC) -# define LZO_COMPILE_TIME_ASSERT(e) {typedef int __LZO_CTA_NAME(lzo_cta_t__)[1-!(e)];} -# elif (LZO_CC_CLANG && (LZO_CC_CLANG >= 0x030000ul)) -# define LZO_COMPILE_TIME_ASSERT(e) {typedef int __LZO_CTA_NAME(lzo_cta_t__)[1-2*!(e)] __attribute__((__unused__));} -# elif (LZO_CC_DMC || LZO_CC_PACIFICC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC) -# define LZO_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break; -# elif (LZO_CC_GNUC) && defined(__CHECKER__) && defined(__SPARSE_CHECKER__) -# define LZO_COMPILE_TIME_ASSERT(e) {(void) (0/!!(e));} -# elif (LZO_CC_GNUC >= 0x040700ul) && (LZO_CFG_USE_COUNTER) && defined(__cplusplus) -# define LZO_COMPILE_TIME_ASSERT(e) {enum {__LZO_CTA_NAME(lzo_cta_e__)=1/!!(e)} __attribute__((__unused__));} -# elif (LZO_CC_GNUC >= 0x040700ul) -# define LZO_COMPILE_TIME_ASSERT(e) {typedef int __LZO_CTA_NAME(lzo_cta_t__)[1-2*!(e)] __attribute__((__unused__));} -# elif (LZO_CC_MSC && (_MSC_VER < 900)) -# define LZO_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break; -# elif (LZO_CC_TURBOC && (__TURBOC__ == 0x0295)) -# define LZO_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break; -# else -# define LZO_COMPILE_TIME_ASSERT(e) {typedef int __LZO_CTA_NAME(lzo_cta_t__)[1-2*!(e)];} -# endif -#endif -LZO_COMPILE_TIME_ASSERT_HEADER(1 == 1) -#if defined(__cplusplus) -extern "C" { LZO_COMPILE_TIME_ASSERT_HEADER(2 == 2) } -#endif -LZO_COMPILE_TIME_ASSERT_HEADER(3 == 3) -#if (LZO_ARCH_I086 || LZO_ARCH_I386) && (LZO_OS_DOS16 || LZO_OS_DOS32 || LZO_OS_OS2 || LZO_OS_OS216 || LZO_OS_WIN16 || LZO_OS_WIN32 || LZO_OS_WIN64) -# if (LZO_CC_GNUC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PACIFICC) -# elif (LZO_CC_DMC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC) -# define __lzo_cdecl __cdecl -# define __lzo_cdecl_atexit /*empty*/ -# define __lzo_cdecl_main __cdecl -# if (LZO_OS_OS2 && (LZO_CC_DMC || LZO_CC_SYMANTECC)) -# define __lzo_cdecl_qsort __pascal -# elif (LZO_OS_OS2 && (LZO_CC_ZORTECHC)) -# define __lzo_cdecl_qsort _stdcall -# else -# define __lzo_cdecl_qsort __cdecl -# endif -# elif (LZO_CC_WATCOMC) -# define __lzo_cdecl __cdecl -# else -# define __lzo_cdecl __cdecl -# define __lzo_cdecl_atexit __cdecl -# define __lzo_cdecl_main __cdecl -# define __lzo_cdecl_qsort __cdecl -# endif -# if (LZO_CC_GNUC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PACIFICC || LZO_CC_WATCOMC) -# elif (LZO_OS_OS2 && (LZO_CC_DMC || LZO_CC_SYMANTECC)) -# define __lzo_cdecl_sighandler __pascal -# elif (LZO_OS_OS2 && (LZO_CC_ZORTECHC)) -# define __lzo_cdecl_sighandler _stdcall -# elif (LZO_CC_MSC && (_MSC_VER >= 1400)) && defined(_M_CEE_PURE) -# define __lzo_cdecl_sighandler __clrcall -# elif (LZO_CC_MSC && (_MSC_VER >= 600 && _MSC_VER < 700)) -# if defined(_DLL) -# define __lzo_cdecl_sighandler _far _cdecl _loadds -# elif defined(_MT) -# define __lzo_cdecl_sighandler _far _cdecl -# else -# define __lzo_cdecl_sighandler _cdecl -# endif -# else -# define __lzo_cdecl_sighandler __cdecl -# endif -#elif (LZO_ARCH_I386) && (LZO_CC_WATCOMC) -# define __lzo_cdecl __cdecl -#elif (LZO_ARCH_M68K && LZO_OS_TOS && (LZO_CC_PUREC || LZO_CC_TURBOC)) -# define __lzo_cdecl cdecl -#endif -#if !defined(__lzo_cdecl) -# define __lzo_cdecl /*empty*/ -#endif -#if !defined(__lzo_cdecl_atexit) -# define __lzo_cdecl_atexit /*empty*/ -#endif -#if !defined(__lzo_cdecl_main) -# define __lzo_cdecl_main /*empty*/ -#endif -#if !defined(__lzo_cdecl_qsort) -# define __lzo_cdecl_qsort /*empty*/ -#endif -#if !defined(__lzo_cdecl_sighandler) -# define __lzo_cdecl_sighandler /*empty*/ -#endif -#if !defined(__lzo_cdecl_va) -# define __lzo_cdecl_va __lzo_cdecl -#endif -#if !(LZO_CFG_NO_WINDOWS_H) -#if !defined(LZO_HAVE_WINDOWS_H) -#if (LZO_OS_CYGWIN || (LZO_OS_EMX && defined(__RSXNT__)) || LZO_OS_WIN32 || LZO_OS_WIN64) -# if (LZO_CC_WATCOMC && (__WATCOMC__ < 1000)) -# elif ((LZO_OS_WIN32 && defined(__PW32__)) && (LZO_CC_GNUC && (LZO_CC_GNUC < 0x030000ul))) -# elif ((LZO_OS_CYGWIN || defined(__MINGW32__)) && (LZO_CC_GNUC && (LZO_CC_GNUC < 0x025f00ul))) -# else -# define LZO_HAVE_WINDOWS_H 1 -# endif -#endif -#endif -#endif -#ifndef LZO_SIZEOF_SHORT -#if defined(SIZEOF_SHORT) -# define LZO_SIZEOF_SHORT (SIZEOF_SHORT) -#elif defined(__SIZEOF_SHORT__) -# define LZO_SIZEOF_SHORT (__SIZEOF_SHORT__) -#endif -#endif -#ifndef LZO_SIZEOF_INT -#if defined(SIZEOF_INT) -# define LZO_SIZEOF_INT (SIZEOF_INT) -#elif defined(__SIZEOF_INT__) -# define LZO_SIZEOF_INT (__SIZEOF_INT__) -#endif -#endif -#ifndef LZO_SIZEOF_LONG -#if defined(SIZEOF_LONG) -# define LZO_SIZEOF_LONG (SIZEOF_LONG) -#elif defined(__SIZEOF_LONG__) -# define LZO_SIZEOF_LONG (__SIZEOF_LONG__) -#endif -#endif -#ifndef LZO_SIZEOF_LONG_LONG -#if defined(SIZEOF_LONG_LONG) -# define LZO_SIZEOF_LONG_LONG (SIZEOF_LONG_LONG) -#elif defined(__SIZEOF_LONG_LONG__) -# define LZO_SIZEOF_LONG_LONG (__SIZEOF_LONG_LONG__) -#endif -#endif -#ifndef LZO_SIZEOF___INT16 -#if defined(SIZEOF___INT16) -# define LZO_SIZEOF___INT16 (SIZEOF___INT16) -#endif -#endif -#ifndef LZO_SIZEOF___INT32 -#if defined(SIZEOF___INT32) -# define LZO_SIZEOF___INT32 (SIZEOF___INT32) -#endif -#endif -#ifndef LZO_SIZEOF___INT64 -#if defined(SIZEOF___INT64) -# define LZO_SIZEOF___INT64 (SIZEOF___INT64) -#endif -#endif -#ifndef LZO_SIZEOF_VOID_P -#if defined(SIZEOF_VOID_P) -# define LZO_SIZEOF_VOID_P (SIZEOF_VOID_P) -#elif defined(__SIZEOF_POINTER__) -# define LZO_SIZEOF_VOID_P (__SIZEOF_POINTER__) -#endif -#endif -#ifndef LZO_SIZEOF_SIZE_T -#if defined(SIZEOF_SIZE_T) -# define LZO_SIZEOF_SIZE_T (SIZEOF_SIZE_T) -#elif defined(__SIZEOF_SIZE_T__) -# define LZO_SIZEOF_SIZE_T (__SIZEOF_SIZE_T__) -#endif -#endif -#ifndef LZO_SIZEOF_PTRDIFF_T -#if defined(SIZEOF_PTRDIFF_T) -# define LZO_SIZEOF_PTRDIFF_T (SIZEOF_PTRDIFF_T) -#elif defined(__SIZEOF_PTRDIFF_T__) -# define LZO_SIZEOF_PTRDIFF_T (__SIZEOF_PTRDIFF_T__) -#endif -#endif -#define __LZO_LSR(x,b) (((x)+0ul) >> (b)) -#if !defined(LZO_SIZEOF_SHORT) -# if (LZO_ARCH_CRAY_PVP) -# define LZO_SIZEOF_SHORT 8 -# elif (USHRT_MAX == LZO_0xffffL) -# define LZO_SIZEOF_SHORT 2 -# elif (__LZO_LSR(USHRT_MAX,7) == 1) -# define LZO_SIZEOF_SHORT 1 -# elif (__LZO_LSR(USHRT_MAX,15) == 1) -# define LZO_SIZEOF_SHORT 2 -# elif (__LZO_LSR(USHRT_MAX,31) == 1) -# define LZO_SIZEOF_SHORT 4 -# elif (__LZO_LSR(USHRT_MAX,63) == 1) -# define LZO_SIZEOF_SHORT 8 -# elif (__LZO_LSR(USHRT_MAX,127) == 1) -# define LZO_SIZEOF_SHORT 16 -# else -# error "LZO_SIZEOF_SHORT" -# endif -#endif -LZO_COMPILE_TIME_ASSERT_HEADER(LZO_SIZEOF_SHORT == sizeof(short)) -#if !defined(LZO_SIZEOF_INT) -# if (LZO_ARCH_CRAY_PVP) -# define LZO_SIZEOF_INT 8 -# elif (UINT_MAX == LZO_0xffffL) -# define LZO_SIZEOF_INT 2 -# elif (UINT_MAX == LZO_0xffffffffL) -# define LZO_SIZEOF_INT 4 -# elif (__LZO_LSR(UINT_MAX,7) == 1) -# define LZO_SIZEOF_INT 1 -# elif (__LZO_LSR(UINT_MAX,15) == 1) -# define LZO_SIZEOF_INT 2 -# elif (__LZO_LSR(UINT_MAX,31) == 1) -# define LZO_SIZEOF_INT 4 -# elif (__LZO_LSR(UINT_MAX,63) == 1) -# define LZO_SIZEOF_INT 8 -# elif (__LZO_LSR(UINT_MAX,127) == 1) -# define LZO_SIZEOF_INT 16 -# else -# error "LZO_SIZEOF_INT" -# endif -#endif -LZO_COMPILE_TIME_ASSERT_HEADER(LZO_SIZEOF_INT == sizeof(int)) -#if !defined(LZO_SIZEOF_LONG) -# if (ULONG_MAX == LZO_0xffffffffL) -# define LZO_SIZEOF_LONG 4 -# elif (__LZO_LSR(ULONG_MAX,7) == 1) -# define LZO_SIZEOF_LONG 1 -# elif (__LZO_LSR(ULONG_MAX,15) == 1) -# define LZO_SIZEOF_LONG 2 -# elif (__LZO_LSR(ULONG_MAX,31) == 1) -# define LZO_SIZEOF_LONG 4 -# elif (__LZO_LSR(ULONG_MAX,39) == 1) -# define LZO_SIZEOF_LONG 5 -# elif (__LZO_LSR(ULONG_MAX,63) == 1) -# define LZO_SIZEOF_LONG 8 -# elif (__LZO_LSR(ULONG_MAX,127) == 1) -# define LZO_SIZEOF_LONG 16 -# else -# error "LZO_SIZEOF_LONG" -# endif -#endif -LZO_COMPILE_TIME_ASSERT_HEADER(LZO_SIZEOF_LONG == sizeof(long)) -#if !defined(LZO_SIZEOF_LONG_LONG) && !defined(LZO_SIZEOF___INT64) -#if (LZO_SIZEOF_LONG > 0 && LZO_SIZEOF_LONG < 8) -# if defined(__LONG_MAX__) && defined(__LONG_LONG_MAX__) -# if (LZO_CC_GNUC >= 0x030300ul) -# if ((__LONG_MAX__-0) == (__LONG_LONG_MAX__-0)) -# define LZO_SIZEOF_LONG_LONG LZO_SIZEOF_LONG -# elif (__LZO_LSR(__LONG_LONG_MAX__,30) == 1) -# define LZO_SIZEOF_LONG_LONG 4 -# endif -# endif -# endif -#endif -#endif -#if !defined(LZO_SIZEOF_LONG_LONG) && !defined(LZO_SIZEOF___INT64) -#if (LZO_SIZEOF_LONG > 0 && LZO_SIZEOF_LONG < 8) -#if (LZO_ARCH_I086 && LZO_CC_DMC) -#elif (LZO_CC_CILLY) && defined(__GNUC__) -# define LZO_SIZEOF_LONG_LONG 8 -#elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE) -# define LZO_SIZEOF_LONG_LONG 8 -#elif ((LZO_OS_WIN32 || LZO_OS_WIN64 || defined(_WIN32)) && LZO_CC_MSC && (_MSC_VER >= 1400)) -# define LZO_SIZEOF_LONG_LONG 8 -#elif (LZO_OS_WIN64 || defined(_WIN64)) -# define LZO_SIZEOF___INT64 8 -#elif (LZO_ARCH_I386 && (LZO_CC_DMC)) -# define LZO_SIZEOF_LONG_LONG 8 -#elif (LZO_ARCH_I386 && (LZO_CC_SYMANTECC && (__SC__ >= 0x700))) -# define LZO_SIZEOF_LONG_LONG 8 -#elif (LZO_ARCH_I386 && (LZO_CC_INTELC && defined(__linux__))) -# define LZO_SIZEOF_LONG_LONG 8 -#elif (LZO_ARCH_I386 && (LZO_CC_MWERKS || LZO_CC_PELLESC || LZO_CC_PGI || LZO_CC_SUNPROC)) -# define LZO_SIZEOF_LONG_LONG 8 -#elif (LZO_ARCH_I386 && (LZO_CC_INTELC || LZO_CC_MSC)) -# define LZO_SIZEOF___INT64 8 -#elif ((LZO_OS_WIN32 || defined(_WIN32)) && (LZO_CC_MSC)) -# define LZO_SIZEOF___INT64 8 -#elif (LZO_ARCH_I386 && (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0520))) -# define LZO_SIZEOF___INT64 8 -#elif (LZO_ARCH_I386 && (LZO_CC_WATCOMC && (__WATCOMC__ >= 1100))) -# define LZO_SIZEOF___INT64 8 -#elif (LZO_CC_GHS && defined(__LLONG_BIT) && ((__LLONG_BIT-0) == 64)) -# define LZO_SIZEOF_LONG_LONG 8 -#elif (LZO_CC_WATCOMC && defined(_INTEGRAL_MAX_BITS) && ((_INTEGRAL_MAX_BITS-0) == 64)) -# define LZO_SIZEOF___INT64 8 -#elif (LZO_OS_OS400 || defined(__OS400__)) && defined(__LLP64_IFC__) -# define LZO_SIZEOF_LONG_LONG 8 -#elif (defined(__vms) || defined(__VMS)) && ((__INITIAL_POINTER_SIZE-0) == 64) -# define LZO_SIZEOF_LONG_LONG 8 -#elif (LZO_CC_SDCC) && (LZO_SIZEOF_INT == 2) -#elif 1 && defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) -# define LZO_SIZEOF_LONG_LONG 8 -#endif -#endif -#endif -#if defined(__cplusplus) && (LZO_CC_GNUC) -# if (LZO_CC_GNUC < 0x020800ul) -# undef LZO_SIZEOF_LONG_LONG -# endif -#endif -#if (LZO_CFG_NO_LONG_LONG) -# undef LZO_SIZEOF_LONG_LONG -#elif defined(__NO_LONG_LONG) -# undef LZO_SIZEOF_LONG_LONG -#elif defined(_NO_LONGLONG) -# undef LZO_SIZEOF_LONG_LONG -#endif -#if !defined(LZO_WORDSIZE) -#if (LZO_ARCH_ALPHA) -# define LZO_WORDSIZE 8 -#elif (LZO_ARCH_AMD64) -# define LZO_WORDSIZE 8 -#elif (LZO_ARCH_AVR) -# define LZO_WORDSIZE 1 -#elif (LZO_ARCH_H8300) -# if defined(__NORMAL_MODE__) -# define LZO_WORDSIZE 4 -# elif defined(__H8300H__) || defined(__H8300S__) || defined(__H8300SX__) -# define LZO_WORDSIZE 4 -# else -# define LZO_WORDSIZE 2 -# endif -#elif (LZO_ARCH_I086) -# define LZO_WORDSIZE 2 -#elif (LZO_ARCH_IA64) -# define LZO_WORDSIZE 8 -#elif (LZO_ARCH_M16C) -# define LZO_WORDSIZE 2 -#elif (LZO_ARCH_SPU) -# define LZO_WORDSIZE 4 -#elif (LZO_ARCH_Z80) -# define LZO_WORDSIZE 1 -#elif (LZO_SIZEOF_LONG == 8) && ((defined(__mips__) && defined(__R5900__)) || defined(__MIPS_PSX2__)) -# define LZO_WORDSIZE 8 -#elif (LZO_OS_OS400 || defined(__OS400__)) -# define LZO_WORDSIZE 8 -#elif (defined(__vms) || defined(__VMS)) && (__INITIAL_POINTER_SIZE+0 == 64) -# define LZO_WORDSIZE 8 -#endif -#endif -#if !defined(LZO_SIZEOF_VOID_P) -#if defined(__ILP32__) || defined(__ILP32) || defined(_ILP32) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(int) == 4) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(long) == 4) -# define LZO_SIZEOF_VOID_P 4 -#elif defined(__ILP64__) || defined(__ILP64) || defined(_ILP64) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(int) == 8) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(long) == 8) -# define LZO_SIZEOF_VOID_P 8 -#elif defined(__LLP64__) || defined(__LLP64) || defined(_LLP64) || defined(_WIN64) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(long) == 4) -# define LZO_SIZEOF_VOID_P 8 -#elif defined(__LP64__) || defined(__LP64) || defined(_LP64) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(long) == 8) -# define LZO_SIZEOF_VOID_P 8 -#elif (LZO_ARCH_AVR) -# define LZO_SIZEOF_VOID_P 2 -#elif (LZO_ARCH_C166 || LZO_ARCH_MCS51 || LZO_ARCH_MCS251 || LZO_ARCH_MSP430) -# define LZO_SIZEOF_VOID_P 2 -#elif (LZO_ARCH_H8300) -# if defined(__NORMAL_MODE__) -# define LZO_SIZEOF_VOID_P 2 -# elif defined(__H8300H__) || defined(__H8300S__) || defined(__H8300SX__) -# define LZO_SIZEOF_VOID_P 4 -# else -# define LZO_SIZEOF_VOID_P 2 -# endif -# if (LZO_CC_GNUC && (LZO_CC_GNUC < 0x040000ul)) && (LZO_SIZEOF_INT == 4) -# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_INT -# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_INT -# endif -#elif (LZO_ARCH_I086) -# if (LZO_MM_TINY || LZO_MM_SMALL || LZO_MM_MEDIUM) -# define LZO_SIZEOF_VOID_P 2 -# elif (LZO_MM_COMPACT || LZO_MM_LARGE || LZO_MM_HUGE) -# define LZO_SIZEOF_VOID_P 4 -# else -# error "invalid LZO_ARCH_I086 memory model" -# endif -#elif (LZO_ARCH_M16C) -# if defined(__m32c_cpu__) || defined(__m32cm_cpu__) -# define LZO_SIZEOF_VOID_P 4 -# else -# define LZO_SIZEOF_VOID_P 2 -# endif -#elif (LZO_ARCH_SPU) -# define LZO_SIZEOF_VOID_P 4 -#elif (LZO_ARCH_Z80) -# define LZO_SIZEOF_VOID_P 2 -#elif (LZO_SIZEOF_LONG == 8) && ((defined(__mips__) && defined(__R5900__)) || defined(__MIPS_PSX2__)) -# define LZO_SIZEOF_VOID_P 4 -#elif (LZO_OS_OS400 || defined(__OS400__)) -# if defined(__LLP64_IFC__) -# define LZO_SIZEOF_VOID_P 8 -# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_LONG -# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_LONG -# else -# define LZO_SIZEOF_VOID_P 16 -# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_LONG -# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_LONG -# endif -#elif (defined(__vms) || defined(__VMS)) && (__INITIAL_POINTER_SIZE+0 == 64) -# define LZO_SIZEOF_VOID_P 8 -# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_LONG -# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_LONG -#endif -#endif -#if !defined(LZO_SIZEOF_VOID_P) -# define LZO_SIZEOF_VOID_P LZO_SIZEOF_LONG -#endif -LZO_COMPILE_TIME_ASSERT_HEADER(LZO_SIZEOF_VOID_P == sizeof(void *)) -#if !defined(LZO_SIZEOF_SIZE_T) -#if (LZO_ARCH_I086 || LZO_ARCH_M16C) -# define LZO_SIZEOF_SIZE_T 2 -#endif -#endif -#if !defined(LZO_SIZEOF_SIZE_T) -# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_VOID_P -#endif -#if defined(offsetof) -LZO_COMPILE_TIME_ASSERT_HEADER(LZO_SIZEOF_SIZE_T == sizeof(size_t)) -#endif -#if !defined(LZO_SIZEOF_PTRDIFF_T) -#if (LZO_ARCH_I086) -# if (LZO_MM_TINY || LZO_MM_SMALL || LZO_MM_MEDIUM || LZO_MM_HUGE) -# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_VOID_P -# elif (LZO_MM_COMPACT || LZO_MM_LARGE) -# if (LZO_CC_BORLANDC || LZO_CC_TURBOC) -# define LZO_SIZEOF_PTRDIFF_T 4 -# else -# define LZO_SIZEOF_PTRDIFF_T 2 -# endif -# else -# error "invalid LZO_ARCH_I086 memory model" -# endif -#endif -#endif -#if !defined(LZO_SIZEOF_PTRDIFF_T) -# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_SIZE_T -#endif -#if defined(offsetof) -LZO_COMPILE_TIME_ASSERT_HEADER(LZO_SIZEOF_PTRDIFF_T == sizeof(ptrdiff_t)) -#endif -#if !defined(LZO_WORDSIZE) -# define LZO_WORDSIZE LZO_SIZEOF_VOID_P -#endif -#if (LZO_ABI_NEUTRAL_ENDIAN) -# undef LZO_ABI_BIG_ENDIAN -# undef LZO_ABI_LITTLE_ENDIAN -#elif !(LZO_ABI_BIG_ENDIAN) && !(LZO_ABI_LITTLE_ENDIAN) -#if (LZO_ARCH_ALPHA) && (LZO_ARCH_CRAY_MPP) -# define LZO_ABI_BIG_ENDIAN 1 -#elif (LZO_ARCH_IA64) && (LZO_OS_POSIX_LINUX || LZO_OS_WIN64) -# define LZO_ABI_LITTLE_ENDIAN 1 -#elif (LZO_ARCH_ALPHA || LZO_ARCH_AMD64 || LZO_ARCH_BLACKFIN || LZO_ARCH_CRIS || LZO_ARCH_I086 || LZO_ARCH_I386 || LZO_ARCH_MSP430) -# define LZO_ABI_LITTLE_ENDIAN 1 -#elif (LZO_ARCH_AVR32 || LZO_ARCH_M68K || LZO_ARCH_S390 || LZO_ARCH_SPU) -# define LZO_ABI_BIG_ENDIAN 1 -#elif 1 && defined(__IAR_SYSTEMS_ICC__) && defined(__LITTLE_ENDIAN__) -# if (__LITTLE_ENDIAN__ == 1) -# define LZO_ABI_LITTLE_ENDIAN 1 -# else -# define LZO_ABI_BIG_ENDIAN 1 -# endif -#elif 1 && defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__) -# define LZO_ABI_BIG_ENDIAN 1 -#elif 1 && defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__) -# define LZO_ABI_LITTLE_ENDIAN 1 -#elif 1 && (LZO_ARCH_ARM) && defined(__ARM_BIG_ENDIAN) && ((__ARM_BIG_ENDIAN)+0) -# define LZO_ABI_BIG_ENDIAN 1 -#elif 1 && (LZO_ARCH_ARM) && defined(__ARMEB__) && !defined(__ARMEL__) -# define LZO_ABI_BIG_ENDIAN 1 -#elif 1 && (LZO_ARCH_ARM) && defined(__ARMEL__) && !defined(__ARMEB__) -# define LZO_ABI_LITTLE_ENDIAN 1 -#elif 1 && (LZO_ARCH_ARM && LZO_CC_ARMCC_ARMCC) -# if defined(__BIG_ENDIAN) && defined(__LITTLE_ENDIAN) -# error "unexpected configuration - check your compiler defines" -# elif defined(__BIG_ENDIAN) -# define LZO_ABI_BIG_ENDIAN 1 -# else -# define LZO_ABI_LITTLE_ENDIAN 1 -# endif -# define LZO_ABI_LITTLE_ENDIAN 1 -#elif 1 && (LZO_ARCH_ARM64) && defined(__ARM_BIG_ENDIAN) && ((__ARM_BIG_ENDIAN)+0) -# define LZO_ABI_BIG_ENDIAN 1 -#elif 1 && (LZO_ARCH_ARM64) && defined(__AARCH64EB__) && !defined(__AARCH64EL__) -# define LZO_ABI_BIG_ENDIAN 1 -#elif 1 && (LZO_ARCH_ARM64) && defined(__AARCH64EL__) && !defined(__AARCH64EB__) -# define LZO_ABI_LITTLE_ENDIAN 1 -#elif 1 && (LZO_ARCH_MIPS) && defined(__MIPSEB__) && !defined(__MIPSEL__) -# define LZO_ABI_BIG_ENDIAN 1 -#elif 1 && (LZO_ARCH_MIPS) && defined(__MIPSEL__) && !defined(__MIPSEB__) -# define LZO_ABI_LITTLE_ENDIAN 1 -#endif -#endif -#if (LZO_ABI_BIG_ENDIAN) && (LZO_ABI_LITTLE_ENDIAN) -# error "unexpected configuration - check your compiler defines" -#endif -#if (LZO_ABI_BIG_ENDIAN) -# define LZO_INFO_ABI_ENDIAN "be" -#elif (LZO_ABI_LITTLE_ENDIAN) -# define LZO_INFO_ABI_ENDIAN "le" -#elif (LZO_ABI_NEUTRAL_ENDIAN) -# define LZO_INFO_ABI_ENDIAN "neutral" -#endif -#if (LZO_SIZEOF_INT == 1 && LZO_SIZEOF_LONG == 2 && LZO_SIZEOF_VOID_P == 2) -# define LZO_ABI_I8LP16 1 -# define LZO_INFO_ABI_PM "i8lp16" -#elif (LZO_SIZEOF_INT == 2 && LZO_SIZEOF_LONG == 2 && LZO_SIZEOF_VOID_P == 2) -# define LZO_ABI_ILP16 1 -# define LZO_INFO_ABI_PM "ilp16" -#elif (LZO_SIZEOF_INT == 2 && LZO_SIZEOF_LONG == 4 && LZO_SIZEOF_VOID_P == 4) -# define LZO_ABI_LP32 1 -# define LZO_INFO_ABI_PM "lp32" -#elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 4 && LZO_SIZEOF_VOID_P == 4) -# define LZO_ABI_ILP32 1 -# define LZO_INFO_ABI_PM "ilp32" -#elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 4 && LZO_SIZEOF_VOID_P == 8 && LZO_SIZEOF_SIZE_T == 8) -# define LZO_ABI_LLP64 1 -# define LZO_INFO_ABI_PM "llp64" -#elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 8 && LZO_SIZEOF_VOID_P == 8) -# define LZO_ABI_LP64 1 -# define LZO_INFO_ABI_PM "lp64" -#elif (LZO_SIZEOF_INT == 8 && LZO_SIZEOF_LONG == 8 && LZO_SIZEOF_VOID_P == 8) -# define LZO_ABI_ILP64 1 -# define LZO_INFO_ABI_PM "ilp64" -#elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 8 && LZO_SIZEOF_VOID_P == 4) -# define LZO_ABI_IP32L64 1 -# define LZO_INFO_ABI_PM "ip32l64" -#endif -#if 0 -#elif !defined(__LZO_LIBC_OVERRIDE) -#if (LZO_LIBC_NAKED) -# define LZO_INFO_LIBC "naked" -#elif (LZO_LIBC_FREESTANDING) -# define LZO_INFO_LIBC "freestanding" -#elif (LZO_LIBC_MOSTLY_FREESTANDING) -# define LZO_INFO_LIBC "mfreestanding" -#elif (LZO_LIBC_ISOC90) -# define LZO_INFO_LIBC "isoc90" -#elif (LZO_LIBC_ISOC99) -# define LZO_INFO_LIBC "isoc99" -#elif (LZO_CC_ARMCC_ARMCC) && defined(__ARMCLIB_VERSION) -# define LZO_LIBC_ISOC90 1 -# define LZO_INFO_LIBC "isoc90" -#elif defined(__dietlibc__) -# define LZO_LIBC_DIETLIBC 1 -# define LZO_INFO_LIBC "dietlibc" -#elif defined(_NEWLIB_VERSION) -# define LZO_LIBC_NEWLIB 1 -# define LZO_INFO_LIBC "newlib" -#elif defined(__UCLIBC__) && defined(__UCLIBC_MAJOR__) && defined(__UCLIBC_MINOR__) -# if defined(__UCLIBC_SUBLEVEL__) -# define LZO_LIBC_UCLIBC (__UCLIBC_MAJOR__ * 0x10000L + (__UCLIBC_MINOR__-0) * 0x100 + (__UCLIBC_SUBLEVEL__-0)) -# else -# define LZO_LIBC_UCLIBC 0x00090bL -# endif -# define LZO_INFO_LIBC "uc" "libc" -#elif defined(__GLIBC__) && defined(__GLIBC_MINOR__) -# define LZO_LIBC_GLIBC (__GLIBC__ * 0x10000L + (__GLIBC_MINOR__-0) * 0x100) -# define LZO_INFO_LIBC "glibc" -#elif (LZO_CC_MWERKS) && defined(__MSL__) -# define LZO_LIBC_MSL __MSL__ -# define LZO_INFO_LIBC "msl" -#elif 1 && defined(__IAR_SYSTEMS_ICC__) -# define LZO_LIBC_ISOC90 1 -# define LZO_INFO_LIBC "isoc90" -#else -# define LZO_LIBC_DEFAULT 1 -# define LZO_INFO_LIBC "default" -#endif -#endif -#if (LZO_ARCH_I386 && (LZO_OS_DOS32 || LZO_OS_WIN32) && (LZO_CC_DMC || LZO_CC_INTELC || LZO_CC_MSC || LZO_CC_PELLESC)) -# define LZO_ASM_SYNTAX_MSC 1 -#elif (LZO_OS_WIN64 && (LZO_CC_DMC || LZO_CC_INTELC || LZO_CC_MSC || LZO_CC_PELLESC)) -#elif (LZO_ARCH_I386 && LZO_CC_GNUC && (LZO_CC_GNUC == 0x011f00ul)) -#elif (LZO_ARCH_I386 && (LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_INTELC || LZO_CC_PATHSCALE)) -# define LZO_ASM_SYNTAX_GNUC 1 -#elif (LZO_ARCH_AMD64 && (LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_INTELC || LZO_CC_PATHSCALE)) -# define LZO_ASM_SYNTAX_GNUC 1 -#elif (LZO_CC_GNUC) -# define LZO_ASM_SYNTAX_GNUC 1 -#endif -#if (LZO_ASM_SYNTAX_GNUC) -#if (LZO_ARCH_I386 && LZO_CC_GNUC && (LZO_CC_GNUC < 0x020000ul)) -# define __LZO_ASM_CLOBBER "ax" -# define __LZO_ASM_CLOBBER_LIST_CC /*empty*/ -# define __LZO_ASM_CLOBBER_LIST_CC_MEMORY /*empty*/ -# define __LZO_ASM_CLOBBER_LIST_EMPTY /*empty*/ -#elif (LZO_CC_INTELC && (__INTEL_COMPILER < 1000)) -# define __LZO_ASM_CLOBBER "memory" -# define __LZO_ASM_CLOBBER_LIST_CC /*empty*/ -# define __LZO_ASM_CLOBBER_LIST_CC_MEMORY : "memory" -# define __LZO_ASM_CLOBBER_LIST_EMPTY /*empty*/ -#else -# define __LZO_ASM_CLOBBER "cc", "memory" -# define __LZO_ASM_CLOBBER_LIST_CC : "cc" -# define __LZO_ASM_CLOBBER_LIST_CC_MEMORY : "cc", "memory" -# define __LZO_ASM_CLOBBER_LIST_EMPTY /*empty*/ -#endif -#endif -#if (LZO_ARCH_ALPHA) -# define LZO_OPT_AVOID_UINT_INDEX 1 -#elif (LZO_ARCH_AMD64) -# define LZO_OPT_AVOID_INT_INDEX 1 -# define LZO_OPT_AVOID_UINT_INDEX 1 -# ifndef LZO_OPT_UNALIGNED16 -# define LZO_OPT_UNALIGNED16 1 -# endif -# ifndef LZO_OPT_UNALIGNED32 -# define LZO_OPT_UNALIGNED32 1 -# endif -# ifndef LZO_OPT_UNALIGNED64 -# define LZO_OPT_UNALIGNED64 1 -# endif -#elif (LZO_ARCH_ARM) -# if defined(__ARM_FEATURE_UNALIGNED) -# if ((__ARM_FEATURE_UNALIGNED)+0) -# ifndef LZO_OPT_UNALIGNED16 -# define LZO_OPT_UNALIGNED16 1 -# endif -# ifndef LZO_OPT_UNALIGNED32 -# define LZO_OPT_UNALIGNED32 1 -# endif -# endif -# elif 1 && (LZO_ARCH_ARM_THUMB2) -# ifndef LZO_OPT_UNALIGNED16 -# define LZO_OPT_UNALIGNED16 1 -# endif -# ifndef LZO_OPT_UNALIGNED32 -# define LZO_OPT_UNALIGNED32 1 -# endif -# elif 1 && defined(__TARGET_ARCH_ARM) && ((__TARGET_ARCH_ARM)+0 >= 7) -# ifndef LZO_OPT_UNALIGNED16 -# define LZO_OPT_UNALIGNED16 1 -# endif -# ifndef LZO_OPT_UNALIGNED32 -# define LZO_OPT_UNALIGNED32 1 -# endif -# elif 1 && defined(__TARGET_ARCH_ARM) && ((__TARGET_ARCH_ARM)+0 >= 6) && (defined(__TARGET_PROFILE_A) || defined(__TARGET_PROFILE_R)) -# ifndef LZO_OPT_UNALIGNED16 -# define LZO_OPT_UNALIGNED16 1 -# endif -# ifndef LZO_OPT_UNALIGNED32 -# define LZO_OPT_UNALIGNED32 1 -# endif -# endif -#elif (LZO_ARCH_ARM64) -# ifndef LZO_OPT_UNALIGNED16 -# define LZO_OPT_UNALIGNED16 1 -# endif -# ifndef LZO_OPT_UNALIGNED32 -# define LZO_OPT_UNALIGNED32 1 -# endif -# ifndef LZO_OPT_UNALIGNED64 -# define LZO_OPT_UNALIGNED64 1 -# endif -#elif (LZO_ARCH_CRIS) -# ifndef LZO_OPT_UNALIGNED16 -# define LZO_OPT_UNALIGNED16 1 -# endif -# ifndef LZO_OPT_UNALIGNED32 -# define LZO_OPT_UNALIGNED32 1 -# endif -#elif (LZO_ARCH_I386) -# ifndef LZO_OPT_UNALIGNED16 -# define LZO_OPT_UNALIGNED16 1 -# endif -# ifndef LZO_OPT_UNALIGNED32 -# define LZO_OPT_UNALIGNED32 1 -# endif -#elif (LZO_ARCH_IA64) -# define LZO_OPT_AVOID_INT_INDEX 1 -# define LZO_OPT_AVOID_UINT_INDEX 1 -# define LZO_OPT_PREFER_POSTINC 1 -#elif (LZO_ARCH_M68K) -# define LZO_OPT_PREFER_POSTINC 1 -# define LZO_OPT_PREFER_PREDEC 1 -# if defined(__mc68020__) && !defined(__mcoldfire__) -# ifndef LZO_OPT_UNALIGNED16 -# define LZO_OPT_UNALIGNED16 1 -# endif -# ifndef LZO_OPT_UNALIGNED32 -# define LZO_OPT_UNALIGNED32 1 -# endif -# endif -#elif (LZO_ARCH_MIPS) -# define LZO_OPT_AVOID_UINT_INDEX 1 -#elif (LZO_ARCH_POWERPC) -# define LZO_OPT_PREFER_PREINC 1 -# define LZO_OPT_PREFER_PREDEC 1 -# if (LZO_ABI_BIG_ENDIAN) -# ifndef LZO_OPT_UNALIGNED16 -# define LZO_OPT_UNALIGNED16 1 -# endif -# ifndef LZO_OPT_UNALIGNED32 -# define LZO_OPT_UNALIGNED32 1 -# endif -# if (LZO_WORDSIZE == 8) -# ifndef LZO_OPT_UNALIGNED64 -# define LZO_OPT_UNALIGNED64 1 -# endif -# endif -# endif -#elif (LZO_ARCH_S390) -# ifndef LZO_OPT_UNALIGNED16 -# define LZO_OPT_UNALIGNED16 1 -# endif -# ifndef LZO_OPT_UNALIGNED32 -# define LZO_OPT_UNALIGNED32 1 -# endif -# if (LZO_WORDSIZE == 8) -# ifndef LZO_OPT_UNALIGNED64 -# define LZO_OPT_UNALIGNED64 1 -# endif -# endif -#elif (LZO_ARCH_SH) -# define LZO_OPT_PREFER_POSTINC 1 -# define LZO_OPT_PREFER_PREDEC 1 -#endif -#ifndef LZO_CFG_NO_INLINE_ASM -#if (LZO_ABI_NEUTRAL_ENDIAN) || (LZO_ARCH_GENERIC) -# define LZO_CFG_NO_INLINE_ASM 1 -#elif (LZO_CC_LLVM) -# define LZO_CFG_NO_INLINE_ASM 1 -#endif -#endif -#if (LZO_CFG_NO_INLINE_ASM) -# undef LZO_ASM_SYNTAX_MSC -# undef LZO_ASM_SYNTAX_GNUC -# undef __LZO_ASM_CLOBBER -# undef __LZO_ASM_CLOBBER_LIST_CC -# undef __LZO_ASM_CLOBBER_LIST_CC_MEMORY -# undef __LZO_ASM_CLOBBER_LIST_EMPTY -#endif -#ifndef LZO_CFG_NO_UNALIGNED -#if (LZO_ABI_NEUTRAL_ENDIAN) || (LZO_ARCH_GENERIC) -# define LZO_CFG_NO_UNALIGNED 1 -#endif -#endif -#if (LZO_CFG_NO_UNALIGNED) -# undef LZO_OPT_UNALIGNED16 -# undef LZO_OPT_UNALIGNED32 -# undef LZO_OPT_UNALIGNED64 -#endif -#if defined(__LZO_INFOSTR_MM) -#elif (LZO_MM_FLAT) && (defined(__LZO_INFOSTR_PM) || defined(LZO_INFO_ABI_PM)) -# define __LZO_INFOSTR_MM "" -#elif defined(LZO_INFO_MM) -# define __LZO_INFOSTR_MM "." LZO_INFO_MM -#else -# define __LZO_INFOSTR_MM "" -#endif -#if defined(__LZO_INFOSTR_PM) -#elif defined(LZO_INFO_ABI_PM) -# define __LZO_INFOSTR_PM "." LZO_INFO_ABI_PM -#else -# define __LZO_INFOSTR_PM "" -#endif -#if defined(__LZO_INFOSTR_ENDIAN) -#elif defined(LZO_INFO_ABI_ENDIAN) -# define __LZO_INFOSTR_ENDIAN "." LZO_INFO_ABI_ENDIAN -#else -# define __LZO_INFOSTR_ENDIAN "" -#endif -#if defined(__LZO_INFOSTR_OSNAME) -#elif defined(LZO_INFO_OS_CONSOLE) -# define __LZO_INFOSTR_OSNAME LZO_INFO_OS "." LZO_INFO_OS_CONSOLE -#elif defined(LZO_INFO_OS_POSIX) -# define __LZO_INFOSTR_OSNAME LZO_INFO_OS "." LZO_INFO_OS_POSIX -#else -# define __LZO_INFOSTR_OSNAME LZO_INFO_OS -#endif -#if defined(__LZO_INFOSTR_LIBC) -#elif defined(LZO_INFO_LIBC) -# define __LZO_INFOSTR_LIBC "." LZO_INFO_LIBC -#else -# define __LZO_INFOSTR_LIBC "" -#endif -#if defined(__LZO_INFOSTR_CCVER) -#elif defined(LZO_INFO_CCVER) -# define __LZO_INFOSTR_CCVER " " LZO_INFO_CCVER -#else -# define __LZO_INFOSTR_CCVER "" -#endif -#define LZO_INFO_STRING \ - LZO_INFO_ARCH __LZO_INFOSTR_MM __LZO_INFOSTR_PM __LZO_INFOSTR_ENDIAN \ - " " __LZO_INFOSTR_OSNAME __LZO_INFOSTR_LIBC " " LZO_INFO_CC __LZO_INFOSTR_CCVER -#if !(LZO_CFG_SKIP_LZO_TYPES) -#if (!(LZO_SIZEOF_SHORT+0 > 0 && LZO_SIZEOF_INT+0 > 0 && LZO_SIZEOF_LONG+0 > 0)) -# error "missing defines for sizes" -#endif -#if (!(LZO_SIZEOF_PTRDIFF_T+0 > 0 && LZO_SIZEOF_SIZE_T+0 > 0 && LZO_SIZEOF_VOID_P+0 > 0)) -# error "missing defines for sizes" -#endif -#define LZO_TYPEOF_CHAR 1u -#define LZO_TYPEOF_SHORT 2u -#define LZO_TYPEOF_INT 3u -#define LZO_TYPEOF_LONG 4u -#define LZO_TYPEOF_LONG_LONG 5u -#define LZO_TYPEOF___INT8 17u -#define LZO_TYPEOF___INT16 18u -#define LZO_TYPEOF___INT32 19u -#define LZO_TYPEOF___INT64 20u -#define LZO_TYPEOF___INT128 21u -#define LZO_TYPEOF___INT256 22u -#define LZO_TYPEOF___MODE_QI 33u -#define LZO_TYPEOF___MODE_HI 34u -#define LZO_TYPEOF___MODE_SI 35u -#define LZO_TYPEOF___MODE_DI 36u -#define LZO_TYPEOF___MODE_TI 37u -#define LZO_TYPEOF_CHAR_P 129u -#if !defined(lzo_llong_t) -#if (LZO_SIZEOF_LONG_LONG+0 > 0) -__lzo_gnuc_extension__ typedef long long lzo_llong_t__; -__lzo_gnuc_extension__ typedef unsigned long long lzo_ullong_t__; -# define lzo_llong_t lzo_llong_t__ -# define lzo_ullong_t lzo_ullong_t__ -#endif -#endif -#if !defined(lzo_int16e_t) -#if (LZO_SIZEOF_LONG == 2) -# define lzo_int16e_t long -# define lzo_uint16e_t unsigned long -# define LZO_TYPEOF_LZO_INT16E_T LZO_TYPEOF_LONG -#elif (LZO_SIZEOF_INT == 2) -# define lzo_int16e_t int -# define lzo_uint16e_t unsigned int -# define LZO_TYPEOF_LZO_INT16E_T LZO_TYPEOF_INT -#elif (LZO_SIZEOF_SHORT == 2) -# define lzo_int16e_t short int -# define lzo_uint16e_t unsigned short int -# define LZO_TYPEOF_LZO_INT16E_T LZO_TYPEOF_SHORT -#elif 1 && !(LZO_CFG_TYPE_NO_MODE_HI) && (LZO_CC_CLANG || (LZO_CC_GNUC >= 0x025f00ul) || LZO_CC_LLVM) - typedef int lzo_int16e_hi_t__ __attribute__((__mode__(__HI__))); - typedef unsigned int lzo_uint16e_hi_t__ __attribute__((__mode__(__HI__))); -# define lzo_int16e_t lzo_int16e_hi_t__ -# define lzo_uint16e_t lzo_uint16e_hi_t__ -# define LZO_TYPEOF_LZO_INT16E_T LZO_TYPEOF___MODE_HI -#elif (LZO_SIZEOF___INT16 == 2) -# define lzo_int16e_t __int16 -# define lzo_uint16e_t unsigned __int16 -# define LZO_TYPEOF_LZO_INT16E_T LZO_TYPEOF___INT16 -#else -#endif -#endif -#if defined(lzo_int16e_t) -# define LZO_SIZEOF_LZO_INT16E_T 2 - LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int16e_t) == 2) - LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int16e_t) == LZO_SIZEOF_LZO_INT16E_T) -#endif -#if !defined(lzo_int32e_t) -#if (LZO_SIZEOF_LONG == 4) -# define lzo_int32e_t long int -# define lzo_uint32e_t unsigned long int -# define LZO_TYPEOF_LZO_INT32E_T LZO_TYPEOF_LONG -#elif (LZO_SIZEOF_INT == 4) -# define lzo_int32e_t int -# define lzo_uint32e_t unsigned int -# define LZO_TYPEOF_LZO_INT32E_T LZO_TYPEOF_INT -#elif (LZO_SIZEOF_SHORT == 4) -# define lzo_int32e_t short int -# define lzo_uint32e_t unsigned short int -# define LZO_TYPEOF_LZO_INT32E_T LZO_TYPEOF_SHORT -#elif (LZO_SIZEOF_LONG_LONG == 4) -# define lzo_int32e_t lzo_llong_t -# define lzo_uint32e_t lzo_ullong_t -# define LZO_TYPEOF_LZO_INT32E_T LZO_TYPEOF_LONG_LONG -#elif 1 && !(LZO_CFG_TYPE_NO_MODE_SI) && (LZO_CC_CLANG || (LZO_CC_GNUC >= 0x025f00ul) || LZO_CC_LLVM) && (__INT_MAX__+0 > 2147483647L) - typedef int lzo_int32e_si_t__ __attribute__((__mode__(__SI__))); - typedef unsigned int lzo_uint32e_si_t__ __attribute__((__mode__(__SI__))); -# define lzo_int32e_t lzo_int32e_si_t__ -# define lzo_uint32e_t lzo_uint32e_si_t__ -# define LZO_TYPEOF_LZO_INT32E_T LZO_TYPEOF___MODE_SI -#elif 1 && !(LZO_CFG_TYPE_NO_MODE_SI) && (LZO_CC_GNUC >= 0x025f00ul) && defined(__AVR__) && (__LONG_MAX__+0 == 32767L) - typedef int lzo_int32e_si_t__ __attribute__((__mode__(__SI__))); - typedef unsigned int lzo_uint32e_si_t__ __attribute__((__mode__(__SI__))); -# define lzo_int32e_t lzo_int32e_si_t__ -# define lzo_uint32e_t lzo_uint32e_si_t__ -# define LZO_INT32_C(c) (c##LL) -# define LZO_UINT32_C(c) (c##ULL) -# define LZO_TYPEOF_LZO_INT32E_T LZO_TYPEOF___MODE_SI -#elif (LZO_SIZEOF___INT32 == 4) -# define lzo_int32e_t __int32 -# define lzo_uint32e_t unsigned __int32 -# define LZO_TYPEOF_LZO_INT32E_T LZO_TYPEOF___INT32 -#else -#endif -#endif -#if defined(lzo_int32e_t) -# define LZO_SIZEOF_LZO_INT32E_T 4 - LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int32e_t) == 4) - LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int32e_t) == LZO_SIZEOF_LZO_INT32E_T) -#endif -#if !defined(lzo_int64e_t) -#if (LZO_SIZEOF___INT64 == 8) -# if (LZO_CC_BORLANDC) && !(LZO_CFG_TYPE_PREFER___INT64) -# define LZO_CFG_TYPE_PREFER___INT64 1 -# endif -#endif -#if (LZO_SIZEOF_INT == 8) && (LZO_SIZEOF_INT < LZO_SIZEOF_LONG) -# define lzo_int64e_t int -# define lzo_uint64e_t unsigned int -# define LZO_TYPEOF_LZO_INT64E_T LZO_TYPEOF_INT -#elif (LZO_SIZEOF_LONG == 8) -# define lzo_int64e_t long int -# define lzo_uint64e_t unsigned long int -# define LZO_TYPEOF_LZO_INT64E_T LZO_TYPEOF_LONG -#elif (LZO_SIZEOF_LONG_LONG == 8) && !(LZO_CFG_TYPE_PREFER___INT64) -# define lzo_int64e_t lzo_llong_t -# define lzo_uint64e_t lzo_ullong_t -# define LZO_TYPEOF_LZO_INT64E_T LZO_TYPEOF_LONG_LONG -# if (LZO_CC_BORLANDC) -# define LZO_INT64_C(c) ((c) + 0ll) -# define LZO_UINT64_C(c) ((c) + 0ull) -# elif 0 -# define LZO_INT64_C(c) (__lzo_gnuc_extension__ (c##LL)) -# define LZO_UINT64_C(c) (__lzo_gnuc_extension__ (c##ULL)) -# else -# define LZO_INT64_C(c) (c##LL) -# define LZO_UINT64_C(c) (c##ULL) -# endif -#elif (LZO_SIZEOF___INT64 == 8) -# define lzo_int64e_t __int64 -# define lzo_uint64e_t unsigned __int64 -# define LZO_TYPEOF_LZO_INT64E_T LZO_TYPEOF___INT64 -# if (LZO_CC_BORLANDC) -# define LZO_INT64_C(c) ((c) + 0i64) -# define LZO_UINT64_C(c) ((c) + 0ui64) -# else -# define LZO_INT64_C(c) (c##i64) -# define LZO_UINT64_C(c) (c##ui64) -# endif -#else -#endif -#endif -#if defined(lzo_int64e_t) -# define LZO_SIZEOF_LZO_INT64E_T 8 - LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int64e_t) == 8) - LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int64e_t) == LZO_SIZEOF_LZO_INT64E_T) -#endif -#if !defined(lzo_int32l_t) -#if defined(lzo_int32e_t) -# define lzo_int32l_t lzo_int32e_t -# define lzo_uint32l_t lzo_uint32e_t -# define LZO_SIZEOF_LZO_INT32L_T LZO_SIZEOF_LZO_INT32E_T -# define LZO_TYPEOF_LZO_INT32L_T LZO_TYPEOF_LZO_INT32E_T -#elif (LZO_SIZEOF_INT >= 4) && (LZO_SIZEOF_INT < LZO_SIZEOF_LONG) -# define lzo_int32l_t int -# define lzo_uint32l_t unsigned int -# define LZO_SIZEOF_LZO_INT32L_T LZO_SIZEOF_INT -# define LZO_TYPEOF_LZO_INT32L_T LZO_SIZEOF_INT -#elif (LZO_SIZEOF_LONG >= 4) -# define lzo_int32l_t long int -# define lzo_uint32l_t unsigned long int -# define LZO_SIZEOF_LZO_INT32L_T LZO_SIZEOF_LONG -# define LZO_TYPEOF_LZO_INT32L_T LZO_SIZEOF_LONG -#else -# error "lzo_int32l_t" -#endif -#endif -#if 1 - LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int32l_t) >= 4) - LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int32l_t) == LZO_SIZEOF_LZO_INT32L_T) -#endif -#if !defined(lzo_int64l_t) -#if defined(lzo_int64e_t) -# define lzo_int64l_t lzo_int64e_t -# define lzo_uint64l_t lzo_uint64e_t -# define LZO_SIZEOF_LZO_INT64L_T LZO_SIZEOF_LZO_INT64E_T -# define LZO_TYPEOF_LZO_INT64L_T LZO_TYPEOF_LZO_INT64E_T -#else -#endif -#endif -#if defined(lzo_int64l_t) - LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int64l_t) >= 8) - LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int64l_t) == LZO_SIZEOF_LZO_INT64L_T) -#endif -#if !defined(lzo_int32f_t) -#if (LZO_SIZEOF_SIZE_T >= 8) -# define lzo_int32f_t lzo_int64l_t -# define lzo_uint32f_t lzo_uint64l_t -# define LZO_SIZEOF_LZO_INT32F_T LZO_SIZEOF_LZO_INT64L_T -# define LZO_TYPEOF_LZO_INT32F_T LZO_TYPEOF_LZO_INT64L_T -#else -# define lzo_int32f_t lzo_int32l_t -# define lzo_uint32f_t lzo_uint32l_t -# define LZO_SIZEOF_LZO_INT32F_T LZO_SIZEOF_LZO_INT32L_T -# define LZO_TYPEOF_LZO_INT32F_T LZO_TYPEOF_LZO_INT32L_T -#endif -#endif -#if 1 - LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int32f_t) >= 4) - LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int32f_t) == LZO_SIZEOF_LZO_INT32F_T) -#endif -#if !defined(lzo_int64f_t) -#if defined(lzo_int64l_t) -# define lzo_int64f_t lzo_int64l_t -# define lzo_uint64f_t lzo_uint64l_t -# define LZO_SIZEOF_LZO_INT64F_T LZO_SIZEOF_LZO_INT64L_T -# define LZO_TYPEOF_LZO_INT64F_T LZO_TYPEOF_LZO_INT64L_T -#else -#endif -#endif -#if defined(lzo_int64f_t) - LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int64f_t) >= 8) - LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int64f_t) == LZO_SIZEOF_LZO_INT64F_T) -#endif -#if !defined(lzo_intptr_t) -#if 1 && (LZO_OS_OS400 && (LZO_SIZEOF_VOID_P == 16)) -# define __LZO_INTPTR_T_IS_POINTER 1 - typedef char * lzo_intptr_t; - typedef char * lzo_uintptr_t; -# define lzo_intptr_t lzo_intptr_t -# define lzo_uintptr_t lzo_uintptr_t -# define LZO_SIZEOF_LZO_INTPTR_T LZO_SIZEOF_VOID_P -# define LZO_TYPEOF_LZO_INTPTR_T LZO_TYPEOF_CHAR_P -#elif (LZO_CC_MSC && (_MSC_VER >= 1300) && (LZO_SIZEOF_VOID_P == 4) && (LZO_SIZEOF_INT == 4)) - typedef __w64 int lzo_intptr_t; - typedef __w64 unsigned int lzo_uintptr_t; -# define lzo_intptr_t lzo_intptr_t -# define lzo_uintptr_t lzo_uintptr_t -# define LZO_SIZEOF_LZO_INTPTR_T LZO_SIZEOF_INT -# define LZO_TYPEOF_LZO_INTPTR_T LZO_TYPEOF_INT -#elif (LZO_SIZEOF_SHORT == LZO_SIZEOF_VOID_P) && (LZO_SIZEOF_INT > LZO_SIZEOF_VOID_P) -# define lzo_intptr_t short -# define lzo_uintptr_t unsigned short -# define LZO_SIZEOF_LZO_INTPTR_T LZO_SIZEOF_SHORT -# define LZO_TYPEOF_LZO_INTPTR_T LZO_TYPEOF_SHORT -#elif (LZO_SIZEOF_INT >= LZO_SIZEOF_VOID_P) && (LZO_SIZEOF_INT < LZO_SIZEOF_LONG) -# define lzo_intptr_t int -# define lzo_uintptr_t unsigned int -# define LZO_SIZEOF_LZO_INTPTR_T LZO_SIZEOF_INT -# define LZO_TYPEOF_LZO_INTPTR_T LZO_TYPEOF_INT -#elif (LZO_SIZEOF_LONG >= LZO_SIZEOF_VOID_P) -# define lzo_intptr_t long -# define lzo_uintptr_t unsigned long -# define LZO_SIZEOF_LZO_INTPTR_T LZO_SIZEOF_LONG -# define LZO_TYPEOF_LZO_INTPTR_T LZO_TYPEOF_LONG -#elif (LZO_SIZEOF_LZO_INT64L_T >= LZO_SIZEOF_VOID_P) -# define lzo_intptr_t lzo_int64l_t -# define lzo_uintptr_t lzo_uint64l_t -# define LZO_SIZEOF_LZO_INTPTR_T LZO_SIZEOF_LZO_INT64L_T -# define LZO_TYPEOF_LZO_INTPTR_T LZO_TYPEOF_LZO_INT64L_T -#else -# error "lzo_intptr_t" -#endif -#endif -#if 1 - LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_intptr_t) >= sizeof(void *)) - LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_intptr_t) == sizeof(lzo_uintptr_t)) -#endif -#if !defined(lzo_word_t) -#if defined(LZO_WORDSIZE) && (LZO_WORDSIZE+0 > 0) -#if (LZO_WORDSIZE == LZO_SIZEOF_LZO_INTPTR_T) && !(__LZO_INTPTR_T_IS_POINTER) -# define lzo_word_t lzo_uintptr_t -# define lzo_sword_t lzo_intptr_t -# define LZO_SIZEOF_LZO_WORD_T LZO_SIZEOF_LZO_INTPTR_T -# define LZO_TYPEOF_LZO_WORD_T LZO_TYPEOF_LZO_INTPTR_T -#elif (LZO_WORDSIZE == LZO_SIZEOF_LONG) -# define lzo_word_t unsigned long -# define lzo_sword_t long -# define LZO_SIZEOF_LZO_WORD_T LZO_SIZEOF_LONG -# define LZO_TYPEOF_LZO_WORD_T LZO_TYPEOF_LONG -#elif (LZO_WORDSIZE == LZO_SIZEOF_INT) -# define lzo_word_t unsigned int -# define lzo_sword_t int -# define LZO_SIZEOF_LZO_WORD_T LZO_SIZEOF_INT -# define LZO_TYPEOF_LZO_WORD_T LZO_TYPEOF_INT -#elif (LZO_WORDSIZE == LZO_SIZEOF_SHORT) -# define lzo_word_t unsigned short -# define lzo_sword_t short -# define LZO_SIZEOF_LZO_WORD_T LZO_SIZEOF_SHORT -# define LZO_TYPEOF_LZO_WORD_T LZO_TYPEOF_SHORT -#elif (LZO_WORDSIZE == 1) -# define lzo_word_t unsigned char -# define lzo_sword_t signed char -# define LZO_SIZEOF_LZO_WORD_T 1 -# define LZO_TYPEOF_LZO_WORD_T LZO_TYPEOF_CHAR -#elif (LZO_WORDSIZE == LZO_SIZEOF_LZO_INT64L_T) -# define lzo_word_t lzo_uint64l_t -# define lzo_sword_t lzo_int64l_t -# define LZO_SIZEOF_LZO_WORD_T LZO_SIZEOF_LZO_INT64L_T -# define LZO_TYPEOF_LZO_WORD_T LZO_SIZEOF_LZO_INT64L_T -#elif (LZO_ARCH_SPU) && (LZO_CC_GNUC) -#if 0 - typedef unsigned lzo_word_t __attribute__((__mode__(__V16QI__))); - typedef int lzo_sword_t __attribute__((__mode__(__V16QI__))); -# define lzo_word_t lzo_word_t -# define lzo_sword_t lzo_sword_t -# define LZO_SIZEOF_LZO_WORD_T 16 -# define LZO_TYPEOF_LZO_WORD_T LZO_TYPEOF___MODE_V16QI -#endif -#else -# error "lzo_word_t" -#endif -#endif -#endif -#if 1 && defined(lzo_word_t) - LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_word_t) == LZO_WORDSIZE) - LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_sword_t) == LZO_WORDSIZE) -#endif -#if 1 -#define lzo_int8_t signed char -#define lzo_uint8_t unsigned char -#define LZO_SIZEOF_LZO_INT8_T 1 -#define LZO_TYPEOF_LZO_INT8_T LZO_TYPEOF_CHAR -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int8_t) == 1) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int8_t) == sizeof(lzo_uint8_t)) -#endif -#if defined(lzo_int16e_t) -#define lzo_int16_t lzo_int16e_t -#define lzo_uint16_t lzo_uint16e_t -#define LZO_SIZEOF_LZO_INT16_T LZO_SIZEOF_LZO_INT16E_T -#define LZO_TYPEOF_LZO_INT16_T LZO_TYPEOF_LZO_INT16E_T -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int16_t) == 2) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int16_t) == sizeof(lzo_uint16_t)) -#endif -#if defined(lzo_int32e_t) -#define lzo_int32_t lzo_int32e_t -#define lzo_uint32_t lzo_uint32e_t -#define LZO_SIZEOF_LZO_INT32_T LZO_SIZEOF_LZO_INT32E_T -#define LZO_TYPEOF_LZO_INT32_T LZO_TYPEOF_LZO_INT32E_T -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int32_t) == 4) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int32_t) == sizeof(lzo_uint32_t)) -#endif -#if defined(lzo_int64e_t) -#define lzo_int64_t lzo_int64e_t -#define lzo_uint64_t lzo_uint64e_t -#define LZO_SIZEOF_LZO_INT64_T LZO_SIZEOF_LZO_INT64E_T -#define LZO_TYPEOF_LZO_INT64_T LZO_TYPEOF_LZO_INT64E_T -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int64_t) == 8) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int64_t) == sizeof(lzo_uint64_t)) -#endif -#if 1 -#define lzo_int_least32_t lzo_int32l_t -#define lzo_uint_least32_t lzo_uint32l_t -#define LZO_SIZEOF_LZO_INT_LEAST32_T LZO_SIZEOF_LZO_INT32L_T -#define LZO_TYPEOF_LZO_INT_LEAST32_T LZO_TYPEOF_LZO_INT32L_T -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_least32_t) >= 4) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_least32_t) == sizeof(lzo_uint_least32_t)) -#endif -#if defined(lzo_int64l_t) -#define lzo_int_least64_t lzo_int64l_t -#define lzo_uint_least64_t lzo_uint64l_t -#define LZO_SIZEOF_LZO_INT_LEAST64_T LZO_SIZEOF_LZO_INT64L_T -#define LZO_TYPEOF_LZO_INT_LEAST64_T LZO_TYPEOF_LZO_INT64L_T -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_least64_t) >= 8) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_least64_t) == sizeof(lzo_uint_least64_t)) -#endif -#if 1 -#define lzo_int_fast32_t lzo_int32f_t -#define lzo_uint_fast32_t lzo_uint32f_t -#define LZO_SIZEOF_LZO_INT_FAST32_T LZO_SIZEOF_LZO_INT32F_T -#define LZO_TYPEOF_LZO_INT_FAST32_T LZO_TYPEOF_LZO_INT32F_T -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_fast32_t) >= 4) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_fast32_t) == sizeof(lzo_uint_fast32_t)) -#endif -#if defined(lzo_int64f_t) -#define lzo_int_fast64_t lzo_int64f_t -#define lzo_uint_fast64_t lzo_uint64f_t -#define LZO_SIZEOF_LZO_INT_FAST64_T LZO_SIZEOF_LZO_INT64F_T -#define LZO_TYPEOF_LZO_INT_FAST64_T LZO_TYPEOF_LZO_INT64F_T -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_fast64_t) >= 8) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_fast64_t) == sizeof(lzo_uint_fast64_t)) -#endif -#if !defined(LZO_INT16_C) -# if (LZO_BROKEN_INTEGRAL_CONSTANTS) && (LZO_SIZEOF_INT >= 2) -# define LZO_INT16_C(c) ((c) + 0) -# define LZO_UINT16_C(c) ((c) + 0U) -# elif (LZO_BROKEN_INTEGRAL_CONSTANTS) && (LZO_SIZEOF_LONG >= 2) -# define LZO_INT16_C(c) ((c) + 0L) -# define LZO_UINT16_C(c) ((c) + 0UL) -# elif (LZO_SIZEOF_INT >= 2) -# define LZO_INT16_C(c) (c) -# define LZO_UINT16_C(c) (c##U) -# elif (LZO_SIZEOF_LONG >= 2) -# define LZO_INT16_C(c) (c##L) -# define LZO_UINT16_C(c) (c##UL) -# else -# error "LZO_INT16_C" -# endif -#endif -#if !defined(LZO_INT32_C) -# if (LZO_BROKEN_INTEGRAL_CONSTANTS) && (LZO_SIZEOF_INT >= 4) -# define LZO_INT32_C(c) ((c) + 0) -# define LZO_UINT32_C(c) ((c) + 0U) -# elif (LZO_BROKEN_INTEGRAL_CONSTANTS) && (LZO_SIZEOF_LONG >= 4) -# define LZO_INT32_C(c) ((c) + 0L) -# define LZO_UINT32_C(c) ((c) + 0UL) -# elif (LZO_SIZEOF_INT >= 4) -# define LZO_INT32_C(c) (c) -# define LZO_UINT32_C(c) (c##U) -# elif (LZO_SIZEOF_LONG >= 4) -# define LZO_INT32_C(c) (c##L) -# define LZO_UINT32_C(c) (c##UL) -# elif (LZO_SIZEOF_LONG_LONG >= 4) -# define LZO_INT32_C(c) (c##LL) -# define LZO_UINT32_C(c) (c##ULL) -# else -# error "LZO_INT32_C" -# endif -#endif -#if !defined(LZO_INT64_C) && defined(lzo_int64l_t) -# if (LZO_BROKEN_INTEGRAL_CONSTANTS) && (LZO_SIZEOF_INT >= 8) -# define LZO_INT64_C(c) ((c) + 0) -# define LZO_UINT64_C(c) ((c) + 0U) -# elif (LZO_BROKEN_INTEGRAL_CONSTANTS) && (LZO_SIZEOF_LONG >= 8) -# define LZO_INT64_C(c) ((c) + 0L) -# define LZO_UINT64_C(c) ((c) + 0UL) -# elif (LZO_SIZEOF_INT >= 8) -# define LZO_INT64_C(c) (c) -# define LZO_UINT64_C(c) (c##U) -# elif (LZO_SIZEOF_LONG >= 8) -# define LZO_INT64_C(c) (c##L) -# define LZO_UINT64_C(c) (c##UL) -# else -# error "LZO_INT64_C" -# endif -#endif -#endif - -#endif /* already included */ - -/* vim:set ts=4 sw=4 et: */ diff --git a/contrib/libs/minilzo/minilzo.c b/contrib/libs/minilzo/minilzo.c deleted file mode 100644 index b8bd210ac6..0000000000 --- a/contrib/libs/minilzo/minilzo.c +++ /dev/null @@ -1,6234 +0,0 @@ -/* minilzo.c -- mini subset of the LZO real-time data compression library - - This file is part of the LZO real-time data compression library. - - Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer - All Rights Reserved. - - The LZO library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of - the License, or (at your option) any later version. - - The LZO library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - 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 the LZO library; see the file COPYING. - If not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - Markus F.X.J. Oberhumer - <markus@oberhumer.com> - http://www.oberhumer.com/opensource/lzo/ - */ - -/* - * NOTE: - * the full LZO package can be found at - * http://www.oberhumer.com/opensource/lzo/ - */ - -/* This is Arcadia-specific header used for symbol mangling. */ -#include "protect.h" - -#define __LZO_IN_MINILZO 1 - -#if defined(LZO_CFG_FREESTANDING) -# undef MINILZO_HAVE_CONFIG_H -# define LZO_LIBC_FREESTANDING 1 -# define LZO_OS_FREESTANDING 1 -#endif - -#ifdef MINILZO_HAVE_CONFIG_H -#error # include <config.h> -#endif -#include <limits.h> -#include <stddef.h> -#if defined(MINILZO_CFG_USE_INTERNAL_LZODEFS) - -#ifndef __LZODEFS_H_INCLUDED -#define __LZODEFS_H_INCLUDED 1 - -#if defined(__CYGWIN32__) && !defined(__CYGWIN__) -# define __CYGWIN__ __CYGWIN32__ -#endif -#if 1 && defined(__INTERIX) && defined(__GNUC__) && !defined(_ALL_SOURCE) -# define _ALL_SOURCE 1 -#endif -#if defined(__mips__) && defined(__R5900__) -# if !defined(__LONG_MAX__) -# define __LONG_MAX__ 9223372036854775807L -# endif -#endif -#if !defined(LZO_CFG_NO_DISABLE_WUNDEF) -#if defined(__ARMCC_VERSION) -# pragma diag_suppress 193 -#elif defined(__clang__) && defined(__clang_minor__) -# pragma clang diagnostic ignored "-Wundef" -#elif defined(__INTEL_COMPILER) -# pragma warning(disable: 193) -#elif defined(__KEIL__) && defined(__C166__) -# pragma warning disable = 322 -#elif defined(__GNUC__) && defined(__GNUC_MINOR__) && !defined(__PATHSCALE__) -# if ((__GNUC__-0) >= 5 || ((__GNUC__-0) == 4 && (__GNUC_MINOR__-0) >= 2)) -# pragma GCC diagnostic ignored "-Wundef" -# endif -#elif defined(_MSC_VER) && !defined(__clang__) && !defined(__INTEL_COMPILER) && !defined(__MWERKS__) -# if ((_MSC_VER-0) >= 1300) -# pragma warning(disable: 4668) -# endif -#endif -#endif -#if 0 && defined(__POCC__) && defined(_WIN32) -# if (__POCC__ >= 400) -# pragma warn(disable: 2216) -# endif -#endif -#if 0 && defined(__WATCOMC__) -# if (__WATCOMC__ >= 1050) && (__WATCOMC__ < 1060) -# pragma warning 203 9 -# endif -#endif -#if defined(__BORLANDC__) && defined(__MSDOS__) && !defined(__FLAT__) -# pragma option -h -#endif -#if !(LZO_CFG_NO_DISABLE_WCRTNONSTDC) -#ifndef _CRT_NONSTDC_NO_DEPRECATE -#define _CRT_NONSTDC_NO_DEPRECATE 1 -#endif -#ifndef _CRT_NONSTDC_NO_WARNINGS -#define _CRT_NONSTDC_NO_WARNINGS 1 -#endif -#ifndef _CRT_SECURE_NO_DEPRECATE -#define _CRT_SECURE_NO_DEPRECATE 1 -#endif -#ifndef _CRT_SECURE_NO_WARNINGS -#define _CRT_SECURE_NO_WARNINGS 1 -#endif -#endif -#if 0 -#define LZO_0xffffUL 0xfffful -#define LZO_0xffffffffUL 0xfffffffful -#else -#define LZO_0xffffUL 65535ul -#define LZO_0xffffffffUL 4294967295ul -#endif -#define LZO_0xffffL LZO_0xffffUL -#define LZO_0xffffffffL LZO_0xffffffffUL -#if (LZO_0xffffL == LZO_0xffffffffL) -# error "your preprocessor is broken 1" -#endif -#if (16ul * 16384ul != 262144ul) -# error "your preprocessor is broken 2" -#endif -#if 0 -#if (32767 >= 4294967295ul) -# error "your preprocessor is broken 3" -#endif -#if (65535u >= 4294967295ul) -# error "your preprocessor is broken 4" -#endif -#endif -#if defined(__COUNTER__) -# ifndef LZO_CFG_USE_COUNTER -# define LZO_CFG_USE_COUNTER 1 -# endif -#else -# undef LZO_CFG_USE_COUNTER -#endif -#if (UINT_MAX == LZO_0xffffL) -#if defined(__ZTC__) && defined(__I86__) && !defined(__OS2__) -# if !defined(MSDOS) -# define MSDOS 1 -# endif -# if !defined(_MSDOS) -# define _MSDOS 1 -# endif -#elif 0 && defined(__VERSION) && defined(MB_LEN_MAX) -# if (__VERSION == 520) && (MB_LEN_MAX == 1) -# if !defined(__AZTEC_C__) -# define __AZTEC_C__ __VERSION -# endif -# if !defined(__DOS__) -# define __DOS__ 1 -# endif -# endif -#endif -#endif -#if defined(_MSC_VER) && defined(M_I86HM) && (UINT_MAX == LZO_0xffffL) -# define ptrdiff_t long -# define _PTRDIFF_T_DEFINED 1 -#endif -#if (UINT_MAX == LZO_0xffffL) -# undef __LZO_RENAME_A -# undef __LZO_RENAME_B -# if defined(__AZTEC_C__) && defined(__DOS__) -# define __LZO_RENAME_A 1 -# elif defined(_MSC_VER) && defined(MSDOS) -# if (_MSC_VER < 600) -# define __LZO_RENAME_A 1 -# elif (_MSC_VER < 700) -# define __LZO_RENAME_B 1 -# endif -# elif defined(__TSC__) && defined(__OS2__) -# define __LZO_RENAME_A 1 -# elif defined(__MSDOS__) && defined(__TURBOC__) && (__TURBOC__ < 0x0410) -# define __LZO_RENAME_A 1 -# elif defined(__PACIFIC__) && defined(DOS) -# if !defined(__far) -# define __far far -# endif -# if !defined(__near) -# define __near near -# endif -# endif -# if defined(__LZO_RENAME_A) -# if !defined(__cdecl) -# define __cdecl cdecl -# endif -# if !defined(__far) -# define __far far -# endif -# if !defined(__huge) -# define __huge huge -# endif -# if !defined(__near) -# define __near near -# endif -# if !defined(__pascal) -# define __pascal pascal -# endif -# if !defined(__huge) -# define __huge huge -# endif -# elif defined(__LZO_RENAME_B) -# if !defined(__cdecl) -# define __cdecl _cdecl -# endif -# if !defined(__far) -# define __far _far -# endif -# if !defined(__huge) -# define __huge _huge -# endif -# if !defined(__near) -# define __near _near -# endif -# if !defined(__pascal) -# define __pascal _pascal -# endif -# elif (defined(__PUREC__) || defined(__TURBOC__)) && defined(__TOS__) -# if !defined(__cdecl) -# define __cdecl cdecl -# endif -# if !defined(__pascal) -# define __pascal pascal -# endif -# endif -# undef __LZO_RENAME_A -# undef __LZO_RENAME_B -#endif -#if (UINT_MAX == LZO_0xffffL) -#if defined(__AZTEC_C__) && defined(__DOS__) -# define LZO_BROKEN_CDECL_ALT_SYNTAX 1 -#elif defined(_MSC_VER) && defined(MSDOS) -# if (_MSC_VER < 600) -# define LZO_BROKEN_INTEGRAL_CONSTANTS 1 -# endif -# if (_MSC_VER < 700) -# define LZO_BROKEN_INTEGRAL_PROMOTION 1 -# define LZO_BROKEN_SIZEOF 1 -# endif -#elif defined(__PACIFIC__) && defined(DOS) -# define LZO_BROKEN_INTEGRAL_CONSTANTS 1 -#elif defined(__TURBOC__) && defined(__MSDOS__) -# if (__TURBOC__ < 0x0150) -# define LZO_BROKEN_CDECL_ALT_SYNTAX 1 -# define LZO_BROKEN_INTEGRAL_CONSTANTS 1 -# define LZO_BROKEN_INTEGRAL_PROMOTION 1 -# endif -# if (__TURBOC__ < 0x0200) -# define LZO_BROKEN_SIZEOF 1 -# endif -# if (__TURBOC__ < 0x0400) && defined(__cplusplus) -# define LZO_BROKEN_CDECL_ALT_SYNTAX 1 -# endif -#elif (defined(__PUREC__) || defined(__TURBOC__)) && defined(__TOS__) -# define LZO_BROKEN_CDECL_ALT_SYNTAX 1 -# define LZO_BROKEN_SIZEOF 1 -#endif -#endif -#if defined(__WATCOMC__) && (__WATCOMC__ < 900) -# define LZO_BROKEN_INTEGRAL_CONSTANTS 1 -#endif -#if defined(_CRAY) && defined(_CRAY1) -# define LZO_BROKEN_SIGNED_RIGHT_SHIFT 1 -#endif -#define LZO_PP_STRINGIZE(x) #x -#define LZO_PP_MACRO_EXPAND(x) LZO_PP_STRINGIZE(x) -#define LZO_PP_CONCAT0() /*empty*/ -#define LZO_PP_CONCAT1(a) a -#define LZO_PP_CONCAT2(a,b) a ## b -#define LZO_PP_CONCAT3(a,b,c) a ## b ## c -#define LZO_PP_CONCAT4(a,b,c,d) a ## b ## c ## d -#define LZO_PP_CONCAT5(a,b,c,d,e) a ## b ## c ## d ## e -#define LZO_PP_CONCAT6(a,b,c,d,e,f) a ## b ## c ## d ## e ## f -#define LZO_PP_CONCAT7(a,b,c,d,e,f,g) a ## b ## c ## d ## e ## f ## g -#define LZO_PP_ECONCAT0() LZO_PP_CONCAT0() -#define LZO_PP_ECONCAT1(a) LZO_PP_CONCAT1(a) -#define LZO_PP_ECONCAT2(a,b) LZO_PP_CONCAT2(a,b) -#define LZO_PP_ECONCAT3(a,b,c) LZO_PP_CONCAT3(a,b,c) -#define LZO_PP_ECONCAT4(a,b,c,d) LZO_PP_CONCAT4(a,b,c,d) -#define LZO_PP_ECONCAT5(a,b,c,d,e) LZO_PP_CONCAT5(a,b,c,d,e) -#define LZO_PP_ECONCAT6(a,b,c,d,e,f) LZO_PP_CONCAT6(a,b,c,d,e,f) -#define LZO_PP_ECONCAT7(a,b,c,d,e,f,g) LZO_PP_CONCAT7(a,b,c,d,e,f,g) -#define LZO_PP_EMPTY /*empty*/ -#define LZO_PP_EMPTY0() /*empty*/ -#define LZO_PP_EMPTY1(a) /*empty*/ -#define LZO_PP_EMPTY2(a,b) /*empty*/ -#define LZO_PP_EMPTY3(a,b,c) /*empty*/ -#define LZO_PP_EMPTY4(a,b,c,d) /*empty*/ -#define LZO_PP_EMPTY5(a,b,c,d,e) /*empty*/ -#define LZO_PP_EMPTY6(a,b,c,d,e,f) /*empty*/ -#define LZO_PP_EMPTY7(a,b,c,d,e,f,g) /*empty*/ -#if 1 -#define LZO_CPP_STRINGIZE(x) #x -#define LZO_CPP_MACRO_EXPAND(x) LZO_CPP_STRINGIZE(x) -#define LZO_CPP_CONCAT2(a,b) a ## b -#define LZO_CPP_CONCAT3(a,b,c) a ## b ## c -#define LZO_CPP_CONCAT4(a,b,c,d) a ## b ## c ## d -#define LZO_CPP_CONCAT5(a,b,c,d,e) a ## b ## c ## d ## e -#define LZO_CPP_CONCAT6(a,b,c,d,e,f) a ## b ## c ## d ## e ## f -#define LZO_CPP_CONCAT7(a,b,c,d,e,f,g) a ## b ## c ## d ## e ## f ## g -#define LZO_CPP_ECONCAT2(a,b) LZO_CPP_CONCAT2(a,b) -#define LZO_CPP_ECONCAT3(a,b,c) LZO_CPP_CONCAT3(a,b,c) -#define LZO_CPP_ECONCAT4(a,b,c,d) LZO_CPP_CONCAT4(a,b,c,d) -#define LZO_CPP_ECONCAT5(a,b,c,d,e) LZO_CPP_CONCAT5(a,b,c,d,e) -#define LZO_CPP_ECONCAT6(a,b,c,d,e,f) LZO_CPP_CONCAT6(a,b,c,d,e,f) -#define LZO_CPP_ECONCAT7(a,b,c,d,e,f,g) LZO_CPP_CONCAT7(a,b,c,d,e,f,g) -#endif -#define __LZO_MASK_GEN(o,b) (((((o) << ((b)-!!(b))) - (o)) << 1) + (o)*!!(b)) -#if 1 && defined(__cplusplus) -# if !defined(__STDC_CONSTANT_MACROS) -# define __STDC_CONSTANT_MACROS 1 -# endif -# if !defined(__STDC_LIMIT_MACROS) -# define __STDC_LIMIT_MACROS 1 -# endif -#endif -#if defined(__cplusplus) -# define LZO_EXTERN_C extern "C" -# define LZO_EXTERN_C_BEGIN extern "C" { -# define LZO_EXTERN_C_END } -#else -# define LZO_EXTERN_C extern -# define LZO_EXTERN_C_BEGIN /*empty*/ -# define LZO_EXTERN_C_END /*empty*/ -#endif -#if !defined(__LZO_OS_OVERRIDE) -#if (LZO_OS_FREESTANDING) -# define LZO_INFO_OS "freestanding" -#elif (LZO_OS_EMBEDDED) -# define LZO_INFO_OS "embedded" -#elif 1 && defined(__IAR_SYSTEMS_ICC__) -# define LZO_OS_EMBEDDED 1 -# define LZO_INFO_OS "embedded" -#elif defined(__CYGWIN__) && defined(__GNUC__) -# define LZO_OS_CYGWIN 1 -# define LZO_INFO_OS "cygwin" -#elif defined(__EMX__) && defined(__GNUC__) -# define LZO_OS_EMX 1 -# define LZO_INFO_OS "emx" -#elif defined(__BEOS__) -# define LZO_OS_BEOS 1 -# define LZO_INFO_OS "beos" -#elif defined(__Lynx__) -# define LZO_OS_LYNXOS 1 -# define LZO_INFO_OS "lynxos" -#elif defined(__OS400__) -# define LZO_OS_OS400 1 -# define LZO_INFO_OS "os400" -#elif defined(__QNX__) -# define LZO_OS_QNX 1 -# define LZO_INFO_OS "qnx" -#elif defined(__BORLANDC__) && defined(__DPMI32__) && (__BORLANDC__ >= 0x0460) -# define LZO_OS_DOS32 1 -# define LZO_INFO_OS "dos32" -#elif defined(__BORLANDC__) && defined(__DPMI16__) -# define LZO_OS_DOS16 1 -# define LZO_INFO_OS "dos16" -#elif defined(__ZTC__) && defined(DOS386) -# define LZO_OS_DOS32 1 -# define LZO_INFO_OS "dos32" -#elif defined(__OS2__) || defined(__OS2V2__) -# if (UINT_MAX == LZO_0xffffL) -# define LZO_OS_OS216 1 -# define LZO_INFO_OS "os216" -# elif (UINT_MAX == LZO_0xffffffffL) -# define LZO_OS_OS2 1 -# define LZO_INFO_OS "os2" -# else -# error "check your limits.h header" -# endif -#elif defined(__WIN64__) || defined(_WIN64) || defined(WIN64) -# define LZO_OS_WIN64 1 -# define LZO_INFO_OS "win64" -#elif defined(__WIN32__) || defined(_WIN32) || defined(WIN32) || defined(__WINDOWS_386__) -# define LZO_OS_WIN32 1 -# define LZO_INFO_OS "win32" -#elif defined(__MWERKS__) && defined(__INTEL__) -# define LZO_OS_WIN32 1 -# define LZO_INFO_OS "win32" -#elif defined(__WINDOWS__) || defined(_WINDOWS) || defined(_Windows) -# if (UINT_MAX == LZO_0xffffL) -# define LZO_OS_WIN16 1 -# define LZO_INFO_OS "win16" -# elif (UINT_MAX == LZO_0xffffffffL) -# define LZO_OS_WIN32 1 -# define LZO_INFO_OS "win32" -# else -# error "check your limits.h header" -# endif -#elif defined(__DOS__) || defined(__MSDOS__) || defined(_MSDOS) || defined(MSDOS) || (defined(__PACIFIC__) && defined(DOS)) -# if (UINT_MAX == LZO_0xffffL) -# define LZO_OS_DOS16 1 -# define LZO_INFO_OS "dos16" -# elif (UINT_MAX == LZO_0xffffffffL) -# define LZO_OS_DOS32 1 -# define LZO_INFO_OS "dos32" -# else -# error "check your limits.h header" -# endif -#elif defined(__WATCOMC__) -# if defined(__NT__) && (UINT_MAX == LZO_0xffffL) -# define LZO_OS_DOS16 1 -# define LZO_INFO_OS "dos16" -# elif defined(__NT__) && (__WATCOMC__ < 1100) -# define LZO_OS_WIN32 1 -# define LZO_INFO_OS "win32" -# elif defined(__linux__) || defined(__LINUX__) -# define LZO_OS_POSIX 1 -# define LZO_INFO_OS "posix" -# else -# error "please specify a target using the -bt compiler option" -# endif -#elif defined(__palmos__) -# define LZO_OS_PALMOS 1 -# define LZO_INFO_OS "palmos" -#elif defined(__TOS__) || defined(__atarist__) -# define LZO_OS_TOS 1 -# define LZO_INFO_OS "tos" -#elif defined(macintosh) && !defined(__arm__) && !defined(__i386__) && !defined(__ppc__) && !defined(__x64_64__) -# define LZO_OS_MACCLASSIC 1 -# define LZO_INFO_OS "macclassic" -#elif defined(__VMS) -# define LZO_OS_VMS 1 -# define LZO_INFO_OS "vms" -#elif (defined(__mips__) && defined(__R5900__)) || defined(__MIPS_PSX2__) -# define LZO_OS_CONSOLE 1 -# define LZO_OS_CONSOLE_PS2 1 -# define LZO_INFO_OS "console" -# define LZO_INFO_OS_CONSOLE "ps2" -#elif defined(__mips__) && defined(__psp__) -# define LZO_OS_CONSOLE 1 -# define LZO_OS_CONSOLE_PSP 1 -# define LZO_INFO_OS "console" -# define LZO_INFO_OS_CONSOLE "psp" -#else -# define LZO_OS_POSIX 1 -# define LZO_INFO_OS "posix" -#endif -#if (LZO_OS_POSIX) -# if defined(_AIX) || defined(__AIX__) || defined(__aix__) -# define LZO_OS_POSIX_AIX 1 -# define LZO_INFO_OS_POSIX "aix" -# elif defined(__FreeBSD__) -# define LZO_OS_POSIX_FREEBSD 1 -# define LZO_INFO_OS_POSIX "freebsd" -# elif defined(__hpux__) || defined(__hpux) -# define LZO_OS_POSIX_HPUX 1 -# define LZO_INFO_OS_POSIX "hpux" -# elif defined(__INTERIX) -# define LZO_OS_POSIX_INTERIX 1 -# define LZO_INFO_OS_POSIX "interix" -# elif defined(__IRIX__) || defined(__irix__) -# define LZO_OS_POSIX_IRIX 1 -# define LZO_INFO_OS_POSIX "irix" -# elif defined(__linux__) || defined(__linux) || defined(__LINUX__) -# define LZO_OS_POSIX_LINUX 1 -# define LZO_INFO_OS_POSIX "linux" -# elif defined(__APPLE__) && defined(__MACH__) -# if ((__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__-0) >= 20000) -# define LZO_OS_POSIX_DARWIN 1040 -# define LZO_INFO_OS_POSIX "darwin_iphone" -# elif ((__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__-0) >= 1040) -# define LZO_OS_POSIX_DARWIN __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ -# define LZO_INFO_OS_POSIX "darwin" -# else -# define LZO_OS_POSIX_DARWIN 1 -# define LZO_INFO_OS_POSIX "darwin" -# endif -# define LZO_OS_POSIX_MACOSX LZO_OS_POSIX_DARWIN -# elif defined(__minix__) || defined(__minix) -# define LZO_OS_POSIX_MINIX 1 -# define LZO_INFO_OS_POSIX "minix" -# elif defined(__NetBSD__) -# define LZO_OS_POSIX_NETBSD 1 -# define LZO_INFO_OS_POSIX "netbsd" -# elif defined(__OpenBSD__) -# define LZO_OS_POSIX_OPENBSD 1 -# define LZO_INFO_OS_POSIX "openbsd" -# elif defined(__osf__) -# define LZO_OS_POSIX_OSF 1 -# define LZO_INFO_OS_POSIX "osf" -# elif defined(__solaris__) || defined(__sun) -# if defined(__SVR4) || defined(__svr4__) -# define LZO_OS_POSIX_SOLARIS 1 -# define LZO_INFO_OS_POSIX "solaris" -# else -# define LZO_OS_POSIX_SUNOS 1 -# define LZO_INFO_OS_POSIX "sunos" -# endif -# elif defined(__ultrix__) || defined(__ultrix) -# define LZO_OS_POSIX_ULTRIX 1 -# define LZO_INFO_OS_POSIX "ultrix" -# elif defined(_UNICOS) -# define LZO_OS_POSIX_UNICOS 1 -# define LZO_INFO_OS_POSIX "unicos" -# else -# define LZO_OS_POSIX_UNKNOWN 1 -# define LZO_INFO_OS_POSIX "unknown" -# endif -#endif -#endif -#if (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16) -# if (UINT_MAX != LZO_0xffffL) -# error "unexpected configuration - check your compiler defines" -# endif -# if (ULONG_MAX != LZO_0xffffffffL) -# error "unexpected configuration - check your compiler defines" -# endif -#endif -#if (LZO_OS_DOS32 || LZO_OS_OS2 || LZO_OS_WIN32 || LZO_OS_WIN64) -# if (UINT_MAX != LZO_0xffffffffL) -# error "unexpected configuration - check your compiler defines" -# endif -# if (ULONG_MAX != LZO_0xffffffffL) -# error "unexpected configuration - check your compiler defines" -# endif -#endif -#if defined(CIL) && defined(_GNUCC) && defined(__GNUC__) -# define LZO_CC_CILLY 1 -# define LZO_INFO_CC "Cilly" -# if defined(__CILLY__) -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__CILLY__) -# else -# define LZO_INFO_CCVER "unknown" -# endif -#elif 0 && defined(SDCC) && defined(__VERSION__) && !defined(__GNUC__) -# define LZO_CC_SDCC 1 -# define LZO_INFO_CC "sdcc" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(SDCC) -#elif defined(__PATHSCALE__) && defined(__PATHCC_PATCHLEVEL__) -# define LZO_CC_PATHSCALE (__PATHCC__ * 0x10000L + (__PATHCC_MINOR__-0) * 0x100 + (__PATHCC_PATCHLEVEL__-0)) -# define LZO_INFO_CC "Pathscale C" -# define LZO_INFO_CCVER __PATHSCALE__ -# if defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__) -# define LZO_CC_PATHSCALE_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0)) -# endif -#elif defined(__INTEL_COMPILER) && ((__INTEL_COMPILER-0) > 0) -# define LZO_CC_INTELC __INTEL_COMPILER -# define LZO_INFO_CC "Intel C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__INTEL_COMPILER) -# if defined(_MSC_VER) && ((_MSC_VER-0) > 0) -# define LZO_CC_INTELC_MSC _MSC_VER -# elif defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__) -# define LZO_CC_INTELC_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0)) -# endif -#elif defined(__POCC__) && defined(_WIN32) -# define LZO_CC_PELLESC 1 -# define LZO_INFO_CC "Pelles C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__POCC__) -#elif defined(__ARMCC_VERSION) && defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__) -# if defined(__GNUC_PATCHLEVEL__) -# define LZO_CC_ARMCC_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0)) -# else -# define LZO_CC_ARMCC_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100) -# endif -# define LZO_CC_ARMCC __ARMCC_VERSION -# define LZO_INFO_CC "ARM C Compiler" -# define LZO_INFO_CCVER __VERSION__ -#elif defined(__clang__) && defined(__llvm__) && defined(__VERSION__) -# if defined(__clang_major__) && defined(__clang_minor__) && defined(__clang_patchlevel__) -# define LZO_CC_CLANG (__clang_major__ * 0x10000L + (__clang_minor__-0) * 0x100 + (__clang_patchlevel__-0)) -# else -# define LZO_CC_CLANG 0x010000L -# endif -# if defined(_MSC_VER) && ((_MSC_VER-0) > 0) -# define LZO_CC_CLANG_MSC _MSC_VER -# elif defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__) -# define LZO_CC_CLANG_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0)) -# endif -# define LZO_INFO_CC "clang" -# define LZO_INFO_CCVER __VERSION__ -#elif defined(__llvm__) && defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__) -# if defined(__GNUC_PATCHLEVEL__) -# define LZO_CC_LLVM_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0)) -# else -# define LZO_CC_LLVM_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100) -# endif -# define LZO_CC_LLVM LZO_CC_LLVM_GNUC -# define LZO_INFO_CC "llvm-gcc" -# define LZO_INFO_CCVER __VERSION__ -#elif defined(__ACK__) && defined(_ACK) -# define LZO_CC_ACK 1 -# define LZO_INFO_CC "Amsterdam Compiler Kit C" -# define LZO_INFO_CCVER "unknown" -#elif defined(__ARMCC_VERSION) && !defined(__GNUC__) -# define LZO_CC_ARMCC __ARMCC_VERSION -# define LZO_CC_ARMCC_ARMCC __ARMCC_VERSION -# define LZO_INFO_CC "ARM C Compiler" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__ARMCC_VERSION) -#elif defined(__AZTEC_C__) -# define LZO_CC_AZTECC 1 -# define LZO_INFO_CC "Aztec C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__AZTEC_C__) -#elif defined(__CODEGEARC__) -# define LZO_CC_CODEGEARC 1 -# define LZO_INFO_CC "CodeGear C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__CODEGEARC__) -#elif defined(__BORLANDC__) -# define LZO_CC_BORLANDC 1 -# define LZO_INFO_CC "Borland C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__BORLANDC__) -#elif defined(_CRAYC) && defined(_RELEASE) -# define LZO_CC_CRAYC 1 -# define LZO_INFO_CC "Cray C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(_RELEASE) -#elif defined(__DMC__) && defined(__SC__) -# define LZO_CC_DMC 1 -# define LZO_INFO_CC "Digital Mars C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__DMC__) -#elif defined(__DECC) -# define LZO_CC_DECC 1 -# define LZO_INFO_CC "DEC C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__DECC) -#elif (defined(__ghs) || defined(__ghs__)) && defined(__GHS_VERSION_NUMBER) && ((__GHS_VERSION_NUMBER-0) > 0) -# define LZO_CC_GHS 1 -# define LZO_INFO_CC "Green Hills C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__GHS_VERSION_NUMBER) -# if defined(_MSC_VER) && ((_MSC_VER-0) > 0) -# define LZO_CC_GHS_MSC _MSC_VER -# elif defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__) -# define LZO_CC_GHS_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0)) -# endif -#elif defined(__HIGHC__) -# define LZO_CC_HIGHC 1 -# define LZO_INFO_CC "MetaWare High C" -# define LZO_INFO_CCVER "unknown" -#elif defined(__HP_aCC) && ((__HP_aCC-0) > 0) -# define LZO_CC_HPACC __HP_aCC -# define LZO_INFO_CC "HP aCC" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__HP_aCC) -#elif defined(__IAR_SYSTEMS_ICC__) -# define LZO_CC_IARC 1 -# define LZO_INFO_CC "IAR C" -# if defined(__VER__) -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__VER__) -# else -# define LZO_INFO_CCVER "unknown" -# endif -#elif defined(__IBMC__) && ((__IBMC__-0) > 0) -# define LZO_CC_IBMC __IBMC__ -# define LZO_INFO_CC "IBM C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__IBMC__) -#elif defined(__IBMCPP__) && ((__IBMCPP__-0) > 0) -# define LZO_CC_IBMC __IBMCPP__ -# define LZO_INFO_CC "IBM C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__IBMCPP__) -#elif defined(__KEIL__) && defined(__C166__) -# define LZO_CC_KEILC 1 -# define LZO_INFO_CC "Keil C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__C166__) -#elif defined(__LCC__) && defined(_WIN32) && defined(__LCCOPTIMLEVEL) -# define LZO_CC_LCCWIN32 1 -# define LZO_INFO_CC "lcc-win32" -# define LZO_INFO_CCVER "unknown" -#elif defined(__LCC__) -# define LZO_CC_LCC 1 -# define LZO_INFO_CC "lcc" -# if defined(__LCC_VERSION__) -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__LCC_VERSION__) -# else -# define LZO_INFO_CCVER "unknown" -# endif -#elif defined(__MWERKS__) && ((__MWERKS__-0) > 0) -# define LZO_CC_MWERKS __MWERKS__ -# define LZO_INFO_CC "Metrowerks C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__MWERKS__) -#elif (defined(__NDPC__) || defined(__NDPX__)) && defined(__i386) -# define LZO_CC_NDPC 1 -# define LZO_INFO_CC "Microway NDP C" -# define LZO_INFO_CCVER "unknown" -#elif defined(__PACIFIC__) -# define LZO_CC_PACIFICC 1 -# define LZO_INFO_CC "Pacific C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__PACIFIC__) -#elif defined(__PGI) && defined(__PGIC__) && defined(__PGIC_MINOR__) -# if defined(__PGIC_PATCHLEVEL__) -# define LZO_CC_PGI (__PGIC__ * 0x10000L + (__PGIC_MINOR__-0) * 0x100 + (__PGIC_PATCHLEVEL__-0)) -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__PGIC__) "." LZO_PP_MACRO_EXPAND(__PGIC_MINOR__) "." LZO_PP_MACRO_EXPAND(__PGIC_PATCHLEVEL__) -# else -# define LZO_CC_PGI (__PGIC__ * 0x10000L + (__PGIC_MINOR__-0) * 0x100) -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__PGIC__) "." LZO_PP_MACRO_EXPAND(__PGIC_MINOR__) ".0" -# endif -# define LZO_INFO_CC "Portland Group PGI C" -#elif defined(__PGI) && (defined(__linux__) || defined(__WIN32__)) -# define LZO_CC_PGI 1 -# define LZO_INFO_CC "Portland Group PGI C" -# define LZO_INFO_CCVER "unknown" -#elif defined(__PUREC__) && defined(__TOS__) -# define LZO_CC_PUREC 1 -# define LZO_INFO_CC "Pure C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__PUREC__) -#elif defined(__SC__) && defined(__ZTC__) -# define LZO_CC_SYMANTECC 1 -# define LZO_INFO_CC "Symantec C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__SC__) -#elif defined(__SUNPRO_C) -# define LZO_INFO_CC "SunPro C" -# if ((__SUNPRO_C-0) > 0) -# define LZO_CC_SUNPROC __SUNPRO_C -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__SUNPRO_C) -# else -# define LZO_CC_SUNPROC 1 -# define LZO_INFO_CCVER "unknown" -# endif -#elif defined(__SUNPRO_CC) -# define LZO_INFO_CC "SunPro C" -# if ((__SUNPRO_CC-0) > 0) -# define LZO_CC_SUNPROC __SUNPRO_CC -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__SUNPRO_CC) -# else -# define LZO_CC_SUNPROC 1 -# define LZO_INFO_CCVER "unknown" -# endif -#elif defined(__TINYC__) -# define LZO_CC_TINYC 1 -# define LZO_INFO_CC "Tiny C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__TINYC__) -#elif defined(__TSC__) -# define LZO_CC_TOPSPEEDC 1 -# define LZO_INFO_CC "TopSpeed C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__TSC__) -#elif defined(__WATCOMC__) -# define LZO_CC_WATCOMC 1 -# define LZO_INFO_CC "Watcom C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__WATCOMC__) -#elif defined(__TURBOC__) -# define LZO_CC_TURBOC 1 -# define LZO_INFO_CC "Turbo C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__TURBOC__) -#elif defined(__ZTC__) -# define LZO_CC_ZORTECHC 1 -# define LZO_INFO_CC "Zortech C" -# if ((__ZTC__-0) == 0x310) -# define LZO_INFO_CCVER "0x310" -# else -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__ZTC__) -# endif -#elif defined(__GNUC__) && defined(__VERSION__) -# if defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__) -# define LZO_CC_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0)) -# elif defined(__GNUC_MINOR__) -# define LZO_CC_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100) -# else -# define LZO_CC_GNUC (__GNUC__ * 0x10000L) -# endif -# define LZO_INFO_CC "gcc" -# define LZO_INFO_CCVER __VERSION__ -#elif defined(_MSC_VER) && ((_MSC_VER-0) > 0) -# define LZO_CC_MSC _MSC_VER -# define LZO_INFO_CC "Microsoft C" -# if defined(_MSC_FULL_VER) -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(_MSC_VER) "." LZO_PP_MACRO_EXPAND(_MSC_FULL_VER) -# else -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(_MSC_VER) -# endif -#else -# define LZO_CC_UNKNOWN 1 -# define LZO_INFO_CC "unknown" -# define LZO_INFO_CCVER "unknown" -#endif -#if (LZO_CC_GNUC) && defined(__OPEN64__) -# if defined(__OPENCC__) && defined(__OPENCC_MINOR__) && defined(__OPENCC_PATCHLEVEL__) -# define LZO_CC_OPEN64 (__OPENCC__ * 0x10000L + (__OPENCC_MINOR__-0) * 0x100 + (__OPENCC_PATCHLEVEL__-0)) -# define LZO_CC_OPEN64_GNUC LZO_CC_GNUC -# endif -#endif -#if (LZO_CC_GNUC) && defined(__PCC__) -# if defined(__PCC__) && defined(__PCC_MINOR__) && defined(__PCC_MINORMINOR__) -# define LZO_CC_PCC (__PCC__ * 0x10000L + (__PCC_MINOR__-0) * 0x100 + (__PCC_MINORMINOR__-0)) -# define LZO_CC_PCC_GNUC LZO_CC_GNUC -# endif -#endif -#if 0 && (LZO_CC_MSC && (_MSC_VER >= 1200)) && !defined(_MSC_FULL_VER) -# error "LZO_CC_MSC: _MSC_FULL_VER is not defined" -#endif -#if !defined(__LZO_ARCH_OVERRIDE) && !(LZO_ARCH_GENERIC) && defined(_CRAY) -# if (UINT_MAX > LZO_0xffffffffL) && defined(_CRAY) -# if defined(_CRAYMPP) || defined(_CRAYT3D) || defined(_CRAYT3E) -# define LZO_ARCH_CRAY_MPP 1 -# elif defined(_CRAY1) -# define LZO_ARCH_CRAY_PVP 1 -# endif -# endif -#endif -#if !defined(__LZO_ARCH_OVERRIDE) -#if (LZO_ARCH_GENERIC) -# define LZO_INFO_ARCH "generic" -#elif (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16) -# define LZO_ARCH_I086 1 -# define LZO_INFO_ARCH "i086" -#elif defined(__aarch64__) -# define LZO_ARCH_ARM64 1 -# define LZO_INFO_ARCH "arm64" -#elif defined(__alpha__) || defined(__alpha) || defined(_M_ALPHA) -# define LZO_ARCH_ALPHA 1 -# define LZO_INFO_ARCH "alpha" -#elif (LZO_ARCH_CRAY_MPP) && (defined(_CRAYT3D) || defined(_CRAYT3E)) -# define LZO_ARCH_ALPHA 1 -# define LZO_INFO_ARCH "alpha" -#elif defined(__amd64__) || defined(__x86_64__) || defined(_M_AMD64) -# define LZO_ARCH_AMD64 1 -# define LZO_INFO_ARCH "amd64" -#elif defined(__arm__) || defined(_M_ARM) -# define LZO_ARCH_ARM 1 -# define LZO_INFO_ARCH "arm" -#elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCARM__) -# define LZO_ARCH_ARM 1 -# define LZO_INFO_ARCH "arm" -#elif (UINT_MAX <= LZO_0xffffL) && defined(__AVR__) -# define LZO_ARCH_AVR 1 -# define LZO_INFO_ARCH "avr" -#elif defined(__avr32__) || defined(__AVR32__) -# define LZO_ARCH_AVR32 1 -# define LZO_INFO_ARCH "avr32" -#elif defined(__bfin__) -# define LZO_ARCH_BLACKFIN 1 -# define LZO_INFO_ARCH "blackfin" -#elif (UINT_MAX == LZO_0xffffL) && defined(__C166__) -# define LZO_ARCH_C166 1 -# define LZO_INFO_ARCH "c166" -#elif defined(__cris__) -# define LZO_ARCH_CRIS 1 -# define LZO_INFO_ARCH "cris" -#elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCEZ80__) -# define LZO_ARCH_EZ80 1 -# define LZO_INFO_ARCH "ez80" -#elif defined(__H8300__) || defined(__H8300H__) || defined(__H8300S__) || defined(__H8300SX__) -# define LZO_ARCH_H8300 1 -# define LZO_INFO_ARCH "h8300" -#elif defined(__hppa__) || defined(__hppa) -# define LZO_ARCH_HPPA 1 -# define LZO_INFO_ARCH "hppa" -#elif defined(__386__) || defined(__i386__) || defined(__i386) || defined(_M_IX86) || defined(_M_I386) -# define LZO_ARCH_I386 1 -# define LZO_ARCH_IA32 1 -# define LZO_INFO_ARCH "i386" -#elif (LZO_CC_ZORTECHC && defined(__I86__)) -# define LZO_ARCH_I386 1 -# define LZO_ARCH_IA32 1 -# define LZO_INFO_ARCH "i386" -#elif (LZO_OS_DOS32 && LZO_CC_HIGHC) && defined(_I386) -# define LZO_ARCH_I386 1 -# define LZO_ARCH_IA32 1 -# define LZO_INFO_ARCH "i386" -#elif defined(__ia64__) || defined(__ia64) || defined(_M_IA64) -# define LZO_ARCH_IA64 1 -# define LZO_INFO_ARCH "ia64" -#elif (UINT_MAX == LZO_0xffffL) && defined(__m32c__) -# define LZO_ARCH_M16C 1 -# define LZO_INFO_ARCH "m16c" -#elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCM16C__) -# define LZO_ARCH_M16C 1 -# define LZO_INFO_ARCH "m16c" -#elif defined(__m32r__) -# define LZO_ARCH_M32R 1 -# define LZO_INFO_ARCH "m32r" -#elif (LZO_OS_TOS) || defined(__m68k__) || defined(__m68000__) || defined(__mc68000__) || defined(__mc68020__) || defined(_M_M68K) -# define LZO_ARCH_M68K 1 -# define LZO_INFO_ARCH "m68k" -#elif (UINT_MAX == LZO_0xffffL) && defined(__C251__) -# define LZO_ARCH_MCS251 1 -# define LZO_INFO_ARCH "mcs251" -#elif (UINT_MAX == LZO_0xffffL) && defined(__C51__) -# define LZO_ARCH_MCS51 1 -# define LZO_INFO_ARCH "mcs51" -#elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICC8051__) -# define LZO_ARCH_MCS51 1 -# define LZO_INFO_ARCH "mcs51" -#elif defined(__mips__) || defined(__mips) || defined(_MIPS_ARCH) || defined(_M_MRX000) -# define LZO_ARCH_MIPS 1 -# define LZO_INFO_ARCH "mips" -#elif (UINT_MAX == LZO_0xffffL) && defined(__MSP430__) -# define LZO_ARCH_MSP430 1 -# define LZO_INFO_ARCH "msp430" -#elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICC430__) -# define LZO_ARCH_MSP430 1 -# define LZO_INFO_ARCH "msp430" -#elif defined(__powerpc__) || defined(__powerpc) || defined(__ppc__) || defined(__PPC__) || defined(_M_PPC) || defined(_ARCH_PPC) || defined(_ARCH_PWR) -# define LZO_ARCH_POWERPC 1 -# define LZO_INFO_ARCH "powerpc" -#elif defined(__s390__) || defined(__s390) || defined(__s390x__) || defined(__s390x) -# define LZO_ARCH_S390 1 -# define LZO_INFO_ARCH "s390" -#elif defined(__sh__) || defined(_M_SH) -# define LZO_ARCH_SH 1 -# define LZO_INFO_ARCH "sh" -#elif defined(__sparc__) || defined(__sparc) || defined(__sparcv8) -# define LZO_ARCH_SPARC 1 -# define LZO_INFO_ARCH "sparc" -#elif defined(__SPU__) -# define LZO_ARCH_SPU 1 -# define LZO_INFO_ARCH "spu" -#elif (UINT_MAX == LZO_0xffffL) && defined(__z80) -# define LZO_ARCH_Z80 1 -# define LZO_INFO_ARCH "z80" -#elif (LZO_ARCH_CRAY_PVP) -# if defined(_CRAYSV1) -# define LZO_ARCH_CRAY_SV1 1 -# define LZO_INFO_ARCH "cray_sv1" -# elif (_ADDR64) -# define LZO_ARCH_CRAY_T90 1 -# define LZO_INFO_ARCH "cray_t90" -# elif (_ADDR32) -# define LZO_ARCH_CRAY_YMP 1 -# define LZO_INFO_ARCH "cray_ymp" -# else -# define LZO_ARCH_CRAY_XMP 1 -# define LZO_INFO_ARCH "cray_xmp" -# endif -#else -# define LZO_ARCH_UNKNOWN 1 -# define LZO_INFO_ARCH "unknown" -#endif -#endif -#if !defined(LZO_ARCH_ARM_THUMB2) -#if (LZO_ARCH_ARM) -# if defined(__ARM_ARCH_ISA_THUMB) -# if ((__ARM_ARCH_ISA_THUMB)+0 >= 2) -# define LZO_ARCH_ARM_THUMB2 1 -# endif -# elif 1 && defined(__thumb2__) -# define LZO_ARCH_ARM_THUMB2 1 -# elif 1 && defined(__TARGET_ARCH_THUMB) && ((__TARGET_ARCH_THUMB)+0 >= 4) -# define LZO_ARCH_ARM_THUMB2 1 -# endif -#endif -#endif -#if 1 && (LZO_ARCH_UNKNOWN) && (LZO_OS_DOS32 || LZO_OS_OS2) -# error "FIXME - missing define for CPU architecture" -#endif -#if 1 && (LZO_ARCH_UNKNOWN) && (LZO_OS_WIN32) -# error "FIXME - missing LZO_OS_WIN32 define for CPU architecture" -#endif -#if 1 && (LZO_ARCH_UNKNOWN) && (LZO_OS_WIN64) -# error "FIXME - missing LZO_OS_WIN64 define for CPU architecture" -#endif -#if (LZO_OS_OS216 || LZO_OS_WIN16) -# define LZO_ARCH_I086PM 1 -#elif 1 && (LZO_OS_DOS16 && defined(BLX286)) -# define LZO_ARCH_I086PM 1 -#elif 1 && (LZO_OS_DOS16 && defined(DOSX286)) -# define LZO_ARCH_I086PM 1 -#elif 1 && (LZO_OS_DOS16 && LZO_CC_BORLANDC && defined(__DPMI16__)) -# define LZO_ARCH_I086PM 1 -#endif -#if (LZO_ARCH_AMD64 && !LZO_ARCH_X64) -# define LZO_ARCH_X64 1 -#elif (!LZO_ARCH_AMD64 && LZO_ARCH_X64) && defined(__LZO_ARCH_OVERRIDE) -# define LZO_ARCH_AMD64 1 -#endif -#if (LZO_ARCH_ARM64 && !LZO_ARCH_AARCH64) -# define LZO_ARCH_AARCH64 1 -#elif (!LZO_ARCH_ARM64 && LZO_ARCH_AARCH64) && defined(__LZO_ARCH_OVERRIDE) -# define LZO_ARCH_ARM64 1 -#endif -#if (LZO_ARCH_I386 && !LZO_ARCH_X86) -# define LZO_ARCH_X86 1 -#elif (!LZO_ARCH_I386 && LZO_ARCH_X86) && defined(__LZO_ARCH_OVERRIDE) -# define LZO_ARCH_I386 1 -#endif -#if (LZO_ARCH_AMD64 && !LZO_ARCH_X64) || (!LZO_ARCH_AMD64 && LZO_ARCH_X64) -# error "unexpected configuration - check your compiler defines" -#endif -#if (LZO_ARCH_ARM64 && !LZO_ARCH_AARCH64) || (!LZO_ARCH_ARM64 && LZO_ARCH_AARCH64) -# error "unexpected configuration - check your compiler defines" -#endif -#if (LZO_ARCH_I386 && !LZO_ARCH_X86) || (!LZO_ARCH_I386 && LZO_ARCH_X86) -# error "unexpected configuration - check your compiler defines" -#endif -#if (LZO_ARCH_ARM_THUMB1 && !LZO_ARCH_ARM) -# error "unexpected configuration - check your compiler defines" -#endif -#if (LZO_ARCH_ARM_THUMB2 && !LZO_ARCH_ARM) -# error "unexpected configuration - check your compiler defines" -#endif -#if (LZO_ARCH_ARM_THUMB1 && LZO_ARCH_ARM_THUMB2) -# error "unexpected configuration - check your compiler defines" -#endif -#if (LZO_ARCH_I086PM && !LZO_ARCH_I086) -# error "unexpected configuration - check your compiler defines" -#endif -#if (LZO_ARCH_I086) -# if (UINT_MAX != LZO_0xffffL) -# error "unexpected configuration - check your compiler defines" -# endif -# if (ULONG_MAX != LZO_0xffffffffL) -# error "unexpected configuration - check your compiler defines" -# endif -#endif -#if (LZO_ARCH_I386) -# if (UINT_MAX != LZO_0xffffL) && defined(__i386_int16__) -# error "unexpected configuration - check your compiler defines" -# endif -# if (UINT_MAX != LZO_0xffffffffL) && !defined(__i386_int16__) -# error "unexpected configuration - check your compiler defines" -# endif -# if (ULONG_MAX != LZO_0xffffffffL) -# error "unexpected configuration - check your compiler defines" -# endif -#endif -#if (LZO_ARCH_AMD64 || LZO_ARCH_I386) -# if !defined(LZO_TARGET_FEATURE_SSE2) -# if defined(__SSE2__) -# define LZO_TARGET_FEATURE_SSE2 1 -# elif defined(_MSC_VER) && (defined(_M_IX86_FP) && ((_M_IX86_FP)+0 >= 2)) -# define LZO_TARGET_FEATURE_SSE2 1 -# elif (LZO_CC_INTELC_MSC || LZO_CC_MSC) && defined(_M_AMD64) -# define LZO_TARGET_FEATURE_SSE2 1 -# endif -# endif -# if !defined(LZO_TARGET_FEATURE_SSSE3) -# if (LZO_TARGET_FEATURE_SSE2) -# if defined(__SSSE3__) -# define LZO_TARGET_FEATURE_SSSE3 1 -# elif defined(_MSC_VER) && defined(__AVX__) -# define LZO_TARGET_FEATURE_SSSE3 1 -# endif -# endif -# endif -# if !defined(LZO_TARGET_FEATURE_SSE4_2) -# if (LZO_TARGET_FEATURE_SSSE3) -# if defined(__SSE4_2__) -# define LZO_TARGET_FEATURE_SSE4_2 1 -# endif -# endif -# endif -# if !defined(LZO_TARGET_FEATURE_AVX) -# if (LZO_TARGET_FEATURE_SSSE3) -# if defined(__AVX__) -# define LZO_TARGET_FEATURE_AVX 1 -# endif -# endif -# endif -# if !defined(LZO_TARGET_FEATURE_AVX2) -# if (LZO_TARGET_FEATURE_AVX) -# if defined(__AVX2__) -# define LZO_TARGET_FEATURE_AVX2 1 -# endif -# endif -# endif -#endif -#if (LZO_TARGET_FEATURE_SSSE3 && !(LZO_TARGET_FEATURE_SSE2)) -# error "unexpected configuration - check your compiler defines" -#endif -#if (LZO_TARGET_FEATURE_SSE4_2 && !(LZO_TARGET_FEATURE_SSSE3)) -# error "unexpected configuration - check your compiler defines" -#endif -#if (LZO_TARGET_FEATURE_AVX && !(LZO_TARGET_FEATURE_SSSE3)) -# error "unexpected configuration - check your compiler defines" -#endif -#if (LZO_TARGET_FEATURE_AVX2 && !(LZO_TARGET_FEATURE_AVX)) -# error "unexpected configuration - check your compiler defines" -#endif -#if (LZO_ARCH_ARM) -# if !defined(LZO_TARGET_FEATURE_NEON) -# if defined(__ARM_NEON) && ((__ARM_NEON)+0) -# define LZO_TARGET_FEATURE_NEON 1 -# elif 1 && defined(__ARM_NEON__) && ((__ARM_NEON__)+0) -# define LZO_TARGET_FEATURE_NEON 1 -# elif 1 && defined(__TARGET_FEATURE_NEON) && ((__TARGET_FEATURE_NEON)+0) -# define LZO_TARGET_FEATURE_NEON 1 -# endif -# endif -#elif (LZO_ARCH_ARM64) -# if !defined(LZO_TARGET_FEATURE_NEON) -# if 1 -# define LZO_TARGET_FEATURE_NEON 1 -# endif -# endif -#endif -#if 0 -#elif !defined(__LZO_MM_OVERRIDE) -#if (LZO_ARCH_I086) -#if (UINT_MAX != LZO_0xffffL) -# error "unexpected configuration - check your compiler defines" -#endif -#if defined(__TINY__) || defined(M_I86TM) || defined(_M_I86TM) -# define LZO_MM_TINY 1 -#elif defined(__HUGE__) || defined(_HUGE_) || defined(M_I86HM) || defined(_M_I86HM) -# define LZO_MM_HUGE 1 -#elif defined(__SMALL__) || defined(M_I86SM) || defined(_M_I86SM) || defined(SMALL_MODEL) -# define LZO_MM_SMALL 1 -#elif defined(__MEDIUM__) || defined(M_I86MM) || defined(_M_I86MM) -# define LZO_MM_MEDIUM 1 -#elif defined(__COMPACT__) || defined(M_I86CM) || defined(_M_I86CM) -# define LZO_MM_COMPACT 1 -#elif defined(__LARGE__) || defined(M_I86LM) || defined(_M_I86LM) || defined(LARGE_MODEL) -# define LZO_MM_LARGE 1 -#elif (LZO_CC_AZTECC) -# if defined(_LARGE_CODE) && defined(_LARGE_DATA) -# define LZO_MM_LARGE 1 -# elif defined(_LARGE_CODE) -# define LZO_MM_MEDIUM 1 -# elif defined(_LARGE_DATA) -# define LZO_MM_COMPACT 1 -# else -# define LZO_MM_SMALL 1 -# endif -#elif (LZO_CC_ZORTECHC && defined(__VCM__)) -# define LZO_MM_LARGE 1 -#else -# error "unknown LZO_ARCH_I086 memory model" -#endif -#if (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16) -#define LZO_HAVE_MM_HUGE_PTR 1 -#define LZO_HAVE_MM_HUGE_ARRAY 1 -#if (LZO_MM_TINY) -# undef LZO_HAVE_MM_HUGE_ARRAY -#endif -#if (LZO_CC_AZTECC || LZO_CC_PACIFICC || LZO_CC_ZORTECHC) -# undef LZO_HAVE_MM_HUGE_PTR -# undef LZO_HAVE_MM_HUGE_ARRAY -#elif (LZO_CC_DMC || LZO_CC_SYMANTECC) -# undef LZO_HAVE_MM_HUGE_ARRAY -#elif (LZO_CC_MSC && defined(_QC)) -# undef LZO_HAVE_MM_HUGE_ARRAY -# if (_MSC_VER < 600) -# undef LZO_HAVE_MM_HUGE_PTR -# endif -#elif (LZO_CC_TURBOC && (__TURBOC__ < 0x0295)) -# undef LZO_HAVE_MM_HUGE_ARRAY -#endif -#if (LZO_ARCH_I086PM) && !(LZO_HAVE_MM_HUGE_PTR) -# if (LZO_OS_DOS16) -# error "unexpected configuration - check your compiler defines" -# elif (LZO_CC_ZORTECHC) -# else -# error "unexpected configuration - check your compiler defines" -# endif -#endif -#ifdef __cplusplus -extern "C" { -#endif -#if (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0200)) - extern void __near __cdecl _AHSHIFT(void); -# define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT) -#elif (LZO_CC_DMC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC) - extern void __near __cdecl _AHSHIFT(void); -# define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT) -#elif (LZO_CC_MSC || LZO_CC_TOPSPEEDC) - extern void __near __cdecl _AHSHIFT(void); -# define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT) -#elif (LZO_CC_TURBOC && (__TURBOC__ >= 0x0295)) - extern void __near __cdecl _AHSHIFT(void); -# define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT) -#elif ((LZO_CC_AZTECC || LZO_CC_PACIFICC || LZO_CC_TURBOC) && LZO_OS_DOS16) -# define LZO_MM_AHSHIFT 12 -#elif (LZO_CC_WATCOMC) - extern unsigned char _HShift; -# define LZO_MM_AHSHIFT ((unsigned) _HShift) -#else -# error "FIXME - implement LZO_MM_AHSHIFT" -#endif -#ifdef __cplusplus -} -#endif -#endif -#elif (LZO_ARCH_C166) -#if !defined(__MODEL__) -# error "FIXME - LZO_ARCH_C166 __MODEL__" -#elif ((__MODEL__) == 0) -# define LZO_MM_SMALL 1 -#elif ((__MODEL__) == 1) -# define LZO_MM_SMALL 1 -#elif ((__MODEL__) == 2) -# define LZO_MM_LARGE 1 -#elif ((__MODEL__) == 3) -# define LZO_MM_TINY 1 -#elif ((__MODEL__) == 4) -# define LZO_MM_XTINY 1 -#elif ((__MODEL__) == 5) -# define LZO_MM_XSMALL 1 -#else -# error "FIXME - LZO_ARCH_C166 __MODEL__" -#endif -#elif (LZO_ARCH_MCS251) -#if !defined(__MODEL__) -# error "FIXME - LZO_ARCH_MCS251 __MODEL__" -#elif ((__MODEL__) == 0) -# define LZO_MM_SMALL 1 -#elif ((__MODEL__) == 2) -# define LZO_MM_LARGE 1 -#elif ((__MODEL__) == 3) -# define LZO_MM_TINY 1 -#elif ((__MODEL__) == 4) -# define LZO_MM_XTINY 1 -#elif ((__MODEL__) == 5) -# define LZO_MM_XSMALL 1 -#else -# error "FIXME - LZO_ARCH_MCS251 __MODEL__" -#endif -#elif (LZO_ARCH_MCS51) -#if !defined(__MODEL__) -# error "FIXME - LZO_ARCH_MCS51 __MODEL__" -#elif ((__MODEL__) == 1) -# define LZO_MM_SMALL 1 -#elif ((__MODEL__) == 2) -# define LZO_MM_LARGE 1 -#elif ((__MODEL__) == 3) -# define LZO_MM_TINY 1 -#elif ((__MODEL__) == 4) -# define LZO_MM_XTINY 1 -#elif ((__MODEL__) == 5) -# define LZO_MM_XSMALL 1 -#else -# error "FIXME - LZO_ARCH_MCS51 __MODEL__" -#endif -#elif (LZO_ARCH_CRAY_PVP) -# define LZO_MM_PVP 1 -#else -# define LZO_MM_FLAT 1 -#endif -#if (LZO_MM_COMPACT) -# define LZO_INFO_MM "compact" -#elif (LZO_MM_FLAT) -# define LZO_INFO_MM "flat" -#elif (LZO_MM_HUGE) -# define LZO_INFO_MM "huge" -#elif (LZO_MM_LARGE) -# define LZO_INFO_MM "large" -#elif (LZO_MM_MEDIUM) -# define LZO_INFO_MM "medium" -#elif (LZO_MM_PVP) -# define LZO_INFO_MM "pvp" -#elif (LZO_MM_SMALL) -# define LZO_INFO_MM "small" -#elif (LZO_MM_TINY) -# define LZO_INFO_MM "tiny" -#else -# error "unknown memory model" -#endif -#endif -#if !defined(__lzo_gnuc_extension__) -#if (LZO_CC_GNUC >= 0x020800ul) -# define __lzo_gnuc_extension__ __extension__ -#elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) -# define __lzo_gnuc_extension__ __extension__ -#elif (LZO_CC_IBMC >= 600) -# define __lzo_gnuc_extension__ __extension__ -#else -#endif -#endif -#if !defined(__lzo_gnuc_extension__) -# define __lzo_gnuc_extension__ /*empty*/ -#endif -#if !defined(lzo_has_builtin) -#if (LZO_CC_CLANG) && defined(__has_builtin) -# define lzo_has_builtin __has_builtin -#endif -#endif -#if !defined(lzo_has_builtin) -# define lzo_has_builtin(x) 0 -#endif -#if !defined(lzo_has_attribute) -#if (LZO_CC_CLANG) && defined(__has_attribute) -# define lzo_has_attribute __has_attribute -#endif -#endif -#if !defined(lzo_has_attribute) -# define lzo_has_attribute(x) 0 -#endif -#if !defined(lzo_has_declspec_attribute) -#if (LZO_CC_CLANG) && defined(__has_declspec_attribute) -# define lzo_has_declspec_attribute __has_declspec_attribute -#endif -#endif -#if !defined(lzo_has_declspec_attribute) -# define lzo_has_declspec_attribute(x) 0 -#endif -#if !defined(lzo_has_feature) -#if (LZO_CC_CLANG) && defined(__has_feature) -# define lzo_has_feature __has_feature -#endif -#endif -#if !defined(lzo_has_feature) -# define lzo_has_feature(x) 0 -#endif -#if !defined(lzo_has_extension) -#if (LZO_CC_CLANG) && defined(__has_extension) -# define lzo_has_extension __has_extension -#elif (LZO_CC_CLANG) && defined(__has_feature) -# define lzo_has_extension __has_feature -#endif -#endif -#if !defined(lzo_has_extension) -# define lzo_has_extension 0 -#endif -#if !defined(LZO_CFG_USE_NEW_STYLE_CASTS) && defined(__cplusplus) && 0 -# if (LZO_CC_GNUC && (LZO_CC_GNUC < 0x020800ul)) -# define LZO_CFG_USE_NEW_STYLE_CASTS 0 -# elif (LZO_CC_INTELC && (__INTEL_COMPILER < 1200)) -# define LZO_CFG_USE_NEW_STYLE_CASTS 0 -# else -# define LZO_CFG_USE_NEW_STYLE_CASTS 1 -# endif -#endif -#if !defined(LZO_CFG_USE_NEW_STYLE_CASTS) -# define LZO_CFG_USE_NEW_STYLE_CASTS 0 -#endif -#if !defined(__cplusplus) -# if defined(LZO_CFG_USE_NEW_STYLE_CASTS) -# undef LZO_CFG_USE_NEW_STYLE_CASTS -# endif -# define LZO_CFG_USE_NEW_STYLE_CASTS 0 -#endif -#if !defined(LZO_REINTERPRET_CAST) -# if (LZO_CFG_USE_NEW_STYLE_CASTS) -# define LZO_REINTERPRET_CAST(t,e) (reinterpret_cast<t> (e)) -# endif -#endif -#if !defined(LZO_REINTERPRET_CAST) -# define LZO_REINTERPRET_CAST(t,e) ((t) (e)) -#endif -#if !defined(LZO_STATIC_CAST) -# if (LZO_CFG_USE_NEW_STYLE_CASTS) -# define LZO_STATIC_CAST(t,e) (static_cast<t> (e)) -# endif -#endif -#if !defined(LZO_STATIC_CAST) -# define LZO_STATIC_CAST(t,e) ((t) (e)) -#endif -#if !defined(LZO_STATIC_CAST2) -# define LZO_STATIC_CAST2(t1,t2,e) LZO_STATIC_CAST(t1, LZO_STATIC_CAST(t2, e)) -#endif -#if !defined(LZO_UNCONST_CAST) -# if (LZO_CFG_USE_NEW_STYLE_CASTS) -# define LZO_UNCONST_CAST(t,e) (const_cast<t> (e)) -# elif (LZO_HAVE_MM_HUGE_PTR) -# define LZO_UNCONST_CAST(t,e) ((t) (e)) -# elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE) -# define LZO_UNCONST_CAST(t,e) ((t) ((void *) ((lzo_uintptr_t) ((const void *) (e))))) -# endif -#endif -#if !defined(LZO_UNCONST_CAST) -# define LZO_UNCONST_CAST(t,e) ((t) ((void *) ((const void *) (e)))) -#endif -#if !defined(LZO_UNCONST_VOLATILE_CAST) -# if (LZO_CFG_USE_NEW_STYLE_CASTS) -# define LZO_UNCONST_VOLATILE_CAST(t,e) (const_cast<t> (e)) -# elif (LZO_HAVE_MM_HUGE_PTR) -# define LZO_UNCONST_VOLATILE_CAST(t,e) ((t) (e)) -# elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE) -# define LZO_UNCONST_VOLATILE_CAST(t,e) ((t) ((volatile void *) ((lzo_uintptr_t) ((volatile const void *) (e))))) -# endif -#endif -#if !defined(LZO_UNCONST_VOLATILE_CAST) -# define LZO_UNCONST_VOLATILE_CAST(t,e) ((t) ((volatile void *) ((volatile const void *) (e)))) -#endif -#if !defined(LZO_UNVOLATILE_CAST) -# if (LZO_CFG_USE_NEW_STYLE_CASTS) -# define LZO_UNVOLATILE_CAST(t,e) (const_cast<t> (e)) -# elif (LZO_HAVE_MM_HUGE_PTR) -# define LZO_UNVOLATILE_CAST(t,e) ((t) (e)) -# elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE) -# define LZO_UNVOLATILE_CAST(t,e) ((t) ((void *) ((lzo_uintptr_t) ((volatile void *) (e))))) -# endif -#endif -#if !defined(LZO_UNVOLATILE_CAST) -# define LZO_UNVOLATILE_CAST(t,e) ((t) ((void *) ((volatile void *) (e)))) -#endif -#if !defined(LZO_UNVOLATILE_CONST_CAST) -# if (LZO_CFG_USE_NEW_STYLE_CASTS) -# define LZO_UNVOLATILE_CONST_CAST(t,e) (const_cast<t> (e)) -# elif (LZO_HAVE_MM_HUGE_PTR) -# define LZO_UNVOLATILE_CONST_CAST(t,e) ((t) (e)) -# elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE) -# define LZO_UNVOLATILE_CONST_CAST(t,e) ((t) ((const void *) ((lzo_uintptr_t) ((volatile const void *) (e))))) -# endif -#endif -#if !defined(LZO_UNVOLATILE_CONST_CAST) -# define LZO_UNVOLATILE_CONST_CAST(t,e) ((t) ((const void *) ((volatile const void *) (e)))) -#endif -#if !defined(LZO_PCAST) -# if (LZO_HAVE_MM_HUGE_PTR) -# define LZO_PCAST(t,e) ((t) (e)) -# endif -#endif -#if !defined(LZO_PCAST) -# define LZO_PCAST(t,e) LZO_STATIC_CAST(t, LZO_STATIC_CAST(void *, e)) -#endif -#if !defined(LZO_CCAST) -# if (LZO_HAVE_MM_HUGE_PTR) -# define LZO_CCAST(t,e) ((t) (e)) -# endif -#endif -#if !defined(LZO_CCAST) -# define LZO_CCAST(t,e) LZO_STATIC_CAST(t, LZO_STATIC_CAST(const void *, e)) -#endif -#if !defined(LZO_ICONV) -# define LZO_ICONV(t,e) LZO_STATIC_CAST(t, e) -#endif -#if !defined(LZO_ICAST) -# define LZO_ICAST(t,e) LZO_STATIC_CAST(t, e) -#endif -#if !defined(LZO_ITRUNC) -# define LZO_ITRUNC(t,e) LZO_STATIC_CAST(t, e) -#endif -#if !defined(__lzo_cte) -# if (LZO_CC_MSC || LZO_CC_WATCOMC) -# define __lzo_cte(e) ((void)0,(e)) -# elif 1 -# define __lzo_cte(e) ((void)0,(e)) -# endif -#endif -#if !defined(__lzo_cte) -# define __lzo_cte(e) (e) -#endif -#if !defined(LZO_BLOCK_BEGIN) -# define LZO_BLOCK_BEGIN do { -# define LZO_BLOCK_END } while __lzo_cte(0) -#endif -#if !defined(LZO_UNUSED) -# if (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0600)) -# define LZO_UNUSED(var) ((void) &var) -# elif (LZO_CC_BORLANDC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PELLESC || LZO_CC_TURBOC) -# define LZO_UNUSED(var) if (&var) ; else -# elif (LZO_CC_CLANG && (LZO_CC_CLANG >= 0x030200ul)) -# define LZO_UNUSED(var) ((void) &var) -# elif (LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE) -# define LZO_UNUSED(var) ((void) var) -# elif (LZO_CC_MSC && (_MSC_VER < 900)) -# define LZO_UNUSED(var) if (&var) ; else -# elif (LZO_CC_KEILC) -# define LZO_UNUSED(var) {extern int lzo_unused__[1-2*!(sizeof(var)>0)]; (void)lzo_unused__;} -# elif (LZO_CC_PACIFICC) -# define LZO_UNUSED(var) ((void) sizeof(var)) -# elif (LZO_CC_WATCOMC) && defined(__cplusplus) -# define LZO_UNUSED(var) ((void) var) -# else -# define LZO_UNUSED(var) ((void) &var) -# endif -#endif -#if !defined(LZO_UNUSED_FUNC) -# if (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0600)) -# define LZO_UNUSED_FUNC(func) ((void) func) -# elif (LZO_CC_BORLANDC || LZO_CC_NDPC || LZO_CC_TURBOC) -# define LZO_UNUSED_FUNC(func) if (func) ; else -# elif (LZO_CC_CLANG || LZO_CC_LLVM) -# define LZO_UNUSED_FUNC(func) ((void) &func) -# elif (LZO_CC_MSC && (_MSC_VER < 900)) -# define LZO_UNUSED_FUNC(func) if (func) ; else -# elif (LZO_CC_MSC) -# define LZO_UNUSED_FUNC(func) ((void) &func) -# elif (LZO_CC_KEILC || LZO_CC_PELLESC) -# define LZO_UNUSED_FUNC(func) {extern int lzo_unused__[1-2*!(sizeof((int)func)>0)]; (void)lzo_unused__;} -# else -# define LZO_UNUSED_FUNC(func) ((void) func) -# endif -#endif -#if !defined(LZO_UNUSED_LABEL) -# if (LZO_CC_CLANG >= 0x020800ul) -# define LZO_UNUSED_LABEL(l) (__lzo_gnuc_extension__ ((void) ((const void *) &&l))) -# elif (LZO_CC_ARMCC || LZO_CC_CLANG || LZO_CC_INTELC || LZO_CC_WATCOMC) -# define LZO_UNUSED_LABEL(l) if __lzo_cte(0) goto l -# else -# define LZO_UNUSED_LABEL(l) switch (0) case 1:goto l -# endif -#endif -#if !defined(LZO_DEFINE_UNINITIALIZED_VAR) -# if 0 -# define LZO_DEFINE_UNINITIALIZED_VAR(type,var,init) type var -# elif 0 && (LZO_CC_GNUC) -# define LZO_DEFINE_UNINITIALIZED_VAR(type,var,init) type var = var -# else -# define LZO_DEFINE_UNINITIALIZED_VAR(type,var,init) type var = init -# endif -#endif -#if !defined(__lzo_inline) -#if (LZO_CC_TURBOC && (__TURBOC__ <= 0x0295)) -#elif defined(__cplusplus) -# define __lzo_inline inline -#elif defined(__STDC_VERSION__) && (__STDC_VERSION__-0 >= 199901L) -# define __lzo_inline inline -#elif (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0550)) -# define __lzo_inline __inline -#elif (LZO_CC_ARMCC_GNUC || LZO_CC_CILLY || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || LZO_CC_PGI) -# define __lzo_inline __inline__ -#elif (LZO_CC_DMC) -# define __lzo_inline __inline -#elif (LZO_CC_GHS) -# define __lzo_inline __inline__ -#elif (LZO_CC_IBMC >= 600) -# define __lzo_inline __inline__ -#elif (LZO_CC_INTELC) -# define __lzo_inline __inline -#elif (LZO_CC_MWERKS && (__MWERKS__ >= 0x2405)) -# define __lzo_inline __inline -#elif (LZO_CC_MSC && (_MSC_VER >= 900)) -# define __lzo_inline __inline -#elif (LZO_CC_SUNPROC >= 0x5100) -# define __lzo_inline __inline__ -#endif -#endif -#if defined(__lzo_inline) -# ifndef __lzo_HAVE_inline -# define __lzo_HAVE_inline 1 -# endif -#else -# define __lzo_inline /*empty*/ -#endif -#if !defined(__lzo_forceinline) -#if (LZO_CC_GNUC >= 0x030200ul) -# define __lzo_forceinline __inline__ __attribute__((__always_inline__)) -#elif (LZO_CC_IBMC >= 700) -# define __lzo_forceinline __inline__ __attribute__((__always_inline__)) -#elif (LZO_CC_INTELC_MSC && (__INTEL_COMPILER >= 450)) -# define __lzo_forceinline __forceinline -#elif (LZO_CC_INTELC_GNUC && (__INTEL_COMPILER >= 800)) -# define __lzo_forceinline __inline__ __attribute__((__always_inline__)) -#elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) -# define __lzo_forceinline __inline__ __attribute__((__always_inline__)) -#elif (LZO_CC_MSC && (_MSC_VER >= 1200)) -# define __lzo_forceinline __forceinline -#elif (LZO_CC_PGI >= 0x0d0a00ul) -# define __lzo_forceinline __inline__ __attribute__((__always_inline__)) -#elif (LZO_CC_SUNPROC >= 0x5100) -# define __lzo_forceinline __inline__ __attribute__((__always_inline__)) -#endif -#endif -#if defined(__lzo_forceinline) -# ifndef __lzo_HAVE_forceinline -# define __lzo_HAVE_forceinline 1 -# endif -#else -# define __lzo_forceinline __lzo_inline -#endif -#if !defined(__lzo_noinline) -#if 1 && (LZO_ARCH_I386) && (LZO_CC_GNUC >= 0x040000ul) && (LZO_CC_GNUC < 0x040003ul) -# define __lzo_noinline __attribute__((__noinline__,__used__)) -#elif (LZO_CC_GNUC >= 0x030200ul) -# define __lzo_noinline __attribute__((__noinline__)) -#elif (LZO_CC_IBMC >= 700) -# define __lzo_noinline __attribute__((__noinline__)) -#elif (LZO_CC_INTELC_MSC && (__INTEL_COMPILER >= 600)) -# define __lzo_noinline __declspec(noinline) -#elif (LZO_CC_INTELC_GNUC && (__INTEL_COMPILER >= 800)) -# define __lzo_noinline __attribute__((__noinline__)) -#elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) -# define __lzo_noinline __attribute__((__noinline__)) -#elif (LZO_CC_MSC && (_MSC_VER >= 1300)) -# define __lzo_noinline __declspec(noinline) -#elif (LZO_CC_MWERKS && (__MWERKS__ >= 0x3200) && (LZO_OS_WIN32 || LZO_OS_WIN64)) -# if defined(__cplusplus) -# else -# define __lzo_noinline __declspec(noinline) -# endif -#elif (LZO_CC_PGI >= 0x0d0a00ul) -# define __lzo_noinline __attribute__((__noinline__)) -#elif (LZO_CC_SUNPROC >= 0x5100) -# define __lzo_noinline __attribute__((__noinline__)) -#endif -#endif -#if defined(__lzo_noinline) -# ifndef __lzo_HAVE_noinline -# define __lzo_HAVE_noinline 1 -# endif -#else -# define __lzo_noinline /*empty*/ -#endif -#if (__lzo_HAVE_forceinline || __lzo_HAVE_noinline) && !(__lzo_HAVE_inline) -# error "unexpected configuration - check your compiler defines" -#endif -#if !defined(__lzo_static_inline) -#if (LZO_CC_IBMC) -# define __lzo_static_inline __lzo_gnuc_extension__ static __lzo_inline -#endif -#endif -#if !defined(__lzo_static_inline) -# define __lzo_static_inline static __lzo_inline -#endif -#if !defined(__lzo_static_forceinline) -#if (LZO_CC_IBMC) -# define __lzo_static_forceinline __lzo_gnuc_extension__ static __lzo_forceinline -#endif -#endif -#if !defined(__lzo_static_forceinline) -# define __lzo_static_forceinline static __lzo_forceinline -#endif -#if !defined(__lzo_static_noinline) -#if (LZO_CC_IBMC) -# define __lzo_static_noinline __lzo_gnuc_extension__ static __lzo_noinline -#endif -#endif -#if !defined(__lzo_static_noinline) -# define __lzo_static_noinline static __lzo_noinline -#endif -#if !defined(__lzo_c99_extern_inline) -#if defined(__GNUC_GNU_INLINE__) -# define __lzo_c99_extern_inline __lzo_inline -#elif defined(__GNUC_STDC_INLINE__) -# define __lzo_c99_extern_inline extern __lzo_inline -#elif defined(__STDC_VERSION__) && (__STDC_VERSION__-0 >= 199901L) -# define __lzo_c99_extern_inline extern __lzo_inline -#endif -#if !defined(__lzo_c99_extern_inline) && (__lzo_HAVE_inline) -# define __lzo_c99_extern_inline __lzo_inline -#endif -#endif -#if defined(__lzo_c99_extern_inline) -# ifndef __lzo_HAVE_c99_extern_inline -# define __lzo_HAVE_c99_extern_inline 1 -# endif -#else -# define __lzo_c99_extern_inline /*empty*/ -#endif -#if !defined(__lzo_may_alias) -#if (LZO_CC_GNUC >= 0x030400ul) -# define __lzo_may_alias __attribute__((__may_alias__)) -#elif (LZO_CC_CLANG >= 0x020900ul) -# define __lzo_may_alias __attribute__((__may_alias__)) -#elif (LZO_CC_INTELC_GNUC && (__INTEL_COMPILER >= 1210)) && 0 -# define __lzo_may_alias __attribute__((__may_alias__)) -#elif (LZO_CC_PGI >= 0x0d0a00ul) && 0 -# define __lzo_may_alias __attribute__((__may_alias__)) -#endif -#endif -#if defined(__lzo_may_alias) -# ifndef __lzo_HAVE_may_alias -# define __lzo_HAVE_may_alias 1 -# endif -#else -# define __lzo_may_alias /*empty*/ -#endif -#if !defined(__lzo_noreturn) -#if (LZO_CC_GNUC >= 0x020700ul) -# define __lzo_noreturn __attribute__((__noreturn__)) -#elif (LZO_CC_IBMC >= 700) -# define __lzo_noreturn __attribute__((__noreturn__)) -#elif (LZO_CC_INTELC_MSC && (__INTEL_COMPILER >= 450)) -# define __lzo_noreturn __declspec(noreturn) -#elif (LZO_CC_INTELC_GNUC && (__INTEL_COMPILER >= 600)) -# define __lzo_noreturn __attribute__((__noreturn__)) -#elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) -# define __lzo_noreturn __attribute__((__noreturn__)) -#elif (LZO_CC_MSC && (_MSC_VER >= 1200)) -# define __lzo_noreturn __declspec(noreturn) -#elif (LZO_CC_PGI >= 0x0d0a00ul) -# define __lzo_noreturn __attribute__((__noreturn__)) -#endif -#endif -#if defined(__lzo_noreturn) -# ifndef __lzo_HAVE_noreturn -# define __lzo_HAVE_noreturn 1 -# endif -#else -# define __lzo_noreturn /*empty*/ -#endif -#if !defined(__lzo_nothrow) -#if (LZO_CC_GNUC >= 0x030300ul) -# define __lzo_nothrow __attribute__((__nothrow__)) -#elif (LZO_CC_INTELC_MSC && (__INTEL_COMPILER >= 450)) && defined(__cplusplus) -# define __lzo_nothrow __declspec(nothrow) -#elif (LZO_CC_INTELC_GNUC && (__INTEL_COMPILER >= 900)) -# define __lzo_nothrow __attribute__((__nothrow__)) -#elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) -# define __lzo_nothrow __attribute__((__nothrow__)) -#elif (LZO_CC_MSC && (_MSC_VER >= 1200)) && defined(__cplusplus) -# define __lzo_nothrow __declspec(nothrow) -#endif -#endif -#if defined(__lzo_nothrow) -# ifndef __lzo_HAVE_nothrow -# define __lzo_HAVE_nothrow 1 -# endif -#else -# define __lzo_nothrow /*empty*/ -#endif -#if !defined(__lzo_restrict) -#if (LZO_CC_GNUC >= 0x030400ul) -# define __lzo_restrict __restrict__ -#elif (LZO_CC_IBMC >= 800) && !defined(__cplusplus) -# define __lzo_restrict __restrict__ -#elif (LZO_CC_IBMC >= 1210) -# define __lzo_restrict __restrict__ -#elif (LZO_CC_INTELC_MSC && (__INTEL_COMPILER >= 600)) -#elif (LZO_CC_INTELC_GNUC && (__INTEL_COMPILER >= 600)) -# define __lzo_restrict __restrict__ -#elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_LLVM) -# define __lzo_restrict __restrict__ -#elif (LZO_CC_MSC && (_MSC_VER >= 1400)) -# define __lzo_restrict __restrict -#elif (LZO_CC_PGI >= 0x0d0a00ul) -# define __lzo_restrict __restrict__ -#endif -#endif -#if defined(__lzo_restrict) -# ifndef __lzo_HAVE_restrict -# define __lzo_HAVE_restrict 1 -# endif -#else -# define __lzo_restrict /*empty*/ -#endif -#if !defined(__lzo_alignof) -#if (LZO_CC_ARMCC || LZO_CC_CILLY || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || LZO_CC_PGI) -# define __lzo_alignof(e) __alignof__(e) -#elif (LZO_CC_GHS) && !defined(__cplusplus) -# define __lzo_alignof(e) __alignof__(e) -#elif (LZO_CC_IBMC >= 600) -# define __lzo_alignof(e) (__lzo_gnuc_extension__ __alignof__(e)) -#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 700)) -# define __lzo_alignof(e) __alignof__(e) -#elif (LZO_CC_MSC && (_MSC_VER >= 1300)) -# define __lzo_alignof(e) __alignof(e) -#elif (LZO_CC_SUNPROC >= 0x5100) -# define __lzo_alignof(e) __alignof__(e) -#endif -#endif -#if defined(__lzo_alignof) -# ifndef __lzo_HAVE_alignof -# define __lzo_HAVE_alignof 1 -# endif -#endif -#if !defined(__lzo_struct_packed) -#if (LZO_CC_CLANG && (LZO_CC_CLANG < 0x020800ul)) && defined(__cplusplus) -#elif (LZO_CC_GNUC && (LZO_CC_GNUC < 0x020700ul)) -#elif (LZO_CC_GNUC && (LZO_CC_GNUC < 0x020800ul)) && defined(__cplusplus) -#elif (LZO_CC_PCC && (LZO_CC_PCC < 0x010100ul)) -#elif (LZO_CC_SUNPROC && (LZO_CC_SUNPROC < 0x5110)) && !defined(__cplusplus) -#elif (LZO_CC_GNUC >= 0x030400ul) && !(LZO_CC_PCC_GNUC) && (LZO_ARCH_AMD64 || LZO_ARCH_I386) -# define __lzo_struct_packed(s) struct s { -# define __lzo_struct_packed_end() } __attribute__((__gcc_struct__,__packed__)); -# define __lzo_struct_packed_ma_end() } __lzo_may_alias __attribute__((__gcc_struct__,__packed__)); -#elif (LZO_CC_ARMCC || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_INTELC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || (LZO_CC_PGI >= 0x0d0a00ul) || (LZO_CC_SUNPROC >= 0x5100)) -# define __lzo_struct_packed(s) struct s { -# define __lzo_struct_packed_end() } __attribute__((__packed__)); -# define __lzo_struct_packed_ma_end() } __lzo_may_alias __attribute__((__packed__)); -#elif (LZO_CC_IBMC >= 700) -# define __lzo_struct_packed(s) __lzo_gnuc_extension__ struct s { -# define __lzo_struct_packed_end() } __attribute__((__packed__)); -# define __lzo_struct_packed_ma_end() } __lzo_may_alias __attribute__((__packed__)); -#elif (LZO_CC_INTELC_MSC) || (LZO_CC_MSC && (_MSC_VER >= 1300)) -# define __lzo_struct_packed(s) __pragma(pack(push,1)) struct s { -# define __lzo_struct_packed_end() } __pragma(pack(pop)); -#elif (LZO_CC_WATCOMC && (__WATCOMC__ >= 900)) -# define __lzo_struct_packed(s) _Packed struct s { -# define __lzo_struct_packed_end() }; -#endif -#endif -#if defined(__lzo_struct_packed) && !defined(__lzo_struct_packed_ma) -# define __lzo_struct_packed_ma(s) __lzo_struct_packed(s) -#endif -#if defined(__lzo_struct_packed_end) && !defined(__lzo_struct_packed_ma_end) -# define __lzo_struct_packed_ma_end() __lzo_struct_packed_end() -#endif -#if !defined(__lzo_byte_struct) -#if defined(__lzo_struct_packed) -# define __lzo_byte_struct(s,n) __lzo_struct_packed(s) unsigned char a[n]; __lzo_struct_packed_end() -# define __lzo_byte_struct_ma(s,n) __lzo_struct_packed_ma(s) unsigned char a[n]; __lzo_struct_packed_ma_end() -#elif (LZO_CC_CILLY || LZO_CC_CLANG || LZO_CC_PGI || (LZO_CC_SUNPROC >= 0x5100)) -# define __lzo_byte_struct(s,n) struct s { unsigned char a[n]; } __attribute__((__packed__)); -# define __lzo_byte_struct_ma(s,n) struct s { unsigned char a[n]; } __lzo_may_alias __attribute__((__packed__)); -#endif -#endif -#if defined(__lzo_byte_struct) && !defined(__lzo_byte_struct_ma) -# define __lzo_byte_struct_ma(s,n) __lzo_byte_struct(s,n) -#endif -#if !defined(__lzo_struct_align16) && (__lzo_HAVE_alignof) -#if (LZO_CC_GNUC && (LZO_CC_GNUC < 0x030000ul)) -#elif (LZO_CC_CLANG && (LZO_CC_CLANG < 0x020800ul)) && defined(__cplusplus) -#elif (LZO_CC_CILLY || LZO_CC_PCC) -#elif (LZO_CC_INTELC_MSC) || (LZO_CC_MSC && (_MSC_VER >= 1300)) -# define __lzo_struct_align16(s) struct __declspec(align(16)) s { -# define __lzo_struct_align16_end() }; -# define __lzo_struct_align32(s) struct __declspec(align(32)) s { -# define __lzo_struct_align32_end() }; -# define __lzo_struct_align64(s) struct __declspec(align(64)) s { -# define __lzo_struct_align64_end() }; -#elif (LZO_CC_ARMCC || LZO_CC_CLANG || LZO_CC_GNUC || (LZO_CC_IBMC >= 700) || LZO_CC_INTELC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE) -# define __lzo_struct_align16(s) struct s { -# define __lzo_struct_align16_end() } __attribute__((__aligned__(16))); -# define __lzo_struct_align32(s) struct s { -# define __lzo_struct_align32_end() } __attribute__((__aligned__(32))); -# define __lzo_struct_align64(s) struct s { -# define __lzo_struct_align64_end() } __attribute__((__aligned__(64))); -#endif -#endif -#if !defined(__lzo_union_um) -#if (LZO_CC_CLANG && (LZO_CC_CLANG < 0x020800ul)) && defined(__cplusplus) -#elif (LZO_CC_GNUC && (LZO_CC_GNUC < 0x020700ul)) -#elif (LZO_CC_GNUC && (LZO_CC_GNUC < 0x020800ul)) && defined(__cplusplus) -#elif (LZO_CC_INTELC_GNUC && (__INTEL_COMPILER < 810)) -#elif (LZO_CC_PCC && (LZO_CC_PCC < 0x010100ul)) -#elif (LZO_CC_SUNPROC && (LZO_CC_SUNPROC < 0x5110)) && !defined(__cplusplus) -#elif (LZO_CC_ARMCC || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_INTELC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || (LZO_CC_PGI >= 0x0d0a00ul) || (LZO_CC_SUNPROC >= 0x5100)) -# define __lzo_union_am(s) union s { -# define __lzo_union_am_end() } __lzo_may_alias; -# define __lzo_union_um(s) union s { -# define __lzo_union_um_end() } __lzo_may_alias __attribute__((__packed__)); -#elif (LZO_CC_IBMC >= 700) -# define __lzo_union_am(s) __lzo_gnuc_extension__ union s { -# define __lzo_union_am_end() } __lzo_may_alias; -# define __lzo_union_um(s) __lzo_gnuc_extension__ union s { -# define __lzo_union_um_end() } __lzo_may_alias __attribute__((__packed__)); -#elif (LZO_CC_INTELC_MSC) || (LZO_CC_MSC && (_MSC_VER >= 1300)) -# define __lzo_union_um(s) __pragma(pack(push,1)) union s { -# define __lzo_union_um_end() } __pragma(pack(pop)); -#elif (LZO_CC_WATCOMC && (__WATCOMC__ >= 900)) -# define __lzo_union_um(s) _Packed union s { -# define __lzo_union_um_end() }; -#endif -#endif -#if !defined(__lzo_union_am) -# define __lzo_union_am(s) union s { -# define __lzo_union_am_end() }; -#endif -#if !defined(__lzo_constructor) -#if (LZO_CC_GNUC >= 0x030400ul) -# define __lzo_constructor __attribute__((__constructor__,__used__)) -#elif (LZO_CC_GNUC >= 0x020700ul) -# define __lzo_constructor __attribute__((__constructor__)) -#elif (LZO_CC_INTELC_GNUC && (__INTEL_COMPILER >= 800)) -# define __lzo_constructor __attribute__((__constructor__,__used__)) -#elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) -# define __lzo_constructor __attribute__((__constructor__)) -#endif -#endif -#if defined(__lzo_constructor) -# ifndef __lzo_HAVE_constructor -# define __lzo_HAVE_constructor 1 -# endif -#endif -#if !defined(__lzo_destructor) -#if (LZO_CC_GNUC >= 0x030400ul) -# define __lzo_destructor __attribute__((__destructor__,__used__)) -#elif (LZO_CC_GNUC >= 0x020700ul) -# define __lzo_destructor __attribute__((__destructor__)) -#elif (LZO_CC_INTELC_GNUC && (__INTEL_COMPILER >= 800)) -# define __lzo_destructor __attribute__((__destructor__,__used__)) -#elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) -# define __lzo_destructor __attribute__((__destructor__)) -#endif -#endif -#if defined(__lzo_destructor) -# ifndef __lzo_HAVE_destructor -# define __lzo_HAVE_destructor 1 -# endif -#endif -#if (__lzo_HAVE_destructor) && !(__lzo_HAVE_constructor) -# error "unexpected configuration - check your compiler defines" -#endif -#if !defined(__lzo_likely) && !defined(__lzo_unlikely) -#if (LZO_CC_GNUC >= 0x030200ul) -# define __lzo_likely(e) (__builtin_expect(!!(e),1)) -# define __lzo_unlikely(e) (__builtin_expect(!!(e),0)) -#elif (LZO_CC_IBMC >= 1010) -# define __lzo_likely(e) (__builtin_expect(!!(e),1)) -# define __lzo_unlikely(e) (__builtin_expect(!!(e),0)) -#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 800)) -# define __lzo_likely(e) (__builtin_expect(!!(e),1)) -# define __lzo_unlikely(e) (__builtin_expect(!!(e),0)) -#elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) -# define __lzo_likely(e) (__builtin_expect(!!(e),1)) -# define __lzo_unlikely(e) (__builtin_expect(!!(e),0)) -#endif -#endif -#if defined(__lzo_likely) -# ifndef __lzo_HAVE_likely -# define __lzo_HAVE_likely 1 -# endif -#else -# define __lzo_likely(e) (e) -#endif -#if defined(__lzo_very_likely) -# ifndef __lzo_HAVE_very_likely -# define __lzo_HAVE_very_likely 1 -# endif -#else -# define __lzo_very_likely(e) __lzo_likely(e) -#endif -#if defined(__lzo_unlikely) -# ifndef __lzo_HAVE_unlikely -# define __lzo_HAVE_unlikely 1 -# endif -#else -# define __lzo_unlikely(e) (e) -#endif -#if defined(__lzo_very_unlikely) -# ifndef __lzo_HAVE_very_unlikely -# define __lzo_HAVE_very_unlikely 1 -# endif -#else -# define __lzo_very_unlikely(e) __lzo_unlikely(e) -#endif -#if !defined(__lzo_loop_forever) -# if (LZO_CC_IBMC) -# define __lzo_loop_forever() LZO_BLOCK_BEGIN for (;;) { ; } LZO_BLOCK_END -# else -# define __lzo_loop_forever() do { ; } while __lzo_cte(1) -# endif -#endif -#if !defined(__lzo_unreachable) -#if (LZO_CC_CLANG && (LZO_CC_CLANG >= 0x020800ul)) && lzo_has_builtin(__builtin_unreachable) -# define __lzo_unreachable() __builtin_unreachable(); -#elif (LZO_CC_GNUC >= 0x040500ul) -# define __lzo_unreachable() __builtin_unreachable(); -#elif (LZO_CC_INTELC_GNUC && (__INTEL_COMPILER >= 1300)) && 1 -# define __lzo_unreachable() __builtin_unreachable(); -#endif -#endif -#if defined(__lzo_unreachable) -# ifndef __lzo_HAVE_unreachable -# define __lzo_HAVE_unreachable 1 -# endif -#else -# if 0 -# define __lzo_unreachable() ((void)0); -# else -# define __lzo_unreachable() __lzo_loop_forever(); -# endif -#endif -#if !defined(lzo_unused_funcs_impl) -# if 1 && (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || (LZO_CC_GNUC >= 0x020700ul) || LZO_CC_INTELC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || LZO_CC_PGI) -# define lzo_unused_funcs_impl(r,f) static r __attribute__((__unused__)) f -# elif 1 && (LZO_CC_BORLANDC || LZO_CC_GNUC) -# define lzo_unused_funcs_impl(r,f) static r f -# else -# define lzo_unused_funcs_impl(r,f) __lzo_static_forceinline r f -# endif -#endif -#ifndef __LZO_CTA_NAME -#if (LZO_CFG_USE_COUNTER) -# define __LZO_CTA_NAME(a) LZO_PP_ECONCAT2(a,__COUNTER__) -#else -# define __LZO_CTA_NAME(a) LZO_PP_ECONCAT2(a,__LINE__) -#endif -#endif -#if !defined(LZO_COMPILE_TIME_ASSERT_HEADER) -# if (LZO_CC_AZTECC || LZO_CC_ZORTECHC) -# define LZO_COMPILE_TIME_ASSERT_HEADER(e) LZO_EXTERN_C_BEGIN extern int __LZO_CTA_NAME(lzo_cta__)[1-!(e)]; LZO_EXTERN_C_END -# elif (LZO_CC_DMC || LZO_CC_SYMANTECC) -# define LZO_COMPILE_TIME_ASSERT_HEADER(e) LZO_EXTERN_C_BEGIN extern int __LZO_CTA_NAME(lzo_cta__)[1u-2*!(e)]; LZO_EXTERN_C_END -# elif (LZO_CC_TURBOC && (__TURBOC__ == 0x0295)) -# define LZO_COMPILE_TIME_ASSERT_HEADER(e) LZO_EXTERN_C_BEGIN extern int __LZO_CTA_NAME(lzo_cta__)[1-!(e)]; LZO_EXTERN_C_END -# elif (LZO_CC_CLANG && (LZO_CC_CLANG < 0x020900ul)) && defined(__cplusplus) -# define LZO_COMPILE_TIME_ASSERT_HEADER(e) LZO_EXTERN_C_BEGIN int __LZO_CTA_NAME(lzo_cta_f__)(int [1-2*!(e)]); LZO_EXTERN_C_END -# elif (LZO_CC_GNUC) && defined(__CHECKER__) && defined(__SPARSE_CHECKER__) -# define LZO_COMPILE_TIME_ASSERT_HEADER(e) LZO_EXTERN_C_BEGIN enum {__LZO_CTA_NAME(lzo_cta_e__)=1/!!(e)} __attribute__((__unused__)); LZO_EXTERN_C_END -# else -# define LZO_COMPILE_TIME_ASSERT_HEADER(e) LZO_EXTERN_C_BEGIN extern int __LZO_CTA_NAME(lzo_cta__)[1-2*!(e)]; LZO_EXTERN_C_END -# endif -#endif -#if !defined(LZO_COMPILE_TIME_ASSERT) -# if (LZO_CC_AZTECC) -# define LZO_COMPILE_TIME_ASSERT(e) {typedef int __LZO_CTA_NAME(lzo_cta_t__)[1-!(e)];} -# elif (LZO_CC_CLANG && (LZO_CC_CLANG >= 0x030000ul)) -# define LZO_COMPILE_TIME_ASSERT(e) {typedef int __LZO_CTA_NAME(lzo_cta_t__)[1-2*!(e)] __attribute__((__unused__));} -# elif (LZO_CC_DMC || LZO_CC_PACIFICC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC) -# define LZO_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break; -# elif (LZO_CC_GNUC) && defined(__CHECKER__) && defined(__SPARSE_CHECKER__) -# define LZO_COMPILE_TIME_ASSERT(e) {(void) (0/!!(e));} -# elif (LZO_CC_GNUC >= 0x040700ul) && (LZO_CFG_USE_COUNTER) && defined(__cplusplus) -# define LZO_COMPILE_TIME_ASSERT(e) {enum {__LZO_CTA_NAME(lzo_cta_e__)=1/!!(e)} __attribute__((__unused__));} -# elif (LZO_CC_GNUC >= 0x040700ul) -# define LZO_COMPILE_TIME_ASSERT(e) {typedef int __LZO_CTA_NAME(lzo_cta_t__)[1-2*!(e)] __attribute__((__unused__));} -# elif (LZO_CC_MSC && (_MSC_VER < 900)) -# define LZO_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break; -# elif (LZO_CC_TURBOC && (__TURBOC__ == 0x0295)) -# define LZO_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break; -# else -# define LZO_COMPILE_TIME_ASSERT(e) {typedef int __LZO_CTA_NAME(lzo_cta_t__)[1-2*!(e)];} -# endif -#endif -LZO_COMPILE_TIME_ASSERT_HEADER(1 == 1) -#if defined(__cplusplus) -extern "C" { LZO_COMPILE_TIME_ASSERT_HEADER(2 == 2) } -#endif -LZO_COMPILE_TIME_ASSERT_HEADER(3 == 3) -#if (LZO_ARCH_I086 || LZO_ARCH_I386) && (LZO_OS_DOS16 || LZO_OS_DOS32 || LZO_OS_OS2 || LZO_OS_OS216 || LZO_OS_WIN16 || LZO_OS_WIN32 || LZO_OS_WIN64) -# if (LZO_CC_GNUC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PACIFICC) -# elif (LZO_CC_DMC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC) -# define __lzo_cdecl __cdecl -# define __lzo_cdecl_atexit /*empty*/ -# define __lzo_cdecl_main __cdecl -# if (LZO_OS_OS2 && (LZO_CC_DMC || LZO_CC_SYMANTECC)) -# define __lzo_cdecl_qsort __pascal -# elif (LZO_OS_OS2 && (LZO_CC_ZORTECHC)) -# define __lzo_cdecl_qsort _stdcall -# else -# define __lzo_cdecl_qsort __cdecl -# endif -# elif (LZO_CC_WATCOMC) -# define __lzo_cdecl __cdecl -# else -# define __lzo_cdecl __cdecl -# define __lzo_cdecl_atexit __cdecl -# define __lzo_cdecl_main __cdecl -# define __lzo_cdecl_qsort __cdecl -# endif -# if (LZO_CC_GNUC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PACIFICC || LZO_CC_WATCOMC) -# elif (LZO_OS_OS2 && (LZO_CC_DMC || LZO_CC_SYMANTECC)) -# define __lzo_cdecl_sighandler __pascal -# elif (LZO_OS_OS2 && (LZO_CC_ZORTECHC)) -# define __lzo_cdecl_sighandler _stdcall -# elif (LZO_CC_MSC && (_MSC_VER >= 1400)) && defined(_M_CEE_PURE) -# define __lzo_cdecl_sighandler __clrcall -# elif (LZO_CC_MSC && (_MSC_VER >= 600 && _MSC_VER < 700)) -# if defined(_DLL) -# define __lzo_cdecl_sighandler _far _cdecl _loadds -# elif defined(_MT) -# define __lzo_cdecl_sighandler _far _cdecl -# else -# define __lzo_cdecl_sighandler _cdecl -# endif -# else -# define __lzo_cdecl_sighandler __cdecl -# endif -#elif (LZO_ARCH_I386) && (LZO_CC_WATCOMC) -# define __lzo_cdecl __cdecl -#elif (LZO_ARCH_M68K && LZO_OS_TOS && (LZO_CC_PUREC || LZO_CC_TURBOC)) -# define __lzo_cdecl cdecl -#endif -#if !defined(__lzo_cdecl) -# define __lzo_cdecl /*empty*/ -#endif -#if !defined(__lzo_cdecl_atexit) -# define __lzo_cdecl_atexit /*empty*/ -#endif -#if !defined(__lzo_cdecl_main) -# define __lzo_cdecl_main /*empty*/ -#endif -#if !defined(__lzo_cdecl_qsort) -# define __lzo_cdecl_qsort /*empty*/ -#endif -#if !defined(__lzo_cdecl_sighandler) -# define __lzo_cdecl_sighandler /*empty*/ -#endif -#if !defined(__lzo_cdecl_va) -# define __lzo_cdecl_va __lzo_cdecl -#endif -#if !(LZO_CFG_NO_WINDOWS_H) -#if !defined(LZO_HAVE_WINDOWS_H) -#if (LZO_OS_CYGWIN || (LZO_OS_EMX && defined(__RSXNT__)) || LZO_OS_WIN32 || LZO_OS_WIN64) -# if (LZO_CC_WATCOMC && (__WATCOMC__ < 1000)) -# elif ((LZO_OS_WIN32 && defined(__PW32__)) && (LZO_CC_GNUC && (LZO_CC_GNUC < 0x030000ul))) -# elif ((LZO_OS_CYGWIN || defined(__MINGW32__)) && (LZO_CC_GNUC && (LZO_CC_GNUC < 0x025f00ul))) -# else -# define LZO_HAVE_WINDOWS_H 1 -# endif -#endif -#endif -#endif -#ifndef LZO_SIZEOF_SHORT -#if defined(SIZEOF_SHORT) -# define LZO_SIZEOF_SHORT (SIZEOF_SHORT) -#elif defined(__SIZEOF_SHORT__) -# define LZO_SIZEOF_SHORT (__SIZEOF_SHORT__) -#endif -#endif -#ifndef LZO_SIZEOF_INT -#if defined(SIZEOF_INT) -# define LZO_SIZEOF_INT (SIZEOF_INT) -#elif defined(__SIZEOF_INT__) -# define LZO_SIZEOF_INT (__SIZEOF_INT__) -#endif -#endif -#ifndef LZO_SIZEOF_LONG -#if defined(SIZEOF_LONG) -# define LZO_SIZEOF_LONG (SIZEOF_LONG) -#elif defined(__SIZEOF_LONG__) -# define LZO_SIZEOF_LONG (__SIZEOF_LONG__) -#endif -#endif -#ifndef LZO_SIZEOF_LONG_LONG -#if defined(SIZEOF_LONG_LONG) -# define LZO_SIZEOF_LONG_LONG (SIZEOF_LONG_LONG) -#elif defined(__SIZEOF_LONG_LONG__) -# define LZO_SIZEOF_LONG_LONG (__SIZEOF_LONG_LONG__) -#endif -#endif -#ifndef LZO_SIZEOF___INT16 -#if defined(SIZEOF___INT16) -# define LZO_SIZEOF___INT16 (SIZEOF___INT16) -#endif -#endif -#ifndef LZO_SIZEOF___INT32 -#if defined(SIZEOF___INT32) -# define LZO_SIZEOF___INT32 (SIZEOF___INT32) -#endif -#endif -#ifndef LZO_SIZEOF___INT64 -#if defined(SIZEOF___INT64) -# define LZO_SIZEOF___INT64 (SIZEOF___INT64) -#endif -#endif -#ifndef LZO_SIZEOF_VOID_P -#if defined(SIZEOF_VOID_P) -# define LZO_SIZEOF_VOID_P (SIZEOF_VOID_P) -#elif defined(__SIZEOF_POINTER__) -# define LZO_SIZEOF_VOID_P (__SIZEOF_POINTER__) -#endif -#endif -#ifndef LZO_SIZEOF_SIZE_T -#if defined(SIZEOF_SIZE_T) -# define LZO_SIZEOF_SIZE_T (SIZEOF_SIZE_T) -#elif defined(__SIZEOF_SIZE_T__) -# define LZO_SIZEOF_SIZE_T (__SIZEOF_SIZE_T__) -#endif -#endif -#ifndef LZO_SIZEOF_PTRDIFF_T -#if defined(SIZEOF_PTRDIFF_T) -# define LZO_SIZEOF_PTRDIFF_T (SIZEOF_PTRDIFF_T) -#elif defined(__SIZEOF_PTRDIFF_T__) -# define LZO_SIZEOF_PTRDIFF_T (__SIZEOF_PTRDIFF_T__) -#endif -#endif -#define __LZO_LSR(x,b) (((x)+0ul) >> (b)) -#if !defined(LZO_SIZEOF_SHORT) -# if (LZO_ARCH_CRAY_PVP) -# define LZO_SIZEOF_SHORT 8 -# elif (USHRT_MAX == LZO_0xffffL) -# define LZO_SIZEOF_SHORT 2 -# elif (__LZO_LSR(USHRT_MAX,7) == 1) -# define LZO_SIZEOF_SHORT 1 -# elif (__LZO_LSR(USHRT_MAX,15) == 1) -# define LZO_SIZEOF_SHORT 2 -# elif (__LZO_LSR(USHRT_MAX,31) == 1) -# define LZO_SIZEOF_SHORT 4 -# elif (__LZO_LSR(USHRT_MAX,63) == 1) -# define LZO_SIZEOF_SHORT 8 -# elif (__LZO_LSR(USHRT_MAX,127) == 1) -# define LZO_SIZEOF_SHORT 16 -# else -# error "LZO_SIZEOF_SHORT" -# endif -#endif -LZO_COMPILE_TIME_ASSERT_HEADER(LZO_SIZEOF_SHORT == sizeof(short)) -#if !defined(LZO_SIZEOF_INT) -# if (LZO_ARCH_CRAY_PVP) -# define LZO_SIZEOF_INT 8 -# elif (UINT_MAX == LZO_0xffffL) -# define LZO_SIZEOF_INT 2 -# elif (UINT_MAX == LZO_0xffffffffL) -# define LZO_SIZEOF_INT 4 -# elif (__LZO_LSR(UINT_MAX,7) == 1) -# define LZO_SIZEOF_INT 1 -# elif (__LZO_LSR(UINT_MAX,15) == 1) -# define LZO_SIZEOF_INT 2 -# elif (__LZO_LSR(UINT_MAX,31) == 1) -# define LZO_SIZEOF_INT 4 -# elif (__LZO_LSR(UINT_MAX,63) == 1) -# define LZO_SIZEOF_INT 8 -# elif (__LZO_LSR(UINT_MAX,127) == 1) -# define LZO_SIZEOF_INT 16 -# else -# error "LZO_SIZEOF_INT" -# endif -#endif -LZO_COMPILE_TIME_ASSERT_HEADER(LZO_SIZEOF_INT == sizeof(int)) -#if !defined(LZO_SIZEOF_LONG) -# if (ULONG_MAX == LZO_0xffffffffL) -# define LZO_SIZEOF_LONG 4 -# elif (__LZO_LSR(ULONG_MAX,7) == 1) -# define LZO_SIZEOF_LONG 1 -# elif (__LZO_LSR(ULONG_MAX,15) == 1) -# define LZO_SIZEOF_LONG 2 -# elif (__LZO_LSR(ULONG_MAX,31) == 1) -# define LZO_SIZEOF_LONG 4 -# elif (__LZO_LSR(ULONG_MAX,39) == 1) -# define LZO_SIZEOF_LONG 5 -# elif (__LZO_LSR(ULONG_MAX,63) == 1) -# define LZO_SIZEOF_LONG 8 -# elif (__LZO_LSR(ULONG_MAX,127) == 1) -# define LZO_SIZEOF_LONG 16 -# else -# error "LZO_SIZEOF_LONG" -# endif -#endif -LZO_COMPILE_TIME_ASSERT_HEADER(LZO_SIZEOF_LONG == sizeof(long)) -#if !defined(LZO_SIZEOF_LONG_LONG) && !defined(LZO_SIZEOF___INT64) -#if (LZO_SIZEOF_LONG > 0 && LZO_SIZEOF_LONG < 8) -# if defined(__LONG_MAX__) && defined(__LONG_LONG_MAX__) -# if (LZO_CC_GNUC >= 0x030300ul) -# if ((__LONG_MAX__-0) == (__LONG_LONG_MAX__-0)) -# define LZO_SIZEOF_LONG_LONG LZO_SIZEOF_LONG -# elif (__LZO_LSR(__LONG_LONG_MAX__,30) == 1) -# define LZO_SIZEOF_LONG_LONG 4 -# endif -# endif -# endif -#endif -#endif -#if !defined(LZO_SIZEOF_LONG_LONG) && !defined(LZO_SIZEOF___INT64) -#if (LZO_SIZEOF_LONG > 0 && LZO_SIZEOF_LONG < 8) -#if (LZO_ARCH_I086 && LZO_CC_DMC) -#elif (LZO_CC_CILLY) && defined(__GNUC__) -# define LZO_SIZEOF_LONG_LONG 8 -#elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE) -# define LZO_SIZEOF_LONG_LONG 8 -#elif ((LZO_OS_WIN32 || LZO_OS_WIN64 || defined(_WIN32)) && LZO_CC_MSC && (_MSC_VER >= 1400)) -# define LZO_SIZEOF_LONG_LONG 8 -#elif (LZO_OS_WIN64 || defined(_WIN64)) -# define LZO_SIZEOF___INT64 8 -#elif (LZO_ARCH_I386 && (LZO_CC_DMC)) -# define LZO_SIZEOF_LONG_LONG 8 -#elif (LZO_ARCH_I386 && (LZO_CC_SYMANTECC && (__SC__ >= 0x700))) -# define LZO_SIZEOF_LONG_LONG 8 -#elif (LZO_ARCH_I386 && (LZO_CC_INTELC && defined(__linux__))) -# define LZO_SIZEOF_LONG_LONG 8 -#elif (LZO_ARCH_I386 && (LZO_CC_MWERKS || LZO_CC_PELLESC || LZO_CC_PGI || LZO_CC_SUNPROC)) -# define LZO_SIZEOF_LONG_LONG 8 -#elif (LZO_ARCH_I386 && (LZO_CC_INTELC || LZO_CC_MSC)) -# define LZO_SIZEOF___INT64 8 -#elif ((LZO_OS_WIN32 || defined(_WIN32)) && (LZO_CC_MSC)) -# define LZO_SIZEOF___INT64 8 -#elif (LZO_ARCH_I386 && (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0520))) -# define LZO_SIZEOF___INT64 8 -#elif (LZO_ARCH_I386 && (LZO_CC_WATCOMC && (__WATCOMC__ >= 1100))) -# define LZO_SIZEOF___INT64 8 -#elif (LZO_CC_GHS && defined(__LLONG_BIT) && ((__LLONG_BIT-0) == 64)) -# define LZO_SIZEOF_LONG_LONG 8 -#elif (LZO_CC_WATCOMC && defined(_INTEGRAL_MAX_BITS) && ((_INTEGRAL_MAX_BITS-0) == 64)) -# define LZO_SIZEOF___INT64 8 -#elif (LZO_OS_OS400 || defined(__OS400__)) && defined(__LLP64_IFC__) -# define LZO_SIZEOF_LONG_LONG 8 -#elif (defined(__vms) || defined(__VMS)) && ((__INITIAL_POINTER_SIZE-0) == 64) -# define LZO_SIZEOF_LONG_LONG 8 -#elif (LZO_CC_SDCC) && (LZO_SIZEOF_INT == 2) -#elif 1 && defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) -# define LZO_SIZEOF_LONG_LONG 8 -#endif -#endif -#endif -#if defined(__cplusplus) && (LZO_CC_GNUC) -# if (LZO_CC_GNUC < 0x020800ul) -# undef LZO_SIZEOF_LONG_LONG -# endif -#endif -#if (LZO_CFG_NO_LONG_LONG) -# undef LZO_SIZEOF_LONG_LONG -#elif defined(__NO_LONG_LONG) -# undef LZO_SIZEOF_LONG_LONG -#elif defined(_NO_LONGLONG) -# undef LZO_SIZEOF_LONG_LONG -#endif -#if !defined(LZO_WORDSIZE) -#if (LZO_ARCH_ALPHA) -# define LZO_WORDSIZE 8 -#elif (LZO_ARCH_AMD64) -# define LZO_WORDSIZE 8 -#elif (LZO_ARCH_AVR) -# define LZO_WORDSIZE 1 -#elif (LZO_ARCH_H8300) -# if defined(__NORMAL_MODE__) -# define LZO_WORDSIZE 4 -# elif defined(__H8300H__) || defined(__H8300S__) || defined(__H8300SX__) -# define LZO_WORDSIZE 4 -# else -# define LZO_WORDSIZE 2 -# endif -#elif (LZO_ARCH_I086) -# define LZO_WORDSIZE 2 -#elif (LZO_ARCH_IA64) -# define LZO_WORDSIZE 8 -#elif (LZO_ARCH_M16C) -# define LZO_WORDSIZE 2 -#elif (LZO_ARCH_SPU) -# define LZO_WORDSIZE 4 -#elif (LZO_ARCH_Z80) -# define LZO_WORDSIZE 1 -#elif (LZO_SIZEOF_LONG == 8) && ((defined(__mips__) && defined(__R5900__)) || defined(__MIPS_PSX2__)) -# define LZO_WORDSIZE 8 -#elif (LZO_OS_OS400 || defined(__OS400__)) -# define LZO_WORDSIZE 8 -#elif (defined(__vms) || defined(__VMS)) && (__INITIAL_POINTER_SIZE+0 == 64) -# define LZO_WORDSIZE 8 -#endif -#endif -#if !defined(LZO_SIZEOF_VOID_P) -#if defined(__ILP32__) || defined(__ILP32) || defined(_ILP32) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(int) == 4) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(long) == 4) -# define LZO_SIZEOF_VOID_P 4 -#elif defined(__ILP64__) || defined(__ILP64) || defined(_ILP64) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(int) == 8) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(long) == 8) -# define LZO_SIZEOF_VOID_P 8 -#elif defined(__LLP64__) || defined(__LLP64) || defined(_LLP64) || defined(_WIN64) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(long) == 4) -# define LZO_SIZEOF_VOID_P 8 -#elif defined(__LP64__) || defined(__LP64) || defined(_LP64) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(long) == 8) -# define LZO_SIZEOF_VOID_P 8 -#elif (LZO_ARCH_AVR) -# define LZO_SIZEOF_VOID_P 2 -#elif (LZO_ARCH_C166 || LZO_ARCH_MCS51 || LZO_ARCH_MCS251 || LZO_ARCH_MSP430) -# define LZO_SIZEOF_VOID_P 2 -#elif (LZO_ARCH_H8300) -# if defined(__NORMAL_MODE__) -# define LZO_SIZEOF_VOID_P 2 -# elif defined(__H8300H__) || defined(__H8300S__) || defined(__H8300SX__) -# define LZO_SIZEOF_VOID_P 4 -# else -# define LZO_SIZEOF_VOID_P 2 -# endif -# if (LZO_CC_GNUC && (LZO_CC_GNUC < 0x040000ul)) && (LZO_SIZEOF_INT == 4) -# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_INT -# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_INT -# endif -#elif (LZO_ARCH_I086) -# if (LZO_MM_TINY || LZO_MM_SMALL || LZO_MM_MEDIUM) -# define LZO_SIZEOF_VOID_P 2 -# elif (LZO_MM_COMPACT || LZO_MM_LARGE || LZO_MM_HUGE) -# define LZO_SIZEOF_VOID_P 4 -# else -# error "invalid LZO_ARCH_I086 memory model" -# endif -#elif (LZO_ARCH_M16C) -# if defined(__m32c_cpu__) || defined(__m32cm_cpu__) -# define LZO_SIZEOF_VOID_P 4 -# else -# define LZO_SIZEOF_VOID_P 2 -# endif -#elif (LZO_ARCH_SPU) -# define LZO_SIZEOF_VOID_P 4 -#elif (LZO_ARCH_Z80) -# define LZO_SIZEOF_VOID_P 2 -#elif (LZO_SIZEOF_LONG == 8) && ((defined(__mips__) && defined(__R5900__)) || defined(__MIPS_PSX2__)) -# define LZO_SIZEOF_VOID_P 4 -#elif (LZO_OS_OS400 || defined(__OS400__)) -# if defined(__LLP64_IFC__) -# define LZO_SIZEOF_VOID_P 8 -# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_LONG -# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_LONG -# else -# define LZO_SIZEOF_VOID_P 16 -# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_LONG -# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_LONG -# endif -#elif (defined(__vms) || defined(__VMS)) && (__INITIAL_POINTER_SIZE+0 == 64) -# define LZO_SIZEOF_VOID_P 8 -# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_LONG -# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_LONG -#endif -#endif -#if !defined(LZO_SIZEOF_VOID_P) -# define LZO_SIZEOF_VOID_P LZO_SIZEOF_LONG -#endif -LZO_COMPILE_TIME_ASSERT_HEADER(LZO_SIZEOF_VOID_P == sizeof(void *)) -#if !defined(LZO_SIZEOF_SIZE_T) -#if (LZO_ARCH_I086 || LZO_ARCH_M16C) -# define LZO_SIZEOF_SIZE_T 2 -#endif -#endif -#if !defined(LZO_SIZEOF_SIZE_T) -# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_VOID_P -#endif -#if defined(offsetof) -LZO_COMPILE_TIME_ASSERT_HEADER(LZO_SIZEOF_SIZE_T == sizeof(size_t)) -#endif -#if !defined(LZO_SIZEOF_PTRDIFF_T) -#if (LZO_ARCH_I086) -# if (LZO_MM_TINY || LZO_MM_SMALL || LZO_MM_MEDIUM || LZO_MM_HUGE) -# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_VOID_P -# elif (LZO_MM_COMPACT || LZO_MM_LARGE) -# if (LZO_CC_BORLANDC || LZO_CC_TURBOC) -# define LZO_SIZEOF_PTRDIFF_T 4 -# else -# define LZO_SIZEOF_PTRDIFF_T 2 -# endif -# else -# error "invalid LZO_ARCH_I086 memory model" -# endif -#endif -#endif -#if !defined(LZO_SIZEOF_PTRDIFF_T) -# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_SIZE_T -#endif -#if defined(offsetof) -LZO_COMPILE_TIME_ASSERT_HEADER(LZO_SIZEOF_PTRDIFF_T == sizeof(ptrdiff_t)) -#endif -#if !defined(LZO_WORDSIZE) -# define LZO_WORDSIZE LZO_SIZEOF_VOID_P -#endif -#if (LZO_ABI_NEUTRAL_ENDIAN) -# undef LZO_ABI_BIG_ENDIAN -# undef LZO_ABI_LITTLE_ENDIAN -#elif !(LZO_ABI_BIG_ENDIAN) && !(LZO_ABI_LITTLE_ENDIAN) -#if (LZO_ARCH_ALPHA) && (LZO_ARCH_CRAY_MPP) -# define LZO_ABI_BIG_ENDIAN 1 -#elif (LZO_ARCH_IA64) && (LZO_OS_POSIX_LINUX || LZO_OS_WIN64) -# define LZO_ABI_LITTLE_ENDIAN 1 -#elif (LZO_ARCH_ALPHA || LZO_ARCH_AMD64 || LZO_ARCH_BLACKFIN || LZO_ARCH_CRIS || LZO_ARCH_I086 || LZO_ARCH_I386 || LZO_ARCH_MSP430) -# define LZO_ABI_LITTLE_ENDIAN 1 -#elif (LZO_ARCH_AVR32 || LZO_ARCH_M68K || LZO_ARCH_S390 || LZO_ARCH_SPU) -# define LZO_ABI_BIG_ENDIAN 1 -#elif 1 && defined(__IAR_SYSTEMS_ICC__) && defined(__LITTLE_ENDIAN__) -# if (__LITTLE_ENDIAN__ == 1) -# define LZO_ABI_LITTLE_ENDIAN 1 -# else -# define LZO_ABI_BIG_ENDIAN 1 -# endif -#elif 1 && defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__) -# define LZO_ABI_BIG_ENDIAN 1 -#elif 1 && defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__) -# define LZO_ABI_LITTLE_ENDIAN 1 -#elif 1 && (LZO_ARCH_ARM) && defined(__ARM_BIG_ENDIAN) && ((__ARM_BIG_ENDIAN)+0) -# define LZO_ABI_BIG_ENDIAN 1 -#elif 1 && (LZO_ARCH_ARM) && defined(__ARMEB__) && !defined(__ARMEL__) -# define LZO_ABI_BIG_ENDIAN 1 -#elif 1 && (LZO_ARCH_ARM) && defined(__ARMEL__) && !defined(__ARMEB__) -# define LZO_ABI_LITTLE_ENDIAN 1 -#elif 1 && (LZO_ARCH_ARM && LZO_CC_ARMCC_ARMCC) -# if defined(__BIG_ENDIAN) && defined(__LITTLE_ENDIAN) -# error "unexpected configuration - check your compiler defines" -# elif defined(__BIG_ENDIAN) -# define LZO_ABI_BIG_ENDIAN 1 -# else -# define LZO_ABI_LITTLE_ENDIAN 1 -# endif -# define LZO_ABI_LITTLE_ENDIAN 1 -#elif 1 && (LZO_ARCH_ARM64) && defined(__ARM_BIG_ENDIAN) && ((__ARM_BIG_ENDIAN)+0) -# define LZO_ABI_BIG_ENDIAN 1 -#elif 1 && (LZO_ARCH_ARM64) && defined(__AARCH64EB__) && !defined(__AARCH64EL__) -# define LZO_ABI_BIG_ENDIAN 1 -#elif 1 && (LZO_ARCH_ARM64) && defined(__AARCH64EL__) && !defined(__AARCH64EB__) -# define LZO_ABI_LITTLE_ENDIAN 1 -#elif 1 && (LZO_ARCH_MIPS) && defined(__MIPSEB__) && !defined(__MIPSEL__) -# define LZO_ABI_BIG_ENDIAN 1 -#elif 1 && (LZO_ARCH_MIPS) && defined(__MIPSEL__) && !defined(__MIPSEB__) -# define LZO_ABI_LITTLE_ENDIAN 1 -#endif -#endif -#if (LZO_ABI_BIG_ENDIAN) && (LZO_ABI_LITTLE_ENDIAN) -# error "unexpected configuration - check your compiler defines" -#endif -#if (LZO_ABI_BIG_ENDIAN) -# define LZO_INFO_ABI_ENDIAN "be" -#elif (LZO_ABI_LITTLE_ENDIAN) -# define LZO_INFO_ABI_ENDIAN "le" -#elif (LZO_ABI_NEUTRAL_ENDIAN) -# define LZO_INFO_ABI_ENDIAN "neutral" -#endif -#if (LZO_SIZEOF_INT == 1 && LZO_SIZEOF_LONG == 2 && LZO_SIZEOF_VOID_P == 2) -# define LZO_ABI_I8LP16 1 -# define LZO_INFO_ABI_PM "i8lp16" -#elif (LZO_SIZEOF_INT == 2 && LZO_SIZEOF_LONG == 2 && LZO_SIZEOF_VOID_P == 2) -# define LZO_ABI_ILP16 1 -# define LZO_INFO_ABI_PM "ilp16" -#elif (LZO_SIZEOF_INT == 2 && LZO_SIZEOF_LONG == 4 && LZO_SIZEOF_VOID_P == 4) -# define LZO_ABI_LP32 1 -# define LZO_INFO_ABI_PM "lp32" -#elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 4 && LZO_SIZEOF_VOID_P == 4) -# define LZO_ABI_ILP32 1 -# define LZO_INFO_ABI_PM "ilp32" -#elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 4 && LZO_SIZEOF_VOID_P == 8 && LZO_SIZEOF_SIZE_T == 8) -# define LZO_ABI_LLP64 1 -# define LZO_INFO_ABI_PM "llp64" -#elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 8 && LZO_SIZEOF_VOID_P == 8) -# define LZO_ABI_LP64 1 -# define LZO_INFO_ABI_PM "lp64" -#elif (LZO_SIZEOF_INT == 8 && LZO_SIZEOF_LONG == 8 && LZO_SIZEOF_VOID_P == 8) -# define LZO_ABI_ILP64 1 -# define LZO_INFO_ABI_PM "ilp64" -#elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 8 && LZO_SIZEOF_VOID_P == 4) -# define LZO_ABI_IP32L64 1 -# define LZO_INFO_ABI_PM "ip32l64" -#endif -#if 0 -#elif !defined(__LZO_LIBC_OVERRIDE) -#if (LZO_LIBC_NAKED) -# define LZO_INFO_LIBC "naked" -#elif (LZO_LIBC_FREESTANDING) -# define LZO_INFO_LIBC "freestanding" -#elif (LZO_LIBC_MOSTLY_FREESTANDING) -# define LZO_INFO_LIBC "mfreestanding" -#elif (LZO_LIBC_ISOC90) -# define LZO_INFO_LIBC "isoc90" -#elif (LZO_LIBC_ISOC99) -# define LZO_INFO_LIBC "isoc99" -#elif (LZO_CC_ARMCC_ARMCC) && defined(__ARMCLIB_VERSION) -# define LZO_LIBC_ISOC90 1 -# define LZO_INFO_LIBC "isoc90" -#elif defined(__dietlibc__) -# define LZO_LIBC_DIETLIBC 1 -# define LZO_INFO_LIBC "dietlibc" -#elif defined(_NEWLIB_VERSION) -# define LZO_LIBC_NEWLIB 1 -# define LZO_INFO_LIBC "newlib" -#elif defined(__UCLIBC__) && defined(__UCLIBC_MAJOR__) && defined(__UCLIBC_MINOR__) -# if defined(__UCLIBC_SUBLEVEL__) -# define LZO_LIBC_UCLIBC (__UCLIBC_MAJOR__ * 0x10000L + (__UCLIBC_MINOR__-0) * 0x100 + (__UCLIBC_SUBLEVEL__-0)) -# else -# define LZO_LIBC_UCLIBC 0x00090bL -# endif -# define LZO_INFO_LIBC "uc" "libc" -#elif defined(__GLIBC__) && defined(__GLIBC_MINOR__) -# define LZO_LIBC_GLIBC (__GLIBC__ * 0x10000L + (__GLIBC_MINOR__-0) * 0x100) -# define LZO_INFO_LIBC "glibc" -#elif (LZO_CC_MWERKS) && defined(__MSL__) -# define LZO_LIBC_MSL __MSL__ -# define LZO_INFO_LIBC "msl" -#elif 1 && defined(__IAR_SYSTEMS_ICC__) -# define LZO_LIBC_ISOC90 1 -# define LZO_INFO_LIBC "isoc90" -#else -# define LZO_LIBC_DEFAULT 1 -# define LZO_INFO_LIBC "default" -#endif -#endif -#if (LZO_ARCH_I386 && (LZO_OS_DOS32 || LZO_OS_WIN32) && (LZO_CC_DMC || LZO_CC_INTELC || LZO_CC_MSC || LZO_CC_PELLESC)) -# define LZO_ASM_SYNTAX_MSC 1 -#elif (LZO_OS_WIN64 && (LZO_CC_DMC || LZO_CC_INTELC || LZO_CC_MSC || LZO_CC_PELLESC)) -#elif (LZO_ARCH_I386 && LZO_CC_GNUC && (LZO_CC_GNUC == 0x011f00ul)) -#elif (LZO_ARCH_I386 && (LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_INTELC || LZO_CC_PATHSCALE)) -# define LZO_ASM_SYNTAX_GNUC 1 -#elif (LZO_ARCH_AMD64 && (LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_INTELC || LZO_CC_PATHSCALE)) -# define LZO_ASM_SYNTAX_GNUC 1 -#elif (LZO_CC_GNUC) -# define LZO_ASM_SYNTAX_GNUC 1 -#endif -#if (LZO_ASM_SYNTAX_GNUC) -#if (LZO_ARCH_I386 && LZO_CC_GNUC && (LZO_CC_GNUC < 0x020000ul)) -# define __LZO_ASM_CLOBBER "ax" -# define __LZO_ASM_CLOBBER_LIST_CC /*empty*/ -# define __LZO_ASM_CLOBBER_LIST_CC_MEMORY /*empty*/ -# define __LZO_ASM_CLOBBER_LIST_EMPTY /*empty*/ -#elif (LZO_CC_INTELC && (__INTEL_COMPILER < 1000)) -# define __LZO_ASM_CLOBBER "memory" -# define __LZO_ASM_CLOBBER_LIST_CC /*empty*/ -# define __LZO_ASM_CLOBBER_LIST_CC_MEMORY : "memory" -# define __LZO_ASM_CLOBBER_LIST_EMPTY /*empty*/ -#else -# define __LZO_ASM_CLOBBER "cc", "memory" -# define __LZO_ASM_CLOBBER_LIST_CC : "cc" -# define __LZO_ASM_CLOBBER_LIST_CC_MEMORY : "cc", "memory" -# define __LZO_ASM_CLOBBER_LIST_EMPTY /*empty*/ -#endif -#endif -#if (LZO_ARCH_ALPHA) -# define LZO_OPT_AVOID_UINT_INDEX 1 -#elif (LZO_ARCH_AMD64) -# define LZO_OPT_AVOID_INT_INDEX 1 -# define LZO_OPT_AVOID_UINT_INDEX 1 -# ifndef LZO_OPT_UNALIGNED16 -# define LZO_OPT_UNALIGNED16 1 -# endif -# ifndef LZO_OPT_UNALIGNED32 -# define LZO_OPT_UNALIGNED32 1 -# endif -# ifndef LZO_OPT_UNALIGNED64 -# define LZO_OPT_UNALIGNED64 1 -# endif -#elif (LZO_ARCH_ARM) -# if defined(__ARM_FEATURE_UNALIGNED) -# if ((__ARM_FEATURE_UNALIGNED)+0) -# ifndef LZO_OPT_UNALIGNED16 -# define LZO_OPT_UNALIGNED16 1 -# endif -# ifndef LZO_OPT_UNALIGNED32 -# define LZO_OPT_UNALIGNED32 1 -# endif -# endif -# elif 1 && (LZO_ARCH_ARM_THUMB2) -# ifndef LZO_OPT_UNALIGNED16 -# define LZO_OPT_UNALIGNED16 1 -# endif -# ifndef LZO_OPT_UNALIGNED32 -# define LZO_OPT_UNALIGNED32 1 -# endif -# elif 1 && defined(__TARGET_ARCH_ARM) && ((__TARGET_ARCH_ARM)+0 >= 7) -# ifndef LZO_OPT_UNALIGNED16 -# define LZO_OPT_UNALIGNED16 1 -# endif -# ifndef LZO_OPT_UNALIGNED32 -# define LZO_OPT_UNALIGNED32 1 -# endif -# elif 1 && defined(__TARGET_ARCH_ARM) && ((__TARGET_ARCH_ARM)+0 >= 6) && (defined(__TARGET_PROFILE_A) || defined(__TARGET_PROFILE_R)) -# ifndef LZO_OPT_UNALIGNED16 -# define LZO_OPT_UNALIGNED16 1 -# endif -# ifndef LZO_OPT_UNALIGNED32 -# define LZO_OPT_UNALIGNED32 1 -# endif -# endif -#elif (LZO_ARCH_ARM64) -# ifndef LZO_OPT_UNALIGNED16 -# define LZO_OPT_UNALIGNED16 1 -# endif -# ifndef LZO_OPT_UNALIGNED32 -# define LZO_OPT_UNALIGNED32 1 -# endif -# ifndef LZO_OPT_UNALIGNED64 -# define LZO_OPT_UNALIGNED64 1 -# endif -#elif (LZO_ARCH_CRIS) -# ifndef LZO_OPT_UNALIGNED16 -# define LZO_OPT_UNALIGNED16 1 -# endif -# ifndef LZO_OPT_UNALIGNED32 -# define LZO_OPT_UNALIGNED32 1 -# endif -#elif (LZO_ARCH_I386) -# ifndef LZO_OPT_UNALIGNED16 -# define LZO_OPT_UNALIGNED16 1 -# endif -# ifndef LZO_OPT_UNALIGNED32 -# define LZO_OPT_UNALIGNED32 1 -# endif -#elif (LZO_ARCH_IA64) -# define LZO_OPT_AVOID_INT_INDEX 1 -# define LZO_OPT_AVOID_UINT_INDEX 1 -# define LZO_OPT_PREFER_POSTINC 1 -#elif (LZO_ARCH_M68K) -# define LZO_OPT_PREFER_POSTINC 1 -# define LZO_OPT_PREFER_PREDEC 1 -# if defined(__mc68020__) && !defined(__mcoldfire__) -# ifndef LZO_OPT_UNALIGNED16 -# define LZO_OPT_UNALIGNED16 1 -# endif -# ifndef LZO_OPT_UNALIGNED32 -# define LZO_OPT_UNALIGNED32 1 -# endif -# endif -#elif (LZO_ARCH_MIPS) -# define LZO_OPT_AVOID_UINT_INDEX 1 -#elif (LZO_ARCH_POWERPC) -# define LZO_OPT_PREFER_PREINC 1 -# define LZO_OPT_PREFER_PREDEC 1 -# if (LZO_ABI_BIG_ENDIAN) -# ifndef LZO_OPT_UNALIGNED16 -# define LZO_OPT_UNALIGNED16 1 -# endif -# ifndef LZO_OPT_UNALIGNED32 -# define LZO_OPT_UNALIGNED32 1 -# endif -# if (LZO_WORDSIZE == 8) -# ifndef LZO_OPT_UNALIGNED64 -# define LZO_OPT_UNALIGNED64 1 -# endif -# endif -# endif -#elif (LZO_ARCH_S390) -# ifndef LZO_OPT_UNALIGNED16 -# define LZO_OPT_UNALIGNED16 1 -# endif -# ifndef LZO_OPT_UNALIGNED32 -# define LZO_OPT_UNALIGNED32 1 -# endif -# if (LZO_WORDSIZE == 8) -# ifndef LZO_OPT_UNALIGNED64 -# define LZO_OPT_UNALIGNED64 1 -# endif -# endif -#elif (LZO_ARCH_SH) -# define LZO_OPT_PREFER_POSTINC 1 -# define LZO_OPT_PREFER_PREDEC 1 -#endif -#ifndef LZO_CFG_NO_INLINE_ASM -#if (LZO_ABI_NEUTRAL_ENDIAN) || (LZO_ARCH_GENERIC) -# define LZO_CFG_NO_INLINE_ASM 1 -#elif (LZO_CC_LLVM) -# define LZO_CFG_NO_INLINE_ASM 1 -#endif -#endif -#if (LZO_CFG_NO_INLINE_ASM) -# undef LZO_ASM_SYNTAX_MSC -# undef LZO_ASM_SYNTAX_GNUC -# undef __LZO_ASM_CLOBBER -# undef __LZO_ASM_CLOBBER_LIST_CC -# undef __LZO_ASM_CLOBBER_LIST_CC_MEMORY -# undef __LZO_ASM_CLOBBER_LIST_EMPTY -#endif -#ifndef LZO_CFG_NO_UNALIGNED -#if (LZO_ABI_NEUTRAL_ENDIAN) || (LZO_ARCH_GENERIC) -# define LZO_CFG_NO_UNALIGNED 1 -#endif -#endif -#if (LZO_CFG_NO_UNALIGNED) -# undef LZO_OPT_UNALIGNED16 -# undef LZO_OPT_UNALIGNED32 -# undef LZO_OPT_UNALIGNED64 -#endif -#if defined(__LZO_INFOSTR_MM) -#elif (LZO_MM_FLAT) && (defined(__LZO_INFOSTR_PM) || defined(LZO_INFO_ABI_PM)) -# define __LZO_INFOSTR_MM "" -#elif defined(LZO_INFO_MM) -# define __LZO_INFOSTR_MM "." LZO_INFO_MM -#else -# define __LZO_INFOSTR_MM "" -#endif -#if defined(__LZO_INFOSTR_PM) -#elif defined(LZO_INFO_ABI_PM) -# define __LZO_INFOSTR_PM "." LZO_INFO_ABI_PM -#else -# define __LZO_INFOSTR_PM "" -#endif -#if defined(__LZO_INFOSTR_ENDIAN) -#elif defined(LZO_INFO_ABI_ENDIAN) -# define __LZO_INFOSTR_ENDIAN "." LZO_INFO_ABI_ENDIAN -#else -# define __LZO_INFOSTR_ENDIAN "" -#endif -#if defined(__LZO_INFOSTR_OSNAME) -#elif defined(LZO_INFO_OS_CONSOLE) -# define __LZO_INFOSTR_OSNAME LZO_INFO_OS "." LZO_INFO_OS_CONSOLE -#elif defined(LZO_INFO_OS_POSIX) -# define __LZO_INFOSTR_OSNAME LZO_INFO_OS "." LZO_INFO_OS_POSIX -#else -# define __LZO_INFOSTR_OSNAME LZO_INFO_OS -#endif -#if defined(__LZO_INFOSTR_LIBC) -#elif defined(LZO_INFO_LIBC) -# define __LZO_INFOSTR_LIBC "." LZO_INFO_LIBC -#else -# define __LZO_INFOSTR_LIBC "" -#endif -#if defined(__LZO_INFOSTR_CCVER) -#elif defined(LZO_INFO_CCVER) -# define __LZO_INFOSTR_CCVER " " LZO_INFO_CCVER -#else -# define __LZO_INFOSTR_CCVER "" -#endif -#define LZO_INFO_STRING \ - LZO_INFO_ARCH __LZO_INFOSTR_MM __LZO_INFOSTR_PM __LZO_INFOSTR_ENDIAN \ - " " __LZO_INFOSTR_OSNAME __LZO_INFOSTR_LIBC " " LZO_INFO_CC __LZO_INFOSTR_CCVER -#if !(LZO_CFG_SKIP_LZO_TYPES) -#if (!(LZO_SIZEOF_SHORT+0 > 0 && LZO_SIZEOF_INT+0 > 0 && LZO_SIZEOF_LONG+0 > 0)) -# error "missing defines for sizes" -#endif -#if (!(LZO_SIZEOF_PTRDIFF_T+0 > 0 && LZO_SIZEOF_SIZE_T+0 > 0 && LZO_SIZEOF_VOID_P+0 > 0)) -# error "missing defines for sizes" -#endif -#define LZO_TYPEOF_CHAR 1u -#define LZO_TYPEOF_SHORT 2u -#define LZO_TYPEOF_INT 3u -#define LZO_TYPEOF_LONG 4u -#define LZO_TYPEOF_LONG_LONG 5u -#define LZO_TYPEOF___INT8 17u -#define LZO_TYPEOF___INT16 18u -#define LZO_TYPEOF___INT32 19u -#define LZO_TYPEOF___INT64 20u -#define LZO_TYPEOF___INT128 21u -#define LZO_TYPEOF___INT256 22u -#define LZO_TYPEOF___MODE_QI 33u -#define LZO_TYPEOF___MODE_HI 34u -#define LZO_TYPEOF___MODE_SI 35u -#define LZO_TYPEOF___MODE_DI 36u -#define LZO_TYPEOF___MODE_TI 37u -#define LZO_TYPEOF_CHAR_P 129u -#if !defined(lzo_llong_t) -#if (LZO_SIZEOF_LONG_LONG+0 > 0) -__lzo_gnuc_extension__ typedef long long lzo_llong_t__; -__lzo_gnuc_extension__ typedef unsigned long long lzo_ullong_t__; -# define lzo_llong_t lzo_llong_t__ -# define lzo_ullong_t lzo_ullong_t__ -#endif -#endif -#if !defined(lzo_int16e_t) -#if (LZO_SIZEOF_LONG == 2) -# define lzo_int16e_t long -# define lzo_uint16e_t unsigned long -# define LZO_TYPEOF_LZO_INT16E_T LZO_TYPEOF_LONG -#elif (LZO_SIZEOF_INT == 2) -# define lzo_int16e_t int -# define lzo_uint16e_t unsigned int -# define LZO_TYPEOF_LZO_INT16E_T LZO_TYPEOF_INT -#elif (LZO_SIZEOF_SHORT == 2) -# define lzo_int16e_t short int -# define lzo_uint16e_t unsigned short int -# define LZO_TYPEOF_LZO_INT16E_T LZO_TYPEOF_SHORT -#elif 1 && !(LZO_CFG_TYPE_NO_MODE_HI) && (LZO_CC_CLANG || (LZO_CC_GNUC >= 0x025f00ul) || LZO_CC_LLVM) - typedef int lzo_int16e_hi_t__ __attribute__((__mode__(__HI__))); - typedef unsigned int lzo_uint16e_hi_t__ __attribute__((__mode__(__HI__))); -# define lzo_int16e_t lzo_int16e_hi_t__ -# define lzo_uint16e_t lzo_uint16e_hi_t__ -# define LZO_TYPEOF_LZO_INT16E_T LZO_TYPEOF___MODE_HI -#elif (LZO_SIZEOF___INT16 == 2) -# define lzo_int16e_t __int16 -# define lzo_uint16e_t unsigned __int16 -# define LZO_TYPEOF_LZO_INT16E_T LZO_TYPEOF___INT16 -#else -#endif -#endif -#if defined(lzo_int16e_t) -# define LZO_SIZEOF_LZO_INT16E_T 2 - LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int16e_t) == 2) - LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int16e_t) == LZO_SIZEOF_LZO_INT16E_T) -#endif -#if !defined(lzo_int32e_t) -#if (LZO_SIZEOF_LONG == 4) -# define lzo_int32e_t long int -# define lzo_uint32e_t unsigned long int -# define LZO_TYPEOF_LZO_INT32E_T LZO_TYPEOF_LONG -#elif (LZO_SIZEOF_INT == 4) -# define lzo_int32e_t int -# define lzo_uint32e_t unsigned int -# define LZO_TYPEOF_LZO_INT32E_T LZO_TYPEOF_INT -#elif (LZO_SIZEOF_SHORT == 4) -# define lzo_int32e_t short int -# define lzo_uint32e_t unsigned short int -# define LZO_TYPEOF_LZO_INT32E_T LZO_TYPEOF_SHORT -#elif (LZO_SIZEOF_LONG_LONG == 4) -# define lzo_int32e_t lzo_llong_t -# define lzo_uint32e_t lzo_ullong_t -# define LZO_TYPEOF_LZO_INT32E_T LZO_TYPEOF_LONG_LONG -#elif 1 && !(LZO_CFG_TYPE_NO_MODE_SI) && (LZO_CC_CLANG || (LZO_CC_GNUC >= 0x025f00ul) || LZO_CC_LLVM) && (__INT_MAX__+0 > 2147483647L) - typedef int lzo_int32e_si_t__ __attribute__((__mode__(__SI__))); - typedef unsigned int lzo_uint32e_si_t__ __attribute__((__mode__(__SI__))); -# define lzo_int32e_t lzo_int32e_si_t__ -# define lzo_uint32e_t lzo_uint32e_si_t__ -# define LZO_TYPEOF_LZO_INT32E_T LZO_TYPEOF___MODE_SI -#elif 1 && !(LZO_CFG_TYPE_NO_MODE_SI) && (LZO_CC_GNUC >= 0x025f00ul) && defined(__AVR__) && (__LONG_MAX__+0 == 32767L) - typedef int lzo_int32e_si_t__ __attribute__((__mode__(__SI__))); - typedef unsigned int lzo_uint32e_si_t__ __attribute__((__mode__(__SI__))); -# define lzo_int32e_t lzo_int32e_si_t__ -# define lzo_uint32e_t lzo_uint32e_si_t__ -# define LZO_INT32_C(c) (c##LL) -# define LZO_UINT32_C(c) (c##ULL) -# define LZO_TYPEOF_LZO_INT32E_T LZO_TYPEOF___MODE_SI -#elif (LZO_SIZEOF___INT32 == 4) -# define lzo_int32e_t __int32 -# define lzo_uint32e_t unsigned __int32 -# define LZO_TYPEOF_LZO_INT32E_T LZO_TYPEOF___INT32 -#else -#endif -#endif -#if defined(lzo_int32e_t) -# define LZO_SIZEOF_LZO_INT32E_T 4 - LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int32e_t) == 4) - LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int32e_t) == LZO_SIZEOF_LZO_INT32E_T) -#endif -#if !defined(lzo_int64e_t) -#if (LZO_SIZEOF___INT64 == 8) -# if (LZO_CC_BORLANDC) && !(LZO_CFG_TYPE_PREFER___INT64) -# define LZO_CFG_TYPE_PREFER___INT64 1 -# endif -#endif -#if (LZO_SIZEOF_INT == 8) && (LZO_SIZEOF_INT < LZO_SIZEOF_LONG) -# define lzo_int64e_t int -# define lzo_uint64e_t unsigned int -# define LZO_TYPEOF_LZO_INT64E_T LZO_TYPEOF_INT -#elif (LZO_SIZEOF_LONG == 8) -# define lzo_int64e_t long int -# define lzo_uint64e_t unsigned long int -# define LZO_TYPEOF_LZO_INT64E_T LZO_TYPEOF_LONG -#elif (LZO_SIZEOF_LONG_LONG == 8) && !(LZO_CFG_TYPE_PREFER___INT64) -# define lzo_int64e_t lzo_llong_t -# define lzo_uint64e_t lzo_ullong_t -# define LZO_TYPEOF_LZO_INT64E_T LZO_TYPEOF_LONG_LONG -# if (LZO_CC_BORLANDC) -# define LZO_INT64_C(c) ((c) + 0ll) -# define LZO_UINT64_C(c) ((c) + 0ull) -# elif 0 -# define LZO_INT64_C(c) (__lzo_gnuc_extension__ (c##LL)) -# define LZO_UINT64_C(c) (__lzo_gnuc_extension__ (c##ULL)) -# else -# define LZO_INT64_C(c) (c##LL) -# define LZO_UINT64_C(c) (c##ULL) -# endif -#elif (LZO_SIZEOF___INT64 == 8) -# define lzo_int64e_t __int64 -# define lzo_uint64e_t unsigned __int64 -# define LZO_TYPEOF_LZO_INT64E_T LZO_TYPEOF___INT64 -# if (LZO_CC_BORLANDC) -# define LZO_INT64_C(c) ((c) + 0i64) -# define LZO_UINT64_C(c) ((c) + 0ui64) -# else -# define LZO_INT64_C(c) (c##i64) -# define LZO_UINT64_C(c) (c##ui64) -# endif -#else -#endif -#endif -#if defined(lzo_int64e_t) -# define LZO_SIZEOF_LZO_INT64E_T 8 - LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int64e_t) == 8) - LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int64e_t) == LZO_SIZEOF_LZO_INT64E_T) -#endif -#if !defined(lzo_int32l_t) -#if defined(lzo_int32e_t) -# define lzo_int32l_t lzo_int32e_t -# define lzo_uint32l_t lzo_uint32e_t -# define LZO_SIZEOF_LZO_INT32L_T LZO_SIZEOF_LZO_INT32E_T -# define LZO_TYPEOF_LZO_INT32L_T LZO_TYPEOF_LZO_INT32E_T -#elif (LZO_SIZEOF_INT >= 4) && (LZO_SIZEOF_INT < LZO_SIZEOF_LONG) -# define lzo_int32l_t int -# define lzo_uint32l_t unsigned int -# define LZO_SIZEOF_LZO_INT32L_T LZO_SIZEOF_INT -# define LZO_TYPEOF_LZO_INT32L_T LZO_SIZEOF_INT -#elif (LZO_SIZEOF_LONG >= 4) -# define lzo_int32l_t long int -# define lzo_uint32l_t unsigned long int -# define LZO_SIZEOF_LZO_INT32L_T LZO_SIZEOF_LONG -# define LZO_TYPEOF_LZO_INT32L_T LZO_SIZEOF_LONG -#else -# error "lzo_int32l_t" -#endif -#endif -#if 1 - LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int32l_t) >= 4) - LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int32l_t) == LZO_SIZEOF_LZO_INT32L_T) -#endif -#if !defined(lzo_int64l_t) -#if defined(lzo_int64e_t) -# define lzo_int64l_t lzo_int64e_t -# define lzo_uint64l_t lzo_uint64e_t -# define LZO_SIZEOF_LZO_INT64L_T LZO_SIZEOF_LZO_INT64E_T -# define LZO_TYPEOF_LZO_INT64L_T LZO_TYPEOF_LZO_INT64E_T -#else -#endif -#endif -#if defined(lzo_int64l_t) - LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int64l_t) >= 8) - LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int64l_t) == LZO_SIZEOF_LZO_INT64L_T) -#endif -#if !defined(lzo_int32f_t) -#if (LZO_SIZEOF_SIZE_T >= 8) -# define lzo_int32f_t lzo_int64l_t -# define lzo_uint32f_t lzo_uint64l_t -# define LZO_SIZEOF_LZO_INT32F_T LZO_SIZEOF_LZO_INT64L_T -# define LZO_TYPEOF_LZO_INT32F_T LZO_TYPEOF_LZO_INT64L_T -#else -# define lzo_int32f_t lzo_int32l_t -# define lzo_uint32f_t lzo_uint32l_t -# define LZO_SIZEOF_LZO_INT32F_T LZO_SIZEOF_LZO_INT32L_T -# define LZO_TYPEOF_LZO_INT32F_T LZO_TYPEOF_LZO_INT32L_T -#endif -#endif -#if 1 - LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int32f_t) >= 4) - LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int32f_t) == LZO_SIZEOF_LZO_INT32F_T) -#endif -#if !defined(lzo_int64f_t) -#if defined(lzo_int64l_t) -# define lzo_int64f_t lzo_int64l_t -# define lzo_uint64f_t lzo_uint64l_t -# define LZO_SIZEOF_LZO_INT64F_T LZO_SIZEOF_LZO_INT64L_T -# define LZO_TYPEOF_LZO_INT64F_T LZO_TYPEOF_LZO_INT64L_T -#else -#endif -#endif -#if defined(lzo_int64f_t) - LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int64f_t) >= 8) - LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int64f_t) == LZO_SIZEOF_LZO_INT64F_T) -#endif -#if !defined(lzo_intptr_t) -#if 1 && (LZO_OS_OS400 && (LZO_SIZEOF_VOID_P == 16)) -# define __LZO_INTPTR_T_IS_POINTER 1 - typedef char * lzo_intptr_t; - typedef char * lzo_uintptr_t; -# define lzo_intptr_t lzo_intptr_t -# define lzo_uintptr_t lzo_uintptr_t -# define LZO_SIZEOF_LZO_INTPTR_T LZO_SIZEOF_VOID_P -# define LZO_TYPEOF_LZO_INTPTR_T LZO_TYPEOF_CHAR_P -#elif (LZO_CC_MSC && (_MSC_VER >= 1300) && (LZO_SIZEOF_VOID_P == 4) && (LZO_SIZEOF_INT == 4)) - typedef __w64 int lzo_intptr_t; - typedef __w64 unsigned int lzo_uintptr_t; -# define lzo_intptr_t lzo_intptr_t -# define lzo_uintptr_t lzo_uintptr_t -# define LZO_SIZEOF_LZO_INTPTR_T LZO_SIZEOF_INT -# define LZO_TYPEOF_LZO_INTPTR_T LZO_TYPEOF_INT -#elif (LZO_SIZEOF_SHORT == LZO_SIZEOF_VOID_P) && (LZO_SIZEOF_INT > LZO_SIZEOF_VOID_P) -# define lzo_intptr_t short -# define lzo_uintptr_t unsigned short -# define LZO_SIZEOF_LZO_INTPTR_T LZO_SIZEOF_SHORT -# define LZO_TYPEOF_LZO_INTPTR_T LZO_TYPEOF_SHORT -#elif (LZO_SIZEOF_INT >= LZO_SIZEOF_VOID_P) && (LZO_SIZEOF_INT < LZO_SIZEOF_LONG) -# define lzo_intptr_t int -# define lzo_uintptr_t unsigned int -# define LZO_SIZEOF_LZO_INTPTR_T LZO_SIZEOF_INT -# define LZO_TYPEOF_LZO_INTPTR_T LZO_TYPEOF_INT -#elif (LZO_SIZEOF_LONG >= LZO_SIZEOF_VOID_P) -# define lzo_intptr_t long -# define lzo_uintptr_t unsigned long -# define LZO_SIZEOF_LZO_INTPTR_T LZO_SIZEOF_LONG -# define LZO_TYPEOF_LZO_INTPTR_T LZO_TYPEOF_LONG -#elif (LZO_SIZEOF_LZO_INT64L_T >= LZO_SIZEOF_VOID_P) -# define lzo_intptr_t lzo_int64l_t -# define lzo_uintptr_t lzo_uint64l_t -# define LZO_SIZEOF_LZO_INTPTR_T LZO_SIZEOF_LZO_INT64L_T -# define LZO_TYPEOF_LZO_INTPTR_T LZO_TYPEOF_LZO_INT64L_T -#else -# error "lzo_intptr_t" -#endif -#endif -#if 1 - LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_intptr_t) >= sizeof(void *)) - LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_intptr_t) == sizeof(lzo_uintptr_t)) -#endif -#if !defined(lzo_word_t) -#if defined(LZO_WORDSIZE) && (LZO_WORDSIZE+0 > 0) -#if (LZO_WORDSIZE == LZO_SIZEOF_LZO_INTPTR_T) && !(__LZO_INTPTR_T_IS_POINTER) -# define lzo_word_t lzo_uintptr_t -# define lzo_sword_t lzo_intptr_t -# define LZO_SIZEOF_LZO_WORD_T LZO_SIZEOF_LZO_INTPTR_T -# define LZO_TYPEOF_LZO_WORD_T LZO_TYPEOF_LZO_INTPTR_T -#elif (LZO_WORDSIZE == LZO_SIZEOF_LONG) -# define lzo_word_t unsigned long -# define lzo_sword_t long -# define LZO_SIZEOF_LZO_WORD_T LZO_SIZEOF_LONG -# define LZO_TYPEOF_LZO_WORD_T LZO_TYPEOF_LONG -#elif (LZO_WORDSIZE == LZO_SIZEOF_INT) -# define lzo_word_t unsigned int -# define lzo_sword_t int -# define LZO_SIZEOF_LZO_WORD_T LZO_SIZEOF_INT -# define LZO_TYPEOF_LZO_WORD_T LZO_TYPEOF_INT -#elif (LZO_WORDSIZE == LZO_SIZEOF_SHORT) -# define lzo_word_t unsigned short -# define lzo_sword_t short -# define LZO_SIZEOF_LZO_WORD_T LZO_SIZEOF_SHORT -# define LZO_TYPEOF_LZO_WORD_T LZO_TYPEOF_SHORT -#elif (LZO_WORDSIZE == 1) -# define lzo_word_t unsigned char -# define lzo_sword_t signed char -# define LZO_SIZEOF_LZO_WORD_T 1 -# define LZO_TYPEOF_LZO_WORD_T LZO_TYPEOF_CHAR -#elif (LZO_WORDSIZE == LZO_SIZEOF_LZO_INT64L_T) -# define lzo_word_t lzo_uint64l_t -# define lzo_sword_t lzo_int64l_t -# define LZO_SIZEOF_LZO_WORD_T LZO_SIZEOF_LZO_INT64L_T -# define LZO_TYPEOF_LZO_WORD_T LZO_SIZEOF_LZO_INT64L_T -#elif (LZO_ARCH_SPU) && (LZO_CC_GNUC) -#if 0 - typedef unsigned lzo_word_t __attribute__((__mode__(__V16QI__))); - typedef int lzo_sword_t __attribute__((__mode__(__V16QI__))); -# define lzo_word_t lzo_word_t -# define lzo_sword_t lzo_sword_t -# define LZO_SIZEOF_LZO_WORD_T 16 -# define LZO_TYPEOF_LZO_WORD_T LZO_TYPEOF___MODE_V16QI -#endif -#else -# error "lzo_word_t" -#endif -#endif -#endif -#if 1 && defined(lzo_word_t) - LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_word_t) == LZO_WORDSIZE) - LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_sword_t) == LZO_WORDSIZE) -#endif -#if 1 -#define lzo_int8_t signed char -#define lzo_uint8_t unsigned char -#define LZO_SIZEOF_LZO_INT8_T 1 -#define LZO_TYPEOF_LZO_INT8_T LZO_TYPEOF_CHAR -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int8_t) == 1) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int8_t) == sizeof(lzo_uint8_t)) -#endif -#if defined(lzo_int16e_t) -#define lzo_int16_t lzo_int16e_t -#define lzo_uint16_t lzo_uint16e_t -#define LZO_SIZEOF_LZO_INT16_T LZO_SIZEOF_LZO_INT16E_T -#define LZO_TYPEOF_LZO_INT16_T LZO_TYPEOF_LZO_INT16E_T -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int16_t) == 2) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int16_t) == sizeof(lzo_uint16_t)) -#endif -#if defined(lzo_int32e_t) -#define lzo_int32_t lzo_int32e_t -#define lzo_uint32_t lzo_uint32e_t -#define LZO_SIZEOF_LZO_INT32_T LZO_SIZEOF_LZO_INT32E_T -#define LZO_TYPEOF_LZO_INT32_T LZO_TYPEOF_LZO_INT32E_T -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int32_t) == 4) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int32_t) == sizeof(lzo_uint32_t)) -#endif -#if defined(lzo_int64e_t) -#define lzo_int64_t lzo_int64e_t -#define lzo_uint64_t lzo_uint64e_t -#define LZO_SIZEOF_LZO_INT64_T LZO_SIZEOF_LZO_INT64E_T -#define LZO_TYPEOF_LZO_INT64_T LZO_TYPEOF_LZO_INT64E_T -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int64_t) == 8) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int64_t) == sizeof(lzo_uint64_t)) -#endif -#if 1 -#define lzo_int_least32_t lzo_int32l_t -#define lzo_uint_least32_t lzo_uint32l_t -#define LZO_SIZEOF_LZO_INT_LEAST32_T LZO_SIZEOF_LZO_INT32L_T -#define LZO_TYPEOF_LZO_INT_LEAST32_T LZO_TYPEOF_LZO_INT32L_T -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_least32_t) >= 4) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_least32_t) == sizeof(lzo_uint_least32_t)) -#endif -#if defined(lzo_int64l_t) -#define lzo_int_least64_t lzo_int64l_t -#define lzo_uint_least64_t lzo_uint64l_t -#define LZO_SIZEOF_LZO_INT_LEAST64_T LZO_SIZEOF_LZO_INT64L_T -#define LZO_TYPEOF_LZO_INT_LEAST64_T LZO_TYPEOF_LZO_INT64L_T -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_least64_t) >= 8) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_least64_t) == sizeof(lzo_uint_least64_t)) -#endif -#if 1 -#define lzo_int_fast32_t lzo_int32f_t -#define lzo_uint_fast32_t lzo_uint32f_t -#define LZO_SIZEOF_LZO_INT_FAST32_T LZO_SIZEOF_LZO_INT32F_T -#define LZO_TYPEOF_LZO_INT_FAST32_T LZO_TYPEOF_LZO_INT32F_T -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_fast32_t) >= 4) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_fast32_t) == sizeof(lzo_uint_fast32_t)) -#endif -#if defined(lzo_int64f_t) -#define lzo_int_fast64_t lzo_int64f_t -#define lzo_uint_fast64_t lzo_uint64f_t -#define LZO_SIZEOF_LZO_INT_FAST64_T LZO_SIZEOF_LZO_INT64F_T -#define LZO_TYPEOF_LZO_INT_FAST64_T LZO_TYPEOF_LZO_INT64F_T -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_fast64_t) >= 8) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_fast64_t) == sizeof(lzo_uint_fast64_t)) -#endif -#if !defined(LZO_INT16_C) -# if (LZO_BROKEN_INTEGRAL_CONSTANTS) && (LZO_SIZEOF_INT >= 2) -# define LZO_INT16_C(c) ((c) + 0) -# define LZO_UINT16_C(c) ((c) + 0U) -# elif (LZO_BROKEN_INTEGRAL_CONSTANTS) && (LZO_SIZEOF_LONG >= 2) -# define LZO_INT16_C(c) ((c) + 0L) -# define LZO_UINT16_C(c) ((c) + 0UL) -# elif (LZO_SIZEOF_INT >= 2) -# define LZO_INT16_C(c) (c) -# define LZO_UINT16_C(c) (c##U) -# elif (LZO_SIZEOF_LONG >= 2) -# define LZO_INT16_C(c) (c##L) -# define LZO_UINT16_C(c) (c##UL) -# else -# error "LZO_INT16_C" -# endif -#endif -#if !defined(LZO_INT32_C) -# if (LZO_BROKEN_INTEGRAL_CONSTANTS) && (LZO_SIZEOF_INT >= 4) -# define LZO_INT32_C(c) ((c) + 0) -# define LZO_UINT32_C(c) ((c) + 0U) -# elif (LZO_BROKEN_INTEGRAL_CONSTANTS) && (LZO_SIZEOF_LONG >= 4) -# define LZO_INT32_C(c) ((c) + 0L) -# define LZO_UINT32_C(c) ((c) + 0UL) -# elif (LZO_SIZEOF_INT >= 4) -# define LZO_INT32_C(c) (c) -# define LZO_UINT32_C(c) (c##U) -# elif (LZO_SIZEOF_LONG >= 4) -# define LZO_INT32_C(c) (c##L) -# define LZO_UINT32_C(c) (c##UL) -# elif (LZO_SIZEOF_LONG_LONG >= 4) -# define LZO_INT32_C(c) (c##LL) -# define LZO_UINT32_C(c) (c##ULL) -# else -# error "LZO_INT32_C" -# endif -#endif -#if !defined(LZO_INT64_C) && defined(lzo_int64l_t) -# if (LZO_BROKEN_INTEGRAL_CONSTANTS) && (LZO_SIZEOF_INT >= 8) -# define LZO_INT64_C(c) ((c) + 0) -# define LZO_UINT64_C(c) ((c) + 0U) -# elif (LZO_BROKEN_INTEGRAL_CONSTANTS) && (LZO_SIZEOF_LONG >= 8) -# define LZO_INT64_C(c) ((c) + 0L) -# define LZO_UINT64_C(c) ((c) + 0UL) -# elif (LZO_SIZEOF_INT >= 8) -# define LZO_INT64_C(c) (c) -# define LZO_UINT64_C(c) (c##U) -# elif (LZO_SIZEOF_LONG >= 8) -# define LZO_INT64_C(c) (c##L) -# define LZO_UINT64_C(c) (c##UL) -# else -# error "LZO_INT64_C" -# endif -#endif -#endif - -#endif - -#endif - -#undef LZO_HAVE_CONFIG_H -#include "minilzo.h" - -#if !defined(MINILZO_VERSION) || (MINILZO_VERSION != 0x2090) -# error "version mismatch in miniLZO source files" -#endif - -#ifdef MINILZO_HAVE_CONFIG_H -# define LZO_HAVE_CONFIG_H 1 -#endif - -#ifndef __LZO_CONF_H -#define __LZO_CONF_H 1 - -#if !defined(__LZO_IN_MINILZO) -#if defined(LZO_CFG_FREESTANDING) && (LZO_CFG_FREESTANDING) -# define LZO_LIBC_FREESTANDING 1 -# define LZO_OS_FREESTANDING 1 -#endif -#if defined(LZO_CFG_EXTRA_CONFIG_HEADER) -# error #include LZO_CFG_EXTRA_CONFIG_HEADER -#endif -#if defined(__LZOCONF_H) || defined(__LZOCONF_H_INCLUDED) -# error "include this file first" -#endif -#if defined(LZO_CFG_BUILD_DLL) && (LZO_CFG_BUILD_DLL+0) && !defined(__LZO_EXPORT1) && !defined(__LZO_EXPORT2) && 0 -#ifndef __LZODEFS_H_INCLUDED -#if defined(LZO_HAVE_CONFIG_H) -#error # include <config.h> -#endif -#include <limits.h> -#include <stddef.h> -#include "lzodefs.h" -#endif -#endif -#include "lzoconf.h" -#if defined(LZO_CFG_EXTRA_CONFIG_HEADER2) -# error #include LZO_CFG_EXTRA_CONFIG_HEADER2 -#endif -#endif - -#if !defined(__LZOCONF_H_INCLUDED) || (LZO_VERSION+0 != 0x2090) -# error "version mismatch" -#endif - -#if (LZO_CC_MSC && (_MSC_VER >= 1000 && _MSC_VER < 1100)) -# pragma warning(disable: 4702) -#endif -#if (LZO_CC_MSC && (_MSC_VER >= 1000)) -# pragma warning(disable: 4127 4701) -# pragma warning(disable: 4514 4710 4711) -#endif -#if (LZO_CC_MSC && (_MSC_VER >= 1300)) -# pragma warning(disable: 4820) -#endif -#if (LZO_CC_MSC && (_MSC_VER >= 1800)) -# pragma warning(disable: 4746) -#endif -#if (LZO_CC_INTELC && (__INTEL_COMPILER >= 900)) -# pragma warning(disable: 1684) -#endif - -#if (LZO_CC_SUNPROC) -#if !defined(__cplusplus) -# pragma error_messages(off,E_END_OF_LOOP_CODE_NOT_REACHED) -# pragma error_messages(off,E_LOOP_NOT_ENTERED_AT_TOP) -# pragma error_messages(off,E_STATEMENT_NOT_REACHED) -#endif -#endif - -#if !defined(__LZO_NOEXPORT1) -# define __LZO_NOEXPORT1 /*empty*/ -#endif -#if !defined(__LZO_NOEXPORT2) -# define __LZO_NOEXPORT2 /*empty*/ -#endif - -#if 1 -# define LZO_PUBLIC_DECL(r) LZO_EXTERN(r) -#endif -#if 1 -# define LZO_PUBLIC_IMPL(r) LZO_PUBLIC(r) -#endif -#if !defined(LZO_LOCAL_DECL) -# define LZO_LOCAL_DECL(r) __LZO_EXTERN_C LZO_LOCAL_IMPL(r) -#endif -#if !defined(LZO_LOCAL_IMPL) -# define LZO_LOCAL_IMPL(r) __LZO_NOEXPORT1 r __LZO_NOEXPORT2 __LZO_CDECL -#endif -#if 1 -# define LZO_STATIC_DECL(r) LZO_PRIVATE(r) -#endif -#if 1 -# define LZO_STATIC_IMPL(r) LZO_PRIVATE(r) -#endif - -#if defined(__LZO_IN_MINILZO) || (LZO_CFG_FREESTANDING) -#elif 1 -# include <string.h> -#else -# define LZO_WANT_ACC_INCD_H 1 -#endif -#if defined(LZO_HAVE_CONFIG_H) -# define LZO_CFG_NO_CONFIG_HEADER 1 -#endif - -#if 1 && !defined(LZO_CFG_FREESTANDING) -#if 1 && !defined(HAVE_STRING_H) -#define HAVE_STRING_H 1 -#endif -#if 1 && !defined(HAVE_MEMCMP) -#define HAVE_MEMCMP 1 -#endif -#if 1 && !defined(HAVE_MEMCPY) -#define HAVE_MEMCPY 1 -#endif -#if 1 && !defined(HAVE_MEMMOVE) -#define HAVE_MEMMOVE 1 -#endif -#if 1 && !defined(HAVE_MEMSET) -#define HAVE_MEMSET 1 -#endif -#endif - -#if 1 && defined(HAVE_STRING_H) -#include <string.h> -#endif - -#if 1 || defined(lzo_int8_t) || defined(lzo_uint8_t) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int8_t) == 1) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_uint8_t) == 1) -#endif -#if 1 || defined(lzo_int16_t) || defined(lzo_uint16_t) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int16_t) == 2) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_uint16_t) == 2) -#endif -#if 1 || defined(lzo_int32_t) || defined(lzo_uint32_t) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int32_t) == 4) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_uint32_t) == 4) -#endif -#if defined(lzo_int64_t) || defined(lzo_uint64_t) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int64_t) == 8) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_uint64_t) == 8) -#endif - -#if (LZO_CFG_FREESTANDING) -# undef HAVE_MEMCMP -# undef HAVE_MEMCPY -# undef HAVE_MEMMOVE -# undef HAVE_MEMSET -#endif - -#if !(HAVE_MEMCMP) -# undef memcmp -# define memcmp(a,b,c) lzo_memcmp(a,b,c) -#else -# undef lzo_memcmp -# define lzo_memcmp(a,b,c) memcmp(a,b,c) -#endif -#if !(HAVE_MEMCPY) -# undef memcpy -# define memcpy(a,b,c) lzo_memcpy(a,b,c) -#else -# undef lzo_memcpy -# define lzo_memcpy(a,b,c) memcpy(a,b,c) -#endif -#if !(HAVE_MEMMOVE) -# undef memmove -# define memmove(a,b,c) lzo_memmove(a,b,c) -#else -# undef lzo_memmove -# define lzo_memmove(a,b,c) memmove(a,b,c) -#endif -#if !(HAVE_MEMSET) -# undef memset -# define memset(a,b,c) lzo_memset(a,b,c) -#else -# undef lzo_memset -# define lzo_memset(a,b,c) memset(a,b,c) -#endif - -#undef NDEBUG -#if (LZO_CFG_FREESTANDING) -# undef LZO_DEBUG -# define NDEBUG 1 -# undef assert -# define assert(e) ((void)0) -#else -# if !defined(LZO_DEBUG) -# define NDEBUG 1 -# endif -# include <assert.h> -#endif - -#if 0 && defined(__BOUNDS_CHECKING_ON) -# include <unchecked.h> -#else -# define BOUNDS_CHECKING_OFF_DURING(stmt) stmt -# define BOUNDS_CHECKING_OFF_IN_EXPR(expr) (expr) -#endif - -#if (LZO_CFG_PGO) -# undef __lzo_likely -# undef __lzo_unlikely -# define __lzo_likely(e) (e) -# define __lzo_unlikely(e) (e) -#endif - -#undef _ -#undef __ -#undef ___ -#undef ____ -#undef _p0 -#undef _p1 -#undef _p2 -#undef _p3 -#undef _p4 -#undef _s0 -#undef _s1 -#undef _s2 -#undef _s3 -#undef _s4 -#undef _ww - -#if 1 -# define LZO_BYTE(x) ((unsigned char) (x)) -#else -# define LZO_BYTE(x) ((unsigned char) ((x) & 0xff)) -#endif - -#define LZO_MAX(a,b) ((a) >= (b) ? (a) : (b)) -#define LZO_MIN(a,b) ((a) <= (b) ? (a) : (b)) -#define LZO_MAX3(a,b,c) ((a) >= (b) ? LZO_MAX(a,c) : LZO_MAX(b,c)) -#define LZO_MIN3(a,b,c) ((a) <= (b) ? LZO_MIN(a,c) : LZO_MIN(b,c)) - -#define lzo_sizeof(type) ((lzo_uint) (sizeof(type))) - -#define LZO_HIGH(array) ((lzo_uint) (sizeof(array)/sizeof(*(array)))) - -#define LZO_SIZE(bits) (1u << (bits)) -#define LZO_MASK(bits) (LZO_SIZE(bits) - 1) - -#define LZO_USIZE(bits) ((lzo_uint) 1 << (bits)) -#define LZO_UMASK(bits) (LZO_USIZE(bits) - 1) - -#if !defined(DMUL) -#if 0 - -# define DMUL(a,b) ((lzo_xint) ((lzo_uint32_t)(a) * (lzo_uint32_t)(b))) -#else -# define DMUL(a,b) ((lzo_xint) ((a) * (b))) -#endif -#endif - -#ifndef __LZO_FUNC_H -#define __LZO_FUNC_H 1 - -#if !defined(LZO_BITOPS_USE_ASM_BITSCAN) && !defined(LZO_BITOPS_USE_GNUC_BITSCAN) && !defined(LZO_BITOPS_USE_MSC_BITSCAN) -#if 1 && (LZO_ARCH_AMD64) && (LZO_CC_GNUC && (LZO_CC_GNUC < 0x040000ul)) && (LZO_ASM_SYNTAX_GNUC) -#define LZO_BITOPS_USE_ASM_BITSCAN 1 -#elif (LZO_CC_CLANG || (LZO_CC_GNUC >= 0x030400ul) || (LZO_CC_INTELC_GNUC && (__INTEL_COMPILER >= 1000)) || (LZO_CC_LLVM && (!defined(__llvm_tools_version__) || (__llvm_tools_version__+0 >= 0x010500ul)))) -#define LZO_BITOPS_USE_GNUC_BITSCAN 1 -#elif (LZO_OS_WIN32 || LZO_OS_WIN64) && ((LZO_CC_INTELC_MSC && (__INTEL_COMPILER >= 1010)) || (LZO_CC_MSC && (_MSC_VER >= 1400))) -#define LZO_BITOPS_USE_MSC_BITSCAN 1 -#if (LZO_CC_MSC) && (LZO_ARCH_AMD64 || LZO_ARCH_I386) -#include <intrin.h> -#endif -#if (LZO_CC_MSC) && (LZO_ARCH_AMD64 || LZO_ARCH_I386) -#pragma intrinsic(_BitScanReverse) -#pragma intrinsic(_BitScanForward) -#endif -#if (LZO_CC_MSC) && (LZO_ARCH_AMD64) -#pragma intrinsic(_BitScanReverse64) -#pragma intrinsic(_BitScanForward64) -#endif -#endif -#endif - -__lzo_static_forceinline unsigned lzo_bitops_ctlz32_func(lzo_uint32_t v) -{ -#if (LZO_BITOPS_USE_MSC_BITSCAN) && (LZO_ARCH_AMD64 || LZO_ARCH_I386) - unsigned long r; (void) _BitScanReverse(&r, v); return (unsigned) r ^ 31; -#define lzo_bitops_ctlz32(v) lzo_bitops_ctlz32_func(v) -#elif (LZO_BITOPS_USE_ASM_BITSCAN) && (LZO_ARCH_AMD64 || LZO_ARCH_I386) && (LZO_ASM_SYNTAX_GNUC) - lzo_uint32_t r; - __asm__("bsr %1,%0" : "=r" (r) : "rm" (v) __LZO_ASM_CLOBBER_LIST_CC); - return (unsigned) r ^ 31; -#define lzo_bitops_ctlz32(v) lzo_bitops_ctlz32_func(v) -#elif (LZO_BITOPS_USE_GNUC_BITSCAN) && (LZO_SIZEOF_INT == 4) - unsigned r; r = (unsigned) __builtin_clz(v); return r; -#define lzo_bitops_ctlz32(v) ((unsigned) __builtin_clz(v)) -#elif (LZO_BITOPS_USE_GNUC_BITSCAN) && (LZO_SIZEOF_LONG == 8) && (LZO_WORDSIZE >= 8) - unsigned r; r = (unsigned) __builtin_clzl(v); return r ^ 32; -#define lzo_bitops_ctlz32(v) (((unsigned) __builtin_clzl(v)) ^ 32) -#else - LZO_UNUSED(v); return 0; -#endif -} - -#if defined(lzo_uint64_t) -__lzo_static_forceinline unsigned lzo_bitops_ctlz64_func(lzo_uint64_t v) -{ -#if (LZO_BITOPS_USE_MSC_BITSCAN) && (LZO_ARCH_AMD64) - unsigned long r; (void) _BitScanReverse64(&r, v); return (unsigned) r ^ 63; -#define lzo_bitops_ctlz64(v) lzo_bitops_ctlz64_func(v) -#elif (LZO_BITOPS_USE_ASM_BITSCAN) && (LZO_ARCH_AMD64) && (LZO_ASM_SYNTAX_GNUC) - lzo_uint64_t r; - __asm__("bsr %1,%0" : "=r" (r) : "rm" (v) __LZO_ASM_CLOBBER_LIST_CC); - return (unsigned) r ^ 63; -#define lzo_bitops_ctlz64(v) lzo_bitops_ctlz64_func(v) -#elif (LZO_BITOPS_USE_GNUC_BITSCAN) && (LZO_SIZEOF_LONG == 8) && (LZO_WORDSIZE >= 8) - unsigned r; r = (unsigned) __builtin_clzl(v); return r; -#define lzo_bitops_ctlz64(v) ((unsigned) __builtin_clzl(v)) -#elif (LZO_BITOPS_USE_GNUC_BITSCAN) && (LZO_SIZEOF_LONG_LONG == 8) && (LZO_WORDSIZE >= 8) - unsigned r; r = (unsigned) __builtin_clzll(v); return r; -#define lzo_bitops_ctlz64(v) ((unsigned) __builtin_clzll(v)) -#else - LZO_UNUSED(v); return 0; -#endif -} -#endif - -__lzo_static_forceinline unsigned lzo_bitops_cttz32_func(lzo_uint32_t v) -{ -#if (LZO_BITOPS_USE_MSC_BITSCAN) && (LZO_ARCH_AMD64 || LZO_ARCH_I386) - unsigned long r; (void) _BitScanForward(&r, v); return (unsigned) r; -#define lzo_bitops_cttz32(v) lzo_bitops_cttz32_func(v) -#elif (LZO_BITOPS_USE_ASM_BITSCAN) && (LZO_ARCH_AMD64 || LZO_ARCH_I386) && (LZO_ASM_SYNTAX_GNUC) - lzo_uint32_t r; - __asm__("bsf %1,%0" : "=r" (r) : "rm" (v) __LZO_ASM_CLOBBER_LIST_CC); - return (unsigned) r; -#define lzo_bitops_cttz32(v) lzo_bitops_cttz32_func(v) -#elif (LZO_BITOPS_USE_GNUC_BITSCAN) && (LZO_SIZEOF_INT >= 4) - unsigned r; r = (unsigned) __builtin_ctz(v); return r; -#define lzo_bitops_cttz32(v) ((unsigned) __builtin_ctz(v)) -#else - LZO_UNUSED(v); return 0; -#endif -} - -#if defined(lzo_uint64_t) -__lzo_static_forceinline unsigned lzo_bitops_cttz64_func(lzo_uint64_t v) -{ -#if (LZO_BITOPS_USE_MSC_BITSCAN) && (LZO_ARCH_AMD64) - unsigned long r; (void) _BitScanForward64(&r, v); return (unsigned) r; -#define lzo_bitops_cttz64(v) lzo_bitops_cttz64_func(v) -#elif (LZO_BITOPS_USE_ASM_BITSCAN) && (LZO_ARCH_AMD64) && (LZO_ASM_SYNTAX_GNUC) - lzo_uint64_t r; - __asm__("bsf %1,%0" : "=r" (r) : "rm" (v) __LZO_ASM_CLOBBER_LIST_CC); - return (unsigned) r; -#define lzo_bitops_cttz64(v) lzo_bitops_cttz64_func(v) -#elif (LZO_BITOPS_USE_GNUC_BITSCAN) && (LZO_SIZEOF_LONG >= 8) && (LZO_WORDSIZE >= 8) - unsigned r; r = (unsigned) __builtin_ctzl(v); return r; -#define lzo_bitops_cttz64(v) ((unsigned) __builtin_ctzl(v)) -#elif (LZO_BITOPS_USE_GNUC_BITSCAN) && (LZO_SIZEOF_LONG_LONG >= 8) && (LZO_WORDSIZE >= 8) - unsigned r; r = (unsigned) __builtin_ctzll(v); return r; -#define lzo_bitops_cttz64(v) ((unsigned) __builtin_ctzll(v)) -#else - LZO_UNUSED(v); return 0; -#endif -} -#endif - -lzo_unused_funcs_impl(void, lzo_bitops_unused_funcs)(void) -{ - LZO_UNUSED_FUNC(lzo_bitops_unused_funcs); - LZO_UNUSED_FUNC(lzo_bitops_ctlz32_func); - LZO_UNUSED_FUNC(lzo_bitops_cttz32_func); -#if defined(lzo_uint64_t) - LZO_UNUSED_FUNC(lzo_bitops_ctlz64_func); - LZO_UNUSED_FUNC(lzo_bitops_cttz64_func); -#endif -} - -#if defined(__lzo_alignof) && !(LZO_CFG_NO_UNALIGNED) -#if !defined(lzo_memops_tcheck__) && 0 -#define lzo_memops_tcheck__(t,a,b) ((void)0, sizeof(t) == (a) && __lzo_alignof(t) == (b)) -#endif -#endif -#ifndef lzo_memops_TU0p -#define lzo_memops_TU0p void __LZO_MMODEL * -#endif -#ifndef lzo_memops_TU1p -#define lzo_memops_TU1p unsigned char __LZO_MMODEL * -#endif -#ifndef lzo_memops_TU2p -#if (LZO_OPT_UNALIGNED16) -typedef lzo_uint16_t __lzo_may_alias lzo_memops_TU2; -#define lzo_memops_TU2p volatile lzo_memops_TU2 * -#elif defined(__lzo_byte_struct) -__lzo_byte_struct(lzo_memops_TU2_struct,2) -typedef struct lzo_memops_TU2_struct lzo_memops_TU2; -#else -struct lzo_memops_TU2_struct { unsigned char a[2]; } __lzo_may_alias; -typedef struct lzo_memops_TU2_struct lzo_memops_TU2; -#endif -#ifndef lzo_memops_TU2p -#define lzo_memops_TU2p lzo_memops_TU2 * -#endif -#endif -#ifndef lzo_memops_TU4p -#if (LZO_OPT_UNALIGNED32) -typedef lzo_uint32_t __lzo_may_alias lzo_memops_TU4; -#define lzo_memops_TU4p volatile lzo_memops_TU4 __LZO_MMODEL * -#elif defined(__lzo_byte_struct) -__lzo_byte_struct(lzo_memops_TU4_struct,4) -typedef struct lzo_memops_TU4_struct lzo_memops_TU4; -#else -struct lzo_memops_TU4_struct { unsigned char a[4]; } __lzo_may_alias; -typedef struct lzo_memops_TU4_struct lzo_memops_TU4; -#endif -#ifndef lzo_memops_TU4p -#define lzo_memops_TU4p lzo_memops_TU4 __LZO_MMODEL * -#endif -#endif -#ifndef lzo_memops_TU8p -#if (LZO_OPT_UNALIGNED64) -typedef lzo_uint64_t __lzo_may_alias lzo_memops_TU8; -#define lzo_memops_TU8p volatile lzo_memops_TU8 __LZO_MMODEL * -#elif defined(__lzo_byte_struct) -__lzo_byte_struct(lzo_memops_TU8_struct,8) -typedef struct lzo_memops_TU8_struct lzo_memops_TU8; -#else -struct lzo_memops_TU8_struct { unsigned char a[8]; } __lzo_may_alias; -typedef struct lzo_memops_TU8_struct lzo_memops_TU8; -#endif -#ifndef lzo_memops_TU8p -#define lzo_memops_TU8p lzo_memops_TU8 __LZO_MMODEL * -#endif -#endif -#ifndef lzo_memops_set_TU1p -#define lzo_memops_set_TU1p volatile lzo_memops_TU1p -#endif -#ifndef lzo_memops_move_TU1p -#define lzo_memops_move_TU1p lzo_memops_TU1p -#endif -#define LZO_MEMOPS_SET1(dd,cc) \ - LZO_BLOCK_BEGIN \ - lzo_memops_set_TU1p d__1 = (lzo_memops_set_TU1p) (lzo_memops_TU0p) (dd); \ - d__1[0] = LZO_BYTE(cc); \ - LZO_BLOCK_END -#define LZO_MEMOPS_SET2(dd,cc) \ - LZO_BLOCK_BEGIN \ - lzo_memops_set_TU1p d__2 = (lzo_memops_set_TU1p) (lzo_memops_TU0p) (dd); \ - d__2[0] = LZO_BYTE(cc); d__2[1] = LZO_BYTE(cc); \ - LZO_BLOCK_END -#define LZO_MEMOPS_SET3(dd,cc) \ - LZO_BLOCK_BEGIN \ - lzo_memops_set_TU1p d__3 = (lzo_memops_set_TU1p) (lzo_memops_TU0p) (dd); \ - d__3[0] = LZO_BYTE(cc); d__3[1] = LZO_BYTE(cc); d__3[2] = LZO_BYTE(cc); \ - LZO_BLOCK_END -#define LZO_MEMOPS_SET4(dd,cc) \ - LZO_BLOCK_BEGIN \ - lzo_memops_set_TU1p d__4 = (lzo_memops_set_TU1p) (lzo_memops_TU0p) (dd); \ - d__4[0] = LZO_BYTE(cc); d__4[1] = LZO_BYTE(cc); d__4[2] = LZO_BYTE(cc); d__4[3] = LZO_BYTE(cc); \ - LZO_BLOCK_END -#define LZO_MEMOPS_MOVE1(dd,ss) \ - LZO_BLOCK_BEGIN \ - lzo_memops_move_TU1p d__1 = (lzo_memops_move_TU1p) (lzo_memops_TU0p) (dd); \ - const lzo_memops_move_TU1p s__1 = (const lzo_memops_move_TU1p) (const lzo_memops_TU0p) (ss); \ - d__1[0] = s__1[0]; \ - LZO_BLOCK_END -#define LZO_MEMOPS_MOVE2(dd,ss) \ - LZO_BLOCK_BEGIN \ - lzo_memops_move_TU1p d__2 = (lzo_memops_move_TU1p) (lzo_memops_TU0p) (dd); \ - const lzo_memops_move_TU1p s__2 = (const lzo_memops_move_TU1p) (const lzo_memops_TU0p) (ss); \ - d__2[0] = s__2[0]; d__2[1] = s__2[1]; \ - LZO_BLOCK_END -#define LZO_MEMOPS_MOVE3(dd,ss) \ - LZO_BLOCK_BEGIN \ - lzo_memops_move_TU1p d__3 = (lzo_memops_move_TU1p) (lzo_memops_TU0p) (dd); \ - const lzo_memops_move_TU1p s__3 = (const lzo_memops_move_TU1p) (const lzo_memops_TU0p) (ss); \ - d__3[0] = s__3[0]; d__3[1] = s__3[1]; d__3[2] = s__3[2]; \ - LZO_BLOCK_END -#define LZO_MEMOPS_MOVE4(dd,ss) \ - LZO_BLOCK_BEGIN \ - lzo_memops_move_TU1p d__4 = (lzo_memops_move_TU1p) (lzo_memops_TU0p) (dd); \ - const lzo_memops_move_TU1p s__4 = (const lzo_memops_move_TU1p) (const lzo_memops_TU0p) (ss); \ - d__4[0] = s__4[0]; d__4[1] = s__4[1]; d__4[2] = s__4[2]; d__4[3] = s__4[3]; \ - LZO_BLOCK_END -#define LZO_MEMOPS_MOVE8(dd,ss) \ - LZO_BLOCK_BEGIN \ - lzo_memops_move_TU1p d__8 = (lzo_memops_move_TU1p) (lzo_memops_TU0p) (dd); \ - const lzo_memops_move_TU1p s__8 = (const lzo_memops_move_TU1p) (const lzo_memops_TU0p) (ss); \ - d__8[0] = s__8[0]; d__8[1] = s__8[1]; d__8[2] = s__8[2]; d__8[3] = s__8[3]; \ - d__8[4] = s__8[4]; d__8[5] = s__8[5]; d__8[6] = s__8[6]; d__8[7] = s__8[7]; \ - LZO_BLOCK_END -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(*(lzo_memops_TU1p)0)==1) -#define LZO_MEMOPS_COPY1(dd,ss) LZO_MEMOPS_MOVE1(dd,ss) -#if (LZO_OPT_UNALIGNED16) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(*(lzo_memops_TU2p)0)==2) -#define LZO_MEMOPS_COPY2(dd,ss) \ - * (lzo_memops_TU2p) (lzo_memops_TU0p) (dd) = * (const lzo_memops_TU2p) (const lzo_memops_TU0p) (ss) -#elif defined(lzo_memops_tcheck__) -#define LZO_MEMOPS_COPY2(dd,ss) \ - LZO_BLOCK_BEGIN if (lzo_memops_tcheck__(lzo_memops_TU2,2,1)) { \ - * (lzo_memops_TU2p) (lzo_memops_TU0p) (dd) = * (const lzo_memops_TU2p) (const lzo_memops_TU0p) (ss); \ - } else { LZO_MEMOPS_MOVE2(dd,ss); } LZO_BLOCK_END -#else -#define LZO_MEMOPS_COPY2(dd,ss) LZO_MEMOPS_MOVE2(dd,ss) -#endif -#if (LZO_OPT_UNALIGNED32) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(*(lzo_memops_TU4p)0)==4) -#define LZO_MEMOPS_COPY4(dd,ss) \ - * (lzo_memops_TU4p) (lzo_memops_TU0p) (dd) = * (const lzo_memops_TU4p) (const lzo_memops_TU0p) (ss) -#elif defined(lzo_memops_tcheck__) -#define LZO_MEMOPS_COPY4(dd,ss) \ - LZO_BLOCK_BEGIN if (lzo_memops_tcheck__(lzo_memops_TU4,4,1)) { \ - * (lzo_memops_TU4p) (lzo_memops_TU0p) (dd) = * (const lzo_memops_TU4p) (const lzo_memops_TU0p) (ss); \ - } else { LZO_MEMOPS_MOVE4(dd,ss); } LZO_BLOCK_END -#else -#define LZO_MEMOPS_COPY4(dd,ss) LZO_MEMOPS_MOVE4(dd,ss) -#endif -#if (LZO_WORDSIZE != 8) -#define LZO_MEMOPS_COPY8(dd,ss) \ - LZO_BLOCK_BEGIN LZO_MEMOPS_COPY4(dd,ss); LZO_MEMOPS_COPY4((lzo_memops_TU1p)(lzo_memops_TU0p)(dd)+4,(const lzo_memops_TU1p)(const lzo_memops_TU0p)(ss)+4); LZO_BLOCK_END -#else -#if (LZO_OPT_UNALIGNED64) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(*(lzo_memops_TU8p)0)==8) -#define LZO_MEMOPS_COPY8(dd,ss) \ - * (lzo_memops_TU8p) (lzo_memops_TU0p) (dd) = * (const lzo_memops_TU8p) (const lzo_memops_TU0p) (ss) -#elif (LZO_OPT_UNALIGNED32) -#define LZO_MEMOPS_COPY8(dd,ss) \ - LZO_BLOCK_BEGIN LZO_MEMOPS_COPY4(dd,ss); LZO_MEMOPS_COPY4((lzo_memops_TU1p)(lzo_memops_TU0p)(dd)+4,(const lzo_memops_TU1p)(const lzo_memops_TU0p)(ss)+4); LZO_BLOCK_END -#elif defined(lzo_memops_tcheck__) -#define LZO_MEMOPS_COPY8(dd,ss) \ - LZO_BLOCK_BEGIN if (lzo_memops_tcheck__(lzo_memops_TU8,8,1)) { \ - * (lzo_memops_TU8p) (lzo_memops_TU0p) (dd) = * (const lzo_memops_TU8p) (const lzo_memops_TU0p) (ss); \ - } else { LZO_MEMOPS_MOVE8(dd,ss); } LZO_BLOCK_END -#else -#define LZO_MEMOPS_COPY8(dd,ss) LZO_MEMOPS_MOVE8(dd,ss) -#endif -#endif -#define LZO_MEMOPS_COPYN(dd,ss,nn) \ - LZO_BLOCK_BEGIN \ - lzo_memops_TU1p d__n = (lzo_memops_TU1p) (lzo_memops_TU0p) (dd); \ - const lzo_memops_TU1p s__n = (const lzo_memops_TU1p) (const lzo_memops_TU0p) (ss); \ - lzo_uint n__n = (nn); \ - while ((void)0, n__n >= 8) { LZO_MEMOPS_COPY8(d__n, s__n); d__n += 8; s__n += 8; n__n -= 8; } \ - if ((void)0, n__n >= 4) { LZO_MEMOPS_COPY4(d__n, s__n); d__n += 4; s__n += 4; n__n -= 4; } \ - if ((void)0, n__n > 0) do { *d__n++ = *s__n++; } while (--n__n > 0); \ - LZO_BLOCK_END - -__lzo_static_forceinline lzo_uint16_t lzo_memops_get_le16(const lzo_voidp ss) -{ - lzo_uint16_t v; -#if (LZO_ABI_LITTLE_ENDIAN) - LZO_MEMOPS_COPY2(&v, ss); -#elif (LZO_OPT_UNALIGNED16 && LZO_ARCH_POWERPC && LZO_ABI_BIG_ENDIAN) && (LZO_ASM_SYNTAX_GNUC) - const lzo_memops_TU2p s = (const lzo_memops_TU2p) ss; - unsigned long vv; - __asm__("lhbrx %0,0,%1" : "=r" (vv) : "r" (s), "m" (*s)); - v = (lzo_uint16_t) vv; -#else - const lzo_memops_TU1p s = (const lzo_memops_TU1p) ss; - v = (lzo_uint16_t) (((lzo_uint16_t)s[0]) | ((lzo_uint16_t)s[1] << 8)); -#endif - return v; -} -#if (LZO_OPT_UNALIGNED16) && (LZO_ABI_LITTLE_ENDIAN) -#define LZO_MEMOPS_GET_LE16(ss) (* (const lzo_memops_TU2p) (const lzo_memops_TU0p) (ss)) -#else -#define LZO_MEMOPS_GET_LE16(ss) lzo_memops_get_le16(ss) -#endif - -__lzo_static_forceinline lzo_uint32_t lzo_memops_get_le32(const lzo_voidp ss) -{ - lzo_uint32_t v; -#if (LZO_ABI_LITTLE_ENDIAN) - LZO_MEMOPS_COPY4(&v, ss); -#elif (LZO_OPT_UNALIGNED32 && LZO_ARCH_POWERPC && LZO_ABI_BIG_ENDIAN) && (LZO_ASM_SYNTAX_GNUC) - const lzo_memops_TU4p s = (const lzo_memops_TU4p) ss; - unsigned long vv; - __asm__("lwbrx %0,0,%1" : "=r" (vv) : "r" (s), "m" (*s)); - v = (lzo_uint32_t) vv; -#else - const lzo_memops_TU1p s = (const lzo_memops_TU1p) ss; - v = (lzo_uint32_t) (((lzo_uint32_t)s[0]) | ((lzo_uint32_t)s[1] << 8) | ((lzo_uint32_t)s[2] << 16) | ((lzo_uint32_t)s[3] << 24)); -#endif - return v; -} -#if (LZO_OPT_UNALIGNED32) && (LZO_ABI_LITTLE_ENDIAN) -#define LZO_MEMOPS_GET_LE32(ss) (* (const lzo_memops_TU4p) (const lzo_memops_TU0p) (ss)) -#else -#define LZO_MEMOPS_GET_LE32(ss) lzo_memops_get_le32(ss) -#endif - -#if (LZO_OPT_UNALIGNED64) && (LZO_ABI_LITTLE_ENDIAN) -#define LZO_MEMOPS_GET_LE64(ss) (* (const lzo_memops_TU8p) (const lzo_memops_TU0p) (ss)) -#endif - -__lzo_static_forceinline lzo_uint16_t lzo_memops_get_ne16(const lzo_voidp ss) -{ - lzo_uint16_t v; - LZO_MEMOPS_COPY2(&v, ss); - return v; -} -#if (LZO_OPT_UNALIGNED16) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(*(lzo_memops_TU2p)0)==2) -#define LZO_MEMOPS_GET_NE16(ss) (* (const lzo_memops_TU2p) (const lzo_memops_TU0p) (ss)) -#else -#define LZO_MEMOPS_GET_NE16(ss) lzo_memops_get_ne16(ss) -#endif - -__lzo_static_forceinline lzo_uint32_t lzo_memops_get_ne32(const lzo_voidp ss) -{ - lzo_uint32_t v; - LZO_MEMOPS_COPY4(&v, ss); - return v; -} -#if (LZO_OPT_UNALIGNED32) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(*(lzo_memops_TU4p)0)==4) -#define LZO_MEMOPS_GET_NE32(ss) (* (const lzo_memops_TU4p) (const lzo_memops_TU0p) (ss)) -#else -#define LZO_MEMOPS_GET_NE32(ss) lzo_memops_get_ne32(ss) -#endif - -#if (LZO_OPT_UNALIGNED64) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(*(lzo_memops_TU8p)0)==8) -#define LZO_MEMOPS_GET_NE64(ss) (* (const lzo_memops_TU8p) (const lzo_memops_TU0p) (ss)) -#endif - -__lzo_static_forceinline void lzo_memops_put_le16(lzo_voidp dd, lzo_uint16_t vv) -{ -#if (LZO_ABI_LITTLE_ENDIAN) - LZO_MEMOPS_COPY2(dd, &vv); -#elif (LZO_OPT_UNALIGNED16 && LZO_ARCH_POWERPC && LZO_ABI_BIG_ENDIAN) && (LZO_ASM_SYNTAX_GNUC) - lzo_memops_TU2p d = (lzo_memops_TU2p) dd; - unsigned long v = vv; - __asm__("sthbrx %2,0,%1" : "=m" (*d) : "r" (d), "r" (v)); -#else - lzo_memops_TU1p d = (lzo_memops_TU1p) dd; - d[0] = LZO_BYTE((vv ) & 0xff); - d[1] = LZO_BYTE((vv >> 8) & 0xff); -#endif -} -#if (LZO_OPT_UNALIGNED16) && (LZO_ABI_LITTLE_ENDIAN) -#define LZO_MEMOPS_PUT_LE16(dd,vv) (* (lzo_memops_TU2p) (lzo_memops_TU0p) (dd) = (vv)) -#else -#define LZO_MEMOPS_PUT_LE16(dd,vv) lzo_memops_put_le16(dd,vv) -#endif - -__lzo_static_forceinline void lzo_memops_put_le32(lzo_voidp dd, lzo_uint32_t vv) -{ -#if (LZO_ABI_LITTLE_ENDIAN) - LZO_MEMOPS_COPY4(dd, &vv); -#elif (LZO_OPT_UNALIGNED32 && LZO_ARCH_POWERPC && LZO_ABI_BIG_ENDIAN) && (LZO_ASM_SYNTAX_GNUC) - lzo_memops_TU4p d = (lzo_memops_TU4p) dd; - unsigned long v = vv; - __asm__("stwbrx %2,0,%1" : "=m" (*d) : "r" (d), "r" (v)); -#else - lzo_memops_TU1p d = (lzo_memops_TU1p) dd; - d[0] = LZO_BYTE((vv ) & 0xff); - d[1] = LZO_BYTE((vv >> 8) & 0xff); - d[2] = LZO_BYTE((vv >> 16) & 0xff); - d[3] = LZO_BYTE((vv >> 24) & 0xff); -#endif -} -#if (LZO_OPT_UNALIGNED32) && (LZO_ABI_LITTLE_ENDIAN) -#define LZO_MEMOPS_PUT_LE32(dd,vv) (* (lzo_memops_TU4p) (lzo_memops_TU0p) (dd) = (vv)) -#else -#define LZO_MEMOPS_PUT_LE32(dd,vv) lzo_memops_put_le32(dd,vv) -#endif - -__lzo_static_forceinline void lzo_memops_put_ne16(lzo_voidp dd, lzo_uint16_t vv) -{ - LZO_MEMOPS_COPY2(dd, &vv); -} -#if (LZO_OPT_UNALIGNED16) -#define LZO_MEMOPS_PUT_NE16(dd,vv) (* (lzo_memops_TU2p) (lzo_memops_TU0p) (dd) = (vv)) -#else -#define LZO_MEMOPS_PUT_NE16(dd,vv) lzo_memops_put_ne16(dd,vv) -#endif - -__lzo_static_forceinline void lzo_memops_put_ne32(lzo_voidp dd, lzo_uint32_t vv) -{ - LZO_MEMOPS_COPY4(dd, &vv); -} -#if (LZO_OPT_UNALIGNED32) -#define LZO_MEMOPS_PUT_NE32(dd,vv) (* (lzo_memops_TU4p) (lzo_memops_TU0p) (dd) = (vv)) -#else -#define LZO_MEMOPS_PUT_NE32(dd,vv) lzo_memops_put_ne32(dd,vv) -#endif - -lzo_unused_funcs_impl(void, lzo_memops_unused_funcs)(void) -{ - LZO_UNUSED_FUNC(lzo_memops_unused_funcs); - LZO_UNUSED_FUNC(lzo_memops_get_le16); - LZO_UNUSED_FUNC(lzo_memops_get_le32); - LZO_UNUSED_FUNC(lzo_memops_get_ne16); - LZO_UNUSED_FUNC(lzo_memops_get_ne32); - LZO_UNUSED_FUNC(lzo_memops_put_le16); - LZO_UNUSED_FUNC(lzo_memops_put_le32); - LZO_UNUSED_FUNC(lzo_memops_put_ne16); - LZO_UNUSED_FUNC(lzo_memops_put_ne32); -} - -#endif - -#ifndef UA_SET1 -#define UA_SET1 LZO_MEMOPS_SET1 -#endif -#ifndef UA_SET2 -#define UA_SET2 LZO_MEMOPS_SET2 -#endif -#ifndef UA_SET3 -#define UA_SET3 LZO_MEMOPS_SET3 -#endif -#ifndef UA_SET4 -#define UA_SET4 LZO_MEMOPS_SET4 -#endif -#ifndef UA_MOVE1 -#define UA_MOVE1 LZO_MEMOPS_MOVE1 -#endif -#ifndef UA_MOVE2 -#define UA_MOVE2 LZO_MEMOPS_MOVE2 -#endif -#ifndef UA_MOVE3 -#define UA_MOVE3 LZO_MEMOPS_MOVE3 -#endif -#ifndef UA_MOVE4 -#define UA_MOVE4 LZO_MEMOPS_MOVE4 -#endif -#ifndef UA_MOVE8 -#define UA_MOVE8 LZO_MEMOPS_MOVE8 -#endif -#ifndef UA_COPY1 -#define UA_COPY1 LZO_MEMOPS_COPY1 -#endif -#ifndef UA_COPY2 -#define UA_COPY2 LZO_MEMOPS_COPY2 -#endif -#ifndef UA_COPY3 -#define UA_COPY3 LZO_MEMOPS_COPY3 -#endif -#ifndef UA_COPY4 -#define UA_COPY4 LZO_MEMOPS_COPY4 -#endif -#ifndef UA_COPY8 -#define UA_COPY8 LZO_MEMOPS_COPY8 -#endif -#ifndef UA_COPYN -#define UA_COPYN LZO_MEMOPS_COPYN -#endif -#ifndef UA_COPYN_X -#define UA_COPYN_X LZO_MEMOPS_COPYN -#endif -#ifndef UA_GET_LE16 -#define UA_GET_LE16 LZO_MEMOPS_GET_LE16 -#endif -#ifndef UA_GET_LE32 -#define UA_GET_LE32 LZO_MEMOPS_GET_LE32 -#endif -#ifdef LZO_MEMOPS_GET_LE64 -#ifndef UA_GET_LE64 -#define UA_GET_LE64 LZO_MEMOPS_GET_LE64 -#endif -#endif -#ifndef UA_GET_NE16 -#define UA_GET_NE16 LZO_MEMOPS_GET_NE16 -#endif -#ifndef UA_GET_NE32 -#define UA_GET_NE32 LZO_MEMOPS_GET_NE32 -#endif -#ifdef LZO_MEMOPS_GET_NE64 -#ifndef UA_GET_NE64 -#define UA_GET_NE64 LZO_MEMOPS_GET_NE64 -#endif -#endif -#ifndef UA_PUT_LE16 -#define UA_PUT_LE16 LZO_MEMOPS_PUT_LE16 -#endif -#ifndef UA_PUT_LE32 -#define UA_PUT_LE32 LZO_MEMOPS_PUT_LE32 -#endif -#ifndef UA_PUT_NE16 -#define UA_PUT_NE16 LZO_MEMOPS_PUT_NE16 -#endif -#ifndef UA_PUT_NE32 -#define UA_PUT_NE32 LZO_MEMOPS_PUT_NE32 -#endif - -#define MEMCPY8_DS(dest,src,len) \ - lzo_memcpy(dest,src,len); dest += len; src += len - -#define BZERO8_PTR(s,l,n) \ - lzo_memset((lzo_voidp)(s),0,(lzo_uint)(l)*(n)) - -#define MEMCPY_DS(dest,src,len) \ - do *dest++ = *src++; while (--len > 0) - -LZO_EXTERN(const lzo_bytep) lzo_copyright(void); - -#ifndef __LZO_PTR_H -#define __LZO_PTR_H 1 - -#ifdef __cplusplus -extern "C" { -#endif - -#if (LZO_ARCH_I086) -#error "LZO_ARCH_I086 is unsupported" -#elif (LZO_MM_PVP) -#error "LZO_MM_PVP is unsupported" -#else -#define PTR(a) ((lzo_uintptr_t) (a)) -#define PTR_LINEAR(a) PTR(a) -#define PTR_ALIGNED_4(a) ((PTR_LINEAR(a) & 3) == 0) -#define PTR_ALIGNED_8(a) ((PTR_LINEAR(a) & 7) == 0) -#define PTR_ALIGNED2_4(a,b) (((PTR_LINEAR(a) | PTR_LINEAR(b)) & 3) == 0) -#define PTR_ALIGNED2_8(a,b) (((PTR_LINEAR(a) | PTR_LINEAR(b)) & 7) == 0) -#endif - -#define PTR_LT(a,b) (PTR(a) < PTR(b)) -#define PTR_GE(a,b) (PTR(a) >= PTR(b)) -#define PTR_DIFF(a,b) (PTR(a) - PTR(b)) -#define pd(a,b) ((lzo_uint) ((a)-(b))) - -LZO_EXTERN(lzo_uintptr_t) -__lzo_ptr_linear(const lzo_voidp ptr); - -typedef union -{ - char a_char; - unsigned char a_uchar; - short a_short; - unsigned short a_ushort; - int a_int; - unsigned int a_uint; - long a_long; - unsigned long a_ulong; - lzo_int a_lzo_int; - lzo_uint a_lzo_uint; - lzo_xint a_lzo_xint; - lzo_int16_t a_lzo_int16_t; - lzo_uint16_t a_lzo_uint16_t; - lzo_int32_t a_lzo_int32_t; - lzo_uint32_t a_lzo_uint32_t; -#if defined(lzo_uint64_t) - lzo_int64_t a_lzo_int64_t; - lzo_uint64_t a_lzo_uint64_t; -#endif - size_t a_size_t; - ptrdiff_t a_ptrdiff_t; - lzo_uintptr_t a_lzo_uintptr_t; - void * a_void_p; - char * a_char_p; - unsigned char * a_uchar_p; - const void * a_c_void_p; - const char * a_c_char_p; - const unsigned char * a_c_uchar_p; - lzo_voidp a_lzo_voidp; - lzo_bytep a_lzo_bytep; - const lzo_voidp a_c_lzo_voidp; - const lzo_bytep a_c_lzo_bytep; -} -lzo_full_align_t; - -#ifdef __cplusplus -} -#endif - -#endif - -#ifndef LZO_DETERMINISTIC -#define LZO_DETERMINISTIC 1 -#endif - -#ifndef LZO_DICT_USE_PTR -#define LZO_DICT_USE_PTR 1 -#endif - -#if (LZO_DICT_USE_PTR) -# define lzo_dict_t const lzo_bytep -# define lzo_dict_p lzo_dict_t * -#else -# define lzo_dict_t lzo_uint -# define lzo_dict_p lzo_dict_t * -#endif - -#endif - -#if !defined(MINILZO_CFG_SKIP_LZO_PTR) - -LZO_PUBLIC(lzo_uintptr_t) -__lzo_ptr_linear(const lzo_voidp ptr) -{ - lzo_uintptr_t p; - -#if (LZO_ARCH_I086) -#error "LZO_ARCH_I086 is unsupported" -#elif (LZO_MM_PVP) -#error "LZO_MM_PVP is unsupported" -#else - p = (lzo_uintptr_t) PTR_LINEAR(ptr); -#endif - - return p; -} - -LZO_PUBLIC(unsigned) -__lzo_align_gap(const lzo_voidp ptr, lzo_uint size) -{ -#if (__LZO_UINTPTR_T_IS_POINTER) -#error "__LZO_UINTPTR_T_IS_POINTER is unsupported" -#else - lzo_uintptr_t p, n; - if (size < 2) return 0; - p = __lzo_ptr_linear(ptr); -#if 0 - n = (((p + size - 1) / size) * size) - p; -#else - if ((size & (size - 1)) != 0) - return 0; - n = size; n = ((p + n - 1) & ~(n - 1)) - p; -#endif -#endif - assert((long)n >= 0); - assert(n <= size); - return (unsigned)n; -} - -#endif -#if !defined(MINILZO_CFG_SKIP_LZO_UTIL) - -/* If you use the LZO library in a product, I would appreciate that you - * keep this copyright string in the executable of your product. - */ - -static const char lzo_copyright_[] = -#if !defined(__LZO_IN_MINLZO) - LZO_VERSION_STRING; -#else - "\r\n\n" - "LZO data compression library.\n" - "$Copyright: LZO Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer\n" - "<markus@oberhumer.com>\n" - "http://www.oberhumer.com $\n\n" - "$Id: LZO version: v" LZO_VERSION_STRING ", " LZO_VERSION_DATE " $\n" - "$Info: " LZO_INFO_STRING " $\n"; -#endif -static const char lzo_version_string_[] = LZO_VERSION_STRING; -static const char lzo_version_date_[] = LZO_VERSION_DATE; - -LZO_PUBLIC(const lzo_bytep) -lzo_copyright(void) -{ - return (const lzo_bytep) lzo_copyright_; -} - -LZO_PUBLIC(unsigned) -lzo_version(void) -{ - return LZO_VERSION; -} - -LZO_PUBLIC(const char *) -lzo_version_string(void) -{ - return lzo_version_string_; -} - -LZO_PUBLIC(const char *) -lzo_version_date(void) -{ - return lzo_version_date_; -} - -LZO_PUBLIC(const lzo_charp) -_lzo_version_string(void) -{ - return lzo_version_string_; -} - -LZO_PUBLIC(const lzo_charp) -_lzo_version_date(void) -{ - return lzo_version_date_; -} - -#define LZO_BASE 65521u -#define LZO_NMAX 5552 - -#define LZO_DO1(buf,i) s1 += buf[i]; s2 += s1 -#define LZO_DO2(buf,i) LZO_DO1(buf,i); LZO_DO1(buf,i+1) -#define LZO_DO4(buf,i) LZO_DO2(buf,i); LZO_DO2(buf,i+2) -#define LZO_DO8(buf,i) LZO_DO4(buf,i); LZO_DO4(buf,i+4) -#define LZO_DO16(buf,i) LZO_DO8(buf,i); LZO_DO8(buf,i+8) - -LZO_PUBLIC(lzo_uint32_t) -lzo_adler32(lzo_uint32_t adler, const lzo_bytep buf, lzo_uint len) -{ - lzo_uint32_t s1 = adler & 0xffff; - lzo_uint32_t s2 = (adler >> 16) & 0xffff; - unsigned k; - - if (buf == NULL) - return 1; - - while (len > 0) - { - k = len < LZO_NMAX ? (unsigned) len : LZO_NMAX; - len -= k; - if (k >= 16) do - { - LZO_DO16(buf,0); - buf += 16; - k -= 16; - } while (k >= 16); - if (k != 0) do - { - s1 += *buf++; - s2 += s1; - } while (--k > 0); - s1 %= LZO_BASE; - s2 %= LZO_BASE; - } - return (s2 << 16) | s1; -} - -#undef LZO_DO1 -#undef LZO_DO2 -#undef LZO_DO4 -#undef LZO_DO8 -#undef LZO_DO16 - -#endif -#if !defined(MINILZO_CFG_SKIP_LZO_STRING) -#undef lzo_memcmp -#undef lzo_memcpy -#undef lzo_memmove -#undef lzo_memset -#if !defined(__LZO_MMODEL_HUGE) -# undef LZO_HAVE_MM_HUGE_PTR -#endif -#define lzo_hsize_t lzo_uint -#define lzo_hvoid_p lzo_voidp -#define lzo_hbyte_p lzo_bytep -#define LZOLIB_PUBLIC(r,f) LZO_PUBLIC(r) f -#define lzo_hmemcmp lzo_memcmp -#define lzo_hmemcpy lzo_memcpy -#define lzo_hmemmove lzo_memmove -#define lzo_hmemset lzo_memset -#define __LZOLIB_HMEMCPY_CH_INCLUDED 1 -#if !defined(LZOLIB_PUBLIC) -# define LZOLIB_PUBLIC(r,f) r __LZOLIB_FUNCNAME(f) -#endif -LZOLIB_PUBLIC(int, lzo_hmemcmp) (const lzo_hvoid_p s1, const lzo_hvoid_p s2, lzo_hsize_t len) -{ -#if (LZO_HAVE_MM_HUGE_PTR) || !(HAVE_MEMCMP) - const lzo_hbyte_p p1 = LZO_STATIC_CAST(const lzo_hbyte_p, s1); - const lzo_hbyte_p p2 = LZO_STATIC_CAST(const lzo_hbyte_p, s2); - if __lzo_likely(len > 0) do - { - int d = *p1 - *p2; - if (d != 0) - return d; - p1++; p2++; - } while __lzo_likely(--len > 0); - return 0; -#else - return memcmp(s1, s2, len); -#endif -} -LZOLIB_PUBLIC(lzo_hvoid_p, lzo_hmemcpy) (lzo_hvoid_p dest, const lzo_hvoid_p src, lzo_hsize_t len) -{ -#if (LZO_HAVE_MM_HUGE_PTR) || !(HAVE_MEMCPY) - lzo_hbyte_p p1 = LZO_STATIC_CAST(lzo_hbyte_p, dest); - const lzo_hbyte_p p2 = LZO_STATIC_CAST(const lzo_hbyte_p, src); - if (!(len > 0) || p1 == p2) - return dest; - do - *p1++ = *p2++; - while __lzo_likely(--len > 0); - return dest; -#else - return memcpy(dest, src, len); -#endif -} -LZOLIB_PUBLIC(lzo_hvoid_p, lzo_hmemmove) (lzo_hvoid_p dest, const lzo_hvoid_p src, lzo_hsize_t len) -{ -#if (LZO_HAVE_MM_HUGE_PTR) || !(HAVE_MEMMOVE) - lzo_hbyte_p p1 = LZO_STATIC_CAST(lzo_hbyte_p, dest); - const lzo_hbyte_p p2 = LZO_STATIC_CAST(const lzo_hbyte_p, src); - if (!(len > 0) || p1 == p2) - return dest; - if (p1 < p2) - { - do - *p1++ = *p2++; - while __lzo_likely(--len > 0); - } - else - { - p1 += len; - p2 += len; - do - *--p1 = *--p2; - while __lzo_likely(--len > 0); - } - return dest; -#else - return memmove(dest, src, len); -#endif -} -LZOLIB_PUBLIC(lzo_hvoid_p, lzo_hmemset) (lzo_hvoid_p s, int cc, lzo_hsize_t len) -{ -#if (LZO_HAVE_MM_HUGE_PTR) || !(HAVE_MEMSET) - lzo_hbyte_p p = LZO_STATIC_CAST(lzo_hbyte_p, s); - unsigned char c = LZO_ITRUNC(unsigned char, cc); - if __lzo_likely(len > 0) do - *p++ = c; - while __lzo_likely(--len > 0); - return s; -#else - return memset(s, cc, len); -#endif -} -#undef LZOLIB_PUBLIC -#endif -#if !defined(MINILZO_CFG_SKIP_LZO_INIT) - -#if !defined(__LZO_IN_MINILZO) - -#define LZO_WANT_ACC_CHK_CH 1 -#undef LZOCHK_ASSERT - - LZOCHK_ASSERT((LZO_UINT32_C(1) << (int)(8*sizeof(LZO_UINT32_C(1))-1)) > 0) - LZOCHK_ASSERT_IS_SIGNED_T(lzo_int) - LZOCHK_ASSERT_IS_UNSIGNED_T(lzo_uint) -#if !(__LZO_UINTPTR_T_IS_POINTER) - LZOCHK_ASSERT_IS_UNSIGNED_T(lzo_uintptr_t) -#endif - LZOCHK_ASSERT(sizeof(lzo_uintptr_t) >= sizeof(lzo_voidp)) - LZOCHK_ASSERT_IS_UNSIGNED_T(lzo_xint) - -#endif -#undef LZOCHK_ASSERT - -union lzo_config_check_union { - lzo_uint a[2]; - unsigned char b[2*LZO_MAX(8,sizeof(lzo_uint))]; -#if defined(lzo_uint64_t) - lzo_uint64_t c[2]; -#endif -}; - -#if 0 -#define u2p(ptr,off) ((lzo_voidp) (((lzo_bytep)(lzo_voidp)(ptr)) + (off))) -#else -static __lzo_noinline lzo_voidp u2p(lzo_voidp ptr, lzo_uint off) -{ - return (lzo_voidp) ((lzo_bytep) ptr + off); -} -#endif - -LZO_PUBLIC(int) -_lzo_config_check(void) -{ -#if (LZO_CC_CLANG && (LZO_CC_CLANG >= 0x030100ul && LZO_CC_CLANG < 0x030300ul)) -# if 0 - volatile -# endif -#endif - union lzo_config_check_union u; - lzo_voidp p; - unsigned r = 1; - - u.a[0] = u.a[1] = 0; - p = u2p(&u, 0); - r &= ((* (lzo_bytep) p) == 0); -#if !(LZO_CFG_NO_CONFIG_CHECK) -#if (LZO_ABI_BIG_ENDIAN) - u.a[0] = u.a[1] = 0; u.b[sizeof(lzo_uint) - 1] = 128; - p = u2p(&u, 0); - r &= ((* (lzo_uintp) p) == 128); -#endif -#if (LZO_ABI_LITTLE_ENDIAN) - u.a[0] = u.a[1] = 0; u.b[0] = 128; - p = u2p(&u, 0); - r &= ((* (lzo_uintp) p) == 128); -#endif - u.a[0] = u.a[1] = 0; - u.b[0] = 1; u.b[3] = 2; - p = u2p(&u, 1); - r &= UA_GET_NE16(p) == 0; - r &= UA_GET_LE16(p) == 0; - u.b[1] = 128; - r &= UA_GET_LE16(p) == 128; - u.b[2] = 129; - r &= UA_GET_LE16(p) == LZO_UINT16_C(0x8180); -#if (LZO_ABI_BIG_ENDIAN) - r &= UA_GET_NE16(p) == LZO_UINT16_C(0x8081); -#endif -#if (LZO_ABI_LITTLE_ENDIAN) - r &= UA_GET_NE16(p) == LZO_UINT16_C(0x8180); -#endif - u.a[0] = u.a[1] = 0; - u.b[0] = 3; u.b[5] = 4; - p = u2p(&u, 1); - r &= UA_GET_NE32(p) == 0; - r &= UA_GET_LE32(p) == 0; - u.b[1] = 128; - r &= UA_GET_LE32(p) == 128; - u.b[2] = 129; u.b[3] = 130; u.b[4] = 131; - r &= UA_GET_LE32(p) == LZO_UINT32_C(0x83828180); -#if (LZO_ABI_BIG_ENDIAN) - r &= UA_GET_NE32(p) == LZO_UINT32_C(0x80818283); -#endif -#if (LZO_ABI_LITTLE_ENDIAN) - r &= UA_GET_NE32(p) == LZO_UINT32_C(0x83828180); -#endif -#if defined(UA_GET_NE64) - u.c[0] = u.c[1] = 0; - u.b[0] = 5; u.b[9] = 6; - p = u2p(&u, 1); - u.c[0] = u.c[1] = 0; - r &= UA_GET_NE64(p) == 0; -#if defined(UA_GET_LE64) - r &= UA_GET_LE64(p) == 0; - u.b[1] = 128; - r &= UA_GET_LE64(p) == 128; -#endif -#endif -#if defined(lzo_bitops_ctlz32) - { unsigned i = 0; lzo_uint32_t v; - for (v = 1; v != 0 && r == 1; v <<= 1, i++) { - r &= lzo_bitops_ctlz32(v) == 31 - i; - r &= lzo_bitops_ctlz32_func(v) == 31 - i; - }} -#endif -#if defined(lzo_bitops_ctlz64) - { unsigned i = 0; lzo_uint64_t v; - for (v = 1; v != 0 && r == 1; v <<= 1, i++) { - r &= lzo_bitops_ctlz64(v) == 63 - i; - r &= lzo_bitops_ctlz64_func(v) == 63 - i; - }} -#endif -#if defined(lzo_bitops_cttz32) - { unsigned i = 0; lzo_uint32_t v; - for (v = 1; v != 0 && r == 1; v <<= 1, i++) { - r &= lzo_bitops_cttz32(v) == i; - r &= lzo_bitops_cttz32_func(v) == i; - }} -#endif -#if defined(lzo_bitops_cttz64) - { unsigned i = 0; lzo_uint64_t v; - for (v = 1; v != 0 && r == 1; v <<= 1, i++) { - r &= lzo_bitops_cttz64(v) == i; - r &= lzo_bitops_cttz64_func(v) == i; - }} -#endif -#endif - LZO_UNUSED_FUNC(lzo_bitops_unused_funcs); - - return r == 1 ? LZO_E_OK : LZO_E_ERROR; -} - -LZO_PUBLIC(int) -__lzo_init_v2(unsigned v, int s1, int s2, int s3, int s4, int s5, - int s6, int s7, int s8, int s9) -{ - int r; - -#if defined(__LZO_IN_MINILZO) -#elif (LZO_CC_MSC && ((_MSC_VER) < 700)) -#else -#define LZO_WANT_ACC_CHK_CH 1 -#undef LZOCHK_ASSERT -#define LZOCHK_ASSERT(expr) LZO_COMPILE_TIME_ASSERT(expr) -#endif -#undef LZOCHK_ASSERT - - if (v == 0) - return LZO_E_ERROR; - - r = (s1 == -1 || s1 == (int) sizeof(short)) && - (s2 == -1 || s2 == (int) sizeof(int)) && - (s3 == -1 || s3 == (int) sizeof(long)) && - (s4 == -1 || s4 == (int) sizeof(lzo_uint32_t)) && - (s5 == -1 || s5 == (int) sizeof(lzo_uint)) && - (s6 == -1 || s6 == (int) lzo_sizeof_dict_t) && - (s7 == -1 || s7 == (int) sizeof(char *)) && - (s8 == -1 || s8 == (int) sizeof(lzo_voidp)) && - (s9 == -1 || s9 == (int) sizeof(lzo_callback_t)); - if (!r) - return LZO_E_ERROR; - - r = _lzo_config_check(); - if (r != LZO_E_OK) - return r; - - return r; -} - -#if !defined(__LZO_IN_MINILZO) - -#if (LZO_OS_WIN16 && LZO_CC_WATCOMC) && defined(__SW_BD) - -#if 0 -BOOL FAR PASCAL LibMain ( HANDLE hInstance, WORD wDataSegment, - WORD wHeapSize, LPSTR lpszCmdLine ) -#else -int __far __pascal LibMain ( int a, short b, short c, long d ) -#endif -{ - LZO_UNUSED(a); LZO_UNUSED(b); LZO_UNUSED(c); LZO_UNUSED(d); - return 1; -} - -#endif - -#endif - -#endif - -#define LZO1X 1 -#define LZO_EOF_CODE 1 -#define M2_MAX_OFFSET 0x0800 - -#if !defined(MINILZO_CFG_SKIP_LZO1X_1_COMPRESS) - -#if 1 && defined(UA_GET_LE32) -#undef LZO_DICT_USE_PTR -#define LZO_DICT_USE_PTR 0 -#undef lzo_dict_t -#define lzo_dict_t lzo_uint16_t -#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 - -#if !defined(LZO1X) && !defined(LZO1Y) && !defined(LZO1Z) -# define LZO1X 1 -#endif - -#if !defined(__LZO_IN_MINILZO) -#include <lzo/lzo1x.h> -#endif - -#ifndef LZO_EOF_CODE -#define LZO_EOF_CODE 1 -#endif -#undef LZO_DETERMINISTIC - -#define M1_MAX_OFFSET 0x0400 -#ifndef M2_MAX_OFFSET -#define M2_MAX_OFFSET 0x0800 -#endif -#define M3_MAX_OFFSET 0x4000 -#define M4_MAX_OFFSET 0xbfff - -#define MX_MAX_OFFSET (M1_MAX_OFFSET + M2_MAX_OFFSET) - -#define M1_MIN_LEN 2 -#define M1_MAX_LEN 2 -#define M2_MIN_LEN 3 -#ifndef M2_MAX_LEN -#define M2_MAX_LEN 8 -#endif -#define M3_MIN_LEN 3 -#define M3_MAX_LEN 33 -#define M4_MIN_LEN 3 -#define M4_MAX_LEN 9 - -#define M1_MARKER 0 -#define M2_MARKER 64 -#define M3_MARKER 32 -#define M4_MARKER 16 - -#ifndef MIN_LOOKAHEAD -#define MIN_LOOKAHEAD (M2_MAX_LEN + 1) -#endif - -#if defined(LZO_NEED_DICT_H) - -#ifndef LZO_HASH -#define LZO_HASH LZO_HASH_LZO_INCREMENTAL_B -#endif -#define DL_MIN_LEN M2_MIN_LEN - -#ifndef __LZO_DICT_H -#define __LZO_DICT_H 1 - -#ifdef __cplusplus -extern "C" { -#endif - -#if !defined(D_BITS) && defined(DBITS) -# define D_BITS DBITS -#endif -#if !defined(D_BITS) -# error "D_BITS is not defined" -#endif -#if (D_BITS < 16) -# define D_SIZE LZO_SIZE(D_BITS) -# define D_MASK LZO_MASK(D_BITS) -#else -# define D_SIZE LZO_USIZE(D_BITS) -# define D_MASK LZO_UMASK(D_BITS) -#endif -#define D_HIGH ((D_MASK >> 1) + 1) - -#if !defined(DD_BITS) -# define DD_BITS 0 -#endif -#define DD_SIZE LZO_SIZE(DD_BITS) -#define DD_MASK LZO_MASK(DD_BITS) - -#if !defined(DL_BITS) -# define DL_BITS (D_BITS - DD_BITS) -#endif -#if (DL_BITS < 16) -# define DL_SIZE LZO_SIZE(DL_BITS) -# define DL_MASK LZO_MASK(DL_BITS) -#else -# define DL_SIZE LZO_USIZE(DL_BITS) -# define DL_MASK LZO_UMASK(DL_BITS) -#endif - -#if (D_BITS != DL_BITS + DD_BITS) -# error "D_BITS does not match" -#endif -#if (D_BITS < 6 || D_BITS > 18) -# error "invalid D_BITS" -#endif -#if (DL_BITS < 6 || DL_BITS > 20) -# error "invalid DL_BITS" -#endif -#if (DD_BITS < 0 || DD_BITS > 6) -# error "invalid DD_BITS" -#endif - -#if !defined(DL_MIN_LEN) -# define DL_MIN_LEN 3 -#endif -#if !defined(DL_SHIFT) -# define DL_SHIFT ((DL_BITS + (DL_MIN_LEN - 1)) / DL_MIN_LEN) -#endif - -#define LZO_HASH_GZIP 1 -#define LZO_HASH_GZIP_INCREMENTAL 2 -#define LZO_HASH_LZO_INCREMENTAL_A 3 -#define LZO_HASH_LZO_INCREMENTAL_B 4 - -#if !defined(LZO_HASH) -# error "choose a hashing strategy" -#endif - -#undef DM -#undef DX - -#if (DL_MIN_LEN == 3) -# define _DV2_A(p,shift1,shift2) \ - (((( (lzo_xint)((p)[0]) << shift1) ^ (p)[1]) << shift2) ^ (p)[2]) -# define _DV2_B(p,shift1,shift2) \ - (((( (lzo_xint)((p)[2]) << shift1) ^ (p)[1]) << shift2) ^ (p)[0]) -# define _DV3_B(p,shift1,shift2,shift3) \ - ((_DV2_B((p)+1,shift1,shift2) << (shift3)) ^ (p)[0]) -#elif (DL_MIN_LEN == 2) -# define _DV2_A(p,shift1,shift2) \ - (( (lzo_xint)(p[0]) << shift1) ^ p[1]) -# define _DV2_B(p,shift1,shift2) \ - (( (lzo_xint)(p[1]) << shift1) ^ p[2]) -#else -# error "invalid DL_MIN_LEN" -#endif -#define _DV_A(p,shift) _DV2_A(p,shift,shift) -#define _DV_B(p,shift) _DV2_B(p,shift,shift) -#define DA2(p,s1,s2) \ - (((((lzo_xint)((p)[2]) << (s2)) + (p)[1]) << (s1)) + (p)[0]) -#define DS2(p,s1,s2) \ - (((((lzo_xint)((p)[2]) << (s2)) - (p)[1]) << (s1)) - (p)[0]) -#define DX2(p,s1,s2) \ - (((((lzo_xint)((p)[2]) << (s2)) ^ (p)[1]) << (s1)) ^ (p)[0]) -#define DA3(p,s1,s2,s3) ((DA2((p)+1,s2,s3) << (s1)) + (p)[0]) -#define DS3(p,s1,s2,s3) ((DS2((p)+1,s2,s3) << (s1)) - (p)[0]) -#define DX3(p,s1,s2,s3) ((DX2((p)+1,s2,s3) << (s1)) ^ (p)[0]) -#define DMS(v,s) ((lzo_uint) (((v) & (D_MASK >> (s))) << (s))) -#define DM(v) DMS(v,0) - -#if (LZO_HASH == LZO_HASH_GZIP) -# define _DINDEX(dv,p) (_DV_A((p),DL_SHIFT)) - -#elif (LZO_HASH == LZO_HASH_GZIP_INCREMENTAL) -# define __LZO_HASH_INCREMENTAL 1 -# define DVAL_FIRST(dv,p) dv = _DV_A((p),DL_SHIFT) -# define DVAL_NEXT(dv,p) dv = (((dv) << DL_SHIFT) ^ p[2]) -# define _DINDEX(dv,p) (dv) -# define DVAL_LOOKAHEAD DL_MIN_LEN - -#elif (LZO_HASH == LZO_HASH_LZO_INCREMENTAL_A) -# define __LZO_HASH_INCREMENTAL 1 -# define DVAL_FIRST(dv,p) dv = _DV_A((p),5) -# define DVAL_NEXT(dv,p) \ - dv ^= (lzo_xint)(p[-1]) << (2*5); dv = (((dv) << 5) ^ p[2]) -# define _DINDEX(dv,p) ((DMUL(0x9f5f,dv)) >> 5) -# define DVAL_LOOKAHEAD DL_MIN_LEN - -#elif (LZO_HASH == LZO_HASH_LZO_INCREMENTAL_B) -# define __LZO_HASH_INCREMENTAL 1 -# define DVAL_FIRST(dv,p) dv = _DV_B((p),5) -# define DVAL_NEXT(dv,p) \ - dv ^= p[-1]; dv = (((dv) >> 5) ^ ((lzo_xint)(p[2]) << (2*5))) -# define _DINDEX(dv,p) ((DMUL(0x9f5f,dv)) >> 5) -# define DVAL_LOOKAHEAD DL_MIN_LEN - -#else -# error "choose a hashing strategy" -#endif - -#ifndef DINDEX -#define DINDEX(dv,p) ((lzo_uint)((_DINDEX(dv,p)) & DL_MASK) << DD_BITS) -#endif -#if !defined(DINDEX1) && defined(D_INDEX1) -#define DINDEX1 D_INDEX1 -#endif -#if !defined(DINDEX2) && defined(D_INDEX2) -#define DINDEX2 D_INDEX2 -#endif - -#if !defined(__LZO_HASH_INCREMENTAL) -# define DVAL_FIRST(dv,p) ((void) 0) -# define DVAL_NEXT(dv,p) ((void) 0) -# define DVAL_LOOKAHEAD 0 -#endif - -#if !defined(DVAL_ASSERT) -#if defined(__LZO_HASH_INCREMENTAL) && !defined(NDEBUG) -#if 1 && (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || (LZO_CC_GNUC >= 0x020700ul) || LZO_CC_INTELC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || LZO_CC_PGI) -static void __attribute__((__unused__)) -#else -static void -#endif -DVAL_ASSERT(lzo_xint dv, const lzo_bytep p) -{ - lzo_xint df; - DVAL_FIRST(df,(p)); - assert(DINDEX(dv,p) == DINDEX(df,p)); -} -#else -# define DVAL_ASSERT(dv,p) ((void) 0) -#endif -#endif - -#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_dict_t) pd(p, in)) -# define GINDEX(m_pos,m_off,dict,dindex,in) m_off = dict[dindex] -#endif - -#if (DD_BITS == 0) - -# define UPDATE_D(dict,drun,dv,p,in) dict[ DINDEX(dv,p) ] = DENTRY(p,in) -# define UPDATE_I(dict,drun,index,p,in) dict[index] = DENTRY(p,in) -# define UPDATE_P(ptr,drun,p,in) (ptr)[0] = DENTRY(p,in) - -#else - -# define UPDATE_D(dict,drun,dv,p,in) \ - dict[ DINDEX(dv,p) + drun++ ] = DENTRY(p,in); drun &= DD_MASK -# define UPDATE_I(dict,drun,index,p,in) \ - dict[ (index) + drun++ ] = DENTRY(p,in); drun &= DD_MASK -# define UPDATE_P(ptr,drun,p,in) \ - (ptr) [ drun++ ] = DENTRY(p,in); drun &= DD_MASK - -#endif - -#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) - -#define LZO_CHECK_MPOS_NON_DET(m_pos,m_off,in,ip,max_offset) \ - (BOUNDS_CHECKING_OFF_IN_EXPR(( \ - m_pos = ip - (lzo_uint) PTR_DIFF(ip,m_pos), \ - PTR_LT(m_pos,in) || \ - (m_off = (lzo_uint) PTR_DIFF(ip,m_pos)) == 0 || \ - m_off > max_offset ))) - -#else - -#define LZO_CHECK_MPOS_DET(m_pos,m_off,in,ip,max_offset) \ - (m_off == 0 || \ - ((m_off = pd(ip, in) - m_off) > max_offset) || \ - (m_pos = (ip) - (m_off), 0) ) - -#define LZO_CHECK_MPOS_NON_DET(m_pos,m_off,in,ip,max_offset) \ - (pd(ip, in) <= m_off || \ - ((m_off = pd(ip, in) - m_off) > max_offset) || \ - (m_pos = (ip) - (m_off), 0) ) - -#endif - -#if (LZO_DETERMINISTIC) -# define LZO_CHECK_MPOS LZO_CHECK_MPOS_DET -#else -# define LZO_CHECK_MPOS LZO_CHECK_MPOS_NON_DET -#endif - -#ifdef __cplusplus -} -#endif - -#endif - -#endif - -#endif - -#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_PP_ECONCAT2(DO_COMPRESS,_core) -#endif - -static __lzo_noinline lzo_uint -do_compress ( const lzo_bytep in , lzo_uint in_len, - lzo_bytep out, lzo_uintp out_len, - lzo_uint ti, lzo_voidp wrkmem) -{ - 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 - 20; - const lzo_bytep ii; - lzo_dict_p const dict = (lzo_dict_p) wrkmem; - - op = out; - ip = in; - ii = ip; - - ip += ti < 4 ? 4 - ti : 0; - for (;;) - { - 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)) - goto literal; -#if 1 - if (m_off <= M2_MAX_OFFSET || m_pos[3] == ip[3]) - goto try_match; - DINDEX2(dindex,ip); -#endif - GINDEX(m_pos,m_off,dict,dindex,in); - if (LZO_CHECK_MPOS_NON_DET(m_pos,m_off,in,ip,M4_MAX_OFFSET)) - goto literal; - if (m_off <= M2_MAX_OFFSET || m_pos[3] == ip[3]) - goto try_match; - goto literal; - -try_match: -#if (LZO_OPT_UNALIGNED32) - if (UA_GET_NE32(m_pos) != UA_GET_NE32(ip)) -#else - if (m_pos[0] != ip[0] || m_pos[1] != ip[1] || m_pos[2] != ip[2] || m_pos[3] != ip[3]) -#endif - { -literal: - UPDATE_I(dict,0,dindex,ip,in); - ip += 1 + ((ip - ii) >> 5); - continue; - } - UPDATE_I(dict,0,dindex,ip,in); -#else - lzo_uint m_off; - lzo_uint m_len; - { - lzo_uint32_t dv; - lzo_uint dindex; -literal: - ip += 1 + ((ip - ii) >> 5); -next: - if __lzo_unlikely(ip >= ip_end) - break; - dv = UA_GET_LE32(ip); - dindex = DINDEX(dv,ip); - GINDEX(m_off,m_pos,in+dict,dindex,in); - UPDATE_I(dict,0,dindex,ip,in); - if __lzo_unlikely(dv != UA_GET_LE32(m_pos)) - goto literal; - } -#endif - - ii -= ti; ti = 0; - { - lzo_uint t = pd(ip,ii); - if (t != 0) - { - if (t <= 3) - { - op[-2] = LZO_BYTE(op[-2] | t); -#if (LZO_OPT_UNALIGNED32) - UA_COPY4(op, ii); - op += t; -#else - { do *op++ = *ii++; while (--t > 0); } -#endif - } -#if (LZO_OPT_UNALIGNED32) || (LZO_OPT_UNALIGNED64) - else if (t <= 16) - { - *op++ = LZO_BYTE(t - 3); - UA_COPY8(op, ii); - UA_COPY8(op+8, ii+8); - op += t; - } -#endif - else - { - if (t <= 18) - *op++ = LZO_BYTE(t - 3); - else - { - lzo_uint tt = t - 18; - *op++ = 0; - while __lzo_unlikely(tt > 255) - { - tt -= 255; - UA_SET1(op, 0); - op++; - } - assert(tt > 0); - *op++ = LZO_BYTE(tt); - } -#if (LZO_OPT_UNALIGNED32) || (LZO_OPT_UNALIGNED64) - do { - UA_COPY8(op, ii); - UA_COPY8(op+8, ii+8); - op += 16; ii += 16; t -= 16; - } while (t >= 16); if (t > 0) -#endif - { do *op++ = *ii++; while (--t > 0); } - } - } - } - m_len = 4; - { -#if (LZO_OPT_UNALIGNED64) - lzo_uint64_t v; - v = UA_GET_NE64(ip + m_len) ^ UA_GET_NE64(m_pos + m_len); - if __lzo_unlikely(v == 0) { - do { - m_len += 8; - v = UA_GET_NE64(ip + m_len) ^ UA_GET_NE64(m_pos + m_len); - if __lzo_unlikely(ip + m_len >= ip_end) - goto m_len_done; - } while (v == 0); - } -#if (LZO_ABI_BIG_ENDIAN) && defined(lzo_bitops_ctlz64) - m_len += lzo_bitops_ctlz64(v) / CHAR_BIT; -#elif (LZO_ABI_BIG_ENDIAN) - if ((v >> (64 - CHAR_BIT)) == 0) do { - v <<= CHAR_BIT; - m_len += 1; - } while ((v >> (64 - CHAR_BIT)) == 0); -#elif (LZO_ABI_LITTLE_ENDIAN) && defined(lzo_bitops_cttz64) - m_len += lzo_bitops_cttz64(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 -#elif (LZO_OPT_UNALIGNED32) - lzo_uint32_t v; - v = UA_GET_NE32(ip + m_len) ^ UA_GET_NE32(m_pos + m_len); - if __lzo_unlikely(v == 0) { - do { - m_len += 4; - v = UA_GET_NE32(ip + m_len) ^ UA_GET_NE32(m_pos + m_len); - if (v != 0) - break; - m_len += 4; - v = UA_GET_NE32(ip + m_len) ^ UA_GET_NE32(m_pos + m_len); - if __lzo_unlikely(ip + m_len >= ip_end) - goto m_len_done; - } while (v == 0); - } -#if (LZO_ABI_BIG_ENDIAN) && defined(lzo_bitops_ctlz32) - m_len += lzo_bitops_ctlz32(v) / CHAR_BIT; -#elif (LZO_ABI_BIG_ENDIAN) - if ((v >> (32 - CHAR_BIT)) == 0) do { - v <<= CHAR_BIT; - m_len += 1; - } while ((v >> (32 - CHAR_BIT)) == 0); -#elif (LZO_ABI_LITTLE_ENDIAN) && defined(lzo_bitops_cttz32) - m_len += lzo_bitops_cttz32(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 (ip[m_len] != m_pos[m_len]) - break; - m_len += 1; - if (ip[m_len] != m_pos[m_len]) - break; - m_len += 1; - if (ip[m_len] != m_pos[m_len]) - break; - m_len += 1; - if (ip[m_len] != m_pos[m_len]) - break; - m_len += 1; - if (ip[m_len] != m_pos[m_len]) - break; - m_len += 1; - if (ip[m_len] != m_pos[m_len]) - break; - m_len += 1; - if (ip[m_len] != m_pos[m_len]) - break; - 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)); - else - { - m_len -= M3_MAX_LEN; - *op++ = M3_MARKER | 0; - while __lzo_unlikely(m_len > 255) - { - m_len -= 255; - UA_SET1(op, 0); - op++; - } - *op++ = LZO_BYTE(m_len); - } - *op++ = LZO_BYTE(m_off << 2); - *op++ = LZO_BYTE(m_off >> 6); - } - else - { - m_off -= 0x4000; - if (m_len <= M4_MAX_LEN) - *op++ = LZO_BYTE(M4_MARKER | ((m_off >> 11) & 8) | (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 -= 255; - UA_SET1(op, 0); - op++; - } - *op++ = LZO_BYTE(m_len); - } - *op++ = LZO_BYTE(m_off << 2); - *op++ = LZO_BYTE(m_off >> 6); - } - goto next; - } - - *out_len = pd(op, out); - return pd(in_end,ii-ti); -} - -LZO_PUBLIC(int) -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 l = in_len; - lzo_uint t = 0; - - while (l > 20) - { - 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) - { - const lzo_bytep ii = in + in_len - t; - - if (op == out && t <= 238) - *op++ = LZO_BYTE(17 + t); - else if (t <= 3) - op[-2] = LZO_BYTE(op[-2] | t); - else if (t <= 18) - *op++ = LZO_BYTE(t - 3); - else - { - lzo_uint tt = t - 18; - - *op++ = 0; - while (tt > 255) - { - tt -= 255; - UA_SET1(op, 0); - op++; - } - assert(tt > 0); - *op++ = LZO_BYTE(tt); - } - UA_COPYN(op, ii, t); - op += t; - } - - *op++ = M4_MARKER | 1; - *op++ = 0; - *op++ = 0; - - *out_len = pd(op, out); - return LZO_E_OK; -} - -#endif - -#undef do_compress -#undef DO_COMPRESS -#undef LZO_HASH - -#undef LZO_TEST_OVERRUN -#undef DO_DECOMPRESS -#define DO_DECOMPRESS lzo1x_decompress - -#if !defined(MINILZO_CFG_SKIP_LZO1X_DECOMPRESS) - -#if defined(LZO_TEST_OVERRUN) -# if !defined(LZO_TEST_OVERRUN_INPUT) -# define LZO_TEST_OVERRUN_INPUT 2 -# endif -# if !defined(LZO_TEST_OVERRUN_OUTPUT) -# define LZO_TEST_OVERRUN_OUTPUT 2 -# endif -# if !defined(LZO_TEST_OVERRUN_LOOKBEHIND) -# define LZO_TEST_OVERRUN_LOOKBEHIND 1 -# endif -#endif - -#undef TEST_IP -#undef TEST_OP -#undef TEST_IP_AND_TEST_OP -#undef TEST_LB -#undef TEST_LBO -#undef NEED_IP -#undef NEED_OP -#undef TEST_IV -#undef TEST_OV -#undef HAVE_TEST_IP -#undef HAVE_TEST_OP -#undef HAVE_NEED_IP -#undef HAVE_NEED_OP -#undef HAVE_ANY_IP -#undef HAVE_ANY_OP - -#if defined(LZO_TEST_OVERRUN_INPUT) -# if (LZO_TEST_OVERRUN_INPUT >= 1) -# define TEST_IP (ip < ip_end) -# endif -# if (LZO_TEST_OVERRUN_INPUT >= 2) -# define NEED_IP(x) \ - if ((lzo_uint)(ip_end - ip) < (lzo_uint)(x)) goto input_overrun -# define TEST_IV(x) if ((x) > (lzo_uint)0 - (511)) goto input_overrun -# endif -#endif - -#if defined(LZO_TEST_OVERRUN_OUTPUT) -# if (LZO_TEST_OVERRUN_OUTPUT >= 1) -# define TEST_OP (op <= op_end) -# endif -# if (LZO_TEST_OVERRUN_OUTPUT >= 2) -# undef TEST_OP -# define NEED_OP(x) \ - if ((lzo_uint)(op_end - op) < (lzo_uint)(x)) goto output_overrun -# define TEST_OV(x) if ((x) > (lzo_uint)0 - (511)) goto output_overrun -# endif -#endif - -#if defined(LZO_TEST_OVERRUN_LOOKBEHIND) -# define TEST_LB(m_pos) if (PTR_LT(m_pos,out) || PTR_GE(m_pos,op)) goto lookbehind_overrun -# define TEST_LBO(m_pos,o) if (PTR_LT(m_pos,out) || PTR_GE(m_pos,op-(o))) goto lookbehind_overrun -#else -# define TEST_LB(m_pos) ((void) 0) -# define TEST_LBO(m_pos,o) ((void) 0) -#endif - -#if !defined(LZO_EOF_CODE) && !defined(TEST_IP) -# define TEST_IP (ip < ip_end) -#endif - -#if defined(TEST_IP) -# define HAVE_TEST_IP 1 -#else -# define TEST_IP 1 -#endif -#if defined(TEST_OP) -# define HAVE_TEST_OP 1 -#else -# define TEST_OP 1 -#endif - -#if defined(HAVE_TEST_IP) && defined(HAVE_TEST_OP) -# define TEST_IP_AND_TEST_OP (TEST_IP && TEST_OP) -#elif defined(HAVE_TEST_IP) -# define TEST_IP_AND_TEST_OP TEST_IP -#elif defined(HAVE_TEST_OP) -# define TEST_IP_AND_TEST_OP TEST_OP -#else -# define TEST_IP_AND_TEST_OP 1 -#endif - -#if defined(NEED_IP) -# define HAVE_NEED_IP 1 -#else -# define NEED_IP(x) ((void) 0) -# define TEST_IV(x) ((void) 0) -#endif -#if defined(NEED_OP) -# define HAVE_NEED_OP 1 -#else -# define NEED_OP(x) ((void) 0) -# define TEST_OV(x) ((void) 0) -#endif - -#if defined(HAVE_TEST_IP) || defined(HAVE_NEED_IP) -# define HAVE_ANY_IP 1 -#endif -#if defined(HAVE_TEST_OP) || defined(HAVE_NEED_OP) -# define HAVE_ANY_OP 1 -#endif - -#if defined(DO_DECOMPRESS) -LZO_PUBLIC(int) -DO_DECOMPRESS ( const lzo_bytep in , lzo_uint in_len, - lzo_bytep out, lzo_uintp out_len, - lzo_voidp wrkmem ) -#endif -{ - lzo_bytep op; - const lzo_bytep ip; - lzo_uint t; -#if defined(COPY_DICT) - lzo_uint m_off; - const lzo_bytep dict_end; -#else - const lzo_bytep m_pos; -#endif - - const lzo_bytep const ip_end = in + in_len; -#if defined(HAVE_ANY_OP) - lzo_bytep const op_end = out + *out_len; -#endif -#if defined(LZO1Z) - lzo_uint last_m_off = 0; -#endif - - LZO_UNUSED(wrkmem); - -#if defined(COPY_DICT) - if (dict) - { - if (dict_len > M4_MAX_OFFSET) - { - dict += dict_len - M4_MAX_OFFSET; - dict_len = M4_MAX_OFFSET; - } - dict_end = dict + dict_len; - } - else - { - dict_len = 0; - dict_end = NULL; - } -#endif - - *out_len = 0; - - op = out; - ip = in; - - NEED_IP(1); - if (*ip > 17) - { - t = *ip++ - 17; - if (t < 4) - goto match_next; - assert(t > 0); NEED_OP(t); NEED_IP(t+3); - do *op++ = *ip++; while (--t > 0); - goto first_literal_run; - } - - for (;;) - { - NEED_IP(3); - t = *ip++; - if (t >= 16) - goto match; - if (t == 0) - { - while (*ip == 0) - { - t += 255; - ip++; - TEST_IV(t); - NEED_IP(1); - } - t += 15 + *ip++; - } - assert(t > 0); NEED_OP(t+3); NEED_IP(t+6); -#if (LZO_OPT_UNALIGNED64) && (LZO_OPT_UNALIGNED32) - t += 3; - if (t >= 8) do - { - UA_COPY8(op,ip); - op += 8; ip += 8; t -= 8; - } while (t >= 8); - if (t >= 4) - { - UA_COPY4(op,ip); - op += 4; ip += 4; t -= 4; - } - if (t > 0) - { - *op++ = *ip++; - if (t > 1) { *op++ = *ip++; if (t > 2) { *op++ = *ip++; } } - } -#elif (LZO_OPT_UNALIGNED32) || (LZO_ALIGNED_OK_4) -#if !(LZO_OPT_UNALIGNED32) - if (PTR_ALIGNED2_4(op,ip)) - { -#endif - UA_COPY4(op,ip); - op += 4; ip += 4; - if (--t > 0) - { - if (t >= 4) - { - do { - UA_COPY4(op,ip); - op += 4; ip += 4; t -= 4; - } while (t >= 4); - if (t > 0) do *op++ = *ip++; while (--t > 0); - } - else - do *op++ = *ip++; while (--t > 0); - } -#if !(LZO_OPT_UNALIGNED32) - } - else -#endif -#endif -#if !(LZO_OPT_UNALIGNED32) - { - *op++ = *ip++; *op++ = *ip++; *op++ = *ip++; - do *op++ = *ip++; while (--t > 0); - } -#endif - -first_literal_run: - - t = *ip++; - if (t >= 16) - goto match; -#if defined(COPY_DICT) -#if defined(LZO1Z) - m_off = (1 + M2_MAX_OFFSET) + (t << 6) + (*ip++ >> 2); - last_m_off = m_off; -#else - m_off = (1 + M2_MAX_OFFSET) + (t >> 2) + (*ip++ << 2); -#endif - NEED_OP(3); - t = 3; COPY_DICT(t,m_off) -#else -#if defined(LZO1Z) - t = (1 + M2_MAX_OFFSET) + (t << 6) + (*ip++ >> 2); - m_pos = op - t; - last_m_off = t; -#else - m_pos = op - (1 + M2_MAX_OFFSET); - m_pos -= t >> 2; - m_pos -= *ip++ << 2; -#endif - TEST_LB(m_pos); NEED_OP(3); - *op++ = *m_pos++; *op++ = *m_pos++; *op++ = *m_pos; -#endif - goto match_done; - - for (;;) { -match: - if (t >= 64) - { -#if defined(COPY_DICT) -#if defined(LZO1X) - m_off = 1 + ((t >> 2) & 7) + (*ip++ << 3); - t = (t >> 5) - 1; -#elif defined(LZO1Y) - m_off = 1 + ((t >> 2) & 3) + (*ip++ << 2); - t = (t >> 4) - 3; -#elif defined(LZO1Z) - m_off = t & 0x1f; - if (m_off >= 0x1c) - m_off = last_m_off; - else - { - m_off = 1 + (m_off << 6) + (*ip++ >> 2); - last_m_off = m_off; - } - t = (t >> 5) - 1; -#endif -#else -#if defined(LZO1X) - m_pos = op - 1; - m_pos -= (t >> 2) & 7; - m_pos -= *ip++ << 3; - t = (t >> 5) - 1; -#elif defined(LZO1Y) - m_pos = op - 1; - m_pos -= (t >> 2) & 3; - m_pos -= *ip++ << 2; - t = (t >> 4) - 3; -#elif defined(LZO1Z) - { - lzo_uint off = t & 0x1f; - m_pos = op; - if (off >= 0x1c) - { - assert(last_m_off > 0); - m_pos -= last_m_off; - } - else - { - off = 1 + (off << 6) + (*ip++ >> 2); - m_pos -= off; - last_m_off = off; - } - } - t = (t >> 5) - 1; -#endif - TEST_LB(m_pos); assert(t > 0); NEED_OP(t+3-1); - goto copy_match; -#endif - } - else if (t >= 32) - { - t &= 31; - if (t == 0) - { - while (*ip == 0) - { - t += 255; - ip++; - TEST_OV(t); - NEED_IP(1); - } - t += 31 + *ip++; - NEED_IP(2); - } -#if defined(COPY_DICT) -#if defined(LZO1Z) - m_off = 1 + (ip[0] << 6) + (ip[1] >> 2); - last_m_off = m_off; -#else - m_off = 1 + (ip[0] >> 2) + (ip[1] << 6); -#endif -#else -#if defined(LZO1Z) - { - lzo_uint off = 1 + (ip[0] << 6) + (ip[1] >> 2); - m_pos = op - off; - last_m_off = off; - } -#elif (LZO_OPT_UNALIGNED16) && (LZO_ABI_LITTLE_ENDIAN) - m_pos = op - 1; - m_pos -= UA_GET_LE16(ip) >> 2; -#else - m_pos = op - 1; - m_pos -= (ip[0] >> 2) + (ip[1] << 6); -#endif -#endif - ip += 2; - } - else if (t >= 16) - { -#if defined(COPY_DICT) - m_off = (t & 8) << 11; -#else - m_pos = op; - m_pos -= (t & 8) << 11; -#endif - t &= 7; - if (t == 0) - { - while (*ip == 0) - { - t += 255; - ip++; - TEST_OV(t); - NEED_IP(1); - } - t += 7 + *ip++; - NEED_IP(2); - } -#if defined(COPY_DICT) -#if defined(LZO1Z) - m_off += (ip[0] << 6) + (ip[1] >> 2); -#else - m_off += (ip[0] >> 2) + (ip[1] << 6); -#endif - ip += 2; - if (m_off == 0) - goto eof_found; - m_off += 0x4000; -#if defined(LZO1Z) - last_m_off = m_off; -#endif -#else -#if defined(LZO1Z) - m_pos -= (ip[0] << 6) + (ip[1] >> 2); -#elif (LZO_OPT_UNALIGNED16) && (LZO_ABI_LITTLE_ENDIAN) - m_pos -= UA_GET_LE16(ip) >> 2; -#else - m_pos -= (ip[0] >> 2) + (ip[1] << 6); -#endif - ip += 2; - if (m_pos == op) - goto eof_found; - m_pos -= 0x4000; -#if defined(LZO1Z) - last_m_off = pd((const lzo_bytep)op, m_pos); -#endif -#endif - } - else - { -#if defined(COPY_DICT) -#if defined(LZO1Z) - m_off = 1 + (t << 6) + (*ip++ >> 2); - last_m_off = m_off; -#else - m_off = 1 + (t >> 2) + (*ip++ << 2); -#endif - NEED_OP(2); - t = 2; COPY_DICT(t,m_off) -#else -#if defined(LZO1Z) - t = 1 + (t << 6) + (*ip++ >> 2); - m_pos = op - t; - last_m_off = t; -#else - m_pos = op - 1; - m_pos -= t >> 2; - m_pos -= *ip++ << 2; -#endif - TEST_LB(m_pos); NEED_OP(2); - *op++ = *m_pos++; *op++ = *m_pos; -#endif - goto match_done; - } - -#if defined(COPY_DICT) - - NEED_OP(t+3-1); - t += 3-1; COPY_DICT(t,m_off) - -#else - - TEST_LB(m_pos); assert(t > 0); NEED_OP(t+3-1); -#if (LZO_OPT_UNALIGNED64) && (LZO_OPT_UNALIGNED32) - if (op - m_pos >= 8) - { - t += (3 - 1); - if (t >= 8) do - { - UA_COPY8(op,m_pos); - op += 8; m_pos += 8; t -= 8; - } while (t >= 8); - if (t >= 4) - { - UA_COPY4(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 (LZO_OPT_UNALIGNED32) || (LZO_ALIGNED_OK_4) -#if !(LZO_OPT_UNALIGNED32) - if (t >= 2 * 4 - (3 - 1) && PTR_ALIGNED2_4(op,m_pos)) - { - assert((op - m_pos) >= 4); -#else - if (t >= 2 * 4 - (3 - 1) && (op - m_pos) >= 4) - { -#endif - UA_COPY4(op,m_pos); - op += 4; m_pos += 4; t -= 4 - (3 - 1); - do { - UA_COPY4(op,m_pos); - op += 4; m_pos += 4; t -= 4; - } while (t >= 4); - if (t > 0) do *op++ = *m_pos++; while (--t > 0); - } - else -#endif - { -copy_match: - *op++ = *m_pos++; *op++ = *m_pos++; - do *op++ = *m_pos++; while (--t > 0); - } - -#endif - -match_done: -#if defined(LZO1Z) - t = ip[-1] & 3; -#else - t = ip[-2] & 3; -#endif - if (t == 0) - break; - -match_next: - assert(t > 0); assert(t < 4); NEED_OP(t); NEED_IP(t+3); -#if 0 - do *op++ = *ip++; while (--t > 0); -#else - *op++ = *ip++; - if (t > 1) { *op++ = *ip++; if (t > 2) { *op++ = *ip++; } } -#endif - t = *ip++; - } - } - -eof_found: - *out_len = pd(op, out); - return (ip == ip_end ? LZO_E_OK : - (ip < ip_end ? LZO_E_INPUT_NOT_CONSUMED : LZO_E_INPUT_OVERRUN)); - -#if defined(HAVE_NEED_IP) -input_overrun: - *out_len = pd(op, out); - return LZO_E_INPUT_OVERRUN; -#endif - -#if defined(HAVE_NEED_OP) -output_overrun: - *out_len = pd(op, out); - return LZO_E_OUTPUT_OVERRUN; -#endif - -#if defined(LZO_TEST_OVERRUN_LOOKBEHIND) -lookbehind_overrun: - *out_len = pd(op, out); - return LZO_E_LOOKBEHIND_OVERRUN; -#endif -} - -#endif - -#define LZO_TEST_OVERRUN 1 -#undef DO_DECOMPRESS -#define DO_DECOMPRESS lzo1x_decompress_safe - -#if !defined(MINILZO_CFG_SKIP_LZO1X_DECOMPRESS_SAFE) - -#if defined(LZO_TEST_OVERRUN) -# if !defined(LZO_TEST_OVERRUN_INPUT) -# define LZO_TEST_OVERRUN_INPUT 2 -# endif -# if !defined(LZO_TEST_OVERRUN_OUTPUT) -# define LZO_TEST_OVERRUN_OUTPUT 2 -# endif -# if !defined(LZO_TEST_OVERRUN_LOOKBEHIND) -# define LZO_TEST_OVERRUN_LOOKBEHIND 1 -# endif -#endif - -#undef TEST_IP -#undef TEST_OP -#undef TEST_IP_AND_TEST_OP -#undef TEST_LB -#undef TEST_LBO -#undef NEED_IP -#undef NEED_OP -#undef TEST_IV -#undef TEST_OV -#undef HAVE_TEST_IP -#undef HAVE_TEST_OP -#undef HAVE_NEED_IP -#undef HAVE_NEED_OP -#undef HAVE_ANY_IP -#undef HAVE_ANY_OP - -#if defined(LZO_TEST_OVERRUN_INPUT) -# if (LZO_TEST_OVERRUN_INPUT >= 1) -# define TEST_IP (ip < ip_end) -# endif -# if (LZO_TEST_OVERRUN_INPUT >= 2) -# define NEED_IP(x) \ - if ((lzo_uint)(ip_end - ip) < (lzo_uint)(x)) goto input_overrun -# define TEST_IV(x) if ((x) > (lzo_uint)0 - (511)) goto input_overrun -# endif -#endif - -#if defined(LZO_TEST_OVERRUN_OUTPUT) -# if (LZO_TEST_OVERRUN_OUTPUT >= 1) -# define TEST_OP (op <= op_end) -# endif -# if (LZO_TEST_OVERRUN_OUTPUT >= 2) -# undef TEST_OP -# define NEED_OP(x) \ - if ((lzo_uint)(op_end - op) < (lzo_uint)(x)) goto output_overrun -# define TEST_OV(x) if ((x) > (lzo_uint)0 - (511)) goto output_overrun -# endif -#endif - -#if defined(LZO_TEST_OVERRUN_LOOKBEHIND) -# define TEST_LB(m_pos) if (PTR_LT(m_pos,out) || PTR_GE(m_pos,op)) goto lookbehind_overrun -# define TEST_LBO(m_pos,o) if (PTR_LT(m_pos,out) || PTR_GE(m_pos,op-(o))) goto lookbehind_overrun -#else -# define TEST_LB(m_pos) ((void) 0) -# define TEST_LBO(m_pos,o) ((void) 0) -#endif - -#if !defined(LZO_EOF_CODE) && !defined(TEST_IP) -# define TEST_IP (ip < ip_end) -#endif - -#if defined(TEST_IP) -# define HAVE_TEST_IP 1 -#else -# define TEST_IP 1 -#endif -#if defined(TEST_OP) -# define HAVE_TEST_OP 1 -#else -# define TEST_OP 1 -#endif - -#if defined(HAVE_TEST_IP) && defined(HAVE_TEST_OP) -# define TEST_IP_AND_TEST_OP (TEST_IP && TEST_OP) -#elif defined(HAVE_TEST_IP) -# define TEST_IP_AND_TEST_OP TEST_IP -#elif defined(HAVE_TEST_OP) -# define TEST_IP_AND_TEST_OP TEST_OP -#else -# define TEST_IP_AND_TEST_OP 1 -#endif - -#if defined(NEED_IP) -# define HAVE_NEED_IP 1 -#else -# define NEED_IP(x) ((void) 0) -# define TEST_IV(x) ((void) 0) -#endif -#if defined(NEED_OP) -# define HAVE_NEED_OP 1 -#else -# define NEED_OP(x) ((void) 0) -# define TEST_OV(x) ((void) 0) -#endif - -#if defined(HAVE_TEST_IP) || defined(HAVE_NEED_IP) -# define HAVE_ANY_IP 1 -#endif -#if defined(HAVE_TEST_OP) || defined(HAVE_NEED_OP) -# define HAVE_ANY_OP 1 -#endif - -#if defined(DO_DECOMPRESS) -LZO_PUBLIC(int) -DO_DECOMPRESS ( const lzo_bytep in , lzo_uint in_len, - lzo_bytep out, lzo_uintp out_len, - lzo_voidp wrkmem ) -#endif -{ - lzo_bytep op; - const lzo_bytep ip; - lzo_uint t; -#if defined(COPY_DICT) - lzo_uint m_off; - const lzo_bytep dict_end; -#else - const lzo_bytep m_pos; -#endif - - const lzo_bytep const ip_end = in + in_len; -#if defined(HAVE_ANY_OP) - lzo_bytep const op_end = out + *out_len; -#endif -#if defined(LZO1Z) - lzo_uint last_m_off = 0; -#endif - - LZO_UNUSED(wrkmem); - -#if defined(COPY_DICT) - if (dict) - { - if (dict_len > M4_MAX_OFFSET) - { - dict += dict_len - M4_MAX_OFFSET; - dict_len = M4_MAX_OFFSET; - } - dict_end = dict + dict_len; - } - else - { - dict_len = 0; - dict_end = NULL; - } -#endif - - *out_len = 0; - - op = out; - ip = in; - - NEED_IP(1); - if (*ip > 17) - { - t = *ip++ - 17; - if (t < 4) - goto match_next; - assert(t > 0); NEED_OP(t); NEED_IP(t+3); - do *op++ = *ip++; while (--t > 0); - goto first_literal_run; - } - - for (;;) - { - NEED_IP(3); - t = *ip++; - if (t >= 16) - goto match; - if (t == 0) - { - while (*ip == 0) - { - t += 255; - ip++; - TEST_IV(t); - NEED_IP(1); - } - t += 15 + *ip++; - } - assert(t > 0); NEED_OP(t+3); NEED_IP(t+6); -#if (LZO_OPT_UNALIGNED64) && (LZO_OPT_UNALIGNED32) - t += 3; - if (t >= 8) do - { - UA_COPY8(op,ip); - op += 8; ip += 8; t -= 8; - } while (t >= 8); - if (t >= 4) - { - UA_COPY4(op,ip); - op += 4; ip += 4; t -= 4; - } - if (t > 0) - { - *op++ = *ip++; - if (t > 1) { *op++ = *ip++; if (t > 2) { *op++ = *ip++; } } - } -#elif (LZO_OPT_UNALIGNED32) || (LZO_ALIGNED_OK_4) -#if !(LZO_OPT_UNALIGNED32) - if (PTR_ALIGNED2_4(op,ip)) - { -#endif - UA_COPY4(op,ip); - op += 4; ip += 4; - if (--t > 0) - { - if (t >= 4) - { - do { - UA_COPY4(op,ip); - op += 4; ip += 4; t -= 4; - } while (t >= 4); - if (t > 0) do *op++ = *ip++; while (--t > 0); - } - else - do *op++ = *ip++; while (--t > 0); - } -#if !(LZO_OPT_UNALIGNED32) - } - else -#endif -#endif -#if !(LZO_OPT_UNALIGNED32) - { - *op++ = *ip++; *op++ = *ip++; *op++ = *ip++; - do *op++ = *ip++; while (--t > 0); - } -#endif - -first_literal_run: - - t = *ip++; - if (t >= 16) - goto match; -#if defined(COPY_DICT) -#if defined(LZO1Z) - m_off = (1 + M2_MAX_OFFSET) + (t << 6) + (*ip++ >> 2); - last_m_off = m_off; -#else - m_off = (1 + M2_MAX_OFFSET) + (t >> 2) + (*ip++ << 2); -#endif - NEED_OP(3); - t = 3; COPY_DICT(t,m_off) -#else -#if defined(LZO1Z) - t = (1 + M2_MAX_OFFSET) + (t << 6) + (*ip++ >> 2); - m_pos = op - t; - last_m_off = t; -#else - m_pos = op - (1 + M2_MAX_OFFSET); - m_pos -= t >> 2; - m_pos -= *ip++ << 2; -#endif - TEST_LB(m_pos); NEED_OP(3); - *op++ = *m_pos++; *op++ = *m_pos++; *op++ = *m_pos; -#endif - goto match_done; - - for (;;) { -match: - if (t >= 64) - { -#if defined(COPY_DICT) -#if defined(LZO1X) - m_off = 1 + ((t >> 2) & 7) + (*ip++ << 3); - t = (t >> 5) - 1; -#elif defined(LZO1Y) - m_off = 1 + ((t >> 2) & 3) + (*ip++ << 2); - t = (t >> 4) - 3; -#elif defined(LZO1Z) - m_off = t & 0x1f; - if (m_off >= 0x1c) - m_off = last_m_off; - else - { - m_off = 1 + (m_off << 6) + (*ip++ >> 2); - last_m_off = m_off; - } - t = (t >> 5) - 1; -#endif -#else -#if defined(LZO1X) - m_pos = op - 1; - m_pos -= (t >> 2) & 7; - m_pos -= *ip++ << 3; - t = (t >> 5) - 1; -#elif defined(LZO1Y) - m_pos = op - 1; - m_pos -= (t >> 2) & 3; - m_pos -= *ip++ << 2; - t = (t >> 4) - 3; -#elif defined(LZO1Z) - { - lzo_uint off = t & 0x1f; - m_pos = op; - if (off >= 0x1c) - { - assert(last_m_off > 0); - m_pos -= last_m_off; - } - else - { - off = 1 + (off << 6) + (*ip++ >> 2); - m_pos -= off; - last_m_off = off; - } - } - t = (t >> 5) - 1; -#endif - TEST_LB(m_pos); assert(t > 0); NEED_OP(t+3-1); - goto copy_match; -#endif - } - else if (t >= 32) - { - t &= 31; - if (t == 0) - { - while (*ip == 0) - { - t += 255; - ip++; - TEST_OV(t); - NEED_IP(1); - } - t += 31 + *ip++; - NEED_IP(2); - } -#if defined(COPY_DICT) -#if defined(LZO1Z) - m_off = 1 + (ip[0] << 6) + (ip[1] >> 2); - last_m_off = m_off; -#else - m_off = 1 + (ip[0] >> 2) + (ip[1] << 6); -#endif -#else -#if defined(LZO1Z) - { - lzo_uint off = 1 + (ip[0] << 6) + (ip[1] >> 2); - m_pos = op - off; - last_m_off = off; - } -#elif (LZO_OPT_UNALIGNED16) && (LZO_ABI_LITTLE_ENDIAN) - m_pos = op - 1; - m_pos -= UA_GET_LE16(ip) >> 2; -#else - m_pos = op - 1; - m_pos -= (ip[0] >> 2) + (ip[1] << 6); -#endif -#endif - ip += 2; - } - else if (t >= 16) - { -#if defined(COPY_DICT) - m_off = (t & 8) << 11; -#else - m_pos = op; - m_pos -= (t & 8) << 11; -#endif - t &= 7; - if (t == 0) - { - while (*ip == 0) - { - t += 255; - ip++; - TEST_OV(t); - NEED_IP(1); - } - t += 7 + *ip++; - NEED_IP(2); - } -#if defined(COPY_DICT) -#if defined(LZO1Z) - m_off += (ip[0] << 6) + (ip[1] >> 2); -#else - m_off += (ip[0] >> 2) + (ip[1] << 6); -#endif - ip += 2; - if (m_off == 0) - goto eof_found; - m_off += 0x4000; -#if defined(LZO1Z) - last_m_off = m_off; -#endif -#else -#if defined(LZO1Z) - m_pos -= (ip[0] << 6) + (ip[1] >> 2); -#elif (LZO_OPT_UNALIGNED16) && (LZO_ABI_LITTLE_ENDIAN) - m_pos -= UA_GET_LE16(ip) >> 2; -#else - m_pos -= (ip[0] >> 2) + (ip[1] << 6); -#endif - ip += 2; - if (m_pos == op) - goto eof_found; - m_pos -= 0x4000; -#if defined(LZO1Z) - last_m_off = pd((const lzo_bytep)op, m_pos); -#endif -#endif - } - else - { -#if defined(COPY_DICT) -#if defined(LZO1Z) - m_off = 1 + (t << 6) + (*ip++ >> 2); - last_m_off = m_off; -#else - m_off = 1 + (t >> 2) + (*ip++ << 2); -#endif - NEED_OP(2); - t = 2; COPY_DICT(t,m_off) -#else -#if defined(LZO1Z) - t = 1 + (t << 6) + (*ip++ >> 2); - m_pos = op - t; - last_m_off = t; -#else - m_pos = op - 1; - m_pos -= t >> 2; - m_pos -= *ip++ << 2; -#endif - TEST_LB(m_pos); NEED_OP(2); - *op++ = *m_pos++; *op++ = *m_pos; -#endif - goto match_done; - } - -#if defined(COPY_DICT) - - NEED_OP(t+3-1); - t += 3-1; COPY_DICT(t,m_off) - -#else - - TEST_LB(m_pos); assert(t > 0); NEED_OP(t+3-1); -#if (LZO_OPT_UNALIGNED64) && (LZO_OPT_UNALIGNED32) - if (op - m_pos >= 8) - { - t += (3 - 1); - if (t >= 8) do - { - UA_COPY8(op,m_pos); - op += 8; m_pos += 8; t -= 8; - } while (t >= 8); - if (t >= 4) - { - UA_COPY4(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 (LZO_OPT_UNALIGNED32) || (LZO_ALIGNED_OK_4) -#if !(LZO_OPT_UNALIGNED32) - if (t >= 2 * 4 - (3 - 1) && PTR_ALIGNED2_4(op,m_pos)) - { - assert((op - m_pos) >= 4); -#else - if (t >= 2 * 4 - (3 - 1) && (op - m_pos) >= 4) - { -#endif - UA_COPY4(op,m_pos); - op += 4; m_pos += 4; t -= 4 - (3 - 1); - do { - UA_COPY4(op,m_pos); - op += 4; m_pos += 4; t -= 4; - } while (t >= 4); - if (t > 0) do *op++ = *m_pos++; while (--t > 0); - } - else -#endif - { -copy_match: - *op++ = *m_pos++; *op++ = *m_pos++; - do *op++ = *m_pos++; while (--t > 0); - } - -#endif - -match_done: -#if defined(LZO1Z) - t = ip[-1] & 3; -#else - t = ip[-2] & 3; -#endif - if (t == 0) - break; - -match_next: - assert(t > 0); assert(t < 4); NEED_OP(t); NEED_IP(t+3); -#if 0 - do *op++ = *ip++; while (--t > 0); -#else - *op++ = *ip++; - if (t > 1) { *op++ = *ip++; if (t > 2) { *op++ = *ip++; } } -#endif - t = *ip++; - } - } - -eof_found: - *out_len = pd(op, out); - return (ip == ip_end ? LZO_E_OK : - (ip < ip_end ? LZO_E_INPUT_NOT_CONSUMED : LZO_E_INPUT_OVERRUN)); - -#if defined(HAVE_NEED_IP) -input_overrun: - *out_len = pd(op, out); - return LZO_E_INPUT_OVERRUN; -#endif - -#if defined(HAVE_NEED_OP) -output_overrun: - *out_len = pd(op, out); - return LZO_E_OUTPUT_OVERRUN; -#endif - -#if defined(LZO_TEST_OVERRUN_LOOKBEHIND) -lookbehind_overrun: - *out_len = pd(op, out); - return LZO_E_LOOKBEHIND_OVERRUN; -#endif -} - -#endif - -/***** End of minilzo.c *****/ diff --git a/contrib/libs/minilzo/minilzo.h b/contrib/libs/minilzo/minilzo.h deleted file mode 100644 index 9fc11304b2..0000000000 --- a/contrib/libs/minilzo/minilzo.h +++ /dev/null @@ -1,109 +0,0 @@ -/* minilzo.h -- mini subset of the LZO real-time data compression library - - This file is part of the LZO real-time data compression library. - - Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer - All Rights Reserved. - - The LZO library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of - the License, or (at your option) any later version. - - The LZO library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - 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 the LZO library; see the file COPYING. - If not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - Markus F.X.J. Oberhumer - <markus@oberhumer.com> - http://www.oberhumer.com/opensource/lzo/ - */ - -/* - * NOTE: - * the full LZO package can be found at - * http://www.oberhumer.com/opensource/lzo/ - */ - - -#ifndef __MINILZO_H_INCLUDED -#define __MINILZO_H_INCLUDED 1 - -/* This is Arcadia-specific header used for symbol mangling. */ -#include "protect.h" - -#define MINILZO_VERSION 0x2090 - -#if defined(__LZOCONF_H_INCLUDED) -# error "you cannot use both LZO and miniLZO" -#endif - -/* internal Autoconf configuration file - only used when building miniLZO */ -#ifdef MINILZO_HAVE_CONFIG_H -#error # include <config.h> -#endif -#include <limits.h> -#include <stddef.h> - -#ifndef __LZODEFS_H_INCLUDED -#include "lzodefs.h" -#endif -#undef LZO_HAVE_CONFIG_H -#include "lzoconf.h" - -#if !defined(LZO_VERSION) || (LZO_VERSION != MINILZO_VERSION) -# error "version mismatch in header files" -#endif - - -#ifdef __cplusplus -extern "C" { -#endif - - -/*********************************************************************** -// -************************************************************************/ - -/* Memory required for the wrkmem parameter. - * When the required size is 0, you can also pass a NULL pointer. - */ - -#define LZO1X_MEM_COMPRESS LZO1X_1_MEM_COMPRESS -#define LZO1X_1_MEM_COMPRESS ((lzo_uint32_t) (16384L * lzo_sizeof_dict_t)) -#define LZO1X_MEM_DECOMPRESS (0) - - -/* compression */ -LZO_EXTERN(int) -lzo1x_1_compress ( const lzo_bytep src, lzo_uint src_len, - lzo_bytep dst, lzo_uintp dst_len, - lzo_voidp wrkmem ); - -/* decompression */ -LZO_EXTERN(int) -lzo1x_decompress ( const lzo_bytep src, lzo_uint src_len, - lzo_bytep dst, lzo_uintp dst_len, - lzo_voidp wrkmem /* NOT USED */ ); - -/* safe decompression with overrun testing */ -LZO_EXTERN(int) -lzo1x_decompress_safe ( const lzo_bytep src, lzo_uint src_len, - lzo_bytep dst, lzo_uintp dst_len, - lzo_voidp wrkmem /* NOT USED */ ); - - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* already included */ - - -/* vim:set ts=4 sw=4 et: */ diff --git a/contrib/libs/minilzo/protect.h b/contrib/libs/minilzo/protect.h deleted file mode 100644 index 9eeae941aa..0000000000 --- a/contrib/libs/minilzo/protect.h +++ /dev/null @@ -1,18 +0,0 @@ -#pragma once - -#define __lzo_align_gap _minilzo___lzo_align_gap -#define __lzo_init_v2 _minilzo___lzo_init_v2 -#define __lzo_ptr_linear _minilzo___lzo_ptr_linear -#define _lzo_config_check _minilzo__lzo_config_check -#define _lzo_version_date _minilzo__lzo_version_date -#define _lzo_version_string _minilzo__lzo_version_string -#define lzo1x_1_compress _minilzo_lzo1x_1_compress -#define lzo1x_decompress _minilzo_lzo1x_decompress -#define lzo1x_decompress_safe _minilzo_lzo1x_decompress_safe -#define lzo_adler32 _minilzo_lzo_adler32 -#define lzo_copyright _minilzo_lzo_copyright -#define lzo_crc32 _minilzo_lzo_crc32 -#define lzo_get_crc32_table _minilzo_lzo_get_crc32_table -#define lzo_version _minilzo_lzo_version -#define lzo_version_date _minilzo_lzo_version_date -#define lzo_version_string _minilzo_lzo_version_string diff --git a/contrib/libs/minilzo/ya.make b/contrib/libs/minilzo/ya.make deleted file mode 100644 index 043c9a63e4..0000000000 --- a/contrib/libs/minilzo/ya.make +++ /dev/null @@ -1,24 +0,0 @@ -LIBRARY() - -LICENSE(GPL-2.0-or-later) - -LICENSE_TEXTS(.yandex_meta/licenses.list.txt) - -VERSION(2.09) - -CFLAGS(-DMINILZO_CFG_SKIP_LZO_STRING) - -NO_UTIL() - -NO_COMPILER_WARNINGS() - -IF (SANITIZER_TYPE == "undefined") - NO_SANITIZE() -ENDIF() - -SRCS( - minilzo.c - lzo_crc.c -) - -END() diff --git a/contrib/libs/quicklz/1.31/quicklz.c b/contrib/libs/quicklz/1.31/quicklz.c deleted file mode 100644 index 1a43cd4117..0000000000 --- a/contrib/libs/quicklz/1.31/quicklz.c +++ /dev/null @@ -1,977 +0,0 @@ -// QuickLZ data compression library -// Copyright (C) 2006-2007 Lasse Mikkel Reinhold -// lar@quicklz.com -// -// QuickLZ can be used for free under the GPL-1 or GPL-2 license (where anything -// released into public must be open source) or under a commercial license if such -// has been acquired (see http://www.quicklz.com/order.html). The commercial license -// does not cover derived or ported versions created by third parties under GPL. -#include <string.h> - -#include "yquicklz.h" - -// Version 1.31 final -#define QLZ_VERSION_MAJOR 1 -#define QLZ_VERSION_MINOR 3 -#define QLZ_VERSION_REVISION 1 - -#define test_rle -#define speedup_incompressible -//#define memory_safe -#ifndef _WIN32 -# define __inline static inline -#endif - -#if (defined(__GNUC__) && (__GNUC__ > 2)) -# define EXPECT_FALSE(Cond) __builtin_expect(!!(Cond), 0) -#else -# define EXPECT_FALSE(Cond) (Cond) -#endif - - -// Public functions of QuickLZ -size_t qlz_decompress(const char *source, void *destination, char *scratch); -size_t qlz_compress(const void *source, char *destination, size_t size, char *scratch); -size_t qlz_size_decompressed(const char *source); -size_t qlz_size_compressed(const char *source); -int qlz_get_setting(int setting); - -#if (defined(__X86__) || defined(__i386__) || defined(i386) || defined(_M_IX86) || defined(__386__) || defined(__x86_64__) || defined(_M_X64)) - #define X86X64 -#endif - -// Compute SCRATCH_COMPRESS, SCRATCH_DECOMPRESS and constants used internally -#if COMPRESSION_LEVEL == 0 && defined(memory_safe) - #error memory_safe flag cannot be used with COMPRESSION_LEVEL 0 -#endif - -#define HASH_ENTRIES 4096 - -#if (COMPRESSION_LEVEL == 0 || COMPRESSION_LEVEL == 1 || COMPRESSION_LEVEL == 2) - #define AND 1 -#elif (COMPRESSION_LEVEL == 3) - #define AND 0x7 -#else - #error COMPRESSION_LEVEL must be 0, 1, 2 or 3 -#endif - -#define HASH_SIZE (AND + 1)*HASH_ENTRIES*sizeof(unsigned char *) - -#ifdef STREAMING_MODE - #define STREAMING_MODE_VALUE STREAMING_MODE -#else - #define STREAMING_MODE_VALUE 0 -#endif - -#define STREAMING_MODE_ROUNDED ((STREAMING_MODE_VALUE >> 3) << 3) - -#if (COMPRESSION_LEVEL > 1) - #define SCRATCH_COMPRESS HASH_SIZE + STREAMING_MODE_VALUE + 16 + HASH_ENTRIES -#else - #define SCRATCH_COMPRESS HASH_SIZE + STREAMING_MODE_VALUE + 16 -#endif - -#if (COMPRESSION_LEVEL == 0) - #define SCRATCH_DECOMPRESS HASH_ENTRIES*sizeof(unsigned char *) + 16 + STREAMING_MODE_VALUE -#else - #define SCRATCH_DECOMPRESS 16 + STREAMING_MODE_VALUE -#endif - -int qlz_get_setting(int setting) -{ - switch (setting) - { - case 0: return COMPRESSION_LEVEL; - case 1: return SCRATCH_COMPRESS; - case 2: return SCRATCH_DECOMPRESS; - case 3: return STREAMING_MODE_VALUE; -#ifdef test_rle - case 4: return 1; -#else - case 4: return 0; -#endif -#ifdef speedup_incompressible - case 5: return 1; -#else - case 5: return 0; -#endif -#ifdef memory_safe - case 6: return 1; -#else - case 6: return 0; -#endif - case 7: return QLZ_VERSION_MAJOR; - case 8: return QLZ_VERSION_MINOR; - case 9: return QLZ_VERSION_REVISION; - } - return -1; -} - -__inline unsigned int hash_func(unsigned int i) -{ - return ((i >> 12) ^ i) & 0x0fff; -} - -__inline unsigned int fast_read(void const *src, unsigned int bytes) -{ -#ifndef X86X64 - unsigned char *p = (unsigned char*)src; - switch (bytes) - { - case 4: - return(*p | *(p + 1) << 8 | *(p + 2) << 16 | *(p + 3) << 24); - case 3: - return(*p | *(p + 1) << 8 | *(p + 2) << 16); - case 2: - return(*p | *(p + 1) << 8); - case 1: - return(*p); - } - return 0; -#else - if (bytes >= 1 && bytes <= 4) - return *((unsigned int*)src); - else - return 0; -#endif -} - -__inline void fast_write(unsigned int f, void *dst, unsigned int bytes) -{ -#ifndef X86X64 - unsigned char *p = (unsigned char*)dst; - - switch (bytes) - { - case 4: - *p = (unsigned char)f; - *(p + 1) = (unsigned char)(f >> 8); - *(p + 2) = (unsigned char)(f >> 16); - *(p + 3) = (unsigned char)(f >> 24); - return; - case 3: - *p = (unsigned char)f; - *(p + 1) = (unsigned char)(f >> 8); - *(p + 2) = (unsigned char)(f >> 16); - return; - case 2: - *p = (unsigned char)f; - *(p + 1) = (unsigned char)(f >> 8); - return; - case 1: - *p = (unsigned char)f; - return; - } -#else - switch (bytes) - { - case 4: - *((unsigned int*)dst) = f; - return; - case 3: - *((unsigned int*)dst) = f; - return; - case 2: -#if COMPRESSION_LEVEL == 0 -// 2 byte writes are common in level 0 - *((unsigned short int*)dst) = (unsigned short int)f; -#else - *((unsigned int*)dst) = f; -#endif - return; - case 1: - *((unsigned char*)dst) = (unsigned char)f; - return; - } -#endif -} - -__inline void memcpy_up(unsigned char *dst, const unsigned char *src, unsigned int n) -{ - // cannot be replaced by overlap handling of memmove() due to LZSS algorithm -#ifndef X86X64 - - if(n > 8 && src + n < dst) - memcpy(dst, src, n); - else - { - unsigned char *end = dst + n; - while(dst < end) - { - *dst = *src; - dst++; - src++; - } - } -#else - if (n < 5) - *((unsigned int*)dst) = *((unsigned int*)src); - else - { - unsigned char *end = dst + n; - while(dst < end) - { - *((unsigned int*)dst) = *((unsigned int*)src); - dst = dst + 4; - src = src + 4; - } - } -#endif -} - -__inline unsigned int fast_read_safe(void const *src, unsigned int bytes, const unsigned char *invalid) -{ -#ifdef memory_safe - if ((const unsigned char *)src + 4 > (const unsigned char *)invalid) - return 0xffffffff; -#endif - invalid = invalid; - return fast_read(src, bytes); -} - -__inline unsigned int qlz_compress_core(const void *source, unsigned char *destination, unsigned int size, const unsigned char *hashtable[][AND + 1], const unsigned char *first_valid, unsigned char *hash_counter) -{ - const unsigned char *source_c = (const unsigned char*)source; - unsigned char *destination_c = (unsigned char*)destination; - const unsigned char *last_byte = source_c + size - 1; - const unsigned char *src = source_c; - unsigned char *cword_ptr = destination_c; - unsigned char *dst = destination_c + 4; - unsigned int cword_val = 1U << 31; - const unsigned char *guarantee_uncompressed = last_byte - 8; - -#ifdef speedup_incompressible - unsigned char *prev_dst = dst; - const unsigned char *prev_src = src; -#endif - - hash_counter = hash_counter; - first_valid = first_valid; - - // save first 4 bytes uncompressed - while(src < source_c + 4 && src < guarantee_uncompressed) - { - cword_val = (cword_val >> 1); - *dst = *src; - dst++; - src++; - } - - while(src < guarantee_uncompressed) - { - unsigned int fetch; - if ((cword_val & 1) == 1) - { - // check if destinationc pointer could exceed destination buffer - if (dst > destination_c + size) - return 0; - - // store control word - fast_write((cword_val >> 1) | (1U << 31), cword_ptr, 4); - cword_ptr = dst; - dst += 4; - cword_val = 1U << 31; - -#ifdef speedup_incompressible - // check if source chunk is compressible - if (dst - prev_dst > src - prev_src && src > source_c + 1000) - { - int q; - for(q = 0; q < 30 && src + 31 < guarantee_uncompressed && dst + 35 < destination_c + size; q++) - { - -#if(COMPRESSION_LEVEL == 0) - int w; - for(w = 0; w < 31; w++) - { - fetch = fast_read(src + w, 4); - *(unsigned int*)&hashtable[hash_func(fetch)][0] = fast_read(src + w, 4); - hashtable[hash_func(fetch)][1] = src + w; - } -#endif - fast_write((1U << 31), dst - 4, 4); - memcpy(dst, src, 31); - - dst += 4*8 - 1 + 4; - src += 4*8 - 1; - prev_src = src; - prev_dst = dst; - cword_ptr = dst - 4; - } - } -#endif - } -#ifdef test_rle - // check for rle sequence - if (fast_read(src, 4) == fast_read(src + 1, 4)) - { - const unsigned char *orig_src; - fetch = fast_read(src, 4); - orig_src = src; - do src = src + 4; while (src <= guarantee_uncompressed - 4 && fetch == fast_read(src, 4)); - if((src - orig_src) <= 2047) - { - fast_write(((fetch & 0xff) << 16) | (unsigned int)((src - orig_src) << 4) | 15, dst, 4); - dst = dst + 3; - } - else - { - fast_write(((fetch & 0xff) << 16) | 15, dst, 4); - fast_write((unsigned int)(src - orig_src), dst + 3, 4); - dst = dst + 7; - } - cword_val = (cword_val >> 1) | (1 << 31); - } - else -#endif - { - const unsigned char *o; - unsigned int hash, matchlen; - -#if(COMPRESSION_LEVEL < 2) - unsigned int cached; - - fetch = fast_read(src, 4); - hash = hash_func(fetch); - - cached = fetch ^ *(unsigned int*)&hashtable[hash][0]; - *(unsigned int*)&hashtable[hash][0] = fetch; - - o = hashtable[hash][1]; - hashtable[hash][1] = src; - -#else - unsigned char c; - unsigned int k, m; - const unsigned char *offset2 = 0; - - fetch = fast_read(src, 4); - hash = hash_func(fetch); - - matchlen = 0; - c = hash_counter[hash]; - for(k = 0; k < AND + 1; k++) - { - o = hashtable[hash][(c - k) & AND]; - if(o > first_valid && o < src - 3 && *(src + matchlen) == *(o + matchlen) && (fast_read(o, 3) & 0xffffff) == (fetch & 0xffffff) && src - o < 131071) - { - size_t remaining; - remaining = guarantee_uncompressed - src; - m = 3; - if (fast_read(o, 4) == fetch) - { - while(*(o + m) == *(src + m) && m < remaining) - m++; - } - if (m > matchlen) - { - matchlen = m; - offset2 = o; - } - } - } - o = offset2; - c = (hash_counter[hash] + 1) & AND; - hash_counter[hash] = c; - hashtable[hash][c] = src; -#endif - -#if(COMPRESSION_LEVEL == 0) - if (o != 0 && (cached & 0xffffff) == 0 && src - o > 3) -#elif(COMPRESSION_LEVEL == 1) - if ((cached & 0xffffff) == 0 && o > first_valid && o < src - 3 && ((fast_read(o, 3) ^ fast_read(src, 3)) & 0xffffff) == 0 && src - o < 131071) -#elif(COMPRESSION_LEVEL > 1) - if(matchlen == 3) -#endif - { - unsigned int offset; - offset = (unsigned int)(src - o); - -#if(COMPRESSION_LEVEL < 2) - if (cached & 0xffffffff) -#endif - { -#if (COMPRESSION_LEVEL > 2) - unsigned int u; - for(u = 1; u < 3; u++) - { - hash = hash_func(fast_read(src + u, 4)); - c = (hash_counter[hash] + 1) & AND; - hash_counter[hash] = c; - hashtable[hash][c] = src + u; - } -#endif - -#if (COMPRESSION_LEVEL == 0) - cword_val = (cword_val >> 1) | (1U << 31); - fast_write(3 | (hash << 4), dst, 2); - src += 3; - dst += 2; -#else - - if(offset <= 63) - { - // encode lz match - *dst = (unsigned char)(offset << 2); - cword_val = (cword_val >> 1) | (1U << 31); - src += 3; - dst++; - } - else if (offset <= 16383) - { - // encode lz match - unsigned int f = (offset << 2) | 1; - fast_write(f, dst, 2); - cword_val = (cword_val >> 1) | (1U << 31); - src += 3; - dst += 2; - } - else - { - // encode literal - *dst = *src; - src++; - dst++; - cword_val = (cword_val >> 1); - } -#endif - } -#if(COMPRESSION_LEVEL > 1) - } - else if(matchlen > 3) - { -#elif(COMPRESSION_LEVEL < 2) - else -#endif - { - // encode lz match - unsigned int offset; - -#if(COMPRESSION_LEVEL < 2) - const unsigned char *old_src = src; - offset = (unsigned int)(src - o); - cword_val = (cword_val >> 1) | (1U << 31); - - src += 3; - while(*(o + (src - old_src)) == *src && src < guarantee_uncompressed) - src++; - matchlen = (unsigned int)(src - old_src); -#else - unsigned int u; - offset = (unsigned int)(src - o); - cword_val = (cword_val >> 1) | (1U << 31); - -#if (COMPRESSION_LEVEL > 2) - for(u = 1; u < matchlen; u++) -#else - for(u = 1; u < matchlen && u < 5; u++) -#endif - { - hash = hash_func(fast_read(src + u, 4)); - c = (hash_counter[hash] + 1) & AND; - hash_counter[hash] = c; - hashtable[hash][c] = src + u; - } - src += matchlen; -#endif - -#if (COMPRESSION_LEVEL == 0) - if (matchlen < 15) - { - fast_write(matchlen | (hash << 4), dst, 2); - dst += 2; - } - else if (matchlen < 255) - { - fast_write(hash << 4, dst, 2); - *(dst + 2) = (unsigned char)matchlen; - dst += 3; - } - else - { - fast_write(hash << 4, dst, 2); - *(dst + 2) = 0; - fast_write(matchlen, dst + 3, 4); - dst += 7; - } -#else - if (matchlen <= 18 && offset <= 1023) - { - unsigned int f = ((matchlen - 3) << 2) | (offset << 6) | 2; - fast_write(f, dst, 2); - dst += 2; - } - - else if(matchlen <= 34 && offset <= 65535) - { - unsigned int f = ((matchlen - 3) << 3) | (offset << 8) | 3; - fast_write(f, dst, 3); - dst += 3; - } - else if (matchlen >= 3) - { - if (matchlen <= 2050) - { - unsigned int f = ((matchlen - 3) << 4) | (offset << 15) | 7; - fast_write(f, dst, 4); - dst += 4; - } - else - { - fast_write(7, dst, 4); - fast_write(matchlen, dst + 4, 4); - fast_write(offset, dst + 8, 4); - dst += 12; - } - } -#endif - } - } - - else - { - // encode literal - *dst = *src; - src++; - dst++; - cword_val = (cword_val >> 1); - } - } - } - -// save last source bytes as literals - while (src <= last_byte) - { - if ((cword_val & 1) == 1) - { - fast_write((cword_val >> 1) | (1U << 31), cword_ptr, 4); - cword_ptr = dst; - dst += 4; - cword_val = 1U << 31; - } - - if (src < last_byte - 2 && src > source_c + 3) - { - hashtable[hash_func(fast_read(src, 4))][1] = src; - *(unsigned int*)&hashtable[hash_func(fast_read(src, 4))][0] = fast_read(src, 4); - } - *dst = *src; - src++; - dst++; - - cword_val = (cword_val >> 1); - } - - while((cword_val & 1) != 1) - cword_val = (cword_val >> 1); - - fast_write((cword_val >> 1) | (1U << 31), cword_ptr, 4); - - // min. size must be 9 bytes so that the qlz_size functions can take 9 bytes as argument - if (dst - destination_c < 9) - return 9; - else - return (unsigned int)(dst - destination_c); -} - -#if !defined(DECOMPRESSION_ERROR_H) -#define DECOMPRESSION_ERROR_H -// We can't use 0 as error return code, because at 815 line it is used as a success code. -static const size_t DECOMPRESSION_ERROR = (size_t)(-1); -#endif - -__inline size_t qlz_decompress_core(const unsigned char *source, void *destination, size_t size, size_t source_size, unsigned char *first_valid, const unsigned char *hashtable[]) -{ - const unsigned char *source_c = (const unsigned char*)source; - unsigned char *destination_c = (unsigned char*)destination; - const unsigned char *src = source_c; - unsigned char *dst = destination_c; - const unsigned char* last_byte_successor = destination_c + size; - unsigned int cword_val = 1; - const unsigned int bitlut[16] = {4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0}; - const unsigned char *guaranteed_uncompressed = last_byte_successor - 4; - unsigned char *last_hashed = destination_c + 3; - - first_valid = first_valid; - last_hashed = last_hashed; - hashtable = hashtable; - - // prevent spurious memory read on a source with size < 4 - if (dst >= guaranteed_uncompressed) - { - src += 4; - while(dst < last_byte_successor) - { - *dst = *src; - dst++; - src++; - } - - return (unsigned int)(dst - destination_c); - } - - - for(;;) - { - unsigned int fetch; - - if (cword_val == 1) - { - // fetch control word - cword_val = fast_read_safe(src, 4, source_c + source_size) | (1U << 31); - src += 4; - } - - fetch = fast_read_safe(src, 4, source_c + source_size); - - // check if we must decode lz match - if ((cword_val & 1) == 1) - { - unsigned int matchlen; - -#if(COMPRESSION_LEVEL == 0) - unsigned int hash; - const unsigned char *offset2; - - cword_val = cword_val >> 1; - - if((fetch & 0xf) != 15) - { - hash = (fetch >> 4) & 0xfff; - offset2 = hashtable[hash]; - - if((fetch & 0xf) != 0) - { - matchlen = (fetch & 0xf); - src += 2; - } - else if((fetch & 0x00ff0000) != 0) - { - matchlen = *(src + 2); - src += 3; - } - else - { - matchlen = fast_read(src + 3, 4); - src += 7; - } - - // This check prevents segfault for some cases with invalid data. - // not sure about guaranteed_decompressed so assuming at most size bytes (decompressed size) - if (EXPECT_FALSE(dst + matchlen > destination_c + size || offset2 == NULL)) { - return DECOMPRESSION_ERROR; - } - - memcpy_up(dst, offset2, matchlen); - while(last_hashed < dst) - { - last_hashed++; - hashtable[hash_func(fast_read(last_hashed, 4))] = last_hashed; - } - dst += matchlen; - last_hashed = dst - 1; - } - -#else - unsigned int offset; - cword_val = cword_val >> 1; - - if ((fetch & 3) == 0) - { - offset = (fetch & 0xff) >> 2; -#ifdef memory_safe - if (3 > (unsigned int)(guaranteed_uncompressed - dst) || offset > (unsigned int)(dst - first_valid)) - return 0; -#endif - memcpy_up(dst, dst - offset, 3); - dst += 3; - src++; - } - else if ((fetch & 2) == 0) - { - offset = (fetch & 0xffff) >> 2; -#ifdef memory_safe - if (3 > (unsigned int)(guaranteed_uncompressed - dst) || offset > (unsigned int)(dst - first_valid)) - return 0; -#endif - memcpy_up(dst, dst - offset, 3); - dst += 3; - src += 2; - } - else if ((fetch & 1) == 0) - { - offset = (fetch & 0xffff) >> 6; - matchlen = ((fetch >> 2) & 15) + 3; -#ifdef memory_safe - if (matchlen > (unsigned int)(guaranteed_uncompressed - dst) || offset > (unsigned int)(dst - first_valid)) - return 0; -#endif - memcpy_up(dst, dst - offset, matchlen); - src += 2; - dst += matchlen; - } - else if ((fetch & 4) == 0) - { - offset = (fetch & 0xffffff) >> 8; - matchlen = ((fetch >> 3) & 31) + 3; -#ifdef memory_safe - if (matchlen > (unsigned int)(guaranteed_uncompressed - dst) || offset > (unsigned int)(dst - first_valid)) - return 0; -#endif - memcpy_up(dst, dst - offset, matchlen); - src += 3; - dst += matchlen; - } - else if ((fetch & 8) == 0) - { - offset = (fetch >> 15); - if (offset != 0) - { - matchlen = ((fetch >> 4) & 2047) + 3; - src += 4; - } - else - { - matchlen = fast_read_safe(src + 4, 4, source_c + source_size); - offset = fast_read_safe(src + 8, 4, source_c + source_size); - src += 12; - } -#ifdef memory_safe - if (matchlen > (unsigned int)(guaranteed_uncompressed - dst) || offset > (unsigned int)(dst - first_valid)) - return 0; -#endif - memcpy_up(dst, dst - offset, matchlen); - dst += matchlen; - } -#endif - else - { - // decode rle sequence - unsigned char rle_char; - rle_char = (unsigned char)(fetch >> 16); - matchlen = ((fetch >> 4) & 0xfff); - - if(matchlen != 0) - src += 3; - else - { - matchlen = fast_read_safe(src + 3, 4, source_c + source_size); - src += 7; - } - -#ifdef memory_safe - if(matchlen > (unsigned int)(guaranteed_uncompressed - dst)) - return 0; -#endif - memset(dst, rle_char, matchlen); - -#if(COMPRESSION_LEVEL == 0) - while(last_hashed < dst - 1) - { - last_hashed++; - hashtable[hash_func(fast_read(last_hashed, 4))] = last_hashed; - } - last_hashed = dst - 1 + matchlen; -#endif - dst += matchlen; - } - } - else - { - // decode literal -#ifdef memory_safe - if (4 > destination_c + size - dst || src > source_c + source_size + 4) - return 0; -#endif - memcpy_up(dst, src, 4); - - dst += bitlut[cword_val & 0xf]; - src += bitlut[cword_val & 0xf]; - cword_val = cword_val >> (bitlut[cword_val & 0xf]); - -#if(COMPRESSION_LEVEL == 0) - while(last_hashed < dst - 3) - { - last_hashed++; - hashtable[hash_func(fast_read(last_hashed, 4))] = last_hashed; - } -#endif - if (dst >= guaranteed_uncompressed) - { - // decode last literals and exit - while(dst < last_byte_successor) - { - if (cword_val == 1) - { - src += 4; - cword_val = 1U << 31; - } - if (1 > destination_c + size - dst) - return 0; - - *dst = *src; - dst++; - src++; - cword_val = cword_val >> 1; - } - -#if(COMPRESSION_LEVEL == 0) - while(last_hashed < last_byte_successor - 4) - { - last_hashed++; - hashtable[hash_func(fast_read(last_hashed, 4))] = last_hashed; - } -#endif - if((src - 1) - source_c > 8) // 8 bytes comp. size excessive len is ok - return 0; - else if(dst - destination_c - size == 0) - return size; - else - return 0; - } - } - } -} - -size_t qlz_size_decompressed(const char *source) -{ - unsigned int n, r; - n = (((*source) & 2) == 2) ? 4 : 1; - r = fast_read(source + 1 + n, n); - r = r & (0xffffffff >> ((4 - n)*8)); - return r; -} - -size_t qlz_size_compressed(const char *source) -{ - unsigned int n, r; - n = (((*source) & 2) == 2) ? 4 : 1; - r = fast_read(source + 1, n); - r = r & (0xffffffff >> ((4 - n)*8)); - return r; -} - -size_t qlz_compress(const void *source, char *destination, size_t size, char *scratch) -{ - // 1-8 bytes for aligning (not 0-7!); 8 bytes for buffersize (padds on 32 bit cpu); HASH_SIZE hash table; STREAMING_MODE_ROUNDED bytes streambuffer; optional HASH_ENTRIES byte hash counter - unsigned char *buffer_aligned = (unsigned char *)scratch + 8 - (((size_t)scratch) % 8); - const unsigned char *(*hashtable)[AND + 1] = (const unsigned char *(*)[AND + 1])(buffer_aligned + 8); - size_t *buffersize = (size_t *)buffer_aligned; - unsigned char *streambuffer = buffer_aligned + 8 + HASH_SIZE; - unsigned int r; - unsigned int compressed, base; - unsigned char *hash_counter = streambuffer + STREAMING_MODE_ROUNDED; - - if(size == 0 || size > 0xffffffff) - return 0; - -#if (COMPRESSION_LEVEL == 0 && STREAMING_MODE_ROUNDED == 0) - memset((void *)hashtable, 0, HASH_SIZE); -#endif - - if(size < 216) - base = 3; - else - base = 9; - -// if not STREAMING_MODE, then STREAMING_MODE_ROUNDED == 0 and first case (streaming buffer full) is executed unconditionally, functioning as block comp. - if (*buffersize + size - 1 >= STREAMING_MODE_ROUNDED) - { -#if (COMPRESSION_LEVEL == 0 && STREAMING_MODE_ROUNDED != 0) - memset((void *)hashtable, 0, HASH_SIZE); -#endif - - r = base + qlz_compress_core(source, (unsigned char*)destination + base, (unsigned int)size, hashtable, (const unsigned char*)source, hash_counter); -#if (COMPRESSION_LEVEL == 0 && STREAMING_MODE_ROUNDED != 0) - memset((void *)hashtable, 0, HASH_SIZE); -#endif - - if(r == base) - { - memcpy(destination + base, source, size); - r = (unsigned int)size + base; - compressed = 0; - } - else - compressed = 1; - *buffersize = 0; - } - else - { - memcpy(streambuffer + *buffersize, source, size); - r = base + qlz_compress_core(streambuffer + *buffersize, (unsigned char*)destination + base, (unsigned int)size, hashtable, streambuffer, hash_counter); - - if(r == base) - { - memcpy(destination + base, streambuffer + *buffersize, size); - r = (unsigned int)size + base; - compressed = 0; - - memset((void*)hashtable, 0, HASH_SIZE); - } - else - compressed = 1; - *buffersize += size; - } - - if(base == 3) - { - *destination = (unsigned char)(0 | compressed); - *(destination + 1) = (unsigned char)r; - *(destination + 2) = (unsigned char)size; - } - else - { - *destination = (unsigned char)(2 | compressed); - fast_write(r, destination + 1, 4); - fast_write((unsigned int)size, destination + 5, 4); - } - -#if (COMPRESSION_LEVEL == 0) - *destination = (*destination) | 4; -#endif - - return (size_t)r; -} - - -// returns DECOMPRESSION_ERROR in case of an error, or decompressed size on success -size_t qlz_decompress(const char *source, void *destination, char *scratch) -{ - // 1-8 bytes for aligning (not 0-7!); 8 bytes for buffersize (padds on 32bit cpu); STREAMING_MODE_ROUNDED streambuffer; HASH_SIZE hash table - unsigned char *buffer_aligned = (unsigned char *)scratch + 8 - (((size_t)scratch) % 8); - size_t *buffersize = (size_t *)buffer_aligned; - unsigned int headerlen = 2*((((*source) & 2) == 2) ? 4 : 1) + 1; // get header len - - unsigned char *streambuffer = buffer_aligned + 8; - const unsigned char **hashtable = (const unsigned char **)(streambuffer + STREAMING_MODE_ROUNDED); - - size_t dsiz = qlz_size_decompressed((char *)source); - size_t csiz = qlz_size_compressed((char *)source); - if (*buffersize + qlz_size_decompressed((char *)source) - 1 >= STREAMING_MODE_ROUNDED) - { - if((*source & 1) == 1) { - if (qlz_decompress_core((const unsigned char *)source + headerlen, destination, dsiz, csiz, (unsigned char*)destination, hashtable) == DECOMPRESSION_ERROR) { - return DECOMPRESSION_ERROR; - } - } else { - memcpy(destination, source + headerlen, dsiz); - } - *buffersize = 0; - } - else - { - if((*source & 1) == 1) { - if (qlz_decompress_core((const unsigned char *)source + headerlen, streambuffer + *buffersize, dsiz, csiz, streambuffer, hashtable) == DECOMPRESSION_ERROR) { - return DECOMPRESSION_ERROR; - } - } else { - memcpy(streambuffer + *buffersize, source + headerlen, dsiz); - } - memcpy(destination, streambuffer + *buffersize, dsiz); - *buffersize += dsiz; - } - return dsiz; -} - -#undef __inline diff --git a/contrib/libs/quicklz/1.31/yquicklz.h b/contrib/libs/quicklz/1.31/yquicklz.h deleted file mode 100644 index 2dc6c734b2..0000000000 --- a/contrib/libs/quicklz/1.31/yquicklz.h +++ /dev/null @@ -1,15 +0,0 @@ -#include <sys/types.h> - -#if defined(__cplusplus) -extern "C" { -#endif - -size_t qlz_decompress(const char *source, void *destination, char *scratch); -size_t qlz_compress(const void *source, char *destination, size_t size, char *scratch); -size_t qlz_size_decompressed(const char *source); -size_t qlz_size_compressed(const char *source); -int qlz_get_setting(int setting); - -#if defined(__cplusplus) -} -#endif diff --git a/contrib/libs/quicklz/1.40/quicklz.c b/contrib/libs/quicklz/1.40/quicklz.c deleted file mode 100644 index 1bfe8d0047..0000000000 --- a/contrib/libs/quicklz/1.40/quicklz.c +++ /dev/null @@ -1,829 +0,0 @@ -// QuickLZ data compression library -// Copyright (C) 2006-2007 Lasse Mikkel Reinhold -// lar@quicklz.com -// -// QuickLZ can be used for free under the GPL-1 or GPL-2 license (where anything -// released into public must be open source) or under a commercial license if such -// has been acquired (see http://www.quicklz.com/order.html). The commercial license -// does not cover derived or ported versions created by third parties under GPL. - -// BETA VERSION BETA VERSION BETA VERSION BETA VERSION BETA VERSION BETA VERSION - -#include "quicklz.h" - -#if QLZ_VERSION_MAJOR != 1 || QLZ_VERSION_MINOR != 4 || QLZ_VERSION_REVISION != (-9) -#error quicklz.c and quicklz.h have different versions -#endif - -#if (defined(__X86__) || defined(__i386__) || defined(i386) || defined(_M_IX86) || defined(__386__) || defined(__x86_64__) || defined(_M_X64)) - #define X86X64 -#endif - -#define MINOFFSET 2 -#define UNCONDITIONAL_MATCHLEN 6 -#define UNCOMPRESSED_END 4 -#define CWORD_LEN 4 - -#include <util/system/defaults.h> - -int qlz_get_setting(int setting) -{ - switch (setting) - { - case 0: return QLZ_COMPRESSION_LEVEL; - case 1: return QLZ_SCRATCH_COMPRESS; - case 2: return QLZ_SCRATCH_DECOMPRESS; - case 3: return QLZ_STREAMING_BUFFER; -#ifdef QLZ_MEMORY_SAFE - case 6: return 1; -#else - case 6: return 0; -#endif - case 7: return QLZ_VERSION_MAJOR; - case 8: return QLZ_VERSION_MINOR; - case 9: return QLZ_VERSION_REVISION; - } - return -1; -} - -static void reset_state(unsigned char hash_counter[QLZ_HASH_VALUES]) -{ - memset(hash_counter, 0, QLZ_HASH_VALUES); -} - -static __inline ui32 hash_func(ui32 i) -{ -#if QLZ_COMPRESSION_LEVEL == 2 - return ((i >> 9) ^ (i >> 13) ^ i) & (QLZ_HASH_VALUES - 1); -#else - return ((i >> 12) ^ i) & (QLZ_HASH_VALUES - 1); -#endif -} - -static __inline ui32 fast_read(void const *src, ui32 bytes) -{ -#ifndef X86X64 - unsigned char *p = (unsigned char*)src; - switch (bytes) - { - case 4: - return(*p | *(p + 1) << 8 | *(p + 2) << 16 | *(p + 3) << 24); - case 3: - return(*p | *(p + 1) << 8 | *(p + 2) << 16); - case 2: - return(*p | *(p + 1) << 8); - case 1: - return(*p); - } - return 0; -#else - if (bytes >= 1 && bytes <= 4) - return *((ui32*)src); - else - return 0; -#endif -} - -static __inline void fast_write(ui32 f, void *dst, size_t bytes) -{ -#ifndef X86X64 - unsigned char *p = (unsigned char*)dst; - - switch (bytes) - { - case 4: - *p = (unsigned char)f; - *(p + 1) = (unsigned char)(f >> 8); - *(p + 2) = (unsigned char)(f >> 16); - *(p + 3) = (unsigned char)(f >> 24); - return; - case 3: - *p = (unsigned char)f; - *(p + 1) = (unsigned char)(f >> 8); - *(p + 2) = (unsigned char)(f >> 16); - return; - case 2: - *p = (unsigned char)f; - *(p + 1) = (unsigned char)(f >> 8); - return; - case 1: - *p = (unsigned char)f; - return; - } -#else - switch (bytes) - { - case 4: - *((ui32*)dst) = f; - return; - case 3: - *((ui32*)dst) = f; - return; - case 2: - *((ui16 *)dst) = (ui16)f; - return; - case 1: - *((unsigned char*)dst) = (unsigned char)f; - return; - } -#endif -} - -static __inline void memcpy_up(unsigned char *dst, const unsigned char *src, ui32 n) -{ - // Caution if modifying memcpy_up! Overlap of dst and src must be special handled. -#ifndef X86X64 - unsigned char *end = dst + n; // todo, optimize - while(dst < end) - { - *dst = *src; - dst++; - src++; - } -#else - ui32 f = 0; - do - { - *(ui32 *)(dst + f) = *(ui32 *)(src + f); - f += MINOFFSET + 1; - } - while (f < n); -#endif - } - - -#if QLZ_COMPRESSION_LEVEL <= 2 -static __inline void update_hash(qlz_hash_decompress h[QLZ_HASH_VALUES], unsigned char counter[QLZ_HASH_VALUES], const unsigned char *s) -{ -#if QLZ_COMPRESSION_LEVEL == 1 - ui32 hash, fetch; - fetch = fast_read(s, 3); - hash = hash_func(fetch); - h[hash].offset[0] = s; - counter[hash] = 1; // todo, updating counter -#elif QLZ_COMPRESSION_LEVEL == 2 - ui32 hash, fetch; - unsigned char c; - fetch = fast_read(s, 3); - hash = hash_func(fetch); - c = counter[hash]; - h[hash].offset[c & (QLZ_POINTERS - 1)] = s; - c++; - counter[hash] = c; -#endif -} - -static void update_hash_upto(qlz_hash_decompress h[QLZ_HASH_VALUES], unsigned char counter[QLZ_HASH_VALUES], unsigned char **lh, const unsigned char *max) -{ - while(*lh < max) - { - (*lh)++; - update_hash(h, counter, *lh); - } -} -#endif - -static size_t qlz_compress_core(const unsigned char *source, unsigned char *destination, size_t size, qlz_hash_compress hashtable[QLZ_HASH_VALUES], unsigned char hash_counter[QLZ_HASH_VALUES]) -{ - const unsigned char *last_byte = source + size - 1; - const unsigned char *src = source; - unsigned char *cword_ptr = destination; - unsigned char *dst = destination + CWORD_LEN; - ui32 cword_val = 1U << 31; - const unsigned char *last_matchstart = last_byte - UNCONDITIONAL_MATCHLEN - UNCOMPRESSED_END; - ui32 fetch = 0; - - if(src <= last_matchstart) - fetch = fast_read(src, 3); - - while(src <= last_matchstart) - { - if ((cword_val & 1) == 1) - { - // store uncompressed if compression ratio is too low - if (src > source + 3*(size >> 2) && dst - destination > src - source - ((src - source) >> 5)) - return 0; - - fast_write((cword_val >> 1) | (1U << 31), cword_ptr, CWORD_LEN); - - cword_ptr = dst; - dst += CWORD_LEN; - cword_val = 1U << 31; - fetch = fast_read(src, 3); - } -#if QLZ_COMPRESSION_LEVEL == 1 - { - const unsigned char *o; - ui32 hash, cached; - - hash = hash_func(fetch); - - cached = fetch ^ hashtable[hash].cache[0]; - hashtable[hash].cache[0] = fetch; - - o = hashtable[hash].offset[0]; - hashtable[hash].offset[0] = src; -#ifdef X86X64 - if ((cached & 0xffffff) == 0 && src - o > MINOFFSET && hash_counter[hash] != 0) -#else - if (cached == 0 && src - o > MINOFFSET && hash_counter[hash] != 0) -#endif - { - if (*(o + 3) != *(src + 3)) - { - cword_val = (cword_val >> 1) | (1U << 31); - fast_write((3 - 2) | (hash << 4), dst, 2); - src += 3; - dst += 2; - } - - else - { - const unsigned char *old_src = src; - size_t matchlen; - - cword_val = (cword_val >> 1) | (1U << 31); - src += CWORD_LEN; - - if(*(o + (src - old_src)) == *src) - { - src++; - if(*(o + (src - old_src)) == *src) - { - size_t remaining = (last_byte - UNCOMPRESSED_END - (src - 5) + 1) > 255 ? 255 : (last_byte - UNCOMPRESSED_END - (src - 5) + 1); - src++; - while(*(o + (src - old_src)) == *src && (size_t)(src - old_src) < remaining) - src++; - } - } - - matchlen = src - old_src; - hash <<= 4; - if (matchlen < 18) - { - fast_write((ui32)(matchlen - 2) | hash, dst, 2); - dst += 2; - } - else - { - fast_write((ui32)(matchlen << 16) | hash, dst, 3); - dst += 3; - } - } - fetch = fast_read(src, 3); - } - else - { - hash_counter[hash] = 1; // todo, test if decreasing comp ratio on small input - *dst = *src; - src++; - dst++; - cword_val = (cword_val >> 1); -#ifdef X86X64 - fetch = fast_read(src, 3); -#else - fetch = fetch >> 8 & 0xffff | *(src + 2) << 16; // fast_read(src, 3); -#endif - } - } -#elif QLZ_COMPRESSION_LEVEL >= 2 - { - const unsigned char *o, *offset2; - ui32 hash, matchlen, k, m, best_k; - unsigned char c; - size_t remaining = (last_byte - UNCOMPRESSED_END - src + 1) > 255 ? 255 : (last_byte - UNCOMPRESSED_END - src + 1); - - fetch = fast_read(src, 3); - hash = hash_func(fetch); - - c = hash_counter[hash]; - best_k = 0; - - offset2 = hashtable[hash].offset[0]; - if(offset2 < src - MINOFFSET && c > 0 && ((fast_read(offset2, 3) ^ fetch) & 0xffffff) == 0) // erstattet 2 med MINOFFSET - { - matchlen = 3; - if(*(offset2 + matchlen) == *(src + matchlen)) - { - matchlen = 4; - while(*(offset2 + matchlen) == *(src + matchlen) && matchlen < remaining) - matchlen++; - } - } - else - matchlen = 0; - for(k = 1; k < QLZ_POINTERS && c > k; k++) - { - o = hashtable[hash].offset[k]; -#if QLZ_COMPRESSION_LEVEL == 3 - if(((fast_read(o, 3) ^ fetch) & 0xffffff) == 0 && o < src - MINOFFSET) -#elif QLZ_COMPRESSION_LEVEL == 2 - if(*(src + matchlen) == *(o + matchlen) && ((fast_read(o, 3) ^ fetch) & 0xffffff) == 0 && o < src - MINOFFSET) -#endif - { - m = 3; - while(*(o + m) == *(src + m) && m < remaining) - m++; -#if QLZ_COMPRESSION_LEVEL == 3 - if ((m > matchlen) || (m == matchlen && o > offset2)) -#elif QLZ_COMPRESSION_LEVEL == 2 - if (m > matchlen) -#endif - { - offset2 = o; - matchlen = m; - best_k = k; - } - } - } - o = offset2; - hashtable[hash].offset[c & (QLZ_POINTERS - 1)] = src; - c++; - hash_counter[hash] = c; - -#if QLZ_COMPRESSION_LEVEL == 3 - if(matchlen > 2 && src - o < 131071) - { - // encode lz match - ui32 u; - size_t offset = src - o; - - for(u = 1; u < matchlen; u++) - { - fetch = fast_read(src + u, 3); - hash = hash_func(fetch); - c = hash_counter[hash]++; - hashtable[hash].offset[c & (QLZ_POINTERS - 1)] = src + u; - } - - cword_val = (cword_val >> 1) | (1U << 31); - src += matchlen; - - if(matchlen == 3 && offset <= 63) - { - *dst = (unsigned char)(offset << 2); - dst++; - } - else if (matchlen == 3 && offset <= 16383) - { - ui32 f = (ui32)((offset << 2) | 1); - fast_write(f, dst, 2); - dst += 2; - } - else if (matchlen <= 18 && offset <= 1023) - { - ui32 f = ((matchlen - 3) << 2) | (offset << 6) | 2; - fast_write(f, dst, 2); - dst += 2; - } - - else if(matchlen <= 33) // 1..31 - { - ui32 f = ((matchlen - 2) << 2) | (offset << 7) | 3; - fast_write(f, dst, 3); - dst += 3; - } - else - { - ui32 f = ((matchlen - 3) << 7) | (offset << 15) | 3; - fast_write(f, dst, 4); - dst += 4; - } - } - else - { - *dst = *src; - src++; - dst++; - cword_val = (cword_val >> 1); - } - -#elif QLZ_COMPRESSION_LEVEL == 2 - - if(matchlen > 2) - { - // encode lz match - cword_val = (cword_val >> 1) | (1U << 31); - src += matchlen; - - if (matchlen < 10) - { - ui32 f = best_k | ((matchlen - 2) << 2) | (hash << 5); - fast_write(f, dst, 2); - dst += 2; - } - else - { - ui32 f = best_k | (matchlen << 16) | (hash << 5); - fast_write(f, dst, 3); - dst += 3; - } - } - else - { - // encode literal - *dst = *src; - src++; - dst++; - cword_val = (cword_val >> 1); - } -#endif - } - -#endif - - } - -// save last source bytes as literals - while (src <= last_byte) // todo, kan muligvis forsimples.. - { - if ((cword_val & 1) == 1) - { - fast_write((cword_val >> 1) | (1U << 31), cword_ptr, CWORD_LEN); - cword_ptr = dst; - dst += CWORD_LEN; - cword_val = 1U << 31; - } -#if QLZ_COMPRESSION_LEVEL < 3 - if (src <= last_byte - 3) - { -#if QLZ_COMPRESSION_LEVEL == 1 - ui32 hash, fetch; - fetch = fast_read(src, 3); - hash = hash_func(fetch); - hashtable[hash].offset[0] = src; - hashtable[hash].cache[0] = fetch; - hash_counter[hash] = 1; -#elif QLZ_COMPRESSION_LEVEL == 2 - ui32 hash, fetch; - unsigned char c; - fetch = fast_read(src, 3); - hash = hash_func(fetch); - c = hash_counter[hash]; - hashtable[hash].offset[c & (QLZ_POINTERS - 1)] = src; - c++; - hash_counter[hash] = c; -#endif - } -#endif - *dst = *src; - src++; - dst++; - - cword_val = (cword_val >> 1); - } - - while((cword_val & 1) != 1) - cword_val = (cword_val >> 1); - - fast_write((cword_val >> 1) | (1U << 31), cword_ptr, CWORD_LEN); - - // min. size must be 9 bytes so that the qlz_size functions can take 9 bytes as argument - return dst - destination < 9 ? 9 : dst - destination; -} - -static size_t qlz_decompress_core(const unsigned char *source, unsigned char *destination, size_t size, qlz_hash_decompress hashtable[QLZ_HASH_VALUES], unsigned char hash_counter[QLZ_HASH_VALUES], unsigned char *history, const char *source_2) -{ - const unsigned char *src = source; - unsigned char *dst = destination; - const unsigned char *last_destination_byte = destination + size - 1; - ui32 cword_val = 1; - const ui32 bitlut[16] = {4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0}; - const unsigned char *last_matchstart = last_destination_byte - UNCONDITIONAL_MATCHLEN - UNCOMPRESSED_END; - unsigned char *last_hashed = destination - 1; - const unsigned char *last_source_byte = (const unsigned char *)source_2 + qlz_size_compressed(source_2) - 1; - - (void) last_source_byte; - (void) history; - (void) last_hashed; - (void) hash_counter; - (void) hashtable; - - for(;;) - { - ui32 fetch; - - if (cword_val == 1) - { - // fetch control word -#ifdef QLZ_MEMORY_SAFE - if(src + CWORD_LEN - 1 > last_source_byte) - return 0; -#endif - cword_val = fast_read(src, CWORD_LEN); - src += CWORD_LEN; - } - -#ifdef QLZ_MEMORY_SAFE - if(src + 4 - 1 > last_source_byte) - return 0; -#endif - - fetch = fast_read(src, 4); - - // check if we must decode lz match - if ((cword_val & 1) == 1) - - { - ui32 matchlen; - const unsigned char *offset2; - -#if QLZ_COMPRESSION_LEVEL == 1 - ui32 hash; - cword_val = cword_val >> 1; - hash = (fetch >> 4) & 0xfff; - offset2 = hashtable[hash].offset[0]; - - if((fetch & 0xf) != 0) - { - matchlen = (fetch & 0xf) + 2; - src += 2; - } - else - { - matchlen = *(src + 2); - src += 3; - } - -#elif QLZ_COMPRESSION_LEVEL == 2 - ui32 hash; - unsigned char c; - cword_val = cword_val >> 1; - hash = (fetch >> 5) & 0x7ff; - c = (unsigned char)fetch & 0x3; - offset2 = hashtable[hash].offset[c]; - - if((fetch & (28)) != 0) - { - matchlen = ((fetch >> 2) & 0x7) + 2; - src += 2; - } - else - { - matchlen = *(src + 2); - src += 3; - } - -#elif QLZ_COMPRESSION_LEVEL == 3 - ui32 offset; - cword_val = cword_val >> 1; - if ((fetch & 3) == 0) - { - offset = (fetch & 0xff) >> 2; - matchlen = 3; - src++; - } - else if ((fetch & 2) == 0) - { - offset = (fetch & 0xffff) >> 2; - matchlen = 3; - src += 2; - } - else if ((fetch & 1) == 0) - { - offset = (fetch & 0xffff) >> 6; - matchlen = ((fetch >> 2) & 15) + 3; - src += 2; - } - else if ((fetch & 127) != 3) - { - offset = (fetch >> 7) & 0x1ffff; - matchlen = ((fetch >> 2) & 0x1f) + 2; - src += 3; - } - else - { - offset = (fetch >> 15); - matchlen = ((fetch >> 7) & 255) + 3; - src += 4; - } - - offset2 = dst - offset; -#endif - -#ifdef QLZ_MEMORY_SAFE - if(offset2 < history || offset2 > dst - MINOFFSET - 1) - return 0; - - if(matchlen > (ui32)(last_destination_byte - dst - UNCOMPRESSED_END + 1)) - return 0; -#endif - memcpy_up(dst, offset2, matchlen); - dst += matchlen; - -#if QLZ_COMPRESSION_LEVEL <= 2 - update_hash_upto(hashtable, hash_counter, &last_hashed, dst - matchlen); - last_hashed = dst - 1; -#endif - } - - else - { - // decode literal - if (dst < last_matchstart) - { -#ifdef X86X64 - *(ui32 *)dst = *(ui32 *)src; -#else - memcpy_up(dst, src, 4); -#endif - dst += bitlut[cword_val & 0xf]; - src += bitlut[cword_val & 0xf]; - cword_val = cword_val >> (bitlut[cword_val & 0xf]); -#if QLZ_COMPRESSION_LEVEL <= 2 - update_hash_upto(hashtable, hash_counter, &last_hashed, dst - 3); -#endif - } - else - { - // decode last literals and exit - while(dst <= last_destination_byte) - { - if (cword_val == 1) - { - src += CWORD_LEN; - cword_val = 1U << 31; - } -#ifdef QLZ_MEMORY_SAFE - if(src >= last_source_byte + 1) - return 0; -#endif - *dst = *src; - dst++; - src++; - cword_val = cword_val >> 1; - } - -#if QLZ_COMPRESSION_LEVEL <= 2 - update_hash_upto(hashtable, hash_counter, &last_hashed, last_destination_byte - 3); // todo, use constant -#endif - return size; - } - - } - } -} - -size_t qlz_size_decompressed(const char *source) -{ - ui32 n, r; - n = (((*source) & 2) == 2) ? 4 : 1; - r = fast_read(source + 1 + n, n); - r = r & (0xffffffff >> ((4 - n)*8)); - return r; -} - -size_t qlz_size_compressed(const char *source) -{ - ui32 n, r; - n = (((*source) & 2) == 2) ? 4 : 1; - r = fast_read(source + 1, n); - r = r & (0xffffffff >> ((4 - n)*8)); - return r; -} - -size_t qlz_compress(const void *source, char *destination, size_t size, char *scratch_compress) -{ - unsigned char *scratch_aligned = (unsigned char *)scratch_compress + QLZ_ALIGNMENT_PADD - (((size_t)scratch_compress) % QLZ_ALIGNMENT_PADD); - size_t *buffersize = (size_t *)scratch_aligned; - qlz_hash_compress *hashtable = (qlz_hash_compress *)(scratch_aligned + QLZ_BUFFER_COUNTER); - unsigned char *hash_counter = (unsigned char*)hashtable + sizeof(qlz_hash_compress[QLZ_HASH_VALUES]); -#if QLZ_STREAMING_BUFFER > 0 - unsigned char *streambuffer = hash_counter + QLZ_HASH_VALUES; -#endif - size_t r; - ui32 compressed; - size_t base; - - if(size == 0 || size > 0xffffffff - 400) - return 0; - - if(size < 216) // todo - base = 3; - else - base = 9; - -#if QLZ_STREAMING_BUFFER > 0 - if (*buffersize + size - 1 >= QLZ_STREAMING_BUFFER) -#endif - { - reset_state(hash_counter); - r = base + qlz_compress_core((const unsigned char *)source, (unsigned char*)destination + base, size, hashtable, hash_counter); -#if QLZ_STREAMING_BUFFER > 0 - reset_state(hash_counter); -#endif - if(r == base) - { - memcpy(destination + base, source, size); - r = size + base; - compressed = 0; - } - else - { - compressed = 1; - } - *buffersize = 0; - } -#if QLZ_STREAMING_BUFFER > 0 - else - { - memcpy(streambuffer + *buffersize, source, size); - r = base + qlz_compress_core((const unsigned char *)streambuffer + *buffersize, (unsigned char*)destination + base, size, hashtable, hash_counter); - - if(r == base) - { - memcpy(destination + base, streambuffer + *buffersize, size); - r = size + base; - compressed = 0; - reset_state(hash_counter); - } - else - { - compressed = 1; - } - *buffersize += size; - } -#endif - if(base == 3) - { - *destination = (unsigned char)(0 | compressed); - *(destination + 1) = (unsigned char)r; - *(destination + 2) = (unsigned char)size; - } - else - { - *destination = (unsigned char)(2 | compressed); - fast_write((ui32)r, destination + 1, 4); - fast_write((ui32)size, destination + 5, 4); - } - - *destination |= (QLZ_COMPRESSION_LEVEL << 2); - *destination |= (1 << 6); - *destination |= ((QLZ_STREAMING_BUFFER == 0 ? 0 : (QLZ_STREAMING_BUFFER == 100000 ? 1 : (QLZ_STREAMING_BUFFER == 1000000 ? 2 : 3))) << 4); - -// 76543210 -// 01SSLLHC - - return r; -} - -size_t qlz_decompress(const char *source, void *destination, char *scratch_compress) -{ - unsigned char *scratch_aligned = (unsigned char *)scratch_compress + QLZ_ALIGNMENT_PADD - (((size_t)scratch_compress) % QLZ_ALIGNMENT_PADD); - size_t *buffersize = (size_t *)scratch_aligned; -#if QLZ_COMPRESSION_LEVEL == 3 -#if QLZ_STREAMING_BUFFER > 0 - unsigned char *streambuffer = scratch_aligned + QLZ_BUFFER_COUNTER; -#endif - unsigned char *hash_counter = 0; - qlz_hash_decompress *hashtable = 0; -#elif QLZ_COMPRESSION_LEVEL <= 2 - qlz_hash_decompress *hashtable = (qlz_hash_decompress *)(scratch_aligned + QLZ_BUFFER_COUNTER); - unsigned char *hash_counter = (unsigned char*)hashtable + sizeof(qlz_hash_decompress[QLZ_HASH_VALUES]); -#if QLZ_STREAMING_BUFFER > 0 - unsigned char *streambuffer = hash_counter + QLZ_HASH_VALUES; -#endif -#endif - ui32 headerlen = 2*((((*source) & 2) == 2) ? 4 : 1) + 1; - size_t dsiz = qlz_size_decompressed((char *)source); - -#if QLZ_STREAMING_BUFFER > 0 - if (*buffersize + qlz_size_decompressed((char *)source) - 1 >= QLZ_STREAMING_BUFFER) -#endif - { - if((*source & 1) == 1) - { -#if QLZ_COMPRESSION_LEVEL != 3 - reset_state(hash_counter); -#endif - dsiz = qlz_decompress_core((const unsigned char *)source + headerlen, (unsigned char *)destination, dsiz, hashtable, hash_counter, (unsigned char *)destination, source); - } - else - { - memcpy(destination, source + headerlen, dsiz); - } - *buffersize = 0; -#if QLZ_COMPRESSION_LEVEL != 3 - reset_state(hash_counter); -#endif - } -#if QLZ_STREAMING_BUFFER > 0 - else - { - if((*source & 1) == 1) - { - dsiz = qlz_decompress_core((const unsigned char *)source + headerlen, streambuffer + *buffersize, dsiz, hashtable, hash_counter, streambuffer, source); - } - else - { - memcpy(streambuffer + *buffersize, source + headerlen, dsiz); -#if QLZ_COMPRESSION_LEVEL != 3 - reset_state(hash_counter); -#endif - } - memcpy(destination, streambuffer + *buffersize, dsiz); - *buffersize += dsiz; - } -#endif - return dsiz; -} diff --git a/contrib/libs/quicklz/1.40/quicklz.h b/contrib/libs/quicklz/1.40/quicklz.h deleted file mode 100644 index 87c78a690f..0000000000 --- a/contrib/libs/quicklz/1.40/quicklz.h +++ /dev/null @@ -1,68 +0,0 @@ -#ifndef QLZ_HEADER -#define QLZ_HEADER - -// Copyright (C) 2006-2008 Lasse Mikkel Reinhold -// lar@quicklz.com -// -// QuickLZ can be used for free under the GPL-1 or GPL-2 license (where anything -// released into public must be open source) or under a commercial license if such -// has been acquired (see http://www.quicklz.com/order.html). The commercial license -// does not cover derived or ported versions created by third parties under GPL. - -// You can edit following user settings. Note that data must be decompressed with the -// same setting of QLZ_COMPRESSION_LEVEL and QLZ_STREAMING_BUFFER as it was compressed -// (see the manual). First #ifndef makes it possible to define settings from the outside -// like the compiler command line or from higher level code. - -// BETA VERSION BETA VERSION BETA VERSION BETA VERSION BETA VERSION BETA VERSION - -// Version 1.40 beta 9. Negative revision means beta. -#define QLZ_VERSION_MAJOR 1 -#define QLZ_VERSION_MINOR 4 -#define QLZ_VERSION_REVISION (-9) - -#include "yquicklz.h" - -// Verify compression level -#if QLZ_COMPRESSION_LEVEL != 1 && QLZ_COMPRESSION_LEVEL != 2 && QLZ_COMPRESSION_LEVEL != 3 -#error QLZ_COMPRESSION_LEVEL must be 1, 2 or 3 -#endif - -// Compute QLZ_SCRATCH_COMPRESS and QLZ_SCRATCH_DECOMPRESS -#if QLZ_COMPRESSION_LEVEL == 1 -#define QLZ_POINTERS 1 -#define QLZ_HASH_VALUES 4096 -#elif QLZ_COMPRESSION_LEVEL == 2 -#define QLZ_POINTERS 4 -#define QLZ_HASH_VALUES 2048 -#elif QLZ_COMPRESSION_LEVEL == 3 -#define QLZ_POINTERS 16 -#define QLZ_HASH_VALUES 4096 -#endif - -typedef struct -{ -#if QLZ_COMPRESSION_LEVEL == 1 - unsigned int cache[QLZ_POINTERS]; -#endif - const unsigned char *offset[QLZ_POINTERS]; -} qlz_hash_compress; - -typedef struct -{ - const unsigned char *offset[QLZ_POINTERS]; -} qlz_hash_decompress; - - -#define QLZ_ALIGNMENT_PADD 8 -#define QLZ_BUFFER_COUNTER 8 - -#define QLZ_SCRATCH_COMPRESS QLZ_ALIGNMENT_PADD + QLZ_BUFFER_COUNTER + QLZ_STREAMING_BUFFER + sizeof(qlz_hash_compress[QLZ_HASH_VALUES]) + QLZ_HASH_VALUES - -#if QLZ_COMPRESSION_LEVEL < 3 - #define QLZ_SCRATCH_DECOMPRESS QLZ_ALIGNMENT_PADD + QLZ_BUFFER_COUNTER + QLZ_STREAMING_BUFFER + sizeof(qlz_hash_decompress[QLZ_HASH_VALUES]) + QLZ_HASH_VALUES -#else - #define QLZ_SCRATCH_DECOMPRESS QLZ_ALIGNMENT_PADD + QLZ_BUFFER_COUNTER + QLZ_STREAMING_BUFFER -#endif - -#endif diff --git a/contrib/libs/quicklz/1.40/yquicklz.h b/contrib/libs/quicklz/1.40/yquicklz.h deleted file mode 100644 index eecdff6413..0000000000 --- a/contrib/libs/quicklz/1.40/yquicklz.h +++ /dev/null @@ -1,18 +0,0 @@ -#define QLZ_COMPRESSION_LEVEL COMPRESSION_LEVEL -#define QLZ_STREAMING_BUFFER STREAMING_MODE - -#include <string.h> - -#if defined(__cplusplus) -extern "C" { -#endif - -size_t qlz_size_decompressed(const char *source); -size_t qlz_size_compressed(const char *source); -size_t qlz_decompress(const char *source, void *destination, char *scratch_decompress); -size_t qlz_compress(const void *source, char *destination, size_t size, char *scratch_compress); -int qlz_get_setting(int setting); - -#if defined(__cplusplus) -} -#endif diff --git a/contrib/libs/quicklz/1.51/quicklz.c b/contrib/libs/quicklz/1.51/quicklz.c deleted file mode 100644 index d0615e90dc..0000000000 --- a/contrib/libs/quicklz/1.51/quicklz.c +++ /dev/null @@ -1,877 +0,0 @@ -// Fast data compression library -// Copyright (C) 2006-2011 Lasse Mikkel Reinhold -// lar@quicklz.com -// -// QuickLZ can be used for free under the GPL 1, 2 or 3 license (where anything -// released into public must be open source) or under a commercial license if such -// has been acquired (see http://www.quicklz.com/order.html). The commercial license -// does not cover derived or ported versions created by third parties under GPL. - -// 1.5.1 BETA 7 - -#include "quicklz.h" -#if defined _MSC_VER - #include <intrin.h> -#endif - -#if QLZ_VERSION_MAJOR != 1 || QLZ_VERSION_MINOR != 5 || QLZ_VERSION_REVISION != 1 - #error quicklz.c and quicklz.h have different versions -#endif - -#if (defined(__X86__) || defined(__i386__) || defined(i386) || defined(_M_IX86) || defined(__386__) || defined(__x86_64__) || defined(_M_X64)) - #define X86X64 -#endif - -#define MINOFFSET 2 -#define UNCONDITIONAL_MATCHLEN_COMPRESSOR 12 -#define UNCONDITIONAL_MATCHLEN_DECOMPRESSOR 6 -#define UNCOMPRESSED_END 4 -#define CWORD_LEN 4 - -#if QLZ_COMPRESSION_LEVEL == 1 && defined QLZ_PTR_64 && QLZ_STREAMING_BUFFER == 0 - #define OFFSET_BASE source - #define CAST (ui32)(size_t) -#else - #define OFFSET_BASE 0 - #define CAST -#endif - -#if defined(X86X64) && (defined(__GNUC__) || defined(__INTEL_COMPILER)) - #define qlz_likely(x) __builtin_expect (x, 1) - #define qlz_unlikely(x) __builtin_expect (x, 0) -#else - #define qlz_likely(x) (x) - #define qlz_unlikely(x) (x) -#endif - -int qlz_get_setting(int setting) -{ - switch (setting) - { - case 0: return QLZ_COMPRESSION_LEVEL; - case 1: return sizeof(qlz_state_compress); - case 2: return sizeof(qlz_state_decompress); - case 3: return QLZ_STREAMING_BUFFER; -#ifdef QLZ_MEMORY_SAFE - case 6: return 1; -#else - case 6: return 0; -#endif - case 7: return QLZ_VERSION_MAJOR; - case 8: return QLZ_VERSION_MINOR; - case 9: return QLZ_VERSION_REVISION; - } - return -1; -} - -#if QLZ_COMPRESSION_LEVEL == 1 -static int same(const unsigned char *src, size_t n) -{ - while(n > 0 && *(src + n) == *src) - n--; - return n == 0 ? 1 : 0; -} -#endif - -static void reset_table_compress(qlz_state_compress *state) -{ - int i; - for(i = 0; i < QLZ_HASH_VALUES; i++) - { -#if QLZ_COMPRESSION_LEVEL == 1 - state->hash[i].offset = 0; -#else - state->hash_counter[i] = 0; -#endif - } -} - -static void reset_table_decompress(qlz_state_decompress *state) -{ - int i; - (void)state; - (void)i; -#if QLZ_COMPRESSION_LEVEL == 2 - for(i = 0; i < QLZ_HASH_VALUES; i++) - { - state->hash_counter[i] = 0; - } -#endif -} - -static __inline ui32 hash_func(ui32 i) -{ -#if QLZ_COMPRESSION_LEVEL == 2 - return ((i >> 9) ^ (i >> 13) ^ i) & (QLZ_HASH_VALUES - 1); -#else - return ((i >> 12) ^ i) & (QLZ_HASH_VALUES - 1); -#endif -} - -static __inline ui32 fast_read(void const *src, ui32 bytes) -{ -#ifndef X86X64 - unsigned char *p = (unsigned char*)src; - switch (bytes) - { - case 4: - return(*p | *(p + 1) << 8 | *(p + 2) << 16 | *(p + 3) << 24); - case 3: - return(*p | *(p + 1) << 8 | *(p + 2) << 16); - case 2: - return(*p | *(p + 1) << 8); - case 1: - return(*p); - } - return 0; -#else - if (bytes >= 1 && bytes <= 4) - return *((ui32*)src); - else - return 0; -#endif -} - -static __inline ui32 hashat(const unsigned char *src) -{ - ui32 fetch, hash; - fetch = fast_read(src, 3); - hash = hash_func(fetch); - return hash; -} - -static __inline void fast_write(ui32 f, void *dst, size_t bytes) -{ -#ifndef X86X64 - unsigned char *p = (unsigned char*)dst; - - switch (bytes) - { - case 4: - *p = (unsigned char)f; - *(p + 1) = (unsigned char)(f >> 8); - *(p + 2) = (unsigned char)(f >> 16); - *(p + 3) = (unsigned char)(f >> 24); - return; - case 3: - *p = (unsigned char)f; - *(p + 1) = (unsigned char)(f >> 8); - *(p + 2) = (unsigned char)(f >> 16); - return; - case 2: - *p = (unsigned char)f; - *(p + 1) = (unsigned char)(f >> 8); - return; - case 1: - *p = (unsigned char)f; - return; - } -#else - switch (bytes) - { - case 4: - *((ui32*)dst) = f; - return; - case 3: - *((ui32*)dst) = f; - return; - case 2: - *((ui16 *)dst) = (ui16)f; - return; - case 1: - *((unsigned char*)dst) = (unsigned char)f; - return; - } -#endif -} - - -size_t qlz_size_decompressed(const char *source) -{ - ui32 n, r; - n = (((*source) & 2) == 2) ? 4 : 1; - r = fast_read(source + 1 + n, n); - r = r & (0xffffffff >> ((4 - n)*8)); - return r; -} - -size_t qlz_size_compressed(const char *source) -{ - ui32 n, r; - n = (((*source) & 2) == 2) ? 4 : 1; - r = fast_read(source + 1, n); - r = r & (0xffffffff >> ((4 - n)*8)); - return r; -} - -size_t qlz_size_header(const char *source) -{ - size_t n = 2*((((*source) & 2) == 2) ? 4 : 1) + 1; - return n; -} - - -static __inline void memcpy_up(unsigned char *dst, const unsigned char *src, ui32 n) -{ - // Caution if modifying memcpy_up! Overlap of dst and src must be special handled. -#ifndef X86X64 - unsigned char *end = dst + n; - while(dst < end) - { - *dst = *src; - dst++; - src++; - } -#else - ui32 f = 0; - do - { - *(ui32 *)(dst + f) = *(ui32 *)(src + f); - f += MINOFFSET + 1; - } - while (f < n); -#endif -} - -static __inline void update_hash(qlz_state_decompress *state, const unsigned char *s) -{ -#if QLZ_COMPRESSION_LEVEL == 1 - ui32 hash; - hash = hashat(s); - state->hash[hash].offset = s; - state->hash_counter[hash] = 1; -#elif QLZ_COMPRESSION_LEVEL == 2 - ui32 hash; - unsigned char c; - hash = hashat(s); - c = state->hash_counter[hash]; - state->hash[hash].offset[c & (QLZ_POINTERS - 1)] = s; - c++; - state->hash_counter[hash] = c; -#endif - (void)state; - (void)s; -} - -#if QLZ_COMPRESSION_LEVEL <= 2 -static void update_hash_upto(qlz_state_decompress *state, unsigned char **lh, const unsigned char *max) -{ - while(*lh < max) - { - (*lh)++; - update_hash(state, *lh); - } -} -#endif - -static size_t qlz_compress_core(const unsigned char *source, unsigned char *destination, size_t size, qlz_state_compress *state) -{ - const unsigned char *last_byte = source + size - 1; - const unsigned char *src = source; - unsigned char *cword_ptr = destination; - unsigned char *dst = destination + CWORD_LEN; - ui32 cword_val = 1U << 31; - const unsigned char *last_matchstart = last_byte - UNCONDITIONAL_MATCHLEN_COMPRESSOR - UNCOMPRESSED_END; - ui32 fetch = 0; - unsigned int lits = 0; - - (void) lits; - - if(src <= last_matchstart) - fetch = fast_read(src, 3); - - while(qlz_likely(src <= last_matchstart)) - { - if (qlz_unlikely( (cword_val & 1) == 1)) - { - // store uncompressed if compression ratio is too low - if (src > source + (size >> 1) && dst - destination > src - source - ((src - source) >> 5)) - return 0; - - fast_write((cword_val >> 1) | (1U << 31), cword_ptr, CWORD_LEN); - - cword_ptr = dst; - dst += CWORD_LEN; - cword_val = 1U << 31; - fetch = fast_read(src, 3); - } -#if QLZ_COMPRESSION_LEVEL == 1 - { - const unsigned char *o; - ui32 hash, cached; - - hash = hash_func(fetch); - cached = fetch ^ state->hash[hash].cache; - state->hash[hash].cache = fetch; - - o = state->hash[hash].offset + OFFSET_BASE; - state->hash[hash].offset = CAST(src - OFFSET_BASE); -#ifdef X86X64 - if ((cached & 0xffffff) == 0 && o != OFFSET_BASE && (src - o > MINOFFSET || (src == o + 1 && lits >= 3 && src > source + 3 && same(src - 3, 6)))) - { -#else - if (cached == 0 && o != OFFSET_BASE && (src - o > MINOFFSET || (src == o + 1 && lits >= 3 && src > source + 3 && same(src - 3, 6)))) - { -#endif - size_t matchlen = 3; - hash <<= 4; - cword_val = (cword_val >> 1) | (1U << 31); - -#if defined X86X64 && defined QLZ_PTR_64 - { -#ifdef __GNUC__ - unsigned long long a = *(unsigned long long *)(src + matchlen); - unsigned long long b = *(unsigned long long *)(o + matchlen); - unsigned long long c = a^b; -#else - unsigned int a = *(unsigned int *)(src + matchlen); - unsigned int b = *(unsigned int *)(o + matchlen); - unsigned int c = a^b; -#endif - if(qlz_unlikely(c == 0)) - { - size_t q = last_byte - UNCOMPRESSED_END - src + 1; - size_t remaining = q > 255 ? 255 : q; - matchlen += sizeof(c); - while(src[matchlen] == o[matchlen] && matchlen < remaining) - matchlen++; - } - else - { -#if defined _MSC_VER || (defined(__INTEL_COMPILER) && !defined(__GNUC__)) - unsigned int index = 0; - _BitScanForward((unsigned long *)&index, c); - matchlen += index >> 3; -#else - matchlen += __builtin_ctzll(c) >> 3; -#endif - } - } -#else - if(src[matchlen] == o[matchlen]) - { - size_t q = last_byte - UNCOMPRESSED_END - src + 1; - size_t remaining = q > 255 ? 255 : q; - matchlen ++; - while(src[matchlen] == o[matchlen] && matchlen < remaining) - matchlen++; - } -#endif - src += matchlen; - - if (qlz_likely(matchlen < 18)) - { - fast_write((ui32)(matchlen - 2) | hash, dst, 2); - dst += 2; - } - else - { - fast_write((ui32)(matchlen << 16) | hash, dst, 3); - dst += 3; - } - - fetch = fast_read(src, 3); - lits = 0; - } - else - { - lits++; - *dst = *src; - src++; - dst++; - cword_val = (cword_val >> 1); -#ifdef X86X64 - fetch = fast_read(src, 3); -#else - fetch = (fetch >> 8 & 0xffff) | (*(src + 2) << 16); -#endif - } - } -#elif QLZ_COMPRESSION_LEVEL >= 2 - { - const unsigned char *o, *offset2; - ui32 hash, matchlen, k, m, best_k = 0; - unsigned char c; - size_t remaining = (last_byte - UNCOMPRESSED_END - src + 1) > 255 ? 255 : (last_byte - UNCOMPRESSED_END - src + 1); - (void)best_k; - - fetch = fast_read(src, 3); - hash = hash_func(fetch); - - c = state->hash_counter[hash]; - - offset2 = state->hash[hash].offset[0]; - if(offset2 < src - MINOFFSET && c > 0 && ((fast_read(offset2, 3) ^ fetch) & 0xffffff) == 0) - { - matchlen = 3; - if(*(offset2 + matchlen) == *(src + matchlen)) - { - matchlen = 4; - while(*(offset2 + matchlen) == *(src + matchlen) && matchlen < remaining) - matchlen++; - } - } - else - matchlen = 0; - for(k = 1; k < QLZ_POINTERS && c > k; k++) - { - o = state->hash[hash].offset[k]; -#if QLZ_COMPRESSION_LEVEL == 3 - if(((fast_read(o, 3) ^ fetch) & 0xffffff) == 0 && o < src - MINOFFSET) -#elif QLZ_COMPRESSION_LEVEL == 2 - if(*(src + matchlen) == *(o + matchlen) && ((fast_read(o, 3) ^ fetch) & 0xffffff) == 0 && o < src - MINOFFSET) -#endif - { - m = 3; - while(*(o + m) == *(src + m) && m < remaining) - m++; -#if QLZ_COMPRESSION_LEVEL == 3 - if ((m > matchlen) || (m == matchlen && o > offset2)) -#elif QLZ_COMPRESSION_LEVEL == 2 - if (m > matchlen) -#endif - { - offset2 = o; - matchlen = m; - best_k = k; - } - } - } - o = offset2; - state->hash[hash].offset[c & (QLZ_POINTERS - 1)] = src; - c++; - state->hash_counter[hash] = c; - -#if QLZ_COMPRESSION_LEVEL == 3 - if(matchlen > 2 && src - o < 131071) - { - ui32 u; - size_t offset = src - o; - - for(u = 1; u < matchlen; u++) - { - hash = hashat(src + u); - c = state->hash_counter[hash]++; - state->hash[hash].offset[c & (QLZ_POINTERS - 1)] = src + u; - } - - cword_val = (cword_val >> 1) | (1U << 31); - src += matchlen; - - if(matchlen == 3 && offset <= 63) - { - *dst = (unsigned char)(offset << 2); - dst++; - } - else if (matchlen == 3 && offset <= 16383) - { - ui32 f = (ui32)((offset << 2) | 1); - fast_write(f, dst, 2); - dst += 2; - } - else if (matchlen <= 18 && offset <= 1023) - { - ui32 f = ((matchlen - 3) << 2) | ((ui32)offset << 6) | 2; - fast_write(f, dst, 2); - dst += 2; - } - - else if(matchlen <= 33) - { - ui32 f = ((matchlen - 2) << 2) | ((ui32)offset << 7) | 3; - fast_write(f, dst, 3); - dst += 3; - } - else - { - ui32 f = ((matchlen - 3) << 7) | ((ui32)offset << 15) | 3; - fast_write(f, dst, 4); - dst += 4; - } - } - else - { - *dst = *src; - src++; - dst++; - cword_val = (cword_val >> 1); - } -#elif QLZ_COMPRESSION_LEVEL == 2 - - if(matchlen > 2) - { - cword_val = (cword_val >> 1) | (1U << 31); - src += matchlen; - - if (matchlen < 10) - { - ui32 f = best_k | ((matchlen - 2) << 2) | (hash << 5); - fast_write(f, dst, 2); - dst += 2; - } - else - { - ui32 f = best_k | (matchlen << 16) | (hash << 5); - fast_write(f, dst, 3); - dst += 3; - } - } - else - { - *dst = *src; - src++; - dst++; - cword_val = (cword_val >> 1); - } -#endif - } -#endif - } - while (src <= last_byte) - { - if ((cword_val & 1) == 1) - { - fast_write((cword_val >> 1) | (1U << 31), cword_ptr, CWORD_LEN); - cword_ptr = dst; - dst += CWORD_LEN; - cword_val = 1U << 31; - } -#if QLZ_COMPRESSION_LEVEL < 3 - if (src <= last_byte - 3) - { -#if QLZ_COMPRESSION_LEVEL == 1 - ui32 hash, fetch; - fetch = fast_read(src, 3); - hash = hash_func(fetch); - state->hash[hash].offset = CAST(src - OFFSET_BASE); - state->hash[hash].cache = fetch; -#elif QLZ_COMPRESSION_LEVEL == 2 - ui32 hash; - unsigned char c; - hash = hashat(src); - c = state->hash_counter[hash]; - state->hash[hash].offset[c & (QLZ_POINTERS - 1)] = src; - c++; - state->hash_counter[hash] = c; -#endif - } -#endif - *dst = *src; - src++; - dst++; - cword_val = (cword_val >> 1); - } - - while((cword_val & 1) != 1) - cword_val = (cword_val >> 1); - - fast_write((cword_val >> 1) | (1U << 31), cword_ptr, CWORD_LEN); - - // min. size must be 9 bytes so that the qlz_size functions can take 9 bytes as argument - return dst - destination < 9 ? 9 : dst - destination; -} - -static size_t qlz_decompress_core(const unsigned char *source, unsigned char *destination, size_t size, qlz_state_decompress *state, const unsigned char *history) -{ - const unsigned char *src = source + qlz_size_header((const char *)source); - unsigned char *dst = destination; - const unsigned char *last_destination_byte = destination + size - 1; - ui32 cword_val = 1; - const unsigned char *last_matchstart = last_destination_byte - UNCONDITIONAL_MATCHLEN_DECOMPRESSOR - UNCOMPRESSED_END; - unsigned char *last_hashed = destination - 1; - const unsigned char *last_source_byte = source + qlz_size_compressed((const char *)source) - 1; - static const ui32 bitlut[16] = {4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0}; - - (void) last_source_byte; - (void) last_hashed; - (void) state; - (void) history; - - for(;;) - { - ui32 fetch; - - if (cword_val == 1) - { -#ifdef QLZ_MEMORY_SAFE - if(src + CWORD_LEN - 1 > last_source_byte) - return 0; -#endif - cword_val = fast_read(src, CWORD_LEN); - src += CWORD_LEN; - } - -#ifdef QLZ_MEMORY_SAFE - if(src + 4 - 1 > last_source_byte) - return 0; -#endif - - fetch = fast_read(src, 4); - - if ((cword_val & 1) == 1) - { - ui32 matchlen; - const unsigned char *offset2; - -#if QLZ_COMPRESSION_LEVEL == 1 - ui32 hash; - cword_val = cword_val >> 1; - hash = (fetch >> 4) & 0xfff; - offset2 = (const unsigned char *)(size_t)state->hash[hash].offset; - - if((fetch & 0xf) != 0) - { - matchlen = (fetch & 0xf) + 2; - src += 2; - } - else - { - matchlen = *(src + 2); - src += 3; - } - -#elif QLZ_COMPRESSION_LEVEL == 2 - ui32 hash; - unsigned char c; - cword_val = cword_val >> 1; - hash = (fetch >> 5) & 0x7ff; - c = (unsigned char)(fetch & 0x3); - offset2 = state->hash[hash].offset[c]; - - if((fetch & (28)) != 0) - { - matchlen = ((fetch >> 2) & 0x7) + 2; - src += 2; - } - else - { - matchlen = *(src + 2); - src += 3; - } - -#elif QLZ_COMPRESSION_LEVEL == 3 - ui32 offset; - cword_val = cword_val >> 1; - if ((fetch & 3) == 0) - { - offset = (fetch & 0xff) >> 2; - matchlen = 3; - src++; - } - else if ((fetch & 2) == 0) - { - offset = (fetch & 0xffff) >> 2; - matchlen = 3; - src += 2; - } - else if ((fetch & 1) == 0) - { - offset = (fetch & 0xffff) >> 6; - matchlen = ((fetch >> 2) & 15) + 3; - src += 2; - } - else if ((fetch & 127) != 3) - { - offset = (fetch >> 7) & 0x1ffff; - matchlen = ((fetch >> 2) & 0x1f) + 2; - src += 3; - } - else - { - offset = (fetch >> 15); - matchlen = ((fetch >> 7) & 255) + 3; - src += 4; - } - - offset2 = dst - offset; -#endif - -#ifdef QLZ_MEMORY_SAFE - if(offset2 < history || offset2 > dst - MINOFFSET - 1) - return 0; - - if(matchlen > (ui32)(last_destination_byte - dst - UNCOMPRESSED_END + 1)) - return 0; -#endif - - memcpy_up(dst, offset2, matchlen); - dst += matchlen; - -#if QLZ_COMPRESSION_LEVEL <= 2 - update_hash_upto(state, &last_hashed, dst - matchlen); - last_hashed = dst - 1; -#endif - } - else - { - if (dst < last_matchstart) - { - unsigned int n = bitlut[cword_val & 0xf]; -#ifdef X86X64 - *(ui32 *)dst = *(ui32 *)src; -#else - memcpy_up(dst, src, 4); -#endif - cword_val = cword_val >> n; - dst += n; - src += n; -#if QLZ_COMPRESSION_LEVEL <= 2 - update_hash_upto(state, &last_hashed, dst - 3); -#endif - } - else - { - while(dst <= last_destination_byte) - { - if (cword_val == 1) - { - src += CWORD_LEN; - cword_val = 1U << 31; - } -#ifdef QLZ_MEMORY_SAFE - if(src >= last_source_byte + 1) - return 0; -#endif - *dst = *src; - dst++; - src++; - cword_val = cword_val >> 1; - } - -#if QLZ_COMPRESSION_LEVEL <= 2 - update_hash_upto(state, &last_hashed, last_destination_byte - 3); // todo, use constant -#endif - return size; - } - - } - } -} - -size_t qlz_compress(const void *source, char *destination, size_t size, qlz_state_compress *state) -{ - size_t r; - ui32 compressed; - size_t base; - - if(size == 0 || size > 0xffffffff - 400) - return 0; - - if(size < 216) - base = 3; - else - base = 9; - -#if QLZ_STREAMING_BUFFER > 0 - if (state->stream_counter + size - 1 >= QLZ_STREAMING_BUFFER) -#endif - { - reset_table_compress(state); - r = base + qlz_compress_core((const unsigned char *)source, (unsigned char*)destination + base, size, state); -#if QLZ_STREAMING_BUFFER > 0 - reset_table_compress(state); -#endif - if(r == base) - { - memcpy(destination + base, source, size); - r = size + base; - compressed = 0; - } - else - { - compressed = 1; - } - state->stream_counter = 0; - } -#if QLZ_STREAMING_BUFFER > 0 - else - { - unsigned char *src = state->stream_buffer + state->stream_counter; - - memcpy(src, source, size); - r = base + qlz_compress_core(src, (unsigned char*)destination + base, size, state); - - if(r == base) - { - memcpy(destination + base, src, size); - r = size + base; - compressed = 0; - reset_table_compress(state); - } - else - { - compressed = 1; - } - state->stream_counter += size; - } -#endif - if(base == 3) - { - *destination = (unsigned char)(0 | compressed); - *(destination + 1) = (unsigned char)r; - *(destination + 2) = (unsigned char)size; - } - else - { - *destination = (unsigned char)(2 | compressed); - fast_write((ui32)r, destination + 1, 4); - fast_write((ui32)size, destination + 5, 4); - } - - *destination |= (QLZ_COMPRESSION_LEVEL << 2); - *destination |= (1 << 6); - *destination |= ((QLZ_STREAMING_BUFFER == 0 ? 0 : (QLZ_STREAMING_BUFFER == 100000 ? 1 : (QLZ_STREAMING_BUFFER == 1000000 ? 2 : 3))) << 4); - -// 76543210 -// 01SSLLHC - - return r; -} - -size_t qlz_decompress(const char *source, void *destination, qlz_state_decompress *state) -{ - size_t dsiz = qlz_size_decompressed(source); - size_t csiz = qlz_size_compressed(source); - -#if QLZ_STREAMING_BUFFER > 0 - if (state->stream_counter + qlz_size_decompressed(source) - 1 >= QLZ_STREAMING_BUFFER) -#endif - { - if((*source & 1) == 1) - { - reset_table_decompress(state); - dsiz = qlz_decompress_core((const unsigned char *)source, (unsigned char *)destination, dsiz, state, (const unsigned char *)destination); - } - else - { - if(csiz != dsiz + qlz_size_header(source)) - return 0; - - memcpy(destination, source + qlz_size_header(source), dsiz); - } - state->stream_counter = 0; - reset_table_decompress(state); - } -#if QLZ_STREAMING_BUFFER > 0 - else - { - unsigned char *dst = state->stream_buffer + state->stream_counter; - if((*source & 1) == 1) - { - dsiz = qlz_decompress_core((const unsigned char *)source, dst, dsiz, state, (const unsigned char *)state->stream_buffer); - } - else - { - // if(csiz != dsiz + qlz_size_header(source)) - // return 0; - - memcpy(dst, source + qlz_size_header(source), dsiz); - reset_table_decompress(state); - } - memcpy(destination, dst, dsiz); - state->stream_counter += dsiz; - } -#endif - return dsiz; -} - diff --git a/contrib/libs/quicklz/1.51/quicklz.h b/contrib/libs/quicklz/1.51/quicklz.h deleted file mode 100644 index b202deb98a..0000000000 --- a/contrib/libs/quicklz/1.51/quicklz.h +++ /dev/null @@ -1,139 +0,0 @@ -#ifndef QLZ_HEADER -#define QLZ_HEADER - -// Fast data compression library -// Copyright (C) 2006-2011 Lasse Mikkel Reinhold -// lar@quicklz.com -// -// QuickLZ can be used for free under the GPL 1, 2 or 3 license (where anything -// released into public must be open source) or under a commercial license if such -// has been acquired (see http://www.quicklz.com/order.html). The commercial license -// does not cover derived or ported versions created by third parties under GPL. - -// You can edit following user settings. Data must be decompressed with the same -// setting of QLZ_COMPRESSION_LEVEL and QLZ_STREAMING_BUFFER as it was compressed -// (see manual). First #ifndef makes it possible to define settings from -// the outside like the compiler command line. - -// 1.5.1 BETA 7 - -#ifndef QLZ_COMPRESSION_LEVEL - #define QLZ_COMPRESSION_LEVEL 1 - //#define QLZ_COMPRESSION_LEVEL 2 - //#define QLZ_COMPRESSION_LEVEL 3 - - #define QLZ_STREAMING_BUFFER 0 - //#define QLZ_STREAMING_BUFFER 100000 - //#define QLZ_STREAMING_BUFFER 1000000 - - //#define QLZ_MEMORY_SAFE -#endif - -#define QLZ_VERSION_MAJOR 1 -#define QLZ_VERSION_MINOR 5 -#define QLZ_VERSION_REVISION 1 - -// Using size_t, memset() and memcpy() -#include <string.h> - -// Verify compression level -#if QLZ_COMPRESSION_LEVEL != 1 && QLZ_COMPRESSION_LEVEL != 2 && QLZ_COMPRESSION_LEVEL != 3 -#error QLZ_COMPRESSION_LEVEL must be 1, 2 or 3 -#endif - -// Decrease QLZ_POINTERS for level 3 to increase compression speed. Do not touch any other values! -#if QLZ_COMPRESSION_LEVEL == 1 -#define QLZ_POINTERS 1 -#define QLZ_HASH_VALUES 4096 -#elif QLZ_COMPRESSION_LEVEL == 2 -#define QLZ_POINTERS 4 -#define QLZ_HASH_VALUES 2048 -#elif QLZ_COMPRESSION_LEVEL == 3 -#define QLZ_POINTERS 16 -#define QLZ_HASH_VALUES 4096 -#endif - -// Detect if pointer size is 64-bit. It's not fatal if some 64-bit target is not detected because this is only for adding an optional 64-bit optimization. -#if defined _LP64 || defined __LP64__ || defined __64BIT__ || _ADDR64 || defined _WIN64 || defined __arch64__ || __WORDSIZE == 64 || (defined __sparc && defined __sparcv9) || defined __x86_64 || defined __amd64 || defined __x86_64__ || defined _M_X64 || defined _M_IA64 || defined __ia64 || defined __IA64__ - #define QLZ_PTR_64 -#endif - -// hash entry -typedef struct -{ -#if QLZ_COMPRESSION_LEVEL == 1 - ui32 cache; -#if defined QLZ_PTR_64 && QLZ_STREAMING_BUFFER == 0 - unsigned int offset; -#else - const unsigned char *offset; -#endif -#else - const unsigned char *offset[QLZ_POINTERS]; -#endif - -} qlz_hash_compress; - -typedef struct -{ -#if QLZ_COMPRESSION_LEVEL == 1 - const unsigned char *offset; -#else - const unsigned char *offset[QLZ_POINTERS]; -#endif -} qlz_hash_decompress; - - -// states -typedef struct -{ - #if QLZ_STREAMING_BUFFER > 0 - unsigned char stream_buffer[QLZ_STREAMING_BUFFER]; - #endif - size_t stream_counter; - qlz_hash_compress hash[QLZ_HASH_VALUES]; - unsigned char hash_counter[QLZ_HASH_VALUES]; -} qlz_state_compress; - - -#if QLZ_COMPRESSION_LEVEL == 1 || QLZ_COMPRESSION_LEVEL == 2 - typedef struct - { -#if QLZ_STREAMING_BUFFER > 0 - unsigned char stream_buffer[QLZ_STREAMING_BUFFER]; -#endif - qlz_hash_decompress hash[QLZ_HASH_VALUES]; - unsigned char hash_counter[QLZ_HASH_VALUES]; - size_t stream_counter; - } qlz_state_decompress; -#elif QLZ_COMPRESSION_LEVEL == 3 - typedef struct - { -#if QLZ_STREAMING_BUFFER > 0 - unsigned char stream_buffer[QLZ_STREAMING_BUFFER]; -#endif -#if QLZ_COMPRESSION_LEVEL <= 2 - qlz_hash_decompress hash[QLZ_HASH_VALUES]; -#endif - size_t stream_counter; - } qlz_state_decompress; -#endif - - -#if defined (__cplusplus) -extern "C" { -#endif - -// Public functions of QuickLZ -size_t qlz_size_decompressed(const char *source); -size_t qlz_size_compressed(const char *source); -size_t qlz_compress(const void *source, char *destination, size_t size, qlz_state_compress *state); -size_t qlz_decompress(const char *source, void *destination, qlz_state_decompress *state); -int qlz_get_setting(int setting); - -#if defined (__cplusplus) -} -#endif - -#endif - diff --git a/contrib/libs/quicklz/1.51/tables.c b/contrib/libs/quicklz/1.51/tables.c deleted file mode 100644 index 8ec68ab034..0000000000 --- a/contrib/libs/quicklz/1.51/tables.c +++ /dev/null @@ -1,10 +0,0 @@ -#include <util/system/defaults.h> -//typedef unsigned int ui32; -//typedef unsigned short int ui16; - -#include "table.h" -#include "tables.inc" - -struct TQuickLZMethods* GetLzq151Table(unsigned level, unsigned buf) { - return methods_qlz151[level][buf]; -} diff --git a/contrib/libs/quicklz/1.51/tables.inc b/contrib/libs/quicklz/1.51/tables.inc deleted file mode 100644 index 9ffd71e4ab..0000000000 --- a/contrib/libs/quicklz/1.51/tables.inc +++ /dev/null @@ -1,33 +0,0 @@ -#define COMPRESSION_LEVEL 1 -#define STREAMING_MODE 0 -#include "y.c" -#define COMPRESSION_LEVEL 1 -#define STREAMING_MODE 100000 -#include "y.c" -#define COMPRESSION_LEVEL 1 -#define STREAMING_MODE 1000000 -#include "y.c" -#define COMPRESSION_LEVEL 2 -#define STREAMING_MODE 0 -#include "y.c" -#define COMPRESSION_LEVEL 2 -#define STREAMING_MODE 100000 -#include "y.c" -#define COMPRESSION_LEVEL 2 -#define STREAMING_MODE 1000000 -#include "y.c" -#define COMPRESSION_LEVEL 3 -#define STREAMING_MODE 0 -#include "y.c" -#define COMPRESSION_LEVEL 3 -#define STREAMING_MODE 100000 -#include "y.c" -#define COMPRESSION_LEVEL 3 -#define STREAMING_MODE 1000000 -#include "y.c" -static struct TQuickLZMethods* methods_qlz151[3][3] = { -{&yqlz_1_51_1_0_table, &yqlz_1_51_1_100000_table, &yqlz_1_51_1_1000000_table, }, -{&yqlz_1_51_2_0_table, &yqlz_1_51_2_100000_table, &yqlz_1_51_2_1000000_table, }, -{&yqlz_1_51_3_0_table, &yqlz_1_51_3_100000_table, &yqlz_1_51_3_1000000_table, }, -}; - diff --git a/contrib/libs/quicklz/1.51/y.c b/contrib/libs/quicklz/1.51/y.c deleted file mode 100644 index 7d81f7dd18..0000000000 --- a/contrib/libs/quicklz/1.51/y.c +++ /dev/null @@ -1,52 +0,0 @@ -#define QLZ_COMPRESSION_LEVEL COMPRESSION_LEVEL -#define QLZ_STREAMING_BUFFER STREAMING_MODE -#define QLZ_YVERSION 1_51 - -#include "prolog.h" -#include "quicklz.c" - -#define STR(a) STR2(a) -#define STR2(a) STR3(a) -#define STR3(a) #a - -static struct TQuickLZMethods qlz_table = { - qlz_size_decompressed, - qlz_size_compressed, - qlz_decompress, - qlz_compress, - qlz_get_setting, - STR(QLZ_YVERSION) "-" STR(COMPRESSION_LEVEL) "-" STR(STREAMING_MODE) -}; - -#include "epilog.h" - -#undef STR -#undef STR2 -#undef STR3 -#undef X86X64 -#undef MINOFFSET -#undef UNCONDITIONAL_MATCHLEN_COMPRESSOR -#undef UNCONDITIONAL_MATCHLEN_DECOMPRESSOR -#undef UNCOMPRESSED_END -#undef CWORD_LEN -#undef OFFSET_BASE -#undef CAST -#undef OFFSET_BASE -#undef CAST -#undef qlz_likely -#undef qlz_unlikely -#undef qlz_likely -#undef qlz_unlikely -#undef QLZ_HEADER -#undef QLZ_COMPRESSION_LEVEL -#undef QLZ_STREAMING_BUFFER -#undef QLZ_VERSION_MAJOR -#undef QLZ_VERSION_MINOR -#undef QLZ_VERSION_REVISION -#undef QLZ_POINTERS -#undef QLZ_HASH_VALUES -#undef QLZ_POINTERS -#undef QLZ_HASH_VALUES -#undef QLZ_POINTERS -#undef QLZ_HASH_VALUES -#undef QLZ_PTR_64 diff --git a/contrib/libs/quicklz/1_31_0_0.c b/contrib/libs/quicklz/1_31_0_0.c deleted file mode 100644 index a3d66f0f44..0000000000 --- a/contrib/libs/quicklz/1_31_0_0.c +++ /dev/null @@ -1,4 +0,0 @@ -#define FROM_QUICKLZ_BUILD -#include "1_31_0_0.h" -#include "1.31/quicklz.c" -#include "table.inc" diff --git a/contrib/libs/quicklz/1_31_0_0.h b/contrib/libs/quicklz/1_31_0_0.h deleted file mode 100644 index af8a7b977f..0000000000 --- a/contrib/libs/quicklz/1_31_0_0.h +++ /dev/null @@ -1,7 +0,0 @@ -#define COMPRESSION_LEVEL 0 -#define STREAMING_MODE 0 -#define QLZ_YVERSION 1_31 - -#include "prolog.h" -#include "1.31/yquicklz.h" -#include "epilog.h" diff --git a/contrib/libs/quicklz/1_31_0_100000.c b/contrib/libs/quicklz/1_31_0_100000.c deleted file mode 100644 index 31657b9d82..0000000000 --- a/contrib/libs/quicklz/1_31_0_100000.c +++ /dev/null @@ -1,4 +0,0 @@ -#define FROM_QUICKLZ_BUILD -#include "1_31_0_100000.h" -#include "1.31/quicklz.c" -#include "table.inc" diff --git a/contrib/libs/quicklz/1_31_0_100000.h b/contrib/libs/quicklz/1_31_0_100000.h deleted file mode 100644 index a879bd831b..0000000000 --- a/contrib/libs/quicklz/1_31_0_100000.h +++ /dev/null @@ -1,7 +0,0 @@ -#define COMPRESSION_LEVEL 0 -#define STREAMING_MODE 100000 -#define QLZ_YVERSION 1_31 - -#include "prolog.h" -#include "1.31/yquicklz.h" -#include "epilog.h" diff --git a/contrib/libs/quicklz/1_31_0_1000000.c b/contrib/libs/quicklz/1_31_0_1000000.c deleted file mode 100644 index 1893f906b5..0000000000 --- a/contrib/libs/quicklz/1_31_0_1000000.c +++ /dev/null @@ -1,4 +0,0 @@ -#define FROM_QUICKLZ_BUILD -#include "1_31_0_1000000.h" -#include "1.31/quicklz.c" -#include "table.inc" diff --git a/contrib/libs/quicklz/1_31_0_1000000.h b/contrib/libs/quicklz/1_31_0_1000000.h deleted file mode 100644 index a4b608c55a..0000000000 --- a/contrib/libs/quicklz/1_31_0_1000000.h +++ /dev/null @@ -1,7 +0,0 @@ -#define COMPRESSION_LEVEL 0 -#define STREAMING_MODE 1000000 -#define QLZ_YVERSION 1_31 - -#include "prolog.h" -#include "1.31/yquicklz.h" -#include "epilog.h" diff --git a/contrib/libs/quicklz/1_31_1_0.c b/contrib/libs/quicklz/1_31_1_0.c deleted file mode 100644 index e58bd12883..0000000000 --- a/contrib/libs/quicklz/1_31_1_0.c +++ /dev/null @@ -1,4 +0,0 @@ -#define FROM_QUICKLZ_BUILD -#include "1_31_1_0.h" -#include "1.31/quicklz.c" -#include "table.inc" diff --git a/contrib/libs/quicklz/1_31_1_0.h b/contrib/libs/quicklz/1_31_1_0.h deleted file mode 100644 index c9cf9d3da8..0000000000 --- a/contrib/libs/quicklz/1_31_1_0.h +++ /dev/null @@ -1,7 +0,0 @@ -#define COMPRESSION_LEVEL 1 -#define STREAMING_MODE 0 -#define QLZ_YVERSION 1_31 - -#include "prolog.h" -#include "1.31/yquicklz.h" -#include "epilog.h" diff --git a/contrib/libs/quicklz/1_31_1_100000.c b/contrib/libs/quicklz/1_31_1_100000.c deleted file mode 100644 index 8850fd4efa..0000000000 --- a/contrib/libs/quicklz/1_31_1_100000.c +++ /dev/null @@ -1,4 +0,0 @@ -#define FROM_QUICKLZ_BUILD -#include "1_31_1_100000.h" -#include "1.31/quicklz.c" -#include "table.inc" diff --git a/contrib/libs/quicklz/1_31_1_100000.h b/contrib/libs/quicklz/1_31_1_100000.h deleted file mode 100644 index a21fa35cb2..0000000000 --- a/contrib/libs/quicklz/1_31_1_100000.h +++ /dev/null @@ -1,7 +0,0 @@ -#define COMPRESSION_LEVEL 1 -#define STREAMING_MODE 100000 -#define QLZ_YVERSION 1_31 - -#include "prolog.h" -#include "1.31/yquicklz.h" -#include "epilog.h" diff --git a/contrib/libs/quicklz/1_31_1_1000000.c b/contrib/libs/quicklz/1_31_1_1000000.c deleted file mode 100644 index 195261b414..0000000000 --- a/contrib/libs/quicklz/1_31_1_1000000.c +++ /dev/null @@ -1,4 +0,0 @@ -#define FROM_QUICKLZ_BUILD -#include "1_31_1_1000000.h" -#include "1.31/quicklz.c" -#include "table.inc" diff --git a/contrib/libs/quicklz/1_31_1_1000000.h b/contrib/libs/quicklz/1_31_1_1000000.h deleted file mode 100644 index 58a8a279f5..0000000000 --- a/contrib/libs/quicklz/1_31_1_1000000.h +++ /dev/null @@ -1,7 +0,0 @@ -#define COMPRESSION_LEVEL 1 -#define STREAMING_MODE 1000000 -#define QLZ_YVERSION 1_31 - -#include "prolog.h" -#include "1.31/yquicklz.h" -#include "epilog.h" diff --git a/contrib/libs/quicklz/1_31_2_0.c b/contrib/libs/quicklz/1_31_2_0.c deleted file mode 100644 index e442777119..0000000000 --- a/contrib/libs/quicklz/1_31_2_0.c +++ /dev/null @@ -1,4 +0,0 @@ -#define FROM_QUICKLZ_BUILD -#include "1_31_2_0.h" -#include "1.31/quicklz.c" -#include "table.inc" diff --git a/contrib/libs/quicklz/1_31_2_0.h b/contrib/libs/quicklz/1_31_2_0.h deleted file mode 100644 index 317629ca47..0000000000 --- a/contrib/libs/quicklz/1_31_2_0.h +++ /dev/null @@ -1,7 +0,0 @@ -#define COMPRESSION_LEVEL 2 -#define STREAMING_MODE 0 -#define QLZ_YVERSION 1_31 - -#include "prolog.h" -#include "1.31/yquicklz.h" -#include "epilog.h" diff --git a/contrib/libs/quicklz/1_31_2_100000.c b/contrib/libs/quicklz/1_31_2_100000.c deleted file mode 100644 index 168247b8c8..0000000000 --- a/contrib/libs/quicklz/1_31_2_100000.c +++ /dev/null @@ -1,4 +0,0 @@ -#define FROM_QUICKLZ_BUILD -#include "1_31_2_100000.h" -#include "1.31/quicklz.c" -#include "table.inc" diff --git a/contrib/libs/quicklz/1_31_2_100000.h b/contrib/libs/quicklz/1_31_2_100000.h deleted file mode 100644 index 5103f09003..0000000000 --- a/contrib/libs/quicklz/1_31_2_100000.h +++ /dev/null @@ -1,7 +0,0 @@ -#define COMPRESSION_LEVEL 2 -#define STREAMING_MODE 100000 -#define QLZ_YVERSION 1_31 - -#include "prolog.h" -#include "1.31/yquicklz.h" -#include "epilog.h" diff --git a/contrib/libs/quicklz/1_31_2_1000000.c b/contrib/libs/quicklz/1_31_2_1000000.c deleted file mode 100644 index ebdf0cc27e..0000000000 --- a/contrib/libs/quicklz/1_31_2_1000000.c +++ /dev/null @@ -1,4 +0,0 @@ -#define FROM_QUICKLZ_BUILD -#include "1_31_2_1000000.h" -#include "1.31/quicklz.c" -#include "table.inc" diff --git a/contrib/libs/quicklz/1_31_2_1000000.h b/contrib/libs/quicklz/1_31_2_1000000.h deleted file mode 100644 index 78bcd41922..0000000000 --- a/contrib/libs/quicklz/1_31_2_1000000.h +++ /dev/null @@ -1,7 +0,0 @@ -#define COMPRESSION_LEVEL 2 -#define STREAMING_MODE 1000000 -#define QLZ_YVERSION 1_31 - -#include "prolog.h" -#include "1.31/yquicklz.h" -#include "epilog.h" diff --git a/contrib/libs/quicklz/1_31_3_0.c b/contrib/libs/quicklz/1_31_3_0.c deleted file mode 100644 index 44df373ec4..0000000000 --- a/contrib/libs/quicklz/1_31_3_0.c +++ /dev/null @@ -1,4 +0,0 @@ -#define FROM_QUICKLZ_BUILD -#include "1_31_3_0.h" -#include "1.31/quicklz.c" -#include "table.inc" diff --git a/contrib/libs/quicklz/1_31_3_0.h b/contrib/libs/quicklz/1_31_3_0.h deleted file mode 100644 index 9f0dedaf67..0000000000 --- a/contrib/libs/quicklz/1_31_3_0.h +++ /dev/null @@ -1,7 +0,0 @@ -#define COMPRESSION_LEVEL 3 -#define STREAMING_MODE 0 -#define QLZ_YVERSION 1_31 - -#include "prolog.h" -#include "1.31/yquicklz.h" -#include "epilog.h" diff --git a/contrib/libs/quicklz/1_31_3_100000.c b/contrib/libs/quicklz/1_31_3_100000.c deleted file mode 100644 index 6552495e1e..0000000000 --- a/contrib/libs/quicklz/1_31_3_100000.c +++ /dev/null @@ -1,4 +0,0 @@ -#define FROM_QUICKLZ_BUILD -#include "1_31_3_100000.h" -#include "1.31/quicklz.c" -#include "table.inc" diff --git a/contrib/libs/quicklz/1_31_3_100000.h b/contrib/libs/quicklz/1_31_3_100000.h deleted file mode 100644 index 9ed5aa60dd..0000000000 --- a/contrib/libs/quicklz/1_31_3_100000.h +++ /dev/null @@ -1,7 +0,0 @@ -#define COMPRESSION_LEVEL 3 -#define STREAMING_MODE 100000 -#define QLZ_YVERSION 1_31 - -#include "prolog.h" -#include "1.31/yquicklz.h" -#include "epilog.h" diff --git a/contrib/libs/quicklz/1_31_3_1000000.c b/contrib/libs/quicklz/1_31_3_1000000.c deleted file mode 100644 index 2fd46f4728..0000000000 --- a/contrib/libs/quicklz/1_31_3_1000000.c +++ /dev/null @@ -1,4 +0,0 @@ -#define FROM_QUICKLZ_BUILD -#include "1_31_3_1000000.h" -#include "1.31/quicklz.c" -#include "table.inc" diff --git a/contrib/libs/quicklz/1_31_3_1000000.h b/contrib/libs/quicklz/1_31_3_1000000.h deleted file mode 100644 index 6366f3c557..0000000000 --- a/contrib/libs/quicklz/1_31_3_1000000.h +++ /dev/null @@ -1,7 +0,0 @@ -#define COMPRESSION_LEVEL 3 -#define STREAMING_MODE 1000000 -#define QLZ_YVERSION 1_31 - -#include "prolog.h" -#include "1.31/yquicklz.h" -#include "epilog.h" diff --git a/contrib/libs/quicklz/1_40_1_0.c b/contrib/libs/quicklz/1_40_1_0.c deleted file mode 100644 index 6ca2a7dff5..0000000000 --- a/contrib/libs/quicklz/1_40_1_0.c +++ /dev/null @@ -1,4 +0,0 @@ -#define FROM_QUICKLZ_BUILD -#include "1_40_1_0.h" -#include "1.40/quicklz.c" -#include "table.inc" diff --git a/contrib/libs/quicklz/1_40_1_0.h b/contrib/libs/quicklz/1_40_1_0.h deleted file mode 100644 index 925da72079..0000000000 --- a/contrib/libs/quicklz/1_40_1_0.h +++ /dev/null @@ -1,7 +0,0 @@ -#define COMPRESSION_LEVEL 1 -#define STREAMING_MODE 0 -#define QLZ_YVERSION 1_40 - -#include "prolog.h" -#include "1.40/yquicklz.h" -#include "epilog.h" diff --git a/contrib/libs/quicklz/1_40_1_100000.c b/contrib/libs/quicklz/1_40_1_100000.c deleted file mode 100644 index 1de256a5e6..0000000000 --- a/contrib/libs/quicklz/1_40_1_100000.c +++ /dev/null @@ -1,4 +0,0 @@ -#define FROM_QUICKLZ_BUILD -#include "1_40_1_100000.h" -#include "1.40/quicklz.c" -#include "table.inc" diff --git a/contrib/libs/quicklz/1_40_1_100000.h b/contrib/libs/quicklz/1_40_1_100000.h deleted file mode 100644 index bb4828855f..0000000000 --- a/contrib/libs/quicklz/1_40_1_100000.h +++ /dev/null @@ -1,7 +0,0 @@ -#define COMPRESSION_LEVEL 1 -#define STREAMING_MODE 100000 -#define QLZ_YVERSION 1_40 - -#include "prolog.h" -#include "1.40/yquicklz.h" -#include "epilog.h" diff --git a/contrib/libs/quicklz/1_40_1_1000000.c b/contrib/libs/quicklz/1_40_1_1000000.c deleted file mode 100644 index e65f94b3d5..0000000000 --- a/contrib/libs/quicklz/1_40_1_1000000.c +++ /dev/null @@ -1,4 +0,0 @@ -#define FROM_QUICKLZ_BUILD -#include "1_40_1_1000000.h" -#include "1.40/quicklz.c" -#include "table.inc" diff --git a/contrib/libs/quicklz/1_40_1_1000000.h b/contrib/libs/quicklz/1_40_1_1000000.h deleted file mode 100644 index e8de3de93d..0000000000 --- a/contrib/libs/quicklz/1_40_1_1000000.h +++ /dev/null @@ -1,7 +0,0 @@ -#define COMPRESSION_LEVEL 1 -#define STREAMING_MODE 1000000 -#define QLZ_YVERSION 1_40 - -#include "prolog.h" -#include "1.40/yquicklz.h" -#include "epilog.h" diff --git a/contrib/libs/quicklz/1_40_2_0.c b/contrib/libs/quicklz/1_40_2_0.c deleted file mode 100644 index aadfe9ebb0..0000000000 --- a/contrib/libs/quicklz/1_40_2_0.c +++ /dev/null @@ -1,4 +0,0 @@ -#define FROM_QUICKLZ_BUILD -#include "1_40_2_0.h" -#include "1.40/quicklz.c" -#include "table.inc" diff --git a/contrib/libs/quicklz/1_40_2_0.h b/contrib/libs/quicklz/1_40_2_0.h deleted file mode 100644 index 497c1951e8..0000000000 --- a/contrib/libs/quicklz/1_40_2_0.h +++ /dev/null @@ -1,7 +0,0 @@ -#define COMPRESSION_LEVEL 2 -#define STREAMING_MODE 0 -#define QLZ_YVERSION 1_40 - -#include "prolog.h" -#include "1.40/yquicklz.h" -#include "epilog.h" diff --git a/contrib/libs/quicklz/1_40_2_100000.c b/contrib/libs/quicklz/1_40_2_100000.c deleted file mode 100644 index 44afe8054f..0000000000 --- a/contrib/libs/quicklz/1_40_2_100000.c +++ /dev/null @@ -1,4 +0,0 @@ -#define FROM_QUICKLZ_BUILD -#include "1_40_2_100000.h" -#include "1.40/quicklz.c" -#include "table.inc" diff --git a/contrib/libs/quicklz/1_40_2_100000.h b/contrib/libs/quicklz/1_40_2_100000.h deleted file mode 100644 index dd4e391fd7..0000000000 --- a/contrib/libs/quicklz/1_40_2_100000.h +++ /dev/null @@ -1,7 +0,0 @@ -#define COMPRESSION_LEVEL 2 -#define STREAMING_MODE 100000 -#define QLZ_YVERSION 1_40 - -#include "prolog.h" -#include "1.40/yquicklz.h" -#include "epilog.h" diff --git a/contrib/libs/quicklz/1_40_2_1000000.c b/contrib/libs/quicklz/1_40_2_1000000.c deleted file mode 100644 index 601e295d5c..0000000000 --- a/contrib/libs/quicklz/1_40_2_1000000.c +++ /dev/null @@ -1,4 +0,0 @@ -#define FROM_QUICKLZ_BUILD -#include "1_40_2_1000000.h" -#include "1.40/quicklz.c" -#include "table.inc" diff --git a/contrib/libs/quicklz/1_40_2_1000000.h b/contrib/libs/quicklz/1_40_2_1000000.h deleted file mode 100644 index 5e5f578e22..0000000000 --- a/contrib/libs/quicklz/1_40_2_1000000.h +++ /dev/null @@ -1,7 +0,0 @@ -#define COMPRESSION_LEVEL 2 -#define STREAMING_MODE 1000000 -#define QLZ_YVERSION 1_40 - -#include "prolog.h" -#include "1.40/yquicklz.h" -#include "epilog.h" diff --git a/contrib/libs/quicklz/1_40_3_0.c b/contrib/libs/quicklz/1_40_3_0.c deleted file mode 100644 index 43532ac429..0000000000 --- a/contrib/libs/quicklz/1_40_3_0.c +++ /dev/null @@ -1,4 +0,0 @@ -#define FROM_QUICKLZ_BUILD -#include "1_40_3_0.h" -#include "1.40/quicklz.c" -#include "table.inc" diff --git a/contrib/libs/quicklz/1_40_3_0.h b/contrib/libs/quicklz/1_40_3_0.h deleted file mode 100644 index 4fba431829..0000000000 --- a/contrib/libs/quicklz/1_40_3_0.h +++ /dev/null @@ -1,7 +0,0 @@ -#define COMPRESSION_LEVEL 3 -#define STREAMING_MODE 0 -#define QLZ_YVERSION 1_40 - -#include "prolog.h" -#include "1.40/yquicklz.h" -#include "epilog.h" diff --git a/contrib/libs/quicklz/1_40_3_100000.c b/contrib/libs/quicklz/1_40_3_100000.c deleted file mode 100644 index cb07b2bd48..0000000000 --- a/contrib/libs/quicklz/1_40_3_100000.c +++ /dev/null @@ -1,4 +0,0 @@ -#define FROM_QUICKLZ_BUILD -#include "1_40_3_100000.h" -#include "1.40/quicklz.c" -#include "table.inc" diff --git a/contrib/libs/quicklz/1_40_3_100000.h b/contrib/libs/quicklz/1_40_3_100000.h deleted file mode 100644 index 3f89c94f32..0000000000 --- a/contrib/libs/quicklz/1_40_3_100000.h +++ /dev/null @@ -1,7 +0,0 @@ -#define COMPRESSION_LEVEL 3 -#define STREAMING_MODE 100000 -#define QLZ_YVERSION 1_40 - -#include "prolog.h" -#include "1.40/yquicklz.h" -#include "epilog.h" diff --git a/contrib/libs/quicklz/1_40_3_1000000.c b/contrib/libs/quicklz/1_40_3_1000000.c deleted file mode 100644 index c544d6a308..0000000000 --- a/contrib/libs/quicklz/1_40_3_1000000.c +++ /dev/null @@ -1,4 +0,0 @@ -#define FROM_QUICKLZ_BUILD -#include "1_40_3_1000000.h" -#include "1.40/quicklz.c" -#include "table.inc" diff --git a/contrib/libs/quicklz/1_40_3_1000000.h b/contrib/libs/quicklz/1_40_3_1000000.h deleted file mode 100644 index d750a51b5a..0000000000 --- a/contrib/libs/quicklz/1_40_3_1000000.h +++ /dev/null @@ -1,7 +0,0 @@ -#define COMPRESSION_LEVEL 3 -#define STREAMING_MODE 1000000 -#define QLZ_YVERSION 1_40 - -#include "prolog.h" -#include "1.40/yquicklz.h" -#include "epilog.h" diff --git a/contrib/libs/quicklz/all.c b/contrib/libs/quicklz/all.c deleted file mode 100644 index cf6c3688ba..0000000000 --- a/contrib/libs/quicklz/all.c +++ /dev/null @@ -1,21 +0,0 @@ -#include "1_31_0_0.c" -#include "1_31_0_100000.c" -#include "1_31_0_1000000.c" -#include "1_31_1_0.c" -#include "1_31_1_100000.c" -#include "1_31_1_1000000.c" -#include "1_31_2_0.c" -#include "1_31_2_100000.c" -#include "1_31_2_1000000.c" -#include "1_31_3_0.c" -#include "1_31_3_100000.c" -#include "1_31_3_1000000.c" -#include "1_40_1_0.c" -#include "1_40_1_100000.c" -#include "1_40_1_1000000.c" -#include "1_40_2_0.c" -#include "1_40_2_100000.c" -#include "1_40_2_1000000.c" -#include "1_40_3_0.c" -#include "1_40_3_100000.c" -#include "1_40_3_1000000.c" diff --git a/contrib/libs/quicklz/epilog.h b/contrib/libs/quicklz/epilog.h deleted file mode 100644 index 78b6c37b3d..0000000000 --- a/contrib/libs/quicklz/epilog.h +++ /dev/null @@ -1,32 +0,0 @@ -#if !defined(FROM_QUICKLZ_BUILD) - #undef qlz_decompress - #undef qlz_compress - #undef qlz_size_decompressed - #undef qlz_size_compressed - #undef qlz_get_setting - #undef qlz_table - #undef qlz_compress_core - #undef qlz_decompress_core - #undef hash_func - #undef fast_read - #undef fast_write - #undef reset_state - #undef memcpy_up - #undef update_hash - #undef fast_read_safe - #undef same - #undef reset_table_compress - #undef reset_table_decompress - #undef hashat - #undef qlz_size_header - #undef qlz_state_compress - #undef qlz_state_decompress - #undef qlz_hash_compress - #undef qlz_hash_decompress - - #undef COMPRESSION_LEVEL - #undef STREAMING_MODE - #undef QLZ_YVERSION - #undef QLZ_COMPRESSION_LEVEL - #undef QLZ_STREAMING_BUFFER -#endif diff --git a/contrib/libs/quicklz/prolog.h b/contrib/libs/quicklz/prolog.h deleted file mode 100644 index aea8270e96..0000000000 --- a/contrib/libs/quicklz/prolog.h +++ /dev/null @@ -1,36 +0,0 @@ -#ifndef prolog_h_as78d5f67sdf -#define prolog_h_as78d5f67sdf - -#include "table.h" - -#define RENAME(a) DO_RENAME(QLZ_YVERSION, COMPRESSION_LEVEL, STREAMING_MODE, a) -#define DO_RENAME(a, b, c, d) DO_RENAME2(a, b, c, d) -#define DO_RENAME2(a, b, c, d) yqlz_ ## a ## _ ## b ## _ ## c ## _ ## d - -#endif - -#define qlz_decompress RENAME(decompress) -#define qlz_compress RENAME(compress) -#define qlz_size_decompressed RENAME(size_decompressed) -#define qlz_size_compressed RENAME(size_compressed) -#define qlz_get_setting RENAME(get_setting) -#define qlz_table RENAME(table) -#define qlz_compress_core RENAME(compress_core) -#define qlz_decompress_core RENAME(decompress_core) -#define hash_func RENAME(hash_func) -#define fast_read RENAME(fast_read) -#define fast_write RENAME(fast_write) -#define reset_state RENAME(reset_state) -#define memcpy_up RENAME(memcpy_up) -#define update_hash RENAME(update_hash) -#define fast_read_safe RENAME(fast_read_safe) -#define update_hash_upto RENAME(update_hash_upto) -#define same RENAME(same) -#define reset_table_compress RENAME(reset_table_compress) -#define reset_table_decompress RENAME(reset_table_decompress) -#define hashat RENAME(hashat) -#define qlz_size_header RENAME(qlz_size_header) -#define qlz_state_compress RENAME(qlz_state_compress) -#define qlz_state_decompress RENAME(qlz_state_decompress) -#define qlz_hash_compress RENAME(qlz_hash_compress) -#define qlz_hash_decompress RENAME(qlz_hash_decompress) diff --git a/contrib/libs/quicklz/quicklz.cpp b/contrib/libs/quicklz/quicklz.cpp deleted file mode 100644 index 044ce45d54..0000000000 --- a/contrib/libs/quicklz/quicklz.cpp +++ /dev/null @@ -1,19 +0,0 @@ -#include "quicklz.h" - -extern "C" struct TQuickLZMethods* GetLzq151Table(unsigned level, unsigned buf); - -const TQuickLZMethods* LzqTable(unsigned ver, unsigned level, unsigned buf) { - if (ver > 2 || level > 3 || buf > 2) { - return 0; - } - - if (ver == 2) { - if (!level) { - return 0; - } - - return GetLzq151Table(level - 1, buf); - } - - return GetLzqTable(ver, level, buf); -} diff --git a/contrib/libs/quicklz/quicklz.h b/contrib/libs/quicklz/quicklz.h deleted file mode 100644 index f6f542abfc..0000000000 --- a/contrib/libs/quicklz/quicklz.h +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef quicklz_h_sad8fs78d5f -#define quicklz_h_sad8fs78d5f - -#include "table.h" -#include "quicklz.inc" -#define FROM_QUICKLZ_BUILD -#include "1_31_0_0.h" -#undef FROM_QUICKLZ_BUILD -#include "table.h" - -#if defined(__cplusplus) -const TQuickLZMethods* LzqTable(unsigned ver, unsigned level, unsigned buf); -#endif - -#endif diff --git a/contrib/libs/quicklz/quicklz.inc b/contrib/libs/quicklz/quicklz.inc deleted file mode 100644 index d54e18b32e..0000000000 --- a/contrib/libs/quicklz/quicklz.inc +++ /dev/null @@ -1,21 +0,0 @@ -#include "1_31_0_0.h" -#include "1_31_0_100000.h" -#include "1_31_0_1000000.h" -#include "1_31_1_0.h" -#include "1_31_1_100000.h" -#include "1_31_1_1000000.h" -#include "1_31_2_0.h" -#include "1_31_2_100000.h" -#include "1_31_2_1000000.h" -#include "1_31_3_0.h" -#include "1_31_3_100000.h" -#include "1_31_3_1000000.h" -#include "1_40_1_0.h" -#include "1_40_1_100000.h" -#include "1_40_1_1000000.h" -#include "1_40_2_0.h" -#include "1_40_2_100000.h" -#include "1_40_2_1000000.h" -#include "1_40_3_0.h" -#include "1_40_3_100000.h" -#include "1_40_3_1000000.h" diff --git a/contrib/libs/quicklz/table.c b/contrib/libs/quicklz/table.c deleted file mode 100644 index 782a484c15..0000000000 --- a/contrib/libs/quicklz/table.c +++ /dev/null @@ -1,10 +0,0 @@ -#include "table.h" -#include "tables2.inc" - -static struct TQuickLZMethods* qlz_tables[2][4][3] = - #include "tables1.inc" -; - -struct TQuickLZMethods* GetLzqTable(unsigned ver, unsigned level, unsigned buf) { - return qlz_tables[ver][level][buf]; -} diff --git a/contrib/libs/quicklz/table.h b/contrib/libs/quicklz/table.h deleted file mode 100644 index cac42fe6f0..0000000000 --- a/contrib/libs/quicklz/table.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef table_h_asd78567asdf -#define table_h_asd78567asdf - -#include <string.h> - -#if defined(__cplusplus) -extern "C" { -#endif - -struct TQuickLZMethods { - size_t (*SizeDecompressed)(const char* source); - size_t (*SizeCompressed)(const char* source); - size_t (*Decompress)(const char* source, void* destination, char* scratch_decompress); - size_t (*Compress)(const void* source, char* destination, size_t size, char* scratch_compress); - int (*Setting)(int setting); - - const char* Name; -}; - -struct TQuickLZMethods* GetLzqTable(unsigned ver, unsigned level, unsigned buf); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/contrib/libs/quicklz/table.inc b/contrib/libs/quicklz/table.inc deleted file mode 100644 index ede67197a6..0000000000 --- a/contrib/libs/quicklz/table.inc +++ /dev/null @@ -1,51 +0,0 @@ -#include "table.h" - -#define STR(a) STR2(a) -#define STR2(a) STR3(a) -#define STR3(a) #a - -struct TQuickLZMethods qlz_table = { - qlz_size_decompressed, - qlz_size_compressed, - qlz_decompress, - qlz_compress, - qlz_get_setting, - STR(QLZ_YVERSION) "-" STR(COMPRESSION_LEVEL) "-" STR(STREAMING_MODE) -}; - -#undef STR -#undef STR2 -#undef STR3 -#undef QLZ_VERSION_MAJOR -#undef QLZ_VERSION_MINOR -#undef QLZ_VERSION_REVISION -#undef test_rle -#undef speedup_incompressible -#undef __inline -#undef X86X64 -#undef HASH_ENTRIES -#undef AND -#undef HASH_SIZE -#undef STREAMING_MODE_VALUE -#undef STREAMING_MODE_ROUNDED -#undef SCRATCH_COMPRESS -#undef SCRATCH_DECOMPRESS -#undef X86X64 -#undef MINOFFSET -#undef UNCONDITIONAL_MATCHLEN -#undef UNCOMPRESSED_END -#undef CWORD_LEN -#undef QLZ_HEADER -#undef QLZ_VERSION_MAJOR -#undef QLZ_VERSION_MINOR -#undef QLZ_VERSION_REVISION -#undef QLZ_POINTERS -#undef QLZ_HASH_VALUES -#undef QLZ_POINTERS -#undef QLZ_HASH_VALUES -#undef QLZ_POINTERS -#undef QLZ_HASH_VALUES -#undef QLZ_ALIGNMENT_PADD -#undef QLZ_BUFFER_COUNTER -#undef QLZ_SCRATCH_COMPRESS -#undef QLZ_SCRATCH_DECOMPRESS diff --git a/contrib/libs/quicklz/tables1.inc b/contrib/libs/quicklz/tables1.inc deleted file mode 100644 index fdfb28dfb1..0000000000 --- a/contrib/libs/quicklz/tables1.inc +++ /dev/null @@ -1 +0,0 @@ -{{{&yqlz_1_31_0_0_table,&yqlz_1_31_0_100000_table,&yqlz_1_31_0_1000000_table},{&yqlz_1_31_1_0_table,&yqlz_1_31_1_100000_table,&yqlz_1_31_1_1000000_table},{&yqlz_1_31_2_0_table,&yqlz_1_31_2_100000_table,&yqlz_1_31_2_1000000_table},{&yqlz_1_31_3_0_table,&yqlz_1_31_3_100000_table,&yqlz_1_31_3_1000000_table}},{{0,0,0},{&yqlz_1_40_1_0_table,&yqlz_1_40_1_100000_table,&yqlz_1_40_1_1000000_table},{&yqlz_1_40_2_0_table,&yqlz_1_40_2_100000_table,&yqlz_1_40_2_1000000_table},{&yqlz_1_40_3_0_table,&yqlz_1_40_3_100000_table,&yqlz_1_40_3_1000000_table}}} diff --git a/contrib/libs/quicklz/tables2.inc b/contrib/libs/quicklz/tables2.inc deleted file mode 100644 index 81a921ab1a..0000000000 --- a/contrib/libs/quicklz/tables2.inc +++ /dev/null @@ -1,21 +0,0 @@ -extern struct TQuickLZMethods yqlz_1_31_0_0_table; -extern struct TQuickLZMethods yqlz_1_31_0_100000_table; -extern struct TQuickLZMethods yqlz_1_31_0_1000000_table; -extern struct TQuickLZMethods yqlz_1_31_1_0_table; -extern struct TQuickLZMethods yqlz_1_31_1_100000_table; -extern struct TQuickLZMethods yqlz_1_31_1_1000000_table; -extern struct TQuickLZMethods yqlz_1_31_2_0_table; -extern struct TQuickLZMethods yqlz_1_31_2_100000_table; -extern struct TQuickLZMethods yqlz_1_31_2_1000000_table; -extern struct TQuickLZMethods yqlz_1_31_3_0_table; -extern struct TQuickLZMethods yqlz_1_31_3_100000_table; -extern struct TQuickLZMethods yqlz_1_31_3_1000000_table; -extern struct TQuickLZMethods yqlz_1_40_1_0_table; -extern struct TQuickLZMethods yqlz_1_40_1_100000_table; -extern struct TQuickLZMethods yqlz_1_40_1_1000000_table; -extern struct TQuickLZMethods yqlz_1_40_2_0_table; -extern struct TQuickLZMethods yqlz_1_40_2_100000_table; -extern struct TQuickLZMethods yqlz_1_40_2_1000000_table; -extern struct TQuickLZMethods yqlz_1_40_3_0_table; -extern struct TQuickLZMethods yqlz_1_40_3_100000_table; -extern struct TQuickLZMethods yqlz_1_40_3_1000000_table; diff --git a/contrib/libs/quicklz/ya.make b/contrib/libs/quicklz/ya.make deleted file mode 100644 index b1b6d1dc21..0000000000 --- a/contrib/libs/quicklz/ya.make +++ /dev/null @@ -1,30 +0,0 @@ -LIBRARY() - -LICENSE( - GPL-1.0-only OR - GPL-2.0-only OR - Quicklz -) - -LICENSE_TEXTS(.yandex_meta/licenses.list.txt) - -VERSION(1.5.1) - -NO_UTIL() - -NO_COMPILER_WARNINGS() - -IF (SANITIZER_TYPE == "undefined") - NO_SANITIZE() -ENDIF() - -ADDINCLSELF() - -SRCS( - all.c - table.c - quicklz.cpp - 1.51/tables.c -) - -END() diff --git a/library/cpp/streams/factory/open_by_signature/factory.cpp b/library/cpp/streams/factory/open_by_signature/factory.cpp deleted file mode 100644 index 2c96015f42..0000000000 --- a/library/cpp/streams/factory/open_by_signature/factory.cpp +++ /dev/null @@ -1,99 +0,0 @@ -#include "factory.h" - -#include <library/cpp/streams/bzip2/bzip2.h> -#include <library/cpp/streams/factory/open_common/factory.h> -#include <util/stream/holder.h> -#include <util/stream/file.h> -#include <library/cpp/streams/lz/lz.h> -#include <util/stream/str.h> -#include <util/stream/zlib.h> -#include <util/stream/multi.h> -#include <util/generic/ptr.h> -#include <util/generic/string.h> - -namespace { - template <class T> - struct TInputHolderX: public T { - inline decltype(T().Get()) Set(T t) noexcept { - t.Swap(*this); - - return this->Get(); - } - }; - - template <class T> - struct TInputHolderX<T*> { - static inline T* Set(T* t) noexcept { - return t; - } - }; - - template <class TInput> - struct TStringMultiInput: private TInputHolderX<TInput>, private TString, private THolder<IInputStream>, public TMultiInput { - TStringMultiInput(const TString& head, TInput tail) - : TString(head) - , THolder<IInputStream>(new TStringInput(*this)) - , TMultiInput(THolder<IInputStream>::Get(), this->Set(tail)) - { - } - - ~TStringMultiInput() override { - } - }; -} - -template <class TInput> -THolder<IInputStream> OpenMaybeCompressedInputX(TInput input) { - const size_t MAX_SIGNATURE_SIZE = 4; - char buffer[MAX_SIGNATURE_SIZE]; - TString header(buffer, input->Load(buffer, MAX_SIGNATURE_SIZE)); - - if (header.size() == MAX_SIGNATURE_SIZE) { - // any lz - THolder<IInputStream> lz = TryOpenOwnedLzDecompressor(new TStringMultiInput<TInput>(header, input)); - - if (lz.Get()) { - return lz; - } - } - - THolder<IInputStream> multi(new TStringMultiInput<TInput>(header, input)); - - // gzip - const TStringBuf GZIP = "\x1F\x8B"; - const TStringBuf ZLIB = "\x78\x9C"; - - if (header.StartsWith(GZIP) || header.StartsWith(ZLIB)) { - return MakeHolder<THoldingStream<TBufferedZLibDecompress>>(std::move(multi)); - } - - // bzip2 - constexpr TStringBuf BZIP2 = "BZ"; - if (header.StartsWith(BZIP2)) { - return MakeHolder<THoldingStream<TBZipDecompress>>(std::move(multi)); - } - - return multi; -} - -THolder<IInputStream> OpenMaybeCompressedInput(IInputStream* input) { - return OpenMaybeCompressedInputX(input); -} - -THolder<IInputStream> OpenOwnedMaybeCompressedInput(THolder<IInputStream> input) { - return OpenMaybeCompressedInputX(TAtomicSharedPtr<IInputStream>(input)); -} - -THolder<IInputStream> OpenMaybeCompressedInput(const TString& path) { - if (!path || path == TStringBuf("-")) { - return OpenOwnedMaybeCompressedInput(OpenStdin()); - } - return OpenOwnedMaybeCompressedInput(MakeHolder<TFileInput>(path)); -} - -THolder<IInputStream> OpenMaybeCompressedInput(const TString& path, ui32 bufSize) { - if (!path || path == TStringBuf("-")) { - return OpenOwnedMaybeCompressedInput(OpenStdin(bufSize)); - } - return OpenOwnedMaybeCompressedInput(MakeHolder<TFileInput>(path, bufSize)); -} diff --git a/library/cpp/streams/factory/open_by_signature/factory.h b/library/cpp/streams/factory/open_by_signature/factory.h deleted file mode 100644 index 7f5288bda2..0000000000 --- a/library/cpp/streams/factory/open_by_signature/factory.h +++ /dev/null @@ -1,37 +0,0 @@ -#pragma once - -#include <util/generic/fwd.h> -#include <util/generic/ptr.h> -#include <util/stream/fwd.h> - -/** - * Peeks into the provided input stream to determine its compression format, - * if any, and returns a corresponding decompressing stream. If the stream is - * not compressed, then returns a simple pass-through proxy stream. - * - * Note that returned stream doesn't own the provided input stream, thus it's - * up to the user to free them both. - * - * @param input Input stream. - * @returns Newly constructed stream. - */ -THolder<IInputStream> OpenMaybeCompressedInput(IInputStream* input); - -/** - * Same as `OpenMaybeCompressedInput`, but returned stream owns the one passed - * into this function. - * - * @param input Input stream. - * @returns Newly constructed stream. - * @see OpenMaybeCompressedInput(IInputStream*) - */ -THolder<IInputStream> OpenOwnedMaybeCompressedInput(THolder<IInputStream> input); - -/** - * @param input Input stream. - * @returns Newly constructed stream. - * @see OpenMaybeCompressedInput(IInputStream*) - */ -THolder<IInputStream> OpenMaybeCompressedInput(const TString& path); - -THolder<IInputStream> OpenMaybeCompressedInput(const TString& path, ui32 bufSize); diff --git a/library/cpp/streams/factory/open_by_signature/factory_ut.cpp b/library/cpp/streams/factory/open_by_signature/factory_ut.cpp deleted file mode 100644 index 7c0d1b436a..0000000000 --- a/library/cpp/streams/factory/open_by_signature/factory_ut.cpp +++ /dev/null @@ -1,84 +0,0 @@ -#include "factory.h" - -#include <library/cpp/streams/lz/lz.h> - -#include <library/cpp/testing/unittest/registar.h> - -#include <util/generic/buffer.h> -#include <util/generic/string.h> -#include <util/generic/vector.h> -#include <util/stream/buffer.h> -#include <util/stream/file.h> -#include <util/stream/mem.h> -#include <util/stream/zlib.h> -#include <util/system/env.h> - -static const TString plain = "aaaaaaaaaaabbbbbbbbbbbdddddd22222222000000aldkfa9s3jsfkjlkja909090909090q3lkjalkjf3aldjl"; - -static const ui8 gz[] = {31, 139, 8, 8, 126, 193, 203, 80, 0, 3, 97, 46, 116, 120, 116, 0, 75, 76, 132, 131, 36, 4, 72, 1, 3, 35, 40, 48, 0, 131, 196, 156, 148, 236, 180, 68, 203, 98, 227, 172, 226, 180, 236, 172, 156, 236, 172, 68, 75, 3, 4, 44, 52, 6, 137, 0, 113, 154, 49, 80, 97, 86, 14, 0, 5, 203, 67, 131, 88, 0, 0, 0}; -static const auto gzLength = Y_ARRAY_SIZE(gz); - -static const ui8 bz2[] = {66, 90, 104, 57, 49, 65, 89, 38, 83, 89, 140, 92, 215, 106, 0, 0, 17, 73, 128, 20, 128, 88, 32, 53, 28, 40, 0, 32, 0, 84, 66, 52, 211, 0, 6, 72, 122, 140, 131, 36, 97, 60, 92, 230, 1, 71, 91, 170, 135, 33, 135, 149, 133, 75, 174, 153, 146, 217, 24, 174, 177, 76, 246, 69, 254, 225, 195, 236, 95, 180, 93, 201, 20, 225, 66, 66, 49, 115, 93, 168}; -static const auto bz2Length = Y_ARRAY_SIZE(bz2); - -Y_UNIT_TEST_SUITE(TRecognizeCompressorTest) { - static void TestRawData(const void* data, size_t len, const TString& orig) { - TMemoryInput mem(data, len); - - THolder<IInputStream> input = OpenMaybeCompressedInput(&mem); - UNIT_ASSERT_VALUES_UNEQUAL(input.Get(), nullptr); - UNIT_ASSERT_VALUES_EQUAL(input->ReadAll(), orig); - } - - static void TestRawDataOwned(const void* data, size_t len, const TString& orig) { - THolder<IInputStream> input = OpenOwnedMaybeCompressedInput(MakeHolder<TMemoryInput>(data, len)); - UNIT_ASSERT_VALUES_UNEQUAL(input.Get(), nullptr); - UNIT_ASSERT_VALUES_EQUAL(input->ReadAll(), orig); - } - - static inline void TestSame(const TString& text) { - TestRawData(text.data(), text.size(), text); - TestRawDataOwned(text.data(), text.size(), text); - } - - Y_UNIT_TEST(TestPlain) { - TestSame(plain); - TestSame(""); - TestSame("a"); - TestSame("ab"); - TestSame("abc"); - TestSame("abcd"); - } - - Y_UNIT_TEST(TestGzip) { - TestRawData(gz, gzLength, plain); - TestRawDataOwned(gz, gzLength, plain); - } - - Y_UNIT_TEST(TestBzip2) { - TestRawData(bz2, bz2Length, plain); - TestRawDataOwned(bz2, bz2Length, plain); - } - - template <typename TCompress> - static void TestCompress() { - TBufferStream buf; - { - TCompress z(&buf); - z.Write(plain.data(), plain.size()); - } - TestRawData(buf.Buffer().Data(), buf.Buffer().Size(), plain); - } - - Y_UNIT_TEST(TestLz) { - TestCompress<TLz4Compress>(); - TestCompress<TSnappyCompress>(); - TestCompress<TLzoCompress>(); - TestCompress<TLzqCompress>(); - TestCompress<TLzfCompress>(); - } - - Y_UNIT_TEST(TestZlib) { - TestCompress<TZLibCompress>(); - } -} diff --git a/library/cpp/streams/factory/open_by_signature/ut/ya.make b/library/cpp/streams/factory/open_by_signature/ut/ya.make deleted file mode 100644 index 53136880ca..0000000000 --- a/library/cpp/streams/factory/open_by_signature/ut/ya.make +++ /dev/null @@ -1,7 +0,0 @@ -UNITTEST_FOR(library/cpp/streams/factory/open_by_signature) - -SRCS( - factory_ut.cpp -) - -END() diff --git a/library/cpp/streams/factory/open_by_signature/ya.make b/library/cpp/streams/factory/open_by_signature/ya.make deleted file mode 100644 index ed72269488..0000000000 --- a/library/cpp/streams/factory/open_by_signature/ya.make +++ /dev/null @@ -1,17 +0,0 @@ -LIBRARY() - -PEERDIR( - library/cpp/streams/bzip2 - library/cpp/streams/factory/open_common - library/cpp/streams/lz -) - -SRCS( - factory.cpp -) - -END() - -RECURSE_FOR_TESTS( - ut -) diff --git a/library/cpp/streams/factory/open_common/factory.cpp b/library/cpp/streams/factory/open_common/factory.cpp deleted file mode 100644 index c99ac44121..0000000000 --- a/library/cpp/streams/factory/open_common/factory.cpp +++ /dev/null @@ -1,19 +0,0 @@ -#include "factory.h" - -#include <util/stream/file.h> -#include <util/system/file.h> -#include <util/generic/ptr.h> - -#ifdef _win_ // isatty -#include <io.h> -#else -#include <unistd.h> -#endif - -THolder<IInputStream> OpenStdin(size_t bufSize) { - if (isatty(0)) { - return MakeHolder<TUnbufferedFileInput>(Duplicate(0)); - } - return MakeHolder<TFileInput>(Duplicate(0), bufSize); -} - diff --git a/library/cpp/streams/factory/open_common/factory.h b/library/cpp/streams/factory/open_common/factory.h deleted file mode 100644 index 5477d0969a..0000000000 --- a/library/cpp/streams/factory/open_common/factory.h +++ /dev/null @@ -1,13 +0,0 @@ -#pragma once - -#include <util/generic/fwd.h> -#include <util/generic/ptr.h> -#include <util/stream/fwd.h> - -/** - * Convenience function for opening standard input. - * - * @param bufSize Buffer size. - */ -THolder<IInputStream> OpenStdin(size_t bufSize = 1 << 13); - diff --git a/library/cpp/streams/factory/open_common/ya.make b/library/cpp/streams/factory/open_common/ya.make deleted file mode 100644 index 725dbd05b9..0000000000 --- a/library/cpp/streams/factory/open_common/ya.make +++ /dev/null @@ -1,12 +0,0 @@ -LIBRARY() - -PEERDIR( - library/cpp/streams/bzip2 -) - -SRCS( - factory.cpp -) - -END() - diff --git a/library/cpp/streams/lz/common/compressor.h b/library/cpp/streams/lz/common/compressor.h deleted file mode 100644 index 3e20b888d2..0000000000 --- a/library/cpp/streams/lz/common/compressor.h +++ /dev/null @@ -1,349 +0,0 @@ -#pragma once - -#include <util/system/yassert.h> -#include <util/system/byteorder.h> -#include <util/memory/addstorage.h> -#include <util/generic/buffer.h> -#include <util/generic/utility.h> -#include <util/generic/singleton.h> -#include <util/stream/mem.h> - -#include "error.h" - -static inline ui8 HostToLittle(ui8 t) noexcept { - return t; -} - -static inline ui8 LittleToHost(ui8 t) noexcept { - return t; -} - -struct TCommonData { - static const size_t overhead = sizeof(ui16) + sizeof(ui8); -}; - -const size_t SIGNATURE_SIZE = 4; - -template <class TCompressor, class TBase> -class TCompressorBase: public TAdditionalStorage<TCompressorBase<TCompressor, TBase>>, public TCompressor, public TCommonData { -public: - inline TCompressorBase(IOutputStream* slave, ui16 blockSize) - : Slave_(slave) - , BlockSize_(blockSize) - { - /* - * save signature - */ - static_assert(sizeof(TCompressor::signature) - 1 == SIGNATURE_SIZE, "expect sizeof(TCompressor::signature) - 1 == SIGNATURE_SIZE"); - Slave_->Write(TCompressor::signature, sizeof(TCompressor::signature) - 1); - - /* - * save version - */ - this->Save((ui32)1); - - /* - * save block size - */ - this->Save(BlockSize()); - } - - inline ~TCompressorBase() { - } - - inline void Write(const char* buf, size_t len) { - while (len) { - const ui16 toWrite = (ui16)Min<size_t>(len, this->BlockSize()); - - this->WriteBlock(buf, toWrite); - - buf += toWrite; - len -= toWrite; - } - } - - inline void Flush() { - } - - inline void Finish() { - this->Flush(); - this->WriteBlock(nullptr, 0); - } - - template <class T> - static inline void Save(T t, IOutputStream* out) { - t = HostToLittle(t); - - out->Write(&t, sizeof(t)); - } - - template <class T> - inline void Save(T t) { - Save(t, Slave_); - } - -private: - inline void* Block() const noexcept { - return this->AdditionalData(); - } - - inline ui16 BlockSize() const noexcept { - return BlockSize_; - } - - inline void WriteBlock(const void* ptr, ui16 len) { - Y_ASSERT(len <= this->BlockSize()); - - ui8 compressed = false; - - if (len) { - const size_t out = this->Compress((const char*)ptr, len, (char*)Block(), this->AdditionalDataLength()); - // catch compressor buffer overrun (e.g. SEARCH-2043) - //Y_ABORT_UNLESS(out <= this->Hint(this->BlockSize())); - - if (out < len || TCompressor::SaveIncompressibleChunks()) { - compressed = true; - ptr = Block(); - len = (ui16)out; - } - } - - char tmp[overhead]; - TMemoryOutput header(tmp, sizeof(tmp)); - - this->Save(len, &header); - this->Save(compressed, &header); - - using TPart = IOutputStream::TPart; - if (ptr) { - const TPart parts[] = { - TPart(tmp, sizeof(tmp)), - TPart(ptr, len), - }; - - Slave_->Write(parts, sizeof(parts) / sizeof(*parts)); - } else { - Slave_->Write(tmp, sizeof(tmp)); - } - } - -private: - IOutputStream* Slave_; - const ui16 BlockSize_; -}; - -template <class T> -static inline T GLoad(IInputStream* input) { - T t; - - if (input->Load(&t, sizeof(t)) != sizeof(t)) { - ythrow TDecompressorError() << "stream error"; - } - - return LittleToHost(t); -} - -class TDecompressSignature { -public: - inline TDecompressSignature(IInputStream* input) { - if (input->Load(Buffer_, SIGNATURE_SIZE) != SIGNATURE_SIZE) { - ythrow TDecompressorError() << "can not load stream signature"; - } - } - - template <class TDecompressor> - inline bool Check() const { - static_assert(sizeof(TDecompressor::signature) - 1 == SIGNATURE_SIZE, "expect sizeof(TDecompressor::signature) - 1 == SIGNATURE_SIZE"); - return memcmp(TDecompressor::signature, Buffer_, SIGNATURE_SIZE) == 0; - } - -private: - char Buffer_[SIGNATURE_SIZE]; -}; - -template <class TDecompressor> -static inline IInputStream* ConsumeSignature(IInputStream* input) { - TDecompressSignature sign(input); - if (!sign.Check<TDecompressor>()) { - ythrow TDecompressorError() << "incorrect signature"; - } - return input; -} - -template <class TDecompressor> -class TDecompressorBaseImpl: public TDecompressor, public TCommonData { -public: - static inline ui32 CheckVer(ui32 v) { - if (v != 1) { - ythrow yexception() << TStringBuf("incorrect stream version: ") << v; - } - - return v; - } - - inline TDecompressorBaseImpl(IInputStream* slave) - : Slave_(slave) - , Input_(nullptr, 0) - , Eof_(false) - , Version_(CheckVer(Load<ui32>())) - , BlockSize_(Load<ui16>()) - , OutBufSize_(TDecompressor::Hint(BlockSize_)) - , Tmp_(2 * OutBufSize_) - , In_(Tmp_.Data()) - , Out_(In_ + OutBufSize_) - { - this->InitFromStream(Slave_); - } - - inline ~TDecompressorBaseImpl() { - } - - inline size_t Read(void* buf, size_t len) { - size_t ret = Input_.Read(buf, len); - - if (ret) { - return ret; - } - - if (Eof_) { - return 0; - } - - this->FillNextBlock(); - - ret = Input_.Read(buf, len); - - if (ret) { - return ret; - } - - Eof_ = true; - - return 0; - } - - inline void FillNextBlock() { - char tmp[overhead]; - - if (Slave_->Load(tmp, sizeof(tmp)) != sizeof(tmp)) { - ythrow TDecompressorError() << "can not read block header"; - } - - TMemoryInput header(tmp, sizeof(tmp)); - - const ui16 len = GLoad<ui16>(&header); - if (len > Tmp_.Capacity()) { - ythrow TDecompressorError() << "invalid len inside block header"; - } - const ui8 compressed = GLoad<ui8>(&header); - - if (compressed > 1) { - ythrow TDecompressorError() << "broken header"; - } - - if (Slave_->Load(In_, len) != len) { - ythrow TDecompressorError() << "can not read data"; - } - - if (compressed) { - const size_t ret = this->Decompress(In_, len, Out_, OutBufSize_); - - Input_.Reset(Out_, ret); - } else { - Input_.Reset(In_, len); - } - } - - template <class T> - inline T Load() { - return GLoad<T>(Slave_); - } - -protected: - IInputStream* Slave_; - TMemoryInput Input_; - bool Eof_; - const ui32 Version_; - const ui16 BlockSize_; - const size_t OutBufSize_; - TBuffer Tmp_; - char* In_; - char* Out_; -}; - -template <class TDecompressor, class TBase> -class TDecompressorBase: public TDecompressorBaseImpl<TDecompressor> { -public: - inline TDecompressorBase(IInputStream* slave) - : TDecompressorBaseImpl<TDecompressor>(ConsumeSignature<TDecompressor>(slave)) - { - } - - inline ~TDecompressorBase() { - } -}; - -#define DEF_COMPRESSOR_COMMON(rname, name) \ - rname::~rname() { \ - try { \ - Finish(); \ - } catch (...) { \ - } \ - } \ - \ - void rname::DoWrite(const void* buf, size_t len) { \ - if (!Impl_) { \ - ythrow yexception() << "can not write to finalized stream"; \ - } \ - \ - Impl_->Write((const char*)buf, len); \ - } \ - \ - void rname::DoFlush() { \ - if (!Impl_) { \ - ythrow yexception() << "can not flush finalized stream"; \ - } \ - \ - Impl_->Flush(); \ - } \ - \ - void rname::DoFinish() { \ - THolder<TImpl> impl(Impl_.Release()); \ - \ - if (impl) { \ - impl->Finish(); \ - } \ - } - -#define DEF_COMPRESSOR(rname, name) \ - class rname::TImpl: public TCompressorBase<name, TImpl> { \ - public: \ - inline TImpl(IOutputStream* out, ui16 blockSize) \ - : TCompressorBase<name, TImpl>(out, blockSize) { \ - } \ - }; \ - \ - rname::rname(IOutputStream* slave, ui16 blockSize) \ - : Impl_(new (TImpl::Hint(blockSize)) TImpl(slave, blockSize)) { \ - } \ - \ - DEF_COMPRESSOR_COMMON(rname, name) - -#define DEF_DECOMPRESSOR(rname, name) \ - class rname::TImpl: public TDecompressorBase<name, TImpl> { \ - public: \ - inline TImpl(IInputStream* in) \ - : TDecompressorBase<name, TImpl>(in) { \ - } \ - }; \ - \ - rname::rname(IInputStream* slave) \ - : Impl_(new TImpl(slave)) { \ - } \ - \ - rname::~rname() { \ - } \ - \ - size_t rname::DoRead(void* buf, size_t len) { \ - return Impl_->Read(buf, len); \ - } diff --git a/library/cpp/streams/lz/lz.cpp b/library/cpp/streams/lz/lz.cpp deleted file mode 100644 index 63c6e96487..0000000000 --- a/library/cpp/streams/lz/lz.cpp +++ /dev/null @@ -1,324 +0,0 @@ -#include "lz.h" - -#include <util/system/yassert.h> -#include <util/system/byteorder.h> -#include <util/memory/addstorage.h> -#include <util/generic/buffer.h> -#include <util/generic/utility.h> -#include <util/generic/singleton.h> -#include <util/generic/yexception.h> -#include <util/stream/mem.h> - -#include <library/cpp/streams/lz/common/compressor.h> - -#include <library/cpp/streams/lz/lz4/block.h> -#include <library/cpp/streams/lz/snappy/block.h> - -#include <contrib/libs/fastlz/fastlz.h> -#include <contrib/libs/quicklz/quicklz.h> -#include <contrib/libs/minilzo/minilzo.h> - -/* - * MiniLzo - */ -class TMiniLzo { - class TInit { - public: - inline TInit() { - if (lzo_init() != LZO_E_OK) { - ythrow yexception() << "can not init lzo engine"; - } - } - }; - -public: - static const char signature[]; - - inline TMiniLzo() { - Singleton<TInit>(); - } - - inline ~TMiniLzo() { - } - - static inline size_t Hint(size_t len) noexcept { - // see SEARCH-2043 and, e.g. examples at - // http://stackoverflow.com/questions/4235019/how-to-get-lzo-to-work-with-a-file-stream - return len + (len / 16) + 64 + 3; - } - - static inline bool SaveIncompressibleChunks() noexcept { - return false; - } -}; - -const char TMiniLzo::signature[] = "YLZO"; - -template <size_t N> -class TFixedArray { -public: - inline TFixedArray() noexcept { - memset(WorkMem_, 0, sizeof(WorkMem_)); - } - -protected: - char WorkMem_[N]; -}; - -class TMiniLzoCompressor: public TMiniLzo, public TFixedArray<LZO1X_MEM_COMPRESS + 1> { -public: - inline size_t Compress(const char* data, size_t len, char* ptr, size_t /*dstMaxSize*/) { - lzo_uint out = 0; - lzo1x_1_compress((const lzo_bytep)data, len, (lzo_bytep)ptr, &out, WorkMem_); - - return out; - } -}; - -class TMiniLzoDecompressor: public TMiniLzo, public TFixedArray<LZO1X_MEM_DECOMPRESS + 1> { -public: - inline size_t Decompress(const char* data, size_t len, char* ptr, size_t /*max*/) { - lzo_uint ret = 0; - - lzo1x_decompress((const lzo_bytep)data, len, (lzo_bytep)ptr, &ret, WorkMem_); - - return ret; - } - - inline void InitFromStream(IInputStream*) const noexcept { - } -}; - -DEF_COMPRESSOR(TLzoCompress, TMiniLzoCompressor) -DEF_DECOMPRESSOR(TLzoDecompress, TMiniLzoDecompressor) - -/* - * FastLZ - */ -class TFastLZ { -public: - static const char signature[]; - - static inline size_t Hint(size_t len) noexcept { - return Max<size_t>((size_t)(len * 1.06), 100); - } - - inline size_t Compress(const char* data, size_t len, char* ptr, size_t /*dstMaxSize*/) { - return fastlz_compress(data, len, ptr); - } - - inline size_t Decompress(const char* data, size_t len, char* ptr, size_t max) { - return fastlz_decompress(data, len, ptr, max); - } - - inline void InitFromStream(IInputStream*) const noexcept { - } - - static inline bool SaveIncompressibleChunks() noexcept { - return false; - } -}; - -const char TFastLZ::signature[] = "YLZF"; - -DEF_COMPRESSOR(TLzfCompress, TFastLZ) -DEF_DECOMPRESSOR(TLzfDecompress, TFastLZ) - -/* - * QuickLZ - */ -class TQuickLZBase { -public: - static const char signature[]; - - static inline size_t Hint(size_t len) noexcept { - return len + 500; - } - - inline TQuickLZBase() - : Table_(nullptr) - { - } - - inline void Init(unsigned ver, unsigned lev, unsigned mod, unsigned type) { - Table_ = LzqTable(ver, lev, mod); - - if (!Table_) { - ythrow yexception() << "unsupported lzq stream(" << ver << ", " << lev << ", " << mod << ")"; - } - - const size_t size = Table_->Setting(3) + Table_->Setting(type); - - Mem_.Reset(::operator new(size)); - memset(Mem_.Get(), 0, size); - } - - inline bool SaveIncompressibleChunks() const noexcept { - // we must save incompressible chunks "as is" - // after compressor run in streaming mode - return Table_->Setting(3); - } - -protected: - const TQuickLZMethods* Table_; - THolder<void> Mem_; -}; - -const char TQuickLZBase::signature[] = "YLZQ"; - -class TQuickLZCompress: public TQuickLZBase { -public: - inline size_t Compress(const char* data, size_t len, char* ptr, size_t /*dstMaxSize*/) { - return Table_->Compress(data, ptr, len, (char*)Mem_.Get()); - } -}; - -class TQuickLZDecompress: public TQuickLZBase { -public: - inline size_t Decompress(const char* data, size_t /*len*/, char* ptr, size_t /*max*/) { - return Table_->Decompress(data, ptr, (char*)Mem_.Get()); - } - - inline void InitFromStream(IInputStream* in) { - const ui8 ver = ::GLoad<ui8>(in); - const ui8 lev = ::GLoad<ui8>(in); - const ui8 mod = ::GLoad<ui8>(in); - - Init(ver, lev, mod, 2); - } -}; - -class TLzqCompress::TImpl: public TCompressorBase<TQuickLZCompress, TImpl> { -public: - inline TImpl(IOutputStream* out, ui16 blockSize, EVersion ver, unsigned level, EMode mode) - : TCompressorBase<TQuickLZCompress, TImpl>(out, blockSize) - { - memset(AdditionalData(), 0, AdditionalDataLength()); - - Init(ver, level, mode, 1); - - Save((ui8)ver); - Save((ui8)level); - Save((ui8)mode); - } -}; - -TLzqCompress::TLzqCompress(IOutputStream* slave, ui16 blockSize, EVersion ver, unsigned level, EMode mode) - : Impl_(new (TImpl::Hint(blockSize)) TImpl(slave, blockSize, ver, level, mode)) -{ -} - -DEF_COMPRESSOR_COMMON(TLzqCompress, TQuickLZCompress) -DEF_DECOMPRESSOR(TLzqDecompress, TQuickLZDecompress) - -namespace { - template <class T> - struct TInputHolder { - static inline T Set(T t) noexcept { - return t; - } - }; - - template <class T> - struct TInputHolder<TAutoPtr<T>> { - inline T* Set(TAutoPtr<T> v) noexcept { - V_ = v; - - return V_.Get(); - } - - TAutoPtr<T> V_; - }; - - // Decompressing input streams without signature verification - template <class TInput, class TDecompressor> - class TLzDecompressInput: public TInputHolder<TInput>, public IInputStream { - public: - inline TLzDecompressInput(TInput in) - : Impl_(this->Set(in)) - { - } - - private: - size_t DoRead(void* buf, size_t len) override { - return Impl_.Read(buf, len); - } - - private: - TDecompressorBaseImpl<TDecompressor> Impl_; - }; -} - -template <class T> -static TAutoPtr<IInputStream> TryOpenLzDecompressorX(const TDecompressSignature& s, T input) { - if (s.Check<TLZ4>()) - return new TLzDecompressInput<T, TLZ4>(input); - - if (s.Check<TSnappy>()) - return new TLzDecompressInput<T, TSnappy>(input); - - if (s.Check<TMiniLzo>()) - return new TLzDecompressInput<T, TMiniLzoDecompressor>(input); - - if (s.Check<TFastLZ>()) - return new TLzDecompressInput<T, TFastLZ>(input); - - if (s.Check<TQuickLZDecompress>()) - return new TLzDecompressInput<T, TQuickLZDecompress>(input); - - return nullptr; -} - -template <class T> -static inline TAutoPtr<IInputStream> TryOpenLzDecompressorImpl(const TStringBuf& signature, T input) { - if (signature.size() == SIGNATURE_SIZE) { - TMemoryInput mem(signature.data(), signature.size()); - TDecompressSignature s(&mem); - - return TryOpenLzDecompressorX(s, input); - } - - return nullptr; -} - -template <class T> -static inline TAutoPtr<IInputStream> TryOpenLzDecompressorImpl(T input) { - TDecompressSignature s(&*input); - - return TryOpenLzDecompressorX(s, input); -} - -template <class T> -static inline TAutoPtr<IInputStream> OpenLzDecompressorImpl(T input) { - TAutoPtr<IInputStream> ret = TryOpenLzDecompressorImpl(input); - - if (!ret) { - ythrow TDecompressorError() << "Unknown compression format"; - } - - return ret; -} - -TAutoPtr<IInputStream> OpenLzDecompressor(IInputStream* input) { - return OpenLzDecompressorImpl(input); -} - -TAutoPtr<IInputStream> TryOpenLzDecompressor(IInputStream* input) { - return TryOpenLzDecompressorImpl(input); -} - -TAutoPtr<IInputStream> TryOpenLzDecompressor(const TStringBuf& signature, IInputStream* input) { - return TryOpenLzDecompressorImpl(signature, input); -} - -TAutoPtr<IInputStream> OpenOwnedLzDecompressor(TAutoPtr<IInputStream> input) { - return OpenLzDecompressorImpl(input); -} - -TAutoPtr<IInputStream> TryOpenOwnedLzDecompressor(TAutoPtr<IInputStream> input) { - return TryOpenLzDecompressorImpl(input); -} - -TAutoPtr<IInputStream> TryOpenOwnedLzDecompressor(const TStringBuf& signature, TAutoPtr<IInputStream> input) { - return TryOpenLzDecompressorImpl(signature, input); -} diff --git a/library/cpp/streams/lz/lz4/block.h b/library/cpp/streams/lz/lz4/block.h deleted file mode 100644 index 9a912c0be2..0000000000 --- a/library/cpp/streams/lz/lz4/block.h +++ /dev/null @@ -1,35 +0,0 @@ -#pragma once - -#include <library/cpp/streams/lz/common/compressor.h> - -#include <contrib/libs/lz4/lz4.h> - -/* - * LZ4 - */ -class TLZ4 { -public: - static constexpr char signature[]= "LZ.4"; - - static inline size_t Hint(size_t len) noexcept { - return Max<size_t>((size_t)(len * 1.06), 100); - } - - inline size_t Compress(const char* data, size_t len, char* ptr, size_t dstMaxSize) { - return LZ4_compress_default(data, ptr, len, dstMaxSize); - } - - inline size_t Decompress(const char* data, size_t len, char* ptr, size_t max) { - int res = LZ4_decompress_safe(data, ptr, len, max); - if (res < 0) - ythrow TDecompressorError(); - return res; - } - - inline void InitFromStream(IInputStream*) const noexcept { - } - - static inline bool SaveIncompressibleChunks() noexcept { - return false; - } -}; diff --git a/library/cpp/streams/lz/lz4/lz4.cpp b/library/cpp/streams/lz/lz4/lz4.cpp deleted file mode 100644 index 220e358c07..0000000000 --- a/library/cpp/streams/lz/lz4/lz4.cpp +++ /dev/null @@ -1,5 +0,0 @@ -#include "lz4.h" -#include "block.h" - -DEF_COMPRESSOR(TLz4Compress, TLZ4) -DEF_DECOMPRESSOR(TLz4Decompress, TLZ4) diff --git a/library/cpp/streams/lz/lz4/ya.make b/library/cpp/streams/lz/lz4/ya.make deleted file mode 100644 index 162fe68632..0000000000 --- a/library/cpp/streams/lz/lz4/ya.make +++ /dev/null @@ -1,11 +0,0 @@ -LIBRARY() - -PEERDIR( - contrib/libs/lz4 -) - -SRCS( - lz4.cpp -) - -END() diff --git a/library/cpp/streams/lz/lz_ut.cpp b/library/cpp/streams/lz/lz_ut.cpp deleted file mode 100644 index 6876f070fc..0000000000 --- a/library/cpp/streams/lz/lz_ut.cpp +++ /dev/null @@ -1,287 +0,0 @@ -#include "lz.h" - -#include <library/cpp/testing/unittest/registar.h> -#include <library/cpp/resource/resource.h> - -#include <util/stream/file.h> -#include <util/generic/vector.h> -#include <util/system/tempfile.h> -#include <util/generic/singleton.h> - -#define LDATA "./ldata" -#define LDATA_RANDOM "./ldata.random" - -static const TString data = "aa aaa aa aaa aa aaa bb bbb bb bbb bb bbb"; - -namespace { - /** - * Produces well-formed random crap - **/ - TString RandomString(size_t size) { - TString entropy(NResource::Find("/random.data")); - TString result; - size_t seed = 1; - size_t j = 0; - for (size_t i = 0; i < size; ++i) { - seed *= 3; - char sym; - do { - sym = char((seed ^ i) % 256); - if (!sym) { - seed += 1; - } - } while (!sym); - Y_ASSERT(sym); - j = (j + 1) % entropy.size(); - result += char(sym + entropy[j]); - } - return result; - } - - TVector<TString> InitRandomData() { - static const TVector<size_t> sizes = { - 0, - 1, - 127, - 2017, - 32767, - }; - - TVector<TString> result; - for (auto size : sizes) { - result.push_back(RandomString(size)); - } - result.push_back(NResource::Find("/request.data")); - return result; - } - - TString TestFileName(const TString& d, size_t bufferSize) { - return LDATA_RANDOM + TString(".") + ToString(d.size()) + TString(".") + ToString(bufferSize); - } - - struct TRandomData: public TVector<TString> { - inline TRandomData() { - InitRandomData().swap(*this); - } - }; -} - -static const TVector<size_t> bufferSizes = { - 127, - 1024, - 32768, -}; - -namespace { - template <TLzqCompress::EVersion Ver, int Level, TLzqCompress::EMode Mode> - struct TLzqCompressX: public TLzqCompress { - inline TLzqCompressX(IOutputStream* out, size_t bufLen) - : TLzqCompress(out, bufLen, Ver, Level, Mode) - { - } - }; -} - -template <class C> -static inline void TestGoodDataCompress() { - TFixedBufferFileOutput o(LDATA); - C c(&o, 1024); - - TString d = data; - - for (size_t i = 0; i < 10; ++i) { - c.Write(d.data(), d.size()); - c << Endl; - d = d + d; - } - - c.Finish(); - o.Finish(); -} - -template <class C> -static inline void TestIncompressibleDataCompress(const TString& d, size_t bufferSize) { - TString testFileName = TestFileName(d, bufferSize); - TFixedBufferFileOutput o(testFileName); - C c(&o, bufferSize); - c.Write(d.data(), d.size()); - c.Finish(); - o.Finish(); -} - -template <class C> -static inline void TestCompress() { - TestGoodDataCompress<C>(); - for (auto bufferSize : bufferSizes) { - for (auto rd : *Singleton<TRandomData>()) { - TestIncompressibleDataCompress<C>(rd, bufferSize); - } - } -} - -template <class D> -static inline void TestGoodDataDecompress() { - TTempFile tmpFile(LDATA); - - { - TFileInput i1(LDATA); - D ld(&i1); - - TString d = data; - - for (size_t i2 = 0; i2 < 10; ++i2) { - UNIT_ASSERT_EQUAL(ld.ReadLine(), d); - - d = d + d; - } - } -} - -template <class D> -static inline void TestIncompressibleDataDecompress(const TString& d, size_t bufferSize) { - TString testFileName = TestFileName(d, bufferSize); - TTempFile tmpFile(testFileName); - - { - TFileInput i(testFileName); - D ld(&i); - - UNIT_ASSERT_EQUAL(ld.ReadAll(), d); - } -} - -template <class D> -static inline void TestDecompress() { - TestGoodDataDecompress<D>(); - for (auto bufferSize : bufferSizes) { - for (auto rd : *Singleton<TRandomData>()) { - TestIncompressibleDataDecompress<D>(rd, bufferSize); - } - } -} - -class TMixedDecompress: public IInputStream { -public: - TMixedDecompress(IInputStream* input) - : Slave_(OpenLzDecompressor(input).Release()) - { - } - -private: - size_t DoRead(void* buf, size_t len) override { - return Slave_->Read(buf, len); - } - -private: - THolder<IInputStream> Slave_; -}; - -template <class C> -static inline void TestMixedDecompress() { - TestCompress<C>(); - TestDecompress<TMixedDecompress>(); -} - -template <class D, class C> -static inline void TestDecompressError() { - TestCompress<C>(); - UNIT_ASSERT_EXCEPTION(TestDecompress<D>(), TDecompressorError); -} - -Y_UNIT_TEST_SUITE(TLzTest) { - Y_UNIT_TEST(TestLzo) { - TestCompress<TLzoCompress>(); - TestDecompress<TLzoDecompress>(); - } - - Y_UNIT_TEST(TestLzf) { - TestCompress<TLzfCompress>(); - TestDecompress<TLzfDecompress>(); - } - - Y_UNIT_TEST(TestLzq) { - TestCompress<TLzqCompress>(); - TestDecompress<TLzqDecompress>(); - } - - Y_UNIT_TEST(TestLzq151_1) { - TestCompress<TLzqCompressX<TLzqCompress::V_1_51, 1, TLzqCompress::M_0>>(); - TestDecompress<TLzqDecompress>(); - } - - Y_UNIT_TEST(TestLzq151_2) { - TestCompress<TLzqCompressX<TLzqCompress::V_1_51, 2, TLzqCompress::M_100000>>(); - TestDecompress<TLzqDecompress>(); - } - - Y_UNIT_TEST(TestLzq151_3) { - TestCompress<TLzqCompressX<TLzqCompress::V_1_51, 3, TLzqCompress::M_1000000>>(); - TestDecompress<TLzqDecompress>(); - } - - Y_UNIT_TEST(TestLzq140_1) { - TestCompress<TLzqCompressX<TLzqCompress::V_1_40, 1, TLzqCompress::M_0>>(); - TestDecompress<TLzqDecompress>(); - } - - Y_UNIT_TEST(TestLzq140_2) { - TestCompress<TLzqCompressX<TLzqCompress::V_1_40, 2, TLzqCompress::M_100000>>(); - TestDecompress<TLzqDecompress>(); - } - - Y_UNIT_TEST(TestLzq140_3) { - TestCompress<TLzqCompressX<TLzqCompress::V_1_40, 3, TLzqCompress::M_1000000>>(); - TestDecompress<TLzqDecompress>(); - } - - Y_UNIT_TEST(TestLz4) { - TestCompress<TLz4Compress>(); - TestDecompress<TLz4Decompress>(); - } - - Y_UNIT_TEST(TestSnappy) { - TestCompress<TSnappyCompress>(); - TestDecompress<TSnappyDecompress>(); - } - - Y_UNIT_TEST(TestGeneric) { - TestMixedDecompress<TLzoCompress>(); - TestMixedDecompress<TLzfCompress>(); - TestMixedDecompress<TLzqCompress>(); - TestMixedDecompress<TLz4Compress>(); - TestMixedDecompress<TSnappyCompress>(); - } - - Y_UNIT_TEST(TestDecompressorError) { - TestDecompressError<TLzoDecompress, TLzfCompress>(); - TestDecompressError<TLzfDecompress, TLzqCompress>(); - TestDecompressError<TLzqDecompress, TLz4Compress>(); - TestDecompressError<TLz4Decompress, TSnappyCompress>(); - TestDecompressError<TSnappyDecompress, TBufferedOutput>(); - TestDecompressError<TMixedDecompress, TBufferedOutput>(); - } - - Y_UNIT_TEST(TestFactory) { - TStringStream ss; - - { - TLz4Compress c(&ss); - - c.Write("123456789", 9); - c.Finish(); - } - - TAutoPtr<IInputStream> is(OpenOwnedLzDecompressor(new TStringInput(ss.Str()))); - - UNIT_ASSERT_EQUAL(is->ReadAll(), "123456789"); - } - - Y_UNIT_TEST(TestYQ609) { - auto data = NResource::Find("/yq_609.data"); - - TMemoryInput input(data.Data(), data.Size()); - - TLz4Decompress d(&input); - UNIT_ASSERT_EXCEPTION(d.ReadAll(), TDecompressorError); - } -} diff --git a/library/cpp/streams/lz/snappy/block.h b/library/cpp/streams/lz/snappy/block.h deleted file mode 100644 index 2a09a17dad..0000000000 --- a/library/cpp/streams/lz/snappy/block.h +++ /dev/null @@ -1,37 +0,0 @@ -#pragma once - -#include <library/cpp/streams/lz/common/compressor.h> - -#include <contrib/libs/snappy/snappy.h> - -/* - * Snappy - */ -class TSnappy { -public: - static constexpr char signature[] = "Snap"; - - static inline size_t Hint(size_t len) noexcept { - return Max<size_t>(snappy::MaxCompressedLength(len), 100); - } - - inline size_t Compress(const char* data, size_t len, char* ptr, size_t /*dstMaxSize*/) { - size_t reslen = 0; - snappy::RawCompress(data, len, ptr, &reslen); - return reslen; - } - - inline size_t Decompress(const char* data, size_t len, char* ptr, size_t) { - size_t srclen = 0; - if (!snappy::GetUncompressedLength(data, len, &srclen) || !snappy::RawUncompress(data, len, ptr)) - ythrow TDecompressorError(); - return srclen; - } - - inline void InitFromStream(IInputStream*) const noexcept { - } - - static inline bool SaveIncompressibleChunks() noexcept { - return false; - } -}; diff --git a/library/cpp/streams/lz/snappy/snappy.cpp b/library/cpp/streams/lz/snappy/snappy.cpp deleted file mode 100644 index bdb27db9b6..0000000000 --- a/library/cpp/streams/lz/snappy/snappy.cpp +++ /dev/null @@ -1,5 +0,0 @@ -#include "snappy.h" -#include "block.h" - -DEF_COMPRESSOR(TSnappyCompress, TSnappy) -DEF_DECOMPRESSOR(TSnappyDecompress, TSnappy) diff --git a/library/cpp/streams/lz/snappy/ya.make b/library/cpp/streams/lz/snappy/ya.make deleted file mode 100644 index a453f2d304..0000000000 --- a/library/cpp/streams/lz/snappy/ya.make +++ /dev/null @@ -1,11 +0,0 @@ -LIBRARY() - -PEERDIR( - contrib/libs/snappy -) - -SRCS( - snappy.cpp -) - -END() diff --git a/library/cpp/streams/lz/ut/random.data b/library/cpp/streams/lz/ut/random.data Binary files differdeleted file mode 100644 index 6b3c159b58..0000000000 --- a/library/cpp/streams/lz/ut/random.data +++ /dev/null diff --git a/library/cpp/streams/lz/ut/request.data b/library/cpp/streams/lz/ut/request.data deleted file mode 100644 index 6a29bfe6af..0000000000 --- a/library/cpp/streams/lz/ut/request.data +++ /dev/null @@ -1 +0,0 @@ -pron=snipfactors&pron=grmult_QUICK_SAMOHOD_ON_MIDDLE%3Ad%3A0.1%3A0.1&pron=umrfull&pron=usemiddleownerdata&pron=onlyfastrank&pron=sortbyfastmn&pron=rtb2000000&pron=tbs120000&pron=multbs0.63&pron=versiontbs2&pron=wffrm_ru.fast.download&pron=whrm_ru.hast.download&pron=rcy-lzo&qtree=cHic7V0NdFXVlb7nvpuXxyFhXgNx4Z0ljURpYFkbwZlxaR2s80apf0VmlrVvqgNIgBRI4kuE6KxZTYJABIZg_VlqUSnIj2hfIAiEAAEELag479k1SrV1KuMvrXUW2pnxr875ufe-87PvvS_JKyrGtQzvvrP3vufs_e2zz88-5-ErcEmsKB4daVSgKrPaKDNsY7QxzhhvXFgSM-IG-d6oMqqNS4omFU02rjemRmejlch4ABlrkNGFjD3IIP8dQkYGzbBfQfgHmLPFCBsVVzztlqb6m6bNsFGFJ7ZYEGtMMqjY2Y8fOd0V67Io0quNC9ClDTEUN2yXYrRRRfiq0SQ0-S6T1M2YjVJXYLc0jkayd1xgTEHtSXNdenqM8NIXD5-OySfzG43kc2T6kLhpI_ejYaNv0I-zjWbzNjNmzi5uKG5BBqmbfbAUz1JaNyzbmunJbM4uIf-3ZZfTRqKKgFa-id1GKpxQW58pYY1VKEmb38SkyebktW6TVxVhhShuek03SFtN28x0sQbGicBYtj2zObM108u-YaXZDvZ5GPkczWyTyzLbnM-IfN4pfN7tfCaazC4UZK0QeLtzNPnI8eipnEU5Gqd-JeR7K7vQeUNJ3LItUtvdzpNBytq8t0QIV5v2di6hPbs8R-XUBeDP7BL4Nws17hY-i5rao9HHCU0ssydQ370F0beqG_q0rAA655roFb5fJryhjWlyuGJ5w9U98SKUei6Kyzx4dme6vrIQFYHB4Aa2kNeq14-qIPDgJcsK2vKT7XIiAFW7egDkDpi94ySgidWH4LvQGMIEQ04Jc6dqobPvJtrrpnGmCjmeNIxoMco9jDrm7FizQcIYEsLY00W4XgljZZktmW1E6N7MLspK-qteKZQNAULZymI3lAHcUDg7aLFwBlCTkLayWA5p_4IBOtJlIDegtyYNoifEvAvSuOtDw6dXxIfYI4mYXk0gwMk0fMzEI1Ri0pfuFLos1JKMpHfsJ1WIsCrsESCwJ9TFOV1Yxb9Mzl8Rx31U8njVwhqUXW32-gB5E8L_oACZKV-CrglAd7HpQpfR62C1Lv17hlVWTNC52HTRiaaaBJ2VmJU4eEAXmFPQEoJHb3hJG6hUdnEUGDy2EJu0MmfuzewOHTw-Pio3eJQ4IW9bXuQMHiVKOmAeJXvaOIxzNIr-qQZ6GQqY_lOtJhYFdqsuYW1Kd-9jf_c7XSvc7f45Au9Awubw_DyH4fZRFKCDSPu-w0lzU1prPe8nChEc4DGj1gpW13G4RLS_ZF3-rpxtx2EFKxJ1DtqU9hwcl2mJL8jUKEetOML_mYAjtGV6icAW2pFm20Id4eDUnCNInJAj_Ak5jiBREkc4OFV2hLXUsBKRbNhnkubGNDSN9MYpRh6GzEGRR69eZ9Qrw8AUwOgNuZlJqeqlSvZB9UsQ_p6ienPCeKC7RD7qJtSQisdQNpsUjh5a7f43YXzV3dVEwUwE1e9thlCTByJ4ilKTyPTaJqkqEcDyb6cjbl0oPVSZbSazNy0mRiYM8vLAZZiWxFFuJNGvpYHUVZqcO5Lm6q1JtEUQxXg4-1Bil0hTzQznwbQjtXWzPGk_wBaRViOuWBBxa7aS_7tyJuXyanLVadSkkYcIfU-dJ3o0jhLR82rmKDCJSDAR1zm6EP6-Ypxo5onMrmxHqH0e8MzjcECx9bvMQA4BsdEDETm6no2dsr7E11dNfelpQW3djPoFjaH9yfFzvKUnhwUC1gnekbgkpOLHz5Gx9V0c5YUqvDq9qkdgeA1X4XW1IEqAhLU6vbVXFQaAioiLOJKZuAnYrbZQNbO9M4nWqXD1W_1aDXQezQ22ETzUSh_xVgsJNaTWiUyrpJAolFDLGh2FSQFTARSIlCqOpguZeKRZYVUVVRujS2M_jrcg8hjJ41FmVZ8QQSJMGSSGNi_5MkFNuWFMS9iHEP6hosAYXamcUdM4x0ZjR6MqR48xQI9rHq509egxQdpMMm16JKOp4iSN_hX2CgVome1pGQoCSnUsjLZoK6qs5BbLbdzDFp6EKQRMVvWgheTopChrkv8ycgbhGb6aGlIx5ltV51WcN7biS6Qx-y2Ea9Qm1dbNr6lrqk9R4-daFdCkT372757SPG7_VXKPRG_TldgrLPAq-WgOAuoQVjXtu5GCmbVWLF5-91VTEvadhcTMS7p3WdRsIF4sQLkfPenFLsYI6bWWzwppsa7TSZgV5KtPNsiryWPb4QWEk-pYiW2oAKiBYvLLH47wxkw-uyoz-ZCJ76ggbcBU-L2UUJQsicRi5ce2zk3YfzRxrTpfIBOrLjoKpqtgmSekzhOK79sPPeYBR-GFtPGhM2OQKR3NSDNnhSRgxvQzhOMysbN8gJzpxV4yvVjfKYz1CjG1EGaY0tqPPrVA6oDKsYSRPI6Iv7I-_qgOxCjfapMsEAUs0H3fsZW5oSFnglQ_lw8NOYGORTLA4kXCkKAfcEQ-Ac1IHiA6KL-otDlhbzH1aE3GT3Vz67nrBcae54_m-mmXCWrukxxpHo3e4snYKwyZa4QPBfnI8kpYYiGc2qJOTZy3h455Lty8IGFvRPo8r2HGTEmBUJ_V9bCnQEoP6S7B-yxSqmvtLEy_F_qsSPu6tDKB8Kv872nl_7OBQOBlHe_FJGCmSNgM7XLuXW95cwqHB2pEHZ9SOBR6Q67AblmhO2C3uetGkOZ-uIrY6q4RBQzHR4rwgjw2GaDgXJDNhgNBmw1ocK9hcK-hb3sNr5biZg3PO-gCL10IJZ-6ef4HMCaD8LwvFyAAMRCgf1niAFqj1gG9fygW6bZrG-40fmw5MH1w131w131w1z10193rQr9K6T0cVwuF9u-QfPbU6zWYxfuc8tWX5DP-bp4wJfsnC-3ZDiFpqhprXb0SsgRpbIp5rs5BOn3fKaky3fOfkPNx4p5SMk68dPX8hP1YKW4ICIXb3VTIscFDOp8QuN0_H3KjHgK3ezmRSgh8Mo8QGNly8MhgDByMgQOKgb6pj4MxcDAGful6jZMZA1X_1GPg-Uof3o9sRy9-raXxa97q-oR9ZyluUuLXCPYaJUFZimAYiGAtr5a6EQwUAMWwpTyGgfR6FDs6FIOUQhwz7zhC5nIHifaKCD43n4KYHEzz_6Kk-auWF2NdhLSf4fOUR-DgWGpwLDXgLH6fKHUoQqIUvp7MsrZH9CglH6Ih3Q2pZmiUOvFf3jwLFABFqU6eQwfS61HqU4RBSil9cr9_-qSQ9CgBBNq9FIEavifKhxTLPWMGvK1_bwgw5fvFxJSfPEYGHK8Va2vHp-nnobKtNL9OMOZQwJivvzTBNaaPCMicL0aZOX04dIOuiWIfWtGkdxx8nu5AnkaAPSzT5Xb1lMpxSsuOkuGc-1xGnjF3UpmGrst7z3Q4t1N53i08E0dnecfiO1Z4z3HyTMOQv0QeqHaToWSr56YUI-rTcuF9i2RpQpvY-6iLC99EifxtQp3ZG2n36EmV38jL27l-nbcUKXU2FQlxQhFjOxm5mtJ2divPvYHvbPPeOVzQpNjyNo9jBOEocTvgL7mNuRX7YtVhxKqcYnmI199OO_CL1y5I2CdMLYmtxHOqHnpKJSRnInOkzPV1iRHy8I95IoFEp_v1WoQlCmGPkyegkM7Znef3CNGwh8VwtbsOT0MRY35eKSlOhnuukr3akRShPkGzPTNWVV59XhOZ7Zn6Jn7jnGk3zZ4Wvom_8q2R3ia-wwMp_xEnMdgh0Xfxz8duGcu4QOEJhKjZpHv_OleBsl2olozkJpqKN_OREU_a91n435Cipgr5SDl0RFDQXxzKu3p_8ddcBYZKgzT7v3wcEsqrQ30bwqFcDP4ot8V_bjxuj6H7yiGM0F76uPhwe3Q_-IQ9eJqDlboEh0hhuQHyNkBOAt0GuCS44X3d-WZgsYhLHbFiZ5a_89T1CXuXpaVGDZle09gwd1pTXb2QMQKt-i99-m9cROR4INM_F2GmzxHpbvXXOFfaF8caB_NpOUKI5eGDtP3J7ETs1Ejfxfl6darKR1qL1gw_ylaN8lofypCMsyEE08BxFLDzsQienFS7z35562CqXf_Styzmlb-hWvz6AqLFZ038j2oC9MxUTY2kQSjx-eB-T4OMAdLe61x7rFzX3IWYFYhtlCDIm5LKdX6NTYKONF6_g1SuwpGvwoGKtOZZER_97qcnHJaMuTlhd1p4qqJfnOtaJS0XAVp-cdVcV8sCG6Tr3bznE6j08PYwwkK5EMi-EOcUaSBb5VdDq_2n9Izs51y9KlwixkX_I5Qsy9uj1KJvjLzDb0vdxdByiqE5V5M5wUcRfIu29aAOE7ozO0MXdZ57_21h7wGQAB5gc1Z1IHodYvuAxETvtLMXaIo2prsJ4qx15B_FLIVa8wxf3x3ez7W5FdIMpMOv3v1KO4QS6jkcHqRw-OzYDQl7mZUXHHpC4bDi6ftmBMGhB4LDwogvHHp0OKxDIBx65L6nkI4NzR4DnZw59qN51bPQfWS_6uqDj-N04fDpi-cn7KPF-DZ14VBrG5sRhC4cZt64d5l364WPEAgkzzpLhzCHDpMdCPvQiiGg5aF0dzKykZph3T5nBrL5pG2WaV0GA05XXjVvX-VgXL3gwVlwA65lkKvHl6L0Hbs-92Gs0h_kU2m0NGltTBNlR9al9wXey3HyNyr71-wt-TTb646-EKbycfZP6GmTrxu1Cfs4AsaXT5C2tfDLYULGl7uXluXGlx4b5NLNzvDSI9K9eAw7gU-KQ-6DGYsFMeqJiYDT-l7z_4dOX0p_PCthv27iuUrz48S8XSzc9pK3qAtO0GRw1bve_YoaM6SKN_i0RqPVNbIIYY1KbfCoeIx0lHz9SCSE1n3s-FC7LA86cXXHSQuVucLWg3wU30oHIYcua0rY70XwPFXxom_lpfjtn-70zjtp3JDm3-NjUY1W1_zP6clJhUrwcrNlZdLc1Jk0N3TSA5RJ89FOeuEC7ev2sm7vcDKyPr2P_tlPQg79s47-2USKIxvon_X0z6P0zyZKt4mWbqCfNnAOUrCx8xmhC6XU7A8t7jwsLaCg1NTA6jqzH1rhTWQAsrGTD0Ro5TekeQPWp3kjHk2zhkiDFPaGavkN_VjR4xh4njrf7QfJQGO3GYwBemo1FAOPPLYWgxig3OBEF-kYoLQ6Bs7VWrxZwTwSMZ_6Z42-VzpsSzejB2ICH4Wm6ebPlbdPTdirIkBvtoigYVe2g3ivPmaDFPrmi9fkejOFGdLng45PqbS6Pt-jvZlCJeaUtXSfSiMG__DzAo2-H9zbnLD3IXy9erY5dUtjY2342eb7fuF1fQ4LZJzr-MlmTqAvoU3ATtFALuWIxWOkUfdQtz5_y60JeyGw98XfUhe69_XRf3vntV0eqFn3OntfDonesDHYLfNdHmRLd1eAdIVZKuV6eYF657VWPTF2BDdquTUtbM-6lS5xuBe7hc67X_12LrUG4IcU1uOm1gD0uqO2mxiklE-HSoswA7t3r-9LKSch0Q30YG7UDgr2TAfx4E-Bo-YEUaFHzXs_zh01J_SQze7jIKfFOsC_hen3QftPyq7N5SpDPzeTfGD-LoX5d5qnJ-xXIrhV3dS1SXe_jcTEbnpvn3yNoaSpUujEzkPHPVUFyIE0-DRHfQCXjv0VJg6gH_QAx97vUA-IbLkxYb9k4pvVg1lcaSwVpo2pcXPowaxjv3jXu4of4AcPJ3MHAajBJBSATsoVdFJR3HV41wonMQnFR9d_oLp-6T8aEvavTSCnz23V7bxN2cXkc3hOX9f7V-dy-kARkMqzyMnpAzl0tT-IsA8tpHr3tgMfReWdppmXuQIUzjaJZ6L5bJP4BnWT2GlPT-gW57H0wtwuscsFaXUv1SrNtnNodD3ej7BXKs0plLXvCQJoKwUtVApaqBS0UCmAtlIAbaW0nlwpdB2VAmgr3VnJVCgkrKQhYd5bsxL2n4CtdrdfDdXi8baxihKzrZASO3hn79EEKTHbKiWhfc47g3SFZYxwH3LQvqBI1-tP5wPst-n6y9Gz5ibsFy3cokVp8XZdMkXbkV2WXQLMGqEovXqZl3MVIAZMkeAbQgFcuiWXRnAAfUCQHhMvtUexxTKQG1wMq4j_hT0SpP9zXIryeZ7bKMwkl0PtMPlQ_tpPahP2Dgv_EzQfnFM_L3Q--ObOD6LShJAwQSA6HMlNCAmJPl6u5DPdOfWSz7Ch7TzPuc7HroC-JHZVQVxgWtcEWP66JEqrA3cpIVNn6mfq1vdAWf3MNaICx4AC9UwwmE7LAwMnFwa9HCtWvvSBU_9yLBzHpLkP0cD5_bduSdjLI3o2d2YLO5Gqd8vQKtHKp8Z72dwiI9Twe3gAlej0rvd3CEsUX60FvGHxYaRv-zhKDHT_3U0J-50onq1dK78w0-OMeNXzvBAsW1YmcvfKS6yQkf7g_sCCRKmb6RwskYRc4nF3EVYkSkduDhzhvYMpTYxOvROXX5i7WJzDIe1f3ZsPArzvAI5Z5T0VNWR2hgt4d-ABU3NlPH3aTXNmpepvqZsB3hkIHnx8dai3I55jh1z5EJ9LC1R6sLkaC8UDXqJOTfET1_90Y-Xa4BcRTilaHFpb11Qzd27tLBqkBTVqV9ZByxSL77jOVacoB9LnFKZOkUrX5zgslosBXNsbUBr2ip4pEGtKTatrnFmTCmwVtMd2d_tp3pzWFQI16ddO-rhLA16p7RYOHB4_goX1BRzshyBSMGwsf9hsNfF07bxUTWp-7U014O2G4N7RPV6qmcsL6bTXPTfFScABnlM2cI1eA8oKTjX3O9QQcp110JN0sxbtRY3kE_Sq6zcWkTH1moi-CclHeKG7GL9tieV-eYOxQBrfwQeWDgWYVu6UyasyTrrk-s7PfXXmLBxzxrwhazOcKjhfOydNuygtaAWHm40M0mPl437TyLZZtaFnpivTTUYGT9AGKktrkMf0_n5M7oJyiRUyY7t7QblEqZvzBqyQaEu9_U6CgAYFZfEyopc9FM4398xN2I9FgJvbvfrQO-pC9fL49l_FAcVQ3oB7CxRKcA9CofkiHqG4MaCSVvtP9w4wj8jHfr10uejOjtkJ-3Er2H554Prl5_eaoP1gYG-O6PaDgD0OKyQBN-8fNXGZTOxNlr1Fkkh6x75c1yCZ-su7htj32cCo-BCewCjrK-_zDRxAR-gPBuCLfvV39i6Eb1QPijo_Q9TcELoPuXTn5d5RUY8LQs2V_KSoR6MPJM7GudJ4vr8mRNszgsxyVtM9qAefXZCwVwT9xlSIJ-T3G1NrtN-Y0n8BoVA_MTXw34QiKhrBVLST5lHd-vOmhL0B6acQs4uyLZJ-oB-KOvHpmd4pRMoAaec7_BAiLdb7hArMCgTHls2rw5XX_YRFJrGrRtYl7N8W8vdoFptaOne0uSlVM68GnMBCS4YHX77MG9NxVkgpd3HIOBQgYnjRwBetz4ZEaUvMyoTiBMI_UuehDTWpmfWpedPqfCYV0Pzzg3e9E28iP6SS-Xz-KVDparkGi-WFXkD2H_NT0BnUYWLlh38y389hMntDHabtrssFh8nsDXSYzF4fh8ns7aPDGORpKToTs19MKTs9huxy4j9fSxdPPOMv0ZUXVRjfpHWodmiIFhya08svfu22iWcYRstEXxq7nBZzGvxN-k81cmkshwaXU94zxuMbLtDkWN67ai--AnyXpcq5y06qcixBzv0N_xoix7_OVjzmyel48o_fPuPYvrGqnKhA89RzV4HvytH4vwvHsUMTKz990e_-FpKTozm9_J1ru0No_N9Fpj-hNPF43HsX03Pzm7ep7yKjBQ8_2bXVE8-Y1ZpVbUEisEfz4WcTQZoRAk3VDzsuVmnKHGzgWGxKNIbKzOsm8y-pYr0vJ5Mvh5MvS0jrhpIvi8mXkWsm1_BvaT3Eb4k__D_2jF58&rdba=clon&relev=ad_cat%3DO;ad_filtr%3D10;cl%3D2;cm2%3D0.0181118;cm%3D0.0869565;country%3Dru;ct%3D520-87%3A11886-13;dmoz_th%3D174-83%7C179-12;dnorm%3D32+autocad+bit+windows+xp+%D1%80%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9+%D1%82%D0%BE%D1%80%D1%80%D0%B5%D0%BD%D1%82;dnorm_nav%3D32+autocad+bit+windows+xp+%D0%B1%D0%B5%D1%81%D0%BF%D0%BB%D0%B0%D1%82%D0%BD%D0%BE+%D1%80%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9+%D1%81%D0%BA%D0%B0%D1%87%D0%B0%D1%82%D1%8C+%D1%82%D0%BE%D1%80%D1%80%D0%B5%D0%BD%D1%82;dnorm_old%3D32+autocad+bit+windows+xp+%D1%80%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9+%D1%82%D0%BE%D1%80%D1%80%D0%B5%D0%BD%D1%82;dnorm_w%3Dautoc+%D1%81%D0%BA%D0%B0%D1%87%D0%B0+%D0%B1%D0%B5%D1%81%D0%BF%D0%BB+%D0%BD%D0%B0+%D1%80%D1%83%D1%81%D1%81%D0%BA+%D1%82%D0%BE%D1%80%D1%80%D0%B5+32+bit+%D0%B4%D0%BB%D1%8F+windo+xp;fe%3D6.48773;fir%3D0.267373;forum%3D0.59255;fqwg%3D5.218048216e-15;frqcls%3Dstrong_tail;fsm%3D177;fsml%3D11;geov%3D-0.000436704;hpq%3D0;iad%3D1;iad_vw%3D-33.57460785;il%3D0;ilp%3D0.001022;im%3D536870912;imgintent%3D0.56;is_music_ext%3D0.000;isorg%3D0.460;issite%3D0.460;issoft%3D0.750;ldatopicru%3D197;mum%3D0;mut%3D15;navmx%3D0.268605;norm%3Dautocad+%D1%81%D0%BA%D0%B0%D1%87%D0%B0%D1%82%D1%8C+%D0%B1%D0%B5%D1%81%D0%BF%D0%BB%D0%B0%D1%82%D0%BD%D0%BE+%D0%BD%D0%B0+%D1%80%D1%83%D1%81%D1%81%D0%BA%D0%BE%D0%BC+%D1%82%D0%BE%D1%80%D1%80%D0%B5%D0%BD%D1%82+32+bit+%D0%B4%D0%BB%D1%8F+windows+xp;ow%3D52;prel%3D3;qc%3D3;qlu%3D1;qmpl%3Dru;qr2r%3D0;qr2u%3D1;qr2v%3D0;qrr%3D0;qru%3D1;qrv%3D0;qt%3Dru_nloc;relev_locale%3Dru;synnorm%3D32bit+autcad+pyc+winxp+%D1%82%D0%BE%D1%80%D0%B5%D0%BD%D1%82;syq%3D1.136661591e-07;th3561%3D0.0179;th3973%3D0.0682;topicality%3D36.0447;tvm%3D0.00222546;uil%3Dru;utq%3Ddownload+here+upon+russian+for+autodesk+inventor+auto+cad+%D0%B0%D0%B2%D1%82%D0%BE%D0%BA%D0%B0%D0%B4+autoca+pdf+torrent+%D0%B1%D0%B5%D1%81%D0%BF%D0%BB%D0%B0%D1%82%D0%BD%D0%BE+%D0%B7%D0%B0%D0%B3%D1%80%D1%83%D0%B7%D0%B8%D1%82%D1%8C+feed+load+%D0%B7%D0%B0%D0%B3%D1%80%D1%83%D0%B6%D0%B0%D1%82%D1%8C+%D0%B7%D0%B0%D0%BA%D0%B0%D1%87%D0%B8%D0%B2%D0%B0%D1%82%D1%8C+%D1%81%D0%BA%D0%B0%D1%87%D0%B8%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5+%D1%81%D0%BA%D0%B0%D1%87%D0%B8%D0%B2%D0%B0%D1%82%D1%8C%D1%81%D1%8F+%D1%81%D0%BA%D0%B0%D1%87%D0%BA%D0%B0+galloping+skachat+besplatno+free+%D0%B1%D0%B5%D1%81%D0%BF%D0%BB+%D0%B1%D0%B5%D1%81%D0%BF%D0%BB%D0%B0%D1%82%D0%BD%D0%B8%D0%B9+%D0%B1%D0%B5%D1%81%D0%BF%D0%BB%D0%B0%D1%82%D0%BD%D0%B8%D0%BA+%D0%B1%D0%B5%D1%81%D0%BF%D0%BB%D0%B0%D1%82%D0%BD%D0%BD%D1%8B%D0%B9+%D0%B4%D0%B0%D1%80%D0%BE%D0%BC+gift+%D1%81%D0%B2%D0%BE%D0%B1%D0%BE%D0%B4%D0%BD%D0%BE+freely+%D0%B1%D0%B5%D1%81%D0%BF%D0%BB%D0%B0%D0%BD%D0%BE+%D0%B1%D0%B5%D1%81%D0%BF%D0%BB%D0%B0%D1%82%D0%BE+%D1%85%D0%B0%D0%BB%D1%8F%D0%B2%D0%BD%D1%8B%D0%B9+russia+%D1%80%D0%BE%D1%81%D1%81%D0%B8%D0%B9%D1%81%D0%BA%D0%B8%D0%B9+rus+%D0%B2%D0%B5%D0%BB%D0%B8%D0%BA%D0%BE%D1%80%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9+%D1%80%D1%83%D1%81%D0%B8%D1%81%D1%82%D0%B8%D0%BA%D0%B0+%D1%80%D1%83%D1%81%D0%B8%D1%84%D0%B8%D0%BA%D0%B0%D1%86%D0%B8%D1%8F+russification+%D1%80%D1%83%D1%81%D0%BA+%D1%80%D1%83%D1%81%D1%81+%D1%80%D1%83%D1%81%D1%81%D0%BA%D0%BE%D1%8F%D0%B7%D1%8B%D1%87%D0%BD%D1%8B%D0%B9+russkom+%D0%B1%D0%B8%D1%82%D0%BD%D1%8B%D0%B9+%D1%83%D0%BA%D1%83%D1%81%D0%B8%D1%82%D1%8C+background+intelligent+transfer+service+%D0%B1%D0%B8%D1%82+bit+%D0%B2%D0%B8%D0%BD%D0%B4%D0%BE%D0%B2%D1%81+%D0%B2%D0%B8%D0%BD%D0%B4%D0%BE%D1%83%D0%B7+%D0%B2%D0%B8%D0%BD%D0%B4%D0%BE%D1%83%D1%81+windowsxp+windows+xtreme+performance+%D1%81%D0%BA%D0%B0%D1%87%D0%B0%D1%82%D1%8C%D0%B1%D0%B5%D1%81%D0%BF%D0%BB%D0%B0%D1%82%D0%BD%D0%BE;vcomm%3D0.248625;vintent%3D0.95;vm%3D268435456;vnorm%3Dautocad+32+bit+%D0%B4%D0%BB%D1%8F+windows+xp;vnorm_dopp%3D32+autocad+bit+windows+xp;vnorm_syn%3D32bit+autcad+winxp;vqi2tvec%3D1%7C0rkjACu_CrE81xPoE93gAB5X2uKgUsx_JvATChj78_A%2C;vqsemvec%3D371364212%091370421533%093362250591%092760956004;wizqbundle%3DehRMWi40AQAAAACAUzAB-F8KZipZehRMWi40AQAAAACARwAB8wYSXBJGEgdhdXRvY2FkGAAgAioMCggPAHNzEAAqDQoJDgAQJw8AJAsKLAAnEAEcAIRzJxAAIJMCKh0AoDICCAI4AUAAIAAAAAAwo7-XscucoK7PAQr0ByrmB2oA8P9S1AMB9g8SjxcShgkSDtGB0LrQsNGH0LDRgtGMGAAgASoQCgwWAIfQuRAAKhYKEhIAfbLRiNC40YUYAMe90L3QvtC1EAAqEgpYAE3QtdGCLAABRAAt0LwYAH290L3Rg9GORAA9vdC-LABRtdC80YJwADsYChSgAAAcAB2DMgACdgAP0gADH7WOAAMh0L4CAQrSAD290YtcAAD-AD2w0Y-6AD-70LiiAAQRs9QACloAP7vQsFoAAS_Ri54AAy_RiwABAACKAB--AAEFA14BCjIBAjIAApAACv4BHbuOAABEARG1dgAKKgAdveYAAMwBMYvQvAABCuYAD2wBAQBYAB-4WAAAH7KCAAIRuGoBCYIAATYCCtgAAlQAD4IAACHRjpQCCZYAAAADLxAB7AIAAtYBNxQKEGQCX7XRiNGM8gABI9CwSAEMMAACqgIKSgMCeAEABgMJigAARgAN9gABLAAB5LYA8HMB5AANigAAFgAEigANdAAh0Ys-AQ8YAAEA1gMKYAATuWQDCi4AAGAAH7UaAwARu9QCDywAAAG6AAoYAAIgAna5EAAS6A0SYQQyuNCyjQEBjQQ1GgoWdwECGgAzjtGJgQII7QEBHAAAawQBQwINNgABsQACyQENHABP0Y7RiRcDAANSlAHwZdMAAhoAAusADU4AAGoAA04ACEkBAzQADzIAAQCAAA8NBQABMgABlQIKOQECGAACwQI_HAoYHgEABPMCD5wAAgOLAQ6cAAAXBQ8yAAMC7QUNbAAA6gAFxwQPOgADAiMCDToAAfIABDoADx4ABQLBBA5YAAAaRwDw2Q0cAAFYAA_mAQQBrgACYQQNcgAA5gEAYwUBSQMNVgAAHgADBwYOcgIfuXICBgGoAAEjAw9wAAIFKQQOVAABHgAPKgIHAXsHDsABACkFDWoAAhIBA5MEDtoAABYDEbhbBg1QAAGxAw0yAAFQAAJDBw0cAAJiAQ-aAQgCtQUOOAAAKgEC9QcOHAAAogAP7gMHDoUFAR4DALIBAaMHDVAAA8AAAKUICI0EAjYAAn0HDTQAAk4AASYBDWABAfQAAcAAC4MFAlIAAL4AAP8HDzgAAw-hBQECOAACNQgPigAEAQACDhwAAWwAAXAJAOAAUgICaQYOHAAAOAACkXYA8GcBOAABCgIOIAIA6wgPMgAED4QFBAAoAQKxCA4QAQFqAAOoAg6aAQKgAA42AAC8AATuBA4eAAJUAA9IBAQBCgICWAANxgACHAAB-AAPjAAAATsIDTQAACYCDxYBBQJQAACcAUcgowIqHAsA3wWgMgIIATgBQAAgRQT4AjDk_fqeq-3Q-OMBCqgCKpoC9wPwCAgBAf0XEr0GEqABEhLQsdC10YHQv9C7-QMA1gPxARgBIAEqHAoY0L_Qvh4An7UABPAlGAoUGgAELxYKUgAAHxBQAAkftVAABn21EAAS-AQSawBv0YvQuRgApQAKD1UABR--vwAFTwME-4W_AAKdtdC9EAAqGgoW8QBfsNCz0L69AAYAJwEPDQEFDz8BAT--0LyAAAI_vdGLZAADT9GL0Y8aAAYfhRoABQEaAQ_OAAFfvtC80YM2AAYAnAAPtgABEbCEAA_oAAEfsEwAAyHQvoIAD18CHgD0AQ-IAQQfvogBCBG-1gEP8AAAb9GL0LzQuKQABAFAAk8gowIqzAIAKwHovMHs0NOEgNjdAQpIKjspAfEAKQAB8QISJxIUEgTQvdCwFAXBCAoMAGEQASCjAioLbAUAdQESAWwF-AHYpuGipb-7vI8BCu0BKt8BTADxBM0AAfcPEvEEEuwCEg7RgNGD0YFyBRC4NwEEbAUhaL5RBREoAAWRFAA-vtGOFACIZwXgFAoQTgBN0LzRgxYAe7jVAPAfEAB6AAASAAw-AB-zkAAAP7jQuXwAADq8EAG4ACHRg6QAClIAH7BSAAQAugAK9iAA8Cm8ZgAADnoAH7geAQCPuNGFEAAS5AFvAQIKkQAPIQELDCwAD70AAw6VAAIPAQo-AA_7ACsP5wAGSO0AYy4C0L7QvPAAA2UC-QDW3teX_ICvr_gBCqMBKpbwAPEMhAAB-g8SmAIS-gESDtGC0L7RgNGA0LXQvdGC8ACiFgoSFgCg0L7Qst0A8hMMAAYuAE_RixAALgAAP7DQvC4AAS_QsC4AAy_RhS4AAnq1hgJQcgBv0LD_APIESAACH752AAN70YMQACoSCugAa5cBFRWXAQOnANjLxM6v-_j5l1oKRyo6lAH0GCgAAXQSJxIZEgswAQDwDTMyGAAgACoGCgIzMhABIAAqAjMyMgA4AksH-QCA877ojIGuoecBCqQBKpfvAPFthQAB9hESvQESMhIDYml0GAEgAioICgRiaXRzEAAqCQoFYml0JwsAcHMnEAAqBworAEYQARI1NADwAQsKB2JpdHRpbmcQACoKCgYNAEdlZBAATQAFNwAgQBJgADVlGABsABdlNQAVbgwAAk0AAoQAEGWEAARCAEAgkwIqg_AAB_MH2J-xsZ7qkK_2ewpJKj3wAPECKwAB8wQSLRIYEgbQtNC70Y-KAVIKCg4AYzsBEQ1LAAfSAunHnYGH9bv932YKkQEqhPIA8QNyAAHyBhLFARJBEgZ3aW5kb3f1AGEMCggOAHPnAPEaCgocAGMQACoLCgcaACYQAScAZSdzEAASQkMAPwAgAjUABzINCglCAFb8APEKRAB0ZWQQABIoEl8AD4gAAAh8AEQgkwIqK5QAB98A2MbplNn6pa_fAwpDKjffALElAAASIRIQEgJ4cDIJcAYKAnhwEAFFADoCeHAXCdiHlbXAt_bOjnUKVypKRQCwOAAB9AcSQxIsEgh-CUFkZXNrTQBgDgoKEAB1wABiKgwKIABlWAAcD50A-QDmvbXihY6InIYBCpgBKosyAR95WwAcJPEHtADwHxJiEksSCGludmVudG9yRQA0DQoJEAAARAA0DgoKDwAEVAAEEAAgEAFyAAQOAEF9AUdkAAQRnAAAWgr5ADC5xvmm0_qipSoKoAEqkpsAsIAAAfADEkwSORIE9gAB8gBhCgoGDABx8gBwCAoYAGAQAcoBQBYAVGVhAPUAIwCBZXMQACCTAiokAPECqgAQRAID8A5jYWRNAGEJCgVjYWQ1ADAICgQLACMQABUAAWEAIP4CfCAQAUcAAAqiAK_p2fTEnaq4t64BowAC4PwREpoCEvwBEhDQsNCyVQQAswoj0LSbBWAYChQYAJwcBAFTBIEyAB-1FgABjCAEURYKEkYASgQCVgTwAAI_vtGOGAADL9C5RgABingE8AIqEgoOdAAvEAGIAAGL0LwQAPcEES2jAAASAwNNBOjw7e2q0ZnMoLYBCmUqWDoCcEYAAfIFElYQAwBEASFjYUYBARADEEYyATEOAHNNATAKCipwAwBNARAoIAMAQwERGmcAB8QD6JGI7ved-9fU6wEKfypzZwDzBWEAAfUHErABEkwSCGRvd25sb2FkegNQEABkEAEfDNEeAHRzEAAqDwoLDwCUXgNxKg4KChEAb2ID0EtOABkHPQAqcydNAIWTAACCAByMggCeq4T0m6vIyclDNgWhABIkEhISA3BkZuMAIAcKCwACEQMACgAEDAICFQfosbOQvtqmg6CnAQpjKlbKABZE6QxxdG9ycmVudE8AAekMAcAAAekMwBknDwAQJx4AJAsKO-AAAK0AHA6tAPgB_Ma8_MTw4JzsAQqrCiqdCmcALwsF7wjrJPANtgfgEpoYEvgXEhLQt9Cw0LOFCODQtkIDJdGMmwIJGgBj0N8N8Du1qwAAkQAGHgAzt9C4HgAANQIKHABzttCw0LXQvLkBOxQKEHAAAAMCAH8BBk4AMLbQtd8ADS4AU7fQuNGCQwEILgABYAADKQEAl4YM8AIFKwENmgBl0Y7RidC4AwIGOi8L8GMF6QEGGAAAbgAACAEEOwMPUgAEAesBOBIKDuwAAZ0CCuoAAWYATtGMEAEYAS_Qu-oAAQKwAAFpAwzqADG10L2dAgLTAwqYAASgARG40gAKbAAAHAAAHQMNmgAAUAUNhAAALgAAAAEC4gAMhAADigEDJAK2CvAWHgARu28ED5wAAxW16QIJbgEC8gABDwQKOAAAUAABigABHAAK1AYA8WQNQAIAFgAAoAIOmAARtVgCDBgAAFIBAAUECngABQIBDzYCAyHQu5UDCjQAAkwABM0DD2gAAQCHBQ1OAQH8AARqAgweAACeAB-92gIGAx4AAaQAD4wAAgOQAwwcAANUAQFiAgAvBQaMAQX4AA2MAAQaAAQchgDwB1QAE7VMAw5uAAIaBACWAQ8cAAIDVQa7APAbcAAfvFIABQE0ARG1wAAPMgECAOwED4YCAAMyAQNfBwqOAzG30Y8gAg2iXwHw9AJUAw0cAAMQBQStBgZIAQEQAS_QvPoEAgAQBD2I0Yx2AwSeAAI0AA1sAAGIAA98BQUAJAMCHAAMeAIBfgEPbAAAA1AAAZADD0QBAwRrBwqKAACYAQBuAAKmAA5uAA9QBAEDhgADeAEK6AEBHAADEAEMiAAE2AAG8wcKYgEfuSACAgSiAALyBArmAQFkAQ3cAgRqABO4bQcK8gABNAABNgIA6AEN8gAv0Y44AgMAAAIDnAMKJAYRt14DDGQAAuwAAlYBChwABdAAAQQFCiQBBBwABEAECjoABFYAAvwGChwABDoAAr4CClYABR4CD0YDDABSBgpgAQBWAA_UBgIAKgMDvQoUAvAeMgAAUAIEfAEPHgIAAEgBDcICAzgAA1QACtwAAPgAADYCAmEKDbIBD74FAgNQjgLwAw1UBgEcAA2CAABmAAK6AA_aBBcBQQA0Ag4XAvGyD1IAAQKWAwHCBw_UAAQPoAAAAbABD04AAQDOAAPLCg0GAQGUCA-OAQUAPgEAZwsKrAEA8gAB1gQPGAIEAtgAApgFDr4AAPQAAgAICowAAF4BAjQIDW4AAw4BAowADlIAARoAD_oAAgIaBwItDQ5-AQHEAA8wAQEBcAAChAMPNgADD8IHAgNmAQ-mAAMCigAP_gYDAxwAD9gDAAHSAQC2Cg-SBAkDDAINGAEAOgACGAECHQwGNQUAewbQgtGMMgIIAV0GEAEUEvgBi5Xsua2Avp3ZAQqeCCqRCH4SX_8DAfoTKQQBAB8OIdGMMgpyHAoYGgD3ATAEANENAt8NBDQEYx25HAD3AjMEJNGLvwwQOMkCIWqPTRKxhgBdtdC90YsuAF85BPIJYAAFb9C-0Y4QALYAAAJ8AD-80Lg6AAFvOQQghADYAvEKAbIADwgBAxOwCAEKugABNgAv0YxqAAcBIDsE8QgEAS3Rg-oAADQBH7tGAAgfvOoAAHO10KgSYZgAD6ABAy0EwIQBALwBAFAADcoAT_MOwGgAAAFSAQ9oAA4A6DEN8Q4AOgAfuzwCCQHAAQq4AAAgAgKiAR-FDgEBAXQCAiIEwQBsAB-yVgECD5gAAx8EEbAfBPENAgEKlAAAMAEACgMPNgIEL9C7agICAEwAE72kAiEEglQDDWoCAZ4CIQRDAVIADyAEs9oCCsAABRwAAQwCIgSAEgI3GAoUqAIiBC8UAiIEASOeAyIEZi_QvooABB8EGTYfBLwWASHQvqIDCyIDISAEogFIAR-1ZAEEP7UdBJBABB-IQAQCAdAYEgccBBCs9wAAHAR1iAAPWAMBAhwE8QAxvtC8tgQKigAECAIP2gAjBPQEUAQKNAAAGAAADgECeAEPOgIBAiAEbwKIAA44ACAEBPIAH7hCBgQCmAERvugBDWABHAT2BAIQBwGcAwoMBhG3XgMOIgEAxAEcBBkgHARoBdgAAYYAHAT5AASSBQTsAwo6AAYQAQBABCEEUS_Rg24CIQTzAvoABHwBDuYBAAACACgICoYAIwQQHCMEZwE2AAEyASMEIrYBIwT6BA9EAwEA1gAD8AcOggAC1gAAEAkjBIpqAg5SAAHUACUE8AgPuAIGTILRjBACCgHqAAIGAQH8Aw0YAgoCNW4CCyAEphG1qAAKkgEAdAAhBCAABFEAoBoAAVIADBwAAbL6A_YADn4BAIwEDvQHAUYBI9GJJASCARQBDy4FAwQkBPEDAqYAAqYCD_wAAwQWAw_gAAMCZwJwAU4JAvwASuMKW3ULAfcBFBHp16ff677V8PFICo8IKoEhBNHvAwH3FRLkGBLAGBIUSggCNxY3uNCyIwRwFAoQHAC3sFASAh0EEBZiFBBBRQiQHAA9FgoSHABoWBbwABgKZgAASgC9vdCw0Y8QAHgSoDIAAU4AATgACmyPAZAh0LNsAAxUAF-dCHC4VAAMHbzAJBNkE75UAA9wHBIgxABdBPMDEbWmAD8eChrEAAQCOgAP5AAAQQTwET4ABgBcABOwlAAP6AADH4U8AQQAOgARuOgAD5YABQRYBwDxDAAByAEPmAEKIdGLXAAK6AF_sNC50YLQtZIAB8oSUEIBAFG9tATgOAAPrAABA8oAL9C4tAF9CPGKE7UgAQ_IAAQh0YskATcSCg6cAQKOAg8yAAcPkgIFAnAAAJICDBQDEbugAAqkAQEUAwBGAy0QAYAAH7sIAQAAXgACdgEOXgAesBYAT9GO0YJsAQMBVgIRtVIBCpIAAVQDA6QBDNYDEbXSAQwwAAa2AQ0wAA9-AAUByAACggMP0AEFBLQBDG4AABAEEb4OAw-cAQQh0L7WAA8ekwDxIjwADNoAEbsoBAysAgGmAA2GAQG0AQNwAQ-eAAADTgIKIAQCNAATuVgBCjYAAhwAAiwJAPCyggAftVYECg9MAwQD4AEA3gMPCgEBAdoAAQoBD3IAAQT4AwwQAR-1wAAJARwCCjIAAtoAH7LmAQQA2AATi7YDChIBBKAAD9wACwBkAww4AAIeAgA4AAwaAAbyAA-kAAEAbAMLFAIBlgMOIAECigQfvBgCBQNyAwx-AAM2AA9-AAMBigYPCAMAAcQBE7giAQ_GAQUC5AELPAQPRAUHD2wABQGSAwCSAQDABg8UAgEPiAAIAqgAAUQFD6YAAAEeABG1kv8A8poAA3gAALIBCnYAAjwCAJIAHYuCAwFQAQOkBw84AQUAOgAAzAAPigEBAmQGCggCAN4CEYjyAQ9SAAAA3gIF-gcPUgAAIdC-4AALQgIADAQPfgUDAFAAA9AGCk4AAvYAAioGDxABBAHoBQvwAQ9kAwUCfAED_gYNngABSgAKgAABWgEDJAUPCAEAAVAABB4EDIQAH73sAAgCcgEP0gACA1QEDxwCAAFuAAIGSRfQsAEPOgAEA0oIDx4AAHEG8glGBw8eAAUCsAIMHAEARAQCGgAPOAAFAq7cAPAOzAAAkAUPzAABAFoAAL4ID3IAAgE4BA9UAAYB0gNDAPAMADgAA5gCClYABGQCAKILChoAA4gAAXAACh4DiwnwAuQCD2oAAQG-AA8ABAoBbgFIDgRZ3QsCVQAzCBAAMwj4AZy27ceGip-f2QEK4wEq1gEzCNHEAAH9FBKMBBLoAxIU1RQARxoBEARh0L3QuNC1NQiSGAocAK7RjNGOEARQNgBv0Y9mD1A2AAEAUncPQDYABY-UFAAEBBBSmg_wAbhwAAUv0LVwAAgANgAPwABxA_AAwAAFL9GMwAAJL9GP2gADGQDwARoAA0_QuNC5GgADIdGM1ADYAvART9GM0LXuAAMAGgAB7gAPegEAAIQAD0QBBQAcAAJEAU3qAEzPAQBF-AT4AJi7qpKGyID3PQrsAyrfA-YA2s0BAfsXErYLEpALEhbmAAAZCSPRgU8TYB4KGh4AcPEMYbXQtSIAauUEwBQgACPQuxoADToAjzcJABsXQCAACU9OG_IIIAAKM7DRjyAAKxoKuADr0LvQvtGB0YwJAfAGlgACXAACHgAPOgABBBwAPyAKHDoABw3wBrNcAA_YAAIBEgEzuNC5mAAP-AACT18F8BwgAAwPQAALH7hAAAcBgAAGQAANkgEBcgEAFgEPmgADFbhSAQ0gAAJaAAFAAQfwEg8cAQUzvNGD3AAOWgEztdGCHAANXgAAEAIHXgANIAABfloAYA8EWAENnjIA8lUfsLoBCQKCAAXMAg9CAAMxuNC8HgIAAgEPpAAED7QCBwKEAAViAQ1iAAGCAA9iABAFpAANYgEl0Y5iAQ72AjG50YI6AAD-AQ0YAgWyAg5UAAMCBB8QAAQAA7IAD64CDQQgBA1cmgnwDqYDBhe1sAANLAEBTAEA8AEEbgIPIgAFBqwDDSIAtQLwHBQCCgBmAAemBA5UATK10YggBQ_-BAEB6gEAbgEPKgIFD74EBwDaAAFmAkvvAVvbBASTBecG6enM4IPgrJuYeQqUASqH1QLUdQAB8AES7gES0gESDO8BMQYAeB4ZYRAKFAB3uHcWsQ4mAD2-0LkUAJewvQLxChQKECgAMbDQvD4AClAAK7AQYgAt0YNOAD3MF-I9sNC8TAAbtRIAmLXQumMSRMEAsLCiDwIzEdiW1aqNnOWslW4KcCpjhALxBFEAAfMHEocBEikSB3NrYWNoYXT7EWANCgkPAHTLEfASKgsKHgBKEAESRisAMwwKCCsAACoABjkAKXMnDwANSABEPxEcVj8R-AC80eakh8SnqcABCosBKn9zANRtAAHwERKkAhL0ARIgCAEC8wIGOxpAEAD_AesHAR0BMCoKJjsaMywADDwa8AwmCiIoABIPVAAVH7VUABQAKAAvJArQAA5vEAGZATsnAA6XAen5xY6Ulab6tjMKrAEqnpcB8QaMAAH1CRKhAxIvEgliZXNwbGF0bm8EAWEPCgsRAHYEAfERDQoiAEwQARIeMQALIAAcUiAACFEAEGVRADUQCgxiAF_BFPAldAAOH1BUAAkBQgA1DgoKVAAAZAAIdQAPxgAhD-YAHgjVADtpbmeDACxlZBEAAKUACjoBRj0BEWo0BAerE-iJnJWDwt20i4EBCnwqcDwB8QFeAAHwBBKkARIrEgRmcmVlqAByCQoFDABwcu0XUQsAcXN0YRWxIwBOEAESNy0AcGTGAUEHLQBUuhOwRQAZczkAD2YAGUF_ABxxvAHp5MjfwIHK0NUTCpoBKo0tAdZ7AAH2CxK5AxLOARIKrgEBpgGBEAoMEgCG0YsrFTAQEgATEgI6FXAOCjoAZxABDxWwJgBavtC8EABMAE3GDVAmAByyJs8CwCYAH7BMAAAesCYAT_YCQNEAvkfLARFoHAEHLhXpy6ShvsiwpJVTCvoBKu2dANbbAAH_FBLQBBKsBBIUnQAAWwIBNgYVuTYGIAG9_BkDkhxQOgARtR4HB2ACL9GFGgDADBC5BwCRuNC8GgAGfbkQWxqAggAfuDIABS9LHDQEnbV1BvAPTAB_tdC80YMQAGgAAQ9OAAUh0Y5OAA8CAQERtc4Apw1QP7jQvLgYAMCPagAPcAEHADwBD1RIChCP6A7yBvIABQGmAQ82AAAj0LU2AA9aAQF_tcYDWhMCAbC5xwOfxY7vtvKou7MXxwICj_8UEp8FErwC_QACEbqkAQAzBzECbxBxD0A2AAFvghtgEAAeAAh_NRtgGgoWPAACgACBKh4KGhwAAl_CAfESPAAIDxwACC_RgzgACB-wrgAIP7DRhR4ACQDqAA8_Af8tBx07YgICdQP4AcaI8fa1rMGLsQEKpgIqmALJAt0GAQH_FhKnCxK4AhIWrAERvfwd4AEgASoaCh4AAz-8EAAclAeAvtC5HAAIDziNACCOOFUBkIMcAD4cChiqAMsAELPNARAFJwBgtRwABQDkBAiyVgAGP7zRgzoABY8RDPAXErw7ASIAOwAPOwEDD1cBCS_Ri8kABwNXAQ_JAAUCHwEPHgACAHIaCBAeLQiwsFsBCQ8_ASef0YuYAvEuEsgDegIhDz8BIw-WAgkPWwEQDwYDAg-yAi4PkwEpDzwAAgAJAg-2AggPDAMPD-gAAgKvAQ-zAgMPCgP_MygBPGYFA9cB6Pnp99egktmV6QEKTSpBJwGwLwAB9wgSORIgEgqVGCDRgLEBAcoBMA4KElQDACQDApcZByQDn8HXhZeluLalHj8EAPUH-xEStAESlAESENGB0LLQvtCx0L7QtGsFYhYKEhgA3aIfMBoKFncFMBwAbS4D8gMUCkwAHxBKAAMALgAPSgAFfbmnAhFLPwQHfgDY6IT9ysKFy7o5ClcqS80AuDkAAf0OEnkSLBIQ8gEFfAAwFAoYsgExLgAbTgkcRVkA2N3H666P0qrwTApTKkdZABE1WQAcS1kAAM8ZAfMDAFkAEm0sARwXVQDpn_CL1IKJ3ethCrwBKq5QBPAInAAB_RASiAMS6AISENGF0LDQu9GP0LKyDQNjHwBZAPAKHxAWAAE9tRAALAA_g9GOFgAAPovRjxYAL7EGoQEv0L5YAAGr0L70IMAWChKyAD680LgYAG7KAUDRg3IAnyCQhS4AAj6z0L4u7CPxBw8WAAARsMwAC4oAL9CwRAADINGLRAATARxTDgXorN7M1fKtjPSPAQpUKkgUARE2PBq0OxImEgZydXNzaWEKGQY1GhAcNRoAAgYCpR0HgQbY2YSlusPR2boqCm0qYFYAsk4AAfQFEngSGhIHVgCSbhgBIAIqCwoPIwhyHAAzDQoJKz4mAmEmoykQADkAByoAhCfdGw0sCPkA-6qwpt32g5SJAQrUASrGhAGgtAAB8AkS_AMS2AoMMYDQvuUgMLjQuTkIMQgAfuABANYEEV_uD_EQGgACT7jQuRA0AAM_vtGONAAGH7UaAAMv0YM0AAh9vCoUQBK4AH4WIWAaChYYAE-FAWE0AAQfuIAhDPAF6AAHL9GFaAAGEbOEAA84AQERvrYADBABmApghgAPHAABAiFiCg88AQSu1gEAgwMgvwEwDAqtBa-q4bqf8pLDtqYBdQkAsfALEmQSHBIDcnVzQgFQCAoEcnXUG_AAKgcKFQBGEAESNB4AeQoKvQFAZSAAQfEfEBXyHDQLAIBJASBAAHEFB7cB-QDj_o6a2pz4xI8BCt0BKs9JAfEIvQAB_xoS7gQSxAQSGtCy0LXQu9C40LpGIRGDVQEQusMAAVABYR4KIgAFn6gHgSogChxCAAR_ZiPAEABCAAoftSAACj-4XwwQC5ML8AKiAAkfuaIAChO-ogA_HAoYxE0BoUAADD-80YOiAAnqEPAMIAAJL9C4AgEMH75AAA0v0YVgAAw_uRABpAEIWAEQ5DEHkQcPwgELELCiASYFMCUCBY8AClIB-QDxkqauxviIwsEBCqIBKpXgANCDAAH-ExK0AhKSAhISiRqB0YHQuNGB0YLmAAJqI1EYChQaACMOADwkUBoAAX7QcwswFgpQYxRQD04AAozkBaAqFAoQTgAPMAAERAJhYgAEH7UYRALTGAADP9CwEOAAA56-0P8EHcVsC-nkupf52uG8oTcKqQEqm6UAgIkAAf8XEsoC_goVFqUAEoSjAEPRhtC4QSFxHAoYHgADj40AAf4NIwOfhR7xIhoKXAACARwAD1oABE_QtdGOHgAHAFoAD1gAB0_RjxABdAAFAVYAD5AABR-5cgAHr9DLBQCjAmrLAALA0Y9RAfkAsJKumbn30cyuAQqTASqGrADTdAAB9AkS0AESuAESCKwAEbofAmAQCgwQAGo0I6IQABIAK9GFEgCVdiNgDgoKNgBlVAHxAgwKVgAaEFQAEb5UADUSCg4wwgzyATQAB0QAK9GDVAAbtRAAdbCaABFlyAIHQga_-oj2o4emraw2CpVFDQAq9QiWACHRgREHBK0eZBAKDB4AaZ4AEpiZAGESCg4kAITuAfAIDgoKFAAr0Ys2ADuw0YUiABuDIgARvmqaAHMq0LUyAIXQlwAcq5cA-QD_-tm7xIeol4cBCqECKpTQCCACAV8DcrIGEogGEhouAQCiBKfQvtGP0LfRi9GHNgYAXwMSBt0B0BwKGEIABa8QACoiCh5tB-AiAANv0LXQtRAAYgAKf8AUYCAKHEAAAw4ncLzQuEIACy-IBPEXEB-5RAAJDyAADhGwpgAPKAEGIdC-hAAPIAAGAGoBLxAB5gAHb9C1AzBqAQn3KDBgAAefBvU14AAKEb4gAA_IAQU_tdC9PgAKAsQBD6QBBgD-AC_Rg0IACSHRiwYCD4AABT-90LA-AAkh0L4-AA-AAAkCPgEPIAEGr9D8AkzpAgbApAPpiY66wtOj_skWCpwBKo9SAhF9bA4gzgJsDgA-BjFrb238BA9sDgCRGisACRwAGigccw7QRwANRgAaRioABnEATCUF8RWAAA9IAAgaR0gAMw4KCnIAOWluZ0kAL2VkSQALD9cACQ8cAAiYDhEdMQcHIwXp1JyM4sqUsu1pCr4BKrCfAPAAngAB9QwSxAISqAISDNCxfh4HtQEAoQ8QpLQHAk4CwiYAatC-0LPQvhQAiBIo8BUQADoATNGL0LUSACrRhTgAI9CwTAAHcgAATAANOAAbjzgAW75tBvALJgA6g9GOEgAs0L6CAC3QviQAEbBcAAeAAEpPBmNIAAAYAWWsCDwBABOEAvkAgone2__i_ODlAQr7AyrtUBLzAtsBAfQOEv4IEuAIEg7Rg9C6BQUEfS1gEgoWAJeIMicA4wJxFAADKgBmEPMJoD4AIdCyLgA3tRBrGTESANvlGgHsAGEYChQwAFlKAmAyAANKAElpEsF2AAJKAAosAAIUAFmsC2BEAAMYACtvCUADXACryAQCRwUwjgB0DgQB9y1gSdGP0YKEIhLwjz-I0YzKAAITtcoAClYAMbzRghIBBvoAACoAAxIBKdGDtgAEngARtfoADzIAAQ8sAQQh0LDQAAe6ACHQuHABNA4KCswAAdwADVQAT9GL0LwaAAMFmgEGDAIAoAARuy4AD_gBAQDgAQYYAAPmACHRi5oADEQAAMYBBpwAG4gIAQU8AAE6AQ9UAAAB3AAGGAAAmAAAfAI_uNGFmgECE7jkdgAAahLyKwQCfAIJUAELCgIBpAAp0YvAAQEUAAB2AgHAAQZuAAUYAAFuAAaEAQS4ABO1CgIJcAAt0Lt6AgJKAgrWDvAIIdC7rgMGfgAGZgAPJAMDAjwCBjAAAJB_F_MLAU4BBhgABEgAEbhUAwaGAAEwAAkIAQYqAHQlJF5NBAA_AzQV-QDDn9HZ2s_81sUBCt0CKtCCBPEHPgEB9goSxgESVRIKYmFja2dyb3VuZGEDcg8KCxIAdnOJAXARAB0nEgB3RwPwEioOCkcATRABElZXADYRCg1GAF9pbmcQAGoADC5lZFgARx0KRGkA8gxEA-ESPBIiEgtpbnRlbGxpZ18j8xDJAAcTAAI9AAglAAU-AOHTARJLEgh0cmFuc2ZlcgUBWCYg8QC2AfAqDwABAQElDAovACAQAf0ABB4AAA0BKxJvTQA0EAoMIAAScvoAD18ABwH2AApfADQPCgs_AAI-AAcRIQHAABYBBZAABdYA1KMByjDyAXNlcnZpY2XVAAMPAACnAERuCoICkwADDgAB4t0jYEoQARJFSK4S8AIAowEFOQACnQAGHQAAOQEIRzQAIQRVXwMCHwQByB6fkNmj0NC6popBvxMCIPIHDQdCogESBh8EA3gGQQgOAIIzKhAO-Sgik9BzBhQKSjEgV7BJA3E6ABmLOgA4OQ9gKdCwDgBzVQ1AEAoMZl4DoLzQuD4AEL5cAEOrBxF5lwAHEQfY4__2qtGk64MoClIqRZAL8AQzAAH7DBJFEigSDtCy0LjQvdC0fwAh0YGpBwDxAw_DKgWvrNbfha7H8saFAacIAoj6DxLCAhL6AVgAQdGD0LfzAAFqKxKbYwfxBCoSCi4AHxAsAAERviwAD0QAAIy3CPAHFAoQXAAPFgABL9GDFgACH4sWAAGM0PQAQBgKFFh4C2HQuIoAAn8tAVASKPwAAl4bAVgVHPn_APkA8omD97a-ic6qAQqCAir1tgXW4wAB_xIS5AQSxgQSEgQBAdQKAEUQEQCwACQaADcXMjIAjxgHMBAAMp0AQIUYAAIZBwAHAECL0LUYJCwgtRj7CVDQvDAAAZ4No48YAAEh0LAYAHsSD_MWxgACZAA7FAoQGAAA2gAOFgAfsGAAAhG-2AA6EgoORAAuEAE2AbIHckYAAw9oAQRVHHEyAAEATAAPUADyC744AQ6yARO-sgEN2AAv0YsgAQgfuWQAAgEYBgEc9QYB2ODPj6GB5K3DQApMKkAFArIuAAH2BxI2Eh4SCTcrE3OvKjANChHiBQDGAxEQTgAC6gL4AwAAAAAw-tq7zK_BqvY-CnIqZk4AEVSGKx-BhisaASkWQRIoEhsBAjEIOAB9BxwrdAC_0omXtNqDmvtTCkcXLwZB0YXRgL0CDxcvAgO9AOmOm_CVjYH8lQMKrwEqohACEZD4DqJwEkESBnh0cmVtIxVgCwoHDgBjAgUwCgob9w4ALgSQGQA2JxAADgBpUQ2AEhhDAAc2AEMtAUVDAPcS8wT3J3QSWhILcGVyZm9ybWFuY2UYACACKhEKDRMAAFUACxMAAXYANxAKDCYAAKIAKA8KSwACcQAIEvsAAVkEn4-3-KiRx_W-bxIwCE_RhdC_-wAO8BHs9vjQu-y-q9sBEpIPCAsQABoQCgYqBBCszRkSAggAGgQA0A8KBSoDEOYKEgIIARoEAAIRAHCQBxICCAIaBAACEQBwhgISAggDGgQAAhEAcKweEgIIBBoEAAIRAHDEYBICCAUaBAAHEQAgBhoEAAJ4AIDorgMSAggHGgQAAiMAEJoRACAIGgQAAhEAcOosEgIICRoEAAI0AICuzQESAggKGgQAgB0KEwgBEAEhlQLhACCMQCoEEKKfIxICCAvLADoeChQfAFAFEPyhzz8AEQwgAAI_AJAQIXyXoXOSSYo_AHHa-RQSAggNHwACPwCQCCFY7o9JfJaNPwAwtsirPwARDiAAMR8KFT8ABX4AYAYQuJjikMIAEQ8hAAJgAJABIV24LWmnAY9gACDO2EAAERBZAQQfAHDuyi08B_aOHwAgsp8fABkRHwBhB0ZK1hsOPgB5lqYEEgIIEh8AYc2MfSSf8z4AEcBdABkTHwBnMTCaOAjUHwAZFB8AcBUHTKcN9I18AHmA3g0SAggVHwBhZmEqRwHLPgAg8uObABkWHwBhMKIgeX_1PgB55NczEgIIFx8AYawhD5xn9D4Ad9DNEhICCBgfAIEoIWSP8_0lhh8AcZDnGBICCBkfABEgtgHzDBAhbBwBtIyUQsAqBRC284YREgIIGhoECAEQAjkBkCEhxLnuH70Yi70AcYrGNxICCBugAgIfAIEBIZNP1el_OjkBBncBBh8AYTE2JtPjLh8AIMTB3AAZHD4AYXDHgNvQJJ4AcdacbBICCB0fAAIVAvABASHyO1hVremOQCoFEMzz6DoBGR4gAHASbDrXX7yLIACBjsaYZBICCB8gAAI1ApABIbYJAsO4x441AkDQ5ZaLTQMRICEABb4AUSGu6wMgXAEgvIo9ARkhHwBhMMdbmuHv8wIgnO2tAxEiHwAEnwBhrl2R_tiInwAwtv25NgIZIyAAYcP9JXiQ2CAAMKSro0AAESQgAAR-AGGLK-daiRBfAHnm1k4SAgglHwBh7EZcgN4SPAEgmMdeABEm-AMEPgBhRGexjSY2HwAg-vAQAxEnHwAxHAoSkAPxAtC9FxyK4I1AKgMQ3jwSAggoHgAEPQBh9t5A8_kRPQAgvvuYAREpHwARHhcCkAEhlLRkGAhPjFkBMMCe6iAAGSogAGFpZIFpINZ5ATDix-3YBBErIAAEXwBhtIzr7boa2AFxsvNNEgIILB8ABF8AYYY1tLkswBkBMOKug18AES0gAAQ_AGHSNJus7fwZAXnqgikSAgguHwBh8NvF-JqEtgEgoIu0AhEvHwACXgCBCCGBc64oXDJLBIHmufQGEgIIMCAAAl4AgQghOBnAMVET_AAG7AMTBfECgQEh7slu6-q8vABxkMUyEgIIMTsFAj4AgQEhMPynFpOSHwB3gJBEEgIIMh8AgQQh8KgtOBekuwB3holWEgIIMx8AgQghAReekbwQfAB54IAIEgIINB8AYdq5_0ule10Acb7sJhICCDWVBQTaAGFGheYVTpfaAImsttkQEgIINiAAYeB_xxzyESAAMNrOv-8CETcgABEfwwWRECEQW242YSd7zAPFuUcSAgg4GgQICRAKNQJwB8SqrXP5jjUCARQGGTkCBmGCqTQor5WeAHfy_SESAgg6HwCBBCHoEquIE8OXAXfE2kYSAgg7HwCBCCEMRqorWdI-ACCCk30AEDwfAC0iAAIAIQkJ7QXxCADwPy0AAIA_MgYSBBCc-QcyBRIDEKgIBwAhzAYHACGGAgcAIaARBwAhkFIHACHEYDIAIriRHQAhmgMWAJCULDIFEgMQhiQAAAA%2C;wmaxone%3D1.000;wminone%3D1.000;ydngd_mean%3D0.261882;ydngi%3D0.5063;ynhg_mean%3D0.1904;zsset%3DeNptV0ty20YQvUrvsrJLkiuu5DggMCRh4ucBYIlekZJtKbFd3Lkqt6AkgoIpkroCULlQ3usBTMpOSWj09Pz687ob9CIj7by9bJbtJf4W8urk5emZjEqTFxKbUuIyKiQzNk8Tae6autk1m3YuzbZZNpumbhfNWk5fc8/p69fy%2Bx8nJ%2BL5RYjVXhCIF1rxkrQYG7xtWiYQ5fjP8R9iyblnAxl4/gQkikCKAgoNjFeADFMLPko5mw7E9xI%2BvxWgeNI0AimTwtgXeWHDiRHfeu%2BnEnh2AlKUsQTGC0iKMWicShAaCdIRnoQPjgrSc7DW5Dlo%2BA7TZTEVMxwavxATi7E2tWJy38uMmHcww1zI0PMNiMWTj2nqMByNC1DoCwLPDSPMCAzgwjKRkRcbGYVDPDaSURoFBsI0DWRkvYSUJo%2B9aChj6gx/pTIOCwljb2QkzCOuCotc3mQjeVPGmUxCOGwSJqMgjSXyBiaSCAqChgPr2alEKQ6K0mQksWdDDxRGxvB6nAbG8gVzQeCTdDgU6CRpEk0lzfBvrKdBTEtE3yv8sWS%2BZKFflLAxi7ypZDg4S8ME8ymCOUDcMpv69GSWv5K3iiBLT8G2COdak5WDKPTFhjmE1M6m0N3CIgsf5R4Pyz1olRvfGvBjD/GRPIwznJ5nxgSgqcVMYQ0XlFBU8mk8CAEOoGxYkE5B4BhSwKtICy8CLWFEAb%2BUmSCOUwH28NA0UBxzPg5xy3kY4klUECYXIMWYTrg4EyD%2BjnmCZ/ZsgERYUvCIfJgr62TNStn2Uppbld02tWPnmK6w%2BbbZN49OdNPskH5gq2at2fjFDXZ81Vh7x5NveUnzgCys2k%2Bi%2B2/dS7OSzJbHMVcrXs0LeBUFYHFNhfld%2B7n5DhEUqTiP83a4dEHRZ71v5nRAbYDwXk/ZuyP0CrWY4l3H4q4r6LXXGrGRZqWLKzIV2fbaLeRwy31k15DP%2BOaAx7qtvNytxlYM3KErVbPmmRWurpsnZ1eFGSx9wJ57%2Btzt5JD3bES12jrf11SU0x3j3OwGupa%2B1SrXLvq5rV40Y60Tnt1%2B4AEbdfCcCmzgkyUN2mhwNmRgIHxLh3/RIfZvGcXDUOPCCGho9xBDWOGuPUW6joLuim6Dns4I3D9j4dxKMVUzqlut0rWo/eobx3RBx4CwaD/xCKJv234GLNRrW5h9LYqFGUr7yrFzVXXlfK8Ch6v2S3/mToNcuU4iehsFTInNM4GzbN88AS0Oy/QVQXeYVEgo8J0rFADSQQhmPenKazK1Tt479hNMWpLdPw8vBUy3mbJYBMjj%2Bu9u%2BBUR19A%2BOf9r4F1Q1F6Ka0Jdbb7rsuVoascTsUMzX0U/wtEJ9kRjx0K%2B7dlL7L7TwzYqghfWDoZ0zwPCMlP926suPpoYD0w1CJx1auZcAbLs7lQ7iArnvLrLoEM%2Bq2BNJ3eGVopWB59fJvdyQCveXKE1Qq%2BaE/kadLLQeof0vVQNNk70USufzrssXnbugwDJhS2PdDnDThEi034UzZ1Nn/rtX245wzXrvabAg4p0yfrYuF5U/biHCnUvLdnOO4teVHUoPQwB7NvngsWva1yBgODzEdjoCtZE0WtYVREGceYhkTsV5pRd0RdMM7fxStdeK8r6BgBfXGuf6Kz9oIVo%2B4NRUOtgwVfdw%2BSD1vwb4W6tX7VWXIJGs64fcLe%2BFIJ0M5QgACcDKQI5OX15cionZ6RnZ6/k7E9%2B5/lGu2OArx2/wMcRvj/QufktVMhoIOGFTN5LPM3fRvgyyMoIbdaizeclzvQzKZOwQJs1gzhN0Km1j95ru2In09cLhdV317Rql0eO0aLPSqStSq28Zop0Vd01kco1F1c8rrBjd6iplWujD3rtXgvwUemheO9eTxqoG8Va3ybY1RGSS%2BaKtgKubD%2B6qucawE%2BiQ1F2vYGJdimaS7dqSMXKxuGG9ZhWPbbfiJ0OUVfOsO1RFi9cPX%2Bg14jwtVItwlxw33WXVS/QOXwm0BjMdBWbgr%2BBvbnW7q6g7bu0n7uavXb5evgOcI1QG%2B7BLf8j7Fer27vKq1l51/dAN3xgV9J62WnlqqVGk78wDoVyr33isRd0FRfRXR61IYXNSvSj5t4BgTnXta%2Bjoq5W37sq476Tbg7l4qoP3k/lHpXM2VO7zdddI9zpd077VdnnrRhlY6eAa79BlRsXiidNwJVEU4uP4UnIX1exF4XJRJr1v/8wHtKdsDoCZ/uNv2HM5D%2Bak0fD;relevgeo%3D225;geochanged%3D1;;udbts%3D1459797057;downerprotobundle%3DCAwVQbwCVw%2C%2C&reqid=1461253060957657-600715567702129748010289-myt1-1909&snip=exps%3Dmarker_ratings_info%2Cmarker_movie_rating%3D0;report%3Dwww;reps%3Dall_on;snip_width%3D550;uil%3Dru;dqsigml%3D4&snip=t%3D0&text=%28autocad%3A%3A209750+^+autodesk%3A%3A288721+^+%28%28autodesk%3A%3A288721+%26/%281+1%29+inventor%3A%3A1697918%29%29+^+%28%28auto%3A%3A28861+%26/%281+1%29+cad%3A%3A171629%29%29+^+%D0%B0%D0%B2%D1%82%D0%BE%D0%BA%D0%B0%D0%B4%3A%3A1405467+^+autoca%3A%3A420234780%29+%26%26/%28-3+5%29+%28%28%D1%81%D0%BA%D0%B0%D1%87%D0%B0%D1%82%D1%8C%3A%3A691+^+download%3A%3A13863+^+pdf%3A%3A10201+^+torrent%3A%3A35211+^+%28%28%D0%B1%D0%B5%D1%81%D0%BF%D0%BB%D0%B0%D1%82%D0%BD%D0%BE%3A%3A456+%26/%281+1%29+%D0%B7%D0%B0%D0%B3%D1%80%D1%83%D0%B7%D0%B8%D1%82%D1%8C%3A%3A13856%29%29+^+%D0%B7%D0%B0%D0%B3%D1%80%D1%83%D0%B6%D0%B0%D1%82%D1%8C%3A%3A13856+^+%D0%B7%D0%B0%D0%BA%D0%B0%D1%87%D0%B8%D0%B2%D0%B0%D1%82%D1%8C%3A%3A112512+^+%D1%81%D0%BA%D0%B0%D1%87%D0%B8%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5%3A%3A14585+^+%D1%81%D0%BA%D0%B0%D1%87%D0%B8%D0%B2%D0%B0%D1%82%D1%8C%D1%81%D1%8F%3A%3A423410+^+%D1%81%D0%BA%D0%B0%D1%87%D0%BA%D0%B0%3A%3A152424+^+skachat%3A%3A203208%29+%26/%28-64+64%29+%28%D0%B1%D0%B5%D1%81%D0%BF%D0%BB%D0%B0%D1%82%D0%BD%D0%BE%3A%3A456+^+besplatno%3A%3A455045+^+download%3A%3A13863+^+free%3A%3A12386+^+%D0%B1%D0%B5%D1%81%D0%BF%D0%BB%3A%3A886571+^+%D0%B1%D0%B5%D1%81%D0%BF%D0%BB%D0%B0%D1%82%D0%BD%D0%B8%D0%B9%3A%3A14490854+^+%D0%B1%D0%B5%D1%81%D0%BF%D0%BB%D0%B0%D1%82%D0%BD%D0%B8%D0%BA%3A%3A105058695+^+%D0%B1%D0%B5%D1%81%D0%BF%D0%BB%D0%B0%D1%82%D0%BD%D0%BD%D1%8B%D0%B9%3A%3A280156520+^+%D0%B4%D0%B0%D1%80%D0%BE%D0%BC%3A%3A148126+^+%D1%81%D0%B2%D0%BE%D0%B1%D0%BE%D0%B4%D0%BD%D0%BE%3A%3A88910+^+%D0%B1%D0%B5%D1%81%D0%BF%D0%BB%D0%B0%D0%BD%D0%BE%3A%3A4669275+^+%D0%B1%D0%B5%D1%81%D0%BF%D0%BB%D0%B0%D1%82%D0%BE%3A%3A10775250+^+%D1%85%D0%B0%D0%BB%D1%8F%D0%B2%D0%BD%D1%8B%D0%B9%3A%3A644531%29%29+^+%D1%81%D0%BA%D0%B0%D1%87%D0%B0%D1%82%D1%8C%D0%B1%D0%B5%D1%81%D0%BF%D0%BB%D0%B0%D1%82%D0%BD%D0%BE%3A%3A17882331+%26/%28-64+64%29+%D0%BD%D0%B0%3A%3A131+%26/%28-64+64%29+%28%D1%80%D1%83%D1%81%D1%81%D0%BA%D0%BE%D0%BC%3A%3A1942+^+russia%3A%3A37324+^+russian%3A%3A31805+^+%D1%80%D0%BE%D1%81%D1%81%D0%B8%D0%B9%D1%81%D0%BA%D0%B8%D0%B9%3A%3A3887+^+rus%3A%3A16095+^+%D0%B2%D0%B5%D0%BB%D0%B8%D0%BA%D0%BE%D1%80%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9%3A%3A1918880+^+%D1%80%D1%83%D1%81%D0%B8%D1%81%D1%82%D0%B8%D0%BA%D0%B0%3A%3A27111921+^+%D1%80%D1%83%D1%81%D0%B8%D1%84%D0%B8%D0%BA%D0%B0%D1%86%D0%B8%D1%8F%3A%3A638169+^+!!%D1%80%D1%83%D1%81%D0%BA%3A%3A1076145+^+%D1%80%D1%83%D1%81%D1%81%3A%3A336053+^+%D1%80%D1%83%D1%81%D1%81%D0%BA%D0%BE%D1%8F%D0%B7%D1%8B%D1%87%D0%BD%D1%8B%D0%B9%3A%3A139984+^+russkom%3A%3A7245427%29+%26%26/%28-3+5%29+%28%D1%82%D0%BE%D1%80%D1%80%D0%B5%D0%BD%D1%82%3A%3A6178+^+torrent%3A%3A35211%29+%26%26/%28-3+5%29+32%3A%3A6178+%26/%28-1+1%29+%28bit%3A%3A27572+^+%D0%B1%D0%B8%D1%82%D0%BD%D1%8B%D0%B9%3A%3A414024+^+%D1%83%D0%BA%D1%83%D1%81%D0%B8%D1%82%D1%8C%3A%3A558080+^+%28%28background%3A%3A96185+%26/%281+1%29+intelligent%3A%3A705091+%26/%281+1%29+transfer%3A%3A180746+%26/%281+1%29+service%3A%3A17789%29%29+^+%D0%B1%D0%B8%D1%82%3A%3A65584%29+%26%26/%28-3+5%29+%D0%B4%D0%BB%D1%8F%3A%3A205+%26/%28-64+64%29+%28%28windows%3A%3A2869+^+%D0%B2%D0%B8%D0%BD%D0%B4%D0%BE%D0%B2%D1%81%3A%3A318239+^+%D0%B2%D0%B8%D0%BD%D0%B4%D0%BE%D1%83%D0%B7%3A%3A17509782+^+%D0%B2%D0%B8%D0%BD%D0%B4%D0%BE%D1%83%D1%81%3A%3A2618285%29+%26%26/%28-3+5%29+%28xp%3A%3A13143+^+windows%3A%3A2869+^+%D1%85%D1%80%3A%3A278393+^+%28%28xtreme%3A%3A579234+%26/%281+1%29+performance%3A%3A113530%29%29+^+%D1%85%D0%BF%3A%3A582849%29%29+^+windowsxp%3A%3A585285+softness%3A6&tld=ru&uil=ru&user_request=autocad+%D1%81%D0%BA%D0%B0%D1%87%D0%B0%D1%82%D1%8C+%D0%B1%D0%B5%D1%81%D0%BF%D0%BB%D0%B0%D1%82%D0%BD%D0%BE+%D0%BD%D0%B0+%D1%80%D1%83%D1%81%D1%81%D0%BA%D0%BE%D0%BC+%D1%82%D0%BE%D1%80%D1%80%D0%B5%D0%BD%D1%82+32+bit+%D0%B4%D0%BB%D1%8F+windows+xp
\ No newline at end of file diff --git a/library/cpp/streams/lz/ut/ya.make b/library/cpp/streams/lz/ut/ya.make deleted file mode 100644 index d5bbd22f8a..0000000000 --- a/library/cpp/streams/lz/ut/ya.make +++ /dev/null @@ -1,13 +0,0 @@ -UNITTEST_FOR(library/cpp/streams/lz) - -RESOURCE( - random.data /random.data - request.data /request.data - yq_609.data /yq_609.data -) - -SRCS( - lz_ut.cpp -) - -END() diff --git a/library/cpp/streams/lz/ut/yq_609.data b/library/cpp/streams/lz/ut/yq_609.data Binary files differdeleted file mode 100644 index 9694b0c97f..0000000000 --- a/library/cpp/streams/lz/ut/yq_609.data +++ /dev/null diff --git a/library/cpp/streams/lz/ya.make b/library/cpp/streams/lz/ya.make deleted file mode 100644 index 8d3d20e9c2..0000000000 --- a/library/cpp/streams/lz/ya.make +++ /dev/null @@ -1,20 +0,0 @@ -LIBRARY() - -PEERDIR( - contrib/libs/fastlz - contrib/libs/minilzo - contrib/libs/quicklz - - library/cpp/streams/lz/snappy - library/cpp/streams/lz/lz4 -) - -SRCS( - lz.cpp -) - -END() - -RECURSE_FOR_TESTS( - ut -) |