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);
lex = (lex_file*)mem_a(sizeof(*lex));
if (!lex) {
- fclose(in);
+ file_close(in);
lexerror(NULL, "out of memory\n");
return NULL;
}
vec_free(lex->modelname);
if (lex->file)
- fclose(lex->file);
+ file_close(lex->file);
#if 0
if (lex->tok)
token_delete(lex->tok);