File: exult_types.h

package info (click to toggle)
exult 1.2-15.2
  • links: PTS, VCS
  • area: contrib
  • in suites: wheezy
  • size: 8,656 kB
  • sloc: cpp: 99,373; sh: 7,324; ansic: 4,659; makefile: 991; yacc: 769; lex: 313; xml: 19
file content (71 lines) | stat: -rwxr-xr-x 1,898 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/*
 *  Copyright (C) 2000-2001  The Exult Team
 *
 *  This program 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 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program 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 program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */

#ifndef	EXULT_TYPES_H
#define	EXULT_TYPES_H

#ifdef BEOS
// BeOS headers already define these types
#include <be/support/SupportDefs.h>
typedef int8 sint8;
typedef int16 sint16;
typedef int32 sint32;

#else

#ifndef EX_TYPE_INT8
#  define EX_TYPE_INT8 char /* guaranteed by ISO */
#endif

#ifndef EX_TYPE_INT16
#  if (SIZEOF_SHORT == 2)
#    define EX_TYPE_INT16 short
#  elif (SIZEOF_INT == 2)
#    define EX_TYPE_INT16 int
#  else
#    error "Please make sure a 16 bit type is provided by exult_types.h"
#  endif
#endif /* !EX_TYPE_INT16 */


#ifndef EX_TYPE_INT32
#  if (SIZEOF_INT == 4)
#    define EX_TYPE_INT32 int
#  elif (SIZEOF_LONG == 4)
#    define EX_TYPE_INT32 long
#  elif (SIZEOF_LONG_LONG == 4)
#    define EX_TYPE_INT32 long long
#  else
#    error "Please make sure a 32 bit type is provided by exult_types.h"
#  endif
#endif /* !EX_TYPE_INT32 */


typedef	unsigned EX_TYPE_INT8	uint8;
typedef	unsigned EX_TYPE_INT16	uint16;
typedef	unsigned EX_TYPE_INT32	uint32;

typedef	signed EX_TYPE_INT8		sint8;
typedef	signed EX_TYPE_INT16	sint16;
typedef	signed EX_TYPE_INT32	sint32;


#endif //BeOS

#endif