Rename retro_fmemcpy_alloc to retro_read_file

This commit is contained in:
twinaphex 2015-09-19 00:36:27 +02:00
parent 3564532564
commit 32ddeb3f96
4 changed files with 7 additions and 7 deletions

View File

@ -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,

View File

@ -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)
{

View File

@ -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;

View File

@ -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);