summaryrefslogtreecommitdiffstats
path: root/lib/libc/string/wcscat.3
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/string/wcscat.3')
-rw-r--r--lib/libc/string/wcscat.332
1 files changed, 27 insertions, 5 deletions
diff --git a/lib/libc/string/wcscat.3 b/lib/libc/string/wcscat.3
index c5321d5a2a3..d0281b8bd1a 100644
--- a/lib/libc/string/wcscat.3
+++ b/lib/libc/string/wcscat.3
@@ -1,3 +1,5 @@
+.\" $OpenBSD: wcscat.3,v 1.2 2011/07/25 00:38:53 schwarze Exp $
+.\"
.\" Copyright (c) 1990, 1991 The Regents of the University of California.
.\" All rights reserved.
.\"
@@ -29,9 +31,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $OpenBSD: wcscat.3,v 1.1 2011/07/09 16:32:11 nicm Exp $
-.\"
-.Dd $Mdocdate: July 9 2011 $
+.Dd $Mdocdate: July 25 2011 $
.Dt WCSCAT 3
.Os
.Sh NAME
@@ -43,7 +43,7 @@
.Ft wchar_t *
.Fn wcscat "wchar_t * restrict s" "const wchar_t * restrict append"
.Ft wchar_t *
-.Fo strncat
+.Fo wcsncat
.Fa "wchar_t * restrict s"
.Fa "const wchar_t * restrict append"
.Fa "size_t count"
@@ -77,8 +77,9 @@ and
functions return the pointer
.Fa s .
.Sh SEE ALSO
+.Xr strcat 3 ,
+.Xr strlcpy 3 ,
.Xr wcscpy 3 ,
-.Xr wcslcat 3 ,
.Xr wcslcpy 3 ,
.Xr wmemcpy 3 ,
.Xr wmemmove 3
@@ -91,3 +92,24 @@ functions conform to
.St -isoC-99
and were first introduced in
.St -isoC-amd1 .
+.Sh HISTORY
+The
+.Fn wcscat
+and
+.Fn wcsncat
+functions were ported from
+.Nx
+and first appeared in
+.Ox 3.8 .
+.Sh CAVEATS
+Using the functions
+.Fn wcscat
+and
+.Fn wcsncat
+is very error-prone with respect to buffer overflows;
+see the EXAMPLES section in
+.Xr strcat 3
+for correct usage.
+Using
+.Xr wcslcat 3
+is a better choice in most cases.