-/* Window change */
-static void on_sigwinch(int signum)
-{
- endwin();
- refresh();
- screen_resize();
- screen_draw();
-}
-
-/* Debugging functions */
-int debug(char *fmt, ...)
-{
- int rval;
- va_list ap;
-
- /* Open log file */
- if (!debug_fd)
- debug_fd = fopen("lackey.log", "w+");
-
- /* Log to debug file */
- va_start(ap, fmt);
- vfprintf(debug_fd, "debug: ", ap);
- rval = vfprintf(debug_fd, fmt, ap);
-
- /* Log to status bar */
- va_start(ap, fmt);
- mvhline(LINES-2, 0, ACS_HLINE, COLS);
- move(LINES-1, 0);
- attron(COLOR_PAIR(COLOR_ERROR));
- vwprintw(stdscr, fmt, ap);
- attroff(COLOR_PAIR(COLOR_ERROR));
- clrtoeol();
-
- va_end(ap);
- return rval;
-}
-