delorie.com/djgpp/doc/libc/libc_789.html   search  
libc.a reference

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

swab

Syntax

 
#include <stdlib.h>

void swab(const void *from, void *to, int nbytes);

Description

This function copies nbytes bytes from the address pointed to by from to the address pointed by to, exchanging adjacent even and odd bytes. It is useful for carrying binary data between little-endian and big-endian machines. The argument nbytes should be even, and the buffers from and to should not overlap.

Return Value

None.

Portability

ANSI/ISO C No
POSIX No


  webmaster     delorie software   privacy  
  Copyright © 2004     Updated Apr 2004