use standard printf from stand/printf.c; add scankdb stub
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Sun, 5 May 1991 07:41:54 +0000 (23:41 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Sun, 5 May 1991 07:41:54 +0000 (23:41 -0800)
SCCS-vsn: sys/vax/stand/prf.c 7.8

usr/src/sys/vax/stand/prf.c

index d04af4c..47d141c 100644 (file)
@@ -3,7 +3,7 @@
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
- *     @(#)prf.c       7.7 (Berkeley) %G%
+ *     @(#)prf.c       7.8 (Berkeley) %G%
  */
 
 #include "sys/param.h"
  */
 
 #include "sys/param.h"
 #include "../include/mtpr.h"
 #include "../vax/cons.h"
 
 #include "../include/mtpr.h"
 #include "../vax/cons.h"
 
-/*
- * Scaled down version of C Library printf.
- * Used to print diagnostic information directly on console tty.
- * Since it is not interrupt driven, all system activities are
- * suspended.  Printf should not be used for chit-chat.
- *
- * One additional format: %b is supported to decode error registers.
- * Usage is:
- *     printf("reg=%b\n", regval, "<base><arg>*");
- * Where <base> is the output base expressed as a control character,
- * e.g. \10 gives octal; \20 gives hex.  Each arg is a sequence of
- * characters, the first of which gives the bit number to be inspected
- * (origin 1), and the next characters (up to a control character, i.e.
- * a character <= 32), give the name of the register.  Thus
- *     printf("reg=%b\n", 3, "\10\2BITTWO\1BITONE\n");
- * would produce output:
- *     reg=2<BITTWO,BITONE>
- */
-/*VARARGS1*/
-printf(fmt, x1)
-       char *fmt;
-       unsigned x1;
-{
-
-       prf(fmt, &x1);
-}
-
-prf(fmt, adx)
-       register char *fmt;
-       register u_int *adx;
-{
-       register int b, c, i;
-       char *s;
-       int any;
-
-loop:
-       while ((c = *fmt++) != '%') {
-               if(c == '\0')
-                       return;
-               putchar(c);
-       }
-again:
-       c = *fmt++;
-       /* THIS CODE IS VAX DEPENDENT IN HANDLING %l? AND %c */
-       switch (c) {
-
-       case 'l':
-               goto again;
-       case 'x': case 'X':
-               b = 16;
-               goto number;
-       case 'd': case 'D':
-       case 'u':               /* what a joke */
-               b = 10;
-               goto number;
-       case 'o': case 'O':
-               b = 8;
-number:
-               printn((u_long)*adx, b);
-               break;
-       case 'c':
-               b = *adx;
-               for (i = 24; i >= 0; i -= 8)
-                       if (c = (b >> i) & 0x7f)
-                               putchar(c);
-               break;
-       case 'b':
-               b = *adx++;
-               s = (char *)*adx;
-               printn((u_long)b, *s++);
-               any = 0;
-               if (b) {
-                       while (i = *s++) {
-                               if (b & (1 << (i-1))) {
-                                       putchar(any? ',' : '<');
-                                       any = 1;
-                                       for (; (c = *s) > 32; s++)
-                                               putchar(c);
-                               } else
-                                       for (; *s > 32; s++)
-                                               ;
-                       }
-                       if (any)
-                               putchar('>');
-               }
-               break;
-
-       case 's':
-               s = (char *)*adx;
-               while (c = *s++)
-                       putchar(c);
-               break;
-       }
-       adx++;
-       goto loop;
-}
-
 /*
  * Print a character on console.
  */
 /*
  * Print a character on console.
  */
@@ -144,6 +47,9 @@ putchar(c)
        mtpr(TXCS, s);
 }
 
        mtpr(TXCS, s);
 }
 
+scankbd()
+{}
+
 getchar()
 {
        register c;
 getchar()
 {
        register c;