diff options
Diffstat (limited to 'mdk-stage1/frontend-common.c')
-rw-r--r-- | mdk-stage1/frontend-common.c | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/mdk-stage1/frontend-common.c b/mdk-stage1/frontend-common.c index caddeb7d4..cdc972740 100644 --- a/mdk-stage1/frontend-common.c +++ b/mdk-stage1/frontend-common.c @@ -1,7 +1,7 @@ /* - * Guillaume Cottenceau (gc@mandrakesoft.com) + * Guillaume Cottenceau (gc) * - * Copyright 2000 MandrakeSoft + * Copyright 2000 Mandriva * * This software may be freely redistributed under the terms of the GNU * public license. @@ -14,6 +14,9 @@ #include <stdlib.h> #include <stdarg.h> +#include <string.h> + +#include <probing.h> #include "frontend.h" @@ -41,3 +44,21 @@ void error_message(char *msg, ...) verror_message(msg, args); va_end(args); } + +enum return_type ask_from_list_comments(char *msg, char ** elems, char ** elems_comments, char ** choice) +{ + int answer = 0; + enum return_type results; + + results = ask_from_list_index(msg, elems, elems_comments, &answer); + + if (results == RETURN_OK) + *choice = strdup(elems[answer]); + + return results; +} + +enum return_type ask_from_list(char *msg, char ** elems, char ** choice) +{ + return ask_from_list_comments(msg, elems, NULL, choice); +} |