Стандарт языка Си С99 TC (1113411), страница 75
Текст из файла (страница 75)
->++ -- & * + - ~ !/ % << >> < > <= >=? : ; ...= *= /= %= += -= <<=, # ##<: :> <% %> %: %:%:==>>=!=&=^|^=&&|||=A.1.8 Header names(6.4.7) header-name:< h-char-sequence >" q-char-sequence "(6.4.7) h-char-sequence:h-charh-char-sequence h-char(6.4.7) h-char:any member of the source character set exceptthe new-line character and >(6.4.7) q-char-sequence:q-charq-char-sequence q-char(6.4.7) q-char:any member of the source character set exceptthe new-line character and "A.1.9 Preprocessing numbers(6.4.8) pp-number:digit. digitpp-numberpp-numberpp-numberpp-numberpp-numberpp-numberpp-number408digitidentifier-nondigite signE signp signP sign.Language syntax summary§A.1.9WG14/N1256Committee Draft — Septermber 7, 2007ISO/IEC 9899:TC3A.2 Phrase structure grammarA.2.1 Expressions(6.5.1) primary-expression:identifierconstantstring-literal( expression )(6.5.2) postfix-expression:primary-expressionpostfix-expression [ expression ]postfix-expression ( argument-expression-listopt )postfix-expression .
identifierpostfix-expression -> identifierpostfix-expression ++postfix-expression -( type-name ) { initializer-list }( type-name ) { initializer-list , }(6.5.2) argument-expression-list:assignment-expressionargument-expression-list , assignment-expression(6.5.3) unary-expression:postfix-expression++ unary-expression-- unary-expressionunary-operator cast-expressionsizeof unary-expressionsizeof ( type-name )(6.5.3) unary-operator: one of& * + - ~!(6.5.4) cast-expression:unary-expression( type-name ) cast-expression(6.5.5) multiplicative-expression:cast-expressionmultiplicative-expression * cast-expressionmultiplicative-expression / cast-expressionmultiplicative-expression % cast-expression§A.2.1Language syntax summary409ISO/IEC 9899:TC3Committee Draft — Septermber 7, 2007WG14/N1256(6.5.6) additive-expression:multiplicative-expressionadditive-expression + multiplicative-expressionadditive-expression - multiplicative-expression(6.5.7) shift-expression:additive-expressionshift-expression << additive-expressionshift-expression >> additive-expression(6.5.8) relational-expression:shift-expressionrelational-expressionrelational-expressionrelational-expressionrelational-expression<><=>=shift-expressionshift-expressionshift-expressionshift-expression(6.5.9) equality-expression:relational-expressionequality-expression == relational-expressionequality-expression != relational-expression(6.5.10) AND-expression:equality-expressionAND-expression & equality-expression(6.5.11) exclusive-OR-expression:AND-expressionexclusive-OR-expression ^ AND-expression(6.5.12) inclusive-OR-expression:exclusive-OR-expressioninclusive-OR-expression | exclusive-OR-expression(6.5.13) logical-AND-expression:inclusive-OR-expressionlogical-AND-expression && inclusive-OR-expression(6.5.14) logical-OR-expression:logical-AND-expressionlogical-OR-expression || logical-AND-expression(6.5.15) conditional-expression:logical-OR-expressionlogical-OR-expression ? expression : conditional-expression410Language syntax summary§A.2.1WG14/N1256Committee Draft — Septermber 7, 2007ISO/IEC 9899:TC3(6.5.16) assignment-expression:conditional-expressionunary-expression assignment-operator assignment-expression(6.5.16) assignment-operator: one of= *= /= %= +=-=<<=>>=&=^=|=(6.5.17) expression:assignment-expressionexpression , assignment-expression(6.6) constant-expression:conditional-expressionA.2.2 Declarations(6.7) declaration:declaration-specifiers init-declarator-listopt ;(6.7) declaration-specifiers:storage-class-specifier declaration-specifiersopttype-specifier declaration-specifiersopttype-qualifier declaration-specifiersoptfunction-specifier declaration-specifiersopt(6.7) init-declarator-list:init-declaratorinit-declarator-list , init-declarator(6.7) init-declarator:declaratordeclarator = initializer(6.7.1) storage-class-specifier:typedefexternstaticautoregister§A.2.2Language syntax summary411ISO/IEC 9899:TC3Committee Draft — Septermber 7, 2007WG14/N1256(6.7.2) type-specifier:voidcharshortintlongfloatdoublesignedunsigned_Bool_Complexstruct-or-union-specifierenum-specifiertypedef-name∗(6.7.2.1) struct-or-union-specifier:struct-or-union identifieropt { struct-declaration-list }struct-or-union identifier(6.7.2.1) struct-or-union:structunion(6.7.2.1) struct-declaration-list:struct-declarationstruct-declaration-list struct-declaration(6.7.2.1) struct-declaration:specifier-qualifier-list struct-declarator-list ;(6.7.2.1) specifier-qualifier-list:type-specifier specifier-qualifier-listopttype-qualifier specifier-qualifier-listopt(6.7.2.1) struct-declarator-list:struct-declaratorstruct-declarator-list , struct-declarator(6.7.2.1) struct-declarator:declaratordeclaratoropt : constant-expression412Language syntax summary§A.2.2WG14/N1256Committee Draft — Septermber 7, 2007ISO/IEC 9899:TC3(6.7.2.2) enum-specifier:enum identifieropt { enumerator-list }enum identifieropt { enumerator-list , }enum identifier(6.7.2.2) enumerator-list:enumeratorenumerator-list , enumerator(6.7.2.2) enumerator:enumeration-constantenumeration-constant = constant-expression(6.7.3) type-qualifier:constrestrictvolatile(6.7.4) function-specifier:inline(6.7.5) declarator:pointeropt direct-declarator(6.7.5) direct-declarator:identifier( declarator )direct-declarator [ type-qualifier-listopt assignment-expressionopt ]direct-declarator [ static type-qualifier-listopt assignment-expression ]direct-declarator [ type-qualifier-list static assignment-expression ]direct-declarator [ type-qualifier-listopt * ]direct-declarator ( parameter-type-list )direct-declarator ( identifier-listopt )(6.7.5) pointer:* type-qualifier-listopt* type-qualifier-listopt pointer(6.7.5) type-qualifier-list:type-qualifiertype-qualifier-list type-qualifier(6.7.5) parameter-type-list:parameter-listparameter-list , ...§A.2.2Language syntax summary413ISO/IEC 9899:TC3Committee Draft — Septermber 7, 2007WG14/N1256(6.7.5) parameter-list:parameter-declarationparameter-list , parameter-declaration(6.7.5) parameter-declaration:declaration-specifiers declaratordeclaration-specifiers abstract-declaratoropt(6.7.5) identifier-list:identifieridentifier-list , identifier(6.7.6) type-name:specifier-qualifier-list abstract-declaratoropt(6.7.6) abstract-declarator:pointerpointeropt direct-abstract-declarator(6.7.6) direct-abstract-declarator:( abstract-declarator )direct-abstract-declaratoropt [ type-qualifier-listoptassignment-expressionopt ]direct-abstract-declaratoropt [ static type-qualifier-listoptassignment-expression ]direct-abstract-declaratoropt [ type-qualifier-list staticassignment-expression ]direct-abstract-declaratoropt [ * ]direct-abstract-declaratoropt ( parameter-type-listopt )(6.7.7) typedef-name:identifier(6.7.8) initializer:assignment-expression{ initializer-list }{ initializer-list , }(6.7.8) initializer-list:designationopt initializerinitializer-list , designationopt initializer(6.7.8) designation:designator-list =414Language syntax summary§A.2.2WG14/N1256Committee Draft — Septermber 7, 2007ISO/IEC 9899:TC3(6.7.8) designator-list:designatordesignator-list designator(6.7.8) designator:[ constant-expression ].
identifierA.2.3 Statements(6.8) statement:labeled-statementcompound-statementexpression-statementselection-statementiteration-statementjump-statement(6.8.1) labeled-statement:identifier : statementcase constant-expression : statementdefault : statement(6.8.2) compound-statement:{ block-item-listopt }(6.8.2) block-item-list:block-itemblock-item-list block-item(6.8.2) block-item:declarationstatement(6.8.3) expression-statement:expressionopt ;(6.8.4) selection-statement:if ( expression ) statementif ( expression ) statement else statementswitch ( expression ) statement§A.2.3Language syntax summary415ISO/IEC 9899:TC3Committee Draft — Septermber 7, 2007WG14/N1256(6.8.5) iteration-statement:while ( expression ) statementdo statement while ( expression ) ;for ( expressionopt ; expressionopt ; expressionopt ) statementfor ( declaration expressionopt ; expressionopt ) statement(6.8.6) jump-statement:goto identifier ;continue ;break ;return expressionopt ;A.2.4 External definitions(6.9) translation-unit:external-declarationtranslation-unit external-declaration(6.9) external-declaration:function-definitiondeclaration(6.9.1) function-definition:declaration-specifiers declarator declaration-listopt compound-statement(6.9.1) declaration-list:declarationdeclaration-list declarationA.3 Preprocessing directives(6.10) preprocessing-file:groupopt(6.10) group:group-partgroup group-part(6.10) group-part:if-sectioncontrol-linetext-line# non-directive(6.10) if-section:if-group elif-groupsopt else-groupopt endif-line416Language syntax summary§A.3WG14/N1256Committee Draft — Septermber 7, 2007ISO/IEC 9899:TC3(6.10) if-group:# ifconstant-expression new-line groupopt# ifdef identifier new-line groupopt# ifndef identifier new-line groupopt(6.10) elif-groups:elif-groupelif-groups elif-group(6.10) elif-group:# elifconstant-expression new-line groupopt(6.10) else-group:# elsenew-line groupopt(6.10) endif-line:# endifnew-line(6.10) control-line:# include pp-tokens new-line# define identifier replacement-list new-line# define identifier lparen identifier-listopt )replacement-list new-line# define identifier lparen ...
) replacement-list new-line# define identifier lparen identifier-list , ... )replacement-list new-line# undefidentifier new-line# linepp-tokens new-line# errorpp-tokensopt new-line# pragma pp-tokensopt new-line#new-line(6.10) text-line:pp-tokensopt new-line(6.10) non-directive:pp-tokens new-line(6.10) lparen:a ( character not immediately preceded by white-space(6.10) replacement-list:pp-tokensopt§A.3Language syntax summary417ISO/IEC 9899:TC3Committee Draft — Septermber 7, 2007WG14/N1256(6.10) pp-tokens:preprocessing-tokenpp-tokens preprocessing-token(6.10) new-line:the new-line character418Language syntax summary§A.3WG14/N1256Committee Draft — Septermber 7, 2007ISO/IEC 9899:TC3Annex B(informative)Library summaryB.1 Diagnostics <assert.h>NDEBUGvoid assert(scalar expression);B.2 Complex <complex.h>complex_Complex_I§B.2imaginary_Imaginary_II#pragma STDC CX_LIMITED_RANGE on-off-switchdouble complex cacos(double complex z);float complex cacosf(float complex z);long double complex cacosl(long double complex z);double complex casin(double complex z);float complex casinf(float complex z);long double complex casinl(long double complex z);double complex catan(double complex z);float complex catanf(float complex z);long double complex catanl(long double complex z);double complex ccos(double complex z);float complex ccosf(float complex z);long double complex ccosl(long double complex z);double complex csin(double complex z);float complex csinf(float complex z);long double complex csinl(long double complex z);double complex ctan(double complex z);float complex ctanf(float complex z);long double complex ctanl(long double complex z);double complex cacosh(double complex z);float complex cacoshf(float complex z);long double complex cacoshl(long double complex z);double complex casinh(double complex z);float complex casinhf(float complex z);long double complex casinhl(long double complex z);double complex catanh(double complex z);float complex catanhf(float complex z);long double complex catanhl(long double complex z);Library summary419ISO/IEC 9899:TC3Committee Draft — Septermber 7, 2007WG14/N1256double complex ccosh(double complex z);float complex ccoshf(float complex z);long double complex ccoshl(long double complex z);double complex csinh(double complex z);float complex csinhf(float complex z);long double complex csinhl(long double complex z);double complex ctanh(double complex z);float complex ctanhf(float complex z);long double complex ctanhl(long double complex z);double complex cexp(double complex z);float complex cexpf(float complex z);long double complex cexpl(long double complex z);double complex clog(double complex z);float complex clogf(float complex z);long double complex clogl(long double complex z);double cabs(double complex z);float cabsf(float complex z);long double cabsl(long double complex z);double complex cpow(double complex x, double complex y);float complex cpowf(float complex x, float complex y);long double complex cpowl(long double complex x,long double complex y);double complex csqrt(double complex z);float complex csqrtf(float complex z);long double complex csqrtl(long double complex z);double carg(double complex z);float cargf(float complex z);long double cargl(long double complex z);double cimag(double complex z);float cimagf(float complex z);long double cimagl(long double complex z);double complex conj(double complex z);float complex conjf(float complex z);long double complex conjl(long double complex z);double complex cproj(double complex z);float complex cprojf(float complex z);long double complex cprojl(long double complex z);double creal(double complex z);float crealf(float complex z);long double creall(long double complex z);420Library summary§B.2WG14/N1256Committee Draft — Septermber 7, 2007ISO/IEC 9899:TC3B.3 Character handling <ctype.h>intintintintintintintintintintintintintintisalnum(int c);isalpha(int c);isblank(int c);iscntrl(int c);isdigit(int c);isgraph(int c);islower(int c);isprint(int c);ispunct(int c);isspace(int c);isupper(int c);isxdigit(int c);tolower(int c);toupper(int c);B.4 Errors <errno.h>EDOMEILSEQERANGEerrnoB.5 Floating-point environment <fenv.h>fenv_tfexcept_tFE_DIVBYZEROFE_INEXACTFE_INVALIDFE_OVERFLOWFE_UNDERFLOWFE_ALL_EXCEPTFE_DOWNWARDFE_TONEARESTFE_TOWARDZEROFE_UPWARDFE_DFL_ENV#pragma STDC FENV_ACCESS on-off-switchint feclearexcept(int excepts);int fegetexceptflag(fexcept_t *flagp, int excepts);int feraiseexcept(int excepts);int fesetexceptflag(const fexcept_t *flagp,int excepts);int fetestexcept(int excepts);int fegetround(void);int fesetround(int round);int fegetenv(fenv_t *envp);int feholdexcept(fenv_t *envp);int fesetenv(const fenv_t *envp);int feupdateenv(const fenv_t *envp);§B.5Library summary421ISO/IEC 9899:TC3Committee Draft — Septermber 7, 2007WG14/N1256B.6 Characteristics of floating types <float.h>FLT_ROUNDSFLT_EVAL_METHODFLT_RADIXFLT_MANT_DIGDBL_MANT_DIGLDBL_MANT_DIGDECIMAL_DIGFLT_DIGDBL_DIGLDBL_DIGFLT_MIN_EXPDBL_MIN_EXPLDBL_MIN_EXPFLT_MIN_10_EXPDBL_MIN_10_EXPLDBL_MIN_10_EXPFLT_MAX_EXPDBL_MAX_EXPLDBL_MAX_EXPFLT_MAX_10_EXPDBL_MAX_10_EXPLDBL_MAX_10_EXPFLT_MAXDBL_MAXLDBL_MAXFLT_EPSILONDBL_EPSILONLDBL_EPSILONFLT_MINDBL_MINLDBL_MINB.7 Format conversion of integer types <inttypes.h>imaxdiv_tPRIdNPRIiNPRIoNPRIuNPRIxNPRIXNSCNdNSCNiNSCNoNSCNuNSCNxNPRIdLEASTNPRIiLEASTNPRIoLEASTNPRIuLEASTNPRIxLEASTNPRIXLEASTNSCNdLEASTNSCNiLEASTNSCNoLEASTNSCNuLEASTNSCNxLEASTNPRIdFASTNPRIiFASTNPRIoFASTNPRIuFASTNPRIxFASTNPRIXFASTNSCNdFASTNSCNiFASTNSCNoFASTNSCNuFASTNSCNxFASTNPRIdMAXPRIiMAXPRIoMAXPRIuMAXPRIxMAXPRIXMAXSCNdMAXSCNiMAXSCNoMAXSCNuMAXSCNxMAXPRIdPTRPRIiPTRPRIoPTRPRIuPTRPRIxPTRPRIXPTRSCNdPTRSCNiPTRSCNoPTRSCNuPTRSCNxPTRintmax_t imaxabs(intmax_t j);imaxdiv_t imaxdiv(intmax_t numer, intmax_t denom);intmax_t strtoimax(const char * restrict nptr,char ** restrict endptr, int base);uintmax_t strtoumax(const char * restrict nptr,char ** restrict endptr, int base);intmax_t wcstoimax(const wchar_t * restrict nptr,wchar_t ** restrict endptr, int base);uintmax_t wcstoumax(const wchar_t * restrict nptr,wchar_t ** restrict endptr, int base);422Library summary§B.7WG14/N1256Committee Draft — Septermber 7, 2007ISO/IEC 9899:TC3B.8 Alternative spellings <iso646.h>andand_eqbitandbitorcomplnotnot_eqoror_eqxorxor_eqB.9 Sizes of integer types <limits.h>CHAR_BITSCHAR_MINSCHAR_MAXUCHAR_MAXCHAR_MINCHAR_MAXMB_LEN_MAXSHRT_MINSHRT_MAXUSHRT_MAXINT_MININT_MAXUINT_MAXLONG_MINLONG_MAXULONG_MAXLLONG_MINLLONG_MAXULLONG_MAXLC_CTYPELC_MONETARYLC_NUMERICLC_TIMEB.10 Localization <locale.h>struct lconvNULLLC_ALLLC_COLLATEchar *setlocale(int category, const char *locale);struct lconv *localeconv(void);B.11 Mathematics <math.h>float_tdouble_tHUGE_VALHUGE_VALFHUGE_VALLINFINITYNANFP_INFINITEFP_NANFP_NORMALFP_SUBNORMALFP_ZEROFP_FAST_FMAFP_FAST_FMAF#pragma STDC FP_CONTRACT on-off-switchint fpclassify(real-floating x);int isfinite(real-floating x);int isinf(real-floating x);int isnan(real-floating x);int isnormal(real-floating x);int signbit(real-floating x);double acos(double x);float acosf(float x);long double acosl(long double x);double asin(double x);float asinf(float x);long double asinl(long double x);double atan(double x);§B.11Library summaryFP_FAST_FMALFP_ILOGB0FP_ILOGBNANMATH_ERRNOMATH_ERREXCEPTmath_errhandling423ISO/IEC 9899:TC3Committee Draft — Septermber 7, 2007WG14/N1256float atanf(float x);long double atanl(long double x);double atan2(double y, double x);float atan2f(float y, float x);long double atan2l(long double y, long double x);double cos(double x);float cosf(float x);long double cosl(long double x);double sin(double x);float sinf(float x);long double sinl(long double x);double tan(double x);float tanf(float x);long double tanl(long double x);double acosh(double x);float acoshf(float x);long double acoshl(long double x);double asinh(double x);float asinhf(float x);long double asinhl(long double x);double atanh(double x);float atanhf(float x);long double atanhl(long double x);double cosh(double x);float coshf(float x);long double coshl(long double x);double sinh(double x);float sinhf(float x);long double sinhl(long double x);double tanh(double x);float tanhf(float x);long double tanhl(long double x);double exp(double x);float expf(float x);long double expl(long double x);double exp2(double x);float exp2f(float x);long double exp2l(long double x);double expm1(double x);float expm1f(float x);long double expm1l(long double x);424Library summary§B.11WG14/N1256Committee Draft — Septermber 7, 2007ISO/IEC 9899:TC3double frexp(double value, int *exp);float frexpf(float value, int *exp);long double frexpl(long double value, int *exp);int ilogb(double x);int ilogbf(float x);int ilogbl(long double x);double ldexp(double x, int exp);float ldexpf(float x, int exp);long double ldexpl(long double x, int exp);double log(double x);float logf(float x);long double logl(long double x);double log10(double x);float log10f(float x);long double log10l(long double x);double log1p(double x);float log1pf(float x);long double log1pl(long double x);double log2(double x);float log2f(float x);long double log2l(long double x);double logb(double x);float logbf(float x);long double logbl(long double x);double modf(double value, double *iptr);float modff(float value, float *iptr);long double modfl(long double value, long double *iptr);double scalbn(double x, int n);float scalbnf(float x, int n);long double scalbnl(long double x, int n);double scalbln(double x, long int n);float scalblnf(float x, long int n);long double scalblnl(long double x, long int n);double cbrt(double x);float cbrtf(float x);long double cbrtl(long double x);double fabs(double x);float fabsf(float x);long double fabsl(long double x);double hypot(double x, double y);float hypotf(float x, float y);§B.11Library summary425ISO/IEC 9899:TC3Committee Draft — Septermber 7, 2007WG14/N1256long double hypotl(long double x, long double y);double pow(double x, double y);float powf(float x, float y);long double powl(long double x, long double y);double sqrt(double x);float sqrtf(float x);long double sqrtl(long double x);double erf(double x);float erff(float x);long double erfl(long double x);double erfc(double x);float erfcf(float x);long double erfcl(long double x);double lgamma(double x);float lgammaf(float x);long double lgammal(long double x);double tgamma(double x);float tgammaf(float x);long double tgammal(long double x);double ceil(double x);float ceilf(float x);long double ceill(long double x);double floor(double x);float floorf(float x);long double floorl(long double x);double nearbyint(double x);float nearbyintf(float x);long double nearbyintl(long double x);double rint(double x);float rintf(float x);long double rintl(long double x);long int lrint(double x);long int lrintf(float x);long int lrintl(long double x);long long int llrint(double x);long long int llrintf(float x);long long int llrintl(long double x);double round(double x);float roundf(float x);long double roundl(long double x);long int lround(double x);426Library summary§B.11WG14/N1256Committee Draft — Septermber 7, 2007ISO/IEC 9899:TC3long int lroundf(float x);long int lroundl(long double x);long long int llround(double x);long long int llroundf(float x);long long int llroundl(long double x);double trunc(double x);float truncf(float x);long double truncl(long double x);double fmod(double x, double y);float fmodf(float x, float y);long double fmodl(long double x, long double y);double remainder(double x, double y);float remainderf(float x, float y);long double remainderl(long double x, long double y);double remquo(double x, double y, int *quo);float remquof(float x, float y, int *quo);long double remquol(long double x, long double y,int *quo);double copysign(double x, double y);float copysignf(float x, float y);long double copysignl(long double x, long double y);double nan(const char *tagp);float nanf(const char *tagp);long double nanl(const char *tagp);double nextafter(double x, double y);float nextafterf(float x, float y);long double nextafterl(long double x, long double y);double nexttoward(double x, long double y);float nexttowardf(float x, long double y);long double nexttowardl(long double x, long double y);double fdim(double x, double y);float fdimf(float x, float y);long double fdiml(long double x, long double y);double fmax(double x, double y);float fmaxf(float x, float y);long double fmaxl(long double x, long double y);double fmin(double x, double y);float fminf(float x, float y);long double fminl(long double x, long double y);double fma(double x, double y, double z);float fmaf(float x, float y, float z);§B.11Library summary427ISO/IEC 9899:TC3Committee Draft — Septermber 7, 2007WG14/N1256long double fmal(long double x, long double y,long double z);int isgreater(real-floating x, real-floating y);int isgreaterequal(real-floating x, real-floating y);int isless(real-floating x, real-floating y);int islessequal(real-floating x, real-floating y);int islessgreater(real-floating x, real-floating y);int isunordered(real-floating x, real-floating y);B.12 Nonlocal jumps <setjmp.h>jmp_bufint setjmp(jmp_buf env);void longjmp(jmp_buf env, int val);B.13 Signal handling <signal.h>sig_atomic_tSIG_DFLSIG_ERRSIG_IGNSIGABRTSIGFPESIGILLSIGINTSIGSEGVSIGTERMvoid (*signal(int sig, void (*func)(int)))(int);int raise(int sig);B.14 Variable arguments <stdarg.h>va_listtype va_arg(va_list ap, type);void va_copy(va_list dest, va_list src);void va_end(va_list ap);void va_start(va_list ap, parmN);B.15 Boolean type and values <stdbool.h>booltruefalse_ _bool_true_false_are_defined428Library summary§B.15WG14/N1256Committee Draft — Septermber 7, 2007ISO/IEC 9899:TC3B.16 Common definitions <stddef.h>ptrdiff_tsize_twchar_tNULLoffsetof(type, member-designator)B.17 Integer types <stdint.h>intN_tuintN_tint_leastN_tuint_leastN_tint_fastN_tuint_fastN_tintptr_tuintptr_tintmax_tuintmax_tINTN_MININTN_MAXUINTN_MAXINT_LEASTN_MININT_LEASTN_MAXUINT_LEASTN_MAXINT_FASTN_MININT_FASTN_MAXUINT_FASTN_MAXINTPTR_MININTPTR_MAXUINTPTR_MAXINTMAX_MININTMAX_MAXUINTMAX_MAXPTRDIFF_MINPTRDIFF_MAXSIG_ATOMIC_MINSIG_ATOMIC_MAXSIZE_MAXWCHAR_MINWCHAR_MAXWINT_MINWINT_MAXINTN_C(value)UINTN_C(value)INTMAX_C(value)UINTMAX_C(value)B.18 Input/output <stdio.h>size_tFILEfpos_tNULL_IOFBF_IOLBF_IONBFBUFSIZEOFFOPEN_MAXFILENAME_MAXL_tmpnamSEEK_CURSEEK_ENDSEEK_SETTMP_MAXstderrstdinstdoutint remove(const char *filename);int rename(const char *old, const char *new);FILE *tmpfile(void);char *tmpnam(char *s);int fclose(FILE *stream);int fflush(FILE *stream);FILE *fopen(const char * restrict filename,const char * restrict mode);FILE *freopen(const char * restrict filename,const char * restrict mode,FILE * restrict stream);void setbuf(FILE * restrict stream,char * restrict buf);§B.18Library summary429ISO/IEC 9899:TC3Committee Draft — Septermber 7, 2007WG14/N1256int setvbuf(FILE * restrict stream,char * restrict buf,int mode, size_t size);int fprintf(FILE * restrict stream,const char * restrict format, ...);int fscanf(FILE * restrict stream,const char * restrict format, ...);int printf(const char * restrict format, ...);int scanf(const char * restrict format, ...);int snprintf(char * restrict s, size_t n,const char * restrict format, ...);int sprintf(char * restrict s,const char * restrict format, ...);int sscanf(const char * restrict s,const char * restrict format, ...);int vfprintf(FILE * restrict stream,const char * restrict format, va_list arg);int vfscanf(FILE * restrict stream,const char * restrict format, va_list arg);int vprintf(const char * restrict format, va_list arg);int vscanf(const char * restrict format, va_list arg);int vsnprintf(char * restrict s, size_t n,const char * restrict format, va_list arg);int vsprintf(char * restrict s,const char * restrict format, va_list arg);int vsscanf(const char * restrict s,const char * restrict format, va_list arg);int fgetc(FILE *stream);char *fgets(char * restrict s, int n,FILE * restrict stream);int fputc(int c, FILE *stream);int fputs(const char * restrict s,FILE * restrict stream);int getc(FILE *stream);int getchar(void);char *gets(char *s);int putc(int c, FILE *stream);int putchar(int c);int puts(const char *s);int ungetc(int c, FILE *stream);430Library summary§B.18WG14/N1256Committee Draft — Septermber 7, 2007ISO/IEC 9899:TC3size_t fread(void * restrict ptr,size_t size, size_t nmemb,FILE * restrict stream);size_t fwrite(const void * restrict ptr,size_t size, size_t nmemb,FILE * restrict stream);int fgetpos(FILE * restrict stream,fpos_t * restrict pos);int fseek(FILE *stream, long int offset, int whence);int fsetpos(FILE *stream, const fpos_t *pos);long int ftell(FILE *stream);void rewind(FILE *stream);void clearerr(FILE *stream);int feof(FILE *stream);int ferror(FILE *stream);void perror(const char *s);B.19 General utilities <stdlib.h>size_twchar_tdiv_tldiv_tlldiv_tNULLEXIT_FAILUREEXIT_SUCCESSRAND_MAXMB_CUR_MAXdouble atof(const char *nptr);int atoi(const char *nptr);long int atol(const char *nptr);long long int atoll(const char *nptr);double strtod(const char * restrict nptr,char ** restrict endptr);float strtof(const char * restrict nptr,char ** restrict endptr);long double strtold(const char * restrict nptr,char ** restrict endptr);long int strtol(const char * restrict nptr,char ** restrict endptr, int base);long long int strtoll(const char * restrict nptr,char ** restrict endptr, int base);unsigned long int strtoul(const char * restrict nptr,char ** restrict endptr, int base);§B.19Library summary431ISO/IEC 9899:TC3Committee Draft — Septermber 7, 2007WG14/N1256unsigned long long int strtoull(const char * restrict nptr,char ** restrict endptr, int base);int rand(void);void srand(unsigned int seed);void *calloc(size_t nmemb, size_t size);void free(void *ptr);void *malloc(size_t size);void *realloc(void *ptr, size_t size);void abort(void);int atexit(void (*func)(void));void exit(int status);void _Exit(int status);char *getenv(const char *name);int system(const char *string);void *bsearch(const void *key, const void *base,size_t nmemb, size_t size,int (*compar)(const void *, const void *));void qsort(void *base, size_t nmemb, size_t size,int (*compar)(const void *, const void *));int abs(int j);long int labs(long int j);long long int llabs(long long int j);div_t div(int numer, int denom);ldiv_t ldiv(long int numer, long int denom);lldiv_t lldiv(long long int numer,long long int denom);int mblen(const char *s, size_t n);int mbtowc(wchar_t * restrict pwc,const char * restrict s, size_t n);int wctomb(char *s, wchar_t wchar);size_t mbstowcs(wchar_t * restrict pwcs,const char * restrict s, size_t n);size_t wcstombs(char * restrict s,const wchar_t * restrict pwcs, size_t n);432Library summary§B.19WG14/N1256Committee Draft — Septermber 7, 2007ISO/IEC 9899:TC3B.20 String handling <string.h>size_tNULLvoid *memcpy(void * restrict s1,const void * restrict s2, size_t n);void *memmove(void *s1, const void *s2, size_t n);char *strcpy(char * restrict s1,const char * restrict s2);char *strncpy(char * restrict s1,const char * restrict s2, size_t n);char *strcat(char * restrict s1,const char * restrict s2);char *strncat(char * restrict s1,const char * restrict s2, size_t n);int memcmp(const void *s1, const void *s2, size_t n);int strcmp(const char *s1, const char *s2);int strcoll(const char *s1, const char *s2);int strncmp(const char *s1, const char *s2, size_t n);size_t strxfrm(char * restrict s1,const char * restrict s2, size_t n);void *memchr(const void *s, int c, size_t n);char *strchr(const char *s, int c);size_t strcspn(const char *s1, const char *s2);char *strpbrk(const char *s1, const char *s2);char *strrchr(const char *s, int c);size_t strspn(const char *s1, const char *s2);char *strstr(const char *s1, const char *s2);char *strtok(char * restrict s1,const char * restrict s2);void *memset(void *s, int c, size_t n);char *strerror(int errnum);size_t strlen(const char *s);§B.20Library summary433ISO/IEC 9899:TC3Committee Draft — Septermber 7, 2007WG14/N1256B.21 Type-generic math <tgmath.h>acosasinatanacoshasinhatanhcossintancoshsinhtanhexplogpowsqrtfabsatan2cbrtceilcopysignerferfcexp2expm1fdimfloorfmafmaxfminfmodfrexphypotilogbldexplgammallrintllroundlog10log1plog2logblrintlroundnearbyintnextafternexttowardremainderremquorintroundscalbnscalblntgammatrunccargcimagconjcprojcrealB.22 Date and time <time.h>NULLCLOCKS_PER_SECsize_tclock_ttime_tstruct tmclock_t clock(void);double difftime(time_t time1, time_t time0);time_t mktime(struct tm *timeptr);time_t time(time_t *timer);char *asctime(const struct tm *timeptr);char *ctime(const time_t *timer);struct tm *gmtime(const time_t *timer);struct tm *localtime(const time_t *timer);size_t strftime(char * restrict s,size_t maxsize,const char * restrict format,const struct tm * restrict timeptr);434Library summary§B.22WG14/N1256Committee Draft — Septermber 7, 2007ISO/IEC 9899:TC3B.23 Extended multibyte/wide character utilities <wchar.h>wchar_tsize_tmbstate_twint_tstruct tmNULLWCHAR_MAXWCHAR_MINWEOFint fwprintf(FILE * restrict stream,const wchar_t * restrict format, ...);int fwscanf(FILE * restrict stream,const wchar_t * restrict format, ...);int swprintf(wchar_t * restrict s, size_t n,const wchar_t * restrict format, ...);int swscanf(const wchar_t * restrict s,const wchar_t * restrict format, ...);int vfwprintf(FILE * restrict stream,const wchar_t * restrict format, va_list arg);int vfwscanf(FILE * restrict stream,const wchar_t * restrict format, va_list arg);int vswprintf(wchar_t * restrict s, size_t n,const wchar_t * restrict format, va_list arg);int vswscanf(const wchar_t * restrict s,const wchar_t * restrict format, va_list arg);int vwprintf(const wchar_t * restrict format,va_list arg);int vwscanf(const wchar_t * restrict format,va_list arg);int wprintf(const wchar_t * restrict format, ...);int wscanf(const wchar_t * restrict format, ...);wint_t fgetwc(FILE *stream);wchar_t *fgetws(wchar_t * restrict s, int n,FILE * restrict stream);wint_t fputwc(wchar_t c, FILE *stream);int fputws(const wchar_t * restrict s,FILE * restrict stream);int fwide(FILE *stream, int mode);wint_t getwc(FILE *stream);wint_t getwchar(void);wint_t putwc(wchar_t c, FILE *stream);wint_t putwchar(wchar_t c);wint_t ungetwc(wint_t c, FILE *stream);§B.23Library summary435ISO/IEC 9899:TC3Committee Draft — Septermber 7, 2007WG14/N1256double wcstod(const wchar_t * restrict nptr,wchar_t ** restrict endptr);float wcstof(const wchar_t * restrict nptr,wchar_t ** restrict endptr);long double wcstold(const wchar_t * restrict nptr,wchar_t ** restrict endptr);long int wcstol(const wchar_t * restrict nptr,wchar_t ** restrict endptr, int base);long long int wcstoll(const wchar_t * restrict nptr,wchar_t ** restrict endptr, int base);unsigned long int wcstoul(const wchar_t * restrict nptr,wchar_t ** restrict endptr, int base);unsigned long long int wcstoull(const wchar_t * restrict nptr,wchar_t ** restrict endptr, int base);wchar_t *wcscpy(wchar_t * restrict s1,const wchar_t * restrict s2);wchar_t *wcsncpy(wchar_t * restrict s1,const wchar_t * restrict s2, size_t n);wchar_t *wmemcpy(wchar_t * restrict s1,const wchar_t * restrict s2, size_t n);wchar_t *wmemmove(wchar_t *s1, const wchar_t *s2,size_t n);wchar_t *wcscat(wchar_t * restrict s1,const wchar_t * restrict s2);wchar_t *wcsncat(wchar_t * restrict s1,const wchar_t * restrict s2, size_t n);int wcscmp(const wchar_t *s1, const wchar_t *s2);int wcscoll(const wchar_t *s1, const wchar_t *s2);int wcsncmp(const wchar_t *s1, const wchar_t *s2,size_t n);size_t wcsxfrm(wchar_t * restrict s1,const wchar_t * restrict s2, size_t n);int wmemcmp(const wchar_t *s1, const wchar_t *s2,size_t n);wchar_t *wcschr(const wchar_t *s, wchar_t c);size_t wcscspn(const wchar_t *s1, const wchar_t *s2);wchar_t *wcspbrk(const wchar_t *s1, const wchar_t *s2); ∗wchar_t *wcsrchr(const wchar_t *s, wchar_t c);size_t wcsspn(const wchar_t *s1, const wchar_t *s2);wchar_t *wcsstr(const wchar_t *s1, const wchar_t *s2);436Library summary§B.23WG14/N1256Committee Draft — Septermber 7, 2007ISO/IEC 9899:TC3wchar_t *wcstok(wchar_t * restrict s1,const wchar_t * restrict s2,wchar_t ** restrict ptr);wchar_t *wmemchr(const wchar_t *s, wchar_t c, size_t n);size_t wcslen(const wchar_t *s);wchar_t *wmemset(wchar_t *s, wchar_t c, size_t n);size_t wcsftime(wchar_t * restrict s, size_t maxsize,const wchar_t * restrict format,const struct tm * restrict timeptr);wint_t btowc(int c);int wctob(wint_t c);int mbsinit(const mbstate_t *ps);size_t mbrlen(const char * restrict s, size_t n,mbstate_t * restrict ps);size_t mbrtowc(wchar_t * restrict pwc,const char * restrict s, size_t n,mbstate_t * restrict ps);size_t wcrtomb(char * restrict s, wchar_t wc,mbstate_t * restrict ps);size_t mbsrtowcs(wchar_t * restrict dst,const char ** restrict src, size_t len,mbstate_t * restrict ps);size_t wcsrtombs(char * restrict dst,const wchar_t ** restrict src, size_t len,mbstate_t * restrict ps);B.24 Wide character classification and mapping utilities <wctype.h>wint_tintintintintintintintintintintintintint§B.24wctrans_twctype_tWEOFiswalnum(wint_t wc);iswalpha(wint_t wc);iswblank(wint_t wc);iswcntrl(wint_t wc);iswdigit(wint_t wc);iswgraph(wint_t wc);iswlower(wint_t wc);iswprint(wint_t wc);iswpunct(wint_t wc);iswspace(wint_t wc);iswupper(wint_t wc);iswxdigit(wint_t wc);iswctype(wint_t wc, wctype_t desc);Library summary437ISO/IEC 9899:TC3Committee Draft — Septermber 7, 2007WG14/N1256wctype_t wctype(const char *property);wint_t towlower(wint_t wc);wint_t towupper(wint_t wc);wint_t towctrans(wint_t wc, wctrans_t desc);wctrans_t wctrans(const char *property);438Library summary§B.24WG14/N1256Committee Draft — Septermber 7, 2007ISO/IEC 9899:TC3Annex C(informative)Sequence points1The following are the sequence points described in 5.1.2.3:— The call to a function, after the arguments have been evaluated (6.5.2.2).— The end of the first operand of the following operators: logical AND && (6.5.13);logical OR || (6.5.14); conditional ? (6.5.15); comma , (6.5.17).— The end of a full declarator: declarators (6.7.5);— The end of a full expression: an initializer (6.7.8); the expression in an expressionstatement (6.8.3); the controlling expression of a selection statement (if or switch)(6.8.4); the controlling expression of a while or do statement (6.8.5); each of theexpressions of a for statement (6.8.5.3); the expression in a return statement(6.8.6.4).— Immediately before a library function returns (7.1.4).— After the actions associated with each formatted input/output function conversionspecifier (7.19.6, 7.24.2).— Immediately before and immediately after each call to a comparison function, andalso between any call to a comparison function and any movement of the objectspassed as arguments to that call (7.20.5).§CSequence points439ISO/IEC 9899:TC3Committee Draft — Septermber 7, 2007WG14/N1256Annex D(normative)Universal character names for identifiers1This clause lists the hexadecimal code values that are valid in universal character namesin identifiers.2This table is reproduced unchanged from ISO/IEC TR 10176:1998, produced by ISO/IECJTC 1/SC 22/WG 20, except for the omission of ranges that are part of the basic charactersets.Latin:00AA, 00BA, 00C0−00D6, 00D8−00F6, 00F8−01F5, 01FA−0217,0250−02A8, 1E00−1E9B, 1EA0−1EF9, 207FGreek:0386, 0388−038A, 038C, 038E−03A1, 03A3−03CE, 03D0−03D6,03DA, 03DC, 03DE, 03E0, 03E2−03F3, 1F00−1F15, 1F18−1F1D,1F20−1F45, 1F48−1F4D, 1F50−1F57, 1F59, 1F5B, 1F5D,1F5F−1F7D, 1F80−1FB4, 1FB6−1FBC, 1FC2−1FC4, 1FC6−1FCC,1FD0−1FD3, 1FD6−1FDB, 1FE0−1FEC, 1FF2−1FF4, 1FF6−1FFCCyrillic:0401−040C, 040E−044F, 0451−045C, 045E−0481, 0490−04C4,04C7−04C8, 04CB−04CC, 04D0−04EB, 04EE−04F5, 04F8−04F9Armenian:0531−0556, 0561−0587Hebrew:05B0−05B9,05F0−05F2Arabic:0621−063A, 0640−0652, 0670−06B7, 06BA−06BE, 06C0−06CE,06D0−06DC, 06E5−06E8, 06EA−06EDDevanagari:0901−0903, 0905−0939, 093E−094D, 0950−0952, 0958−0963Bengali:0981−0983, 0985−098C, 098F−0990, 0993−09A8, 09AA−09B0,09B2, 09B6−09B9, 09BE−09C4, 09C7−09C8, 09CB−09CD,09DC−09DD, 09DF−09E3, 09F0−09F1Gurmukhi:0A02, 0A05−0A0A, 0A0F−0A10, 0A13−0A28, 0A2A−0A30,0A32−0A33, 0A35−0A36, 0A38−0A39, 0A3E−0A42, 0A47−0A48,0A4B−0A4D, 0A59−0A5C, 0A5E, 0A74Gujarati:0A81−0A83, 0A85−0A8B, 0A8D, 0A8F−0A91, 0A93−0AA8,0AAA−0AB0,0AB2−0AB3,0AB5−0AB9,0ABD−0AC5,0AC7−0AC9, 0ACB−0ACD, 0AD0, 0AE0Oriya:0B01−0B03, 0B05−0B0C, 0B0F−0B10, 0B13−0B28, 0B2A−0B30,0B32−0B33, 0B36−0B39, 0B3E−0B43, 0B47−0B48, 0B4B−0B4D,44005BB−05BD,05BF,05C1−05C2,Universal character names for identifiers05D0−05EA,§DWG14/N1256Committee Draft — Septermber 7, 2007ISO/IEC 9899:TC30B5C−0B5D, 0B5F−0B61Tamil:0B82−0B83, 0B85−0B8A, 0B8E−0B90, 0B92−0B95, 0B99−0B9A,0B9C, 0B9E−0B9F, 0BA3−0BA4, 0BA8−0BAA, 0BAE−0BB5,0BB7−0BB9, 0BBE−0BC2, 0BC6−0BC8, 0BCA−0BCDTelugu:0C01−0C03, 0C05−0C0C, 0C0E−0C10, 0C12−0C28, 0C2A−0C33,0C35−0C39, 0C3E−0C44, 0C46−0C48, 0C4A−0C4D, 0C60−0C61Kannada:0C82−0C83, 0C85−0C8C, 0C8E−0C90, 0C92−0CA8, 0CAA−0CB3,0CB5−0CB9, 0CBE−0CC4, 0CC6−0CC8, 0CCA−0CCD, 0CDE,0CE0−0CE1Malayalam:0D02−0D03, 0D05−0D0C, 0D0E−0D10, 0D12−0D28, 0D2A−0D39,0D3E−0D43, 0D46−0D48, 0D4A−0D4D, 0D60−0D61Thai:0E01−0E3A, 0E40−0E5BLao:0E81−0E82, 0E84, 0E87−0E88, 0E8A, 0E8D, 0E94−0E97,0E99−0E9F,0EA1−0EA3,0EA5,0EA7,0EAA−0EAB,0EAD−0EAE, 0EB0−0EB9, 0EBB−0EBD, 0EC0−0EC4, 0EC6,0EC8−0ECD, 0EDC−0EDDTibetan:0F00, 0F18−0F19, 0F35, 0F37, 0F39, 0F3E−0F47, 0F49−0F69,0F71−0F84, 0F86−0F8B, 0F90−0F95, 0F97, 0F99−0FAD,0FB1−0FB7, 0FB9Georgian:10A0−10C5, 10D0−10F6Hiragana:3041−3093, 309B−309CKatakana:30A1−30F6, 30FB−30FCBopomofo:3105−312CCJK Unified Ideographs: 4E00−9FA5Hangul:AC00−D7A3Digits:0660−0669, 06F0−06F9, 0966−096F, 09E6−09EF, 0A66−0A6F,0AE6−0AEF, 0B66−0B6F, 0BE7−0BEF, 0C66−0C6F, 0CE6−0CEF,0D66−0D6F, 0E50−0E59, 0ED0−0ED9, 0F20−0F33Special characters: 00B5, 00B7, 02B0−02B8, 02BB, 02BD−02C1, 02D0−02D1,02E0−02E4, 037A, 0559, 093D, 0B3D, 1FBE, 203F−2040, 2102,2107, 210A−2113, 2115, 2118−211D, 2124, 2126, 2128, 212A−2131,2133−2138, 2160−2182, 3005−3007, 3021−3029§DUniversal character names for identifiers441ISO/IEC 9899:TC3Committee Draft — Septermber 7, 2007WG14/N1256Annex E(informative)Implementation limits1The contents of the header <limits.h> are given below, in alphabetical order.