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
release 3.3, Feb 2, 1980
[unix-history]
/
usr
/
src
/
usr.bin
/
ex
/
ex_cmds.c
diff --git
a/usr/src/usr.bin/ex/ex_cmds.c
b/usr/src/usr.bin/ex/ex_cmds.c
index
3939db5
..
a85b1b2
100644
(file)
--- a/
usr/src/usr.bin/ex/ex_cmds.c
+++ b/
usr/src/usr.bin/ex/ex_cmds.c
@@
-260,7
+260,9
@@
doecmd:
setnoaddr();
filename(c);
noonl();
setnoaddr();
filename(c);
noonl();
+/*
synctmp();
synctmp();
+*/
continue;
/* global */
continue;
/* global */
@@
-524,7
+526,6
@@
quit:
flush();
unixwt(1, unixex("-i", (char *) 0, 0, 0));
vcontin(0);
flush();
unixwt(1, unixex("-i", (char *) 0, 0, 0));
vcontin(0);
- putpad(TI);
continue;
/* source */
continue;
/* source */
@@
-596,7
+597,7
@@
quit:
tail("version");
setNAEOL();
/* should use SCCS subst here */
tail("version");
setNAEOL();
/* should use SCCS subst here */
- printf("Version 3.
1, November 11, 1979
");
+ printf("Version 3.
3, February 2, 1980
");
noonl();
continue;
noonl();
continue;
@@
-618,7
+619,9
@@
quit:
case 'w':
c = peekchar();
tail(c == 'q' ? "wq" : "write");
case 'w':
c = peekchar();
tail(c == 'q' ? "wq" : "write");
+wq:
if (skipwh() && peekchar() == '!') {
if (skipwh() && peekchar() == '!') {
+ pofix();
ignchar();
setall();
unix0(0);
ignchar();
setall();
unix0(0);
@@
-632,6
+635,14
@@
quit:
goto quit;
continue;
goto quit;
continue;
+/* xit */
+ case 'x':
+ tail("xit");
+ if (!chng)
+ goto quit;
+ c = 'q';
+ goto wq;
+
/* yank */
case 'y':
tail("yank");
/* yank */
case 'y':
tail("yank");
@@
-679,14
+690,15
@@
quit:
caseline:
notempty();
if (addr2 == 0) {
caseline:
notempty();
if (addr2 == 0) {
- if (dot == dol)
- error("At EOF|At end-of-file");
if (UP != NOSTR && c == '\n' && !inglobal)
c = CTRL(k);
if (inglobal)
addr1 = addr2 = dot;
if (UP != NOSTR && c == '\n' && !inglobal)
c = CTRL(k);
if (inglobal)
addr1 = addr2 = dot;
- else
+ else {
+ if (dot == dol)
+ error("At EOF|At end-of-file");
addr1 = addr2 = dot + 1;
addr1 = addr2 = dot + 1;
+ }
}
setdot();
nonzero();
}
setdot();
nonzero();
@@
-714,6
+726,8
@@
numberit:
case '=':
newline();
setall();
case '=':
newline();
setall();
+ if (inglobal == 2)
+ pofix();
printf("%d", lineno(addr2));
noonl();
continue;
printf("%d", lineno(addr2));
noonl();
continue;
@@
-726,12
+740,11
@@
numberit:
filter(2);
} else {
unix0(1);
filter(2);
} else {
unix0(1);
-
vnfl
();
+
pofix
();
putpad(TE);
flush();
unixwt(1, unixex("-c", uxb, 0, 0));
putpad(TE);
flush();
unixwt(1, unixex("-c", uxb, 0, 0));
- vcontin(1);
- putpad(TI);
+ vcontin(0);
nochng();
}
continue;
nochng();
}
continue;