Back to index

tetex-bin  3.0
c-minmax.h
Go to the documentation of this file.
00001 /* c-minmax.h: define INT_MIN, etc.  Assume a 32-bit machine if the
00002    values aren't defined.
00003 
00004 Copyright (C) 1992, 93 Free Software Foundation, Inc.
00005 
00006 This library is free software; you can redistribute it and/or
00007 modify it under the terms of the GNU Library General Public
00008 License as published by the Free Software Foundation; either
00009 version 2 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 Library General Public License for more details.
00015 
00016 You should have received a copy of the GNU Library 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 #ifndef KPATHSEA_C_MINMAX_H
00021 #define KPATHSEA_C_MINMAX_H
00022 
00023 #include <kpathsea/c-limits.h>
00024 
00025 /* Declared in <limits.h> on ANSI C systems.  If the system doesn't
00026    define it, we use the minimum ANSI values -- except for `int'; we
00027    assume 32-bit integers.  */
00028 
00029 #ifndef SCHAR_MIN
00030 #define SCHAR_MIN (-127)
00031 #endif
00032 #ifndef SCHAR_MAX
00033 #define SCHAR_MAX 128
00034 #endif
00035 #ifndef UCHAR_MAX
00036 #define UCHAR_MAX 255
00037 #endif
00038 
00039 #ifndef SHRT_MIN
00040 #define SHRT_MIN (-32767)
00041 #endif
00042 #ifndef SHRT_MAX
00043 #define SHRT_MAX 32767
00044 #endif
00045 #ifndef USHRT_MAX
00046 #define USHRT_MAX 65535
00047 #endif
00048 
00049 #ifndef INT_MIN
00050 #define INT_MIN (-2147483647)
00051 #endif
00052 #ifndef INT_MAX
00053 #define INT_MAX 2147483647
00054 #endif
00055 #ifndef UINT_MAX
00056 #define UINT_MAX 4294967295
00057 #endif
00058 
00059 #ifndef LONG_MIN
00060 #define LONG_MIN INT_MIN
00061 #endif
00062 #ifndef LONG_MAX
00063 #define LONG_MAX INT_MAX
00064 #endif
00065 #ifndef ULONG_MAX
00066 #define ULONG_MAX UINT_MAX
00067 #endif
00068 
00069 /* Declared in <float.h> on ANSI C systems.  */
00070 #ifndef DBL_MIN
00071 #define DBL_MIN 1e-37
00072 #endif
00073 #ifndef DBL_MAX
00074 #define DBL_MAX 1e+37
00075 #endif
00076 
00077 #ifndef FLT_MIN
00078 #define FLT_MIN 1e-37
00079 #endif
00080 #ifndef FLT_MAX
00081 #define FLT_MAX 1e+37
00082 #endif
00083 
00084 #endif /* not KPATHSEA_C_MINMAX_H */