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

locale.h.0p (4600B)


  1. '\" et
  2. .TH locale.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. locale.h
  12. \(em category macros
  13. .SH SYNOPSIS
  14. .LP
  15. .nf
  16. #include <locale.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 <locale.h>
  27. header shall define the
  28. .BR lconv
  29. structure, which shall include at least the following members.
  30. (See the definitions of
  31. .IR LC_MONETARY
  32. in
  33. .IR "Section 7.3.3" ", " "LC_MONETARY"
  34. and
  35. .IR "Section 7.3.4" ", " "LC_NUMERIC".)
  36. .sp
  37. .RS 4
  38. .nf
  39. char *currency_symbol
  40. char *decimal_point
  41. char frac_digits
  42. char *grouping
  43. char *int_curr_symbol
  44. char int_frac_digits
  45. char int_n_cs_precedes
  46. char int_n_sep_by_space
  47. char int_n_sign_posn
  48. char int_p_cs_precedes
  49. char int_p_sep_by_space
  50. char int_p_sign_posn
  51. char *mon_decimal_point
  52. char *mon_grouping
  53. char *mon_thousands_sep
  54. char *negative_sign
  55. char n_cs_precedes
  56. char n_sep_by_space
  57. char n_sign_posn
  58. char *positive_sign
  59. char p_cs_precedes
  60. char p_sep_by_space
  61. char p_sign_posn
  62. char *thousands_sep
  63. .fi
  64. .P
  65. .RE
  66. .P
  67. The
  68. .IR <locale.h>
  69. header shall define NULL (as described in
  70. .IR <stddef.h> )
  71. and at least the following as macros:
  72. .P
  73. .nf
  74. LC_ALL
  75. LC_COLLATE
  76. LC_CTYPE
  77. LC_MESSAGES
  78. LC_MONETARY
  79. LC_NUMERIC
  80. LC_TIME
  81. .fi
  82. .P
  83. which shall expand to integer constant expressions with distinct
  84. values for use as the first argument to the
  85. \fIsetlocale\fR()
  86. function.
  87. .P
  88. Additional macro definitions, beginning with the characters
  89. .IR LC_
  90. and an uppercase letter, may also be specified by the implementation.
  91. .P
  92. The
  93. .IR <locale.h>
  94. header shall contain at least the following macros representing
  95. bitmasks for use with the
  96. \fInewlocale\fR()
  97. function for each supported locale category:
  98. LC_COLLATE_MASK
  99. LC_CTYPE_MASK
  100. LC_MESSAGES_MASK
  101. LC_MONETARY_MASK
  102. LC_NUMERIC_MASK
  103. LC_TIME_MASK
  104. .P
  105. In addition, a macro to set the bits for all categories set shall be
  106. defined:
  107. LC_ALL_MASK
  108. .P
  109. The
  110. .IR <locale.h>
  111. header shall define LC_GLOBAL_LOCALE, a special locale object descriptor
  112. used by the
  113. \fIduplocale\fR()
  114. and
  115. \fIuselocale\fR()
  116. functions.
  117. .P
  118. The
  119. .IR <locale.h>
  120. header shall define the
  121. .BR locale_t
  122. type, representing a locale object.
  123. .P
  124. The following shall be declared as functions and may also be defined as
  125. macros. Function prototypes shall be provided for use with ISO\ C standard
  126. compilers.
  127. .sp
  128. .RS 4
  129. .nf
  130. locale_t duplocale(locale_t);
  131. void freelocale(locale_t);
  132. struct lconv *localeconv(void);
  133. locale_t newlocale(int, const char *, locale_t);
  134. char *setlocale(int, const char *);
  135. locale_t uselocale (locale_t);
  136. .fi
  137. .P
  138. .RE
  139. .LP
  140. .IR "The following sections are informative."
  141. .SH "APPLICATION USAGE"
  142. None.
  143. .SH RATIONALE
  144. It is suggested that each category macro name for use in
  145. \fIsetlocale\fR()
  146. have a corresponding macro name ending in
  147. .IR _MASK
  148. for use in
  149. \fInewlocale\fR().
  150. .SH "FUTURE DIRECTIONS"
  151. None.
  152. .SH "SEE ALSO"
  153. .IR "Chapter 8" ", " "Environment Variables",
  154. .IR "\fB<stddef.h>\fP"
  155. .P
  156. The System Interfaces volume of POSIX.1\(hy2017,
  157. .IR "\fIduplocale\fR\^(\|)",
  158. .IR "\fIfreelocale\fR\^(\|)",
  159. .IR "\fIlocaleconv\fR\^(\|)",
  160. .IR "\fInewlocale\fR\^(\|)",
  161. .IR "\fIsetlocale\fR\^(\|)",
  162. .IR "\fIuselocale\fR\^(\|)"
  163. .\"
  164. .SH COPYRIGHT
  165. Portions of this text are reprinted and reproduced in electronic form
  166. from IEEE Std 1003.1-2017, Standard for Information Technology
  167. -- Portable Operating System Interface (POSIX), The Open Group Base
  168. Specifications Issue 7, 2018 Edition,
  169. Copyright (C) 2018 by the Institute of
  170. Electrical and Electronics Engineers, Inc and The Open Group.
  171. In the event of any discrepancy between this version and the original IEEE and
  172. The Open Group Standard, the original IEEE and The Open Group Standard
  173. is the referee document. The original Standard can be obtained online at
  174. http://www.opengroup.org/unix/online.html .
  175. .PP
  176. Any typographical or formatting errors that appear
  177. in this page are most likely
  178. to have been introduced during the conversion of the source files to
  179. man page format. To report such errors, see
  180. https://www.kernel.org/doc/man-pages/reporting_bugs.html .