C/Biblioteka standardowa/Indeks tematyczny

Z Wikibooks, biblioteki wolnych podręczników.

Spis plików nagłówkowych oraz zawartych w nich funkcji i makr biblioteki standardowej C. Funkcje, makra i typy wprowadzone dopiero w standardzie C99 zostały oznaczone poprzez "[C99]" po nazwie. (Zobacz też Indeks alfabetyczny.)

assert.h[edytuj]

Makro asercji.

ctype.h[edytuj]

Klasyfikowanie znaków.

isalnum() isalpha() isblank() [C99]
iscntrl() isdigit() isgraph()
islower() isprint() ispunct()
isspace() isupper() isxdigit()
tolower() toupper()

errno.h[edytuj]

Deklaracje kodów błędów.

float.h[edytuj]

Właściwości typów zmiennoprzecinkowych zależne od implementacji.


Możemy odnaleźć ten plik :

find /usr/ -name "float.h"

Otrzymujemy (przykładowy wynik) :

/usr/lib/clang/2.8/include/float.h
/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5/include/float.h
/usr/include/c++/4.5/tr1/float.h
/usr/include/tcl8.5/tcl-private/compat/float.h


inttypes.h[edytuj]

Dependency Graph for inttypes

W pliku inttypes.h są ( od C99) zdefiniowane:

iso646.h[edytuj]

Plik iso646.h[2] możemy odnaleźć:[3]

 find /|grep iso646.h

Przykładowy wynik:

/usr/lib/llvm-10/lib/clang/10.0.1/include/iso646.h
/usr/lib/gcc/x86_64-linux-gnu/9/include/iso646.h
/usr/lib/gcc/x86_64-linux-gnu/10/include/iso646.h
/usr/lib/gcc/x86_64-linux-gnu/8/include/iso646.h
/usr/lib/llvm-11/lib/clang/11.0.0/include/iso646.h

limits.h[edytuj]

Właściwości typów całkowitych zależne od implementacji.

Przykład użycia

locale.h[edytuj]

Ustawienia międzynarodowe.

math.h[edytuj]


FP_FAST_FMAF (makro) [C99] FP_FAST_FMAL (makro) [C99]
FP_FAST_FMA (makro) [C99] FP_ILOGB0 (makro) [C99]
FP_ILOGBNAN (makro) [C99] FP_INFINITE (makro) [C99]
FP_NAN (makro) [C99] FP_NORMAL (makro) [C99]
FP_SUBNORMAL (makro) [C99] FP_ZERO (makro) [C99]
HUGE_VALF (makro) [C99] HUGE_VALL (makro) [C99]
HUGE_VAL (makro) INFINITY (makro) [C99]
MATH_ERREXCEPT (makro) [C99] MATH_ERRNO (makro) [C99]
NAN (makro) [C99] acosh()
acos() asinh()
asin() atan2()
atanh() atan()
cbrt() [C99] ceil()
copysign() [C99] cosh()
cos() double_t (typ) [C99]
erfc() [C99] erf() [C99]
exp2() [C99] expm1() [C99]
exp() fabs()
fdim() [C99] float_t (typ) [C99]
floor() fmax() [C99]
fma() [C99] fmin() [C99]
fmod() fpclassify() [C99]
frexp() hypot() [C99]
ilogb() [C99] isfinite() [C99]
isgreaterequal() [C99] isgreater() [C99]
isinf() [C99] islessequal() [C99]
islessgreater() [C99] isless() [C99]
isnan() [C99] isnormal() [C99]
isunordered() [C99] ldexp()
lgamma() [C99] llrint() [C99]
llround() [C99] log10()
log1p() [C99] log2() [C99]
logb() [C99] log()
lrint() [C99] lround() [C99]
math_errhandling (makro) [C99] modf()
nan() [C99] nearbyint() [C99]
nextafter() [C99] nexttoward() [C99]
pow() remainder() [C99]
remquo() [C99] rint() [C99]
round() [C99] scalbln() [C99]
scalbn() [C99] signbit() [C99]
sinh() sin()
sqrt() tanh()
tan() tgamma() [C99]
trunc() [C99]

setjmp.h[edytuj]

Obsługa nielokalnych skoków.

signal.h[edytuj]

Obsługa sygnałów.

stdarg.h[edytuj]

Narzędzia dla funkcji ze zmienną liczbą argumentów.


stddef.h[edytuj]

Zawiera definicje:

  • NULL = stała wskażnika zerowego, znak sterujący o wartości liczbowej 0
  • offsetof() = wyrażenie całkowite, stałe typu size_t. Wartością wyrażenia jest przesunięcie w bajtach do elementu członkowskiego struktury

Definicje przez typedef:

  • ptrdiff_t = Typ całkowy ze znakiem, wynik odjęcia dwóch wskaźników
  • wchar_t = Typ całkowity, którego zakres wartości może reprezentować różne kody znakowe
  • size_t = Typ całkowity bez znaku, wynik operatora sizeof

stdio.h[edytuj]

Standard Input/Output, czyli standardowe wejście-wyjście.

clearerr() fclose() feof()
ferror() fflush() fgetc()
fgetpos() fgets() fopen()
fprintf() fputc() fputs()
fread() freopen() fscanf()
fseek() fsetpos() ftell()
fwrite() getc() getchar()
gets() perror() printf()
putc() putchar() puts()
remove() rename() rewind()
scanf() setbuf() setvbuf()
sprintf() sscanf() tmpfile()
tmpnam() ungetc() vfprintf()
vprintf() vsprintf()

stdlib.h[edytuj]

Najbardziej podstawowe funkcje.

abort() abs() atexit()
atof() atoi() atol()
bsearch() calloc() div()
exit() free() getenv()
itoa() labs() ldiv()
malloc() mblen() mbstowcs()
mbtowc() qsort() rand()
realloc() srand() strtod()
strtol() strtoul() system()
wctomb() wcstombs()

string.h[edytuj]

Operacje na łańcuchach znaków

memchr() memcmp() memcpy()
memmove() memset() strcat()
strchr() strcmp() strcoll()
strcpy() strcspn() strerror()
strlen() strncat() strncmp()
strncpy() strpbrk() strrchr()
strspn() strstr() strtok()
strxfrm() strdup()

time.h[edytuj]

Funkcje obsługi czasu.[4]

asctime() clock() ctime()
difftime() gmtime() localtime()
mktime() strftime() time()
tm (struktura)

unistd.h[edytuj]

Function Description
crypt password and data encryption
encrypt encrypt 64-bit messages
gethostid get the unique identifier of the current host
gethostname get hostname
getopt parse command-line options
swab swap adjacent bytes
sysconf get configuration at run time
Signals alarm schedule an alarm signal
pause wait for signal
Filesystem access

faccessat
faccessat2

check user's permissions for a file
chdir

fchdir

change working directory
chown

fchown
lchown
fchownat

change owner and group of a file
close close a file descriptor
dup

dup2

duplicate a file descriptor
fsync

fdatasync

synchronize a file's in-core state with storage device
fpathconf

pathconf

get configuration values for files
ftruncate
truncate
truncate a file to a specified length
getcwd
getwd

get_current_dir_name

get current working directory
isatty test whether a file descriptor refers to a terminal
link

linkat

make a new name for a file
lockf apply, test or remove a POSIX lock on an open file
lseek reposition read/write file offset
pipe

pipe2

create pipe
pread

pwrite

read from or write to a file descriptor at a given offset
read read from a file descriptor
readlink

readlinkat

read value of a symbolic link
rmdir delete a directory
symlink

symlinkat

make a new name for a file
sync

syncfs

commit filesystem caches to disk
ttyname

ttyname_r

return name of a terminal
unlink

unlinkat

delete a name and possibly the file it refers to
write write to a file descriptor
Process _exit terminate the calling process
execl

execlp
execle
execv
execvp
execvpe

execute a file
fexecve execute program specified via file descriptor
fork create a new process
setpgid

getpgid
setpgrp
getpgrp

set/get process group
getpid

getppid

get process identification
getsid get session ID
nice change process priority
setsid creates a session and sets the process group ID
sleep sleep for a specified number of seconds
tcgetpgrp

tcsetpgrp

get and set terminal foreground process group
User/Group getgid

getegid

get group identity
getuid

geteuid

get user identity
getgroups get list of supplementary group IDs
getlogin

getlogin_r

get username
seteuid

setegid

set effective user or group ID
setgid set group identity
setreuid

setregid

set real and/or effective user or group ID
setuid set user identity

wchar.h[edytuj]

Plik wchar.h zawiera definicje funkcje obsługi ciągów szerokich znaków ( wchar = wide characters)

Źródła[edytuj]

  1. cppreference: c types integer
  2. iso646.h w nag wikipedii
  3. stackoverflow question: cannot-find-iso646-h-in-glibc
  4. stackoverflow question: how-do-i-measure-time-in-c ?