mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 08:30:16 +00:00
Take dependencies out of file_extract.h
This commit is contained in:
parent
84b9898934
commit
ed933aab05
@ -570,21 +570,3 @@ struct string_list *zlib_get_file_list(const char *path, const char *valid_exts)
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
struct string_list *compressed_file_list_new(const char *path,
|
||||
const char* ext)
|
||||
{
|
||||
#ifdef HAVE_COMPRESSION
|
||||
const char* file_ext = path_get_extension(path);
|
||||
#ifdef HAVE_7ZIP
|
||||
if (strcasecmp(file_ext,"7z") == 0)
|
||||
return compressed_7zip_file_list_new(path,ext);
|
||||
#endif
|
||||
#ifdef HAVE_ZLIB
|
||||
if (strcasecmp(file_ext,"zip") == 0)
|
||||
return zlib_get_file_list(path, ext);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
return NULL;
|
||||
}
|
||||
|
@ -21,14 +21,6 @@
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef HAVE_7ZIP
|
||||
#include "decompress/7zip_support.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ZLIB
|
||||
#include "decompress/zip_support.h"
|
||||
#endif
|
||||
|
||||
/* Returns true when parsing should continue. False to stop. */
|
||||
typedef int (*zlib_file_cb)(const char *name, const char *valid_exts,
|
||||
const uint8_t *cdata, unsigned cmode, uint32_t csize, uint32_t size,
|
||||
|
26
file_ops.c
26
file_ops.c
@ -29,6 +29,14 @@
|
||||
#include "file_extract.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_7ZIP
|
||||
#include "decompress/7zip_support.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ZLIB
|
||||
#include "decompress/zip_support.h"
|
||||
#endif
|
||||
|
||||
#ifdef __HAIKU__
|
||||
#include <kernel/image.h>
|
||||
#endif
|
||||
@ -235,3 +243,21 @@ int read_file(const char *path, void **buf, ssize_t *length)
|
||||
#endif
|
||||
return read_generic_file(path, buf, length);
|
||||
}
|
||||
|
||||
struct string_list *compressed_file_list_new(const char *path,
|
||||
const char* ext)
|
||||
{
|
||||
#ifdef HAVE_COMPRESSION
|
||||
const char* file_ext = path_get_extension(path);
|
||||
#ifdef HAVE_7ZIP
|
||||
if (strcasecmp(file_ext,"7z") == 0)
|
||||
return compressed_7zip_file_list_new(path,ext);
|
||||
#endif
|
||||
#ifdef HAVE_ZLIB
|
||||
if (strcasecmp(file_ext,"zip") == 0)
|
||||
return zlib_get_file_list(path, ext);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user