Miscellaneous Definitions and Functions (original) (raw)

Defines
#define gan_eval(x) (x)
#define gan_heap_report(f) ((void) 0)
#define gan_heap_push() ((void) 0)
#define gan_heap_pop() ((void) 0)
#define M_SQRT1_2 0.70710678118654752440
#define M_SQRT2 1.41421356237309504880
#define M_SQRT3 1.73205080756887719317
#define M_PI 3.14159265358979323846
#define M_PI_2 1.57079632679489661923
#define M_LN2 0.69314718055994530942
#define GAN_ONE_THIRD 0.3333333333333333333333
#define GAN_ONE_THIRD_F 0.3333333333333333333333F
#define GAN_ONE_SIXTH 0.1666666666666666666666
#define GAN_ONE_SIXTH_F 0.1666666666666666666666F
#define powf(x, y) (float)pow((float)(x), (float)(y))
#define fabsf(x) (float)fabs((float)(x))
#define sqrtf(x) (float)sqrt((float)(x))
Enumerations
enum Gan_Bool { GAN_FALSE = 0, GAN_TRUE = 1 }
Boolean data type. More...
enum Gan_Type { GAN_CHAR, GAN_UCHAR, GAN_SHORT, GAN_USHORT, GAN_INT, GAN_UINT, GAN_LONG, GAN_ULONG, GAN_FLOAT, GAN_DOUBLE, GAN_LONGDOUBLE, GAN_STRING, GAN_BOOL, GAN_POINTER, GAN_UINT10, GAN_UINT12, GAN_UNDEFINED_TYPE }
labels for simple types used throughout Gandalf More...
Functions
const char * gan_type_string (Gan_Type type)
Generates a string identifier for an internal type.
void * memcpy (void *dest, const void *src, size_t n)
void gan_assert (Gan_Bool expr, const char *message)
Macro: Applies test and aborts program on false result with a message.
Variables
Gan_Bool gan_debug = GAN_FALSE
const size_t gan_type_sizes []
Array of sizes of simple types used in Gandalf.
const size_t gan_type_sizes []
array of sizeof()'s of each Gandalf type, one for each value in a Gan_Type
Gan_Bool gan_debug

Enumeration Type Documentation

| | Boolean data type. Enumeration values: GAN_FALSE Boolean false value. GAN_TRUE Boolean true value. | | --------------------------------------------------------------------------------------------------------------- |

| | labels for simple types used throughout Gandalf Enumeration values: GAN_CHAR signed character GAN_UCHAR unsigned character GAN_SHORT signed short integer GAN_USHORT unsigned short integer GAN_INT signed integer GAN_UINT unsigned integer GAN_LONG signed long integer GAN_ULONG unsigned long integer GAN_FLOAT single precision floating point GAN_DOUBLE double precision floating point GAN_LONGDOUBLE long double precision floating point GAN_STRING string (array of characters) GAN_BOOL boolean GAN_POINTER generic pointer GAN_UINT10 10-bit unsigned integer GAN_UINT12 12-bit unsigned integer | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |


Function Documentation

void gan_assert ( Gan_Bool expr,
const char * message
)

| | Macro: Applies test and aborts program on false result with a message. Parameters: expr The test expression to be evaluated message The message printed when the test fails **Returns:**No value.Evaluates a test expression and aborts the program if the expression expr evaluates as false, printing the given error message. Ignored if NDEBUG is defined. | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

const char * gan_type_string ( Gan_Type type )

| | Generates a string identifier for an internal type. Parameters: **Returns:**String identifier, e.g. "8-bit", or "" for unknown format. | | --------------------------------------------------------------------------------------------------------------------------------------------- |


Variable Documentation

| | Initial value:{ sizeof(char), sizeof(unsigned char), sizeof(short), sizeof(unsigned short), sizeof(int), sizeof(unsigned int), sizeof(long), sizeof(unsigned long), sizeof(float), sizeof(double), sizeof(long double), sizeof(char *), sizeof(Gan_Bool), sizeof(void *) } Array of sizes of simple types used in Gandalf. | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |


Generated on Fri Mar 17 12:44:54 2006 by doxygen 1.3.9.1