Main Page Modules Namespaces C++ Classes Compound List File List Index
TNL: private.h File Reference

# private.h File Reference

`#include <memory.h>`
`#include "gsm.h"`

## Data Structures

struct | gsm_state

## Defines

#define | INLINE
#define | GSM_MAGIC 0xD
#define | MIN_WORD (-32767 - 1)
#define | MAX_WORD 32767
#define | SASR(x, by) ((x) >> (by))
#define | SASL(x, by) ((x) << (by))
#define | GSM_MULT_R(a, b) (SASR( ((longword)(a) * (longword)(b)), 15 ))
#define | GSM_MULT(a, b) (SASR( ((longword)(a) * (longword)(b)), 15 ))
#define | GSM_ADD(a, b) (gsmword)((ltmp = (longword)(a) + (longword)(b)) >= MAX_WORD ? MAX_WORD : ltmp <= MIN_WORD ? MIN_WORD : ltmp)
#define | GSM_SUB(a, b) (gsmword)((ltmp = (longword)(a) - (longword)(b)) >= MAX_WORD ? MAX_WORD : ltmp <= MIN_WORD ? MIN_WORD : ltmp)
#define | GSM_ABS(a) (gsmword)((a) < 0 ? -(a) : (a))

## Typedefs

typedef long | gsmword
typedef long | longword

## Functions

INLINE gsmword | gsm_div (gsmword num, gsmword denum)

## Define Documentation

#define INLINE

#define GSM_MAGIC 0xD

#define MIN_WORD (-32767 - 1)

#define MAX_WORD 32767

#define SASR | ( | x,
|  | by |  | ) | ((x) >> (by))

#define SASL | ( | x,
|  | by |  | ) | ((x) << (by))

#define GSM_MULT_R | ( | a,
|  | b |  | ) | (SASR( ((longword)(a) * (longword)(b)), 15 ))

#define GSM_MULT | ( | a,
|  | b |  | ) | (SASR( ((longword)(a) * (longword)(b)), 15 ))

#define GSM_ADD | ( | a,
|  | b |  | ) | (gsmword)((ltmp = (longword)(a) + (longword)(b)) >= MAX_WORD ? MAX_WORD : ltmp <= MIN_WORD ? MIN_WORD : ltmp)

#define GSM_SUB | ( | a,
|  | b |  | ) | (gsmword)((ltmp = (longword)(a) - (longword)(b)) >= MAX_WORD ? MAX_WORD : ltmp <= MIN_WORD ? MIN_WORD : ltmp)

#define GSM_ABS | ( | a |  | ) | (gsmword)((a) < 0 ? -(a) : (a))

## Typedef Documentation

typedef long gsmword

typedef long longword

## Function Documentation

INLINE gsmword gsm_div | ( | gsmword | num,
|  | gsmword | denum |
| ) |  |  |