limits.h revision 5
11539Srgrimes/* 21539Srgrimes * Copyright (c) 1988 The Regents of the University of California. 31539Srgrimes * All rights reserved. 41539Srgrimes * 51539Srgrimes * Redistribution and use in source and binary forms, with or without 61539Srgrimes * modification, are permitted provided that the following conditions 71539Srgrimes * are met: 81539Srgrimes * 1. Redistributions of source code must retain the above copyright 91539Srgrimes * notice, this list of conditions and the following disclaimer. 101539Srgrimes * 2. Redistributions in binary form must reproduce the above copyright 111539Srgrimes * notice, this list of conditions and the following disclaimer in the 121539Srgrimes * documentation and/or other materials provided with the distribution. 13203964Simp * 3. All advertising materials mentioning features or use of this software 141539Srgrimes * must display the following acknowledgement: 151539Srgrimes * This product includes software developed by the University of 161539Srgrimes * California, Berkeley and its contributors. 171539Srgrimes * 4. Neither the name of the University nor the names of its contributors 181539Srgrimes * may be used to endorse or promote products derived from this software 191539Srgrimes * without specific prior written permission. 201539Srgrimes * 211539Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 221539Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 231539Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 241539Srgrimes * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 251539Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 261539Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 271539Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 281539Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 291539Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 3069793Sobrien * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 311539Srgrimes * SUCH DAMAGE. 321539Srgrimes * 331539Srgrimes * @(#)limits.h 7.2 (Berkeley) 6/28/90 341539Srgrimes */ 351539Srgrimes 363041Swollman#define CHAR_BIT 8 /* number of bits in a char */ 373041Swollman#define CLK_TCK 60 /* ticks per second */ 381539Srgrimes#define MB_LEN_MAX 1 /* no multibyte characters */ 391539Srgrimes 401539Srgrimes#define SCHAR_MIN (-0x7f-1) /* max value for a signed char */ 41201258Sjilles#define SCHAR_MAX 0x7f /* min value for a signed char */ 42187969Sobrien 43187969Sobrien#define UCHAR_MAX 0xff /* max value for an unsigned char */ 441539Srgrimes#define CHAR_MAX 0x7f /* max value for a char */ 4587136Srwatson#define CHAR_MIN (-0x7f-1) /* min value for a char */ 461539Srgrimes 4787135Srwatson#define USHRT_MAX 0xffff /* max value for an unsigned short */ 4887135Srwatson#define SHRT_MAX 0x7fff /* max value for a short */ 491539Srgrimes#define SHRT_MIN (-0x7fff-1) /* min value for a short */ 5096194Sdes 511539Srgrimes#define UINT_MAX 0xffffffff /* max value for an unsigned int */ 5273986Sobrien#define INT_MAX 0x7fffffff /* max value for an int */ 531539Srgrimes#define INT_MIN (-0x7fffffff-1) /* min value for an int */ 5469793Sobrien 551539Srgrimes#define ULONG_MAX 0xffffffff /* max value for an unsigned long */ 5696194Sdes#define LONG_MAX 0x7fffffff /* max value for a long */ 573189Spst#define LONG_MIN (-0x7fffffff-1) /* min value for a long */ 58170527Ssimokawa