Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=fwpl.git;a=commitdiff;h=4f2e78cde129ab54c4e1c66594d1e3765443b1a1
commit 4f2e78cde129ab54c4e1c66594d1e3765443b1a1 Author: James Buren <[email protected]> Date: Wed Oct 14 16:10:29 2009 -0500 x11.c * add new function and asserts diff --git a/src/x11.c b/src/x11.c index 5550952..38a7a62 100644 --- a/src/x11.c +++ b/src/x11.c @@ -21,6 +21,8 @@ typedef enum { TDisplay *display_create(TX11Error *error) { TDisplay *self; + assert(error != NULL); + self = malloc(sizeof(*self)); if(self == NULL) { @@ -50,3 +52,11 @@ TDisplay *display_create(TX11Error *error) { return self; } +// display_destroy /*FOLD00*/ +void display_destroy(TDisplay *self) { + assert(self != NULL); + + XCloseDisplay(self->display); + + free(self); +} _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
