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

wcsncpy.3p (3258B)


  1. '\" et
  2. .TH WCSNCPY "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. wcpncpy, wcsncpy
  12. \(em copy a fixed-size wide-character string, returning a pointer
  13. to its end
  14. .SH SYNOPSIS
  15. .LP
  16. .nf
  17. #include <wchar.h>
  18. .P
  19. wchar_t *wcpncpy(wchar_t restrict *\fIws1\fP, const wchar_t *restrict \fIws2\fP,
  20. size_t \fIn\fP);
  21. wchar_t *wcsncpy(wchar_t *restrict \fIws1\fP, const wchar_t *restrict \fIws2\fP,
  22. size_t \fIn\fP);
  23. .fi
  24. .SH DESCRIPTION
  25. For
  26. \fIwcsncpy\fR():
  27. The functionality described on this reference page is aligned with the
  28. ISO\ C standard. Any conflict between the requirements described here and the
  29. ISO\ C standard is unintentional. This volume of POSIX.1\(hy2017 defers to the ISO\ C standard.
  30. .P
  31. The
  32. \fIwcpncpy\fR()
  33. and
  34. \fIwcsncpy\fR()
  35. functions shall copy not more than
  36. .IR n
  37. wide-character codes (wide-character codes that follow a null
  38. wide-character code are not copied) from the array pointed to by
  39. .IR ws2
  40. to the array pointed to by
  41. .IR ws1 .
  42. If copying takes place between objects that overlap, the behavior is
  43. undefined.
  44. .P
  45. If the array pointed to by
  46. .IR ws2
  47. is a wide-character string that is shorter than
  48. .IR n
  49. wide-character codes, null wide-character codes shall be appended to
  50. the copy in the array pointed to by
  51. .IR ws1 ,
  52. until
  53. .IR n
  54. wide-character codes in all are written.
  55. .SH "RETURN VALUE"
  56. If any null wide-character codes were written into the
  57. destination, the
  58. \fIwcpncpy\fR()
  59. function shall return the address of the first such null wide-character
  60. code. Otherwise, it shall return
  61. .IR &ws1 [ n ].
  62. .P
  63. The
  64. \fIwcsncpy\fR()
  65. function shall return
  66. .IR ws1 .
  67. .P
  68. No return values are reserved to indicate an error.
  69. .SH ERRORS
  70. No errors are defined.
  71. .LP
  72. .IR "The following sections are informative."
  73. .SH EXAMPLES
  74. None.
  75. .SH "APPLICATION USAGE"
  76. If there is no null wide-character code in the first
  77. .IR n
  78. wide-character codes of the array pointed to by
  79. .IR ws2 ,
  80. the result is not null-terminated.
  81. .SH RATIONALE
  82. None.
  83. .SH "FUTURE DIRECTIONS"
  84. None.
  85. .SH "SEE ALSO"
  86. .IR "\fIstrncpy\fR\^(\|)",
  87. .IR "\fIwcscpy\fR\^(\|)"
  88. .P
  89. The Base Definitions volume of POSIX.1\(hy2017,
  90. .IR "\fB<wchar.h>\fP"
  91. .\"
  92. .SH COPYRIGHT
  93. Portions of this text are reprinted and reproduced in electronic form
  94. from IEEE Std 1003.1-2017, Standard for Information Technology
  95. -- Portable Operating System Interface (POSIX), The Open Group Base
  96. Specifications Issue 7, 2018 Edition,
  97. Copyright (C) 2018 by the Institute of
  98. Electrical and Electronics Engineers, Inc and The Open Group.
  99. In the event of any discrepancy between this version and the original IEEE and
  100. The Open Group Standard, the original IEEE and The Open Group Standard
  101. is the referee document. The original Standard can be obtained online at
  102. http://www.opengroup.org/unix/online.html .
  103. .PP
  104. Any typographical or formatting errors that appear
  105. in this page are most likely
  106. to have been introduced during the conversion of the source files to
  107. man page format. To report such errors, see
  108. https://www.kernel.org/doc/man-pages/reporting_bugs.html .