diff options
Diffstat (limited to 'src/pool.c')
| -rw-r--r-- | src/pool.c | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -122,3 +122,19 @@ void add_line(char s) { screens[s].line_list = p; screens[s].line_count++; } + +void pool_reclaim_lines(char s) { + line_t *p, *q; + + p = screens[s].line_list; + while(p != (line_t *)END_MARKER) { + q = p; + p = p->next; + } + + q->next = pools[screens[s].pool].free_list; + pools[screens[s].pool].free_list = screens[s].line_list; + + /* theoretically this could be 0, but as a safety net... */ + screens[s].line_list = (line_t *)END_MARKER; +} |
