#ifndef _Thing_Header
#define _Thing_Header
#include "keep.h"

#define THINGSZ 1000

typedef struct athing {
	struct athing *next;
	char *text;
	int count;
} AThing;

typedef struct thing {
	AThing *table[THINGSZ];
	AThing **sorted;
	Keeplist *keep;
	int items;
} Thing;

void thing_add(Thing **t, char *text);
void thing_free(Thing **t);

void thing_sort(Thing *t, int ascending);
char *thing_get(Thing *t, int n, int *count);

#endif /*_Thing_Header*/
