we have to initialize escapec before processing arguments
[unix-history] / usr / src / usr.bin / window / cmd6.c
index 024565c..bc8824e 100644 (file)
@@ -1,9 +1,10 @@
 #ifndef lint
 #ifndef lint
-static char *sccsid = "@(#)cmd6.c      3.6 84/01/13";
+static char sccsid[] = "@(#)cmd6.c     3.12 %G%";
 #endif
 
 #include "defs.h"
 #include "string.h"
 #endif
 
 #include "defs.h"
 #include "string.h"
+#include "char.h"
 
 /*
  * Debugging commands.
 
 /*
  * Debugging commands.
@@ -14,13 +15,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 +60,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: