errno.h
errno.h
Header file defines a set of error codes represent different macros should be extended for the type int
integer constant expressions.
Macro library
Macros | Explanation |
---|---|
extern int errno | By setting the macro system calls, some library functions in the event of error indicates what went wrong. |
EDOM Domain Error | Represents a time domain error occurs, it is beyond the mathematical function-defined domains in the input parameters, errno is set to EDOM. |
ERANGE Range Error | Represents a range error occurs, it is beyond the range defined in the input parameters of mathematical functions, errno is set to ERANGE. |
limits.h
Macro library
The following values are implementation-specific, and is defined by #define command, these values are not less than the values given below.
Macros | value | Explanation |
---|---|---|
CHAR_BIT | 8 | Define the number of bits in a byte. |
SCHAR_MIN | -128 | The definition of a minimum symbol characters. |
SCHAR_MAX | 127 | Definition of a maximum of symbol characters. |
UCHAR_MAX | 255 | Define a maximum unsigned char. |
CHAR_MIN | 0 | Defined minimum value of type char, char indicates if negative, its value is equal to SCHAR_MIN, and 0 otherwise. |
CHAR_MAX | 127 | Defined maximum of type char, char indicates if negative, its value is equal to SCHAR_MAX, or equal UCHAR_MAX. |
MB_LEN_MAX | 1 | The maximum number of bytes defined in the multi-byte character. |
Sःhrit_mn | -32768 | Definition of a minimum short integer. |
SHRT_MAX | +32767 | Defines a maximum short integer. |
USHRT_MAX | 65535 | Define a maximum unsigned short integer. |
INT_MIN | -32768 | Definition of a minimum integer. |
INT_MAX | +32767 | Defining a maximum integer. |
UINT_MAX | 65535 | Define a maximum unsigned integer. |
LONG_MIN | -2147483648 | Definition of a minimum length integer. |
LONG_MAX | +2147483647 | Defines a maximum length integer. |
ULONG_MAX | 4294967295 | Unsigned long a defined maximum value. |
float.h
Macro library
The following values are implementation-specific, and through #define
defined instructions, these values are not less than the values given below. Please note that all instances FLT
refers to the type float
, DBL
refers to the type double
, LDBL
it refers to the type long double
.
Macros | Explanation |
---|---|
FLT_ROUNDS | Definition of the floating point addition of rounding modes, which can be any of the following values: -1-- not determine 0 - tends to zero 1-- to the nearest value of 2 - n tends to infinity 3 - tends to minus infinity |
FLT_RADIX 2 | This macro defines the base of the index indicated. Radix 2 for binary, decimal base 10, base 16 hexadecimal. |
FLT_MANT_DIG DBL_MANT_DIG LDBL_MANT_DIG |
These macros define the number of bits FLT_RADIX radix. |
FLT_DIG 6 DBL_DIG 10 LDBL_DIG 10 |
These macros will not change the decimal number is rounded maximum value (base 10). |
FLT_MIN_EXP DBL_MIN_EXP LDBL_MIN_EXP |
These macros negative integer value defines the minimum cardinality for the index during FLT_RADIX. |
FLT_MIN_10_EXP -37 DBL_MIN_10_EXP -37 LDBL_MIN_10_EXP -37 |
These macros define the exponential base of 10 is the minimum negative integer value. |
FLT_MAX_EXP DBL_MAX_EXP LDBL_MAX_EXP |
这些宏定义了基数为 FLT_RADIX 时的指数的最大整数值。 |
FLT_MAX_10_EXP +37 DBL_MAX_10_EXP +37 LDBL_MAX_10_EXP +37 |
这些宏定义了基数为 10 时的指数的最大整数值。 |
FLT_MAX 1E+37 DBL_MAX 1E+37 LDBL_MAX 1E+37 |
这些宏定义最大的有限浮点值。 |
FLT_EPSILON 1E-5 DBL_EPSILON 1E-9 LDBL_EPSILON 1E-9 |
这些宏定义了可表示的最小有效数字。 |
FLT_MIN 1E-37 DBL_MIN 1E-37 LDBL_MIN 1E-37 |
这些宏定义了最小的浮点值。 |
stdarg.h
库变量
变量 | 说明 |
---|---|
va_list | 这是一个适用于 va_start()、va_arg() 和 va_end() 这三个宏存储信息的类型。 |
库宏
宏 | 说明 |
---|---|
void va_start(va_list ap, last_arg) | 这个宏初始化 ap 变量,它与 va_arg 和 va_end 宏是一起使用的。last_arg 是最后一个传递给函数的已知的固定参数,即省略号之前的参数。 |
type va_arg(va_list ap, type) | 这个宏检索函数参数列表中类型为 type 的下一个参数。 |
void va_end(va_list ap) | 这个宏允许使用了 va_start 宏的带有可变参数的函数返回。如果在从函数返回之前没有调用 va_end,则结果为未定义。 |
stddef.h
库变量
变量 | 说明 |
---|---|
ptrdiff_t | 有符号整数类型,它是两个指针相减的结果。 |
size_t | 无符号整数类型,它是 sizeof 关键字的结果。 |
wchar_t | 是一个宽字符常量大小的整数类型。 |
库宏
宏 | 说明 |
---|---|
NULL | 是一个空指针常量的值。 |
offsetof(type, member-designator) | 生成一个类型为 size_t 的整型常量,它是一个结构成员相对于结构开头的字节偏移量。成员是由 member-designator 给定的,结构的名称是在 type 中给定的。 |