gonzui


Format: Advanced Search

mtkernel_3/kernel/knlinc/limits.hbare sourcepermlink (0.02 seconds)

Search this content:

    1: /*
    2:  *----------------------------------------------------------------------
    3:  *    micro T-Kernel 3.00.00
    4:  *
    5:  *    Copyright (C) 2006-2019 by Ken Sakamura.
    6:  *    This software is distributed under the T-License 2.1.
    7:  *----------------------------------------------------------------------
    8:  *
    9:  *    Released by TRON Forum(http://www.tron.org) at 2019/12/11.
   10:  *
   11:  *----------------------------------------------------------------------
   12:  */
   13: 
   14: /*
   15:  *      limits.h
   16:  *
   17:  *      C language: integer size 
   18:  */
   19: 
   20: #ifndef _LIMITS_
   21: #define _LIMITS_
   22: 
   23: 
   24: #define CHAR_BIT        (8)
   25: #define SCHAR_MIN       (-128)
   26: #define SCHAR_MAX       (+127)
   27: #define UCHAR_MAX       (255)
   28: #define CHAR_MIN        SCHAR_MIN
   29: #define CHAR_MAX        SCHAR_MAX
   30: #define MB_LEN_MAX      (2)
   31: 
   32: #define SHRT_MIN        (-32768)
   33: #define SHRT_MAX        (+32767)
   34: #define USHRT_MAX       (65535)
   35: 
   36: #define LONG_MIN        (-2147483648L)
   37: #define LONG_MAX        (+2147483647L)
   38: #define ULONG_MAX       (4294967295L)
   39: 
   40: 
   41: #if INT_BITWIDTH == 16
   42: 
   43: #define INT_MIN         SHRT_MIN
   44: #define INT_MAX         SHRT_MAX
   45: #define UINT_MAX        USHRT_MAX
   46: 
   47: #else /* 32bit */
   48: 
   49: #define INT_MIN         LONG_MIN
   50: #define INT_MAX         LONG_MAX
   51: #define UINT_MAX        ULONG_MAX
   52: 
   53: #endif /* INT_BITWIDTH == 16 */
   54: #endif /* _LIMITS_ */