Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

ind_types.h File Reference

Define platform-independent types and other platform-specific support. More...

#include <limits.h>
#include <float.h>

Include dependency graph for ind_types.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Defines

#define True   1
#define False   0
#define Uninitialized   -1
#define NO_ERROR   0
#define MIN(x,y)    (((x) < (y)) ? (x) : (y))
#define MAX(x,y)    (((x) > (y)) ? (x) : (y))
#define INT_MAX   2147483647
#define INT_MIN   -2147483647
#define EXTERNAL_C_LINKAGE   extern "C"
 Put this before any external C functions called so that they will work with both C and C++. More...

#define ROUND(a)    (floor((0.5+(a))))
#define M_E   2.7182818284590452354
#define M_PI   3.14159265358979323846
#define M_PI_2   1.57079632679489661923
#define M_PI_4   0.78539816339744830962
#define swap_endian_proto(type)    type type ## _swap_endian(type num)

Typedefs

typedef char i8
typedef short i16
typedef long i32
typedef float f32
typedef double f64

Functions

int check_ind_types ( int warn_if_missing )
int endianness ( void )
 Returns 0 for little-endian, 1 for big-endian, and -1 for unknown. More...

 swap_endian_proto (i32)


Detailed Description

Define platform-independent types and other platform-specific support.

This file can be used on its own (i.e. without ind_types.c) if none of the actual functions defined in ind_types.c are used.

Header:
/u/nn/cvsroot/lissom/src/ind_types.h,v 1.27 2000/04/21 20:47:48 jbednar Exp

Definition in file ind_types.h.


Define Documentation

#define EXTERNAL_C_LINKAGE   extern "C"
 

Put this before any external C functions called so that they will work with both C and C++.

Definition at line 63 of file ind_types.h.

#define False   0
 

Definition at line 24 of file ind_types.h.

#define INT_MAX   2147483647
 

Definition at line 43 of file ind_types.h.

#define INT_MIN   -2147483647
 

Definition at line 48 of file ind_types.h.

#define MAX( x, y )   (((x) > (y)) ? (x) : (y))
 

Definition at line 38 of file ind_types.h.

#define MIN( x, y )   (((x) < (y)) ? (x) : (y))
 

Definition at line 35 of file ind_types.h.

#define M_E   2.7182818284590452354
 

Definition at line 159 of file ind_types.h.

#define M_PI   3.14159265358979323846
 

Definition at line 162 of file ind_types.h.

#define M_PI_2   1.57079632679489661923
 

Definition at line 165 of file ind_types.h.

#define M_PI_4   0.78539816339744830962
 

Definition at line 168 of file ind_types.h.

#define NO_ERROR   0
 

Definition at line 31 of file ind_types.h.

#define NO_I64
 

Definition at line 106 of file ind_types.h.

#define ROUND( a )   (floor((0.5+(a))))
 

Definition at line 131 of file ind_types.h.

#define True   1
 

Definition at line 21 of file ind_types.h.

#define Uninitialized   -1
 

Definition at line 28 of file ind_types.h.

#define swap_endian_proto( type )   type type ## _swap_endian(type num)
 

Definition at line 192 of file ind_types.h.


Typedef Documentation

typedef float f32
 

Definition at line 104 of file ind_types.h.

typedef double f64
 

Definition at line 105 of file ind_types.h.

typedef short i16
 

Definition at line 102 of file ind_types.h.

typedef long i32
 

Definition at line 103 of file ind_types.h.

typedef char i8
 

Definition at line 101 of file ind_types.h.


Function Documentation

int check_ind_types ( int warn_if_missing )
 

Definition at line 43 of file ind_types.c.

int endianness ( void )
 

Returns 0 for little-endian, 1 for big-endian, and -1 for unknown.

Many compilers (e.g. GCC) define a compile-time constant for endianness, but this routine allows it to be checked, and should work on most ordinary architectures

Definition at line 92 of file ind_types.c.


Generated at Mon Aug 21 00:31:02 2000 for RF-LISSOM by doxygen1.2.1 written by Dimitri van Heesch, © 1997-2000