diff options
Diffstat (limited to 'inout.c')
-rw-r--r-- | inout.c | 11 |
1 files changed, 3 insertions, 8 deletions
@@ -5,7 +5,7 @@ | |||
5 | ** Also provides some predefined lua functions. | 5 | ** Also provides some predefined lua functions. |
6 | */ | 6 | */ |
7 | 7 | ||
8 | char *rcs_inout="$Id: inout.c,v 2.56 1997/04/06 14:08:08 roberto Exp roberto $"; | 8 | char *rcs_inout="$Id: inout.c,v 2.57 1997/04/06 14:14:27 roberto Exp roberto $"; |
9 | 9 | ||
10 | #include <stdio.h> | 10 | #include <stdio.h> |
11 | #include <string.h> | 11 | #include <string.h> |
@@ -68,8 +68,6 @@ FILE *lua_openfile (char *fn) | |||
68 | } | 68 | } |
69 | else | 69 | else |
70 | fp = fopen (fn, "r"); | 70 | fp = fopen (fn, "r"); |
71 | if (fp == NULL) | ||
72 | return NULL; | ||
73 | lua_parsedfile = luaI_createfixedstring(fn)->str; | 71 | lua_parsedfile = luaI_createfixedstring(fn)->str; |
74 | return fp; | 72 | return fp; |
75 | } | 73 | } |
@@ -79,11 +77,8 @@ FILE *lua_openfile (char *fn) | |||
79 | */ | 77 | */ |
80 | void lua_closefile (void) | 78 | void lua_closefile (void) |
81 | { | 79 | { |
82 | if (fp != NULL && fp != stdin) | 80 | if (fp != stdin) |
83 | { | 81 | fclose(fp); |
84 | fclose (fp); | ||
85 | fp = NULL; | ||
86 | } | ||
87 | } | 82 | } |
88 | 83 | ||
89 | /* | 84 | /* |