]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - lexer.c
Wrapper around FILE to take advantage of MSVC "secure" CRT. We don't actually defend...
[xonotic/gmqcc.git] / lexer.c
diff --git a/lexer.c b/lexer.c
index 7fc606c22d56962882702f7303568c5713c250ba..cf554fb2d41fb2512766f647a2c9810f76373f67 100644 (file)
--- a/lexer.c
+++ b/lexer.c
@@ -186,7 +186,7 @@ static void lex_token_new(lex_file *lex)
 lex_file* lex_open(const char *file)
 {
     lex_file *lex;
-    FILE *in = util_fopen(file, "rb");
+    FILE *in = file_open(file, "rb");
 
     if (!in) {
         lexerror(NULL, "open failed: '%s'\n", file);
@@ -195,7 +195,7 @@ lex_file* lex_open(const char *file)
 
     lex = (lex_file*)mem_a(sizeof(*lex));
     if (!lex) {
-        fclose(in);
+        file_close(in);
         lexerror(NULL, "out of memory\n");
         return NULL;
     }
@@ -260,7 +260,7 @@ void lex_close(lex_file *lex)
         vec_free(lex->modelname);
 
     if (lex->file)
-        fclose(lex->file);
+        file_close(lex->file);
 #if 0
     if (lex->tok)
         token_delete(lex->tok);