summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/stdio-frontend.c
diff options
context:
space:
mode:
authorThomas Backlund <tmb@mageia.org>2011-12-06 18:51:00 +0000
committerThomas Backlund <tmb@mageia.org>2011-12-06 18:51:00 +0000
commit2c5aaa70c87d5d03632e17e970fcde6f5801f450 (patch)
tree478a9b36f08262e75f75f77ec1fe9d6d06f1a5b1 /mdk-stage1/stdio-frontend.c
parentd4ce253d84286819b9f87922d608085ca5c94dc5 (diff)
downloaddrakx-backup-do-not-use-2c5aaa70c87d5d03632e17e970fcde6f5801f450.tar
drakx-backup-do-not-use-2c5aaa70c87d5d03632e17e970fcde6f5801f450.tar.gz
drakx-backup-do-not-use-2c5aaa70c87d5d03632e17e970fcde6f5801f450.tar.bz2
drakx-backup-do-not-use-2c5aaa70c87d5d03632e17e970fcde6f5801f450.tar.xz
drakx-backup-do-not-use-2c5aaa70c87d5d03632e17e970fcde6f5801f450.zip
1.52:
- fix build with gcc-4.6.2 * fixes for -Werror=unused-but-set-variable * minor whitespace cleanups
Diffstat (limited to 'mdk-stage1/stdio-frontend.c')
-rw-r--r--mdk-stage1/stdio-frontend.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/mdk-stage1/stdio-frontend.c b/mdk-stage1/stdio-frontend.c
index f99575bed..ec85550ac 100644
--- a/mdk-stage1/stdio-frontend.c
+++ b/mdk-stage1/stdio-frontend.c
@@ -53,7 +53,7 @@ static void get_any_response(void)
while (read(0, &t, 1) > 0);
fcntl(0, F_SETFL, 0);
}
-
+
static int get_int_response(void)
{
char s[50];
@@ -76,7 +76,6 @@ static char * get_string_response(char * initial_string)
/* I won't use a scanf/%s since I also want the null string to be accepted -- also, I want the initial_string */
char s[500];
int i = 0;
- char buf[10];
int b_index = 0;
char b;
@@ -89,7 +88,7 @@ static char * get_string_response(char * initial_string)
strcpy(s, initial_string);
i = strlen(s);
}
-
+
/* from ncurses/tinfo/lib_raw.c:(cbreak) */
tcgetattr(0, &t);
t.c_lflag &= ~ICANON;
@@ -108,7 +107,6 @@ static char * get_string_response(char * initial_string)
if (read(0, &b, 1) > 0) {
if (b_index == 1) {
if (b == 91) {
- buf[b_index] = b;
b_index++;
continue;
}
@@ -131,7 +129,7 @@ static char * get_string_response(char * initial_string)
b_index = 0;
continue;
}
-
+
if (b == 13)
break;
if (b == 127) {
@@ -146,7 +144,6 @@ static char * get_string_response(char * initial_string)
i--;
}
} else if (b == 27) {
- buf[b_index] = b;
b_index++;
} else {
printf("%c", b);
@@ -226,7 +223,7 @@ void update_progression_raw(int current_size)
}
} else
printf("\033[GStatus: [%8d] bytes loaded...", current_size);
-
+
fflush(stdout);
}
@@ -275,7 +272,7 @@ enum return_type ask_from_list_index(char *msg, char ** elems, char ** elems_com
}
if (j == 4)
j = 0;
-
+
if (elems_comments)
elems_comments++;
i++;