// $Source: /local/data/cvs/yellowbank/tile/qglobals.h,v $
// $Revision: 1.1.1.1 $
// $State: Exp $
// $Date: 2002/12/23 19:53:24 $
// $Author: yrp001 $
// $Locker:  $

// my global constants

#if !defined( _QGLOBALS_H_ )
#define _QGLOBALS_H_

// constants
const unsigned char	qtrue = 1;
const unsigned char	qfalse = 0;

// typedefs
typedef unsigned char	qbool;

typedef unsigned int uint;
typedef unsigned short int usint;

typedef unsigned char ubit; // bit.  unsigned, of course
typedef unsigned int uindex; // array index.  unsigned, of course

// assuming eight bit bytes
typedef unsigned char byte_1; // 256
typedef unsigned short int byte_2; // 65,536
typedef unsigned int byte_4; // 4,294,967,296
typedef unsigned long int byte_8; // 18,446,744,073,709,551,616

// simple functions
inline int is_odd( int v ) { return v & 1; }
inline int is_odd( unsigned int v ) { return v & 1; }
inline int is_even( int v ) {
  return( (is_odd( v ) - 1) * -1 );
}
inline int is_even( unsigned int v ) {
  return( (is_odd( v ) - 1) * -1 );
}

#endif


