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
BSD 4_3_Reno release
[unix-history]
/
usr
/
src
/
usr.bin
/
ex
/
ex_cmds2.c
diff --git
a/usr/src/usr.bin/ex/ex_cmds2.c
b/usr/src/usr.bin/ex/ex_cmds2.c
index
cd9ce7e
..
81e34e3
100644
(file)
--- a/
usr/src/usr.bin/ex/ex_cmds2.c
+++ b/
usr/src/usr.bin/ex/ex_cmds2.c
@@
-5,7
+5,7
@@
*/
#ifndef lint
*/
#ifndef lint
-static char *sccsid = "@(#)ex_cmds2.c 7.
4 (Berkeley) %G%
";
+static char *sccsid = "@(#)ex_cmds2.c 7.
6 (Berkeley) 1/2/88
";
#endif not lint
#include "ex.h"
#endif not lint
#include "ex.h"
@@
-30,7
+30,7
@@
cmdreg()
register int wh = skipwh();
if (wh && isalpha(peekchar()))
register int wh = skipwh();
if (wh && isalpha(peekchar()))
- c = getchar();
+ c =
ex_
getchar();
return (c);
}
return (c);
}
@@
-72,10
+72,14
@@
eol()
*/
/*VARARGS2*/
error(str, i)
*/
/*VARARGS2*/
error(str, i)
-#if
def lint
-
register
char *str;
+#if
ndef EXSTRINGS
+ char *str;
#else
#else
- register int str;
+# ifdef lint
+ char *str;
+# else
+ int str;
+# endif
#endif
int i;
{
#endif
int i;
{
@@
-99,9
+103,9
@@
erewind()
argv = argv0;
args = args0;
if (argc > 1 && !hush) {
argv = argv0;
args = args0;
if (argc > 1 && !hush) {
- printf(mesg("%d files@to edit"), argc);
+
ex_
printf(mesg("%d files@to edit"), argc);
if (inopen)
if (inopen)
- putchar(' ');
+
ex_
putchar(' ');
else
putNFL();
}
else
putNFL();
}
@@
-183,7
+187,7
@@
error1(str)
if (str && !vcatch)
putNFL();
if (die)
if (str && !vcatch)
putNFL();
if (die)
- exit(1);
+ ex
_ex
it(1);
lseek(0, 0L, 2);
if (inglobal)
setlastchar('\n');
lseek(0, 0L, 2);
if (inglobal)
setlastchar('\n');
@@
-263,7
+267,7
@@
newline()
resetflav();
for (;;) {
resetflav();
for (;;) {
- c = getchar();
+ c =
ex_
getchar();
switch (c) {
case '^':
switch (c) {
case '^':
@@
-336,7
+340,7
@@
quickly()
chng = 0;
*/
xchng = 0;
chng = 0;
*/
xchng = 0;
- error("No write@since last change (:%s! overrides)", Command);
+
s
error("No write@since last change (:%s! overrides)", Command);
}
return (0);
}
}
return (0);
}
@@
-385,8
+389,8
@@
setflav()
if (inopen)
return;
if (inopen)
return;
-
setnumb(nflag || value(NUMBER
));
-
setlist(listf || value(LIST
));
+
ignorf(setnumb(nflag || value(NUMBER)
));
+
ignorf(setlist(listf || value(LIST)
));
setoutt();
}
setoutt();
}
@@
-444,7
+448,7
@@
tailprim(comm, i, notinvis)
for (cp = tcommand; i > 0; i--)
*cp++ = *comm++;
while (*comm && peekchar() == *comm)
for (cp = tcommand; i > 0; i--)
*cp++ = *comm++;
while (*comm && peekchar() == *comm)
- *cp++ = getchar(), comm++;
+ *cp++ =
ex_
getchar(), comm++;
c = peekchar();
if (notinvis || isalpha(c)) {
/*
c = peekchar();
if (notinvis || isalpha(c)) {
/*
@@
-456,7
+460,7
@@
tailprim(comm, i, notinvis)
if (tcommand[0] == 's' && any(c, "gcr"))
goto ret;
while (cp < &tcommand[19] && isalpha(peekchar()))
if (tcommand[0] == 's' && any(c, "gcr"))
goto ret;
while (cp < &tcommand[19] && isalpha(peekchar()))
- *cp++ = getchar();
+ *cp++ =
ex_
getchar();
*cp = 0;
if (notinvis)
serror("What?|%s: No such command from open/visual", tcommand);
*cp = 0;
if (notinvis)
serror("What?|%s: No such command from open/visual", tcommand);
@@
-511,7
+515,7
@@
vcontin(ask)
* Gobble ^Q/^S since the tty driver should be eating
* them (as far as the user can see)
*/
* Gobble ^Q/^S since the tty driver should be eating
* them (as far as the user can see)
*/
- while (peekkey() == CTRL(
Q) || peekkey() == CTRL(S
))
+ while (peekkey() == CTRL(
'Q') || peekkey() == CTRL('S'
))
ignore(getkey());
#endif
if(getkey() == ':') {
ignore(getkey());
#endif
if(getkey() == ':') {
@@
-522,7
+526,7
@@
vcontin(ask)
}
}
vclrech(1);
}
}
vclrech(1);
- if (Peekkey != ':') {
+ if (Peek
_
key != ':') {
putpad(TI);
tostart();
/* replaced by ostart.
putpad(TI);
tostart();
/* replaced by ostart.