stdio.h defines BUFSIZ
[unix-history] / usr / src / usr.bin / window / cmd6.c
index 024565c..c58093c 100644 (file)
@@ -1,9 +1,20 @@
+/*
+ * Copyright (c) 1983 Regents of the University of California.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Edward Wang at The University of California, Berkeley.
+ *
+ * %sccs.include.redist.c%
+ */
+
 #ifndef lint
 #ifndef lint
-static char *sccsid = "@(#)cmd6.c      3.6 84/01/13";
-#endif
+static char sccsid[] = "@(#)cmd6.c     3.17 (Berkeley) %G%";
+#endif /* not lint */
 
 #include "defs.h"
 #include "string.h"
 
 #include "defs.h"
 #include "string.h"
+#include "char.h"
 
 /*
  * Debugging commands.
 
 /*
  * Debugging commands.
@@ -14,13 +25,13 @@ c_debug()
        register struct ww *w;
 
        if (!terse)
        register struct ww *w;
 
        if (!terse)
-               (void) wwputs("[m(smap) n(ns) o(os) s(string) v(nvis) w(win)]? ", cmdwin);
+               wwputs("[m(smap) n(ns) o(os) s(string) v(nvis) w(win)]? ", cmdwin);
        wwcurtowin(cmdwin);
        wwcurtowin(cmdwin);
-       while (bpeekc() < 0)
-               bread();
+       while (wwpeekc() < 0)
+               wwiomux();
        if (!terse)
        if (!terse)
-               (void) wwputs("\r\n", cmdwin);
-       switch (bgetc()) {
+               wwputc('\n', cmdwin);
+       switch (wwgetc()) {
        case 'm':
                wwdumpsmap();
                break;
        case 'm':
                wwdumpsmap();
                break;
@@ -59,7 +70,7 @@ debug_str()
        for (s = str_head.s_forw; s != &str_head; s = s->s_forw) {
                if (more(w, 0) == 2)
                        goto out;
        for (s = str_head.s_forw; s != &str_head; s = s->s_forw) {
                if (more(w, 0) == 2)
                        goto out;
-               (void) wwprintf(w, "(0x%x)\t\"%s\"\n", s->s_data, s->s_data);
+               wwprintf(w, "(0x%x)\t\"%s\"\n", s->s_data, s->s_data);
        }
        waitnl(w);
 out:
        }
        waitnl(w);
 out: