From 32ddeb3f96de912a710802085d25628899ec4906 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 19 Sep 2015 00:36:27 +0200 Subject: [PATCH] Rename retro_fmemcpy_alloc to retro_read_file --- file_ops.c | 4 ++-- libretro-common/file/file_extract.c | 4 ++-- libretro-common/file/retro_file.c | 4 ++-- libretro-common/include/retro_file.h | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/file_ops.c b/file_ops.c index f2a6afb456..c5e8020663 100644 --- a/file_ops.c +++ b/file_ops.c @@ -701,7 +701,7 @@ int read_compressed_file(const char * path, void **buf, * @length : Number of items read, -1 on error. * * Read the contents of a file into @buf. Will call read_compressed_file - * if path contains a compressed file, otherwise will call retro_fmemcpy_alloc. + * if path contains a compressed file, otherwise will call retro_read_file(). * * Returns: 1 if file read, 0 on error. */ @@ -714,7 +714,7 @@ int read_file(const char *path, void **buf, ssize_t *length) return 1; } #endif - return retro_fmemcpy_alloc(path, buf, length); + return retro_read_file(path, buf, length); } struct string_list *compressed_file_list_new(const char *path, diff --git a/libretro-common/file/file_extract.c b/libretro-common/file/file_extract.c index cf4063e90c..e8948455a1 100644 --- a/libretro-common/file/file_extract.c +++ b/libretro-common/file/file_extract.c @@ -35,7 +35,7 @@ /* File backends. Can be fleshed out later, but keep it simple for now. * The file is mapped to memory directly (via mmap() or just - * plain retro_fmemcpy_alloc()). + * plain retro_read_file()). */ struct zlib_file_backend @@ -181,7 +181,7 @@ static void *zlib_file_open(const char *path) if (!data) return NULL; - read_from_file = retro_fmemcpy_alloc(path, &data->data, &ret); + read_from_file = retro_read_file(path, &data->data, &ret); if (!read_from_file || ret < 0) { diff --git a/libretro-common/file/retro_file.c b/libretro-common/file/retro_file.c index ae135e7f35..5a688d4880 100644 --- a/libretro-common/file/retro_file.c +++ b/libretro-common/file/retro_file.c @@ -256,7 +256,7 @@ bool retro_fmemcpy(const char *path, char *s, size_t len, ssize_t *bytes_written } /** - * retro_fmemcpy_alloc: + * retro_read_file: * @path : path to file. * @buf : buffer to allocate and read the contents of the * file into. Needs to be freed manually. @@ -265,7 +265,7 @@ bool retro_fmemcpy(const char *path, char *s, size_t len, ssize_t *bytes_written * * Returns: number of items read, -1 on error. */ -int retro_fmemcpy_alloc(const char *path, void **buf, ssize_t *len) +int retro_read_file(const char *path, void **buf, ssize_t *len) { ssize_t ret = 0; ssize_t content_buf_size = 0; diff --git a/libretro-common/include/retro_file.h b/libretro-common/include/retro_file.h index f2968a42ed..421afb4d25 100644 --- a/libretro-common/include/retro_file.h +++ b/libretro-common/include/retro_file.h @@ -59,7 +59,7 @@ int retro_fclose(RFILE *stream); bool retro_fmemcpy(const char *path, char *s, size_t len, ssize_t *bytes_written); -int retro_fmemcpy_alloc(const char *path, void **buf, ssize_t *len); +int retro_read_file(const char *path, void **buf, ssize_t *len); bool retro_write_file(const char *path, const void *data, ssize_t size);