summaryrefslogtreecommitdiff
path: root/src/fios.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-08-31 10:50:05 +0000
committerrubidium <rubidium@openttd.org>2008-08-31 10:50:05 +0000
commitea1f180a55f66ae02f95e63d387fa445061daa25 (patch)
treec32cbaf06fe071c31b5540a00a6a0e8317d4f1d4 /src/fios.h
parent46e23b8f996f0e684d2447c637b10daa5abfb964 (diff)
downloadopenttd-ea1f180a55f66ae02f95e63d387fa445061daa25.tar.xz
(svn r14199) -Codechange: split fileio.h into fileio_type.h and fileio_func.h so not everything that includes saveload.h needs to include everything else too.
Diffstat (limited to 'src/fios.h')
-rw-r--r--src/fios.h47
1 files changed, 0 insertions, 47 deletions
diff --git a/src/fios.h b/src/fios.h
index 40982bf4d..d40292be1 100644
--- a/src/fios.h
+++ b/src/fios.h
@@ -110,51 +110,4 @@ FiosType FiosGetSavegameListCallback(SaveLoadDialogMode mode, const char *file,
int CDECL compare_FiosItems(const void *a, const void *b);
-/* Implementation of opendir/readdir/closedir for Windows */
-#if defined(WIN32)
-#include <windows.h>
-struct DIR;
-
-struct dirent { // XXX - only d_name implemented
- TCHAR *d_name; // name of found file
- /* little hack which will point to parent DIR struct which will
- * save us a call to GetFileAttributes if we want information
- * about the file (for example in function fio_bla) */
- DIR *dir;
-};
-
-struct DIR {
- HANDLE hFind;
- /* the dirent returned by readdir.
- * note: having only one global instance is not possible because
- * multiple independent opendir/readdir sequences must be supported. */
- dirent ent;
- WIN32_FIND_DATA fd;
- /* since opendir calls FindFirstFile, we need a means of telling the
- * first call to readdir that we already have a file.
- * that's the case iff this is true */
- bool at_first_entry;
-};
-
-DIR *opendir(const TCHAR *path);
-struct dirent *readdir(DIR *d);
-int closedir(DIR *d);
-#else
-/* Use system-supplied opendir/readdir/closedir functions */
-# include <sys/types.h>
-# include <dirent.h>
-#endif /* defined(WIN32) */
-
-/**
- * A wrapper around opendir() which will convert the string from
- * OPENTTD encoding to that of the filesystem. For all purposes this
- * function behaves the same as the original opendir function
- * @param path string to open directory of
- * @return DIR pointer
- */
-static inline DIR *ttd_opendir(const char *path)
-{
- return opendir(OTTD2FS(path));
-}
-
#endif /* FIOS_H */