mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
grid: add grid_free()
This commit is contained in:
parent
ebf8070244
commit
bb74fe3f7d
3 changed files with 18 additions and 14 deletions
14
grid.c
14
grid.c
|
|
@ -11,6 +11,20 @@
|
|||
#include "util.h"
|
||||
#include "xmalloc.h"
|
||||
|
||||
void
|
||||
grid_free(struct grid *grid)
|
||||
{
|
||||
for (int r = 0; r < grid->num_rows; r++)
|
||||
grid_row_free(grid->rows[r]);
|
||||
|
||||
tll_foreach(grid->sixel_images, it) {
|
||||
sixel_destroy(&it->item);
|
||||
tll_remove(grid->sixel_images, it);
|
||||
}
|
||||
|
||||
free(grid->rows);
|
||||
}
|
||||
|
||||
void
|
||||
grid_swap_row(struct grid *grid, int row_a, int row_b)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue