checkpoint of hacking for mail.cs.berkeley.edu
[unix-history] / usr / src / usr.bin / window / cmd3.c
CommitLineData
60de5df9 1/*
46e9ea25
KB
2 * Copyright (c) 1983 Regents of the University of California.
3 * All rights reserved.
4 *
3dd3a9e5
KB
5 * This code is derived from software contributed to Berkeley by
6 * Edward Wang at The University of California, Berkeley.
7 *
87f529ec 8 * %sccs.include.redist.c%
60de5df9
EW
9 */
10
46e9ea25 11#ifndef lint
3dd3a9e5 12static char sccsid[] = "@(#)cmd3.c 3.18 (Berkeley) %G%";
46e9ea25
KB
13#endif /* not lint */
14
57f965d5 15#include "defs.h"
b2618f9d 16#include "string.h"
57f965d5 17
0de7ca29
EW
18setescape(esc)
19register char *esc;
20{
21 if (*esc == '^') {
22 if (esc[1] != 0)
23 escapec = esc[1] & 0x1f;
24 else
25 escapec = '^';
26 } else
27 escapec = *esc;
28}
c0893e4e 29
c0893e4e
EW
30setlabel(w, label)
31register struct ww *w;
32char *label;
33{
34 if (w->ww_label != 0)
b2618f9d
EW
35 str_free(w->ww_label);
36 if ((w->ww_label = str_cpy(label)) == 0)
85af59e4 37 return -1;
85af59e4 38 return 0;
c0893e4e 39}