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/08/11 20:49:31 by sam
[unix-history]
/
usr
/
src
/
old
/
as.vax
/
asscan2.c
diff --git
a/usr/src/old/as.vax/asscan2.c
b/usr/src/old/as.vax/asscan2.c
index
cc254d6
..
11fe47e
100644
(file)
--- a/
usr/src/old/as.vax/asscan2.c
+++ b/
usr/src/old/as.vax/asscan2.c
@@
-2,7
+2,7
@@
* Copyright (c) 1982 Regents of the University of California
*/
#ifndef lint
* Copyright (c) 1982 Regents of the University of California
*/
#ifndef lint
-static char sccsid[] = "@(#)asscan2.c 4.1
3
%G%";
+static char sccsid[] = "@(#)asscan2.c 4.1
4
%G%";
#endif not lint
#include "asscanl.h"
#endif not lint
#include "asscanl.h"
@@
-13,26
+13,28
@@
char inbufunget[8];
char inbuffer[ASINBUFSIZ];
char *Ginbufptr = inbuffer;
int Ginbufcnt = 0;
char inbuffer[ASINBUFSIZ];
char *Ginbufptr = inbuffer;
int Ginbufcnt = 0;
+int scannerhadeof;
fillinbuffer()
{
int nread;
fillinbuffer()
{
int nread;
- static int hadeof;
int goal;
int got;
nread = 0;
int goal;
int got;
nread = 0;
- if (hadeof == 0){
+ if (
scanner
hadeof == 0){
goal = sizeof(inbuffer);
do {
got = read(stdin->_file, inbuffer + nread, goal);
if (got == 0)
goal = sizeof(inbuffer);
do {
got = read(stdin->_file, inbuffer + nread, goal);
if (got == 0)
- hadeof = 1;
+
scanner
hadeof = 1;
if (got <= 0)
break;
nread += got;
goal -= got;
} while (goal);
if (got <= 0)
break;
nread += got;
goal -= got;
} while (goal);
+ } else {
+ scannerhadeof = 0;
}
/*
* getchar assumes that Ginbufcnt and Ginbufptr
}
/*
* getchar assumes that Ginbufcnt and Ginbufptr