Fix dialog things broken by previous commiter

This commit is contained in:
Andrey A. Chernov 1994-11-18 23:34:05 +00:00
parent 7c760cfd4f
commit c2cd62a46d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=4660
2 changed files with 12 additions and 7 deletions

View File

@ -202,10 +202,10 @@ select_disk()
sprintf(options[no_disks*2], "%d", no_disks+1);
sprintf(options[(no_disks*2)+1], " Done");
dialog_clear();
if (dialog_menu("FreeBSD Installation", scratch, 10, 75, 5, no_disks+1,
dialog_clear_norefresh();
if (dialog_menu("FreeBSD Installation", scratch, -1, -1, min(5,no_disks+1), no_disks+1,
options, selection)) {
dialog_clear();
dialog_clear_norefresh();
sprintf(scratch,"\n\n\nYou selected cancel\n\n");
AskAbort(scratch);
valid = 0;
@ -253,9 +253,10 @@ configure_disks()
sprintf(options[(items*2)+1], "Done");
items++;
if (dialog_menu("FreeBSD Installation", scratch, 10, 75, 5, items,
dialog_clear_norefresh();
if (dialog_menu("FreeBSD Installation", scratch, -1, -1, min(5,items), items,
options, selection)) {
dialog_clear();
dialog_clear_norefresh();
sprintf(scratch,"\n\n\nYou selected cancel\n\n");
AskAbort(scratch);
valid = 0;
@ -297,10 +298,11 @@ select_partition(int disk)
part_type(disk_list[disk].mbr.dospart[i].dp_typ),
disk_list[disk].mbr.dospart[i].dp_size * 512 / (1024 * 1024));
}
dialog_clear_norefresh();
if (dialog_menu(TITLE,
scratch, 10, 75, 4, 4, options, selection)) {
scratch, -1, -1, 4, 4, options, selection)) {
sprintf(scratch,"You did not select a valid partition");
dialog_clear();
dialog_clear_norefresh();
AskAbort(scratch);
valid = 0;
}

View File

@ -36,6 +36,9 @@
#include <sys/dkbad.h>
#include <sys/disklabel.h>
#define min(a,b) ((a) < (b) ? (a) : (b))
#define max(a,b) ((a) > (b) ? (a) : (b))
#define SCRATCHSIZE 1024
#define ERRMSGSIZE 256
#define DEFROOTSIZE 18