projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix sccsid to use keywords and modern initialization syntax
[unix-history]
/
usr
/
src
/
usr.bin
/
window
/
wwgets.c
diff --git
a/usr/src/usr.bin/window/wwgets.c
b/usr/src/usr.bin/window/wwgets.c
index
122095c
..
0a5c086
100644
(file)
--- a/
usr/src/usr.bin/window/wwgets.c
+++ b/
usr/src/usr.bin/window/wwgets.c
@@
-1,7
+1,13
@@
#ifndef lint
#ifndef lint
-static char
*sccsid = "@(#)wwgets.c 3.5 84/04/08
";
+static char
sccsid[] = "@(#)wwgets.c 3.9 %G%
";
#endif
#endif
+/*
+ * Copyright (c) 1983 Regents of the University of California,
+ * All rights reserved. Redistribution permitted subject to
+ * the terms of the Berkeley Software License Agreement.
+ */
+
#include "ww.h"
#include "char.h"
#include "ww.h"
#include "char.h"
@@
-12,7
+18,9
@@
register struct ww *w;
{
register char *p = buf;
register char c;
{
register char *p = buf;
register char c;
+ char uc = w->ww_unctrl;
+ w->ww_unctrl = 0;
for (;;) {
wwcurtowin(w);
while ((c = wwgetc()) < 0)
for (;;) {
wwcurtowin(w);
while ((c = wwgetc()) < 0)
@@
-20,8
+28,6
@@
register struct ww *w;
if (c == wwoldtty.ww_sgttyb.sg_erase) {
if (p > buf)
rub(*--p, w);
if (c == wwoldtty.ww_sgttyb.sg_erase) {
if (p > buf)
rub(*--p, w);
- else
- wwputc(ctrl(g), w);
} else if (c == wwoldtty.ww_sgttyb.sg_kill) {
while (p > buf)
rub(*--p, w);
} else if (c == wwoldtty.ww_sgttyb.sg_kill) {
while (p > buf)
rub(*--p, w);
@@
-41,6
+47,7
@@
register struct ww *w;
}
}
*p = 0;
}
}
*p = 0;
+ w->ww_unctrl = uc;
}
static
}
static
@@
-50,5
+57,5
@@
struct ww *w;
register i;
for (i = strlen(unctrl(c)); --i >= 0;)
register i;
for (i = strlen(unctrl(c)); --i >= 0;)
- wwwrite(w, "\b \b", 3);
+
(void)
wwwrite(w, "\b \b", 3);
}
}