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

wcsdup.3p (2679B)


  1. '\" et
  2. .TH WCSDUP "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. wcsdup
  12. \(em duplicate a wide-character string
  13. .SH SYNOPSIS
  14. .LP
  15. .nf
  16. #include <wchar.h>
  17. .P
  18. wchar_t *wcsdup(const wchar_t *\fIstring\fP);
  19. .fi
  20. .SH DESCRIPTION
  21. The
  22. \fIwcsdup\fR()
  23. function is the wide-character equivalent of the
  24. \fIstrdup\fR()
  25. function.
  26. .P
  27. The
  28. \fIwcsdup\fR()
  29. function shall return a pointer to a new wide-character string,
  30. allocated as if by a call to
  31. \fImalloc\fR(),
  32. which is the duplicate of the wide-character string
  33. .IR string .
  34. The returned pointer can be passed to
  35. \fIfree\fR().
  36. A null pointer is returned if the new wide-character string cannot be
  37. created.
  38. .SH "RETURN VALUE"
  39. Upon successful completion, the
  40. \fIwcsdup\fR()
  41. function shall return a pointer to the newly allocated wide-character
  42. string. Otherwise, it shall return a null pointer and set
  43. .IR errno
  44. to indicate the error.
  45. .SH ERRORS
  46. The
  47. \fIwcsdup\fR()
  48. function shall fail if:
  49. .TP
  50. .BR ENOMEM
  51. Memory large enough for the duplicate string could not be allocated.
  52. .LP
  53. .IR "The following sections are informative."
  54. .SH EXAMPLES
  55. None.
  56. .SH "APPLICATION USAGE"
  57. For functions that allocate memory as if by
  58. \fImalloc\fR(),
  59. the application should release such memory when it is no longer
  60. required by a call to
  61. \fIfree\fR().
  62. For
  63. \fIwcsdup\fR(),
  64. this is the return value.
  65. .SH RATIONALE
  66. None.
  67. .SH "FUTURE DIRECTIONS"
  68. None.
  69. .SH "SEE ALSO"
  70. .IR "\fIfree\fR\^(\|)",
  71. .IR "\fIstrdup\fR\^(\|)",
  72. .IR "\fIwcscpy\fR\^(\|)"
  73. .P
  74. The Base Definitions volume of POSIX.1\(hy2017,
  75. .IR "\fB<wchar.h>\fP"
  76. .\"
  77. .SH COPYRIGHT
  78. Portions of this text are reprinted and reproduced in electronic form
  79. from IEEE Std 1003.1-2017, Standard for Information Technology
  80. -- Portable Operating System Interface (POSIX), The Open Group Base
  81. Specifications Issue 7, 2018 Edition,
  82. Copyright (C) 2018 by the Institute of
  83. Electrical and Electronics Engineers, Inc and The Open Group.
  84. In the event of any discrepancy between this version and the original IEEE and
  85. The Open Group Standard, the original IEEE and The Open Group Standard
  86. is the referee document. The original Standard can be obtained online at
  87. http://www.opengroup.org/unix/online.html .
  88. .PP
  89. Any typographical or formatting errors that appear
  90. in this page are most likely
  91. to have been introduced during the conversion of the source files to
  92. man page format. To report such errors, see
  93. https://www.kernel.org/doc/man-pages/reporting_bugs.html .