aboutsummaryrefslogtreecommitdiff
path: root/src/base/sort/string.c
blob: 8f9d05a109569b4cdbc7958e19eb589a08b40f64 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#include "internal.h"

void
sort·string(byte* arr[], uintptr sz)
{
    byte *tmp;
#define LESS(i, j) (str·compare(arr[i], arr[j]) < 0)
#define SWAP(i, j) (tmp = arr[i], arr[i] = arr[j], arr[j] = tmp)
    QSORT(sz, LESS, SWAP);
#undef SWAP
#undef LESS
}