Hello .. I can do your projects .. You projects for my understand is to create a data structure containing a text as value and used that for effeciency . create a text, duplicate a text, free a text or release ...
The data structure used as you said is a Linked Lust ..
An example of Linked List for text buffer would like this :
typedef struct _dnode {
char *text;
tlink next;
tlink prev;
} dnode;
To create a textbuffer with a data strucures Linked list we can use a function look like this
TextBuffer * newTextB(char text[]) {
TextBuffer new_TB = malloc(sizeof(struct _dhead));
new_TextB->size = 0;
new_TextB->first = new_TextB->last = NULL;
return TextBuffer;
}
and so on....