]> rtime.felk.cvut.cz Git - frescor/fwp.git/commitdiff
Restored screen on manager exit
authorMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 10 Jul 2008 07:39:35 +0000 (09:39 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 10 Jul 2008 07:39:35 +0000 (09:39 +0200)
fwp/mngr/fwp_mngr.c
fwp/mngr/gui.c
fwp/mngr/gui.h

index facff7e1e65f7418726f95e1ffee50bfc827cca9..30f12d5febdc28cf1255a2c4b2e5cda1d0b2865e 100644 (file)
@@ -317,6 +317,7 @@ int main()
 
        gui_init();
        fwp_mngr_main_loop();
+       gui_end();
        
        return 0;       
 } 
index a8e877b4a42931e8909a5861b8be1db8a24e78db..c44a68c19ae3a7b52b033de11942132b1880fe84 100644 (file)
@@ -55,7 +55,7 @@ static void print_contract(int y, fwp_contract_data_t *cd)
 {
        const char *ac_ids[] = { [FWP_AC_VO]="VO", [FWP_AC_VI]="VI", [FWP_AC_BE]="BE", [FWP_AC_BK]="BK" };
        struct fwp_contract *c = &cd->contract;
-       char str[200], s1[20], s2[20];
+       char str[200], s1[20];
        int x = 0;
        
        addfield(4,  "ID", "%d", cd->id);
@@ -94,3 +94,8 @@ void gui_print_status()
        }
        refresh();
 }
+
+void gui_end(void)
+{
+       endwin();
+}
index dbb4c0bc7f40b6dbbf175eea77ac02e83e1ed6b5..e2a95203b53019d37a450d955b890cadd94cefed 100644 (file)
@@ -6,5 +6,6 @@
 
 void gui_init(void);
 void gui_print_status(void);
+void gui_end(void);
 
 #endif