ANSI C标准库和POSIX库--转载

ANSI C
POSIX库(标准C库除外)
ANSI C headers
assert.h
stddef.h
stdbool.h
stdint.h
stdarg.h
stdio.h
stdlib.h
string.h
time.h
math.h
errno.h
ctype.h
wctype.h
wchar.h
uchar.h
ANSI C
Contains the assert macro, used to assist with detecting logical errors and other types of bug in debugging versions of a program.
C99 A set of functions for manipulating complex numbers.
Defines set of functions used to classify characters by their types or to convert between upper and lower case in a way that is independent of the used character set (typically ASCII or one of its extensions, although implementations utilizing EBCDIC are also known).
For testing error codes reported by library functions.
C99 Defines a set of functions for controlling floating-point environment.
Defines macro constants specifying the implementation-specific properties of the floating-point library.
C99 Defines exact width integer types.
NA1 Defines several macros that implement alternative ways to express several standard tokens. For programming in ISO 646 variant character sets.
Defines macro constants specifying the implementation-specific properties of the integer types.
Defines localization functions.
Defines common mathematical functions.
Declares the macros setjmp and longjmp, which are used for non-local exits.
Defines signal handling functions.
C11 For querying and specifying the alignment of objects.
For accessing a varying number of arguments passed to functions.
C11 For atomic operations on data shared between threads.
C99 Defines a boolean data type.
Defines several useful types and macros.
C99 Defines exact width integer types.
Defines core input and output functions
Defines numeric conversion functions, pseudo-random numbers generation functions, memory allocation, process control functions
C11 For specifying non-returning functions.
Defines string handling functions.
C99 Defines type-generic mathematical functions.
C11 Defines functions for managing multiple Threads as well as mutexes and condition variables.
Defines date and time handling functions
C11 Types and functions for manipulating Unicode characters.
NA1 Defines wide string handling functions.
NA1 Defines set of functions used to classify wide characters by their types or to convert between upper and lower case
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
POSIX库(标准C库除外)
Asynchronous input and output Issue 5
Functions for manipulating numeric IP addresses (part of Berkeley sockets) Issue 6
Verify assumptions ??
Complex Arithmetic, see C mathematical functions ??
Magic numbers for the cpio archive format Issue 3
Allows the opening and listing of directories Issue 2
Dynamic linking Issue 5
Retrieving Error Number ??
File opening, locking and other operations Issue 1
Floating-Point Environment (FPE), see C mathematical functions ??
Floating-point types, see C data types ??
Message display structures Issue 4
Filename matching Issue 4
File tree traversal Issue 1
Pathname “globbing” (pattern-matching) Issue 4
User group information and control Issue 1
Codeset conversion facility Issue 4
Fixed sized integer types, see C data types ??
Alternative spellings, see C alternative tokens ??
Language information constants – builds on C localization functions Issue 2
Pathname manipulation Issue 4
Implementation-defined constants, see C data types ??
Category macros, see C localization functions ??
Mathematical declarations, see C mathematical functions ??
String formatting of monetary units Issue 4
Message queue Issue 5
NDBM database operations Issue 4
Listing of local network interfaces Issue 6
Translating protocol and host names into numeric addresses (part of Berkeley sockets) Issue 6
Defines Internet protocol and address family (part of Berkeley sockets) Issue 6
Additional TCP control options (part of Berkeley sockets) Issue 6
Localization message catalog functions Issue 2
Asynchronous file descriptor multiplexing Issue 4
Defines an API for creating and manipulating POSIX threads Issue 5
passwd (user information) access and control Issue 1
Regular expression matching Issue 4
Execution scheduling Issue 5
Search tables Issue 1
POSIX semaphores Issue 5
Stack environment declarations ??
Signals, see C signal handling ??
Process spawning Issue 6
Handle Variable Argument List ??
Boolean type and values, see C data types ??
Standard type definitions, see C data types ??
Integer types, see C data types ??
Standard buffered input/output, see C file input/output ??
Standard library definitions, see C standard library ??
Several String Operations, see C string handling ??
Case-insensitive string comparisons Issue 4
Stream manipulation, including ioctl Issue 4
Inter-process communication (IPC) Issue 2
Memory management, including POSIX shared memory and memory mapped files Issue 4
POSIX message queues Issue 2
Resource usage, priorities, and limiting Issue 4
Synchronous I/O multiplexing Issue 6
XSI (SysV style) semaphores Issue 2
XSI (SysV style) shared memory Issue 2
Main Berkley sockets header Issue 6
File information (stat et al.) Issue 1
File System information Issue 4
Time and date functions and structures Issue 4
File access and modification times Issue 1
Various data types used elsewhere Issue 1
Vectored I/O operations Issue 4
Unix domain sockets Issue 6
Operating system information, including uname Issue 1
Status of terminated child processes (see wait) Issue 3
System error logging Issue 4
Magic numbers for the tar archive format Issue 3
Allows terminal I/O interfaces Issue 3
Type-Generic Macros, see C mathematical functions ??
Type-Generic Macros, see C date and time functions ??
Tracing of runtime behavior (DEPRECATED) Issue 6
Resource limiting (DEPRECATED in favor of ) Issue 1
Various essential POSIX functions and constants Issue 1
inode access and modification times Issue 3
User accounting database functions Issue 4
Wide-Character Handling, see C string handling ??
Wide-Character Classification and Mapping Utilities, see C character classification ??
Word-expansion like the shell would perform
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
ANSI C headers
assert.h
#ifdef NDEBUG
#define assert(expr)
#else // _DEBUG
#define assert(expr)
((expr)
? (void) (0)
: __assert_failed(__STRING(expr), FILE, LINE, FUNCTION))
#endif
1
2
3
4
5
6
7
8
stddef.h
typedef int wchar_t;
typedef long unsigned int size_t;
typedef long ssize_t;
typedef long int ptrdiff_t;
#ifdef __cplusplus
#define NULL ((void*)0)
#else
#define NULL 0
#endif
typedef decltype(nullptr) nullptr_t; //c++11
1
2
3
4
5
6
7
8
9
10
stdbool.h
#define bool bool
#define true 1
#define false 0
1
2
3
stdint.h
typedef char int8_t;
typedef unsigned char uint8_t;
typedef short int16_t;
typedef unsigned short uint16_t;
typedef int int32_t;
typedef unsigned int uint32_t;
typedef long long int64_t;
typedef unsigned long long uint64_t;
#if __WORDSIZE == 64
typedef long int intptr_t;
typedef unsigned long int uintptr_t;
#else
typedef int intptr_t;
typedef unsigned int uintptr_t;
#endif
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
stdarg.h
va_list
va_start
va_arg
va_end
1
2
3
4
stdio.h
stdin stdout stderr FILE* char*
scanf printf perror fscanf,fprintf sscanf,sprintf,snprintf
vscanf vprintf vfscanf,vfprintf vsscanf,vsprintf,vsnprintf
getchar putchar getc,putc,fgetc,fputc
gets puts fgets,fputs
fopen
fclose
fread
fwrite
fseek
ftell

fflush
freopen
fgetpos
fsetpos
rewind

remove
rename
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
stdlib.h
srandom
random

getenv
putenv

abort
exit
atexit

system

malloc
calloc
ralloc
free

atoi
atol
atof

strtol
strtoll
strtoul
strtoull
strtof
strtod

abs
div

mblen
mbtowc
wctomb
mbstowcs
wcstombs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
string.h
memset
memcpy
memcmp
memmove
memchr

strlen
strcpy
strncpy
strcat
strncat
strcmp
strncmp

strchr
strrchr
strstr
strcspn
strspn
strpbrk
strtok

strerror
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
time.h
clock

time
localtime
gmtime

mktime
ctime
asctime
strftime
1
2
3
4
5
6
7
8
9
10
math.h
sin
cos
tan
asin
acos
atan

sqrt
pow
exp
log

ceil
floor
round
trunc

NAN
HUGE_VAL
INFINITE
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
errno.h
#ifndef errno
extern int errno;
#endif
1
2
3
ctype.h
#define isascii© ((© & ~0x7f) == 0)
#define toascii© (© & 0x7f)
extern int isctype(int c,int mask);
extern int tolower(int c);
extern int toupper(int c);

#define ISBIT(b) (1 << (b))
#define isxxxxx© isctype(c,ISBIT(b))

isalnum
isalpha
iscntrl
isdigit
isxdigit
isgraph
ispunct
isspace
isblank
isprint
isupper
islower
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
wctype.h
wchar_t ctype.h

wchar.h
wchar_t stdio.h

uchar.h
c16rtomb
c32rtomb
mbtoc16r
mbtoc32r

你可能感兴趣的:(ANSI C标准库和POSIX库--转载)