#ifndef types_H
#define types_H

/*OSLib---efficient, type-safe, transparent, extensible,
   register-safe A P I coverage of RISC O S*/
/*Copyright  1994 Jonathan Coxhead*/

/*
      OSLib is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 1, or (at your option)
   any later version.

      OSLib is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

      You should have received a copy of the GNU General Public License
   along with this programme; if not, write to the Free Software
   Foundation, Inc, 675 Mass Ave, Cambridge, MA 02139, U S A.
*/

/********************
 * Type definitions *
 ********************/
typedef unsigned int                            bits;
typedef int                                     bool;
typedef unsigned char                           byte;

/************************
 * Constant definitions *
 ************************/
#ifndef NULL
#define NULL                                    0
#endif
#ifndef FALSE
#define FALSE                                   ((bool) 0)
#endif
#ifndef TRUE
#define TRUE                                    ((bool) 1)
#endif
#ifndef NONE
#define NONE                                    0u
#endif
#ifndef ALL
#define ALL                                     (~0u)
#endif
#ifndef SKIP
#define SKIP                                    0
#endif
#ifndef _V
#define _V                                      0x10000000u
#endif
#ifndef _C
#define _C                                      0x20000000u
#endif
#ifndef _Z
#define _Z                                      0x40000000u
#endif
#ifndef _N
#define _N                                      0x80000000u
#endif
#ifndef ERROR
#define ERROR                                   (-2)
#endif
#ifndef UNKNOWN
#define UNKNOWN                                 1
#endif

/*********************
 * Macro definitions *
 *********************/

/*Macros that "change the language"*/
#define AS    .
#define ASREF ->
#define _     ,
#ifdef  __swi
#undef  __swi
#define __swi(x) extern
#endif

/*Macros that suppress compiler warnings*/
#define NOT_USED(x) {x = x;}
#define UNSET(x) {(void) &x;}

#endif
