]> git.saurik.com Git - apple/libc.git/blob - string/FreeBSD/swab.3.patch
Libc-763.12.tar.gz
[apple/libc.git] / string / FreeBSD / swab.3.patch
1 --- swab.3.orig 2010-02-24 20:50:11.000000000 -0800
2 +++ swab.3 2010-02-24 21:17:49.000000000 -0800
3 @@ -28,7 +28,7 @@
4 .\" @(#)swab.3 8.1 (Berkeley) 6/4/93
5 .\" $FreeBSD: src/lib/libc/string/swab.3,v 1.10 2007/01/09 00:28:12 imp Exp $
6 .\"
7 -.Dd December 10, 2004
8 +.Dd February 24, 2010
9 .Dt SWAB 3
10 .Os
11 .Sh NAME
12 @@ -39,24 +39,41 @@
13 .Sh SYNOPSIS
14 .In unistd.h
15 .Ft void
16 -.Fn swab "const void * restrict src" "void * restrict dst" "ssize_t len"
17 +.Fo swab
18 +.Fa "const void *restrict src"
19 +.Fa "void *restrict dest"
20 +.Fa "ssize_t nbytes"
21 +.Fc
22 .Sh DESCRIPTION
23 The function
24 .Fn swab
25 copies
26 -.Fa len
27 +.Fa nbytes
28 bytes from the location referenced by
29 .Fa src
30 to the location referenced by
31 -.Fa dst ,
32 +.Fa dest ,
33 swapping adjacent bytes.
34 .Pp
35 The argument
36 -.Fa len
37 -must be an even number.
38 +.Fa nbytes
39 +should be an even number. If
40 +.Fa nbytes
41 +is odd,
42 +.Fn swab
43 +copies and exchanges
44 +.Fa nbytes
45 +-1 bytes and the disposition of the last byte is unspecified.
46 +If copying takes place between objects that overlap,
47 +the behavior is undefined. If
48 +.Fa nbytes
49 +is negative,
50 +.Fn swab
51 +does nothing.
52 .Sh SEE ALSO
53 .Xr bzero 3 ,
54 -.Xr memset 3
55 +.Xr memset 3 ,
56 +.Xr compat 5
57 .Sh HISTORY
58 A
59 .Fn swab