diff options
author | jkh <jkh@FreeBSD.org> | 1996-04-18 13:36:39 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1996-04-18 13:36:39 +0000 |
commit | a4dd56c7c9a824330a7b972935b5b50473fc8844 (patch) | |
tree | fdc205cd9d03b99cfdb8c92549cb3ca7bb1a4a87 /gnu/lib/libdialog | |
parent | adeba4991fea2fc6babd0748918268bdf7fe4cbf (diff) | |
download | FreeBSD-src-a4dd56c7c9a824330a7b972935b5b50473fc8844.zip FreeBSD-src-a4dd56c7c9a824330a7b972935b5b50473fc8844.tar.gz |
Remove a long-standing window leak I just noticed.
Diffstat (limited to 'gnu/lib/libdialog')
-rw-r--r-- | gnu/lib/libdialog/checklist.c | 8 | ||||
-rw-r--r-- | gnu/lib/libdialog/menubox.c | 6 | ||||
-rw-r--r-- | gnu/lib/libdialog/radiolist.c | 6 |
3 files changed, 18 insertions, 2 deletions
diff --git a/gnu/lib/libdialog/checklist.c b/gnu/lib/libdialog/checklist.c index 8e8bdbc..9a510f8 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 4823c2c..ca963bf 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 e56d8e7..63c9350 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 */ |