From ab79ffa49720328bdf9e44b842e7b015e7835cfd Mon Sep 17 00:00:00 2001 From: Guillaume Cottenceau Date: Tue, 6 Feb 2001 16:54:36 +0000 Subject: - slighty change the message when exiting successfully from install, to not mess with abnormal termination - get back dialog for hostname and domain in case of unable to guess domain - try to resolve DNS if self-ip can't resolve, to guess domain - remember entries so that when there is a problem you don't have to re-enter everything (ncurses sucking stuff in case of stdio-frontend..) - use larger buffer for list_directory since in /dev there can be *many* files --- mdk-stage1/newt-frontend.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'mdk-stage1/newt-frontend.c') diff --git a/mdk-stage1/newt-frontend.c b/mdk-stage1/newt-frontend.c index 494751d90..6d55c9ab7 100644 --- a/mdk-stage1/newt-frontend.c +++ b/mdk-stage1/newt-frontend.c @@ -242,6 +242,7 @@ enum return_type ask_from_entries(char *msg, char ** questions, char *** answers struct newtWinEntry entries[50]; int j, i = 0; int rc; + char ** already_answers = NULL; while (questions && *questions) { entries[i].text = *questions; @@ -252,11 +253,18 @@ enum return_type ask_from_entries(char *msg, char ** questions, char *** answers entries[i].text = NULL; entries[i].value = NULL; - *answers = (char **) malloc(sizeof(char *) * i); + if (*answers == NULL) + *answers = (char **) malloc(sizeof(char *) * i); + else + already_answers = *answers; for (j = 0 ; j < i ; j++) { entries[j].value = &((*answers)[j]); - *(entries[j].value) = NULL; + if (already_answers && *already_answers) { + *(entries[j].value) = *already_answers; + already_answers++; + } else + *(entries[j].value) = NULL; } rc = newtWinEntries("Please fill entries...", msg, 52, 5, 5, entry_size, entries, "Ok", "Cancel", NULL); -- cgit v1.2.1