public
/
ack.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
52a6275
)
Test for EOF returned by stdio routines have to use the full int width.
author
keie
<none@none>
Mon, 21 Jan 1985 23:52:19 +0000
(23:52 +0000)
committer
keie
<none@none>
Mon, 21 Jan 1985 23:52:19 +0000
(23:52 +0000)
lang/basic/lib/io.c
patch
|
blob
|
history
diff --git
a/lang/basic/lib/io.c
b/lang/basic/lib/io.c
index
e0df9aa
..
fe651bf
100644
(file)
--- a/
lang/basic/lib/io.c
+++ b/
lang/basic/lib/io.c
@@
-59,6
+59,7
@@
_zone()
_in(buf)
char *buf;
{
+ register int holder ;
char *c;
int pos;
if( _chann == -1)
@@
-69,8
+70,9
@@
char *buf;
stty(0,_ttydef);
}else pos= _fdtable[_chann].pos;
c= buf;
- while( (*c = fgetc(_chanrd)) != EOF && *c != '\n'){
- if( _chann == -1) putchar(*c);
+ while( (holder = fgetc(_chanrd)) != EOF && holder != '\n'){
+ *c= holder ;
+ if( _chann == -1) putchar(holder);
c++; pos++;
}
*c= 0;