summaryrefslogtreecommitdiff
path: root/jast_test.c
blob: 377928f9601f2a1dda86d807d9179498b113fcf9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include <stdio.h>
#include "jast.h"

int main(void)
{
	struct jast *maintab, *othertab;
	maintab = jast_creat("Paco");
	othertab = jast_creat("Florencio");

	printf("Adding entries...\n");
	jast_new_entry(maintab, "e1");
	jast_new_entry(maintab, "e2");
	jast_new_entry(maintab, "e3");
	jast_new_entry(maintab, "e4");
	jast_new_entry(maintab, "e5");
	jast_new_entry(maintab, "e6");
	jast_new_entry(maintab, "e7");
	jast_new_entry(maintab, "e8");
	jast_new_entry(maintab, "e9");
	jast_new_entry(maintab, "e10");
	jast_new_entry(maintab, "e11");
	jast_new_entry(othertab, "e1");
	jast_new_entry(othertab, "e2");

	printf("Showing...");
	jast_show_all();
	jast_dump(maintab, "mt.txt");
	jast_dump(othertab, "ot.txt");
	jast_destroy_all();
	return 0;
}