All function prototypes, macros, and types in the ANSI library are contained in one or more of the following standard header files:
assert.h | inttypes.h(*) | signal.h | stdlib.h |
complex.h(*) | iso646.h(*) | stdarg.h | string.h |
ctype.h | limits.h | stdbool.h(*) | tgmath.h(*) |
errno.h | locale.h | stddef.h | time.h |
fenv.h(*) | math.h | stdint.h(*) | wchar.h(*) |
float.h | setjmp.h | stdio.h | wctype.h(*) |
Because a standard "function" may also be implemented as a macro, your source files should contain no other declaration of a function once the appropriate header file has been included.
Table 1-22 describes some commonly used types. The table also lists which header files define each type.
Table 1-22. Commonly used types | ||
Type | Purpose | Header files |
size_t | Used to express the size of an object as a number of bytes (generally equivalent to unsigned int) | stddef.h, stdio.h |
wchar_t | Used to hold multi-byte character codes, and large enough to represent the codes of all extended character sets | stdlib.h, wchar.h(*) |
wint_t(*) | An integer type used to represent wide characters, including the macro WEOF | wchar.h(*) |
ptrdiff_t | Used to represent the difference of two pointers (usually equivalent to int) | stddef.h |