1SWAB(P)                    POSIX Programmer's Manual                   SWAB(P)
2
3
4

NAME

6       swab - swap bytes
7

SYNOPSIS

9       #include <unistd.h>
10
11       void swab(const void *restrict src, void *restrict dest,
12              ssize_t nbytes);
13
14

DESCRIPTION

16       The  swab()  function  shall copy nbytes bytes, which are pointed to by
17       src, to the object pointed to by dest, exchanging adjacent  bytes.  The
18       nbytes  argument  should  be  even. If nbytes is odd, swab() copies and
19       exchanges nbytes-1 bytes and  the  disposition  of  the  last  byte  is
20       unspecified.  If  copying takes place between objects that overlap, the
21       behavior is undefined. If nbytes is negative, swab() does nothing.
22

RETURN VALUE

24       None.
25

ERRORS

27       No errors are defined.
28
29       The following sections are informative.
30

EXAMPLES

32       None.
33

APPLICATION USAGE

35       None.
36

RATIONALE

38       None.
39

FUTURE DIRECTIONS

41       None.
42

SEE ALSO

44       The Base Definitions volume of IEEE Std 1003.1-2001, <unistd.h>
45
47       Portions of this text are reprinted and reproduced in  electronic  form
48       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
49       -- Portable Operating System Interface (POSIX),  The  Open  Group  Base
50       Specifications  Issue  6,  Copyright  (C) 2001-2003 by the Institute of
51       Electrical and Electronics Engineers, Inc and The Open  Group.  In  the
52       event of any discrepancy between this version and the original IEEE and
53       The Open Group Standard, the original IEEE and The Open Group  Standard
54       is  the  referee document. The original Standard can be obtained online
55       at http://www.opengroup.org/unix/online.html .
56
57
58
59IEEE/The Open Group                  2003                              SWAB(P)
Impressum