ww_availmodes and stuff
[unix-history] / usr / src / usr.bin / window / startup.c
index 509edc3..cae5513 100644 (file)
@@ -1,12 +1,9 @@
 #ifndef lint
 #ifndef lint
-static char *sccsid = "@(#)startup.c   2.1 83/07/30";
+static char *sccsid = "@(#)startup.c   3.2 83/08/17";
 #endif
 
 #include "defs.h"
 
 #endif
 
 #include "defs.h"
 
-struct ww *doopen();
-char *getenv();
-
 doconfig()
 {
        char buf[100];
 doconfig()
 {
        char buf[100];
@@ -14,7 +11,7 @@ doconfig()
 
        if ((home = getenv("HOME")) == 0)
                home = "";
 
        if ((home = getenv("HOME")) == 0)
                home = "";
-       sprintf(buf, "%s/.windowrc", home);
+       (void) sprintf(buf, "%s/.windowrc", home);
        return dosource(buf);
 }
 
        return dosource(buf);
 }
 
@@ -24,14 +21,15 @@ doconfig()
 dodefault()
 {
        struct ww *w;
 dodefault()
 {
        struct ww *w;
-       register r = wwnrow / 2;
+       register r = wwnrow / 2 - 1;
 
 
-       if ((w = doopen(-1, r + 1, wwncol, 0, 0)) == 0)
+       if ((w = openwin(-1, r, wwncol, 1, 0)) == 0)
                goto bad;
                goto bad;
-       if (doopen(-1, wwnrow - r, wwncol, r, 0) == 0)
+       if (openwin(-1, wwnrow - r - 2, wwncol, r + 2, 0) == 0)
                goto bad;
                goto bad;
+       wwprintf(w, "Escape character is %s.\r\n", unctrl(escapec));
        setselwin(w);
        return;
 bad:
        setselwin(w);
        return;
 bad:
-       wwputs("Can't open default windows.  ", cmdwin);
+       (void) wwputs("Can't open default windows.  ", cmdwin);
 }
 }