| 112 | } |
| 113 | |
| 114 | static void textListAddEntry(TextList *list, TextListEntry *entry) { |
| 115 | entry->next = NULL; |
| 116 | entry->previous = NULL; |
| 117 | |
| 118 | if (list->head == NULL) { |
| 119 | list->head = entry; |
| 120 | list->tail = entry; |
| 121 | } else { |
| 122 | TextListEntry *tail = list->tail; |
| 123 | tail->next = entry; |
| 124 | entry->previous = tail; |
| 125 | list->tail = entry; |
| 126 | } |
| 127 | |
| 128 | list->length++; |
| 129 | } |
| 130 | |
| 131 | static void textListEmpty(TextList *list) { |
| 132 | TextListEntry *entry = list->head; |