You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
547 B
36 lines
547 B
#include <stdio.h>
|
|
|
|
#include "trbase.h"
|
|
#include "trdata.h"
|
|
|
|
int
|
|
main (int argc, char * argv[])
|
|
{
|
|
TR_Set set = TR_new(TR_Set);
|
|
|
|
set->free_msgs = 0;
|
|
|
|
TR_setAdd(set, "a");
|
|
TR_setAdd(set, "b");
|
|
TR_setAdd(set, "c");
|
|
|
|
TR_iterableForeach(set) {
|
|
printf("%s\n", (char *)TR_iterableCurrent(set));
|
|
}
|
|
|
|
TR_setDelete(set, "a");
|
|
TR_setDelete(set, "b");
|
|
TR_setAdd(set, "b");
|
|
TR_setAdd(set, "a");
|
|
|
|
TR_iterableForeach(set) {
|
|
printf("%s\n", (char *)TR_iterableCurrent(set));
|
|
}
|
|
|
|
TR_delete(set);
|
|
TR_cleanup();
|
|
|
|
return 0;
|
|
}
|
|
|
|
// vim: set ts=4 sw=4:
|