From 8bde7f776c77b343aca29b8c7b58464d915ac245 Mon Sep 17 00:00:00 2001 From: wdenk Date: Fri, 27 Jun 2003 21:31:46 +0000 Subject: * Code cleanup: - remove trailing white space, trailing empty lines, C++ comments, etc. - split cmd_boot.c (separate cmd_bdinfo.c and cmd_load.c) * Patches by Kenneth Johansson, 25 Jun 2003: - major rework of command structure (work done mostly by Michal Cendrowski and Joakim Kristiansen) --- board/MAI/bios_emulator/scitech/src/v86bios/command.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'board/MAI/bios_emulator/scitech/src/v86bios/command.c') diff --git a/board/MAI/bios_emulator/scitech/src/v86bios/command.c b/board/MAI/bios_emulator/scitech/src/v86bios/command.c index 5494ff83ae..e2bce6df1b 100644 --- a/board/MAI/bios_emulator/scitech/src/v86bios/command.c +++ b/board/MAI/bios_emulator/scitech/src/v86bios/command.c @@ -15,24 +15,24 @@ getline(char *buf,int *num,int max_num) static int len = 0; int tmp_len; char *buff; - + if (len <= 0) { buff = readline(PROMPT); add_history(buff); - + if ((tmp_len = strlen(buff)) > line_len) { - free(line); - line = malloc(tmp_len); - line_len = tmp_len; + free(line); + line = malloc(tmp_len); + line_len = tmp_len; } sprintf(line,"%s\n",buff); free(buff); line_pointer = line; len = strlen(line); } - - *num = max_num > len? len : max_num; - strncpy(buf,line_pointer,*num); + + *num = max_num > len? len : max_num; + strncpy(buf,line_pointer,*num); line_pointer = line_pointer + *num; len = len - *num; } -- cgit v1.2.3