Usage
#include <publib.h>
void memswap(void *block1, void *block2, size_t n);
Overview
memswap will swap the contents of the two blocks pointed by its first two arguments. The last argument gives the size of the memory blocks.
Examples
To swap two structs, one might do the following.
struct tm tm1, tm2;
memswap(&tm1, &tm2, sizeof(struct tm));