diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2007-10-01 14:15:48 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2007-10-01 14:15:48 +0000 |
commit | 9d563c340b16dfe0d4b3cd789ffbeda0d4d1e589 (patch) | |
tree | 2a49ad8dd00abd39c51d125a3666d5f656705d77 /screen.c | |
parent | 532757fd1c1886703a626a17f19c8c649a9e3d97 (diff) |
Destroy screens properly.
Diffstat (limited to 'screen.c')
-rw-r--r-- | screen.c | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -1,4 +1,4 @@ -/* $Id: screen.c,v 1.17 2007-09-29 18:57:15 nicm Exp $ */ +/* $Id: screen.c,v 1.18 2007-10-01 14:15:48 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -157,6 +157,16 @@ screen_resize(struct screen *s, u_int sx, u_int sy) } } +/* Destroy a screen. */ +void +screen_destroy(struct screen *s) +{ + screen_free_lines(s, 0, s->sy); + xfree(s->grid_data); + xfree(s->grid_attr); + xfree(s->grid_colr); +} + /* Draw a set of lines on the screen. */ void screen_draw(struct screen *s, struct buffer *b, u_int uy, u_int ly) |