updated c_help()
[unix-history] / usr / src / usr.bin / window / startup.c
CommitLineData
34ac147f 1#ifndef lint
93a0439e 2static char *sccsid = "@(#)startup.c 3.3 83/08/18";
34ac147f
EW
3#endif
4
5#include "defs.h"
6
34ac147f
EW
7doconfig()
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 */
21dodefault()
22{
23 struct ww *w;
3acb719c 24 register r = wwnrow / 2 - 1;
34ac147f 25
3acb719c 26 if ((w = openwin(-1, r, wwncol, 1, 0)) == 0)
34ac147f 27 goto bad;
3acb719c 28 if (openwin(-1, wwnrow - r - 2, wwncol, r + 2, 0) == 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;
33bad:
bb94cfe3 34 (void) wwputs("Can't open default windows. ", cmdwin);
34ac147f 35}