1 /* types.h: general types 2 Copyright (C) 2000, 2001 Martin Weber 3 4 The author can be contacted at <martweb@gmx.net> 5 6 This program is free software; you can redistribute it and/or modify 7 it under the terms of the GNU General Public License as published by 8 the Free Software Foundation; either version 2 of the License, or 9 (at your option) any later version. 10 11 This program is distributed in the hope that it will be useful, 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 GNU General Public License for more details. 15 16 You should have received a copy of the GNU General Public License 17 along with this program; if not, write to the Free Software 18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 19 20 #ifndef TYPES_H 21 #define TYPES_H 22 23 #ifndef __cplusplus 24 /* Booleans. */ 25 #ifndef bool 26 typedef enum { false = 0, true = 1 } at_bool; 27 #else 28 #define at_bool bool 29 #endif 30 #else 31 #define at_bool bool 32 #endif 33 34 #ifdef __cplusplus 35 extern "C" { 36 #endif /* __cplusplus */ 37 38 /* The usual null-terminated string. */ 39 typedef char *at_string; 40 41 /* A generic pointer in ANSI C. */ 42 typedef void *at_address; 43 44 /* We use `real' for our floating-point variables. */ 45 typedef float at_real; 46 47 /* Cartesian points. */ 48 typedef struct _at_coord 49 { 50 unsigned short x, y; 51 } at_coord; 52 53 typedef struct _at_real_coord 54 { 55 at_real x, y, z; 56 } at_real_coord; 57 58 #ifdef __cplusplus 59 } 60 #endif /* __cplusplus */ 61 62 #endif /* not TYPES_H */ 63