Стандарт языка Си С99 TC (1113411), страница 74
Текст из файла (страница 74)
The current setting of the LC_CTYPE category shall be the same as during the callto wctrans that returned the value desc.3Each of the following expressions behaves the same as the call to the wide character casemapping function (7.25.3.1) in the comment that follows the expression:towctrans(wc, wctrans("tolower"))towctrans(wc, wctrans("toupper"))// towlower(wc)// towupper(wc)Returns4The towctrans function returns the mapped value of wc using the mapping describedby desc.7.25.3.2.2 The wctrans functionSynopsis1#include <wctype.h>wctrans_t wctrans(const char *property);Description2The wctrans function constructs a value with type wctrans_t that describes amapping between wide characters identified by the string argument property.3The strings listed in the description of the towctrans function shall be valid in alllocales as property arguments to the wctrans function.Returns4If property identifies a valid mapping of wide characters according to the LC_CTYPEcategory of the current locale, the wctrans function returns a nonzero value that is validas the second argument to the towctrans function; otherwise, it returns zero.400Library§7.25.3.2.2WG14/N1256Committee Draft — Septermber 7, 2007ISO/IEC 9899:TC37.26 Future library directions1The following names are grouped under individual headers for convenience.
All externalnames described below are reserved no matter what headers are included by the program.7.26.1 Complex arithmetic <complex.h>1The function namescerfcerfccexp2cexpm1clog10clog1pclog2clgammactgammaand the same names suffixed with f or l may be added to the declarations in the<complex.h> header.7.26.2 Character handling <ctype.h>1Function names that begin with either is or to, and a lowercase letter may be added tothe declarations in the <ctype.h> header.7.26.3 Errors <errno.h>1Macros that begin with E and a digit or E and an uppercase letter may be added to thedeclarations in the <errno.h> header.7.26.4 Format conversion of integer types <inttypes.h>1Macro names beginning with PRI or SCN followed by any lowercase letter or X may beadded to the macros defined in the <inttypes.h> header.7.26.5 Localization <locale.h>1Macros that begin with LC_ and an uppercase letter may be added to the definitions inthe <locale.h> header.7.26.6 Signal handling <signal.h>1Macros that begin with either SIG and an uppercase letter or SIG_ and an uppercaseletter may be added to the definitions in the <signal.h> header.7.26.7 Boolean type and values <stdbool.h>1The ability to undefine and perhaps then redefine the macros bool, true, and false isan obsolescent feature.7.26.8 Integer types <stdint.h>1Typedef names beginning with int or uint and ending with _t may be added to thetypes defined in the <stdint.h> header.
Macro names beginning with INT or UINTand ending with _MAX, _MIN, or _C may be added to the macros defined in the<stdint.h> header.§7.26.8Library401ISO/IEC 9899:TC3Committee Draft — Septermber 7, 2007WG14/N12567.26.9 Input/output <stdio.h>1Lowercase letters may be added to the conversion specifiers and length modifiers infprintf and fscanf. Other characters may be used in extensions.2The gets function is obsolescent, and is deprecated.3The use of ungetc on a binary stream where the file position indicator is zero prior tothe call is an obsolescent feature.7.26.10 General utilities <stdlib.h>1Function names that begin with str and a lowercase letter may be added to thedeclarations in the <stdlib.h> header.7.26.11 String handling <string.h>1Function names that begin with str, mem, or wcs and a lowercase letter may be addedto the declarations in the <string.h> header.7.26.12 Extended multibyte and wide character utilities <wchar.h>1Function names that begin with wcs and a lowercase letter may be added to thedeclarations in the <wchar.h> header.2Lowercase letters may be added to the conversion specifiers and length modifiers infwprintf and fwscanf.
Other characters may be used in extensions.7.26.13 Wide character classification and mapping utilities<wctype.h>1Function names that begin with is or to and a lowercase letter may be added to thedeclarations in the <wctype.h> header.402Library§7.26.13WG14/N1256Committee Draft — Septermber 7, 2007ISO/IEC 9899:TC3Annex A(informative)Language syntax summary1NOTEThe notation is described in 6.1.A.1 Lexical grammarA.1.1 Lexical elements(6.4) token:keywordidentifierconstantstring-literalpunctuator(6.4) preprocessing-token:header-nameidentifierpp-numbercharacter-constantstring-literalpunctuatoreach non-white-space character that cannot be one of the aboveA.1.2 Keywords(6.4.1) keyword: one ofautobreakcasecharconstcontinuedefaultdodoubleelse§A.1.2enumexternfloatforgotoifinlineintlongregisterrestrictreturnshortsignedsizeofstaticstructswitchtypedefunionLanguage syntax summaryunsignedvoidvolatilewhile_Bool_Complex_Imaginary403ISO/IEC 9899:TC3Committee Draft — Septermber 7, 2007WG14/N1256A.1.3 Identifiers(6.4.2.1) identifier:identifier-nondigitidentifier identifier-nondigitidentifier digit(6.4.2.1) identifier-nondigit:nondigituniversal-character-nameother implementation-defined characters(6.4.2.1) nondigit: one of_ a bn oA BN OcpCPdqDQerERfsFSgtGThuHUivIV(6.4.2.1) digit: one of0 1 23456789jwJWkxKXlyLYmzMZA.1.4 Universal character names(6.4.3) universal-character-name:\u hex-quad\U hex-quad hex-quad(6.4.3) hex-quad:hexadecimal-digit hexadecimal-digithexadecimal-digit hexadecimal-digitA.1.5 Constants(6.4.4) constant:integer-constantfloating-constantenumeration-constantcharacter-constant(6.4.4.1) integer-constant:decimal-constant integer-suffixoptoctal-constant integer-suffixopthexadecimal-constant integer-suffixopt(6.4.4.1) decimal-constant:nonzero-digitdecimal-constant digit404Language syntax summary§A.1.5WG14/N1256Committee Draft — Septermber 7, 2007ISO/IEC 9899:TC3(6.4.4.1) octal-constant:0octal-constant octal-digit(6.4.4.1) hexadecimal-constant:hexadecimal-prefix hexadecimal-digithexadecimal-constant hexadecimal-digit(6.4.4.1) hexadecimal-prefix: one of0x 0X(6.4.4.1) nonzero-digit: one of1 2 3 4 5678(6.4.4.1) octal-digit: one of0 1 2 3567674(6.4.4.1) hexadecimal-digit: one of0 1 2 3 4 5a b c d e fA B C D E F989(6.4.4.1) integer-suffix:unsigned-suffix long-suffixoptunsigned-suffix long-long-suffixlong-suffix unsigned-suffixoptlong-long-suffix unsigned-suffixopt(6.4.4.1) unsigned-suffix: one ofu U(6.4.4.1) long-suffix: one ofl L(6.4.4.1) long-long-suffix: one ofll LL(6.4.4.2) floating-constant:decimal-floating-constanthexadecimal-floating-constant(6.4.4.2) decimal-floating-constant:fractional-constant exponent-partopt floating-suffixoptdigit-sequence exponent-part floating-suffixopt§A.1.5Language syntax summary405ISO/IEC 9899:TC3Committee Draft — Septermber 7, 2007WG14/N1256(6.4.4.2) hexadecimal-floating-constant:hexadecimal-prefix hexadecimal-fractional-constantbinary-exponent-part floating-suffixopthexadecimal-prefix hexadecimal-digit-sequencebinary-exponent-part floating-suffixopt(6.4.4.2) fractional-constant:digit-sequenceopt .
digit-sequencedigit-sequence .(6.4.4.2) exponent-part:e signopt digit-sequenceE signopt digit-sequence(6.4.4.2) sign: one of+ (6.4.4.2) digit-sequence:digitdigit-sequence digit(6.4.4.2) hexadecimal-fractional-constant:hexadecimal-digit-sequenceopt .hexadecimal-digit-sequencehexadecimal-digit-sequence .(6.4.4.2) binary-exponent-part:p signopt digit-sequenceP signopt digit-sequence(6.4.4.2) hexadecimal-digit-sequence:hexadecimal-digithexadecimal-digit-sequence hexadecimal-digit(6.4.4.2) floating-suffix: one off l F L(6.4.4.3) enumeration-constant:identifier(6.4.4.4) character-constant:' c-char-sequence 'L' c-char-sequence '406Language syntax summary§A.1.5WG14/N1256Committee Draft — Septermber 7, 2007ISO/IEC 9899:TC3(6.4.4.4) c-char-sequence:c-charc-char-sequence c-char(6.4.4.4) c-char:any member of the source character set exceptthe single-quote ', backslash \, or new-line characterescape-sequence(6.4.4.4) escape-sequence:simple-escape-sequenceoctal-escape-sequencehexadecimal-escape-sequenceuniversal-character-name(6.4.4.4) simple-escape-sequence: one of\' \" \? \\\a \b \f \n \r \t\v(6.4.4.4) octal-escape-sequence:\ octal-digit\ octal-digit octal-digit\ octal-digit octal-digit octal-digit(6.4.4.4) hexadecimal-escape-sequence:\x hexadecimal-digithexadecimal-escape-sequence hexadecimal-digitA.1.6 String literals(6.4.5) string-literal:" s-char-sequenceopt "L" s-char-sequenceopt "(6.4.5) s-char-sequence:s-chars-char-sequence s-char(6.4.5) s-char:any member of the source character set exceptthe double-quote ", backslash \, or new-line characterescape-sequence§A.1.6Language syntax summary407ISO/IEC 9899:TC3Committee Draft — Septermber 7, 2007WG14/N1256A.1.7 Punctuators(6.4.6) punctuator: one of[ ] ( ) { } .