Files
nethack/include/cstd.h
nhmall e8363ae23d include limits.h in cstd.h
Ensure the standard C99 values are available to the NetHack code base, so that
code/macros to accomplish essentially the same thing are not necessary.

    CHAR_BIT        Defines the number of bits in a byte.
    SCHAR_MIN       Defines the minimum value for a signed char.
    SCHAR_MAX       Defines the maximum value for a signed char.
    UCHAR_MAX       Defines the maximum value for an unsigned char.
    CHAR_MIN        Defines the minimum value for type char and its value will be equal to SCHAR_MIN if char represents negative values, otherwise zero.
    CHAR_MAX        Defines the value for type char and its value will be equal to SCHAR_MAX if char represents negative values, otherwise UCHAR_MAX.
    MB_LEN_MAX      Defines the maximum number of bytes in a multi-byte character.
    SHRT_MIN        Defines the minimum value for a short int.
    SHRT_MAX        Defines the maximum value for a short int.
    USHRT_MAX       Defines the maximum value for an unsigned short int.
    INT_MIN         Defines the minimum value for an int.
    INT_MAX         Defines the maximum value for an int.
    UINT_MAX        Defines the maximum value for an unsigned int.
    LONG_MIN        Defines the minimum value for a long int.
    LONG_MAX        Defines the maximum value for a long int.
    ULONG_MAX       Defines the maximum value for an unsigned long int.
2026-03-19 09:48:29 -04:00

69 lines
2.7 KiB
C

/* NetHack 3.7 cstd.h $NHDT-Date: 1725652996 2024/09/06 20:03:16 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.6 $ */
/*-Copyright (c) Robert Patrick Rankin, 2017. */
/* NetHack may be freely redistributed. See license for details. */
#ifndef CSTD_H
#define CSTD_H
/*
* The list of standard (C99 unless noted otherwise) header files:
*
* <assert.h> Conditionally compiled macro that calls abort if its
* argument evaluates to zero
* <complex.h> (C99) Complex number arithmetic
* <ctype.h> Functions to categorize single characters
* <errno.h> Macros reporting error conditions
* <fenv.h> (C99) Floating-point environment
* <float.h> Limits of floating-point types
* <inttypes.h> (C99) Format conversion of integer types
* <iso646.h> (C95) Alternative operator spellings
* <limits.h> Ranges of integer types
* <locale.h> Localization utilities
* <math.h> Common mathematics functions
* <setjmp.h> Nonlocal jumps
* <signal.h> Signal handling
* <stdarg.h> Variable arguments
* <stdbool.h> (C99) Macros for boolean type
* <stddef.h> Common macro definitions
* <stdint.h> (C99) Fixed-width integer types
* <stdio.h> Input/output program utilities
* <stdlib.h> General utilities: memory management,
* program utilities, string conversions,
* random numbers, algorithms
* <string.h> String handling
* <tgmath.h> (C99) Type-generic math (macros wrapping math.h and
* complex.h)
* <time.h> Time/date utilities
* <wchar.h> (C95) Extended multibyte and wide character utilities
* <wctype.h> (C95) Functions to categorize single wide character
* We watch these and try not to conflict with them, or make it tough to adopt
* these in future:
*
* <stdalign.h> (C11) alignas and alignof convenience macros
* <stdatomic.h> (C11) Atomic operations
* <stdbit.h> (C23) Macros to work with the byte and bit representations
* of types
* <stdckdint.h> (C23) Macros for performing checked integer arithmetic
* <stdnoreturn.h> (C11) noreturn convenience macro
* <threads.h> (C11) Thread library
* <uchar.h> (C11) UTF-16 and UTF-32 character utilities
*
*/
#if !defined(__cplusplus)
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <signal.h>
#include <assert.h>
#include <stdarg.h>
#include <ctype.h>
#include <time.h>
#include <limits.h>
#else /* !__cplusplus */
/* for FILE */
#include <stdio.h>
#endif /* !__cplusplus */
#endif /* CSTD_H */