logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

wchar.h.0p (12630B)


  1. '\" et
  2. .TH wchar.h "0P" 2017 "IEEE/The Open Group" "POSIX Programmer's Manual"
  3. .\"
  4. .SH PROLOG
  5. This manual page is part of the POSIX Programmer's Manual.
  6. The Linux implementation of this interface may differ (consult
  7. the corresponding Linux manual page for details of Linux behavior),
  8. or the interface may not be implemented on Linux.
  9. .\"
  10. .SH NAME
  11. wchar.h
  12. \(em wide-character handling
  13. .SH SYNOPSIS
  14. .LP
  15. .nf
  16. #include <wchar.h>
  17. .fi
  18. .SH DESCRIPTION
  19. Some of the functionality described on this reference page extends the
  20. ISO\ C standard. Applications shall define the appropriate feature test macro
  21. (see the System Interfaces volume of POSIX.1\(hy2017,
  22. .IR "Section 2.2" ", " "The Compilation Environment")
  23. to enable the visibility of these symbols in this header.
  24. .P
  25. The
  26. .IR <wchar.h>
  27. header shall define the following types:
  28. .IP "\fBFILE\fP" 12
  29. As described in
  30. .IR <stdio.h> .
  31. .IP "\fBlocale_t\fP" 12
  32. As described in
  33. .IR <locale.h> .
  34. .IP "\fBmbstate_t\fP" 12
  35. An object type other than an array type that can hold the conversion
  36. state information necessary to convert between sequences of (possibly
  37. multi-byte) characters and wide characters.
  38. If a codeset is being used such that an
  39. .BR mbstate_t
  40. needs to preserve more than two levels of reserved state, the
  41. results are unspecified.
  42. .IP "\fBsize_t\fP" 12
  43. As described in
  44. .IR <stddef.h> .
  45. .IP "\fBva_list\fP" 12
  46. As described in
  47. .IR <stdarg.h> .
  48. .IP "\fBwchar_t\fP" 12
  49. As described in
  50. .IR <stddef.h> .
  51. .IP "\fBwctype_t\fP" 12
  52. A scalar type of a data object that can hold values which represent
  53. locale-specific character classification.
  54. .IP "\fBwint_t\fP" 12
  55. An integer type capable of storing any valid value of
  56. .BR wchar_t
  57. or WEOF.
  58. .P
  59. The tag
  60. .BR tm
  61. shall be declared as naming an incomplete structure type, the contents
  62. of which are described in the
  63. .IR <time.h>
  64. header.
  65. .P
  66. The implementation shall support one or more programming environments
  67. in which the width of
  68. .BR wint_t
  69. is no greater than the width of type
  70. .BR long .
  71. The names of these programming environments can be obtained using the
  72. \fIconfstr\fR()
  73. function or the
  74. .IR getconf
  75. utility.
  76. .P
  77. The
  78. .IR <wchar.h>
  79. header shall define the following macros:
  80. .IP WCHAR_MAX 12
  81. As described in
  82. .IR <stdint.h> .
  83. .IP WCHAR_MIN 12
  84. As described in
  85. .IR <stdint.h> .
  86. .IP WEOF 12
  87. Constant expression of type
  88. .BR wint_t
  89. that is returned by several WP functions to indicate end-of-file.
  90. .IP NULL 12
  91. As described in
  92. .IR <stddef.h> .
  93. .P
  94. Inclusion of the
  95. .IR <wchar.h>
  96. header may make visible all symbols from the headers
  97. .IR <ctype.h> ,
  98. .IR <string.h> ,
  99. .IR <stdarg.h> ,
  100. .IR <stddef.h> ,
  101. .IR <stdio.h> ,
  102. .IR <stdlib.h> ,
  103. and
  104. .IR <time.h> .
  105. .P
  106. The following shall be declared as functions and may also be defined
  107. as macros. Function prototypes shall be provided for use with ISO\ C standard
  108. compilers. Arguments to functions in this list can point to arrays
  109. containing
  110. .BR wchar_t
  111. values that do not correspond to members of the character set of the
  112. current locale. Such values shall be processed according to the
  113. specified semantics, unless otherwise stated.
  114. .sp
  115. .RS 4
  116. .nf
  117. wint_t btowc(int);
  118. wint_t fgetwc(FILE *);
  119. wchar_t *fgetws(wchar_t *restrict, int, FILE *restrict);
  120. wint_t fputwc(wchar_t, FILE *);
  121. int fputws(const wchar_t *restrict, FILE *restrict);
  122. int fwide(FILE *, int);
  123. int fwprintf(FILE *restrict, const wchar_t *restrict, ...);
  124. int fwscanf(FILE *restrict, const wchar_t *restrict, ...);
  125. wint_t getwc(FILE *);
  126. wint_t getwchar(void);
  127. int iswalnum(wint_t);
  128. int iswalpha(wint_t);
  129. int iswcntrl(wint_t);
  130. int iswctype(wint_t, wctype_t);
  131. int iswdigit(wint_t);
  132. int iswgraph(wint_t);
  133. int iswlower(wint_t);
  134. int iswprint(wint_t);
  135. int iswpunct(wint_t);
  136. int iswspace(wint_t);
  137. int iswupper(wint_t);
  138. int iswxdigit(wint_t);
  139. size_t mbrlen(const char *restrict, size_t, mbstate_t *restrict);
  140. size_t mbrtowc(wchar_t *restrict, const char *restrict, size_t,
  141. mbstate_t *restrict);
  142. int mbsinit(const mbstate_t *);
  143. size_t mbsnrtowcs(wchar_t *restrict, const char **restrict,
  144. size_t, size_t, mbstate_t *restrict);
  145. size_t mbsrtowcs(wchar_t *restrict, const char **restrict, size_t,
  146. mbstate_t *restrict);
  147. FILE *open_wmemstream(wchar_t **, size_t *);
  148. wint_t putwc(wchar_t, FILE *);
  149. wint_t putwchar(wchar_t);
  150. int swprintf(wchar_t *restrict, size_t,
  151. const wchar_t *restrict, ...);
  152. int swscanf(const wchar_t *restrict,
  153. const wchar_t *restrict, ...);
  154. wint_t towlower(wint_t);
  155. wint_t towupper(wint_t);
  156. wint_t ungetwc(wint_t, FILE *);
  157. int vfwprintf(FILE *restrict, const wchar_t *restrict, va_list);
  158. int vfwscanf(FILE *restrict, const wchar_t *restrict, va_list);
  159. int vswprintf(wchar_t *restrict, size_t,
  160. const wchar_t *restrict, va_list);
  161. int vswscanf(const wchar_t *restrict, const wchar_t *restrict,
  162. va_list);
  163. int vwprintf(const wchar_t *restrict, va_list);
  164. int vwscanf(const wchar_t *restrict, va_list);
  165. wchar_t *wcpcpy(wchar_t *restrict, const wchar_t *restrict);
  166. wchar_t *wcpncpy(wchar_t *restrict, const wchar_t *restrict, size_t);
  167. size_t wcrtomb(char *restrict, wchar_t, mbstate_t *restrict);
  168. int wcscasecmp(const wchar_t *, const wchar_t *);
  169. int wcscasecmp_l(const wchar_t *, const wchar_t *, locale_t);
  170. wchar_t *wcscat(wchar_t *restrict, const wchar_t *restrict);
  171. wchar_t *wcschr(const wchar_t *, wchar_t);
  172. int wcscmp(const wchar_t *, const wchar_t *);
  173. int wcscoll(const wchar_t *, const wchar_t *);
  174. int wcscoll_l(const wchar_t *, const wchar_t *, locale_t);
  175. wchar_t *wcscpy(wchar_t *restrict, const wchar_t *restrict);
  176. size_t wcscspn(const wchar_t *, const wchar_t *);
  177. wchar_t *wcsdup(const wchar_t *);
  178. size_t wcsftime(wchar_t *restrict, size_t,
  179. const wchar_t *restrict, const struct tm *restrict);
  180. size_t wcslen(const wchar_t *);
  181. int wcsncasecmp(const wchar_t *, const wchar_t *, size_t);
  182. int wcsncasecmp_l(const wchar_t *, const wchar_t *, size_t,
  183. locale_t);
  184. wchar_t *wcsncat(wchar_t *restrict, const wchar_t *restrict, size_t);
  185. int wcsncmp(const wchar_t *, const wchar_t *, size_t);
  186. wchar_t *wcsncpy(wchar_t *restrict, const wchar_t *restrict, size_t);
  187. size_t wcsnlen(const wchar_t *, size_t);
  188. size_t wcsnrtombs(char *restrict, const wchar_t **restrict, size_t,
  189. size_t, mbstate_t *restrict);
  190. wchar_t *wcspbrk(const wchar_t *, const wchar_t *);
  191. wchar_t *wcsrchr(const wchar_t *, wchar_t);
  192. size_t wcsrtombs(char *restrict, const wchar_t **restrict,
  193. size_t, mbstate_t *restrict);
  194. size_t wcsspn(const wchar_t *, const wchar_t *);
  195. wchar_t *wcsstr(const wchar_t *restrict, const wchar_t *restrict);
  196. double wcstod(const wchar_t *restrict, wchar_t **restrict);
  197. float wcstof(const wchar_t *restrict, wchar_t **restrict);
  198. wchar_t *wcstok(wchar_t *restrict, const wchar_t *restrict,
  199. wchar_t **restrict);
  200. long wcstol(const wchar_t *restrict, wchar_t **restrict, int);
  201. long double wcstold(const wchar_t *restrict, wchar_t **restrict);
  202. long long wcstoll(const wchar_t *restrict, wchar_t **restrict, int);
  203. unsigned long wcstoul(const wchar_t *restrict, wchar_t **restrict, int);
  204. unsigned long long
  205. wcstoull(const wchar_t *restrict, wchar_t **restrict, int);
  206. int wcswidth(const wchar_t *, size_t);
  207. size_t wcsxfrm(wchar_t *restrict, const wchar_t *restrict, size_t);
  208. size_t wcsxfrm_l(wchar_t *restrict, const wchar_t *restrict,
  209. size_t, locale_t);
  210. int wctob(wint_t);
  211. wctype_t wctype(const char *);
  212. int wcwidth(wchar_t);
  213. wchar_t *wmemchr(const wchar_t *, wchar_t, size_t);
  214. int wmemcmp(const wchar_t *, const wchar_t *, size_t);
  215. wchar_t *wmemcpy(wchar_t *restrict, const wchar_t *restrict, size_t);
  216. wchar_t *wmemmove(wchar_t *, const wchar_t *, size_t);
  217. wchar_t *wmemset(wchar_t *, wchar_t, size_t);
  218. int wprintf(const wchar_t *restrict, ...);
  219. int wscanf(const wchar_t *restrict, ...);
  220. .fi
  221. .P
  222. .RE
  223. .LP
  224. .IR "The following sections are informative."
  225. .SH "APPLICATION USAGE"
  226. The
  227. \fIiswblank\fR()
  228. function was a late addition to the ISO\ C standard and was introduced at the same
  229. time as the ISO\ C standard introduced
  230. .IR <wctype.h> ,
  231. which contains all of the
  232. .IR isw* (\|)
  233. functions. The Open Group Base Specifications had previously aligned
  234. with the MSE working draft and had introduced the rest of the
  235. .IR isw* (\|)
  236. functions into
  237. .IR <wchar.h> .
  238. For backwards-compatibility, the original set of
  239. .IR isw* (\|)
  240. functions, without
  241. \fIiswblank\fR(),
  242. are permitted (as part of the XSI option) in
  243. .IR <wchar.h> .
  244. For maximum portability, applications should include
  245. .IR <wctype.h>
  246. in order to obtain declarations for the
  247. .IR isw* (\|)
  248. functions. This compatibility has been made obsolescent.
  249. .SH RATIONALE
  250. In the ISO\ C standard, the symbols referenced as XSI extensions are in
  251. .IR <wctype.h> .
  252. Their presence here is thus an extension.
  253. .SH "FUTURE DIRECTIONS"
  254. None.
  255. .SH "SEE ALSO"
  256. .IR "\fB<ctype.h>\fP",
  257. .IR "\fB<locale.h>\fP",
  258. .IR "\fB<stdarg.h>\fP",
  259. .IR "\fB<stddef.h>\fP",
  260. .IR "\fB<stdint.h>\fP",
  261. .IR "\fB<stdio.h>\fP",
  262. .IR "\fB<stdlib.h>\fP",
  263. .IR "\fB<string.h>\fP",
  264. .IR "\fB<time.h>\fP",
  265. .IR "\fB<wctype.h>\fP"
  266. .P
  267. .ad l
  268. The System Interfaces volume of POSIX.1\(hy2017,
  269. .IR "Section 2.2" ", " "The Compilation Environment",
  270. .IR "\fIbtowc\fR\^(\|)",
  271. .IR "\fIconfstr\fR\^(\|)",
  272. .IR "\fIfgetwc\fR\^(\|)",
  273. .IR "\fIfgetws\fR\^(\|)",
  274. .IR "\fIfputwc\fR\^(\|)",
  275. .IR "\fIfputws\fR\^(\|)",
  276. .IR "\fIfwide\fR\^(\|)",
  277. .IR "\fIfwprintf\fR\^(\|)",
  278. .IR "\fIfwscanf\fR\^(\|)",
  279. .IR "\fIgetwc\fR\^(\|)",
  280. .IR "\fIgetwchar\fR\^(\|)",
  281. .IR "\fIiswalnum\fR\^(\|)",
  282. .IR "\fIiswalpha\fR\^(\|)",
  283. .IR "\fIiswcntrl\fR\^(\|)",
  284. .IR "\fIiswctype\fR\^(\|)",
  285. .IR "\fIiswdigit\fR\^(\|)",
  286. .IR "\fIiswgraph\fR\^(\|)",
  287. .IR "\fIiswlower\fR\^(\|)",
  288. .IR "\fIiswprint\fR\^(\|)",
  289. .IR "\fIiswpunct\fR\^(\|)",
  290. .IR "\fIiswspace\fR\^(\|)",
  291. .IR "\fIiswupper\fR\^(\|)",
  292. .IR "\fIiswxdigit\fR\^(\|)",
  293. .IR "\fImbrlen\fR\^(\|)",
  294. .IR "\fImbrtowc\fR\^(\|)",
  295. .IR "\fImbsinit\fR\^(\|)",
  296. .IR "\fImbsrtowcs\fR\^(\|)",
  297. .IR "\fIopen_memstream\fR\^(\|)",
  298. .IR "\fIputwc\fR\^(\|)",
  299. .IR "\fIputwchar\fR\^(\|)",
  300. .IR "\fItowlower\fR\^(\|)",
  301. .IR "\fItowupper\fR\^(\|)",
  302. .IR "\fIungetwc\fR\^(\|)",
  303. .IR "\fIvfwprintf\fR\^(\|)",
  304. .IR "\fIvfwscanf\fR\^(\|)",
  305. .IR "\fIwcrtomb\fR\^(\|)",
  306. .IR "\fIwcscasecmp\fR\^(\|)",
  307. .IR "\fIwcscat\fR\^(\|)",
  308. .IR "\fIwcschr\fR\^(\|)",
  309. .IR "\fIwcscmp\fR\^(\|)",
  310. .IR "\fIwcscoll\fR\^(\|)",
  311. .IR "\fIwcscpy\fR\^(\|)",
  312. .IR "\fIwcscspn\fR\^(\|)",
  313. .IR "\fIwcsdup\fR\^(\|)",
  314. .IR "\fIwcsftime\fR\^(\|)",
  315. .IR "\fIwcslen\fR\^(\|)",
  316. .IR "\fIwcsncat\fR\^(\|)",
  317. .IR "\fIwcsncmp\fR\^(\|)",
  318. .IR "\fIwcsncpy\fR\^(\|)",
  319. .IR "\fIwcspbrk\fR\^(\|)",
  320. .IR "\fIwcsrchr\fR\^(\|)",
  321. .IR "\fIwcsrtombs\fR\^(\|)",
  322. .IR "\fIwcsspn\fR\^(\|)",
  323. .IR "\fIwcsstr\fR\^(\|)",
  324. .IR "\fIwcstod\fR\^(\|)",
  325. .IR "\fIwcstok\fR\^(\|)",
  326. .IR "\fIwcstol\fR\^(\|)",
  327. .IR "\fIwcstoul\fR\^(\|)",
  328. .IR "\fIwcswidth\fR\^(\|)",
  329. .IR "\fIwcsxfrm\fR\^(\|)",
  330. .IR "\fIwctob\fR\^(\|)",
  331. .IR "\fIwctype\fR\^(\|)",
  332. .IR "\fIwcwidth\fR\^(\|)",
  333. .IR "\fIwmemchr\fR\^(\|)",
  334. .IR "\fIwmemcmp\fR\^(\|)",
  335. .IR "\fIwmemcpy\fR\^(\|)",
  336. .IR "\fIwmemmove\fR\^(\|)",
  337. .IR "\fIwmemset\fR\^(\|)"
  338. .ad b
  339. .P
  340. The Shell and Utilities volume of POSIX.1\(hy2017,
  341. .IR "\fIgetconf\fR\^"
  342. .\"
  343. .SH COPYRIGHT
  344. Portions of this text are reprinted and reproduced in electronic form
  345. from IEEE Std 1003.1-2017, Standard for Information Technology
  346. -- Portable Operating System Interface (POSIX), The Open Group Base
  347. Specifications Issue 7, 2018 Edition,
  348. Copyright (C) 2018 by the Institute of
  349. Electrical and Electronics Engineers, Inc and The Open Group.
  350. In the event of any discrepancy between this version and the original IEEE and
  351. The Open Group Standard, the original IEEE and The Open Group Standard
  352. is the referee document. The original Standard can be obtained online at
  353. http://www.opengroup.org/unix/online.html .
  354. .PP
  355. Any typographical or formatting errors that appear
  356. in this page are most likely
  357. to have been introduced during the conversion of the source files to
  358. man page format. To report such errors, see
  359. https://www.kernel.org/doc/man-pages/reporting_bugs.html .