diff options
Diffstat (limited to 'mdk-stage1/newt-frontend.c')
| -rw-r--r-- | mdk-stage1/newt-frontend.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/mdk-stage1/newt-frontend.c b/mdk-stage1/newt-frontend.c index 4520c9a7e..c0489b58d 100644 --- a/mdk-stage1/newt-frontend.c +++ b/mdk-stage1/newt-frontend.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. @@ -24,6 +24,7 @@ * Each different frontend must implement all functions defined in frontend.h */ +#define _GNU_SOURCE #include <stdlib.h> #include <unistd.h> @@ -31,7 +32,7 @@ #include <stdio.h> #include <stdarg.h> #include <sys/time.h> -#include "newt/newt.h" +#include <newt.h> #include <probing.h> @@ -298,7 +299,7 @@ static int mynewtWinEntries(char * title, char * text, int suggestedWidth, int f for (i = 0; i < numItems; i++) { newtComponent entr = newtEntry(-1, -1, items[i].value ? *items[i].value : NULL, dataWidth, - items[i].value, items[i].flags); + (const char**)items[i].value, items[i].flags); newtGridSetField(subgrid, 0, i, NEWT_GRID_COMPONENT, newtLabel(-1, -1, items[i].text), @@ -360,7 +361,7 @@ enum return_type ask_from_entries(char *msg, char ** questions, char *** answers entries[i].value = NULL; if (*answers == NULL) - *answers = (char **) malloc(sizeof(char *) * i); + *answers = (char **) calloc(1, sizeof(char *) * i); else already_answers = *answers; |
