summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan K. Hubbard <jkh@FreeBSD.org>1996-04-18 13:36:39 +0000
committerJordan K. Hubbard <jkh@FreeBSD.org>1996-04-18 13:36:39 +0000
commit806a609d463499a15d0fe6c222f0cefe21bcd221 (patch)
treefdc205cd9d03b99cfdb8c92549cb3ca7bb1a4a87
parentc50c22c798e1371a81aaaebae507b9697908795e (diff)
Notes
-rw-r--r--gnu/lib/libdialog/checklist.c8
-rw-r--r--gnu/lib/libdialog/menubox.c6
-rw-r--r--gnu/lib/libdialog/radiolist.c6
3 files changed, 18 insertions, 2 deletions
diff --git a/gnu/lib/libdialog/checklist.c b/gnu/lib/libdialog/checklist.c
index 8e8bdbc1d03f..9a510f85789e 100644
--- a/gnu/lib/libdialog/checklist.c
+++ b/gnu/lib/libdialog/checklist.c
@@ -206,7 +206,6 @@ draw:
save = dupwin(newscr);
st = ditems[OK_BUTTON].fire(&ditems[OK_BUTTON]);
- delwin(dialog);
if (st & DITEM_RESTORE) {
touchwin(save);
wrefresh(save);
@@ -214,7 +213,6 @@ draw:
delwin(save);
}
else {
- delwin(dialog);
*result = '\0';
for (i = 0; i < item_no; i++) {
if (status[i]) {
@@ -223,6 +221,8 @@ draw:
}
}
}
+ delwin(list);
+ delwin(dialog);
return 0;
}
/* Shortcut to cancel? */
@@ -239,6 +239,7 @@ draw:
}
delwin(save);
}
+ delwin(list);
delwin(dialog);
return 1;
}
@@ -329,6 +330,7 @@ draw:
}
else if (st & DITEM_RECREATE) {
delwin(save);
+ delwin(list);
delwin(dialog);
goto draw;
}
@@ -468,6 +470,7 @@ draw:
}
}
}
+ delwin(list);
delwin(dialog);
return button;
break;
@@ -493,6 +496,7 @@ draw:
redraw_menu = FALSE;
}
}
+ delwin(list);
delwin(dialog);
return -1; /* ESC pressed */
}
diff --git a/gnu/lib/libdialog/menubox.c b/gnu/lib/libdialog/menubox.c
index 4823c2cfa45d..ca963bf5c932 100644
--- a/gnu/lib/libdialog/menubox.c
+++ b/gnu/lib/libdialog/menubox.c
@@ -143,6 +143,7 @@ draw:
/* create new window for the menu */
menu = subwin(dialog, menu_height, menu_width, y + box_y + 1, x + box_x + 1);
if (menu == NULL) {
+ delwin(dialog);
endwin();
fprintf(stderr, "\nsubwin(dialog,%d,%d,%d,%d) failed, maybe wrong dims\n", menu_height,menu_width,y+box_y+1,x+box_x+1);
return -1;
@@ -202,6 +203,7 @@ draw:
}
else
strcpy(result, items[(scroll + choice) * 2]);
+ delwin(menu);
delwin(dialog);
return 0;
}
@@ -219,6 +221,7 @@ draw:
}
delwin(save);
}
+ delwin(menu);
delwin(dialog);
return 1;
}
@@ -385,6 +388,7 @@ draw:
wrefresh(save);
}
else if (status & DITEM_RECREATE) {
+ delwin(menu);
delwin(dialog);
delwin(save);
goto draw;
@@ -396,6 +400,7 @@ draw:
else if (result)
strcpy(result, items[(scroll+choice)*2]);
}
+ delwin(menu);
delwin(dialog);
return button;
@@ -420,6 +425,7 @@ draw:
}
}
+ delwin(menu);
delwin(dialog);
return -1; /* ESC pressed */
}
diff --git a/gnu/lib/libdialog/radiolist.c b/gnu/lib/libdialog/radiolist.c
index e56d8e737f3a..63c9350afc2f 100644
--- a/gnu/lib/libdialog/radiolist.c
+++ b/gnu/lib/libdialog/radiolist.c
@@ -230,6 +230,7 @@ draw:
}
}
}
+ delwin(list);
delwin(dialog);
return 0;
}
@@ -247,6 +248,7 @@ draw:
}
delwin(save);
}
+ delwin(list);
delwin(dialog);
return 1;
}
@@ -335,6 +337,7 @@ draw:
}
else if (st & DITEM_RECREATE) {
delwin(save);
+ delwin(list);
delwin(dialog);
goto draw;
}
@@ -460,6 +463,7 @@ draw:
}
else if (st & DITEM_RECREATE) {
delwin(save);
+ delwin(list);
delwin(dialog);
goto draw;
}
@@ -475,6 +479,7 @@ draw:
}
}
}
+ delwin(list);
delwin(dialog);
return button;
break;
@@ -499,6 +504,7 @@ draw:
}
}
+ delwin(list);
delwin(dialog);
free(status);
return -1; /* ESC pressed */