
#include <stdio.h>

static int less(const guint16 *a, const guint16 *b)
{
    gint i;
    for (i = gtk_compose_table.max_seq_len; i; i--, a++, b++) {
	if (*a < *b) return 1;
	if (*a > *b) return 0;
    }
    return 0;
}

int main(void)
{
    gint i, j;
    const guint16 *p = gtk_compose_table.data, *curr = p, *prev = p;
    for (i = gtk_compose_table.n_seqs; i; i--) {
	prev = curr;
	curr = p;
	for (j = gtk_compose_table.max_seq_len + 2; j; j--)
	    printf("%#8hx", *p++);
	if (!less(prev, curr))
	    printf("\tnot sorted!");
	printf("\n");
    }
    return 0;
}
