put vax headers in their place
[unix-history] / usr / src / sys / kern / subr_prf.c
index 618384d..509c1ff 100644 (file)
@@ -1,11 +1,10 @@
-/*     subr_prf.c      4.15    81/03/09        */
+/*     subr_prf.c      4.22    82/10/10        */
 
 #include "../h/param.h"
 #include "../h/systm.h"
 #include "../h/seg.h"
 #include "../h/buf.h"
 #include "../h/conf.h"
 
 #include "../h/param.h"
 #include "../h/systm.h"
 #include "../h/seg.h"
 #include "../h/buf.h"
 #include "../h/conf.h"
-#include "../h/mtpr.h"
 #include "../h/reboot.h"
 #include "../h/vm.h"
 #include "../h/msgbuf.h"
 #include "../h/reboot.h"
 #include "../h/vm.h"
 #include "../h/msgbuf.h"
@@ -118,7 +117,8 @@ number:
                                        for (; *s > 32; s++)
                                                ;
                        }
                                        for (; *s > 32; s++)
                                                ;
                        }
-                       putchar('>', touser);
+                       if (any)
+                               putchar('>', touser);
                }
                break;
 
                }
                break;
 
@@ -127,6 +127,10 @@ number:
                while (c = *s++)
                        putchar(c, touser);
                break;
                while (c = *s++)
                        putchar(c, touser);
                break;
+
+       case '%':
+               putchar('%', touser);
+               break;
        }
        adx++;
        goto loop;
        }
        adx++;
        goto loop;
@@ -165,10 +169,12 @@ printn(n, b, touser)
 panic(s)
        char *s;
 {
 panic(s)
        char *s;
 {
-       int bootopt = panicstr ? RB_AUTOBOOT : RB_AUTOBOOT|RB_NOSYNC;
+       int bootopt = RB_AUTOBOOT;
 
 
+       if (panicstr)
+               bootopt |= RB_NOSYNC;
        panicstr = s;
        panicstr = s;
-       (void) spl0();
+       printf("panic: %s\n", s);
        boot(RB_PANIC, bootopt);
 }
 
        boot(RB_PANIC, bootopt);
 }
 
@@ -208,16 +214,17 @@ putchar(c, touser)
        if (touser) {
                register struct tty *tp = u.u_ttyp;
 
        if (touser) {
                register struct tty *tp = u.u_ttyp;
 
-               if (tp && (tp->t_state&CARR_ON)) {
+               if (tp && (tp->t_state&TS_CARR_ON)) {
                        register s = spl6();
                        if (c == '\n')
                        register s = spl6();
                        if (c == '\n')
-                               ttyoutput('\r', tp);
-                       ttyoutput(c, tp);
+                               (void) ttyoutput('\r', tp);
+                       (void) ttyoutput(c, tp);
                        ttstart(tp);
                        splx(s);
                }
                return;
        }
                        ttstart(tp);
                        splx(s);
                }
                return;
        }
+#include "../vax/mtpr.h"               /* XXX */
        if (c != '\0' && c != '\r' && c != 0177 && mfpr(MAPEN)) {
                if (msgbuf.msg_magic != MSG_MAGIC) {
                        msgbuf.msg_bufx = 0;
        if (c != '\0' && c != '\r' && c != 0177 && mfpr(MAPEN)) {
                if (msgbuf.msg_magic != MSG_MAGIC) {
                        msgbuf.msg_bufx = 0;