31 tape[0].count = tape[1].count = 0
L;
51 struct tape *tape0, *tape1;
53 tape1 = tape +
base + 1;
55 tape[
dest].count = tape[
dest+1].count = 0;
56 for (; tape0->count != 0;
dest ^= 1)
59 struct tape *output_tape = tape +
dest;
63 struct record *chosen_record;
64 struct tape *chosen_tape;
65 if (n0 == 0 || tape0->count == 0)
67 if (
n1 == 0 || tape1->count == 0)
72 else if (
n1 == 0 || tape1->count == 0)
77 else if ((*
compare)(tape0->first, tape1->first) > 0)
88 chosen_record = chosen_tape->first;
89 chosen_tape->first = chosen_record->next[
index];
90 if (output_tape->count == 0)
91 output_tape->first = chosen_record;
93 output_tape->last->next[
index] = chosen_record;
94 output_tape->last = chosen_record;
102 return tape[
base].first;
GLuint GLuint GLsizei count
static DWORD block_size(DWORD block)
void * sort_linked_list(void *p, unsigned index, int(*compare)(void *, void *))
static unsigned __int64 next