SWAB(3) Linux Programmer's Manual SWAB(3)NAME
swab - swap adjacent bytes
SYNOPSIS
#define _XOPEN_SOURCE /* See feature_test_macros(7) */
#include <unistd.h>
void swab(const void *from, void *to, ssize_t n);
DESCRIPTION
The swab() function copies n bytes from the array pointed to by from to the array pointed to by to, exchanging adjacent even and odd bytes.
This function is used to exchange data between machines that have different low/high byte ordering.
This function does nothing when n is negative. When n is positive and odd, it handles n-1 bytes as above, and does something unspecified
with the last byte. (In other words, n should be even.)
RETURN VALUE
The swab() function returns no value.
CONFORMING TO
SVr4, 4.3BSD, POSIX.1-2001.
SEE ALSO bstring(3)COLOPHON
This page is part of release 3.53 of the Linux man-pages project. A description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
2001-12-15 SWAB(3)
Check Out this Related Man Page
swab(3) Library Functions Manual swab(3)NAME
swab - Swaps bytes
LIBRARY
Standard C Library (libc.so, libc.a)
SYNOPSIS
#include <unistd.h>
void swab(
const void *src,
void *dest,
ssize_t nbytes);
The following definition of the swab() function does not conform to current standards and is supported only for System V compatibility:
void swab(
const char *from,
char *to,
int nbytes);
STANDARDS
Interfaces documented on this reference page conform to industry standards as follows:
swab(): XPG4, XPG4-UNIX
Refer to the standards(5) reference page for more information about industry standards and associated tags.
PARAMETERS
Points to the location of the string to copy. Points to the location to which the resulting string is copied. Specifies the number of
bytes to be copied. The nbytes parameter should have an even value. When the nbytes parameter is odd, the swab() function uses nbytes-1
instead. For the System V version of the swab() function, nbytes must also be non-negative. If nbytes is negative, nothing is done.
DESCRIPTION
The swab() function copies the number of bytes specified by the nbytes parameter from the location pointed to by the src parameter to the
array pointed to by the dest parameter, exchanging adjacent bytes. If copying takes place between objects that overlap, the behavior is
undefined.
RELATED INFORMATION
Standards: standards(5) delim off
swab(3)
Hi everybody,
I met this week a problem.
For now, we used TRU64 system based on alpha. Now, we're installing UP-UX systems (on Itanium). And we have problem with our files. Indeed, we use file with COMP-3, COMP-5 data. These files are used on both platforms. (we use also TXT files which... (1 Reply)
I hope someone can provide some suggestions on my problem.
I'm trying to read some catridge tapes created (tar or dd format) from SUN or SGI onto an ancient AT&T Unix System V/386 Rel 3.2 machine. But everything I tried to read in the tape on the AT&T machine there is this error message... (1 Reply)
Hi,
How can i determine the /dev/scd0 is bootable or not from command-line with single-line command according to ElTorito specification or something else?
Regards, (2 Replies)
Hi ,
I have a following code ,I need to send two files on FTP server using single code
UDL_FTIHOST_1=podftiapp02.com
UDL_FTIUSER_1=dbsunny
UDL_FTIPWD_1=sunny@11
UDL_FTIHOST_2=podftiapp01.com
UDL_FTIUSER_2=dbamy
UDL_FTIPWD_2=amy@12
count=2
i=1
while
do
FTIHOST=$(echo... (3 Replies)
Hello,
I have Solaris 10 U13 and I try to burn an ISO image.
First try:
# cdrw -i myfile.iso
Looking for CD devices...
Device not ready.
Second try:
# cdrecord dev=0,0,0 -v -multi -pad -data myfile.iso
cdrecord: No write mode specified.
cdrecord: Asuming -tao mode.... (3 Replies)
Hi Comrades,
I am interested if there is the global internet network I can find free access to the Linux or unix server to create the own account to have some practice.
Thanks a lot for your advice and comments.
BR,
Dembi (2 Replies)