tiny rewrite, type fixes

This commit is contained in:
rlar 2010-11-06 17:29:28 +00:00
parent c5c6fe477b
commit dbdd7dc741
2 changed files with 9 additions and 6 deletions

View File

@ -1,3 +1,7 @@
2010-11-06 Robert Larice
* src/frontend/parser/input.c :
tiny rewrite, type fixes
2010-11-06 Robert Larice
* src/frontend/inpcom.c :
drop a redundant check

View File

@ -25,14 +25,14 @@ int
inchar(FILE *fp)
{
char c;
#ifndef HAS_WINDOWS
int i;
char c;
ssize_t i;
if (cp_interactive && !cp_nocc) {
do {
i = read((int) fileno(fp), &c, 1);
} while (i == -1 && errno == EINTR);
i = read(fileno(fp), &c, 1);
} while (i == -1 && errno == EINTR);
if (i == 0 || c == '\004')
return (EOF);
else if (i == -1) {
@ -42,8 +42,7 @@ inchar(FILE *fp)
return ((int) c);
} else
#endif
c = getc(fp);
return ((int) c);
return (getc(fp));
}