Gamgee
You miserable little maggot. I'll stove your head in!
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Macros | Typedefs
ksort.h File Reference
#include <stdlib.h>
#include <string.h>

Go to the source code of this file.

Classes

struct  ks_isort_stack_t
 

Macros

#define KSORT_SWAP(type_t, a, b)   { register type_t t=(a); (a)=(b); (b)=t; }
 
#define KSORT_INIT(name, type_t, __sort_lt)
 
#define ks_mergesort(name, n, a, t)   ks_mergesort_##name(n, a, t)
 
#define ks_introsort(name, n, a)   ks_introsort_##name(n, a)
 
#define ks_combsort(name, n, a)   ks_combsort_##name(n, a)
 
#define ks_heapsort(name, n, a)   ks_heapsort_##name(n, a)
 
#define ks_heapmake(name, n, a)   ks_heapmake_##name(n, a)
 
#define ks_heapadjust(name, i, n, a)   ks_heapadjust_##name(i, n, a)
 
#define ks_ksmall(name, n, a, k)   ks_ksmall_##name(n, a, k)
 
#define ks_shuffle(name, n, a)   ks_shuffle_##name(n, a)
 
#define ks_lt_generic(a, b)   ((a) < (b))
 
#define ks_lt_str(a, b)   (strcmp((a), (b)) < 0)
 
#define KSORT_INIT_GENERIC(type_t)   KSORT_INIT(type_t, type_t, ks_lt_generic)
 
#define KSORT_INIT_STR   KSORT_INIT(str, ksstr_t, ks_lt_str)
 

Typedefs

typedef const char * ksstr_t
 

Macro Definition Documentation

#define ks_combsort (   name,
  n,
 
)    ks_combsort_##name(n, a)
#define ks_heapadjust (   name,
  i,
  n,
 
)    ks_heapadjust_##name(i, n, a)
#define ks_heapmake (   name,
  n,
 
)    ks_heapmake_##name(n, a)
#define ks_heapsort (   name,
  n,
 
)    ks_heapsort_##name(n, a)
#define ks_introsort (   name,
  n,
 
)    ks_introsort_##name(n, a)
#define ks_ksmall (   name,
  n,
  a,
 
)    ks_ksmall_##name(n, a, k)
#define ks_lt_generic (   a,
 
)    ((a) < (b))
#define ks_lt_str (   a,
 
)    (strcmp((a), (b)) < 0)
#define ks_mergesort (   name,
  n,
  a,
 
)    ks_mergesort_##name(n, a, t)
#define ks_shuffle (   name,
  n,
 
)    ks_shuffle_##name(n, a)
#define KSORT_INIT (   name,
  type_t,
  __sort_lt 
)
#define KSORT_INIT_GENERIC (   type_t)    KSORT_INIT(type_t, type_t, ks_lt_generic)
#define KSORT_INIT_STR   KSORT_INIT(str, ksstr_t, ks_lt_str)
#define KSORT_SWAP (   type_t,
  a,
 
)    { register type_t t=(a); (a)=(b); (b)=t; }

Typedef Documentation

typedef const char* ksstr_t