From e9049cbfc91318f51c3d9efb867e4b9f07fcf750 Mon Sep 17 00:00:00 2001 From: Waldemar Celes Date: Mon, 17 Oct 1994 17:04:19 -0200 Subject: [PATCH] files end with EOF, instead of 0. --- inout.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/inout.c b/inout.c index f441f7aa..515c8f0f 100644 --- a/inout.c +++ b/inout.c @@ -4,7 +4,7 @@ ** facilities. */ -char *rcs_inout="$Id: inout.c,v 2.3 1994/09/05 21:22:43 celes Exp celes $"; +char *rcs_inout="$Id: inout.c,v 2.4 1994/10/11 14:38:17 celes Exp $"; #include #include @@ -46,8 +46,7 @@ void lua_errorfunction (void (*fn) (char *s)) */ static int fileinput (void) { - int c = fgetc (fp); - return (c == EOF ? 0 : c); + return fgetc (fp); } /* @@ -55,8 +54,7 @@ static int fileinput (void) */ static int stringinput (void) { - st++; - return (*(st-1)); + return *st++; } /*