wnswap(3)

wnswap3

Swap 2 variables

Usage

#include <wn/wnswap.h>

wn_swap(a,b,type)

Overview

wn_swap is a macro which swaps a and b. a and b must be of type type. type is used to declare a temporary.

Examples

{
int a,b;
wn_swap(a,b,int);
}
{
ptr p1,p2;
wn_swap(p1,p2,ptr);
}
{
char *p1,*p2;
wn_swap(p1,p2,char *);
}

Releases

Unchanged in 5 releases since Debian 2.1 (Slink).

  1. 2.1–4.0

Author

Will Naylor

From libwn-dev 6.0-17 in Debian 4.0 (Etch). Parsed by carta from the page's man source.