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
date and time created 83/02/11 15:45:08 by rrh
[unix-history]
/
usr
/
src
/
usr.bin
/
ex
/
ex_get.c
diff --git
a/usr/src/usr.bin/ex/ex_get.c
b/usr/src/usr.bin/ex/ex_get.c
index
843cfef
..
4fd5135
100644
(file)
--- a/
usr/src/usr.bin/ex/ex_get.c
+++ b/
usr/src/usr.bin/ex/ex_get.c
@@
-1,5
+1,5
@@
-/* Copyright (c) 198
0
Regents of the University of California */
-static char *sccsid = "@(#)ex_get.c
5.1
%G%";
+/* Copyright (c) 198
1
Regents of the University of California */
+static char *sccsid = "@(#)ex_get.c
7.1
%G%";
#include "ex.h"
#include "ex_tty.h"
#include "ex.h"
#include "ex_tty.h"
@@
-55,7
+55,6
@@
peekchar()
peekcd()
{
peekcd()
{
-
if (peekc == 0)
peekc = getcd();
return (peekc);
if (peekc == 0)
peekc = getcd();
return (peekc);
@@
-65,6
+64,7
@@
getach()
{
register int c;
static char inline[128];
{
register int c;
static char inline[128];
+ struct stat statb;
c = peekc;
if (c != 0) {
c = peekc;
if (c != 0) {
@@
-102,8
+102,11
@@
top:
input = inline;
goto top;
}
input = inline;
goto top;
}
- if (read(0, (char *) &lastc, 1) != 1)
+/* mjm: if (read(0, (char *) &lastc, 1) != 1) CHANGED and added else */
+ if (read(0, inline, 1) != 1)
lastc = EOF;
lastc = EOF;
+ else /* mjm: lastc is a short! */
+ lastc = inline[0]; /* mjm: in rightmost 8 bits ! */
return (lastc);
}
return (lastc);
}