summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschwarze <>2014-12-12 20:06:13 +0000
committerschwarze <>2014-12-12 20:06:13 +0000
commitdb1b1946f7c531f0bd6a78322c13cda73600be71 (patch)
treeb8820fd4279da4f3608e707d2c7c3602de3d1266
parent0012c1a3c02aeb298228bfaac96cfded7ea02875 (diff)
downloadopenbsd-db1b1946f7c531f0bd6a78322c13cda73600be71.tar.gz
openbsd-db1b1946f7c531f0bd6a78322c13cda73600be71.tar.bz2
openbsd-db1b1946f7c531f0bd6a78322c13cda73600be71.zip
catch up with swab.c rev. 1.9:
update SYNOPSIS and DESCRIPTION and add STANDARDS
-rw-r--r--src/lib/libc/string/swab.328
1 files changed, 23 insertions, 5 deletions
diff --git a/src/lib/libc/string/swab.3 b/src/lib/libc/string/swab.3
index 77e5a9ccbc..57afdd4d79 100644
--- a/src/lib/libc/string/swab.3
+++ b/src/lib/libc/string/swab.3
@@ -25,9 +25,9 @@
25.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26.\" SUCH DAMAGE. 26.\" SUCH DAMAGE.
27.\" 27.\"
28.\" $OpenBSD: swab.3,v 1.8 2013/06/05 03:39:23 tedu Exp $ 28.\" $OpenBSD: swab.3,v 1.9 2014/12/12 20:06:13 schwarze Exp $
29.\" 29.\"
30.Dd $Mdocdate: June 5 2013 $ 30.Dd $Mdocdate: December 12 2014 $
31.Dt SWAB 3 31.Dt SWAB 3
32.Os 32.Os
33.Sh NAME 33.Sh NAME
@@ -36,7 +36,11 @@
36.Sh SYNOPSIS 36.Sh SYNOPSIS
37.In unistd.h 37.In unistd.h
38.Ft void 38.Ft void
39.Fn swab "const void *src" "void *dst" "size_t len" 39.Fo swab
40.Fa "const void *restrict src"
41.Fa "void *restrict dst"
42.Fa "ssize_t len"
43.Fc
40.Sh DESCRIPTION 44.Sh DESCRIPTION
41The function 45The function
42.Fn swab 46.Fn swab
@@ -48,12 +52,26 @@ to the location referenced by
48.Fa dst , 52.Fa dst ,
49swapping adjacent bytes. 53swapping adjacent bytes.
50.Pp 54.Pp
51The argument 55If
52.Fa len 56.Fa len
53must be an even number. 57is zero or less,
58.Nm
59does nothing.
60If it is odd, what happens to the last byte is unspecified.
61If
62.Fa src
63and
64.Fa dst
65overlap, behaviour is undefined.
54.Sh SEE ALSO 66.Sh SEE ALSO
55.Xr bzero 3 , 67.Xr bzero 3 ,
56.Xr memset 3 68.Xr memset 3
69.Sh STANDARDS
70The
71.Nm
72function is compliant with the X/Open System Interfaces option of the
73.St -p1003.1-2008
74specification.
57.Sh HISTORY 75.Sh HISTORY
58The 76The
59.Fn swab 77.Fn swab