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
Flush out the last dregs in the terminal before quitting when
[unix-history]
/
usr
/
src
/
usr.bin
/
ex
/
ex_addr.c
diff --git
a/usr/src/usr.bin/ex/ex_addr.c
b/usr/src/usr.bin/ex/ex_addr.c
index
4331330
..
1fb6703
100644
(file)
--- a/
usr/src/usr.bin/ex/ex_addr.c
+++ b/
usr/src/usr.bin/ex/ex_addr.c
@@
-5,7
+5,7
@@
*/
#ifndef lint
*/
#ifndef lint
-static char
sccsid[] = "@(#)ex_addr.c 7.2
(Berkeley) %G%";
+static char
*sccsid = "@(#)ex_addr.c 7.5
(Berkeley) %G%";
#endif not lint
#include "ex.h"
#endif not lint
#include "ex.h"
@@
-88,7
+88,7
@@
getnum()
register int cnt;
for (cnt = 0; isdigit(peekcd());)
register int cnt;
for (cnt = 0; isdigit(peekcd());)
- cnt = cnt * 10 + getchar() - '0';
+ cnt = cnt * 10 +
ex_
getchar() - '0';
return (cnt);
}
return (cnt);
}
@@
-132,8
+132,8
@@
setnoaddr()
* than the number of lines in the file.
*/
line *
* than the number of lines in the file.
*/
line *
-address(inline)
- char *inline;
+address(in
put
line)
+ char *in
put
line;
{
register line *addr;
register int offset, c;
{
register line *addr;
register int offset, c;
@@
-199,16
+199,16
@@
address(inline)
notempty();
savere(scanre);
addr = dot;
notempty();
savere(scanre);
addr = dot;
- if (inline && execute(0, dot)) {
+ if (in
put
line && execute(0, dot)) {
if (c == '/') {
if (c == '/') {
- while (loc1 <= inline) {
+ while (loc1 <= in
put
line) {
if (loc1 == loc2)
loc2++;
if (!execute(1))
goto nope;
}
break;
if (loc1 == loc2)
loc2++;
if (!execute(1))
goto nope;
}
break;
- } else if (loc1 < inline) {
+ } else if (loc1 < in
put
line) {
char *last;
doques:
char *last;
doques:
@@
-218,7
+218,7
@@
doques:
loc2++;
if (!execute(1))
break;
loc2++;
if (!execute(1))
break;
- } while (loc1 < inline);
+ } while (loc1 < in
put
line);
loc1 = last;
break;
}
loc1 = last;
break;
}
@@
-241,8
+241,8
@@
error("No match to TOP|Address search hit TOP without matching pattern");
}
}
if (execute(0, addr)) {
}
}
if (execute(0, addr)) {
- if (inline && c == '?') {
- inline = &linebuf[LBSIZE];
+ if (in
put
line && c == '?') {
+ in
put
line = &linebuf[LBSIZE];
goto doques;
}
break;
goto doques;
}
break;
@@
-261,7
+261,7
@@
error("No match to TOP|Address search hit TOP without matching pattern");
continue;
case '\'':
continue;
case '\'':
- c = markreg(getchar());
+ c = markreg(
ex_
getchar());
if (c == 0)
error("Marks are ' and a-z");
addr = getmark(c);
if (c == 0)
error("Marks are ' and a-z");
addr = getmark(c);