1 /*
2  *
3  *  Copyright (C) 1997-2001, OFFIS
4  *
5  *  This software and supporting documentation were developed by
6  *
7  *    Kuratorium OFFIS e.V.
8  *    Healthcare Information and Communication Systems
9  *    Escherweg 2
10  *    D-26121 Oldenburg, Germany
11  *
12  *  THIS SOFTWARE IS MADE AVAILABLE,  AS IS,  AND OFFIS MAKES NO  WARRANTY
13  *  REGARDING  THE  SOFTWARE,  ITS  PERFORMANCE,  ITS  MERCHANTABILITY  OR
14  *  FITNESS FOR ANY PARTICULAR USE, FREEDOM FROM ANY COMPUTER DISEASES  OR
15  *  ITS CONFORMITY TO ANY SPECIFICATION. THE ENTIRE RISK AS TO QUALITY AND
16  *  PERFORMANCE OF THE SOFTWARE IS WITH THE USER.
17  *
18  *  Module:  ofstd
19  *
20  *  Author:  Andreas Barth
21  *
22  *  Purpose:
23  *      Defines some C++ standard types that are not consistently
24  *      supported by all C++ Compilers
25  *
26  */
27 
28 #ifndef OFTYPES_H
29 #define OFTYPES_H
30 
31 #include "osconfig.h"    /* make sure OS specific configuration is included first */
32 
33 
34 #ifdef __CHAR_UNSIGNED__
35 typedef signed char     Sint8;
36 #else
37 typedef char            Sint8;
38 #endif
39 
40 typedef unsigned char   Uint8;
41 
42 #if SIZEOF_LONG == 8
43 typedef signed int      Sint32;
44 typedef unsigned int    Uint32;
45 #else
46 typedef signed long     Sint32;
47 typedef unsigned long   Uint32;
48 #endif
49 
50 typedef signed short    Sint16;
51 typedef unsigned short  Uint16;
52 
53 typedef float           Float32;    /* 32 Bit Floating Point Single */
54 typedef double          Float64;    /* 64 Bit Floating Point Double */
55 
56 
57 // Definition of type OFBool
58 
59 #ifdef HAVE_CXX_BOOL
60 
61 #define OFBool bool
62 #define OFTrue true
63 #define OFFalse false
64 
65 #else
66 
67 /** the boolean type used throughout the DCMTK project. Mapped to the
68  *  built-in type "bool" if the current C++ compiler supports it. Mapped
69  *  to int for old-fashioned compilers which do not yet support bool.
70  */
71 typedef int OFBool;
72 
73 #ifndef OFTrue
74 #define OFTrue (1)
75 #endif
76 
77 #ifndef OFFalse
78 #define OFFalse (0)
79 #endif
80 
81 #endif
82 #endif
83