#include "swap.h"

#include <stdlib.h>
#include <string.h>

void swap_loop(char* restrict a, char* restrict b, size_t len) {
    while (len--) {
        char tmp = *a;
        *a++     = *b;
        *b++     = tmp;
    };
}

void swap_malloc(char* restrict a, char* restrict b, size_t len) {
    char *temp = malloc(len);
    memmove(temp,a,len);
    memmove(a,b,len);
    memmove(b,temp,len);
    free(temp);
}

void swap_alloca(char* restrict a, char* restrict b, size_t len) {
    char temp[len];
    memmove(temp,a,len);
    memmove(a,b,len);
    memmove(b,temp,len);
}
