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 2010-11-06 Robert Larice
* src/frontend/inpcom.c : * src/frontend/inpcom.c :
drop a redundant check drop a redundant check

View File

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