libdap++  Updated for version 3.11.7
dods-limits.h
Go to the documentation of this file.
1 
2 // -*- mode: c++; c-basic-offset:4 -*-
3 
4 // This file is part of libdap, A C++ implementation of the OPeNDAP Data
5 // Access Protocol.
6 
7 // Copyright (c) 2002,2003 OPeNDAP, Inc.
8 // Author: James Gallagher <jgallagher@opendap.org>
9 //
10 // This library is free software; you can redistribute it and/or
11 // modify it under the terms of the GNU Lesser General Public
12 // License as published by the Free Software Foundation; either
13 // version 2.1 of the License, or (at your option) any later version.
14 //
15 // This library is distributed in the hope that it will be useful,
16 // but WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 // Lesser General Public License for more details.
19 //
20 // You should have received a copy of the GNU Lesser General Public
21 // License along with this library; if not, write to the Free Software
22 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 //
24 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
25 
26 // (c) COPYRIGHT URI/MIT 1996,1998,1999
27 // Please read the full copyright statement in the file COPYRIGHT_URI.
28 //
29 // Authors:
30 // jhrg,jimg James Gallagher <jgallagher@gso.uri.edu>
31 
32 // Limits for DAP2. Use these *instead* of <limits.h> since DAP2 needs to see
33 // the same values on all machines.
34 
35 #ifndef _dods_limits_h
36 #define _dods_limits_h
37 
38 #define DODS_CHAR_BIT 8
39 #define DODS_SCHAR_MIN -128
40 #define DODS_SCHAR_MAX 127
41 #define DODS_UCHAR_MAX 255U
42 #define DODS_UCHAR_MIN 0
43 
44 #define DODS_SHRT_MIN -32768
45 #define DODS_SHRT_MAX 32767
46 #define DODS_USHRT_MAX 65535U
47 
48 #define DODS_INT_MIN (-2147483647 - 1)
49 #define DODS_INT_MAX 2147483647
50 #define DODS_UINT_MAX 4294967295U
51 
52 #define DODS_LONG_MIN (-2147483647 - 1)
53 #define DODS_LONG_MAX 2147483647
54 #define DODS_ULONG_MAX 4294967295UL
55 
56 #define DODS_DBL_DIG 15 /* digits of precision of a "double" */
57 #define DODS_DBL_MAX 1.7976931348623157E+308 /* max decimal value of a */
58 /* "double" */
59 #define DODS_DBL_MIN 2.2250738585072014E-308 /* min decimal value of a */
60 /* "double" */
61 #define DODS_FLT_DIG 6 /* digits of precision of a "float" */
62 #define DODS_FLT_MAX 3.402823466E+38F /* max decimal value of a "float" */
63 #define DODS_FLT_MIN 1.175494351E-38F /* min decimal value of a "float" */
64 
65 /* This constant should not be used. */
66 #define DODS_MB_LEN_MAX 4
67 
68 #endif // _dods_limits_h