aboutsummaryrefslogtreecommitdiff
path: root/liolib.c
diff options
context:
space:
mode:
Diffstat (limited to 'liolib.c')
-rw-r--r--liolib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/liolib.c b/liolib.c
index 81d3e05b..942e9388 100644
--- a/liolib.c
+++ b/liolib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: liolib.c,v 1.118 2001/07/12 14:59:14 roberto Exp roberto $ 2** $Id: liolib.c,v 1.119 2001/07/12 18:11:58 roberto Exp roberto $
3** Standard I/O (and system) library 3** Standard I/O (and system) library
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -237,7 +237,7 @@ static int read_until (lua_State *L, FILE *f, const l_char *p, int pl) {
237 luaL_buffinit(L, &b); 237 luaL_buffinit(L, &b);
238 prep_read_until(next, p, pl); 238 prep_read_until(next, p, pl);
239 j = 0; 239 j = 0;
240 while ((c = fgetc(f)) != EOF) { 240 while ((c = getc(f)) != EOF) {
241 NoRead: 241 NoRead:
242 if (c == p[j]) { 242 if (c == p[j]) {
243 j++; /* go to next char in pattern */ 243 j++; /* go to next char in pattern */
@@ -272,7 +272,7 @@ static int read_number (lua_State *L, FILE *f) {
272 272
273 273
274static int test_eof (lua_State *L, FILE *f) { 274static int test_eof (lua_State *L, FILE *f) {
275 l_charint c = fgetc(f); 275 l_charint c = getc(f);
276 ungetc(c, f); 276 ungetc(c, f);
277 lua_pushlstring(L, NULL, 0); 277 lua_pushlstring(L, NULL, 0);
278 return (c != EOF); 278 return (c != EOF);