Tesseract  3.02
tesseract-ocr/ccutil/host.h File Reference
#include "platform.h"

Go to the source code of this file.

Defines

#define __NATIVE__   INTEL
#define INT32FORMAT   "%d"
#define INT64FORMAT   "%lld"
#define MAX_INT8   0x7f
#define MAX_INT16   0x7fff
#define MAX_INT32   0x7fffffff
#define MAX_UINT8   0xff
#define MAX_UINT16   0xffff
#define MAX_UINT32   0xffffffff
#define MAX_FLOAT32   ((float)3.40282347e+38)
#define MIN_INT8   0x80
#define MIN_INT16   0x8000
#define MIN_INT32   0x80000000
#define MIN_UINT8   0x00
#define MIN_UINT16   0x0000
#define MIN_UINT32   0x00000000
#define MIN_FLOAT32   ((float)1.17549435e-38)
#define TRUE   1
#define FALSE   0
#define NULL   0L

Typedefs

typedef SIGNED char inT8
typedef unsigned char uinT8
typedef short inT16
typedef unsigned short uinT16
typedef int inT32
typedef unsigned int uinT32
typedef long long int inT64
typedef unsigned long long int uinT64
typedef float FLOAT32
typedef double FLOAT64
typedef unsigned char BOOL8

Functions

template<class T >
bool NearlyEqual (T x, T y, T tolerance)

Define Documentation

#define __NATIVE__   INTEL

Definition at line 98 of file host.h.

#define FALSE   0

Definition at line 146 of file host.h.

#define INT32FORMAT   "%d"

Definition at line 121 of file host.h.

#define INT64FORMAT   "%lld"

Definition at line 122 of file host.h.

#define MAX_FLOAT32   ((float)3.40282347e+38)

Definition at line 130 of file host.h.

#define MAX_INT16   0x7fff

Definition at line 125 of file host.h.

#define MAX_INT32   0x7fffffff

Definition at line 126 of file host.h.

#define MAX_INT8   0x7f

Definition at line 124 of file host.h.

#define MAX_UINT16   0xffff

Definition at line 128 of file host.h.

#define MAX_UINT32   0xffffffff

Definition at line 129 of file host.h.

#define MAX_UINT8   0xff

Definition at line 127 of file host.h.

#define MIN_FLOAT32   ((float)1.17549435e-38)

Definition at line 138 of file host.h.

#define MIN_INT16   0x8000

Definition at line 133 of file host.h.

#define MIN_INT32   0x80000000

Definition at line 134 of file host.h.

#define MIN_INT8   0x80

Definition at line 132 of file host.h.

#define MIN_UINT16   0x0000

Definition at line 136 of file host.h.

#define MIN_UINT32   0x00000000

Definition at line 137 of file host.h.

#define MIN_UINT8   0x00

Definition at line 135 of file host.h.

#define NULL   0L

Definition at line 150 of file host.h.

#define TRUE   1

Definition at line 142 of file host.h.


Typedef Documentation

typedef unsigned char BOOL8

Definition at line 119 of file host.h.

typedef float FLOAT32

Definition at line 117 of file host.h.

typedef double FLOAT64

Definition at line 118 of file host.h.

typedef short inT16

Definition at line 106 of file host.h.

typedef int inT32

Definition at line 108 of file host.h.

typedef long long int inT64

Definition at line 114 of file host.h.

typedef SIGNED char inT8

Definition at line 104 of file host.h.

typedef unsigned short uinT16

Definition at line 107 of file host.h.

typedef unsigned int uinT32

Definition at line 109 of file host.h.

typedef unsigned long long int uinT64

Definition at line 115 of file host.h.

typedef unsigned char uinT8

Definition at line 105 of file host.h.


Function Documentation

template<class T >
bool NearlyEqual ( x,
y,
tolerance 
)

Definition at line 154 of file host.h.

                                                          {
  T diff = x - y;
  return diff <= tolerance && -diff <= tolerance;
}