sav

Sorting Algorithms Visualized
Index Commits Files Refs README LICENSE
util.c (211B)
   1 #include "util.h"
   2 
   3 #include <stdio.h>
   4 #include <stdlib.h>
   5 
   6 void end(const char *msg) {
   7     fprintf(stderr, "%s\n", msg);
   8     exit(1);
   9 }
  10 
  11 void swap(int *a, int *b)
  12 {
  13     int tmp;
  14     tmp = (*a);
  15     (*a) = (*b);
  16     (*b) = tmp;
  17 }