5 tlist* tlist_new(int size){
6 tlist* t=malloc(sizeof(tlist));
7 memset(t,0,sizeof(tlist));
11 void tlist_append(tlist* t,void* data,int size){
12 tlist* next=tlist_new(0);
14 while (pos && pos->next) {
18 pos->data=malloc(size);
19 memcpy(pos->data,data,size);
22 int tlist_size(tlist* t){
25 while (pos && pos->next && pos->data) {
31 void* tlist_pop(tlist* t,int at){
34 /*if (pos && !pos->next ){
37 while (pos && pos->next) {
49 void tlist_fini(tlist* list){
52 if (head->data) free(head->data);