OSDN Git Service

touaTeX + Y&Y TeX.
[putex/putex.git] / src / texsourc / c-minmax.h
1 /* c-minmax.h: define INT_MIN, etc.  Assume a 32-bit machine if the
2    values aren't defined.
3
4    Copyright 1992 Karl Berry
5    Copyright 2007 TeX Users Group
6    Copyright 2014 Clerk Ma
7
8    This program is free software; you can redistribute it and/or modify
9    it under the terms of the GNU General Public License as published by
10    the Free Software Foundation; either version 2 of the License, or
11    (at your option) any later version.
12
13    This program is distributed in the hope that it will be useful, but
14    WITHOUT ANY WARRANTY; without even the implied warranty of
15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16    General Public License for more details.
17
18    You should have received a copy of the GNU General Public License
19    along with this program; if not, write to the Free Software
20    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21    02110-1301 USA.  */
22
23 #ifndef C_MINMAX_H
24 #define C_MINMAX_H
25
26 #include "c-limits.h"
27
28 /* Declared in <limits.h> on ANSI C systems.  If the system doesn't
29    define it, we use the minimum ANSI values -- except for `int'; we
30    assume 32-bit integers.  */
31
32 #ifndef SCHAR_MIN
33   #define SCHAR_MIN (-127)
34 #endif
35 #ifndef SCHAR_MAX
36   #define SCHAR_MAX 128
37 #endif
38 #ifndef UCHAR_MAX
39   #define UCHAR_MAX 255
40 #endif
41
42 #ifndef SHRT_MIN
43   #define SHRT_MIN (-32767)
44 #endif
45 #ifndef SHRT_MAX
46   #define SHRT_MAX 32767
47 #endif
48 #ifndef USHRT_MAX
49   #define USHRT_MAX 65535
50 #endif
51
52 #ifndef INT_MIN
53   #define INT_MIN (-2147483647)
54 #endif
55 #ifndef INT_MAX
56   #define INT_MAX 2147483647
57 #endif
58 #ifndef UINT_MAX
59   #define UINT_MAX 4294967295
60 #endif
61
62 #ifndef LONG_MIN
63   #define LONG_MIN INT_MIN
64 #endif
65 #ifndef LONG_MAX
66   #define LONG_MAX INT_MAX
67 #endif
68 #ifndef ULONG_MAX
69   #define ULONG_MAX UINT_MAX
70 #endif
71
72 /* Declared in <float.h> on ANSI C systems.  */
73 #ifndef DBL_MIN
74   #define DBL_MIN 1e-37
75 #endif
76 #ifndef DBL_MAX
77   #define DBL_MAX 1e+37
78 #endif
79
80 #ifndef FLT_MIN
81   #define FLT_MIN 1e-37
82 #endif
83 #ifndef FLT_MAX
84   #define FLT_MAX 1e+37
85 #endif
86
87 #endif /* not C_MINMAX_H */