Defines

From ATIRE

Jump to: navigation, search

Meanings

ANT_HAS_BZLIB True by default. ATIRE is distributed with a verison of libbzip2 the bz2 compression library in the external directories. The build process compiles this library along with others and the ATIRE code base on a clean build. If bz2 compression is not needed then undefine this constant in the makefile.

ANT_HAS_ZLIB True by default. ATIRE is distributed with a verison of the zlib zip (deflate) compression library in the external directories. The build process compiles this library along with others and the ATIRE code base on a clean build. If deflate compression is not needed then undefine this constant in the makefile.


The following are the unique #if and #ifdefs in the source code that aren't related to versions of compilers.

#if defined (ANT_HAS_MYSQL) || defined (ANT_HAS_XPDF)
#if defined(DEBUG) || defined(_DEBUG)
#if defined(UNICODE) || defined(_UNICODE)
#ifdef ALLOW_ZERO
#ifdef ANT_HAS_BZLIB
#ifdef ANT_HAS_LOVINS
#ifdef ANT_HAS_LZO
#ifdef ANT_HAS_MYSQL
#ifdef ANT_HAS_PAICE_HUSK
#ifdef ANT_HAS_SNAPPYLIB
#ifdef ANT_HAS_XPDF
#ifdef ANT_HAS_ZLIB
#ifdef DIRECT_MEMORY_READ
#ifdef IMPACT_HEADER
#ifdef LARGE_MEMORY_PAGES
#ifdef NT_CRITICAL_SECTIONS
#ifdef NT_EVENTS
#ifdef PARALLEL_INDEXING
#ifdef PARALLEL_INDEXING_DOCUMENTS
#ifdef PRINT_TIME_NO_CONVERSION
#ifdef SPECIAL_COMPRESSION
#ifdef TERM_LOCAL_MAX_IMPACT
#ifdef TWO_D_ACCUMULATORS
#ifdef TWO_D_ACCUMULATORS_POW2_WIDTH
#ifdef UNIT_TEST
#ifdef USE_FLOATED_TF
#ifndef ANT_HAS_ZLIB
#ifndef FALSE
#ifndef FIONREAD
#ifndef LARGE_MEMORY_PAGES
#ifndef NULL 
#ifndef TOP_K_READ_AND_DECOMPRESSOR
#ifndef TRUE

The following are the unique #define's that exist in the source code

#define  stemhash(word, hval){ unsigned short int ptr[6]; strncpy((char *)ptr, word, 12); hval = ((ptr[0]<<4)^ptr[1]^ptr[2]^ptr[3]^ptr[4]^ptr[5]) % stemhtsize; }
#define ANT_COMPATIBLE_WITH_LZOP_VERSION 0x1030     /* the version of LZOP this code is compatible with */
#define BITNESS "32" 
#define BITNESS "64" 
#define BITNESS "Unknown"
#define BITS_PER_WORD 64        // 64 bits to a word 
#define CARRY_BLOCK_ENCODE_START(n, max_bits)                               \    
#define DEBUGNESS " DEBUGGING-build"
#define DEBUGNESS ""
#define DISK_BUFFER_SIZE (10 * 1024 * 1024)
#define EOS     '\0' 
#define FALSE 0
#define FIONREAD I_NREAD
#define GET_TRANS_TABLE(avail) avail < 2? (avail = 30, __pc30) : (avail -= 2, __pc32)
#define GetLargePageMinimum() (4096)
#define HANDLE_STACK_SIZE (PATH_MAX / 2)        /* because every second char must be a '\' */
#define INVALID_SOCKET (-1) 
#define LZOP_ADLER32_C     0x0002
#define LZOP_ADLER32_D     0x0001
#define LZOP_CRC32_C       0x0200
#define LZOP_CRC32_D       0x0100
#define LZOP_EXTRA_FIELD   0x0040
#define LZOP_FILTER        0x0800
#define LZOP_MULTIPART     0x0400
#define MAX_ELEM_PER_WORD       64   
#define MAX_ENDING_SIZE 11
#define MAX_FREQUENCY 16383
#define MIN_STEM_LENGTH 2
#define NT_CRITICAL_SECTIONS
#define NT_EVENTS
#define NULL 0
#define PATH_MAX MAX_PATH
#define PREDEFINED_SIZE (MAX_ENDING_SIZE + MIN_STEM_LENGTH)
#define PURIFYNESS " PURIFY"
#define PURIFYNESS ""
#define SACROSANCT_CHARS 2
#define SACROSANCT_CHARS 3
#define SOCKET_ERROR (-1) 
#define TMP_BUFFER_SIZE 255
#define TRUE (!FALSE)
#define WORD_ENCODE(x,b)                                                    \    
#define WORD_ENCODE_WRITE                                                   \    
#define _USE_MATH_DEFINES
#define blank '?'               /* For when replace string is empty */
#define closesocket ::close
#define dont_stop 1             /* Continue with next rule */
#define ends_in(s) ends(s, (int)strlen(s))  /* s must be a string constant */
#define final_c    (word[k])   /* the last character of word */
#define ioctlsocket ::ioctl
#define maxlinelength 80        /* Maximun length of line read from file */
#define notapply 0          /* Rule did not apply */
#define notintact 3             /* Word no longer intact */
#define penult_c   (word[k-1]) /* the penultimate character of word */
#define sched_yield()  thr_yield()
#define sem_destroy(s) sema_destroy(s)
#define sem_init(x, y, z)    sema_init(x, y, z, NULL)
#define sem_post(s)    sema_post(s)
#define sem_trywait(s) sema_trywait(s)
#define sem_wait(s)    sema_wait(s)
#define setsuffix(s) setsuff(s, (int)strlen(s)) /* s must be a string constant */
#define stemlength (j + 1)     /* length of stem within word (not an lvalue) */
#define stop 2              /* Stop here */
#define unlink _unlink
#define wordlength (k + 1)     /* the length of word (not an lvalue) */