//
// base.h
// Base definitions
// F.J. Alberti
//
// FA   30/07/2001   Add uint8 type
// FA   29/08/2001   Add int64 and uint64 types for Windows
//
    
#ifndef _BASE_H_
#define _BASE_H_


// Base types

typedef unsigned char    uchar;
typedef uchar            uint8;
typedef uint8            byte;

typedef unsigned short   ushort;
typedef unsigned short   uint16;
typedef short            int16;

typedef unsigned int     uint;
typedef unsigned int     uint32;
typedef int              int32;

#if defined(_WIN32) || defined(__WIN32) || defined(WIN32) || defined(__WIN32__)
typedef __int64          int64;
typedef unsigned __int64 uint64;
#endif

typedef float          float32;


// Floating-point support
// Test MacOS compatibility
#define FSET(val, f)  {                 \
  float32 g = (f);                      \
  (val) = (*(int*)&g) & 0xfffffffe;     \
}
#define FGET(val)     (*(float32*)&(val))


#endif // base.h