]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - fs.c
Fet rid of explicit file stream flushes, streams are flushed on exit, which we can...
[xonotic/gmqcc.git] / fs.c
diff --git a/fs.c b/fs.c
index e66e440a26da5c23ac6a289b30e26948c96ab646..997b368b13ce6bf801ff5637b9689ae464e853b0 100644 (file)
--- a/fs.c
+++ b/fs.c
@@ -53,7 +53,7 @@
     ) {
         wprintf(L"Invalid parameter dectected %s:%d %s [%s]\n", file, line, function, expression);
         wprintf(L"Aborting ...\n");
-        abort();
+        exit(EXIT_FAILURE);
     }
 
     static void file_init() {
@@ -165,11 +165,6 @@ int fs_file_seek(FILE *fp, long int off, int whence) {
     return fseek(fp, off, whence);
 }
 
-int fs_file_flush(FILE *fp) {
-    /* Invokes file_exception on windows if fp is null */
-    return fflush(fp);
-}
-
 long int fs_file_tell(FILE *fp) {
     /* Invokes file_exception on windows if fp is null */
     return ftell(fp);
@@ -298,7 +293,6 @@ int fs_file_getline(char **lineptr, size_t *n, FILE *stream) {
 #else
 #   if !defined(__MINGW32__)
 #       include <sys/stat.h> /* mkdir */
-#       include <unistd.h>   /* chdir */
 
         int fs_dir_make(const char *path) {
             return mkdir(path, 0700);
@@ -321,8 +315,4 @@ struct dirent *fs_dir_read(DIR *dir) {
     return readdir(dir);
 }
 
-int fs_dir_change(const char *path) {
-    return chdir(path);
-}
-
 #endif /*! defined(_WIN32) && !defined(__MINGW32__) */