summaryrefslogtreecommitdiffstats
path: root/screen.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2007-10-01 14:15:48 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2007-10-01 14:15:48 +0000
commit9d563c340b16dfe0d4b3cd789ffbeda0d4d1e589 (patch)
tree2a49ad8dd00abd39c51d125a3666d5f656705d77 /screen.c
parent532757fd1c1886703a626a17f19c8c649a9e3d97 (diff)
Destroy screens properly.
Diffstat (limited to 'screen.c')
-rw-r--r--screen.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/screen.c b/screen.c
index dc9a0363..5f939352 100644
--- a/screen.c
+++ b/screen.c
@@ -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)