diff options
Diffstat (limited to 'mdk-stage1/frontend-common.c')
| -rw-r--r-- | mdk-stage1/frontend-common.c | 23 | 
1 files changed, 21 insertions, 2 deletions
| diff --git a/mdk-stage1/frontend-common.c b/mdk-stage1/frontend-common.c index a66db457a..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,7 @@  #include <stdlib.h>  #include <stdarg.h> +#include <string.h>  #include <probing.h> @@ -43,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); +} | 
