diff options
| author | Stefan Roese <sr@denx.de> | 2007-08-15 21:06:27 +0200 | 
|---|---|---|
| committer | Stefan Roese <sr@denx.de> | 2007-08-15 21:06:27 +0200 | 
| commit | b706d63559aeec352bc72dd86d7d5423c15f6a60 (patch) | |
| tree | fdeda4d61970fef239d9d66ecd851fa46cfe5ec0 /board/MAI/bios_emulator/scitech/src/v86bios/command.c | |
| parent | c8603cfbd4573379a6076c9c208545ba2bbf019a (diff) | |
| parent | 594e79838ce5078a90d0c27abb2b2d61d5f8e8a7 (diff) | |
| download | olio-uboot-2014.01-b706d63559aeec352bc72dd86d7d5423c15f6a60.tar.xz olio-uboot-2014.01-b706d63559aeec352bc72dd86d7d5423c15f6a60.zip | |
Merge with git://www.denx.de/git/u-boot.git
Diffstat (limited to 'board/MAI/bios_emulator/scitech/src/v86bios/command.c')
| -rw-r--r-- | board/MAI/bios_emulator/scitech/src/v86bios/command.c | 38 | 
1 files changed, 0 insertions, 38 deletions
| diff --git a/board/MAI/bios_emulator/scitech/src/v86bios/command.c b/board/MAI/bios_emulator/scitech/src/v86bios/command.c deleted file mode 100644 index e2bce6df1..000000000 --- a/board/MAI/bios_emulator/scitech/src/v86bios/command.c +++ /dev/null @@ -1,38 +0,0 @@ -#include <stdio.h> -#include <readline/readline.h> -#include <readline/history.h> -#include <malloc.h> - -#define PROMPT ">" - - -void -getline(char *buf,int *num,int max_num) -{ -    static int line_len = 0; -    static char *line = NULL; -    static char *line_pointer = NULL; -    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; -    } -    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); -    line_pointer = line_pointer + *num; -    len = len - *num; -} |