ftk.h   ftk.h 
skipping to change at line 44 skipping to change at line 44
#define FLM_PLATFORM_CONFIGURED #define FLM_PLATFORM_CONFIGURED
// Determine the build platform // Determine the build platform
#undef FLM_WIN #undef FLM_WIN
#undef FLM_NLM #undef FLM_NLM
#undef FLM_UNIX #undef FLM_UNIX
#undef FLM_AIX #undef FLM_AIX
#undef FLM_LINUX #undef FLM_LINUX
#undef FLM_SOLARIS #undef FLM_SOLARIS
#undef FLM_SPARC
#undef FLM_HPUX #undef FLM_HPUX
#undef FLM_OSX #undef FLM_OSX
#undef FLM_BIG_ENDIAN
#undef FLM_PPC
#undef FLM_STRICT_ALIGNMENT
#undef FLM_S390 #undef FLM_S390
#undef FLM_IA64 #undef FLM_IA64
#undef FLM_PPC
#undef FLM_SPARC
#undef FLM_SPARC_PLUS
#undef FLM_X86
#undef FLM_BIG_ENDIAN
#undef FLM_STRICT_ALIGNMENT
#undef FLM_GNUC #undef FLM_GNUC
#undef FLM_HAS_ASYNC_IO
#undef FLM_HAS_DIRECT_IO
#if defined( __GNUC__) #if defined( __GNUC__)
#define FLM_GNUC #define FLM_GNUC
#if defined( __arch64__)
#if !defined( FLM_64BIT)
#define FLM_64BIT
#endif
#endif
#endif #endif
#if defined( __NETWARE__) || defined( NLM) || defined( N_PLA T_NLM) #if defined( __NETWARE__) || defined( NLM) || defined( N_PLA T_NLM)
#if defined( __WATCOMC__) && defined( __386__)
#define FLM_X86
#else
#error Platform architecture not supported
#endif
#define FLM_NLM #define FLM_NLM
#if !defined( FLM_RING_ZERO_NLM) && !defined( FLM_LI BC_NLM) #if !defined( FLM_RING_ZERO_NLM) && !defined( FLM_LI BC_NLM)
#define FLM_RING_ZERO_NLM #define FLM_RING_ZERO_NLM
#endif #endif
#define FLM_OSTYPE_STR "NetWare" #define FLM_OSTYPE_STR "NetWare"
#if defined( __WATCOMC__) #if defined( __WATCOMC__)
#define FLM_WATCOM_NLM #define FLM_WATCOM_NLM
#elif defined( __MWERKS__) #elif defined( __MWERKS__)
#define FLM_MWERKS_NLM #define FLM_MWERKS_NLM
#endif #endif
#if defined( FLM_RING_ZERO_NLM)
#define FLM_HAS_ASYNC_IO
#define FLM_HAS_DIRECT_IO
#endif
#elif defined( _WIN64) #elif defined( _WIN64)
#if defined( _M_IX6) || defined( _M_X64)
#define FLM_X86
#endif
#define FLM_WIN #define FLM_WIN
#define FLM_OSTYPE_STR "Windows" #define FLM_OSTYPE_STR "Windows"
#ifndef FLM_64BIT #ifndef FLM_64BIT
#define FLM_64BIT #define FLM_64BIT
#endif #endif
#define FLM_STRICT_ALIGNMENT #define FLM_STRICT_ALIGNMENT
#define FLM_HAS_ASYNC_IO
#define FLM_HAS_DIRECT_IO
#elif defined( _WIN32) #elif defined( _WIN32)
#if defined( _M_IX86) || defined( _M_X64)
#define FLM_X86
#else
#error Platform architecture not supported
#endif
#define FLM_WIN #define FLM_WIN
#define FLM_OSTYPE_STR "Windows" #define FLM_OSTYPE_STR "Windows"
#define FLM_HAS_ASYNC_IO
#define FLM_HAS_DIRECT_IO
#elif defined( _AIX) #elif defined( _AIX)
#define FLM_AIX #define FLM_AIX
#define FLM_OSTYPE_STR "AIX" #define FLM_OSTYPE_STR "AIX"
#define FLM_UNIX #define FLM_UNIX
#define FLM_BIG_ENDIAN #define FLM_BIG_ENDIAN
#define FLM_STRICT_ALIGNMENT #define FLM_STRICT_ALIGNMENT
#elif defined( linux) #elif defined( linux)
#define FLM_LINUX #define FLM_LINUX
#define FLM_OSTYPE_STR "Linux" #define FLM_OSTYPE_STR "Linux"
#define FLM_UNIX #define FLM_UNIX
skipping to change at line 114 skipping to change at line 144
#elif defined( __ia64__) #elif defined( __ia64__)
#define FLM_IA64 #define FLM_IA64
#ifndef FLM_64BIT #ifndef FLM_64BIT
#define FLM_64BIT #define FLM_64BIT
#endif #endif
#define FLM_STRICT_ALIGNMENT #define FLM_STRICT_ALIGNMENT
#elif defined( sparc) || defined( __sparc) || define d( __sparc__) #elif defined( sparc) || defined( __sparc) || define d( __sparc__)
#define FLM_SPARC #define FLM_SPARC
#define FLM_BIG_ENDIAN #define FLM_BIG_ENDIAN
#define FLM_STRICT_ALIGNMENT #define FLM_STRICT_ALIGNMENT
#if !defined ( FLM_SPARC_GENERIC)
#if defined( __sparcv8plus) || defin
ed( __sparcv9) || defined( __sparcv9__) || \
defined( __sparc_v8__) || d
efined( __sparc_v9__) || defined( __arch64__)
#define FLM_SPARC_PLUS
#endif
#endif
#elif defined( __x86__) || defined( __i386__) || def
ined( __x86_64__)
#define FLM_X86
#else
#error Platform architecture not supported
#endif #endif
#define FLM_HAS_ASYNC_IO
#define FLM_HAS_DIRECT_IO
#elif defined( sun) #elif defined( sun)
#define FLM_SOLARIS #define FLM_SOLARIS
#define FLM_OSTYPE_STR "Solaris" #define FLM_OSTYPE_STR "Solaris"
#define FLM_UNIX #define FLM_UNIX
#define FLM_STRICT_ALIGNMENT #define FLM_STRICT_ALIGNMENT
#if defined( sparc) || defined( __sparc) || defined( __sparc__) #if defined( sparc) || defined( __sparc) || defined( __sparc__)
#define FLM_SPARC #define FLM_SPARC
#define FLM_BIG_ENDIAN #define FLM_BIG_ENDIAN
#if !defined ( FLM_SPARC_GENERIC)
#if defined( __sparcv8plus) || defin
ed( __sparcv9)
#define FLM_SPARC_PLUS
#endif
#endif
#elif defined( i386) || defined( _i386)
#define FLM_X86
#else
#error Platform architecture not supported
#endif #endif
#define FLM_HAS_ASYNC_IO
#define FLM_HAS_DIRECT_IO
#elif defined( __hpux) || defined( hpux) #elif defined( __hpux) || defined( hpux)
#define FLM_HPUX #define FLM_HPUX
#define FLM_OSTYPE_STR "HPUX" #define FLM_OSTYPE_STR "HPUX"
#define FLM_UNIX #define FLM_UNIX
#define FLM_BIG_ENDIAN #define FLM_BIG_ENDIAN
#define FLM_STRICT_ALIGNMENT #define FLM_STRICT_ALIGNMENT
#define FLM_HAS_ASYNC_IO
#define FLM_HAS_DIRECT_IO
#elif defined( __APPLE__) #elif defined( __APPLE__)
#define FLM_OSX #define FLM_OSX
#define FLM_OSTYPE_STR "OSX" #define FLM_OSTYPE_STR "OSX"
#define FLM_UNIX #define FLM_UNIX
#if (defined( __ppc__) || defined( __ppc64__)) #if (defined( __ppc__) || defined( __ppc64__))
#define FLM_PPC #define FLM_PPC
#define FLM_BIG_ENDIAN #define FLM_BIG_ENDIAN
#define FLM_STRICT_ALIGNMENT #define FLM_STRICT_ALIGNMENT
#elif defined( __x86__) || defined( __x86_64__)
#define FLM_X86
#else
#error Platform architecture not supported
#endif #endif
#define FLM_HAS_ASYNC_IO
#define FLM_HAS_DIRECT_IO
#else #else
#error Platform architecture is undefined. #error Platform architecture is undefined.
#endif #endif
#if !defined( FLM_64BIT) && !defined( FLM_32BIT) #if !defined( FLM_64BIT) && !defined( FLM_32BIT)
#if defined( FLM_UNIX) #if defined( FLM_UNIX)
#if defined( __x86_64__) || defined( _LP64) #if defined( __x86_64__) || defined( _M_X64)
|| \ || \
defined( __LP64__) || defined( __sp defined( _LP64) || defined( __LP64_
arcv9) _) || \
defined ( __64BIT__) || defined( __
arch64__) || \
defined( __sparcv9) || defined( __s
parcv9__)
#define FLM_64BIT #define FLM_64BIT
#endif #endif
#endif #endif
#endif #endif
#if !defined( FLM_64BIT) #if !defined( FLM_64BIT)
#define FLM_32BIT #define FLM_32BIT
#elif defined( FLM_32BIT) #elif defined( FLM_32BIT)
#error Cannot define both FLM_32BIT and FLM_64BIT #error Cannot define both FLM_32BIT and FLM_64BIT
#endif #endif
#ifdef FLM_NLM #if defined( __x86_64__) || defined( _M_X64) || \
defined( _LP64) || defined( __LP64__) || \
defined ( __64BIT__) || defined( __arch64__) || \
defined( __sparcv9) || defined( __sparcv9__)
#if !defined( FLM_64BIT)
#error Platform word size is incorrect
#endif
#else
#if !defined( FLM_32BIT)
#error Platform word size is incorrect
#endif
#endif
#ifdef FLM_NLM
#define FSTATIC #define FSTATIC
#else #else
#define FSTATIC static #define FSTATIC static
#endif #endif
// Debug or release build? // Debug or release build?
#ifndef FLM_DEBUG #ifndef FLM_DEBUG
#if defined( DEBUG) || (defined( PRECHECKIN) && PREC HECKIN != 0) #if defined( DEBUG) || (defined( PRECHECKIN) && PREC HECKIN != 0)
#define FLM_DEBUG #define FLM_DEBUG
skipping to change at line 200 skipping to change at line 276
typedef unsigned short FLMUNICODE; typedef unsigned short FLMUNICODE;
typedef unsigned long long FLMUINT64; typedef unsigned long long FLMUINT64;
typedef unsigned int FLMUINT32; typedef unsigned int FLMUINT32;
typedef unsigned short FLMUINT16; typedef unsigned short FLMUINT16;
typedef unsigned char FLMUINT8; typedef unsigned char FLMUINT8;
typedef long long FLMINT64; typedef long long FLMINT64;
typedef int FLMINT32; typedef int FLMINT32;
typedef short FLMINT16; typedef short FLMINT16;
typedef signed char FLMINT8; typedef signed char FLMINT8;
#if defined( FLM_GNUC)
typedef __builtin_va_list
f_va_list;
#elif defined( FLM_SOLARIS)
typedef void *
f_va_list;
#else
typedef char *
f_va_list;
#endif
#if defined( FLM_64BIT) || defined( FLM_OSX) || \ #if defined( FLM_64BIT) || defined( FLM_OSX) || \
defined( FLM_S390) || defined( FLM_HPUX) || defined( FLM_AIX) defined( FLM_S390) || defined( FLM_HPUX) || defined( FLM_AIX)
typedef unsigned long FLMSIZET; typedef unsigned long FLMSIZET;
#else #else
typedef unsigned FLMSIZET; typedef unsigned FLMSIZET;
#endif #endif
#else #else
#if defined( FLM_WIN) #if defined( FLM_WIN)
#if defined( FLM_64BIT) #if defined( FLM_64BIT)
typedef unsigned __int64 FLMUINT; typedef unsigned __int64 FLMUINT;
typedef __int64 FLMINT; typedef __int64 FLMINT;
typedef unsigned __int64 FLMSIZET; typedef unsigned __int64 FLMSIZET;
typedef unsigned int FLMUINT32; typedef unsigned int FLMUINT32;
#elif _MSC_VER >= 1300 #elif _MSC_VER >= 1300
typedef unsigned long __w64 FLMU INT; typedef unsigned long __w64 FLMU INT;
typedef long __w64 FLMINT; typedef long __w64 FLMINT;
typedef unsigned int FLMUINT32; typedef __w64 unsigned int FLMUINT32;
typedef __w64 unsigned int FLMSIZET; typedef __w64 unsigned int FLMSIZET;
#else #else
typedef unsigned long FLMUINT; typedef unsigned long FLMUINT;
typedef long FLMINT; typedef long FLMINT;
typedef unsigned int FLMUINT32; typedef unsigned int FLMUINT32;
typedef __w64 unsigned int FLMSIZET; typedef unsigned int FLMSIZET;
#endif #endif
typedef char *
f_va_list;
#elif defined( FLM_NLM) #elif defined( FLM_NLM)
typedef unsigned long int FLMUINT; typedef unsigned long int FLMUINT;
typedef long int FLMINT; typedef long int FLMINT;
typedef unsigned long int FLMUINT32; typedef unsigned long int FLMUINT32;
typedef unsigned FLMSIZET; typedef unsigned FLMSIZET;
typedef unsigned long f_va_list;
#else #else
#error Platform not supported #error Platform not supported
#endif #endif
typedef unsigned char FLMBYTE; typedef unsigned char FLMBYTE;
typedef unsigned short int FLMUNICODE; typedef unsigned short int FLMUNICODE;
typedef unsigned short int FLMUINT16; typedef unsigned short int FLMUINT16;
typedef unsigned char FLMUINT8; typedef unsigned char FLMUINT8;
typedef signed int FLMINT32; typedef signed int FLMINT32;
skipping to change at line 281 skipping to change at line 346
#endif #endif
/// \addtogroup retcodes /// \addtogroup retcodes
/// @{ /// @{
typedef FLMINT RCODE; ///< Return code typedef FLMINT RCODE; ///< Return code
/// @} /// @}
typedef FLMINT FLMBOOL; typedef FLMINT FLMBOOL;
#define F_FILENAME_SIZE 256 #define F_FILENAME_SIZE 256
#define F_PATH_MAX_SIZE 256 #define F_PATH_MAX_SIZE 256
#define F_WAITFOREVER (0xFFFFFFFF)
#define FLM_MAX_UINT ((FLMUINT)(-1L)) #define FLM_MAX_UINT ((FLMUINT)(-1L))
#define FLM_MAX_INT ((FLMINT)(((FLMUINT)(-1L)) >> 1)) #define FLM_MAX_INT ((FLMINT)(((FLMUINT)(-1L)) >> 1))
#define FLM_MIN_INT ((FLMINT)((((FLMUINT)(-1L)) >> 1) + 1)) #define FLM_MIN_INT ((FLMINT)((((FLMUINT)(-1L)) >> 1) + 1))
#define FLM_MAX_UINT32 ((FLMUINT32)(0xFFFFFFFFL)) #define FLM_MAX_UINT32 ((FLMUINT32)(0xFFFFFFFFL))
#define FLM_MAX_INT32 ((FLMINT32)(0x7FFFFFFFL)) #define FLM_MAX_INT32 ((FLMINT32)(0x7FFFFFFFL))
#define FLM_MIN_INT32 ((FLMINT32)(0x80000000L)) #define FLM_MIN_INT32 ((FLMINT32)(0x80000000L))
#define FLM_MAX_UINT16 ((FLMUINT16)(0xFFFF)) #define FLM_MAX_UINT16 ((FLMUINT16)(0xFFFF))
#define FLM_MAX_INT16 ((FLMINT16)(0x7FFF)) #define FLM_MAX_INT16 ((FLMINT16)(0x7FFF))
#define FLM_MIN_INT16 ((FLMINT16)(0x8000)) #define FLM_MIN_INT16 ((FLMINT16)(0x8000))
skipping to change at line 369 skipping to change at line 435
#error Platform not supported #error Platform not supported
#endif #endif
/******************************************************************* ********* /******************************************************************* *********
Desc: Argument lists Desc: Argument lists
******************************************************************** ********/ ******************************************************************** ********/
#define f_alignedsize(n) \ #define f_alignedsize(n) \
((sizeof(n) + FLM_ALIGN_SIZE - 1) & ~(FLM_ALIGN_SIZE - 1) ) ((sizeof(n) + FLM_ALIGN_SIZE - 1) & ~(FLM_ALIGN_SIZE - 1) )
#if defined( FLM_GNUC) #if defined( FLM_RING_ZERO_NLM)
#define f_va_start( list, name) \
__builtin_va_start( list, name)
#define f_va_arg( list, type) \
__builtin_va_arg( list, type)
#define f_va_end( list) \
__builtin_va_end( list)
#elif defined( FLM_NLM)
#define f_argsize(x) \ #define f_argsize(x) \
((sizeof(x)+sizeof(int)-1) & ~(sizeof(int)-1)) ((sizeof(x)+sizeof(int)-1) & ~(sizeof(int)-1))
typedef unsigned long f_va_list;
#define f_va_start(ap, parmN) \ #define f_va_start(ap, parmN) \
((void)((ap) = (unsigned long)&(parmN) + f_argsize(p armN))) ((void)((ap) = (unsigned long)&(parmN) + f_argsize(p armN)))
#define f_va_arg(ap, type) \ #define f_va_arg(ap, type) \
(*(type *)(((ap) += f_argsize(type)) - (f_argsize(ty pe)))) (*(type *)(((ap) += f_argsize(type)) - (f_argsize(ty pe))))
#define f_va_end(ap) ((void)0) #define f_va_end(ap) ((void)0)
#elif defined( FLM_SOLARIS)
#define f_va_start( list, name) \
((void)((list) = (f_va_list)&__builtin_va_alist))
#define f_va_arg( list, type) \
((type *)__builtin_va_arg_incr((type *)(list)))[0]
#define f_va_end( list) \
(void)(list)
#else #else
#define f_va_start( list, name) \ #include <stdarg.h>
((list) = (f_va_list)&(name) + f_alignedsize( name)) #define f_va_list va_list
#define f_va_start va_start
#define f_va_arg( list, type) \ #define f_va_arg va_arg
(*(type *)((list += f_alignedsize( type)) - f_aligne #define f_va_end va_end
dsize( type)))
#define f_va_end( list) \
((list) = (f_va_list)0)
#endif #endif
// flmnovtbl keeps MS compilers from generating vtables for interfac es // flmnovtbl keeps MS compilers from generating vtables for interfac es
#ifdef _MSC_VER #ifdef _MSC_VER
#define flmnovtbl __declspec( novtable) #define flmnovtbl __declspec( novtable)
#else #else
#define flmnovtbl #define flmnovtbl
#endif #endif
skipping to change at line 493 skipping to change at line 540
#define NE_FLM_GETTING_FILE_SIZE 0xC223 ///< 0xC223 - Unexpected error occurred while getting a file's size. #define NE_FLM_GETTING_FILE_SIZE 0xC223 ///< 0xC223 - Unexpected error occurred while getting a file's size.
#define NE_FLM_TRUNCATING_FILE 0xC224 ///< 0xC224 - Unexpected error occurred while truncating a file. #define NE_FLM_TRUNCATING_FILE 0xC224 ///< 0xC224 - Unexpected error occurred while truncating a file.
#define NE_FLM_PARSING_FILE_NAME 0xC225 ///< 0xC225 - Unexpected error occurred while parsing a file's name. #define NE_FLM_PARSING_FILE_NAME 0xC225 ///< 0xC225 - Unexpected error occurred while parsing a file's name.
#define NE_FLM_CLOSING_FILE 0xC226 ///< 0xC226 - Unexpected error occurred while closing a file. #define NE_FLM_CLOSING_FILE 0xC226 ///< 0xC226 - Unexpected error occurred while closing a file.
#define NE_FLM_GETTING_FILE_INFO 0xC227 ///< 0xC227 - Unexpected error occurred while getting information about a file. #define NE_FLM_GETTING_FILE_INFO 0xC227 ///< 0xC227 - Unexpected error occurred while getting information about a file.
#define NE_FLM_EXPANDING_FILE 0xC228 ///< 0xC228 - Unexpected error occurred while expanding a file. #define NE_FLM_EXPANDING_FILE 0xC228 ///< 0xC228 - Unexpected error occurred while expanding a file.
#define NE_FLM_GETTING_FREE_BLOCKS 0xC229 ///< 0xC229 - Unexpected error getting free blocks from file system. #define NE_FLM_GETTING_FREE_BLOCKS 0xC229 ///< 0xC229 - Unexpected error getting free blocks from file system.
#define NE_FLM_CHECKING_FILE_EXISTENCE 0xC22A ///< 0xC22A - Unexpected error occurred while c hecking to see if a file exists. #define NE_FLM_CHECKING_FILE_EXISTENCE 0xC22A ///< 0xC22A - Unexpected error occurred while c hecking to see if a file exists.
#define NE_FLM_RENAMING_FILE 0xC22B ///< 0xC22B - Unexpected error occurred while renaming a file. #define NE_FLM_RENAMING_FILE 0xC22B ///< 0xC22B - Unexpected error occurred while renaming a file.
#define NE_FLM_SETTING_FILE_INFO 0xC22C ///< 0xC22C - Unexpected error occurred while setting a file's information. #define NE_FLM_SETTING_FILE_INFO 0xC22C ///< 0xC22C - Unexpected error occurred while setting a file's information.
#define NE_FLM_IO_PENDING
0xC22D ///< 0xC22D - I/O has n
ot yet completed
#define NE_FLM_ASYNC_FAILED
0xC22E ///< 0xC22E - An async I/O oper
ation failed
#define NE_FLM_MISALIGNED_IO
0xC22F ///< 0xC22F - Misaligned buffer
or offset encountered during I/O request
// Stream Errors - These are new // Stream Errors - These are new
#define NE_FLM_STREAM_DECOMPRESS_ERROR 0xC400 ///< 0xC400 - Error decompressing data stream. #define NE_FLM_STREAM_DECOMPRESS_ERROR 0xC400 ///< 0xC400 - Error decompressing data stream.
#define NE_FLM_STREAM_NOT_COMPRESSED 0xC401 ///< 0xC401 - Attempting to decompress a data s tream that is not compressed. #define NE_FLM_STREAM_NOT_COMPRESSED 0xC401 ///< 0xC401 - Attempting to decompress a data s tream that is not compressed.
#define NE_FLM_STREAM_TOO_MANY_FILES 0xC402 ///< 0xC402 - Too many files in input stream. #define NE_FLM_STREAM_TOO_MANY_FILES 0xC402 ///< 0xC402 - Too many files in input stream.
// Miscellaneous new toolkit errors // Miscellaneous new toolkit errors
#define NE_FLM_COULD_NOT_CREATE_SEMAPHORE 0xC500 ///< 0xC500 - Could not create a semaphore. #define NE_FLM_COULD_NOT_CREATE_SEMAPHORE 0xC500 ///< 0xC500 - Could not create a semaphore.
#define NE_FLM_BAD_UTF8 0xC501 ///< 0xC501 - An invali d byte sequence was found in a UTF-8 string #define NE_FLM_BAD_UTF8 0xC501 ///< 0xC501 - An invali d byte sequence was found in a UTF-8 string
#define NE_FLM_ERROR_WAITING_ON_SEMPAHORE 0xC502 ///< 0xC502 - Error occurred while waiting on a sempahore. #define NE_FLM_ERROR_WAITING_ON_SEMAPHORE 0xC502 ///< 0xC502 - Error occurred while waiting on a sempahore.
#define NE_FLM_BAD_SEN 0xC503 ///< 0xC503 - Invalid s imple encoded number. #define NE_FLM_BAD_SEN 0xC503 ///< 0xC503 - Invalid s imple encoded number.
#define NE_FLM_COULD_NOT_START_THREAD 0xC504 ///< 0xC504 - Problem starting a new thread. #define NE_FLM_COULD_NOT_START_THREAD 0xC504 ///< 0xC504 - Problem starting a new thread.
#define NE_FLM_BAD_BASE64_ENCODING 0xC505 ///< 0xC505 - Invalid base64 sequence e ncountered. #define NE_FLM_BAD_BASE64_ENCODING 0xC505 ///< 0xC505 - Invalid base64 sequence e ncountered.
#define NE_FLM_STREAM_EXISTS 0xC506 ///< 0xC506 - Stream file alrea dy exists. #define NE_FLM_STREAM_EXISTS 0xC506 ///< 0xC506 - Stream file alrea dy exists.
#define NE_FLM_MULTIPLE_MATCHES 0xC507 ///< 0xC507 - Multiple items matched bu t only one match was expected. #define NE_FLM_MULTIPLE_MATCHES 0xC507 ///< 0xC507 - Multiple items matched bu t only one match was expected.
#define NE_FLM_BTREE_KEY_SIZE 0xC508 ///< 0xC508 - Invalid b-tree ke y size. #define NE_FLM_BTREE_KEY_SIZE 0xC508 ///< 0xC508 - Invalid b-tree ke y size.
#define NE_FLM_BTREE_BAD_STATE 0xC509 ///< 0xC509 - B-tree operation cannot b e completed. #define NE_FLM_BTREE_BAD_STATE 0xC509 ///< 0xC509 - B-tree operation cannot b e completed.
#define NE_FLM_COULD_NOT_CREATE_MUTEX 0xC50A ///< 0xC50A - Error occurred while creating or initializing a mutex. #define NE_FLM_COULD_NOT_CREATE_MUTEX 0xC50A ///< 0xC50A - Error occurred while creating or initializing a mutex.
#define NE_FLM_BAD_PLATFORM_FORMAT 0xC50B ///< 0xC50B - In-memory alignment o f disk structures is incorrect #define NE_FLM_BAD_PLATFORM_FORMAT 0xC50B ///< 0xC50B - In-memory alignment o f disk structures is incorrect
#define NE_FLM_LOCK_REQ_TIMEOUT 0xC50C ///< 0xC50C - Timeout while waiting for a lock object #define NE_FLM_LOCK_REQ_TIMEOUT 0xC50C ///< 0xC50C - Timeout while waiting for a lock object
#define NE_FLM_WAIT_TIMEOUT 0xC50D ///< 0xC50D - Timeout while wai ting on a semaphore, condition variable, or reader/writer lock
// Network Errors - Must be the same as they were for FLAIM // Network Errors - Must be the same as they were for FLAIM
#define NE_FLM_NOIP_ADDR 0xC900 ///< 0xC900 - IP addres s not found #define NE_FLM_NOIP_ADDR 0xC900 ///< 0xC900 - IP addres s not found
#define NE_FLM_SOCKET_FAIL 0xC901 ///< 0xC901 - IP socket failure #define NE_FLM_SOCKET_FAIL 0xC901 ///< 0xC901 - IP socket failure
#define NE_FLM_CONNECT_FAIL 0xC902 ///< 0xC902 - TCP/IP connection failure #define NE_FLM_CONNECT_FAIL 0xC902 ///< 0xC902 - TCP/IP connection failure
#define NE_FLM_BIND_FAIL 0xC903 ///< 0xC903 - The TCP/I P services on your system may not be configured or installed. #define NE_FLM_BIND_FAIL 0xC903 ///< 0xC903 - The TCP/I P services on your system may not be configured or installed.
#define NE_FLM_LISTEN_FAIL 0xC904 ///< 0xC904 - TCP/IP li sten failed #define NE_FLM_LISTEN_FAIL 0xC904 ///< 0xC904 - TCP/IP li sten failed
#define NE_FLM_ACCEPT_FAIL 0xC905 ///< 0xC905 - TCP/IP ac cept failed #define NE_FLM_ACCEPT_FAIL 0xC905 ///< 0xC905 - TCP/IP ac cept failed
#define NE_FLM_SELECT_ERR 0xC906 ///< 0xC906 - TCP/IP se lect failed #define NE_FLM_SELECT_ERR 0xC906 ///< 0xC906 - TCP/IP se lect failed
skipping to change at line 558 skipping to change at line 609
FLMINT iError, FLMINT iError,
RCODE defa ultRc); RCODE defa ultRc);
/******************************************************************* ********* /******************************************************************* *********
Desc: Forward References Desc: Forward References
******************************************************************** ********/ ******************************************************************** ********/
flminterface IF_DirHdl; flminterface IF_DirHdl;
flminterface IF_FileHdl; flminterface IF_FileHdl;
flminterface IF_FileSystem; flminterface IF_FileSystem;
flminterface IF_FileHdlCache;
flminterface IF_IStream; flminterface IF_IStream;
flminterface IF_PosIStream; flminterface IF_PosIStream;
flminterface IF_ResultSet; flminterface IF_ResultSet;
flminterface IF_ThreadInfo; flminterface IF_ThreadInfo;
flminterface IF_OStream; flminterface IF_OStream;
flminterface IF_IOStream; flminterface IF_IOStream;
flminterface IF_LogMessageClient; flminterface IF_LogMessageClient;
flminterface IF_Thread; flminterface IF_Thread;
flminterface IF_IOBuffer; flminterface IF_IOBuffer;
flminterface IF_AsyncClient;
flminterface IF_Block; flminterface IF_Block;
class F_Pool; class F_Pool;
class F_DynaBuf; class F_DynaBuf;
class F_ListItem; class F_ListItem;
class F_ListManager; class F_ListManager;
/******************************************************************* ********* /******************************************************************* *********
Desc: Cross-platform definitions Desc: Cross-platform definitions
******************************************************************** ********/ ******************************************************************** ********/
skipping to change at line 648 skipping to change at line 701
/// @} /// @}
#define FLM_LAST_LANG (FLM_LA_LANG + 1) #define FLM_LAST_LANG (FLM_LA_LANG + 1)
#define FLM_FIRST_DBCS_LANG (FLM _JP_LANG) #define FLM_FIRST_DBCS_LANG (FLM _JP_LANG)
#define FLM_LAST_DBCS_LANG (FLM_LA_LANG) #define FLM_LAST_DBCS_LANG (FLM_LA_LANG)
/******************************************************************* ********* /******************************************************************* *********
Desc: Collation flags and constants Desc: Collation flags and constants
******************************************************************** ********/ ******************************************************************** ********/
#define HAD_SUB_COLLATION #define F_HAD_SUB_COLLATION 0x01
0x01 // Set if had sub-collating values-diac // Set if had sub-collating values-diacritics
ritics #define F_HAD_LOWER_CASE
#define HAD_LOWER_CASE 0x02 // Set if you hit a lowercase character
0x02 // Set if you hit a lowercase character #define F_COLL_FIRST_SUBSTRING 0x03
#define COLL_FIRST_SUBSTRING 0x03 // First substring marker
// First substring marker #define F_COLL_MARKER
#define COLL_MARKER 0x04 // Marks place of sub-collation
0x04 // Marks place of sub-collation
#define SC_LOWER #define F_SC_LOWER
0x00 // Only lowercase chara 0x00 // Only lowercase characters exist
cters exist #define F_SC_MIXED
#define SC_MIXED 0x01 // Lower/uppercase flags follow in next
0x01 // Lower/uppercase flag byte
s follow in next byte #define F_SC_UPPER
#define SC_UPPER 0x02 // Only upper characters exist
0x02 // Only upper character #define F_SC_SUB_COL
s exist 0x03 // Sub-collation follows (diacritics|ex
#define SC_SUB_COL tCh)
0x03 // Sub-collation follows (diacr
itics|extCh)
#define COLL_TRUNCATED #define F_COLL_TRUNCATED
0x0C // This key piece has been truncated fr 0x0C // This key piece has been truncated from origi
om original nal
#define MAX_COL_OPCODE #define F_MAX_COL_OPCODE
COLL_TRUNCATED F_COLL_TRUNCATED
#define F_CHSASCI
0 // ASCII
#define F_CHSMUL1
1 // Multinational 1
#define F_CHSMUL2
2 // Multinational 2
#define F_CHSBOXD
3 // Box drawing
#define F_CHSSYM1
4 // Typographic Symbols
#define F_CHSSYM2
5 // Iconic Symbols
#define F_CHSMATH
6 // Math
#define F_CHMATHX
7 // Math Extension
#define F_CHSGREK
8 // Greek
#define F_CHSHEB
9 // Hebrew
#define F_CHSCYR
10 // Cyrillic
#define F_CHSKANA
11 // Japanese Kana
#define F_CHSUSER
12 // User-defined
#define F_CHSARB1
13 // Arabic
#define F_CHSARB2
14 // Arabic script
#define F_NCHSETS
15 // # of character sets
(excluding asian)
#define F_ACHSETS
0x0E0 // maximum character set value
- asian
#define F_ACHSMIN
0x024 // minimum character set value
- asian
#define F_ACHCMAX
0x0FE // maxmimum character value in
asian sets
/*******************************************************************
*********
Desc: Diacritics
********************************************************************
********/
#define F_GRAVE
0
#define F_CENTERD
1
#define F_TILDE
2
#define F_CIRCUM
3
#define F_CROSSB
4
#define F_SLASH
5
#define F_ACUTE
6
#define F_UMLAUT
7
#define F_MACRON
8
#define F_APOSAB
9
#define F_APOSBES
10
#define F_APOSBA
11
#define F_RING
14
#define F_DOTA
15
#define F_DACUTE
16
#define F_CEDILLA
17
#define F_OGONEK
18
#define F_CARON
19
#define F_STROKE
20
#define F_BREVE
22
#define F_DOTLESI
239
#define F_DOTLESJ
25
#define F_GACUTE
83 // greek acute
#define F_GDIA
84 // greek diaere
sis
#define F_GACTDIA
85 // acute diaere
sis
#define F_GGRVDIA
86 // grave diaere
sis
#define F_GGRAVE
87 // greek grave
#define F_GCIRCM
88 // greek circum
flex
#define F_GSMOOTH
89 // smooth breat
hing
#define F_GROUGH
90 // rough breath
ing
#define F_GIOTA
91 // iota subscript
#define F_GSMACT
92 // smooth breat
hing acute
#define F_GRGACT
93 // rough breath
ing acute
#define F_GSMGRV
94 // smooth breat
hing grave
#define F_GRGGRV
95 // rough breath
ing grave
#define F_GSMCIR
96 // smooth breat
hing circumflex
#define F_GRGCIR
97 // rough breath
ing circumflex
#define F_GACTIO
98 // acute iota
#define F_GGRVIO
99 // grave iota
#define F_GCIRIO
100 // circumflex iota
#define F_GSMIO
101 // smooth iota
#define F_GRGIO
102 // rough iota
#define F_GSMAIO
103 // smooth acute iota
#define F_GRGAIO
104 // rough acute iota
#define F_GSMGVIO
105 // smooth grave iota
#define F_GRGGVIO
106 // rough grave iota
#define F_GSMCIO
107 // smooth circumflex io
ta
#define F_GRGCIO
108 // rough circumflex iot
a
#define F_GHPRIME
81 // high prime
#define F_GLPRIME
82 // low prime
#define F_RACUTE
200 // russian acute
#define F_RGRAVE
201 // russian grave
#define F_RRTDESC
204 // russian right descen
der
#define F_ROGONEK
205 // russian ogonek
#define F_RMACRON
206 // russian macron
/******************************************************************* ********* /******************************************************************* *********
Desc: I/O Flags Desc: I/O Flags
******************************************************************** ********/ ******************************************************************** ********/
#define FLM_IO_CURRENT_POS FLM_MAX_UINT64 #define FLM_IO_CURRENT_POS FLM_MAX_UINT64
#define FLM_IO_RDONLY 0x0001 #define FLM_IO_RDONLY 0x0001
#define FLM_IO_RDWR 0x0002 #define FLM_IO_RDWR 0x0002
#define FLM_IO_EXCL 0x0004 #define FLM_IO_EXCL 0x0004
#define FLM_IO_CREATE_DIR 0x0008 #define FLM_IO_CREATE_DIR 0x0008
#define FLM_IO_SH_DENYRW 0x0010 #define FLM_IO_SH_DENYRW 0x0010
#define FLM_IO_SH_DENYWR 0x0020 #define FLM_IO_SH_DENYWR 0x0020
#define FLM_IO_SH_DENYNONE 0x0040 #define FLM_IO_SH_DENYNONE 0x0040
#define FLM_IO_DIRECT 0x0080 #define FLM_IO_DIRECT 0x0080
#define FLM_IO_DELETE_ON_RELEASE 0x01 00 #define FLM_IO_DELETE_ON_RELEASE 0x01 00
#define FLM_IO_NO_MISALIGNED 0x02 00
// File Positioning Definitions // File Positioning Definitions
#define FLM_IO_SEEK_SET 0 // Beginning of File #define FLM_IO_SEEK_SET 0 // Beginning of File
#define FLM_IO_SEEK_CUR 1 // Current File Pointer Position #define FLM_IO_SEEK_CUR 1 // Current File Pointer Position
#define FLM_IO_SEEK_END 2 // End of File #define FLM_IO_SEEK_END 2 // End of File
// Maximum file size // Maximum file size
#define FLM_MAXIMUM_FILE_SIZE 0xFF FC0000 #define FLM_MAXIMUM_FILE_SIZE 0xFF FC0000
skipping to change at line 741 skipping to change at line 881
FLM_LIGHTGREEN, ///< 10 = Light Gree n FLM_LIGHTGREEN, ///< 10 = Light Gree n
FLM_LIGHTCYAN, ///< 11 = Li ght Cyan FLM_LIGHTCYAN, ///< 11 = Li ght Cyan
FLM_LIGHTRED, ///< 12 = Li ght Red FLM_LIGHTRED, ///< 12 = Li ght Red
FLM_LIGHTMAGENTA, ///< 13 = Li ght Magenta FLM_LIGHTMAGENTA, ///< 13 = Li ght Magenta
FLM_YELLOW, ///< 14 = Light Yellow FLM_YELLOW, ///< 14 = Light Yellow
FLM_WHITE, ///< 15 = White FLM_WHITE, ///< 15 = White
FLM_NUM_COLORS, FLM_NUM_COLORS,
FLM_CURRENT_COLOR FLM_CURRENT_COLOR
} eColorType; } eColorType;
#define F_BLACK #define F_FOREBLACK "%0F"
"%0C" #define F_FOREBLUE "%1F"
#define F_BLUE #define F_FOREGREEN "%2F"
"%1C" #define F_FORECYAN "%3F"
#define F_GREEN #define F_FORERED "%4F"
"%2C" #define F_FOREMAGENTA "%5F"
#define F_CYAN #define F_FOREBROWN "%6F"
"%3C" #define F_FORELIGHTGRAY "%7F"
#define F_RED #define F_FOREDARKGRAY "%8F"
"%4C" #define F_FORELIGHTBLUE "%9F"
#define F_MAGENTA #define F_FORELIGHTGREEN "%10F"
"%5C" #define F_FORELIGHTCYAN "%11F"
#define F_BROWN #define F_FORELIGHTRED "%12F"
"%6C" #define F_FORELIGHTMAGENTA "%13F"
#define F_LIGHTGRAY #define F_FOREYELLOW "%14F"
"%7C" #define F_FOREWHITE "%15F"
#define F_DARKGRAY
"%8C"
#define F_LIGHTBLUE
"%9C"
#define F_LIGHTGREEN
"%10C"
#define F_LIGHTCYAN
"%11C"
#define F_LIGHTRED
"%12C"
#define F_LIGHTMAGENTA
"%13C"
#define F_YELLOW
"%14C"
#define F_WHITE
"%15C"
#define F_PUSHFORECOLOR #define F_BACKBLACK "%0B"
"%+0C" #define F_BACKBLUE "%1B"
#define F_PUSHBACKCOLOR #define F_BACKGREEN "%2B"
"%+1C" #define F_BACKCYAN "%3B"
#define F_POPFORECOLOR #define F_BACKRED "%4B"
"%-0C" #define F_BACKMAGENTA "%5B"
#define F_POPBACKCOLOR #define F_BACKBROWN "%6B"
"%-1C" #define F_BACKLIGHTGRAY "%7B"
#define F_BACKDARKGRAY "%8B"
#define F_BACKLIGHTBLUE "%9B"
#define F_BACKLIGHTGREEN "%10B"
#define F_BACKLIGHTCYAN "%11B"
#define F_BACKLIGHTRED "%12B"
#define F_BACKLIGHTMAGENTA "%13B"
#define F_BACKYELLOW "%14B"
#define F_BACKWHITE "%15B"
#define F_PUSHCOLOR #define F_PUSH_FORECOLOR "%+F"
F_PUSHFORECOLOR F_PUSHBACKCOLOR #define F_POP_FORECOLOR "%-F"
#define F_POPCOLOR
F_POPFORECOLOR F_POPBACKCOLOR
#define F_BLUE_ON_WHITE #define F_PUSH_BACKCOLOR "%+B"
"%1.15C" #define F_POP_BACKCOLOR "%-B"
#define F_PUSHCOLOR F_PUSH_FORECOLOR F_PUSH_BACK
COLOR
#define F_POPCOLOR F_POP_FORECOLOR F_POP_BACKCO
LOR
/******************************************************************* ********* /******************************************************************* *********
/// Structure for reporting slab usage information in cache. /// Structure for reporting slab usage information in cache.
******************************************************************** ********/ ******************************************************************** ********/
typedef struct typedef struct
{ {
FLMUINT64 ui64Slabs; ///< Total slabs currently allocated. FLMUINT64 ui64Slabs; ///< Total slabs currently allocated.
FLMUINT64 ui64SlabBytes; ///< Total bytes currently allocated in slabs. FLMUINT64 ui64SlabBytes; ///< Total bytes currently allocated in slabs.
FLMUINT64 ui64AllocatedCells; ///< Total cells allocated within slabs. FLMUINT64 ui64AllocatedCells; ///< Total cells allocated within slabs.
FLMUINT64 ui64FreeCells; ///< Total cells that are free within slabs. FLMUINT64 ui64FreeCells; ///< Total cells that are free within slabs.
skipping to change at line 798 skipping to change at line 954
char * pszThreadName; ///< Name of the thread. char * pszThreadName; ///< Name of the thread.
char * pszThreadStatus; ///< String indicating the last action the thread reported it was performing. char * pszThreadStatus; ///< String indicating the last action the thread reported it was performing.
} F_THREAD_INFO; } F_THREAD_INFO;
typedef enum typedef enum
{ {
FLM_THREAD_STATUS_UNKNOWN = 0, FLM_THREAD_STATUS_UNKNOWN = 0,
FLM_THREAD_STATUS_INITIALIZING, FLM_THREAD_STATUS_INITIALIZING,
FLM_THREAD_STATUS_RUNNING, FLM_THREAD_STATUS_RUNNING,
FLM_THREAD_STATUS_SLEEPING, FLM_THREAD_STATUS_SLEEPING,
FLM_THREAD_STATUS_TERMINATING, FLM_THREAD_STATUS_TERMINATING
FLM_THREAD_STATUS_STARTING_TRANS,
FLM_THREAD_STATUS_COMMITTING_TRANS,
FLM_THREAD_STATUS_ABORTING_TRANS
} eThreadStatus; } eThreadStatus;
#define F_THREAD_MIN_STACK_SIZE (16 * 1024) #define F_THREAD_MIN_STACK_SIZE (16 * 1024)
#define F_THREAD_DEFAULT_STACK_SIZE (16 * 1024) #define F_THREAD_DEFAULT_STACK_SIZE (16 * 1024)
#define F_DEFAULT_THREAD_GROUP 0 #define F_DEFAULT_THREAD_GROUP 0
#define F_INVALID_THREAD_GROUP 0xFFFFFFFF #define F_INVALID_THREAD_GROUP 0xFFFFFFFF
typedef RCODE (* F_THREAD_FUNC)(IF_Thread *); typedef RCODE (FLMAPI * F_THREAD_FUNC)(IF_Thread *);
/******************************************************************* ********* /******************************************************************* *********
Desc: Startup and shutdown Desc: Startup and shutdown
******************************************************************** ********/ ******************************************************************** ********/
RCODE FLMAPI ftkStartup( void); RCODE FLMAPI ftkStartup( void);
void FLMAPI ftkShutdown( void); void FLMAPI ftkShutdown( void);
/******************************************************************* ********* /******************************************************************* *********
Desc: Global data
********************************************************************
********/
extern FLMUINT16 * gv_pui16USCollationTable;
/*******************************************************************
*********
/// This is a pure virtual base class that other classes inherit fro m.\ It /// This is a pure virtual base class that other classes inherit fro m.\ It
/// provides methods for reference counting (AddRef, Release). /// provides methods for reference counting (AddRef, Release).
******************************************************************** ********/ ******************************************************************** ********/
flminterface FLMEXP IF_Object flminterface FLMEXP IF_Object
{ {
virtual ~IF_Object() virtual ~IF_Object()
{ {
} }
virtual FLMINT FLMAPI AddRef( void) = 0; virtual FLMINT FLMAPI AddRef( void) = 0;
skipping to change at line 879 skipping to change at line 1038
/// Overloaded new operator for objects of this class. /// Overloaded new operator for objects of this class.
void * FLMAPI operator new( void * FLMAPI operator new(
FLMSIZET uiSize, ///< Number of bytes to allocate - should be sizeof( ThisClass) . FLMSIZET uiSize, ///< Number of bytes to allocate - should be sizeof( ThisClass) .
const char * pszFile, ///< Name of source file where this allocation is made. const char * pszFile, ///< Name of source file where this allocation is made.
int iLine) ///< Line number in source file where this allocation request i s made. int iLine) ///< Line number in source file where this allocation request i s made.
#ifndef FLM_WATCOM_NLM #ifndef FLM_WATCOM_NLM
throw() throw()
#endif #endif
; ;
/// Overloaded new operator for objects of this class.
void * FLMAPI operator new(
FLMSIZET uiSize)
///< Number of bytes to allocate - should be sizeof( ThisClass)
.
#ifndef FLM_WATCOM_NLM
throw()
#endif
;
/// Overloaded new operator (array) for objects of this clas s (with source file and line number). /// Overloaded new operator (array) for objects of this clas s (with source file and line number).
/// This new operator is called when an array of objects of this class are allocated. /// This new operator is called when an array of objects of this class are allocated.
/// This new operator passes in the current file and line nu mber. This information is /// This new operator passes in the current file and line nu mber. This information is
/// useful in tracking memory allocations to determine where memory leaks are coming from. /// useful in tracking memory allocations to determine where memory leaks are coming from.
void * FLMAPI operator new[]( void * FLMAPI operator new[](
FLMSIZET uiSize, ///< Number of bytes to allocate - should be sizeof( ThisClass) . FLMSIZET uiSize, ///< Number of bytes to allocate - should be sizeof( ThisClass) .
const char * pszFile, ///< Name of source file where this allocation is made. const char * pszFile, ///< Name of source file where this allocation is made.
int iLine) ///< Line number in source file where this allocation request i s made. int iLine) ///< Line number in source file where this allocation request i s made.
#ifndef FLM_WATCOM_NLM #ifndef FLM_WATCOM_NLM
throw() throw()
#endif #endif
; ;
/// Overloaded new operator (array) for objects of this clas
s.
/// This new operator is called when an array of objects of
this class are allocated.
void * FLMAPI operator new[](
FLMSIZET uiSize)
///< Number of bytes to allocate - should be sizeof( ThisClass)
.
#ifndef FLM_WATCOM_NLM
throw()
#endif
;
/// Overloaded delete operator for objects of this class. /// Overloaded delete operator for objects of this class.
void FLMAPI operator delete( void FLMAPI operator delete(
void * ptr); ///< Pointer to object being freed. void * ptr); ///< Pointer to object being freed.
/// Overloaded delete operator (array) for objects of this c lass. /// Overloaded delete operator (array) for objects of this c lass.
void FLMAPI operator delete[]( void FLMAPI operator delete[](
void * ptr); ///< Pointer to array of objects being freed. void * ptr); ///< Pointer to array of objects being freed.
#ifndef FLM_WATCOM_NLM #ifndef FLM_WATCOM_NLM
/// Overloaded delete operator for objects of this class (wi th source file and line number). /// Overloaded delete operator for objects of this class (wi th source file and line number).
skipping to change at line 927 skipping to change at line 1103
const char * file, ///< Name of source file where this delete occurs. const char * file, ///< Name of source file where this delete occurs.
int line); ///< Line number in source file where this delete occurs. int line); ///< Line number in source file where this delete occurs.
#endif #endif
protected: protected:
FLMATOMIC m_refCnt; FLMATOMIC m_refCnt;
}; };
/******************************************************************* ********* /******************************************************************* *********
Desc: Internal base class Desc: Internal base class
******************************************************************** ********/ ******************************************************************** ********/
class FLMEXP F_OSBase class FLMEXP F_OSBase
{ {
public: public:
F_OSBase() F_OSBase()
{ {
m_refCnt = 1; m_refCnt = 1;
} }
skipping to change at line 1105 skipping to change at line 1281
void * pvPtr, void * pvPtr,
const char * pszFileName, const char * pszFileName,
int iLineNumber); int iLineNumber);
#define f_resetStackInfo(p) \ #define f_resetStackInfo(p) \
f_resetStackInfoImp( (p), __FILE__, __LINE__) f_resetStackInfoImp( (p), __FILE__, __LINE__)
FLMUINT f_msize( FLMUINT f_msize(
void * pvPtr); void * pvPtr);
RCODE FLMAPI f_allocAlignedBuffer( RCODE FLMAPI f_allocAlignedBufferImp(
FLMUINT uiMinSize, FLMUINT uiMinSize,
void ** ppvAlloc); void ** ppvAlloc);
void FLMAPI f_freeAlignedBuffer( #define f_allocAlignedBuffer(s,p) \
f_allocAlignedBufferImp( (s), (void **)(p))
void FLMAPI f_freeAlignedBufferImp(
void ** ppvAlloc); void ** ppvAlloc);
#define f_freeAlignedBuffer(p) \
f_freeAlignedBufferImp( (void **)(p))
RCODE FLMAPI f_getMemoryInfo( RCODE FLMAPI f_getMemoryInfo(
FLMUINT64 * pui64TotalPhysMem, FLMUINT64 * pui64TotalPhysMem,
FLMUINT64 * pui64AvailPhysMem); FLMUINT64 * pui64AvailPhysMem);
FLMBOOL FLMAPI f_canGetMemoryInfo( void); FLMBOOL FLMAPI f_canGetMemoryInfo( void);
/******************************************************************* ********* /******************************************************************* *********
Desc: Desc:
******************************************************************** ********/ ******************************************************************** ********/
flminterface FLMEXP IF_ThreadInfo : public F_Object flminterface FLMEXP IF_ThreadInfo : public F_Object
skipping to change at line 1148 skipping to change at line 1330
/******************************************************************* ********* /******************************************************************* *********
Desc: Desc:
******************************************************************** ********/ ******************************************************************** ********/
flminterface FLMEXP IF_IStream : public F_Object flminterface FLMEXP IF_IStream : public F_Object
{ {
virtual RCODE FLMAPI read( virtual RCODE FLMAPI read(
void * pvBuffer, void * pvBuffer,
FLMUINT uiBytesToRea d, FLMUINT uiBytesToRea d,
FLMUINT * puiBytesRead = NULL) = 0; FLMUINT * puiBytesRead = NULL) = 0;
virtual RCODE FLMAPI close( void) = 0; virtual RCODE FLMAPI closeStream( void) = 0;
}; };
/******************************************************************* ********* /******************************************************************* *********
Desc: Desc:
******************************************************************** ********/ ******************************************************************** ********/
flminterface FLMEXP IF_PosIStream : public IF_IStream flminterface FLMEXP IF_PosIStream : public IF_IStream
{ {
virtual FLMUINT64 FLMAPI totalSize( void) = 0; virtual FLMUINT64 FLMAPI totalSize( void) = 0;
virtual FLMUINT64 FLMAPI remainingSize( void) = 0; virtual FLMUINT64 FLMAPI remainingSize( void) = 0;
skipping to change at line 1171 skipping to change at line 1353
FLMUINT64 ui64Position ) = 0; FLMUINT64 ui64Position ) = 0;
virtual FLMUINT64 FLMAPI getCurrPosition( void) = 0; virtual FLMUINT64 FLMAPI getCurrPosition( void) = 0;
}; };
/******************************************************************* ********* /******************************************************************* *********
Desc: Desc:
******************************************************************** ********/ ******************************************************************** ********/
flminterface FLMEXP IF_BufferIStream : public IF_PosIStream flminterface FLMEXP IF_BufferIStream : public IF_PosIStream
{ {
virtual RCODE FLMAPI open( virtual RCODE FLMAPI openStream(
const char * pucBuffer, const char * pucBuffer,
FLMUINT uiLength, FLMUINT uiLength,
char ** ppucAllocate dBuffer = NULL) = 0; char ** ppucAllocate dBuffer = NULL) = 0;
virtual FLMUINT64 FLMAPI totalSize( void) = 0; virtual FLMUINT64 FLMAPI totalSize( void) = 0;
virtual FLMUINT64 FLMAPI remainingSize( void) = 0; virtual FLMUINT64 FLMAPI remainingSize( void) = 0;
virtual RCODE FLMAPI close( void) = 0; virtual RCODE FLMAPI closeStream( void) = 0;
virtual RCODE FLMAPI positionTo( virtual RCODE FLMAPI positionTo(
FLMUINT64 ui64Position ) = 0; FLMUINT64 ui64Position ) = 0;
virtual FLMUINT64 FLMAPI getCurrPosition( void) = 0; virtual FLMUINT64 FLMAPI getCurrPosition( void) = 0;
virtual void FLMAPI truncate( virtual void FLMAPI truncateStream(
FLMUINT64 ui64Offset) FLMUINT64 ui64Offset =
= 0; 0) = 0;
virtual RCODE FLMAPI read( virtual RCODE FLMAPI read(
void * pvBuffer, void * pvBuffer,
FLMUINT uiBytesToRea d, FLMUINT uiBytesToRea d,
FLMUINT * puiBytesRead ) = 0; FLMUINT * puiBytesRead ) = 0;
virtual const FLMBYTE * FLMAPI getBufferAtCurrentOffset( voi d) = 0; virtual const FLMBYTE * FLMAPI getBufferAtCurrentOffset( voi d) = 0;
}; };
RCODE FLMAPI FlmAllocBufferIStream( RCODE FLMAPI FlmAllocBufferIStream(
skipping to change at line 1274 skipping to change at line 1456
******************************************************************** ********/ ******************************************************************** ********/
typedef struct typedef struct
{ {
FLMUINT64 ui64Position; FLMUINT64 ui64Position;
FLMUNICODE uNextChar; FLMUNICODE uNextChar;
} F_CollStreamPos; } F_CollStreamPos;
flminterface FLMEXP IF_CollIStream : public IF_PosIStream flminterface FLMEXP IF_CollIStream : public IF_PosIStream
{ {
virtual RCODE FLMAPI open( virtual RCODE FLMAPI openStream(
IF_PosIStream * pIStream, IF_PosIStream * pIStream,
FLMBOOL bUnicodeStre am, FLMBOOL bUnicodeStre am,
FLMUINT uiLanguage, FLMUINT uiLanguage,
FLMUINT uiCompareRul es, FLMUINT uiCompareRul es,
FLMBOOL bMayHaveWild Cards) = 0; FLMBOOL bMayHaveWild Cards) = 0;
virtual RCODE FLMAPI close( void) = 0; virtual RCODE FLMAPI closeStream( void) = 0;
virtual RCODE FLMAPI read( virtual RCODE FLMAPI read(
void * pvBuffer, void * pvBuffer,
FLMUINT uiBytesToRea d, FLMUINT uiBytesToRea d,
FLMUINT * puiBytesRead ) = 0; FLMUINT * puiBytesRead ) = 0;
virtual RCODE FLMAPI read( virtual RCODE FLMAPI read(
FLMBOOL bAllowTwoInt oOne, FLMBOOL bAllowTwoInt oOne,
FLMUNICODE * puChar, FLMUNICODE * puChar,
FLMBOOL * pbCharIsWild , FLMBOOL * pbCharIsWild ,
skipping to change at line 1322 skipping to change at line 1504
/******************************************************************* ********* /******************************************************************* *********
Desc: Desc:
******************************************************************** ********/ ******************************************************************** ********/
flminterface FLMEXP IF_OStream : public F_Object flminterface FLMEXP IF_OStream : public F_Object
{ {
virtual RCODE FLMAPI write( virtual RCODE FLMAPI write(
const void * pvBuffer, const void * pvBuffer,
FLMUINT uiBytesToWri te, FLMUINT uiBytesToWri te,
FLMUINT * puiBytesWrit ten = NULL) = 0; FLMUINT * puiBytesWrit ten = NULL) = 0;
virtual RCODE FLMAPI close( void) = 0; virtual RCODE FLMAPI closeStream( void) = 0;
}; };
/******************************************************************* ********* /******************************************************************* *********
Desc: Desc:
******************************************************************** ********/ ******************************************************************** ********/
flminterface FLMEXP IF_IOStream : public IF_IStream, public IF_OStre am flminterface FLMEXP IF_IOStream : public IF_IStream, public IF_OStre am
{ {
#if defined( FLM_WIN) && _MSC_VER < 1300
using IF_IStream::operator delete;
#endif
}; };
/******************************************************************* ********* /******************************************************************* *********
/// Message severity.
******************************************************************** ********/ ******************************************************************** ********/
/// Message severity.
typedef enum typedef enum
{ {
F_FATAL_MESSAGE = 0, ///< Indicates that a fatal error occurred - the kind that would normally F_FATAL_MESSAGE = 0, ///< Indicates that a fatal error occurred - the kind that would normally
///< require a shutdown or other corrective action by an admini strator. ///< require a shutdown or other corrective action by an admini strator.
F_WARN_MESSAGE, ///< Warning message . F_WARN_MESSAGE, ///< Warning message .
F_ERR_MESSAGE, ///< Non-fat al error message. F_ERR_MESSAGE, ///< Non-fat al error message.
F_INFO_MESSAGE, ///< Information-onl y message. F_INFO_MESSAGE, ///< Information-onl y message.
F_DEBUG_MESSAGE ///< Debug message. F_DEBUG_MESSAGE ///< Debug message.
} eLogMessageSeverity; } eLogMessageSeverity;
skipping to change at line 1465 skipping to change at line 1650
virtual RCODE FLMAPI doesFileExist( virtual RCODE FLMAPI doesFileExist(
const char * pszFileName) = 0; const char * pszFileName) = 0;
virtual FLMBOOL FLMAPI isDir( virtual FLMBOOL FLMAPI isDir(
const char * pszFileName) = 0; const char * pszFileName) = 0;
virtual RCODE FLMAPI getFileTimeStamp( virtual RCODE FLMAPI getFileTimeStamp(
const char * pszFileName, const char * pszFileName,
FLMUINT * puiTimeStamp ) = 0; FLMUINT * puiTimeStamp ) = 0;
virtual RCODE FLMAPI getFileSize(
const char * pszFileName,
FLMUINT64 * pui64FileSiz
e) = 0;
virtual RCODE FLMAPI deleteFile( virtual RCODE FLMAPI deleteFile(
const char * pszFileName) = 0; const char * pszFileName) = 0;
virtual RCODE FLMAPI deleteMultiFileStream( virtual RCODE FLMAPI deleteMultiFileStream(
const char * pszDirectory, const char * pszDirectory,
const char * pszBaseName) = 0; const char * pszBaseName) = 0;
virtual RCODE FLMAPI copyFile( virtual RCODE FLMAPI copyFile(
const char * pszSrcFileName, const char * pszSrcFileName,
const char * pszDestFileName, const char * pszDestFileName,
skipping to change at line 1530 skipping to change at line 1719
virtual RCODE FLMAPI pathToStorageString( virtual RCODE FLMAPI pathToStorageString(
const char * pPath, const char * pPath,
char * pszString) = 0; char * pszString) = 0;
virtual FLMBOOL FLMAPI doesFileMatch( virtual FLMBOOL FLMAPI doesFileMatch(
const char * pszFileName, const char * pszFileName,
const char * pszTemplate) = 0; const char * pszTemplate) = 0;
virtual FLMBOOL FLMAPI canDoAsync( void) = 0; virtual FLMBOOL FLMAPI canDoAsync( void) = 0;
virtual RCODE FLMAPI allocIOBuffer(
FLMUINT uiMinSize,
IF_IOBuffer ** ppIOBuffer) = 0;
virtual RCODE FLMAPI allocFileHandleCache(
FLMUINT uiMaxCachedF
iles,
FLMUINT uiIdleTimeou
tSecs,
IF_FileHdlCache ** ppFileHdlCache) = 0;
}; };
RCODE FLMAPI FlmGetFileSystem( RCODE FLMAPI FlmGetFileSystem(
IF_FileSystem ** ppFileSystem); IF_FileSystem ** ppFileSystem);
IF_FileSystem * FLMAPI f_getFileSysPtr( void); IF_FileSystem * FLMAPI f_getFileSysPtr( void);
FLMUINT FLMAPI f_getOpenFileCount( void);
RCODE FLMAPI f_chdir( RCODE FLMAPI f_chdir(
const char * pszDir); const char * pszDir);
RCODE FLMAPI f_getcwd( RCODE FLMAPI f_getcwd(
char * pszDir); char * pszDir);
RCODE FLMAPI f_pathReduce( RCODE FLMAPI f_pathReduce(
const char * pszSourcePath, const char * pszSourcePath,
char * pszDestPath, char * pszDestPath,
char * pszString); char * pszString);
RCODE FLMAPI f_pathAppend( RCODE FLMAPI f_pathAppend(
char * pszPath, char * pszPath,
const char * pszPathComponent); const char * pszPathComponent);
/******************************************************************* ********* /******************************************************************* *********
Desc: Desc:
******************************************************************** ********/ ******************************************************************** ********/
flminterface FLMEXP IF_FileHdl : public F_Object flminterface FLMEXP IF_FileHdl : virtual public F_Object
{ {
virtual RCODE FLMAPI flush( void) = 0; virtual RCODE FLMAPI flush( void) = 0;
virtual RCODE FLMAPI read( virtual RCODE FLMAPI read(
FLMUINT64 ui64Offset, FLMUINT64 ui64Offset,
FLMUINT uiLength, FLMUINT uiLength,
void * pvBuffer, void * pvBuffer,
FLMUINT * puiBytesRead = NULL) = 0; FLMUINT * puiBytesRead = NULL) = 0;
virtual RCODE FLMAPI read(
FLMUINT64 ui64ReadOffs
et,
FLMUINT uiBytesToRea
d,
IF_IOBuffer * pIOBuffer) = 0;
virtual RCODE FLMAPI write(
FLMUINT64 ui64Offset,
FLMUINT uiLength,
const void * pvBuffer,
FLMUINT * puiBytesWrit
ten = NULL) = 0;
virtual RCODE FLMAPI write(
FLMUINT64 ui64WriteOff
set,
FLMUINT uiBytesToWri
te,
IF_IOBuffer * pIOBuffer) = 0;
virtual RCODE FLMAPI seek( virtual RCODE FLMAPI seek(
FLMUINT64 ui64Offset, FLMUINT64 ui64Offset,
FLMINT iWhence, FLMINT iWhence,
FLMUINT64 * pui64NewOffs et = NULL) = 0; FLMUINT64 * pui64NewOffs et = NULL) = 0;
virtual RCODE FLMAPI size( virtual RCODE FLMAPI size(
FLMUINT64 * pui64Size) = 0; FLMUINT64 * pui64Size) = 0;
virtual RCODE FLMAPI tell( virtual RCODE FLMAPI tell(
FLMUINT64 * pui64Offset) = 0; FLMUINT64 * pui64Offset) = 0;
virtual RCODE FLMAPI truncate( virtual RCODE FLMAPI extendFile(
FLMUINT64 ui64Size) = FLMUINT64 ui64FileSize
0; ) = 0;
virtual RCODE FLMAPI write(
FLMUINT64 ui64Offset,
FLMUINT uiLength,
const void * pvBuffer,
FLMUINT * puiBytesWrit
ten = NULL) = 0;
virtual RCODE FLMAPI sectorRead(
FLMUINT64 ui64ReadOffs
et,
FLMUINT uiBytesToRea
d,
void * pvBuffer,
FLMUINT * puiBytesRead
RV = NULL) = 0;
virtual RCODE FLMAPI sectorWrite( virtual RCODE FLMAPI truncateFile(
FLMUINT64 ui64WriteOff FLMUINT64 ui64FileSize
set, = 0) = 0;
FLMUINT uiBytesToWri
te,
const void * pvBuffer,
IF_IOBuffer * pBufferObj,
FLMUINT * puiBytesWrit
ten = NULL) = 0;
virtual RCODE FLMAPI close( void) = 0; virtual RCODE FLMAPI closeFile( void) = 0;
virtual FLMBOOL FLMAPI canDoAsync( void) = 0; virtual FLMBOOL FLMAPI canDoAsync( void) = 0;
virtual FLMBOOL FLMAPI canDoDirectIO( void) = 0;
virtual void FLMAPI setExtendSize( virtual void FLMAPI setExtendSize(
FLMUINT uiExtendSize ) = 0; FLMUINT uiExtendSize ) = 0;
virtual void FLMAPI setMaxAutoExtendSize( virtual void FLMAPI setMaxAutoExtendSize(
FLMUINT uiMaxAutoExt endSize) = 0; FLMUINT uiMaxAutoExt endSize) = 0;
virtual FLMUINT FLMAPI getSectorSize( void) = 0; virtual FLMUINT FLMAPI getSectorSize( void) = 0;
virtual FLMBOOL FLMAPI isReadOnly( void) = 0; virtual FLMBOOL FLMAPI isReadOnly( void) = 0;
virtual FLMBOOL FLMAPI isOpen( void) = 0;
virtual RCODE FLMAPI lock( void) = 0; virtual RCODE FLMAPI lock( void) = 0;
virtual RCODE FLMAPI unlock( void) = 0; virtual RCODE FLMAPI unlock( void) = 0;
}; };
/******************************************************************* ********* /******************************************************************* *********
Desc: Desc:
******************************************************************** ********/ ******************************************************************** ********/
flminterface FLMEXP IF_FileHdlCache : public F_Object
{
virtual RCODE FLMAPI openFile(
const char * pszFileName,
FLMUINT uiIoFlags,
IF_FileHdl ** ppFile) = 0;
virtual RCODE FLMAPI createFile(
const char * pszFileName,
FLMUINT uiIoFlags,
IF_FileHdl ** ppFile) = 0;
virtual void FLMAPI closeUnusedFiles(
FLMUINT uiUnusedTime
= 0) = 0;
virtual FLMUINT FLMAPI getOpenThreshold( void) = 0;
virtual RCODE FLMAPI setOpenThreshold(
FLMUINT uiMaxOpenFil
es) = 0;
};
/*******************************************************************
*********
Desc:
********************************************************************
********/
flminterface FLMEXP IF_MultiFileHdl : public F_Object flminterface FLMEXP IF_MultiFileHdl : public F_Object
{ {
virtual RCODE FLMAPI create( virtual RCODE FLMAPI createFile(
const char * pszPath) = 0; const char * pszPath) = 0;
virtual RCODE FLMAPI createUnique( virtual RCODE FLMAPI createUniqueFile(
const char * pszPath, const char * pszPath,
const char * pszFileExtension) = 0; const char * pszFileExtension) = 0;
virtual RCODE FLMAPI open( virtual RCODE FLMAPI openFile(
const char * pszPath) = 0; const char * pszPath) = 0;
virtual RCODE FLMAPI deleteMultiFile( virtual RCODE FLMAPI deleteMultiFile(
const char * pszPath) = 0; const char * pszPath) = 0;
virtual RCODE FLMAPI flush( void) = 0; virtual RCODE FLMAPI flush( void) = 0;
virtual RCODE FLMAPI read( virtual RCODE FLMAPI read(
FLMUINT64 ui64Offset, FLMUINT64 ui64Offset,
FLMUINT uiLength, FLMUINT uiLength,
skipping to change at line 1655 skipping to change at line 1883
FLMUINT uiLength, FLMUINT uiLength,
void * pvBuffer, void * pvBuffer,
FLMUINT * puiBytesWrit ten = NULL) = 0; FLMUINT * puiBytesWrit ten = NULL) = 0;
virtual RCODE FLMAPI getPath( virtual RCODE FLMAPI getPath(
char * pszFilePath) = 0; char * pszFilePath) = 0;
virtual RCODE FLMAPI size( virtual RCODE FLMAPI size(
FLMUINT64 * pui64FileSiz e) = 0; FLMUINT64 * pui64FileSiz e) = 0;
virtual RCODE FLMAPI truncate( virtual RCODE FLMAPI truncateFile(
FLMUINT64 ui64NewSize) FLMUINT64 ui64Offset =
= 0; 0) = 0;
virtual void FLMAPI close( virtual void FLMAPI closeFile(
FLMBOOL bDelete = FA LSE) = 0; FLMBOOL bDelete = FA LSE) = 0;
}; };
RCODE FLMAPI FlmAllocMultiFileHdl( RCODE FLMAPI FlmAllocMultiFileHdl(
IF_MultiFileHdl ** ppFileHdl); IF_MultiFileHdl ** ppFileHdl);
/******************************************************************* ********* /******************************************************************* *********
Desc: Desc:
******************************************************************** ********/ ******************************************************************** ********/
typedef struct
{
IF_FileHdl * pFileHdl;
FLMUINT uiFileNumber
;
FLMBOOL bDirty;
} CHECKED_OUT_FILE_HDL;
/*******************************************************************
*********
Desc:
********************************************************************
********/
flminterface FLMEXP IF_SuperFileClient : public F_Object flminterface FLMEXP IF_SuperFileClient : public F_Object
{ {
virtual FLMUINT FLMAPI getFileNumber( virtual FLMUINT FLMAPI getFileNumber(
FLMUINT uiBlockAddr) = 0; FLMUINT uiBlockAddr) = 0;
virtual FLMUINT FLMAPI getFileOffset( virtual FLMUINT FLMAPI getFileOffset(
FLMUINT uiBlockAddr) = 0; FLMUINT uiBlockAddr) = 0;
virtual FLMUINT FLMAPI getBlockAddress(
FLMUINT uiFileNumber
,
FLMUINT uiFileOffset
) = 0;
virtual RCODE FLMAPI getFilePath( virtual RCODE FLMAPI getFilePath(
FLMUINT uiFileNumber , FLMUINT uiFileNumber ,
char * pszPath) = 0 ; char * pszPath) = 0 ;
virtual FLMUINT64 FLMAPI getMaxFileSize( void) = 0;
}; };
/******************************************************************* ********* /******************************************************************* *********
Desc: Desc:
******************************************************************** ********/ ******************************************************************** ********/
class F_SuperFileHdl : public F_Object class F_SuperFileHdl : public F_Object
{ {
public: public:
F_SuperFileHdl(); F_SuperFileHdl();
virtual ~F_SuperFileHdl(); virtual ~F_SuperFileHdl();
RCODE setup( RCODE FLMAPI setup(
IF_SuperFileClient * pSuperFileClient); IF_SuperFileClient * pSuperFileClient,
IF_FileHdlCache * pFileHdlCach
e,
FLMUINT uiFi
leOpenFlags,
FLMUINT uiFi
leCreateFlags);
RCODE createFile( RCODE FLMAPI createFile(
FLMUINT uiFileNumber FLMUINT uiFileNumber
); ,
IF_FileHdl ** ppFileHdl = NULL);
RCODE readBlock( RCODE FLMAPI getFileHdl(
FLMUINT uiFileNumber
,
FLMBOOL bGetForUpdat
e,
IF_FileHdl ** ppFileHdlRV);
RCODE FLMAPI readBlock(
FLMUINT uiBlkAddress , FLMUINT uiBlkAddress ,
FLMUINT uiBytesToRea d, FLMUINT uiBytesToRea d,
void * pvBuffer, void * pvBuffer,
FLMUINT * puiBytesRead ); FLMUINT * puiBytesRead );
RCODE writeBlock( RCODE FLMAPI writeBlock(
FLMUINT uiBlkAddress , FLMUINT uiBlkAddress ,
FLMUINT uiBytesToWri te, FLMUINT uiBytesToWri te,
const void * pvBuffer, const void * pvBuffer,
IF_IOBuffer * pIOBuffer,
FLMUINT * puiBytesWrit ten); FLMUINT * puiBytesWrit ten);
RCODE readHeader( RCODE FLMAPI writeBlock(
FLMUINT uiOffset, FLMUINT uiBlkAddress
FLMUINT uiBytesToRea ,
d,
void * pvBuffer,
FLMUINT * puiBytesRead
);
RCODE writeHeader(
FLMUINT uiOffset,
FLMUINT uiBytesToWri te, FLMUINT uiBytesToWri te,
const void * pvBuffer, IF_IOBuffer * pIOBuffer);
FLMUINT * puiBytesWrit
ten);
RCODE getFilePath( RCODE FLMAPI getFilePath(
FLMUINT uiFileNumber , FLMUINT uiFileNumber ,
char * pszPath); char * pszPath);
RCODE getFileHdl( RCODE FLMAPI getFileSize(
FLMUINT uiFileNumber
,
FLMBOOL bGetForUpdat
e,
IF_FileHdl ** ppFileHdlRV);
RCODE getFileSize(
FLMUINT uiFileNumber , FLMUINT uiFileNumber ,
FLMUINT64 * pui64FileSiz e); FLMUINT64 * pui64FileSiz e);
RCODE releaseFile( RCODE FLMAPI releaseFiles( void);
FLMUINT uiFileNum,
FLMBOOL bCloseFile);
RCODE releaseFiles( RCODE FLMAPI allocateBlocks(
FLMBOOL bCloseFiles) FLMUINT uiStartAddre
; ss,
FLMUINT uiEndAddress
);
RCODE truncateFile( RCODE FLMAPI truncateFile(
FLMUINT uiEOFBlkAddr ess); FLMUINT uiEOFBlkAddr ess);
void truncateFiles( RCODE FLMAPI truncateFile(
FLMUINT uiFileNumber
,
FLMUINT uiOffset);
void FLMAPI truncateFiles(
FLMUINT uiStartFileN um, FLMUINT uiStartFileN um,
FLMUINT uiEndFileNum ); FLMUINT uiEndFileNum );
RCODE releaseFile( RCODE FLMAPI flush( void);
CHECKED_OUT_FILE_HDL * pChkFileHdl,
FLMBOOL bClo
seFile);
FINLINE void enableFlushMinimize( void)
{
m_bMinimizeFlushes = TRUE;
}
void disableFlushMinimize( void);
RCODE flush( void);
FINLINE void setBlockSize(
FLMUINT uiBlockSize)
{
m_uiBlockSize = uiBlockSize;
}
FINLINE void setExtendSize( FINLINE void FLMAPI setExtendSize(
FLMUINT uiExtendSize) FLMUINT uiExtendSize)
{ {
m_uiExtendSize = uiExtendSize; m_uiExtendSize = uiExtendSize;
} }
FINLINE void setMaxAutoExtendSize( FINLINE void FLMAPI setMaxAutoExtendSize(
FLMUINT uiMaxAutoExtendSize) FLMUINT uiMaxAutoExtendSize)
{ {
m_uiMaxAutoExtendSize = uiMaxAutoExtendSize; m_uiMaxAutoExtendSize = uiMaxAutoExtendSize;
} }
FINLINE FLMBOOL canDoAsync( void) FLMBOOL FLMAPI canDoAsync( void);
{
if( m_pCheckedOutFileHdls[ 0].pFileHdl)
{
return( m_pCheckedOutFileHdls[ 0].pFileHdl->
canDoAsync());
}
else
{
IF_FileHdl * pFileHdl;
if( RC_OK( getFileHdl( 0, FALSE, &pFileHdl))
)
{
return( pFileHdl->canDoAsync());
}
}
return( FALSE); FLMBOOL FLMAPI canDoDirectIO( void);
}
private: private:
FINLINE CHECKED_OUT_FILE_HDL * getCkoFileHdlPtr(
FLMUINT uiFileNum,
FLMUINT * puiSlot)
{
*puiSlot = (uiFileNum
? (uiFileNum % (m_uiCkoArraySize - 1)) + 1
: 0);
return( &m_pCheckedOutFileHdls[ *puiSlot]);
}
FINLINE void clearCkoFileHdl(
CHECKED_OUT_FILE_HDL * pCkoFileHdl)
{
pCkoFileHdl->pFileHdl = NULL;
pCkoFileHdl->uiFileNumber = 0;
pCkoFileHdl->bDirty = FALSE;
}
void copyCkoFileHdls(
CHECKED_OUT_FILE_HDL * pSrcCkoArray,
FLMUINT uiSr
cHighestUsedSlot);
RCODE reallocCkoArray(
FLMUINT uiFileNum);
#define MAX_CHECKED_OUT_FILE_HDLS 8
IF_SuperFileClient * m_pSuperFileClient; IF_SuperFileClient * m_pSuperFileClient;
CHECKED_OUT_FILE_HDL m_CheckedOutFileHdls[ MAX_CH IF_FileHdlCache * m_pFileHdlCache;
ECKED_OUT_FILE_HDLS + 1]; IF_FileHdl * m_pCFileHdl;
CHECKED_OUT_FILE_HDL * m_pCheckedOutFileHdls; IF_FileHdl * m_pBlockFileHdl;
FLMUINT m_uiCkoArray FLMBOOL m_bCFileDirt
Size; y;
FLMUINT m_uiBlockSiz FLMBOOL m_bBlockFile
e; Dirty;
FLMUINT m_uiBlockFil
eNum;
FLMUINT m_uiMaxFileS
ize;
FLMUINT m_uiExtendSi ze; FLMUINT m_uiExtendSi ze;
FLMUINT m_uiMaxAutoE xtendSize; FLMUINT m_uiMaxAutoE xtendSize;
FLMUINT m_uiLowestDi FLMUINT m_uiFileOpen
rtySlot; Flags;
FLMUINT m_uiHighestD FLMUINT m_uiFileCrea
irtySlot; teFlags;
FLMUINT m_uiHighestU
sedSlot;
FLMUINT m_uiHighestF
ileNumber;
FLMBOOL m_bMinimizeF
lushes;
FLMBOOL m_bSetupCall
ed;
}; };
/******************************************************************* ********* /******************************************************************* *********
Desc: Desc:
******************************************************************** ********/ ******************************************************************** ********/
flminterface FLMEXP IF_IOBufferMgr : public F_Object flminterface FLMEXP IF_AsyncClient : virtual public F_Object
{ {
virtual RCODE FLMAPI waitForAllPendingIO( void) = 0; virtual RCODE FLMAPI waitToComplete( void) = 0;
virtual void FLMAPI setMaxBuffers(
FLMUINT uiMaxBuffers
) = 0;
virtual void FLMAPI setMaxBytes(
FLMUINT uiMaxBytes)
= 0;
virtual void FLMAPI enableKeepBuffer( void) = 0;
virtual RCODE FLMAPI getBuffer(
IF_IOBuffer ** ppIOBuffer,
FLMUINT uiBufferSize
,
FLMUINT uiBlockSize)
= 0;
virtual FLMBOOL FLMAPI havePendingIO( void) = 0; virtual RCODE FLMAPI getCompletionCode( void) = 0;
virtual FLMBOOL FLMAPI haveUsed( void) = 0; virtual FLMUINT FLMAPI getElapsedTime( void) = 0;
}; };
RCODE FLMAPI FlmAllocIOBufferMgr(
IF_IOBufferMgr ** ppBufferMgr);
#define FLM_MAX_IO_BUFFER_BLOCKS 16
/******************************************************************* ********* /******************************************************************* *********
Desc: Desc:
******************************************************************** ********/ ******************************************************************** ********/
typedef void (* WRITE_COMPLETION_CB)( typedef void (FLMAPI * F_BUFFER_COMPLETION_FUNC)(IF_IOBuffer *, void
IF_IOBuffer * pWriteBuffer); *);
/******************************************************************* ********* /******************************************************************* *********
Desc: Desc:
******************************************************************** ********/ ******************************************************************** ********/
flminterface FLMEXP IF_IOBuffer : public F_Object flminterface FLMEXP IF_IOBuffer : virtual public F_Object
{ {
typedef enum virtual FLMBYTE * FLMAPI getBufferPtr( void) = 0;
{
MGR_LIST_NONE,
MGR_LIST_AVAIL,
MGR_LIST_PENDING,
MGR_LIST_USED
} eBufferMgrList;
virtual RCODE FLMAPI setupBuffer( virtual FLMUINT FLMAPI getBufferSize( void) = 0;
FLMUINT uiBufferSize
,
FLMUINT uiBlockSize)
= 0;
virtual FLMBYTE * FLMAPI getBuffer( void) = 0; virtual void FLMAPI setCompletionCallback(
F_BUFFER_COMPLETION_FUNC fnCompletion,
void *
pvData) = 0;
virtual FLMUINT FLMAPI getBufferSize( void) = 0; virtual RCODE FLMAPI addCallbackData(
void *
pvData) = 0;
virtual FLMUINT FLMAPI getBlockSize( void) = 0; virtual void * FLMAPI getCallbackData(
FLMUINT
uiSlot) = 0;
virtual void FLMAPI notifyComplete( virtual FLMUINT FLMAPI getCallbackDataCount( void) = 0;
RCODE rc)
= 0;
virtual void FLMAPI signalComplete( virtual void FLMAPI setAsyncClient(
RCODE rc) IF_AsyncClient * pAsy
= 0; ncClient) = 0;
virtual void FLMAPI setCompletionCallback( virtual void FLMAPI notifyComplete(
WRITE_COMPLETION_CB fnCompletion) = 0; RCODE
completionRc) = 0;
virtual void FLMAPI setCompletionCallbackData( virtual void FLMAPI setPending( void) = 0;
FLMUINT uiBlockNumbe
r,
void * pvData) = 0;
virtual void * FLMAPI getCompletionCallbackData( virtual void FLMAPI clearPending( void) = 0;
FLMUINT uiBlockNumbe
r) = 0;
virtual RCODE FLMAPI getCompletionCode( void) = 0; virtual FLMBOOL FLMAPI isPending( void) = 0;
virtual eBufferMgrList FLMAPI getList( void) = 0; virtual FLMBOOL FLMAPI isComplete( void) = 0;
virtual void FLMAPI makePending( void) = 0; virtual RCODE FLMAPI waitToComplete( void) = 0;
virtual FLMBOOL FLMAPI isPending( void) = 0; virtual RCODE FLMAPI getCompletionCode( void) = 0;
virtual void FLMAPI startTimer( virtual FLMUINT FLMAPI getElapsedTime( void) = 0;
void * pvStats) = 0 };
;
virtual void * FLMAPI getStats( void) = 0; /*******************************************************************
*********
Desc:
********************************************************************
********/
flminterface FLMEXP IF_IOBufferMgr : public F_Object
{
virtual RCODE FLMAPI getBuffer(
FLMUINT uiBufferSize
,
IF_IOBuffer ** ppIOBuffer) = 0;
virtual FLMUINT64 FLMAPI getElapTime( void) = 0; virtual FLMBOOL FLMAPI isIOPending( void) = 0;
virtual RCODE FLMAPI waitForAllPendingIO( void) = 0;
}; };
RCODE FLMAPI FlmAllocIOBufferMgr(
FLMUINT uiMaxBuffers,
FLMUINT uiMaxBytes,
FLMBOOL bReuseBuffers,
IF_IOBufferMgr ** ppIOBufferMgr);
/******************************************************************* ********* /******************************************************************* *********
Desc: Desc:
******************************************************************** ********/ ******************************************************************** ********/
flminterface FLMEXP IF_DirHdl : public F_Object flminterface FLMEXP IF_DirHdl : public F_Object
{ {
virtual RCODE FLMAPI next( void) = 0; virtual RCODE FLMAPI next( void) = 0;
virtual const char * FLMAPI currentItemName( void) = 0; virtual const char * FLMAPI currentItemName( void) = 0;
virtual void FLMAPI currentItemPath( virtual void FLMAPI currentItemPath(
skipping to change at line 2163 skipping to change at line 2313
virtual FLMBOOL FLMAPI getBoolean( void) = 0; virtual FLMBOOL FLMAPI getBoolean( void) = 0;
}; };
RCODE FLMAPI FlmAllocRandomGenerator( RCODE FLMAPI FlmAllocRandomGenerator(
IF_RandomGenerator ** ppRandomGenerator); IF_RandomGenerator ** ppRandomGenerator);
FLMUINT32 FLMAPI f_getRandomUINT32( FLMUINT32 FLMAPI f_getRandomUINT32(
FLMUINT32 ui32Low = 0, FLMUINT32 ui32Low = 0,
FLMUINT32 ui32High = F LM_MAX_RANDOM); FLMUINT32 ui32High = F LM_MAX_RANDOM);
FLMBYTE FLMAPI f_getRandomByte( void);
/******************************************************************* *** /******************************************************************* ***
Desc: Atomic operations Desc: Atomic operations
******************************************************************** **/ ******************************************************************** **/
FLMINT32 FLMAPI f_atomicInc( FLMINT32 FLMAPI f_atomicInc(
FLMATOMIC * piTarget); FLMATOMIC * piTarget);
FLMINT32 FLMAPI f_atomicDec( FLMINT32 FLMAPI f_atomicDec(
FLMATOMIC * piTarget); FLMATOMIC * piTarget);
FLMINT32 FLMAPI f_atomicExchange( FLMINT32 FLMAPI f_atomicExchange(
skipping to change at line 2194 skipping to change at line 2346
void FLMAPI f_mutexDestroy( void FLMAPI f_mutexDestroy(
F_MUTEX * phMutex); F_MUTEX * phMutex);
void FLMAPI f_mutexLock( void FLMAPI f_mutexLock(
F_MUTEX hMutex); F_MUTEX hMutex);
void FLMAPI f_mutexUnlock( void FLMAPI f_mutexUnlock(
F_MUTEX hMutex); F_MUTEX hMutex);
#ifdef FLM_DEBUG
void FLMAPI f_assertMutexLocked( void FLMAPI f_assertMutexLocked(
F_MUTEX hMutex); F_MUTEX hMutex);
#else
#define f_assertMutexLocked( h) (void)(h)
#endif
#ifdef FLM_DEBUG
void FLMAPI f_assertMutexNotLocked(
F_MUTEX hMutex);
#else
#define f_assertMutexNotLocked( h) (void)(h)
#endif
/******************************************************************* ********* /******************************************************************* *********
Desc: Semaphores Desc: Semaphores
******************************************************************** ********/ ******************************************************************** ********/
typedef void * F_SEM; typedef void * F_SEM;
#define F_SEM_NULL NULL #define F_SEM_NULL NULL
#define F_SEM_WAITFOREVER (0xFFFFFFFF)
RCODE FLMAPI f_semCreate( RCODE FLMAPI f_semCreate(
F_SEM * phSem); F_SEM * phSem);
void FLMAPI f_semDestroy( void FLMAPI f_semDestroy(
F_SEM * phSem); F_SEM * phSem);
RCODE FLMAPI f_semWait( RCODE FLMAPI f_semWait(
F_SEM hSem , F_SEM hSem ,
FLMUINT uiTimeout); FLMUINT uiTimeout);
void FLMAPI f_semSignal( void FLMAPI f_semSignal(
F_SEM hSem ); F_SEM hSem );
FLMUINT FLMAPI f_semGetSignalCount(
F_SEM hSem
);
/*******************************************************************
*********
Desc: Notify Lists
********************************************************************
********/
typedef struct F_NOTIFY_LIST_ITEM
{
F_NOTIFY_LIST_ITEM * pNext; ///< Pointer
to next F_NOTIFY_LIST_ITEM structure in list.
FLMUINT uiThreadId;
///< ID of thread requesting the notify
RCODE * pRc;
///< Pointer to a return code variable that is to
///< be filled in when the operation is
completed.
///< The thread requesting notification
supplies
///< the return code variable to be fil
led in.
void * pvData;
///< Data that is passed through to a custom
///< notify routine
F_SEM hSem
; ///< Semaphore that will be signaled when the
///< operation is complete.
} F_NOTIFY_LIST_ITEM;
RCODE FLMAPI f_notifyWait(
F_MUTEX hMutex,
F_SEM hSem
,
void * pvData,
F_NOTIFY_LIST_ITEM ** ppNotifyList);
void FLMAPI f_notifySignal(
F_NOTIFY_LIST_ITEM * pNotifyList,
RCODE noti
fyRc);
/*******************************************************************
*********
Desc: Reader / Writer Locks
********************************************************************
********/
typedef void * F_RWLOCK;
#define F_RWLOCK_NULL NULL
RCODE FLMAPI f_rwlockCreate(
F_RWLOCK * phReadWriteL
ock);
void FLMAPI f_rwlockDestroy(
F_RWLOCK * phReadWriteL
ock);
RCODE FLMAPI f_rwlockAcquire(
F_RWLOCK hRea
dWriteLock,
F_SEM hSem
,
FLMBOOL bWriter);
RCODE FLMAPI f_rwlockPromote(
F_RWLOCK hRea
dWriteLock,
F_SEM hSem
);
RCODE FLMAPI f_rwlockRelease(
F_RWLOCK hRea
dWriteLock);
/******************************************************************* ********* /******************************************************************* *********
Desc: Thread manager Desc: Thread manager
******************************************************************** ********/ ******************************************************************** ********/
flminterface FLMEXP IF_ThreadMgr : public F_Object flminterface FLMEXP IF_ThreadMgr : public F_Object
{ {
virtual RCODE FLMAPI setupThreadMgr( void) = 0; virtual RCODE FLMAPI setupThreadMgr( void) = 0;
virtual RCODE FLMAPI createThread( virtual RCODE FLMAPI createThread(
IF_Thread ** ppThread, IF_Thread ** ppThread,
F_THREAD_FUNC fnThread, F_THREAD_FUNC fnThread,
skipping to change at line 2323 skipping to change at line 2540
eThreadStatus genericStatus) = 0; eThreadStatus genericStatus) = 0;
virtual void FLMAPI setThreadAppId( virtual void FLMAPI setThreadAppId(
FLMUINT uiAppId) = 0 ; FLMUINT uiAppId) = 0 ;
virtual FLMUINT FLMAPI getThreadAppId( void) = 0; virtual FLMUINT FLMAPI getThreadAppId( void) = 0;
virtual FLMUINT FLMAPI getThreadGroup( void) = 0; virtual FLMUINT FLMAPI getThreadGroup( void) = 0;
virtual void FLMAPI cleanupThread( void) = 0; virtual void FLMAPI cleanupThread( void) = 0;
virtual void FLMAPI sleep(
FLMUINT uiMillisecon
ds) = 0;
virtual void FLMAPI waitToComplete( void) = 0;
}; };
RCODE FLMAPI f_threadCreate( RCODE FLMAPI f_threadCreate(
IF_Thread ** ppThread, IF_Thread ** ppThread,
F_THREAD_FUNC fnThread, F_THREAD_FUNC fnThread,
const char * pszThreadName = NULL, const char * pszThreadName = NULL,
FLMUINT uiThreadGroup = F_DE FAULT_THREAD_GROUP, FLMUINT uiThreadGroup = F_DE FAULT_THREAD_GROUP,
FLMUINT uiAppId = 0, FLMUINT uiAppId = 0,
void * pvParm1 = NULL, void * pvParm1 = NULL,
void * pvParm2 = NULL, void * pvParm2 = NULL,
skipping to change at line 2400 skipping to change at line 2622
Desc: Checksum Desc: Checksum
******************************************************************** ********/ ******************************************************************** ********/
void FLMAPI f_updateCRC( void FLMAPI f_updateCRC(
const void * pvBuffer, const void * pvBuffer,
FLMUINT uiLength, FLMUINT uiLength,
FLMUINT32 * pui32CRC); FLMUINT32 * pui32CRC);
FLMUINT32 FLMAPI f_calcFastChecksum( FLMUINT32 FLMAPI f_calcFastChecksum(
const void * pvBuffer, const void * pvBuffer,
FLMUINT uiLength, FLMUINT uiLength,
FLMUINT * puiAdds = NU FLMUINT * puiSum = NUL
LL, L,
FLMUINT * puiXORs = NU FLMUINT * puiXOR = NUL
LL); L);
FLMBYTE FLMAPI f_calcPacketChecksum(
const void * pvPacket,
FLMUINT uiBytesToChe
cksum);
/******************************************************************* ********* /******************************************************************* *********
Desc: Desc:
******************************************************************** ********/ ******************************************************************** ********/
char * FLMAPI f_uwtoa( char * FLMAPI f_uwtoa(
FLMUINT16 value, FLMUINT16 value,
char * ptr); char * ptr);
char * FLMAPI f_udtoa( char * FLMAPI f_udtoa(
FLMUINT value, FLMUINT value,
skipping to change at line 2509 skipping to change at line 2735
FLMUINT uiCompareRul es); FLMUINT uiCompareRul es);
RCODE FLMAPI f_wpToUnicode( RCODE FLMAPI f_wpToUnicode(
FLMUINT16 ui16WPChar, FLMUINT16 ui16WPChar,
FLMUNICODE * puUniChar); FLMUNICODE * puUniChar);
FLMBOOL FLMAPI f_unicodeToWP( FLMBOOL FLMAPI f_unicodeToWP(
FLMUNICODE uUniChar, FLMUNICODE uUniChar,
FLMUINT16 * pui16WPChar) ; FLMUINT16 * pui16WPChar) ;
FLMBOOL FLMAPI f_depricatedUnicodeToWP(
FLMUNICODE uUniChar,
FLMUINT16 * pui16WPChar)
;
FLMUINT16 FLMAPI f_wpUpper(
FLMUINT16 ui16WpChar);
FLMBOOL FLMAPI f_wpIsUpper(
FLMUINT16 ui16WpChar);
FLMUINT16 FLMAPI f_wpLower(
FLMUINT16 ui16WpChar);
FLMBOOL FLMAPI f_breakWPChar(
FLMUINT16 ui16WpChar,
FLMUINT16 * pui16BaseCha
r,
FLMUINT16 * pui16Diacrit
icChar);
FLMBOOL FLMAPI f_combineWPChar(
FLMUINT16 * pui16WpChar,
FLMUINT16 ui16BaseChar
,
FLMINT16 ui16
DiacriticChar);
FLMUINT16 FLMAPI f_wpGetCollationImp(
FLMUINT16 ui16WpChar,
FLMUINT uiLanguage);
FINLINE FLMUINT16 FLMAPI f_wpGetCollation(
FLMUINT16 ui16WpChar,
FLMUINT uiLanguage)
{
if( uiLanguage == FLM_US_LANG)
{
return( gv_pui16USCollationTable[ ui16WpChar]);
}
return( f_wpGetCollationImp( ui16WpChar, uiLanguage));
}
RCODE FLMAPI f_wpCheckDoubleCollation( RCODE FLMAPI f_wpCheckDoubleCollation(
IF_PosIStream * pIStream, IF_PosIStream * pIStream,
FLMBOOL bUnicodeStre am, FLMBOOL bUnicodeStre am,
FLMBOOL bAllowTwoInt oOne, FLMBOOL bAllowTwoInt oOne,
FLMUNICODE * puzChar, FLMUNICODE * puzChar,
FLMUNICODE * puzChar2, FLMUNICODE * puzChar2,
FLMBOOL * pbTwoIntoOne , FLMBOOL * pbTwoIntoOne ,
FLMUINT uiLanguage); FLMUINT uiLanguage);
FLMUINT16 FLMAPI f_wpCheckDoubleCollation(
FLMUINT16 * pui16WpChar,
FLMBOOL * pbTwoIntoOne
,
const FLMBYTE ** ppucInputStr,
FLMUINT uiLanguage);
FLMUINT16 FLMAPI f_wpHanToZenkaku(
FLMUINT16 ui16WpChar,
FLMUINT16 ui16NextWpCh
ar,
FLMUINT16 * pui16Zenkaku
);
FLMUINT16 FLMAPI f_wpZenToHankaku(
FLMUINT16 ui16WpChar,
FLMUINT16 * pui16DakutenOrHandak
uten);
FLMUINT FLMAPI f_wpToMixed(
FLMBYTE * pucWPStr,
FLMUINT uiWPStrLen,
const FLMBYTE * pucLowUpBitStr,
FLMUINT uiLang);
RCODE FLMAPI f_asiaParseSubCol(
FLMBYTE * pucWPStr,
FLMUINT * puiWPStrLen,
FLMUINT uiMaxWPBytes,
const FLMBYTE * pucSubColBuf,
FLMUINT * puiSubColBitPos);
RCODE FLMAPI f_asiaColStr2WPStr( RCODE FLMAPI f_asiaColStr2WPStr(
const FLMBYTE * pucColStr, const FLMBYTE * pucColStr,
FLMUINT uiColStrLen, FLMUINT uiColStrLen,
FLMBYTE * pucWPStr, FLMBYTE * pucWPStr,
FLMUINT * puiWPStrLen, FLMUINT * puiWPStrLen,
FLMUINT * puiUnconvCha rs, FLMUINT * puiUnconvCha rs,
FLMBOOL * pbDataTrunca ted, FLMBOOL * pbDataTrunca ted,
FLMBOOL * pbFirstSubst ring); FLMBOOL * pbFirstSubst ring);
RCODE FLMAPI f_colStr2WPStr( RCODE FLMAPI f_colStr2WPStr(
skipping to change at line 3595 skipping to change at line 3888
FLMBYTE * pucBuf, FLMBYTE * pucBuf,
FLMUINT * puiBufLength); FLMUINT * puiBufLength);
FLMBYTE FLMAPI f_getBase24DigitChar( FLMBYTE FLMAPI f_getBase24DigitChar(
FLMBYTE ucValue); FLMBYTE ucValue);
#define shiftN(data,size,distance) \ #define shiftN(data,size,distance) \
f_memmove((FLMBYTE *)(data) + (FLMINT)(distance), \ f_memmove((FLMBYTE *)(data) + (FLMINT)(distance), \
(FLMBYTE *)(data), (unsigned)(size)) (FLMBYTE *)(data), (unsigned)(size))
/*******************************************************************
********
Desc:
********************************************************************
*******/
class FLMEXP F_Printf : public F_Object
{
public:
#define MAX_LOG_BUF_CHARS 255
F_Printf()
{
}
virtual ~F_Printf()
{
}
FLMINT FLMAPI strvPrintf(
char * pszDestStr,
const char * pszFormat,
f_va_list * args);
FLMINT FLMAPI strPrintf(
char * pszDestStr,
const char * pszFormat,
...);
FLMINT FLMAPI logvPrintf(
IF_LogMessageClient * pLogMsg,
const char * pszFormat,
f_va_list * args
);
FLMINT FLMAPI logPrintf(
IF_LogMessageClient * pLogMsg,
const char * pszFormat,
...);
private:
void processFieldInfo(
const char ** ppszFormat,
FLMUINT * puiWidth,
FLMUINT * puiPrecision,
FLMUINT * puiFlags,
f_va_list * args);
void stringFormatter(
char cFormatChar,
FLMUINT uiWidth,
FLMUINT uiPrecision,
FLMUINT uiFlags,
f_va_list * args);
void colorFormatter(
char cFormatChar,
eColorType eColor,
FLMUINT uiFlags);
void charFormatter(
char cFormatChar,
f_va_list * args);
void errorFormatter(
f_va_list * args);
void notHandledFormatter( void);
void numberFormatter(
char cFormatChar,
FLMUINT uiWidth,
FLMUINT uiPrecision,
FLMUINT uiFlags,
f_va_list * args);
void parseArgs(
const char * pszFormat,
f_va_list * args);
void processFormatString(
FLMUINT uiLen,
...);
FLMUINT printNumber(
FLMUINT64 ui64Val,
FLMUINT uiBase,
FLMBOOL bUpperCase,
FLMBOOL bCommas,
char * pszBuf);
void outputLogBuffer( void);
FINLINE void outputChar(
char cChar)
{
if (!m_pLogMsg)
{
*m_pszDestStr++ = cChar;
}
else
{
m_szLogBuf [m_uiCharOffset++] = cChar;
m_uiNumLogChars++;
if (m_uiCharOffset == MAX_LOG_BUF_CHARS)
{
outputLogBuffer();
}
}
}
FINLINE void memsetChar(
char cChar,
FLMUINT uiCount)
{
if (!m_pLogMsg)
{
f_memset( m_pszDestStr, cChar, uiCount);
m_pszDestStr += uiCount;
}
else
{
FLMUINT uiTmpCount;
while (uiCount)
{
uiTmpCount = uiCount;
if (m_uiCharOffset + uiTmpCount > MA
X_LOG_BUF_CHARS)
{
uiTmpCount = MAX_LOG_BUF_CHA
RS - m_uiCharOffset;
}
f_memset( &m_szLogBuf [m_uiCharOffse
t], cChar, uiTmpCount);
m_uiCharOffset += uiTmpCount;
m_uiNumLogChars += uiTmpCount;
uiCount -= uiTmpCount;
if (m_uiCharOffset == MAX_LOG_BUF_CH
ARS)
{
outputLogBuffer();
}
}
}
}
FINLINE void outputStr(
const char * pszStr,
FLMUINT uiLen)
{
if (!m_pLogMsg)
{
f_memcpy( m_pszDestStr, pszStr, uiLen);
m_pszDestStr += uiLen;
}
else
{
FLMUINT uiTmpLen;
while (uiLen)
{
uiTmpLen = uiLen;
if (m_uiCharOffset + uiTmpLen > MAX_
LOG_BUF_CHARS)
{
uiTmpLen = MAX_LOG_BUF_CHARS
- m_uiCharOffset;
}
f_memcpy( &m_szLogBuf [m_uiCharOffse
t], pszStr, uiTmpLen);
m_uiCharOffset += uiTmpLen;
m_uiNumLogChars += uiTmpLen;
uiLen -= uiTmpLen;
pszStr += uiTmpLen;
if (m_uiCharOffset == MAX_LOG_BUF_CH
ARS)
{
outputLogBuffer();
}
}
}
}
// Variables used to do the printf stuff
char m_sz
LogBuf [MAX_LOG_BUF_CHARS + 1];
FLMUINT m_uiNumLogCh
ars;
FLMUINT m_uiCharOffs
et;
char * m_pszDestStr
;
IF_LogMessageClient * m_pLogMsg;
eColorType m_eCurrentFo
reColor;
eColorType m_eCurrentBa
ckColor;
};
/******************************************************************* ********* /******************************************************************* *********
Desc: XML Desc: XML
******************************************************************** ********/ ******************************************************************** ********/
flminterface FLMEXP IF_XML : public F_Object flminterface FLMEXP IF_XML : public F_Object
{ {
public: public:
virtual FLMBOOL FLMAPI isPubidChar( virtual FLMBOOL FLMAPI isPubidChar(
FLMUNICODE uChar) = 0; FLMUNICODE uChar) = 0;
skipping to change at line 3739 skipping to change at line 4217
void * pvOldAlloc, void * pvOldAlloc,
void * pvNewAlloc) = 0; void * pvNewAlloc) = 0;
virtual FLMBOOL FLMAPI canRelocate( virtual FLMBOOL FLMAPI canRelocate(
void * pvOldAlloc) = 0; void * pvOldAlloc) = 0;
}; };
/******************************************************************* ********* /******************************************************************* *********
Desc: Desc:
******************************************************************** ********/ ******************************************************************** ********/
typedef void (* F_ALLOC_INIT_FUNC)( typedef void (FLMAPI * F_ALLOC_INIT_FUNC)(
void * pvAlloc); void * pvAlloc,
FLMUINT uiSize);
/******************************************************************* ********* /******************************************************************* *********
Desc: Desc:
******************************************************************** ********/ ******************************************************************** ********/
flminterface FLMEXP IF_SlabManager : public F_Object flminterface FLMEXP IF_SlabManager : public F_Object
{ {
virtual RCODE FLMAPI setup( virtual RCODE FLMAPI setup(
FLMUINT uiPr eallocSize) = 0; FLMUINT uiPr eallocSize) = 0;
virtual RCODE FLMAPI allocSlab( virtual RCODE FLMAPI allocSlab(
void ** ppSlab, void ** ppSlab) = 0;
FLMBOOL bMutexLocked
) = 0;
virtual void FLMAPI freeSlab( virtual void FLMAPI freeSlab(
void ** ppSlab, void ** ppSlab) = 0;
FLMBOOL bMutexLocked
) = 0;
virtual RCODE FLMAPI resize( virtual RCODE FLMAPI resize(
FLMUINT uiNu mBytes, FLMUINT uiNu mBytes,
FLMUINT * puiActualSiz FLMBOOL bPreallocate
e = NULL, ,
FLMBOOL bMutexLocked FLMUINT * puiActualSiz
= FALSE) = 0; e = NULL) = 0;
virtual void FLMAPI incrementTotalBytesAllocated( virtual void FLMAPI incrementTotalBytesAllocated(
FLMUINT uiCount, FLMUINT uiCount) = 0
FLMBOOL bMutexLocked ;
) = 0;
virtual void FLMAPI decrementTotalBytesAllocated( virtual void FLMAPI decrementTotalBytesAllocated(
FLMUINT uiCount, FLMUINT uiCount) = 0
FLMBOOL bMutexLocked ;
) = 0;
virtual FLMUINT FLMAPI getSlabSize( void) = 0; virtual FLMUINT FLMAPI getSlabSize( void) = 0;
virtual FLMUINT FLMAPI getTotalSlabs( void) = 0; virtual FLMUINT FLMAPI getTotalSlabs( void) = 0;
virtual void FLMAPI lockMutex( void) = 0;
virtual void FLMAPI unlockMutex( void) = 0;
virtual FLMUINT FLMAPI totalBytesAllocated( void) = 0; virtual FLMUINT FLMAPI totalBytesAllocated( void) = 0;
virtual FLMUINT FLMAPI getTotalSlabBytesAllocated( void) = 0
;
virtual FLMUINT FLMAPI availSlabs( void) = 0; virtual FLMUINT FLMAPI availSlabs( void) = 0;
}; };
RCODE FLMAPI FlmAllocSlabManager( RCODE FLMAPI FlmAllocSlabManager(
IF_SlabManager ** ppSlabManager); IF_SlabManager ** ppSlabManager);
/******************************************************************* ********* /******************************************************************* *********
Desc: Class to provide an efficient means of providing many alloca tions Desc: Class to provide an efficient means of providing many alloca tions
of a fixed size. of a fixed size.
******************************************************************** ********/ ******************************************************************** ********/
flminterface FLMEXP IF_FixedAlloc : public F_Object flminterface FLMEXP IF_FixedAlloc : public F_Object
{ {
virtual RCODE FLMAPI setup( virtual RCODE FLMAPI setup(
FLMBOOL bMultiThread ed,
IF_SlabManager * pSlabManager, IF_SlabManager * pSlabManager,
IF_Relocator * pDefaultRelocator, IF_Relocator * pDefaultRelocator,
FLMUINT uiCellSize, FLMUINT uiCellSize,
FLM_SLAB_USAGE * pUsageStats, FLM_SLAB_USAGE * pUsageStats,
FLMUINT * puiTotalByte sAllocated) = 0; FLMUINT * puiTotalByte sAllocated) = 0;
virtual void * FLMAPI allocCell( virtual void * FLMAPI allocCell(
IF_Relocator * pRelocator = NULL, IF_Relocator * pRelocator,
void * pvInitialDat void * pvInitialDat
a = NULL, a,
FLMUINT uiDataSize = FLMUINT uiDataSize)
0, = 0;
FLMBOOL bMutexLocked
= FALSE) = 0;
virtual void * FLMAPI allocCell( virtual void * FLMAPI allocCell(
IF_Relocator * pRelocator, IF_Relocator * pRelocator,
F_ALLOC_INIT_FUNC fnAllocInit, F_ALLOC_INIT_FUNC fnAllocInit) = 0;
FLMBOOL bMutexLocked
= FALSE) = 0;
virtual void FLMAPI freeCell( virtual void FLMAPI freeCell(
void * ptr, void * ptr) = 0;
FLMBOOL bMutexLocked
= FALSE) = 0;
virtual void FLMAPI freeUnused( void) = 0; virtual void FLMAPI freeUnused( void) = 0;
virtual void FLMAPI freeAll( void) = 0; virtual void FLMAPI freeAll( void) = 0;
virtual FLMUINT FLMAPI getCellSize( void) = 0; virtual FLMUINT FLMAPI getCellSize( void) = 0;
virtual void FLMAPI defragmentMemory( void) = 0; virtual void FLMAPI defragmentMemory( void) = 0;
}; };
RCODE FLMAPI FlmAllocFixedAllocator( RCODE FLMAPI FlmAllocFixedAllocator(
IF_FixedAlloc ** ppFixedAllocator); IF_FixedAlloc ** ppFixedAllocator);
/******************************************************************* ********* /******************************************************************* *********
Desc: Desc:
******************************************************************** ********/ ******************************************************************** ********/
flminterface IF_BlockAlloc : public F_Object
{
virtual RCODE FLMAPI setup(
FLMBOOL bMultiThread
ed,
IF_SlabManager * pSlabManager,
IF_Relocator * pRelocator,
FLMUINT uiBlockSize,
FLM_SLAB_USAGE * pUsageStats,
FLMUINT * puiTotalByte
sAllocated) = 0;
virtual RCODE FLMAPI allocBlock(
void ** ppvBlock) =
0;
virtual void FLMAPI freeBlock(
void ** ppvBlock) =
0;
virtual void FLMAPI freeUnused( void) = 0;
virtual void FLMAPI freeAll( void) = 0;
virtual void FLMAPI defragmentMemory( void) = 0;
};
RCODE FLMAPI FlmAllocBlockAllocator(
IF_BlockAlloc ** ppBlockAllocator);
/*******************************************************************
*********
Desc:
********************************************************************
********/
flminterface FLMEXP IF_BufferAlloc : public F_Object flminterface FLMEXP IF_BufferAlloc : public F_Object
{ {
virtual RCODE FLMAPI setup( virtual RCODE FLMAPI setup(
FLMBOOL bMultiThread ed,
IF_SlabManager * pSlabManager, IF_SlabManager * pSlabManager,
IF_Relocator * pDefaultRelocator, IF_Relocator * pDefaultRelocator,
FLM_SLAB_USAGE * pUsageStats, FLM_SLAB_USAGE * pUsageStats,
FLMUINT * puiTotalByte sAllocated) = 0; FLMUINT * puiTotalByte sAllocated) = 0;
virtual RCODE FLMAPI allocBuf( virtual RCODE FLMAPI allocBuf(
IF_Relocator * pRelocator, IF_Relocator * pRelocator,
FLMUINT uiSize, FLMUINT uiSize,
void * pvInitialDat a, void * pvInitialDat a,
FLMUINT uiDataSize, FLMUINT uiDataSize,
FLMBYTE ** ppucBuffer, FLMBYTE ** ppucBuffer,
FLMBOOL * pbAllocatedO nHeap = NULL) = 0; FLMBOOL * pbAllocatedO nHeap = NULL) = 0;
virtual RCODE FLMAPI allocBuf(
IF_Relocator * pRelocator,
FLMUINT uiSize,
F_ALLOC_INIT_FUNC fnAllocInit,
FLMBYTE ** ppucBuffer,
FLMBOOL * pbAllocatedO
nHeap = NULL) = 0;
virtual RCODE FLMAPI reallocBuf( virtual RCODE FLMAPI reallocBuf(
IF_Relocator * pRelocator, IF_Relocator * pRelocator,
FLMUINT uiOldSize, FLMUINT uiOldSize,
FLMUINT uiNewSize, FLMUINT uiNewSize,
void * pvInitialDat a, void * pvInitialDat a,
FLMUINT uiDataSize, FLMUINT uiDataSize,
FLMBYTE ** ppucBuffer, FLMBYTE ** ppucBuffer,
FLMBOOL * pbAllocatedO nHeap = NULL) = 0; FLMBOOL * pbAllocatedO nHeap = NULL) = 0;
virtual void FLMAPI freeBuf( virtual void FLMAPI freeBuf(
skipping to change at line 3877 skipping to change at line 4385
RCODE FLMAPI FlmAllocBufferAllocator( RCODE FLMAPI FlmAllocBufferAllocator(
IF_BufferAlloc ** ppBufferAllocator); IF_BufferAlloc ** ppBufferAllocator);
/******************************************************************* ********* /******************************************************************* *********
Desc: Desc:
******************************************************************** ********/ ******************************************************************** ********/
flminterface FLMEXP IF_MultiAlloc : public F_Object flminterface FLMEXP IF_MultiAlloc : public F_Object
{ {
virtual RCODE FLMAPI setup( virtual RCODE FLMAPI setup(
FLMBOOL bMultiThread ed,
IF_SlabManager * pSlabManager, IF_SlabManager * pSlabManager,
IF_Relocator * pDefaultRelocator, IF_Relocator * pDefaultRelocator,
FLMUINT * puiCellSizes , FLMUINT * puiCellSizes ,
FLM_SLAB_USAGE * pUsageStats, FLM_SLAB_USAGE * pUsageStats,
FLMUINT * puiTotalByte sAllocated) = 0; FLMUINT * puiTotalByte sAllocated) = 0;
virtual RCODE FLMAPI allocBuf( virtual RCODE FLMAPI allocBuf(
IF_Relocator * pRelocator, IF_Relocator * pRelocator,
FLMUINT uiSize, FLMUINT uiSize,
FLMBYTE ** ppucBuffer, FLMBYTE ** ppucBuffer)
FLMBOOL bMutexLocked = 0;
= FALSE) = 0;
virtual RCODE FLMAPI allocBuf(
IF_Relocator * pRelocator,
FLMUINT uiSize,
F_ALLOC_INIT_FUNC fnAllocInit,
FLMBYTE ** ppucBuffer)
= 0;
virtual RCODE FLMAPI reallocBuf( virtual RCODE FLMAPI reallocBuf(
IF_Relocator * pRelocator, IF_Relocator * pRelocator,
FLMUINT uiNewSize, FLMUINT uiNewSize,
FLMBYTE ** ppucBuffer, FLMBYTE ** ppucBuffer)
FLMBOOL bMutexLocked = 0;
= FALSE) = 0;
virtual void FLMAPI freeBuf( virtual void FLMAPI freeBuf(
FLMBYTE ** ppucBuffer) = 0; FLMBYTE ** ppucBuffer) = 0;
virtual void FLMAPI defragmentMemory( void) = 0; virtual void FLMAPI defragmentMemory( void) = 0;
virtual FLMUINT FLMAPI getTrueSize( virtual FLMUINT FLMAPI getTrueSize(
FLMBYTE * pucBuffer) = 0; FLMBYTE * pucBuffer) = 0;
virtual void FLMAPI lockMutex( void) = 0;
virtual void FLMAPI unlockMutex( void) = 0;
}; };
RCODE FLMAPI FlmAllocMultiAllocator( RCODE FLMAPI FlmAllocMultiAllocator(
IF_MultiAlloc ** ppMultiAllocator); IF_MultiAlloc ** ppMultiAllocator);
/******************************************************************* ********* /******************************************************************* *********
Desc: Block Desc: Block
******************************************************************** ********/ ******************************************************************** ********/
flminterface FLMEXP IF_Block : public F_Object flminterface FLMEXP IF_Block : public F_Object
{ {
skipping to change at line 4289 skipping to change at line 4798
Exit: Exit:
return( rc); return( rc);
} }
FINLINE RCODE FLMAPI appendByte( FINLINE RCODE FLMAPI appendByte(
FLMBYTE ucChar) FLMBYTE ucChar)
{ {
RCODE rc = NE_FLM_OK; RCODE rc = NE_FLM_OK;
FLMBYTE * pucTmp; FLMBYTE * pucTmp = NULL;
if( RC_BAD( rc = allocSpace( 1, (void **)&pucTmp))) if( RC_BAD( rc = allocSpace( 1, (void **)&pucTmp)))
{ {
goto Exit; goto Exit;
} }
*pucTmp = ucChar; *pucTmp = ucChar;
Exit: Exit:
return( rc); return( rc);
} }
FINLINE RCODE FLMAPI appendUniChar( FINLINE RCODE FLMAPI appendUniChar(
FLMUNICODE uChar) FLMUNICODE uChar)
{ {
RCODE rc = NE_FLM_OK; RCODE rc = NE_FLM_OK;
FLMUNICODE * puTmp; FLMUNICODE * puTmp = NULL;
if( RC_BAD( rc = allocSpace( sizeof( FLMUNICODE), (v oid **)&puTmp))) if( RC_BAD( rc = allocSpace( sizeof( FLMUNICODE), (v oid **)&puTmp)))
{ {
goto Exit; goto Exit;
} }
*puTmp = uChar; *puTmp = uChar;
Exit: Exit:
skipping to change at line 4648 skipping to change at line 5157
/// from the IF_LockObject::getLockInfo() function. /// from the IF_LockObject::getLockInfo() function.
virtual FLMBOOL FLMAPI addLockInfo( virtual FLMBOOL FLMAPI addLockInfo(
FLMUINT uiLockNum, ///< Position in queue (0 = lock holder, 1..n = lock waiter). FLMUINT uiLockNum, ///< Position in queue (0 = lock holder, 1..n = lock waiter).
FLMUINT uiThreadID, ///< Thread ID of the lock holder/waiter. FLMUINT uiThreadID, ///< Thread ID of the lock holder/waiter.
FLMUINT uiTime ///< For the lock holder, this is the amount of time the lock has been FLMUINT uiTime ///< For the lock holder, this is the amount of time the lock has been
///< held.\ For a lock waiter, this is the am ount of time the thread ///< held.\ For a lock waiter, this is the am ount of time the thread
///< has been waiting to obtain the lock.\ Bot h times are milliseconds. ///< has been waiting to obtain the lock.\ Bot h times are milliseconds.
) = 0; ) = 0;
}; };
#define FLM_NO_TIMEOUT 0xFF
/******************************************************************* ******* /******************************************************************* *******
/// Structure used in gathering statistics to hold an operation coun t and an elapsed time. /// Structure used in gathering statistics to hold an operation coun t and an elapsed time.
******************************************************************** ******/ ******************************************************************** ******/
typedef struct typedef struct
{ {
FLMUINT64 ui64Count; ///< Number of times operation was performed FLMUINT64 ui64Count; ///< Number of times operation was performed
FLMUINT64 ui64ElapMilli; ///< Total elapsed time (milliseconds) for the operations. FLMUINT64 ui64ElapMilli; ///< Total elapsed time (milliseconds) for the operations.
} F_COUNT_TIME_STAT; } F_COUNT_TIME_STAT;
/******************************************************************* ******* /******************************************************************* *******
skipping to change at line 4827 skipping to change at line 5334
ui64RetVal = ((ui64ValueToRound / ui64Boundary) * ui64Bounda ry); ui64RetVal = ((ui64ValueToRound / ui64Boundary) * ui64Bounda ry);
if( ui64RetVal < ui64ValueToRound) if( ui64RetVal < ui64ValueToRound)
{ {
ui64RetVal += ui64Boundary; ui64RetVal += ui64Boundary;
} }
return( ui64RetVal); return( ui64RetVal);
} }
FINLINE void f_setBit(
FLMBYTE * pucBuffer,
FLMUINT uiBit)
{
pucBuffer[ uiBit >> 3] |= (0x01 << (uiBit & 0x07));
}
FINLINE void f_clearBit(
FLMBYTE * pucBuffer,
FLMUINT uiBit)
{
pucBuffer[ uiBit >> 3] &= ~(0x01 << (uiBit & 0x07));
}
FINLINE FLMBOOL f_isBitSet(
FLMBYTE * pucBuffer,
FLMUINT uiBit)
{
return( (pucBuffer[ uiBit >> 3] & (0x01 << (uiBit & 0x07)))
? TRUE
: FALSE);
}
RCODE FLMAPI f_filecpy( RCODE FLMAPI f_filecpy(
const char * pszSourceFile, const char * pszSourceFile,
const char * pszData); const char * pszData);
RCODE FLMAPI f_filecat( RCODE FLMAPI f_filecat(
const char * pszSourceFile, const char * pszSourceFile,
const char * pszData); const char * pszData);
RCODE FLMAPI f_filetobuf( RCODE FLMAPI f_filetobuf(
const char * pszSourceFile, const char * pszSourceFile,
skipping to change at line 5398 skipping to change at line 5928
{ {
m_pucBuffer = NULL; m_pucBuffer = NULL;
m_uiBufferLen = 0; m_uiBufferLen = 0;
m_uiOffset = 0; m_uiOffset = 0;
m_bAllocatedBuffer = FALSE; m_bAllocatedBuffer = FALSE;
m_bIsOpen = FALSE; m_bIsOpen = FALSE;
} }
virtual ~F_BufferIStream(); virtual ~F_BufferIStream();
RCODE FLMAPI open( RCODE FLMAPI openStream(
const char * pucBuffer, const char * pucBuffer,
FLMUINT uiLength, FLMUINT uiLength,
char ** ppucAllocatedBuffer = NULL); char ** ppucAllocatedBuffer = NULL);
FINLINE FLMUINT64 FLMAPI totalSize( void) FINLINE FLMUINT64 FLMAPI totalSize( void)
{ {
f_assert( m_bIsOpen); f_assert( m_bIsOpen);
return( m_uiBufferLen); return( m_uiBufferLen);
} }
FINLINE FLMUINT64 FLMAPI remainingSize( void) FINLINE FLMUINT64 FLMAPI remainingSize( void)
{ {
f_assert( m_bIsOpen); f_assert( m_bIsOpen);
return( m_uiBufferLen - m_uiOffset); return( m_uiBufferLen - m_uiOffset);
} }
RCODE FLMAPI close( void); RCODE FLMAPI closeStream( void);
FINLINE RCODE FLMAPI positionTo( FINLINE RCODE FLMAPI positionTo(
FLMUINT64 ui64Position) FLMUINT64 ui64Position)
{ {
f_assert( m_bIsOpen); f_assert( m_bIsOpen);
if( ui64Position < m_uiBufferLen) if( ui64Position < m_uiBufferLen)
{ {
m_uiOffset = (FLMUINT)ui64Position; m_uiOffset = (FLMUINT)ui64Position;
} }
skipping to change at line 5440 skipping to change at line 5970
return( NE_FLM_OK); return( NE_FLM_OK);
} }
FINLINE FLMUINT64 FLMAPI getCurrPosition( void) FINLINE FLMUINT64 FLMAPI getCurrPosition( void)
{ {
f_assert( m_bIsOpen); f_assert( m_bIsOpen);
return( m_uiOffset); return( m_uiOffset);
} }
FINLINE void FLMAPI truncate( FINLINE void FLMAPI truncateStream(
FLMUINT64 ui64Offset) FLMUINT64 ui64Offset = 0)
{ {
f_assert( m_bIsOpen); f_assert( m_bIsOpen);
f_assert( ui64Offset >= m_uiOffset); f_assert( ui64Offset >= m_uiOffset);
f_assert( ui64Offset <= m_uiBufferLen); f_assert( ui64Offset <= m_uiBufferLen);
m_uiBufferLen = (FLMUINT)ui64Offset; m_uiBufferLen = (FLMUINT)ui64Offset;
} }
RCODE FLMAPI read( RCODE FLMAPI read(
void * pvBuffer, void * pvBuffer,
skipping to change at line 5502 skipping to change at line 6032
} }
virtual ~F_FileIStream() virtual ~F_FileIStream()
{ {
if( m_pFileHdl) if( m_pFileHdl)
{ {
m_pFileHdl->Release(); m_pFileHdl->Release();
} }
} }
RCODE FLMAPI open( RCODE FLMAPI openStream(
const char * pszPath); const char * pszPath);
RCODE FLMAPI close( void); RCODE FLMAPI closeStream( void);
RCODE FLMAPI positionTo( RCODE FLMAPI positionTo(
FLMUINT64 ui64Position); FLMUINT64 ui64Position);
FLMUINT64 FLMAPI totalSize( void); FLMUINT64 FLMAPI totalSize( void);
FLMUINT64 FLMAPI remainingSize( void); FLMUINT64 FLMAPI remainingSize( void);
FLMUINT64 FLMAPI getCurrPosition( void); FLMUINT64 FLMAPI getCurrPosition( void);
skipping to change at line 5542 skipping to change at line 6072
public: public:
F_BufferedIStream() F_BufferedIStream()
{ {
m_pIStream = NULL; m_pIStream = NULL;
m_pucBuffer = NULL; m_pucBuffer = NULL;
} }
virtual ~F_BufferedIStream() virtual ~F_BufferedIStream()
{ {
close(); closeStream();
} }
RCODE FLMAPI open( RCODE FLMAPI openStream(
IF_IStream * pIStream, IF_IStream * pIStream,
FLMUINT uiBufferSize); FLMUINT uiBufferSize);
RCODE FLMAPI read( RCODE FLMAPI read(
void * pvBuffer, void * pvBuffer,
FLMUINT uiBytesToRead, FLMUINT uiBytesToRead,
FLMUINT * puiBytesRead); FLMUINT * puiBytesRead);
RCODE FLMAPI close( void); RCODE FLMAPI closeStream( void);
FINLINE FLMUINT64 FLMAPI totalSize( void) FINLINE FLMUINT64 FLMAPI totalSize( void)
{ {
if (!m_pIStream) if (!m_pIStream)
{ {
f_assert( 0); f_assert( 0);
return( 0); return( 0);
} }
return( m_uiBytesAvail); return( m_uiBytesAvail);
skipping to change at line 5634 skipping to change at line 6164
public: public:
F_BufferedOStream() F_BufferedOStream()
{ {
m_pOStream = NULL; m_pOStream = NULL;
m_pucBuffer = NULL; m_pucBuffer = NULL;
} }
virtual ~F_BufferedOStream() virtual ~F_BufferedOStream()
{ {
close(); closeStream();
} }
RCODE FLMAPI open( RCODE FLMAPI openStream(
IF_OStream * pOStream, IF_OStream * pOStream,
FLMUINT uiBufferSize); FLMUINT uiBufferSize);
RCODE FLMAPI write( RCODE FLMAPI write(
const void * pvBuffer, const void * pvBuffer,
FLMUINT uiBytesToWrite, FLMUINT uiBytesToWrite,
FLMUINT * puiBytesWritten); FLMUINT * puiBytesWritten);
RCODE FLMAPI close( void); RCODE FLMAPI closeStream( void);
RCODE FLMAPI flush( void); RCODE FLMAPI flush( void);
private: private:
IF_OStream * m_pOStream; IF_OStream * m_pOStream;
FLMBYTE * m_pucBuffer; FLMBYTE * m_pucBuffer;
FLMUINT m_uiBufferSize; FLMUINT m_uiBufferSize;
FLMUINT m_uiBufferOffset; FLMUINT m_uiBufferOffset;
}; };
skipping to change at line 5672 skipping to change at line 6202
{ {
public: public:
F_FileOStream() F_FileOStream()
{ {
m_pFileHdl = NULL; m_pFileHdl = NULL;
} }
virtual ~F_FileOStream() virtual ~F_FileOStream()
{ {
close(); closeStream();
} }
RCODE FLMAPI open( RCODE FLMAPI openStream(
const char * pszFilePath, const char * pszFilePath,
FLMBOOL bTruncateIfExists); FLMBOOL bTruncateIfExists);
RCODE FLMAPI write( RCODE FLMAPI write(
const void * pvBuffer, const void * pvBuffer,
FLMUINT uiBytesToWrite, FLMUINT uiBytesToWrite,
FLMUINT * puiBytesWritten); FLMUINT * puiBytesWritten);
RCODE FLMAPI close( void); RCODE FLMAPI closeStream( void);
private: private:
IF_FileHdl * m_pFileHdl; IF_FileHdl * m_pFileHdl;
FLMUINT64 m_ui64FileOffset; FLMUINT64 m_ui64FileOffset;
}; };
/******************************************************************* ********* /******************************************************************* *********
Desc: Desc:
******************************************************************** ********/ ******************************************************************** ********/
skipping to change at line 5707 skipping to change at line 6237
public: public:
F_MultiFileIStream() F_MultiFileIStream()
{ {
m_pIStream = NULL; m_pIStream = NULL;
m_bOpen = FALSE; m_bOpen = FALSE;
} }
virtual ~F_MultiFileIStream() virtual ~F_MultiFileIStream()
{ {
close(); closeStream();
} }
RCODE FLMAPI open( RCODE FLMAPI openStream(
const char * pszDirectory, const char * pszDirectory,
const char * pszBaseName); const char * pszBaseName);
RCODE FLMAPI read( RCODE FLMAPI read(
void * pvBuffer, void * pvBuffer,
FLMUINT uiBytesToRead, FLMUINT uiBytesToRead,
FLMUINT * puiBytesRead); FLMUINT * puiBytesRead);
RCODE FLMAPI close( void); RCODE FLMAPI closeStream( void);
private: private:
RCODE rollToNextFile( void); RCODE rollToNextFile( void);
IF_IStream * m_pIStream; IF_IStream * m_pIStream;
FLMBOOL m_bOpen; FLMBOOL m_bOpen;
FLMBOOL m_bEndOfStream; FLMBOOL m_bEndOfStream;
FLMUINT m_uiFileNum; FLMUINT m_uiFileNum;
FLMUINT64 m_ui64FileOffset; FLMUINT64 m_ui64FileOffset;
skipping to change at line 5749 skipping to change at line 6279
public: public:
F_MultiFileOStream() F_MultiFileOStream()
{ {
m_pOStream = NULL; m_pOStream = NULL;
m_bOpen = FALSE; m_bOpen = FALSE;
} }
virtual ~F_MultiFileOStream() virtual ~F_MultiFileOStream()
{ {
close(); closeStream();
} }
RCODE create( RCODE createStream(
const char * pszDirectory, const char * pszDirectory,
const char * pszBaseName, const char * pszBaseName,
FLMUINT uiMaxFileSize, FLMUINT uiMaxFileSize,
FLMBOOL bOkToOverwrite); FLMBOOL bOkToOverwrite);
RCODE FLMAPI write( RCODE FLMAPI write(
const void * pvBuffer, const void * pvBuffer,
FLMUINT uiBytesToWrite, FLMUINT uiBytesToWrite,
FLMUINT * puiBytesWritten); FLMUINT * puiBytesWritten);
RCODE FLMAPI close( void); RCODE FLMAPI closeStream( void);
RCODE processDirectory( RCODE processDirectory(
const char * pszDirectory, const char * pszDirectory,
const char * pszBaseName, const char * pszBaseName,
FLMBOOL bOkToDelete); FLMBOOL bOkToDelete);
private: private:
RCODE rollToNextFile( void); RCODE rollToNextFile( void);
skipping to change at line 5807 skipping to change at line 6337
} }
virtual ~F_CollIStream() virtual ~F_CollIStream()
{ {
if( m_pIStream) if( m_pIStream)
{ {
m_pIStream->Release(); m_pIStream->Release();
} }
} }
RCODE FLMAPI open( RCODE FLMAPI openStream(
IF_PosIStream * pIStream, IF_PosIStream * pIStream,
FLMBOOL bUnicodeStream, FLMBOOL bUnicodeStream,
FLMUINT uiLanguage, FLMUINT uiLanguage,
FLMUINT uiCompareRules, FLMUINT uiCompareRules,
FLMBOOL bMayHaveWildCards) FLMBOOL bMayHaveWildCards)
{ {
if( m_pIStream) if( m_pIStream)
{ {
m_pIStream->Release(); m_pIStream->Release();
} }
skipping to change at line 5832 skipping to change at line 6362
m_uiCompareRules = uiCompareRules; m_uiCompareRules = uiCompareRules;
m_bCaseSensitive = (uiCompareRules & FLM_COMP_CASE_I NSENSITIVE) m_bCaseSensitive = (uiCompareRules & FLM_COMP_CASE_I NSENSITIVE)
? FALSE ? FALSE
: TRUE; : TRUE;
m_bMayHaveWildCards = bMayHaveWildCards; m_bMayHaveWildCards = bMayHaveWildCards;
m_bUnicodeStream = bUnicodeStream; m_bUnicodeStream = bUnicodeStream;
m_ui64EndOfLeadingSpacesPos = 0; m_ui64EndOfLeadingSpacesPos = 0;
return( NE_FLM_OK); return( NE_FLM_OK);
} }
RCODE FLMAPI close( void) RCODE FLMAPI closeStream( void)
{ {
if( m_pIStream) if( m_pIStream)
{ {
m_pIStream->Release(); m_pIStream->Release();
m_pIStream = NULL; m_pIStream = NULL;
} }
return( NE_FLM_OK); return( NE_FLM_OK);
} }
skipping to change at line 5970 skipping to change at line 6500
F_Base64DecoderIStream() F_Base64DecoderIStream()
{ {
m_pIStream = NULL; m_pIStream = NULL;
m_uiBufOffset = 0; m_uiBufOffset = 0;
m_uiAvailBytes = 0; m_uiAvailBytes = 0;
} }
virtual ~F_Base64DecoderIStream() virtual ~F_Base64DecoderIStream()
{ {
close(); closeStream();
} }
RCODE FLMAPI open( RCODE FLMAPI openStream(
IF_IStream * pIStream); IF_IStream * pIStream);
RCODE FLMAPI read( RCODE FLMAPI read(
void * pvBuffer, void * pvBuffer,
FLMUINT uiBytesToRead, FLMUINT uiBytesToRead,
FLMUINT * puiBytesRead); FLMUINT * puiBytesRead);
FINLINE RCODE FLMAPI close( void) FINLINE RCODE FLMAPI closeStream( void)
{ {
RCODE rc = NE_FLM_OK; RCODE rc = NE_FLM_OK;
if( m_pIStream) if( m_pIStream)
{ {
if( m_pIStream->getRefCount() == 1) if( m_pIStream->getRefCount() == 1)
{ {
rc = m_pIStream->close(); rc = m_pIStream->closeStream();
} }
m_pIStream->Release(); m_pIStream->Release();
m_pIStream = NULL; m_pIStream = NULL;
} }
m_uiAvailBytes = 0; m_uiAvailBytes = 0;
m_uiBufOffset = 0; m_uiBufOffset = 0;
return( rc); return( rc);
skipping to change at line 6024 skipping to change at line 6554
{ {
public: public:
F_Base64EncoderIStream() F_Base64EncoderIStream()
{ {
m_pIStream = NULL; m_pIStream = NULL;
} }
virtual ~F_Base64EncoderIStream() virtual ~F_Base64EncoderIStream()
{ {
close(); closeStream();
} }
RCODE FLMAPI open( RCODE FLMAPI openStream(
IF_IStream * pIStream, IF_IStream * pIStream,
FLMBOOL bLineBreaks); FLMBOOL bLineBreaks);
RCODE FLMAPI read( RCODE FLMAPI read(
void * pvBuffer, void * pvBuffer,
FLMUINT uiBytesToRead, FLMUINT uiBytesToRead,
FLMUINT * puiBytesRead); FLMUINT * puiBytesRead);
FINLINE RCODE FLMAPI close( void) FINLINE RCODE FLMAPI closeStream( void)
{ {
RCODE rc = NE_FLM_OK; RCODE rc = NE_FLM_OK;
if( m_pIStream) if( m_pIStream)
{ {
if( m_pIStream->getRefCount() == 1) if( m_pIStream->getRefCount() == 1)
{ {
rc = m_pIStream->close(); rc = m_pIStream->closeStream();
} }
m_pIStream->Release(); m_pIStream->Release();
m_pIStream = NULL; m_pIStream = NULL;
} }
return( rc); return( rc);
} }
private: private:
skipping to change at line 6093 skipping to change at line 6623
F_CompressingOStream() F_CompressingOStream()
{ {
m_pool.poolInit( 64 * 1024); m_pool.poolInit( 64 * 1024);
m_pOStream = NULL; m_pOStream = NULL;
m_ppHashTbl = NULL; m_ppHashTbl = NULL;
} }
virtual ~F_CompressingOStream() virtual ~F_CompressingOStream()
{ {
close(); closeStream();
} }
RCODE FLMAPI open( RCODE FLMAPI openStream(
IF_OStream * pOStream); IF_OStream * pOStream);
RCODE FLMAPI write( RCODE FLMAPI write(
const void * pvBuffer, const void * pvBuffer,
FLMUINT uiBytesToWrite, FLMUINT uiBytesToWrite,
FLMUINT * puiBytesWritten); FLMUINT * puiBytesWritten);
RCODE FLMAPI close( void); RCODE FLMAPI closeStream( void);
private: private:
FINLINE FLMUINT getHashBucket( FINLINE FLMUINT getHashBucket(
FLMUINT16 ui16CurrentCode, FLMUINT16 ui16CurrentCode,
FLMBYTE ucChar) FLMBYTE ucChar)
{ {
return( ((((FLMUINT)ui16CurrentCode) << 8) | return( ((((FLMUINT)ui16CurrentCode) << 8) |
((FLMUINT)ucChar)) % m_uiHashTblSize); ((FLMUINT)ucChar)) % m_uiHashTblSize);
} }
skipping to change at line 6158 skipping to change at line 6688
F_UncompressingIStream() F_UncompressingIStream()
{ {
m_pIStream = NULL; m_pIStream = NULL;
m_pDict = NULL; m_pDict = NULL;
m_pucDecodeBuffer = NULL; m_pucDecodeBuffer = NULL;
} }
virtual ~F_UncompressingIStream() virtual ~F_UncompressingIStream()
{ {
close(); closeStream();
} }
RCODE FLMAPI open( RCODE FLMAPI openStream(
IF_IStream * pIStream); IF_IStream * pIStream);
RCODE FLMAPI read( RCODE FLMAPI read(
void * pvBuffer, void * pvBuffer,
FLMUINT uiBytesToRead, FLMUINT uiBytesToRead,
FLMUINT * puiBytesRead); FLMUINT * puiBytesRead);
RCODE FLMAPI close( void); RCODE FLMAPI closeStream( void);
private: private:
RCODE readCode( RCODE readCode(
FLMUINT16 * pui16Code); FLMUINT16 * pui16Code);
RCODE decodeToBuffer( RCODE decodeToBuffer(
FLMUINT16 ui16Code); FLMUINT16 ui16Code);
IF_IStream * m_pIStream; IF_IStream * m_pIStream;
skipping to change at line 6191 skipping to change at line 6721
FLMBYTE * m_pucDecodeBuffer; FLMBYTE * m_pucDecodeBuffer;
FLMUINT m_uiDecodeBufferSize; FLMUINT m_uiDecodeBufferSize;
FLMUINT m_uiDecodeBufferOffset; FLMUINT m_uiDecodeBufferOffset;
FLMUINT16 m_ui16FreeCode; FLMUINT16 m_ui16FreeCode;
FLMUINT16 m_ui16LastCode; FLMUINT16 m_ui16LastCode;
FLMBOOL m_bStopCompression; FLMBOOL m_bStopCompression;
FLMBOOL m_bEndOfStream; FLMBOOL m_bEndOfStream;
}; };
/******************************************************************* ******** /******************************************************************* ********
Desc: Dynamic Result Sets Desc: Dynamic result sets
******************************************************************** *******/ ******************************************************************** *******/
typedef int (* F_DYNSET_COMPARE_FUNC)( typedef int (* F_DYNSET_COMPARE_FUNC)(
void * pvData1, void * pvData1,
void * pvData2, void * pvData2,
void * pvUserData); void * pvUserData);
typedef enum typedef enum
{ {
ACCESS_HASH, ACCESS_HASH,
ACCESS_BTREE_LEAF, ACCESS_BTREE_LEAF,
ACCESS_BTREE_ROOT, ACCESS_BTREE_ROOT,
ACCESS_BTREE_NON_LEAF ACCESS_BTREE_NON_LEAF
} eDynRSetBlkTypes; } eDynRSetBlkTypes;
class F_FixedBlk : public F_Object class F_FixedBlk : public F_Object
{ {
public: public:
F_FixedBlk(); F_FixedBlk();
~F_FixedBlk()
virtual ~F_FixedBlk()
{ {
} }
/* virtual methods that must be implemented */
eDynRSetBlkTypes blkType() eDynRSetBlkTypes blkType()
{ {
return m_eBlkType; return m_eBlkType;
} }
virtual RCODE getCurrent( virtual RCODE getCurrent(
void * pvEntryBuffer) = 0; void * pvEntryBuffer) = 0;
virtual RCODE getFirst( virtual RCODE getFirst(
void * pvEntryBuffer) = 0; void * pvEntryBuffer) = 0;
skipping to change at line 6259 skipping to change at line 6788
void setCompareFunc( void setCompareFunc(
F_DYNSET_COMPARE_FUNC fnCompare, F_DYNSET_COMPARE_FUNC fnCompare,
void * pvUs erData) void * pvUs erData)
{ {
m_fnCompare = fnCompare; m_fnCompare = fnCompare;
m_pvUserData = pvUserData; m_pvUserData = pvUserData;
} }
protected: protected:
// Variables
F_DYNSET_COMPARE_FUNC m_fnCompare; F_DYNSET_COMPARE_FUNC m_fnCompare;
void * m_pvUserData ; void * m_pvUserData ;
eDynRSetBlkTypes m_eB lkType; eDynRSetBlkTypes m_eBlkType;
FLMUINT m_uiEntrySiz e; FLMUINT m_uiEntrySiz e;
FLMUINT m_uiNumSlots ; FLMUINT m_uiNumSlots ;
FLMUINT m_uiPosition ; FLMUINT m_uiPosition ;
FLMBOOL m_bDirty; FLMBOOL m_bDirty;
FLMBYTE * m_pucBlkBuf; FLMBYTE * m_pucBlkBuf;
}; };
class FLMEXP F_DynSearchSet : public F_Object class FLMEXP F_DynSearchSet : public F_Object
{ {
public: public:
F_DynSearchSet() F_DynSearchSet()
{ {
m_fnCompare = NULL; m_fnCompare = NULL;
m_pvUserData = NULL; m_pvUserData = NULL;
m_uiEntrySize = 0; m_uiEntrySize = 0;
m_pAccess = NULL; m_pAccess = NULL;
} }
~F_DynSearchSet() virtual ~F_DynSearchSet()
{ {
if (m_pAccess) if( m_pAccess)
{ {
m_pAccess->Release(); m_pAccess->Release();
} }
} }
RCODE FLMAPI setup( RCODE FLMAPI setup(
char * pszTmpDir, char * pszT
FLMUINT uiEntrySize); mpDir,
FLMUINT uiEn
trySize);
FINLINE void FLMAPI setCompareFunc( FINLINE void FLMAPI setCompareFunc(
F_DYNSET_COMPARE_FUNC fnCompare, F_DYNSET_COMPARE_FUNC fnCompare,
void * pvUserData void * pvUs
) erData)
{ {
m_fnCompare = fnCompare; m_fnCompare = fnCompare;
m_pvUserData = pvUserData; m_pvUserData = pvUserData;
m_pAccess->setCompareFunc( fnCompare, pvUserData); m_pAccess->setCompareFunc( fnCompare, pvUserData);
} }
RCODE FLMAPI addEntry( RCODE FLMAPI addEntry(
void * pvEntry); void * pvEn try);
FINLINE RCODE FLMAPI findMatch( FINLINE RCODE FLMAPI findMatch(
void * pvMatchEntry, void * pvMa
void * pvFoundEntry tchEntry,
) void * pvFo
undEntry)
{ {
return m_pAccess->search( pvMatchEntry, pvFoundEntry ); return m_pAccess->search( pvMatchEntry, pvFoundEntry );
} }
FINLINE FLMUINT FLMAPI getEntrySize( void) FINLINE FLMUINT FLMAPI getEntrySize( void)
{ {
return m_uiEntrySize; return m_uiEntrySize;
} }
FINLINE FLMUINT FLMAPI getTotalEntries( void) FINLINE FLMUINT FLMAPI getTotalEntries( void)
{ {
return m_pAccess->getTotalEntries(); return( m_pAccess->getTotalEntries());
} }
private: private:
// Variables
F_DYNSET_COMPARE_FUNC m_fnCompare; F_DYNSET_COMPARE_FUNC m_fnCompare;
void * m_pvUserData; void * m_pvUserData
FLMUINT m_uiEntrySize; ;
F_FixedBlk * m_pAccess; FLMUINT m_uiEntrySiz
char m_szFileName e;
[F_PATH_MAX_SIZE]; F_FixedBlk * m_pAccess;
char m_sz
FileName[ F_PATH_MAX_SIZE];
}; };
/******************************************************************* ******** /******************************************************************* ********
Desc: Hash tables Desc: Hash tables
******************************************************************** *******/ ******************************************************************** *******/
typedef struct typedef struct
{ {
void * pFirstInBucket; void * pFirstInBucket;
FLMUINT uiHashValue; FLMUINT uiHashValue;
} FBUCKET; } F_BUCKET;
RCODE FLMAPI f_allocHashTable( RCODE FLMAPI f_allocHashTable(
FLMUINT uiHashTblSize, FLMUINT uiHashTblSize,
FBUCKET ** ppHashTblRV); F_BUCKET ** ppHashTblRV);
FLMUINT FLMAPI f_strHashBucket( FLMUINT FLMAPI f_strHashBucket(
char * pszStr, char * pszStr,
FBUCKET * pHashTbl, F_BUCKET * pHashTbl,
FLMUINT uiNumBuckets); FLMUINT uiNumBuckets);
FLMUINT FLMAPI f_binHashBucket( FLMUINT FLMAPI f_binHashBucket(
void * pBuf, void * pBuf,
FLMUINT uiBufLen, FLMUINT uiBufLen,
FBUCKET * pHashTbl, F_BUCKET * pHashTbl,
FLMUINT uiNumBuckets); FLMUINT uiNumBuckets);
/*******************************************************************
********
Desc:
********************************************************************
*******/
class F_HashObject : virtual public F_Object
{
public:
#define F_INVALID_HASH_BUCKET (~((
FLMUINT)0))
F_HashObject()
{
m_pNextInBucket = NULL;
m_pPrevInBucket = NULL;
m_pNextInGlobal = NULL;
m_pPrevInGlobal = NULL;
m_uiHashBucket = F_INVALID_HASH_BUCKET;
m_ui32KeyCRC = 0;
m_uiTimeAdded = 0;
}
virtual ~F_HashObject()
{
flmAssert( !m_pNextInBucket);
flmAssert( !m_pPrevInBucket);
flmAssert( !m_pNextInGlobal);
flmAssert( !m_pPrevInGlobal);
flmAssert( !getRefCount());
}
virtual const void * FLMAPI getKey( void) = 0;
virtual FLMUINT FLMAPI getKeyLength( void) = 0;
FINLINE FLMUINT FLMAPI getKeyCRC( void)
{
return( m_ui32KeyCRC);
}
FINLINE FLMUINT FLMAPI getHashBucket( void)
{
return( m_uiHashBucket);
}
FINLINE F_HashObject * FLMAPI getNextInGlobal( void)
{
return( m_pNextInGlobal);
}
FINLINE F_HashObject * FLMAPI getNextInBucket( void)
{
return( m_pNextInBucket);
}
virtual FLMUINT FLMAPI getObjectType( void) = 0;
protected:
void setHashBucket(
FLMUINT uiHashBucket)
{
m_uiHashBucket = uiHashBucket;
}
F_HashObject * m_pNextInBucket;
F_HashObject * m_pPrevInBucket;
F_HashObject * m_pNextInGlobal;
F_HashObject * m_pPrevInGlobal;
FLMUINT m_uiHashBucket;
FLMUINT m_uiTimeAdded;
FLMUINT32 m_ui32KeyCRC;
friend class F_HashTable;
};
/*******************************************************************
********
Desc: Hash tables
********************************************************************
*******/
class F_HashTable : public F_Object
{
public:
F_HashTable();
virtual ~F_HashTable();
RCODE FLMAPI setupHashTable(
FLMBOOL bMultithreaded,
FLMUINT uiNumBuckets,
FLMUINT uiMaxObjects);
RCODE FLMAPI addObject(
F_HashObject * pObject,
FLMBOOL bAllowDuplicates = F
ALSE);
RCODE FLMAPI getNextObjectInGlobal(
F_HashObject ** ppObject);
RCODE FLMAPI getNextObjectInBucket(
F_HashObject ** ppObject);
RCODE FLMAPI getObject(
const void * pvKey,
FLMUINT uiKeyLen,
F_HashObject ** ppObject,
FLMBOOL bRemove = FALSE);
RCODE FLMAPI removeObject(
void * pvKey,
FLMUINT uiKeyLen);
RCODE FLMAPI removeObject(
F_HashObject * pObject);
void FLMAPI removeAllObjects( void);
void FLMAPI removeAgedObjects(
FLMUINT uiMaxAge);
FLMUINT FLMAPI getMaxObjects( void);
RCODE FLMAPI setMaxObjects(
FLMUINT uiMaxObjects);
private:
FLMUINT getHashBucket(
const void * pvKey,
FLMUINT uiLen,
FLMUINT32 * pui32KeyCRC = NULL);
void linkObject(
F_HashObject * pObject,
FLMUINT uiBucket);
void unlinkObject(
F_HashObject * pObject);
RCODE findObject(
const void * pvKey,
FLMUINT uiKeyLen,
F_HashObject ** ppObject);
F_MUTEX m_hMutex;
F_HashObject * m_pMRUObject;
F_HashObject * m_pLRUObject;
F_HashObject ** m_ppHashTable;
FLMUINT m_uiBuckets;
FLMUINT m_uiObjects;
FLMUINT m_uiMaxObjects;
};
/******************************************************************* ********* /******************************************************************* *********
Process ID Functions Desc: Process ID Functions
******************************************************************** ********/ ******************************************************************** ********/
FLMUINT f_getpid( void); FLMUINT f_getpid( void);
#endif // FTK_H #endif // FTK_H
 End of changes. 216 change blocks. 
510 lines changed or deleted 1341 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/