home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / octa21fs.zip / octave / kpathsea / c-minmax.h < prev    next >
C/C++ Source or Header  |  2000-01-15  |  2KB  |  85 lines

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