limits.h

00001 /*  wcecompat: Windows CE C Runtime Library "compatibility" library.
00002  *
00003  *  Copyright (C) 2001-2002 Essemer Pty Ltd.  All rights reserved.
00004  *  http://www.essemer.com.au/
00005  *
00006  *  This library is free software; you can redistribute it and/or
00007  *  modify it under the terms of the GNU Lesser General Public
00008  *  License as published by the Free Software Foundation; either
00009  *  version 2.1 of the License, or (at your option) any later version.
00010  *
00011  *  This library is distributed in the hope that it will be useful,
00012  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  *  Lesser General Public License for more details.
00015  *
00016  *  You should have received a copy of the GNU Lesser General Public
00017  *  License along with this library; if not, write to the Free Software
00018  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019  */
00020 
00021 
00022 #ifndef __wcecompat__LIMITS_H__
00023 #define __wcecompat__LIMITS_H__
00024 
00025 #include "stddef.h"
00026 
00027 #ifdef __cplusplus
00028 extern "C" {
00029 #endif
00030 
00031 #define CHAR_BIT     8        /* number of bits in a char */
00032 #define SCHAR_MIN    (-128)        /* minimum signed char value */
00033 #define SCHAR_MAX    127        /* maximum signed char value */
00034 #define UCHAR_MAX    0xff        /* maximum unsigned char value */
00035 
00036 #ifndef _CHAR_UNSIGNED
00037 #define CHAR_MIN    SCHAR_MIN    /* mimimum char value */
00038 #define CHAR_MAX    SCHAR_MAX    /* maximum char value */
00039 #else
00040 #define CHAR_MIN    0
00041 #define CHAR_MAX    UCHAR_MAX
00042 #endif    /* _CHAR_UNSIGNED */
00043 
00044 #define MB_LEN_MAX  2        /* max. # bytes in multibyte char */
00045 #define SHRT_MIN    (-32768)    /* minimum (signed) short value */
00046 #define SHRT_MAX    32767     /* maximum (signed) short value */
00047 #define USHRT_MAX   0xffff    /* maximum unsigned short value */
00048 #define INT_MIN     (-2147483647 - 1) /* minimum (signed) int value */
00049 #define INT_MAX     2147483647    /* maximum (signed) int value */
00050 #define UINT_MAX    0xffffffff    /* maximum unsigned int value */
00051 #define LONG_MIN    (-2147483647L - 1) /* minimum (signed) long value */
00052 #define LONG_MAX    2147483647L    /* maximum (signed) long value */
00053 #define ULONG_MAX   0xffffffffUL    /* maximum unsigned long value */
00054 
00055 #if    _INTEGRAL_MAX_BITS >= 8
00056 #define _I8_MIN     (-127i8 - 1)    /* minimum signed 8 bit value */
00057 #define _I8_MAX     127i8        /* maximum signed 8 bit value */
00058 #define _UI8_MAX    0xffui8    /* maximum unsigned 8 bit value */
00059 #endif
00060 
00061 #if    _INTEGRAL_MAX_BITS >= 16
00062 #define _I16_MIN    (-32767i16 - 1)    /* minimum signed 16 bit value */
00063 #define _I16_MAX    32767i16    /* maximum signed 16 bit value */
00064 #define _UI16_MAX   0xffffui16    /* maximum unsigned 16 bit value */
00065 #endif
00066 
00067 #if    _INTEGRAL_MAX_BITS >= 32
00068 #define _I32_MIN    (-2147483647i32 - 1) /* minimum signed 32 bit value */
00069 #define _I32_MAX    2147483647i32 /* maximum signed 32 bit value */
00070 #define _UI32_MAX   0xffffffffui32 /* maximum unsigned 32 bit value */
00071 #endif
00072 
00073 #if    _INTEGRAL_MAX_BITS >= 64
00074 /* minimum signed 64 bit value */
00075 #define _I64_MIN    (-9223372036854775807i64 - 1)
00076 /* maximum signed 64 bit value */
00077 #define _I64_MAX      9223372036854775807i64
00078 /* maximum unsigned 64 bit value */
00079 #define _UI64_MAX      0xffffffffffffffffui64
00080 #endif
00081 
00082 #if    _INTEGRAL_MAX_BITS >= 128
00083 /* minimum signed 128 bit value */
00084 #define _I128_MIN    (-170141183460469231731687303715884105727i128 - 1)
00085 /* maximum signed 128 bit value */
00086 #define _I128_MAX      170141183460469231731687303715884105727i128
00087 /* maximum unsigned 128 bit value */
00088 #define _UI128_MAX      0xffffffffffffffffffffffffffffffffui128
00089 #endif
00090 
00091 #ifdef __cplusplus
00092 }
00093 #endif
00094 
00095 #endif /* __wcecompat__LIMITS_H__ */

Generated on Mon Jun 5 10:20:45 2006 for Intelligence.kdevelop by  doxygen 1.4.6