summaryrefslogtreecommitdiff
path: root/static/unix-v10/man3/swab.3
blob: d84df35ebccab7d5eb7ad9c43022d92ef8e3d863 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
.TH SWAB 3
.CT 2 data_man
.SH NAME
swab \(mi swap bytes
.SH SYNOPSIS
.nf
.B swab(from, to, nbytes)
.B char *from, *to;
.fi
.SH DESCRIPTION
.I Swab
copies
.I nbytes
bytes pointed to by
.I from
to the position pointed to by
.I to,
exchanging adjacent even and odd bytes.
It is useful for carrying binary data between
machines with different byte orders.
.I Nbytes
should be even.