Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

memccpy(3)

string(3)

swab(3)  —  Subroutines

OSF

NAME

swab −  Swaps bytes

LIBRARY

Standard C Library (libc.a)

SYNOPSIS

#include <string.h> void swab(
const char ∗src,
char ∗dest,
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 even nonnegative bytes to be copied.  The nbytes parameter should have an even nonnegative value.  When the nbytes parameter is odd positive, the swab() function uses nbytes-1 instead. When the nbytes parameter is negative, the swab() function does nothing. 

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 even and odd bytes. 

NOTES

AES Support Level:
Trial use

RETURN VALUES

The swab() function returns no values. 

RELATED INFORMATION

Functions: memccpy(3), string(3)

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