TP 13 exo2: Implement the missing bits to do a full game.
[TD_C.git] / TP_13 / exo1 / lib / utils.c
CommitLineData
475ee86d
JB
1#include <stdio.h>
2
33b9c646
JB
3#include "utils.h"
4
0139cafd 5void swap_int(int* v1, int* v2) {
33b9c646
JB
6 int tmp = *v1;
7 *v1 = *v2;
8 *v2 = tmp;
9}
10
11void swap_ptr(void* v1, void* v2) {
12 void* tmp = v1;
13 v1 = v2;
14 v2 = tmp;
15}