X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/beb54af10082dc588132b2c0d32e050028b72c78..78ed81a334dab56aa7a876792a473d67d4359c25:/sys/i386/boot/io.c diff --git a/sys/i386/boot/io.c b/sys/i386/boot/io.c index 237b21cc2c..6a5a58a3e3 100644 --- a/sys/i386/boot/io.c +++ b/sys/i386/boot/io.c @@ -1,6 +1,4 @@ /* - * Ported to boot 386BSD by Julian Elischer (julian@tfs.com) Sept 1992 - * * Mach Operating System * Copyright (c) 1992, 1991 Carnegie Mellon University * All Rights Reserved. @@ -24,18 +22,9 @@ * * any improvements or extensions that they make and grant Carnegie Mellon * the rights to redistribute these changes. - */ - -/* - * HISTORY - * $Log: io.c,v $ - * Revision 2.2 92/04/04 11:35:57 rpd - * Fixed for IBM L40's A20 initialization. - * [92/03/30 rvb] - * - * Created. - * [92/03/30 mg32] - * + * + * from: Mach, Revision 2.2 92/04/04 11:35:57 rpd + * $Id$ */ #include @@ -82,6 +71,8 @@ printf(format,data) { int *dataptr = &data; char c; + + reset_twiddle(); while (c = *format++) if (c != '%') putchar(c); @@ -187,3 +178,25 @@ int len; while (len-- > 0) *to++ = *from++; } + +static int tw_on; +static int tw_pos; +static char tw_chars[] = "|/-\\"; + +reset_twiddle() +{ + if (tw_on) + putchar('\b'); + tw_on = 0; + tw_pos = 0; +} + +twiddle() +{ + if (tw_on) + putchar('\b'); + else + tw_on = 1; + putchar(tw_chars[tw_pos++]); + tw_pos %= (sizeof(tw_chars) - 1); +}