Commit | Line | Data |
---|---|---|
34ac147f | 1 | #ifndef lint |
14f251df | 2 | static char *sccsid = "@(#)startup.c 3.1 83/08/11"; |
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; | |
c417b691 | 24 | register r = wwnrow / 2; |
34ac147f | 25 | |
bb94cfe3 | 26 | if ((w = openwin(-1, r + 1, wwncol, 0, 0)) == 0) |
34ac147f | 27 | goto bad; |
bb94cfe3 | 28 | if (openwin(-1, wwnrow - r, wwncol, r, 0) == 0) |
34ac147f EW |
29 | goto bad; |
30 | setselwin(w); | |
31 | return; | |
32 | bad: | |
bb94cfe3 | 33 | (void) wwputs("Can't open default windows. ", cmdwin); |
34ac147f | 34 | } |