diff options
author | dg <dg@FreeBSD.org> | 1994-11-07 11:26:30 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 1994-11-07 11:26:30 +0000 |
commit | 3e80f17d97b93ae5199effa90eefdef7cad1785e (patch) | |
tree | 315f26751f8a58fc39d4c049a0f167671f3d6daf /sys/i386/boot/biosboot/io.c | |
parent | 401370279e31da24c8a79dfd8e7750c8c586e8b5 (diff) | |
download | FreeBSD-src-3e80f17d97b93ae5199effa90eefdef7cad1785e.zip FreeBSD-src-3e80f17d97b93ae5199effa90eefdef7cad1785e.tar.gz |
Improved the user interface:
1) Added file list capability via '?'.
2) Arranged usage info to be more unix-like.
3) Fixed backspace over prompt annoyance.
Diffstat (limited to 'sys/i386/boot/biosboot/io.c')
-rw-r--r-- | sys/i386/boot/biosboot/io.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/sys/i386/boot/biosboot/io.c b/sys/i386/boot/biosboot/io.c index ce2b1fe..25dc322 100644 --- a/sys/i386/boot/biosboot/io.c +++ b/sys/i386/boot/biosboot/io.c @@ -25,7 +25,7 @@ * the rights to redistribute these changes. * * from: Mach, Revision 2.2 92/04/04 11:35:57 rpd - * $Id: io.c,v 1.8 1994/09/18 07:39:55 swallace Exp $ + * $Id: io.c,v 1.9 1994/09/20 22:24:59 adam Exp $ */ #include <machine/cpufunc.h> @@ -124,15 +124,21 @@ putchar(c) putc(c); } -getchar() +getchar(in_buf) + int in_buf; { int c; +loop: if ((c=getc()) == '\r') c = '\n'; if (c == '\b') { - putchar('\b'); - putchar(' '); + if (in_buf != 0) { + putchar('\b'); + putchar(' '); + } else { + goto loop; + } } putchar(c); return(c); @@ -169,7 +175,7 @@ char *buf; #endif if (ischar()) for (;;) - switch(*ptr = getchar() & 0xff) { + switch(*ptr = getchar(ptr - buf) & 0xff) { case '\n': case '\r': *ptr = '\0'; |