136797Sbostic /* 236797Sbostic * Copyright (c) 1988 The Regents of the University of California. 336797Sbostic * All rights reserved. 436797Sbostic * 544541Sbostic * %sccs.include.redist.c% 636797Sbostic * 7*52899Sbostic * @(#)limits.h 7.4 (Berkeley) 03/09/92 836797Sbostic */ 936797Sbostic 1036797Sbostic #define CHAR_BIT 8 /* number of bits in a char */ 1136797Sbostic #define MB_LEN_MAX 1 /* no multibyte characters */ 1236797Sbostic 13*52899Sbostic #define CLK_TCK 60 /* ticks per second */ 14*52899Sbostic 15*52899Sbostic /* 16*52899Sbostic * According to ANSI (section 2.2.4.2), the values below must be usable by 17*52899Sbostic * #if preprocessing directives. Additionally, the expression must have the 18*52899Sbostic * same type as would an expression that is an object of the corresponding 19*52899Sbostic * type converted according to the integral promotions. The subtraction for 20*52899Sbostic * INT_MIN and LONG_MIN is so the value is not unsigned; 2147483648 is an 21*52899Sbostic * unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). 22*52899Sbostic * These numbers work for pcc as well. 23*52899Sbostic */ 2452898Sbostic #define SCHAR_MAX 127 /* min value for a signed char */ 2552898Sbostic #define SCHAR_MIN -128 /* max value for a signed char */ 2636797Sbostic 2752898Sbostic #define UCHAR_MAX 255 /* max value for an unsigned char */ 2852898Sbostic #define CHAR_MAX 127 /* max value for a char */ 29*52899Sbostic #define CHAR_MIN -128 /* min value for a char */ 3036797Sbostic 3152898Sbostic #define USHRT_MAX 65535 /* max value for an unsigned short */ 3252898Sbostic #define SHRT_MAX 32767 /* max value for a short */ 3352898Sbostic #define SHRT_MIN -32768 /* min value for a short */ 3436797Sbostic 3552898Sbostic #define UINT_MAX 4294967295 /* max value for an unsigned int */ 3652898Sbostic #define INT_MAX 2147483647 /* max value for an int */ 3752898Sbostic #define INT_MIN (-2147483647-1) /* min value for an int */ 3836797Sbostic 3952898Sbostic #define ULONG_MAX 4294967295 /* max value for an unsigned long */ 4052898Sbostic #define LONG_MAX 2147483647 /* max value for a long */ 4152898Sbostic #define LONG_MIN (-2147483647-1) /* min value for a long */ 42