From 18fad16a7d5bc7e981e2824c7a5ade68ce9a2064 Mon Sep 17 00:00:00 2001 From: Dale Weiler Date: Sun, 14 Apr 2013 01:41:13 +0000 Subject: [PATCH] cleanups --- lexer.c | 2 +- test.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lexer.c b/lexer.c index 97fcbf3..8d6f094 100644 --- a/lexer.c +++ b/lexer.c @@ -272,7 +272,7 @@ void lex_close(lex_file *lex) static int lex_fgetc(lex_file *lex) { if (lex->file) - return fgetc(lex->file); + return fs_file_getc(lex->file); if (lex->open_string) { if (lex->open_string_pos >= lex->open_string_length) return EOF; diff --git a/test.c b/test.c index ebd7bfa..d853f41 100644 --- a/test.c +++ b/test.c @@ -644,9 +644,9 @@ bool task_propagate(const char *curdir, size_t *pad, const char *defs) { char buffer[4096]; size_t found = 0; - dir = opendir(curdir); + dir = fs_dir_open(curdir); - while ((files = readdir(dir))) { + while ((files = fs_dir_read(dir))) { snprintf(buffer, sizeof(buffer), "%s/%s", curdir, files->d_name); if (stat(buffer, &directory) == -1) { @@ -777,7 +777,7 @@ bool task_propagate(const char *curdir, size_t *pad, const char *defs) { found ); - closedir(dir); + fs_dir_close(dir); return success; } @@ -790,9 +790,9 @@ void task_precleanup(const char *curdir) { struct dirent *files; char buffer[4096]; - dir = opendir(curdir); + dir = fs_dir_open(curdir); - while ((files = readdir(dir))) { + while ((files = fs_dir_read(dir))) { if (strstr(files->d_name, "TMP") || strstr(files->d_name, ".stdout") || strstr(files->d_name, ".stderr")) @@ -805,7 +805,7 @@ void task_precleanup(const char *curdir) { } } - closedir(dir); + fs_dir_close(dir); } void task_destroy(void) { -- 2.39.2