From 4e7e7c3ab07279f3e826c60b93f3153314bb3f7f Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Thu, 7 Feb 2013 15:43:26 +0900 Subject: [PATCH] Rename Sys_FileTime to Sys_FileExists. The function never did anything but check the readability of the file. --- include/QF/sys.h | 2 +- libs/util/quakefs.c | 4 ++-- libs/util/sys.c | 2 +- tools/qfmodelgen/source/modelgen.c | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/QF/sys.h b/include/QF/sys.h index f8fd109eb..b524cd558 100644 --- a/include/QF/sys.h +++ b/include/QF/sys.h @@ -58,7 +58,7 @@ typedef struct date_s { char str[128]; } date_t; -int Sys_FileTime (const char *path); +int Sys_FileExists (const char *path); int Sys_mkdir (const char *path); typedef void (*sys_printf_t) (const char *fmt, va_list args); diff --git a/libs/util/quakefs.c b/libs/util/quakefs.c index 105ff096b..b864dfb74 100644 --- a/libs/util/quakefs.c +++ b/libs/util/quakefs.c @@ -847,7 +847,7 @@ open_file (searchpath_t *search, const char *filename, QFile **gzfile, dstring_clearstr (foundname); dstring_appendstr (foundname, filename); } - if (Sys_FileTime (netpath->str) == -1) { + if (Sys_FileExists (netpath->str) == -1) { dstring_delete (netpath); return -1; } @@ -1399,7 +1399,7 @@ QFS_NextFilename (dstring_t *filename, const char *prefix, const char *ext) if (qfs_expand_userpath (full_path, filename->str) == -1) break; - if (Sys_FileTime (full_path->str) == -1) { + if (Sys_FileExists (full_path->str) == -1) { // file doesn't exist, so we can use this name ret = 1; break; diff --git a/libs/util/sys.c b/libs/util/sys.c index f9339b898..012106787 100644 --- a/libs/util/sys.c +++ b/libs/util/sys.c @@ -185,7 +185,7 @@ Sys_mkdir (const char *path) } VISIBLE int -Sys_FileTime (const char *path) +Sys_FileExists (const char *path) { #ifdef HAVE_ACCESS if (access (path, R_OK) == 0) diff --git a/tools/qfmodelgen/source/modelgen.c b/tools/qfmodelgen/source/modelgen.c index 70763d844..4905ad041 100644 --- a/tools/qfmodelgen/source/modelgen.c +++ b/tools/qfmodelgen/source/modelgen.c @@ -578,7 +578,7 @@ Cmd_Base (void) ExpandPath/*AndArchive*/ (file1); sprintf (file1, "%s/%s.tri", cddir, scr.token->str); - time1 = Sys_FileTime (file1); + time1 = Sys_FileExists (file1); if (time1 == -1) Sys_Error ("%s doesn't exist", file1); @@ -633,7 +633,7 @@ Cmd_Skin (void) ExpandPath/*AndArchive*/ (file1); sprintf (file1, "%s/%s.lbm", cddir, scr.token->str); - time1 = Sys_FileTime (file1); + time1 = Sys_FileExists (file1); if (time1 == -1) Sys_Error ("%s not found", file1); @@ -683,7 +683,7 @@ GrabFrame (char *frame, int isgroup) ExpandPath/*AndArchive*/ (file1); sprintf (file1, "%s/%s.tri", cddir, frame); - time1 = Sys_FileTime (file1); + time1 = Sys_FileExists (file1); if (time1 == -1) Sys_Error ("%s does not exist", file1);