ReactOS  0.4.14-dev-317-g96040ec
ftmisc.h File Reference
#include "inttypes.h"
Include dependency graph for ftmisc.h:

Go to the source code of this file.

Classes

struct  FT_MemoryRec_
 

Macros

#define FT_BEGIN_HEADER
 
#define FT_END_HEADER
 
#define FT_LOCAL_DEF(x)   static x
 
#define FT_MAKE_TAG(_x1, _x2, _x3, _x4)
 

Typedefs

typedef unsigned char FT_Byte
 
typedef signed int FT_Int
 
typedef unsigned int FT_UInt
 
typedef signed long FT_Long
 
typedef unsigned long FT_ULong
 
typedef signed long FT_F26Dot6
 
typedef int FT_Error
 
typedef struct FT_MemoryRec_FT_Memory
 
typedef void *(* FT_Alloc_Func) (FT_Memory memory, long size)
 
typedef void(* FT_Free_Func) (FT_Memory memory, void *block)
 
typedef void *(* FT_Realloc_Func) (FT_Memory memory, long cur_size, long new_size, void *block)
 
typedef struct FT_MemoryRec_ FT_MemoryRec
 
typedef int64_t FT_Int64
 

Functions

static FT_Long FT_MulDiv (FT_Long a, FT_Long b, FT_Long c)
 
static FT_Long FT_MulDiv_No_Round (FT_Long a, FT_Long b, FT_Long c)
 

Macro Definition Documentation

◆ FT_BEGIN_HEADER

#define FT_BEGIN_HEADER

Definition at line 34 of file ftmisc.h.

◆ FT_END_HEADER

#define FT_END_HEADER

Definition at line 35 of file ftmisc.h.

◆ FT_LOCAL_DEF

#define FT_LOCAL_DEF (   x)    static x

Definition at line 37 of file ftmisc.h.

◆ FT_MAKE_TAG

#define FT_MAKE_TAG (   _x1,
  _x2,
  _x3,
  _x4 
)
Value:
( ( (FT_ULong)_x1 << 24 ) | \
( (FT_ULong)_x2 << 16 ) | \
( (FT_ULong)_x3 << 8 ) | \
(FT_ULong)_x4 )
unsigned long FT_ULong
Definition: ftmisc.h:46

Definition at line 50 of file ftmisc.h.

Typedef Documentation

◆ FT_Alloc_Func

typedef void*(* FT_Alloc_Func) (FT_Memory memory, long size)

Definition at line 61 of file ftmisc.h.

◆ FT_Byte

typedef unsigned char FT_Byte

Definition at line 42 of file ftmisc.h.

◆ FT_Error

typedef int FT_Error

Definition at line 48 of file ftmisc.h.

◆ FT_F26Dot6

Definition at line 47 of file ftmisc.h.

◆ FT_Free_Func

typedef void(* FT_Free_Func) (FT_Memory memory, void *block)

Definition at line 64 of file ftmisc.h.

◆ FT_Int

typedef signed int FT_Int

Definition at line 43 of file ftmisc.h.

◆ FT_Int64

typedef int64_t FT_Int64

Definition at line 93 of file ftmisc.h.

◆ FT_Long

typedef signed long FT_Long

Definition at line 45 of file ftmisc.h.

◆ FT_Memory

Definition at line 59 of file ftmisc.h.

◆ FT_MemoryRec

◆ FT_Realloc_Func

typedef void*(* FT_Realloc_Func) (FT_Memory memory, long cur_size, long new_size, void *block)

Definition at line 67 of file ftmisc.h.

◆ FT_UInt

typedef unsigned int FT_UInt

Definition at line 44 of file ftmisc.h.

◆ FT_ULong

typedef unsigned long FT_ULong

Definition at line 46 of file ftmisc.h.

Function Documentation

◆ FT_MulDiv()

static FT_Long FT_MulDiv ( FT_Long  a,
FT_Long  b,
FT_Long  c 
)
static

Definition at line 99 of file ftmisc.h.

102  {
103  FT_Int s;
104  FT_Long d;
105 
106 
107  s = 1;
108  if ( a < 0 ) { a = -a; s = -1; }
109  if ( b < 0 ) { b = -b; s = -s; }
110  if ( c < 0 ) { c = -c; s = -s; }
111 
112  d = (FT_Long)( c > 0 ? ( (FT_Int64)a * b + ( c >> 1 ) ) / c
113  : 0x7FFFFFFFL );
114 
115  return ( s > 0 ) ? d : -d;
116  }
signed long FT_Long
Definition: fttypes.h:242
signed int FT_Int
Definition: fttypes.h:220
#define a
Definition: ke_i.h:78
#define b
Definition: ke_i.h:79
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
#define d
Definition: ke_i.h:81
const GLubyte * c
Definition: glext.h:8905
static const WCHAR L[]
Definition: oid.c:1250
GLdouble s
Definition: gl.h:2039
signed long FT_Long
Definition: ftmisc.h:45
#define c
Definition: ke_i.h:80
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204

◆ FT_MulDiv_No_Round()

static FT_Long FT_MulDiv_No_Round ( FT_Long  a,
FT_Long  b,
FT_Long  c 
)
static

Definition at line 120 of file ftmisc.h.

123  {
124  FT_Int s;
125  FT_Long d;
126 
127 
128  s = 1;
129  if ( a < 0 ) { a = -a; s = -1; }
130  if ( b < 0 ) { b = -b; s = -s; }
131  if ( c < 0 ) { c = -c; s = -s; }
132 
133  d = (FT_Long)( c > 0 ? (FT_Int64)a * b / c
134  : 0x7FFFFFFFL );
135 
136  return ( s > 0 ) ? d : -d;
137  }
signed long FT_Long
Definition: fttypes.h:242
signed int FT_Int
Definition: fttypes.h:220
#define a
Definition: ke_i.h:78
#define b
Definition: ke_i.h:79
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
#define d
Definition: ke_i.h:81
const GLubyte * c
Definition: glext.h:8905
static const WCHAR L[]
Definition: oid.c:1250
GLdouble s
Definition: gl.h:2039
signed long FT_Long
Definition: ftmisc.h:45
#define c
Definition: ke_i.h:80
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204