summaryrefslogtreecommitdiff
path: root/board/MAI/bios_emulator/scitech/src/v86bios/command.c
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2007-08-06 15:59:45 +0200
committerWolfgang Denk <wd@denx.de>2007-08-06 15:59:45 +0200
commitec06b2731b0a8303f546901635a6e8da0ea97613 (patch)
treea90e17759211dd8e01c8b4b28d2e66224a6f8dc6 /board/MAI/bios_emulator/scitech/src/v86bios/command.c
parentf2c2a937d8c4a44f63ff88bf82023e03a29497a2 (diff)
parent9c7e4b06214db61bb21f1bcbe57c97519669baae (diff)
Merge with /home/wd/git/u-boot/custodian/u-boot-testing
Diffstat (limited to 'board/MAI/bios_emulator/scitech/src/v86bios/command.c')
-rw-r--r--board/MAI/bios_emulator/scitech/src/v86bios/command.c38
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 e2bce6df1b..0000000000
--- 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;
-}