]> Pileus Git - lackey/blobdiff - src/main.c
Add day and week view
[lackey] / src / main.c
index a5d89c9bc44a5864d20d620ba21594fd4468ef02..146e55e3fcd3bb7c356bab5c0ddd34817d74c39e 100644 (file)
@@ -22,6 +22,7 @@ static void on_sigwinch(int signum)
 {
        endwin();
        refresh();
+       screen_resize();
        screen_draw();
 }
 
@@ -31,6 +32,10 @@ int debug(char *fmt, ...)
        int rval;
        va_list ap;
 
+       /* Open log file */
+       if (!debug_fd)
+               debug_fd = fopen("acal.log", "w+");
+
        /* Log to debug file */
        va_start(ap, fmt);
        vfprintf(debug_fd, "debug: ", ap);
@@ -53,7 +58,6 @@ int debug(char *fmt, ...)
 int main(int argc, char **argv)
 {
        /* Misc setup */
-       debug_fd = fopen("acal.log", "w+");
        struct sigaction act;
        sigemptyset(&act.sa_mask);
        act.sa_flags   = 0;