Commit | Line | Data |
---|---|---|
34ac147f | 1 | #ifndef lint |
03e75950 | 2 | static char *sccsid = "@(#)startup.c 3.5 83/08/26"; |
34ac147f EW |
3 | #endif |
4 | ||
5 | #include "defs.h" | |
6 | ||
34ac147f EW |
7 | doconfig() |
8 | { | |
9 | char buf[100]; | |
10 | char *home; | |
11 | ||
12 | if ((home = getenv("HOME")) == 0) | |
13 | home = ""; | |
bb94cfe3 | 14 | (void) sprintf(buf, "%s/.windowrc", home); |
34ac147f EW |
15 | return dosource(buf); |
16 | } | |
17 | ||
18 | /* | |
19 | * The default is two windows of equal sizes. | |
20 | */ | |
21 | dodefault() | |
22 | { | |
23 | struct ww *w; | |
3acb719c | 24 | register r = wwnrow / 2 - 1; |
34ac147f | 25 | |
4cbe417d | 26 | if ((w = openwin(-1, 1, 0, r, wwncol, nbufline)) == 0) |
34ac147f | 27 | goto bad; |
4cbe417d | 28 | if (openwin(-1, r + 2, 0, wwnrow - r - 2, wwncol, nbufline) == 0) |
34ac147f | 29 | goto bad; |
93a0439e | 30 | (void) wwprintf(w, "Escape character is %s.\r\n", unctrl(escapec)); |
34ac147f EW |
31 | setselwin(w); |
32 | return; | |
33 | bad: | |
03e75950 | 34 | (void) wwputs("\nCan't open default windows. ", cmdwin); |
34ac147f | 35 | } |