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

towctrans.3p (4123B)


  1. '\" et
  2. .TH TOWCTRANS "3P" 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. towctrans,
  12. towctrans_l
  13. \(em wide-character transliteration
  14. .SH SYNOPSIS
  15. .LP
  16. .nf
  17. #include <wctype.h>
  18. .P
  19. wint_t towctrans(wint_t \fIwc\fP, wctrans_t \fIdesc\fP);
  20. wint_t towctrans_l(wint_t \fIwc\fP, wctrans_t \fIdesc\fP,
  21. locale_t \fIlocale\fP);
  22. .fi
  23. .SH DESCRIPTION
  24. For
  25. \fItowctrans\fR():
  26. The functionality described on this reference page is aligned with the
  27. ISO\ C standard. Any conflict between the requirements described here and the
  28. ISO\ C standard is unintentional. This volume of POSIX.1\(hy2017 defers to the ISO\ C standard.
  29. .P
  30. The
  31. \fItowctrans\fR()
  32. and
  33. \fItowctrans_l\fR()
  34. functions shall transliterate the wide-character code
  35. .IR wc
  36. using the mapping described by
  37. .IR desc .
  38. .P
  39. The current setting of the
  40. .IR LC_CTYPE
  41. category in the current locale
  42. or in the locale represented by
  43. .IR locale ,
  44. respectively, should be the same as during the call to
  45. \fIwctrans\fR()
  46. or
  47. \fIwctrans_l\fR()
  48. that returned the value
  49. .IR desc .
  50. .P
  51. If the value of
  52. .IR desc
  53. is invalid (that is, not obtained by a call to
  54. \fIwctrans\fR()
  55. or
  56. .IR desc
  57. is invalidated by a subsequent call to
  58. \fIsetlocale\fR()
  59. that has affected category
  60. .IR LC_CTYPE ),
  61. the result is unspecified.
  62. .P
  63. If the value of
  64. .IR desc
  65. is invalid (that is, not obtained by a call to
  66. \fIwctrans_l\fR()
  67. with the same locale object
  68. .IR locale )
  69. the result is unspecified.
  70. .P
  71. An application wishing to check for error situations should set
  72. .IR errno
  73. to 0 before calling
  74. \fItowctrans\fR()
  75. or
  76. \fItowctrans_l\fR().
  77. .P
  78. If
  79. .IR errno
  80. is non-zero on return, an error has occurred.
  81. .P
  82. The behavior is undefined if the
  83. .IR locale
  84. argument to
  85. \fItowctrans_l\fR()
  86. is the special locale object LC_GLOBAL_LOCALE or is not a valid locale
  87. object handle.
  88. .SH "RETURN VALUE"
  89. If successful, the
  90. \fItowctrans\fR()
  91. and
  92. \fItowctrans_l\fR()
  93. functions shall return the mapped value of
  94. .IR wc
  95. using the mapping described by
  96. .IR desc .
  97. Otherwise, they shall return
  98. .IR wc
  99. unchanged.
  100. .SH ERRORS
  101. These functions may fail if:
  102. .TP
  103. .BR EINVAL
  104. .IR desc
  105. contains an invalid transliteration descriptor.
  106. .LP
  107. .IR "The following sections are informative."
  108. .SH EXAMPLES
  109. None.
  110. .SH "APPLICATION USAGE"
  111. The strings
  112. .BR \(dqtolower\(dq
  113. and
  114. .BR \(dqtoupper\(dq
  115. are reserved for the standard mapping names. In the table below, the
  116. functions in the left column are equivalent to the functions in the
  117. right column.
  118. .sp
  119. .RS 4
  120. .nf
  121. towlower(\fIwc\fP) towctrans(\fIwc\fP, wctrans("tolower"))
  122. towlower_l(\fIwc\fP, \fIlocale\fP) towctrans_l(\fIwc\fP, wctrans("tolower"), \fIlocale\fP)
  123. towupper(\fIwc\fP) towctrans(\fIwc\fP, wctrans("toupper"))
  124. towupper_l(\fIwc\fP, \fIlocale\fP) towctrans_l(\fIwc\fP, wctrans("toupper"), \fIlocale\fP)
  125. .fi
  126. .P
  127. .RE
  128. .SH RATIONALE
  129. None.
  130. .SH "FUTURE DIRECTIONS"
  131. None.
  132. .SH "SEE ALSO"
  133. .IR "\fItowlower\fR\^(\|)",
  134. .IR "\fItowupper\fR\^(\|)",
  135. .IR "\fIwctrans\fR\^(\|)"
  136. .P
  137. The Base Definitions volume of POSIX.1\(hy2017,
  138. .IR "\fB<wctype.h>\fP"
  139. .\"
  140. .SH COPYRIGHT
  141. Portions of this text are reprinted and reproduced in electronic form
  142. from IEEE Std 1003.1-2017, Standard for Information Technology
  143. -- Portable Operating System Interface (POSIX), The Open Group Base
  144. Specifications Issue 7, 2018 Edition,
  145. Copyright (C) 2018 by the Institute of
  146. Electrical and Electronics Engineers, Inc and The Open Group.
  147. In the event of any discrepancy between this version and the original IEEE and
  148. The Open Group Standard, the original IEEE and The Open Group Standard
  149. is the referee document. The original Standard can be obtained online at
  150. http://www.opengroup.org/unix/online.html .
  151. .PP
  152. Any typographical or formatting errors that appear
  153. in this page are most likely
  154. to have been introduced during the conversion of the source files to
  155. man page format. To report such errors, see
  156. https://www.kernel.org/doc/man-pages/reporting_bugs.html .