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

freelocale.3p (2656B)


  1. '\" et
  2. .TH FREELOCALE "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. freelocale
  12. \(em free resources allocated for a locale object
  13. .SH SYNOPSIS
  14. .LP
  15. .nf
  16. #include <locale.h>
  17. .P
  18. void freelocale(locale_t \fIlocobj\fP);
  19. .fi
  20. .SH DESCRIPTION
  21. The
  22. \fIfreelocale\fR()
  23. function shall cause the resources allocated for a locale object
  24. returned by a call to the
  25. \fInewlocale\fR()
  26. or
  27. \fIduplocale\fR()
  28. functions to be released.
  29. .P
  30. The behavior is undefined if the
  31. .IR locobj
  32. argument is the special locale object LC_GLOBAL_LOCALE or is not a valid
  33. locale object handle.
  34. .P
  35. Any use of a locale object that has been freed results in undefined
  36. behavior.
  37. .SH "RETURN VALUE"
  38. None.
  39. .SH ERRORS
  40. None.
  41. .LP
  42. .IR "The following sections are informative."
  43. .SH EXAMPLES
  44. .SS "Freeing Up a Locale Object"
  45. .P
  46. The following example shows a code fragment to free a locale object
  47. created by
  48. \fInewlocale\fR():
  49. .sp
  50. .RS 4
  51. .nf
  52. #include <locale.h>
  53. \&...
  54. .P
  55. /* Every locale object allocated with newlocale() should be
  56. * freed using freelocale():
  57. */
  58. .P
  59. locale_t loc;
  60. .P
  61. /* Get the locale. */
  62. .P
  63. loc = newlocale (LC_CTYPE_MASK | LC_TIME_MASK, "locname", NULL);
  64. .P
  65. /* ... Use the locale object ... */
  66. \&...
  67. .P
  68. /* Free the locale object resources. */
  69. freelocale (loc);
  70. .fi
  71. .P
  72. .RE
  73. .SH "APPLICATION USAGE"
  74. None.
  75. .SH RATIONALE
  76. None.
  77. .SH "FUTURE DIRECTIONS"
  78. None.
  79. .SH "SEE ALSO"
  80. .IR "\fIduplocale\fR\^(\|)",
  81. .IR "\fInewlocale\fR\^(\|)",
  82. .IR "\fIuselocale\fR\^(\|)"
  83. .P
  84. The Base Definitions volume of POSIX.1\(hy2017,
  85. .IR "\fB<locale.h>\fP"
  86. .\"
  87. .SH COPYRIGHT
  88. Portions of this text are reprinted and reproduced in electronic form
  89. from IEEE Std 1003.1-2017, Standard for Information Technology
  90. -- Portable Operating System Interface (POSIX), The Open Group Base
  91. Specifications Issue 7, 2018 Edition,
  92. Copyright (C) 2018 by the Institute of
  93. Electrical and Electronics Engineers, Inc and The Open Group.
  94. In the event of any discrepancy between this version and the original IEEE and
  95. The Open Group Standard, the original IEEE and The Open Group Standard
  96. is the referee document. The original Standard can be obtained online at
  97. http://www.opengroup.org/unix/online.html .
  98. .PP
  99. Any typographical or formatting errors that appear
  100. in this page are most likely
  101. to have been introduced during the conversion of the source files to
  102. man page format. To report such errors, see
  103. https://www.kernel.org/doc/man-pages/reporting_bugs.html .