run_loop = 0;
return ENOMEM;
}
-
+
window_text[window_text_count - 1] = (char*)malloc((strlen(text) + 1) * sizeof(char));
if (window_text[window_text_count - 1] == NULL) {
fprintf(stderr, "CRITICAL: Insufficient memory to append text!\n");
/** Destroys the window and cleans up */
void destroy_window()
{
+ int idx;
+
XFreeGC(Xdisp, Xgc);
XDestroyWindow(Xdisp, Xwin);
XCloseDisplay(Xdisp);
+
+ for (idx = 0; idx < window_text_count; idx++)
+ free(window_text[idx]);
+ free(window_text);
}
/** Manually flushes the drawing requests.