Standardní knihovna jazyka C: Porovnání verzí

Smazaný obsah Přidaný obsah
pokračování překladu,typo
překlad - tabulka a == Standardní knihovna jazyka C v jiných jazycích ==
Řádek 46:
Hlavičkové soubory '''<iso646.h>''', '''<wchar.h>''' a '''<wctype.h>''' byly přidány s prvním rozšířením normy (označováným NA1)v roce 1995.
 
Následující aktualizace byla provedena v roce 1999 v souvislosti s vydáním standardu [[C99]] a přibyly hlavičkové soubory s názvy: '''<complex.h>''', '''<fenv.h>''', '''<inttypes.h>''', '''<stdbool.h>''', '''<stdint.h>''' a '''<tgmath.h>'''.
 
== Standard ISO ==
Řádek 69:
|''' [[fenv.h|<fenv.h>]]''' || Práce v prostředí s [[Plovoucí desetinná čárka|plovoucí desetinnou čárkou]]. (Nově s '''C99''')
|-
|''' [[float.h|<float.h>]]''' || ContainsObsahuje defineddefinici constantskonstant specifyingurčených thepro implementation-specificpráci propertiess ofknihovnou thepro [[floating-point]]výpočty library,s suchplovoucí asdesetinou thečárkou. minimumObsahuje differencefunkce betweenpro twovýpočet differentminimálního floating-pointvzdálenosti numbersdvou čísel s plovoucí desetinnou čárkou (_EPSILON), thevýpočet maximummaximální numberpřsnosti ofs digitspoužitou ofdesetinnou accuracypřesností (_DIG) and the rangea offunkce numberspracující whichs canrozsahem bepoužitých representedčíslic (_MIN, _MAX).
|-
|''' [[inttypes.h|<inttypes.h>]]''' || ForPro precisepřesné conversionpřevody betweenmezi integertypy typesinteger. (NewNově withs '''C99''')
|-
|''' [[iso646.h|<iso646.h>]]''' || ForPro programmingprogramování inpomocí znakové sady [[ISO 646]] variant character sets. (NewNově withs '''NA1''')
|-
|''' [[limits.h|<limits.h>]]''' || ContainsObsahuhe definedpředdefinované constantskonstanty specifyinga thevlastnosti implementation-specific properties of thetypů integer types, suchjako asje therozsah range of numbersčísel, whichkterý canse bemůže representedzobrazit (_MIN, _MAX).
|-
|''' [[locale.h|<locale.h>]]''' || ForPro setlocale() anda relatedkonstanty constants.s This issouvisející. usedTato tofunkce choosese anpoužívá appropriatepro [[Internationalizationvýběr andpotřebné localization|locale]]lokalizace.
|-
|''' [[math.h|<math.h>]]''' || ForVýpočty computings commonběžnými mathematicalmatematickými functionsfunkcemi.
|-
|''' [[setjmp.h|<setjmp.h>]]''' || DeclaresDeklaruje the macrosmakra setjmp anda longjmp, whichkterá se arepoužívají usedpro forpráci non-localvnějšími exitsproměnnými
|-
|''' [[signal.h|<signal.h>]]''' || ForKnihovna controllingpro variousreakce exceptionalpři conditionsnáročných situacích
|-
|''' [[stdarg.h|<stdarg.h>]]''' || ForPřístup accessingk aargumentům varyingpředaným number of arguments passed to functionsfunkcím.
|-
|''' [[stdbool.h|<stdbool.h>]]''' || ForDatový atyp boolean data type. (NewNově withs '''C99''')
|-
|''' [[stdint.h|<stdint.h>]] ''' || ForDefinice definingdalších varioustypů integer types. (NewNově withs '''C99''')
|-
|''' [[stddef.h|<stddef.h>]]''' || ForNěkolik definingužitečných severaldatových usefultypů typesa and macrosmaker.
|-
|''' [[stdio.h|<stdio.h>]]''' || ProvidesPodpora thevstupů corea inputvýstupů andjádra outputprogramovacího capabilities of thejazyka C language. ThisTento filesoubor includesobsahuje the"posvátnou" venerablefunkci <code>[[printf]]</code> function.
|-
|''' [[stdlib.h|<stdlib.h>]]''' || ForPro performingpráci as varietyrozličnými ofoperacemi operations,mezi includingkteré conversion,patří: [[Pseudorandomgenerátor numberpseudonáhodných generator|pseudo-random numbers]]čísel, memoryrozdělování allocationpaměti, processkontrola controlprocesů, environment,vyhledávání signalling, searching, anda sortingtřídění.
|-
|''' [[string.h|<string.h>]]''' || ForPro manipulatingpráci severals kindsrůznými ofdruhy stringsřetězců.
|-
|''' [[tgmath.h|<tgmath.h>]]''' || ForPro type-genericmatematické mathematicalfunkce functionspro práci s obecnými datovými typy. (NewNově withs '''C99''')
|-
|''' [[time.h|<time.h>]]''' || ForPro convertingkonverzi betweenmezi variousrůznými timeformáty anddata datea formatsčasu.
|-
|''' [[wchar.h|<wchar.h>]]''' || ForPro manipulatingpráci wides streamsrůznými anddruhy severalznaků, kindsje ofpotřebná stringspro usingprogramy widev charactersjiných - key to supporting a range of languagesjazycích. (NewNově withs '''NA1''')
|-
|''' [[wctype.h|<wctype.h>]]''' || ForPro classifyingklasifikaci wideširokého charactersspektra znaků. (NewNově withs '''NA1''')
|}
 
== Standardní knihovna jazyka C v jiných jazycích ==
Některé programovací jazyky zahrnují funkce standardní knihovny jazyka C ve svých vlastních knihovnách. Knihovny v jiných programovacích jazycích jsou většinou přizpůsobené, aby více vyhovovaly struktuře daného programovacího jazyka, ale funkce a smentika je zachována. Programovací jazyk [[C++]] například zahrnuje funkce standardu knihovny ANSI C, co se týče jména funkcí '''std''' (jako <code>std::printf</code>, <code>std::atoi</code>, <code>std::feof</code>, etc.) a podobná jména hlavičkových souborů ("<code>cstdio</code>", "<code>cmath</code>", "<code>cstdlib</code>", atd.). Dalšími jazyky s podobným přístupem k programování, jako má jazyk C jsou: [[D (programovací jazyk)|programovací jazyk D]] a převládající implementace jazyka [[Python (programovací jazyk)|Python]] známá jako [[CPython]].
 
== Funkce compileru ==
 
Some compilers (for example, [[GNU Compiler Collection|GCC]]<ref>[http://gcc.gnu.org/onlinedocs/gcc-4.1.1/gcc/Other-Builtins.html#Other-Builtins Other built-in functions provided by GCC], GCC Manual</ref>) provide built-in versions of many of the functions in the C standard library; that is, the implementations of the functions are written into the compiled [[object file]], and the program calls the built-in versions instead of the functions in the C library [[shared object]] file. This reduces function call overhead, especially if function calls are replaced with [[inline function|inline]] variants, and allows other forms of [[Compiler optimization|optimisation]] (as the compiler knows the [[Control flow|control-flow]] characteristics of the built-in variants), but may cause confusion when debugging (for example, the built-in versions cannot be replaced with [[Instrumentation (computer programming)|instrumented]] variants).
 
However, the built-in functions must behave like ordinary functions in accordance with ISO C. The main implication is that the program must be able to create a pointer to these functions by taking their address, and invoke the function by means of that pointer. If two pointers to the same function are derived in two different translation unit in the program, these two pointers must compare equal; that is, the address comes by resolving the name of the function, which has external (program-wide) linkage.
 
== Standardní knihovna POSIX ==
[[POSIX]] (and [[Single Unix Specification|SUS]]) specifies a number of routines that should be available over and above those in the C standard library proper; these are often implemented alongside the C standard library functionality, with varying degrees of closeness. For example, [[glibc]] implements functions such as [[Fork (operating system)|fork]] within libc.so, but before [[NPTL]] was merged into glibc it constituted a separate library with its own linker flag. Often, this POSIX-specified functionality will be regarded as part of the library; the C library proper may be identified as the ANSI or [[International Organization for Standardization| ISO]] C library.
 
== Implementace ==
 
Unix-like systems typically have a C library in [[shared library]] form, but the header files (and compiler toolchain) may be absent from an installation so C development may not be possible. The C library is considered part of the operating system on Unix-like systems. The C functions, including the ISO C standard ones, are widely used by programs, and are regarded as if they were not only an implementation of something in the C language, but also de facto part of the operating system interface. Unix-like operating systems generally cannot function if the C library is erased.
 
By contrast, on Microsoft Windows, the core system dynamic libraries ([[DLL]]s) do not provide an implementation of the C standard library; this is provided by each compiler individually. Compiled applications written in C are either statically linked with a C library, or linked to a dynamic version of the library that is shipped with these applications, rather than relied upon to be present on the targeted systems. Functions in a compiler's C library are not regarded as interfaces to Microsoft Windows.
 
Many other implementations exist, provided with both various operating systems and C compilers.
 
Seznam nejznámějších implementací: