Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ swab(3) — Digital UNIX 3.2c

Media Vault

Software Library

Restoration Projects

Artifacts Sought

swab(3)  —  Subroutines

NAME

swab − Swaps bytes

LIBRARY

Standard C Library (libc.a)
System V Compatibility Library (libsys5.a)

SYNOPSIS

#include <unistd.h>

void swab(
        const void ∗src,
        void ∗dest,
        size_t nbytes);

System V compatibility interface:

#include <unistd.h>

void swab(
        const char ∗from,
        char ∗to,
        int nbytes);

PARAMETERS

srcPoints to the location of the string to copy. 

destPoints to the location to which the resulting string is copied. 

nbytesSpecifies 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. 

NOTES

To use the System V version of swab(), you must link with the libsys5 library before you link with libc. 

AES Support Level:
Trial use.

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026