summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/sdl/sdlos_unix.c
diff options
context:
space:
mode:
author couriersud <couriersud@arcor.de>2015-01-10 01:53:20 +0100
committer couriersud <couriersud@arcor.de>2015-01-10 01:53:20 +0100
commit363b6dd26cc2a20b74290356fd98badc087a7564 (patch)
tree1f100a43ba843a32166009446d6ca5d09e37bd18 /src/osd/sdl/sdlos_unix.c
parentd1f0fd9fe8a52b320f71dbd89544f72e9076f541 (diff)
Aligned sdlfile.c to winfile.c (which is actually included by sdl).
Consequently removed quite some dead code spread across different files.
Diffstat (limited to 'src/osd/sdl/sdlos_unix.c')
-rw-r--r--src/osd/sdl/sdlos_unix.c74
1 files changed, 0 insertions, 74 deletions
diff --git a/src/osd/sdl/sdlos_unix.c b/src/osd/sdl/sdlos_unix.c
index 512a074bdba..cee3f498724 100644
--- a/src/osd/sdl/sdlos_unix.c
+++ b/src/osd/sdl/sdlos_unix.c
@@ -148,79 +148,5 @@ char *osd_get_clipboard_text(void)
}
#endif
-//============================================================
-// osd_stat
-//============================================================
-
-osd_directory_entry *osd_stat(const char *path)
-{
- int err;
- osd_directory_entry *result = NULL;
- #if defined(SDLMAME_NO64BITIO) || defined(SDLMAME_BSD)
- struct stat st;
- #else
- struct stat64 st;
- #endif
-
- #if defined(SDLMAME_NO64BITIO) || defined(SDLMAME_BSD)
- err = stat(path, &st);
- #else
- err = stat64(path, &st);
- #endif
-
- if( err == -1) return NULL;
-
- // create an osd_directory_entry; be sure to make sure that the caller can
- // free all resources by just freeing the resulting osd_directory_entry
- result = (osd_directory_entry *) osd_malloc_array(sizeof(*result) + strlen(path) + 1);
- strcpy(((char *) result) + sizeof(*result), path);
- result->name = ((char *) result) + sizeof(*result);
- result->type = S_ISDIR(st.st_mode) ? ENTTYPE_DIR : ENTTYPE_FILE;
- result->size = (UINT64)st.st_size;
-
- return result;
-}
-
-//============================================================
-// osd_get_volume_name
-//============================================================
-
-const char *osd_get_volume_name(int idx)
-{
- if (idx!=0) return NULL;
- return "/";
-}
-
-//============================================================
-// osd_get_full_path
-//============================================================
-
-file_error osd_get_full_path(char **dst, const char *path)
-{
- file_error err;
- char path_buffer[512];
-
- err = FILERR_NONE;
- if (getcwd(path_buffer, 511) == NULL)
- {
- printf("osd_get_full_path: failed!\n");
- err = FILERR_FAILURE;
- }
- else
- {
- *dst = (char *)osd_malloc_array(strlen(path_buffer)+strlen(path)+3);
- // if it's already a full path, just pass it through
- if (path[0] == '/')
- {
- strcpy(*dst, path);
- }
- else
- {
- sprintf(*dst, "%s%s%s", path_buffer, PATH_SEPARATOR, path);
- }
- }
-
- return err;
-}