From 174d011bedb2b7af94835c5a57bd404034ee47df Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 22 Oct 2014 01:13:05 +0200 Subject: [PATCH] Move dir_list to SDK --- Makefile.common | 2 +- Makefile.ps3.salamander | 2 +- Makefile.psp1.salamander | 2 +- Makefile.wii.salamander | 2 +- apple/iOS/browser.m | 2 +- audio/dsp_filter.c | 2 +- core_info.c | 2 +- core_options.c | 2 +- dir_list.h | 37 ------------------- frontend/frontend_salamander.c | 2 +- frontend/menu/disp/lakka.c | 2 +- frontend/menu/menu_entries.c | 2 +- gfx/context/drm_egl_ctx.c | 2 +- gfx/filter.c | 2 +- gfx/video_thread_wrapper.c | 2 +- griffin/griffin.c | 2 +- input/input_autodetect.c | 2 +- dir_list.c => libretro-sdk/file/dir_list.c | 32 +++++++++------- libretro-sdk/include/file/dir_list.h | 43 ++++++++++++++++++++++ retroarch.c | 2 +- runloop.c | 1 - 21 files changed, 79 insertions(+), 68 deletions(-) delete mode 100644 dir_list.h rename dir_list.c => libretro-sdk/file/dir_list.c (82%) create mode 100644 libretro-sdk/include/file/dir_list.h diff --git a/Makefile.common b/Makefile.common index 9c6dd53633..1d2c3b1a76 100644 --- a/Makefile.common +++ b/Makefile.common @@ -93,7 +93,7 @@ OBJ += frontend/frontend.o \ runloop.o \ content.o \ libretro-sdk/file/file_list.o \ - dir_list.o \ + libretro-sdk/file/dir_list.o \ libretro-sdk/string/string_list.o \ file_ops.o \ libretro-sdk/file/file_path.o \ diff --git a/Makefile.ps3.salamander b/Makefile.ps3.salamander index fed7da51ad..d168d3e5e1 100644 --- a/Makefile.ps3.salamander +++ b/Makefile.ps3.salamander @@ -19,7 +19,7 @@ endif STRIP = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-strip.exe PPU_CFLAGS += -I. -Ilibretro-sdk/include -D__CELLOS_LV2__ -DIS_SALAMANDER -DRARCH_CONSOLE -DHAVE_SYSUTILS -DHAVE_SYSMODULES -DHAVE_RARCH_EXEC -DRARCH_INTERNAL -PPU_SRCS = frontend/frontend_salamander.c frontend/frontend_context.c frontend/platform/platform_ps3.c frontend/platform/platform_null.c libretro-sdk/file/file_path.c dir_list.c libretro-sdk/string/string_list.c libretro-sdk/compat/compat.c conf/config_file.c +PPU_SRCS = frontend/frontend_salamander.c frontend/frontend_context.c frontend/platform/platform_ps3.c frontend/platform/platform_null.c libretro-sdk/file/file_path.c libretro-sdk/file/dir_list.c libretro-sdk/string/string_list.c libretro-sdk/compat/compat.c conf/config_file.c ifeq ($(HAVE_LOGGER), 1) PPU_CFLAGS += -DHAVE_LOGGER -Ilogger/netlogger diff --git a/Makefile.psp1.salamander b/Makefile.psp1.salamander index bb72460e1d..82265ad099 100644 --- a/Makefile.psp1.salamander +++ b/Makefile.psp1.salamander @@ -31,7 +31,7 @@ PSP_EBOOT_TITLE = RetroArch PSP_EBOOT_ICON = psp1/ICON0.PNG PSP_EBOOT_PIC1 = psp1/PIC1.PNG -OBJS = frontend/frontend_salamander.o frontend/frontend_context.o frontend/platform/platform_psp.o frontend/platform/platform_null.o libretro-sdk/file/file_path.o libretro-sdk/string/string_list.o dir_list.o libretro-sdk/compat/compat.o conf/config_file.o psp1/kernel_functions.o +OBJS = frontend/frontend_salamander.o frontend/frontend_context.o frontend/platform/platform_psp.o frontend/platform/platform_null.o libretro-sdk/file/file_path.o libretro-sdk/string/string_list.o libretro-sdk/file/dir_list.o libretro-sdk/compat/compat.o conf/config_file.o psp1/kernel_functions.o PSPSDK=$(shell psp-config --pspsdk-path) include $(PSPSDK)/lib/build.mak diff --git a/Makefile.wii.salamander b/Makefile.wii.salamander index c1fdb34a77..57d3a4e0d0 100644 --- a/Makefile.wii.salamander +++ b/Makefile.wii.salamander @@ -39,7 +39,7 @@ LIBS := -lfat -lwiiuse -logc -lbte APP_BOOTER_DIR = wii/app_booter -OBJ = frontend/frontend_salamander.o frontend/frontend_context.o frontend/platform/platform_gx.o frontend/platform/platform_wii.o frontend/platform/platform_null.o libretro-sdk/file/file_path.o libretro-sdk/string/string_list.o dir_list.o libretro-sdk/compat/compat.o conf/config_file.o $(APP_BOOTER_DIR)/app_booter.binobj +OBJ = frontend/frontend_salamander.o frontend/frontend_context.o frontend/platform/platform_gx.o frontend/platform/platform_wii.o frontend/platform/platform_null.o libretro-sdk/file/file_path.o libretro-sdk/string/string_list.o libretro-sdk/file/dir_list.o libretro-sdk/compat/compat.o conf/config_file.o $(APP_BOOTER_DIR)/app_booter.binobj ifeq ($(HAVE_LOGGER), 1) CFLAGS += -DHAVE_LOGGER diff --git a/apple/iOS/browser.m b/apple/iOS/browser.m index a986dbfbaf..e277af1fec 100644 --- a/apple/iOS/browser.m +++ b/apple/iOS/browser.m @@ -23,7 +23,7 @@ #include "../../conf/config_file.h" #include "../../content.h" -#include "../../dir_list.h" +#include #include "../../file_ops.h" #include diff --git a/audio/dsp_filter.c b/audio/dsp_filter.c index d819ede45f..347a4c2cf2 100644 --- a/audio/dsp_filter.c +++ b/audio/dsp_filter.c @@ -22,7 +22,7 @@ #include "filters/dspfilter.h" #include #include "../file_ext.h" -#include "../dir_list.h" +#include #include #include diff --git a/core_info.c b/core_info.c index 30008a73e6..b14ad1e0f9 100644 --- a/core_info.c +++ b/core_info.c @@ -18,7 +18,7 @@ #include #include "file_ext.h" #include "file_extract.h" -#include "dir_list.h" +#include #include "config.def.h" #ifdef HAVE_CONFIG_H diff --git a/core_options.c b/core_options.c index 16d110dba2..3b88ca0d0d 100644 --- a/core_options.c +++ b/core_options.c @@ -16,7 +16,7 @@ #include "core_options.h" #include #include "conf/config_file.h" -#include "dir_list.h" +#include #include #include diff --git a/dir_list.h b/dir_list.h deleted file mode 100644 index b69108bb92..0000000000 --- a/dir_list.h +++ /dev/null @@ -1,37 +0,0 @@ -/* RetroArch - A frontend for libretro. - * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2014 - Daniel De Matteis - * - * RetroArch is free software: you can redistribute it and/or modify it under the terms - * of the GNU General Public License as published by the Free Software Found- - * ation, either version 3 of the License, or (at your option) any later version. - * - * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along with RetroArch. - * If not, see . - */ - -#ifndef _DIR_LIST_H -#define _DIR_LIST_H - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -struct string_list *dir_list_new(const char *dir, const char *ext, - bool include_dirs); - -void dir_list_sort(struct string_list *list, bool dir_first); - -void dir_list_free(struct string_list *list); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/frontend/frontend_salamander.c b/frontend/frontend_salamander.c index 8c4a856cc8..24e6134131 100644 --- a/frontend/frontend_salamander.c +++ b/frontend/frontend_salamander.c @@ -23,7 +23,7 @@ #include "../general.h" #include "../file_ext.h" #include -#include "../dir_list.h" +#include #include "frontend_context.h" struct defaults g_defaults; diff --git a/frontend/menu/disp/lakka.c b/frontend/menu/disp/lakka.c index 213f0d5317..b6a4382808 100644 --- a/frontend/menu/disp/lakka.c +++ b/frontend/menu/disp/lakka.c @@ -27,7 +27,7 @@ #include "menu_display.h" #include "../../../general.h" #include -#include "../../../dir_list.h" +#include #include "../../../gfx/gl_common.h" #include "../../../gfx/video_thread_wrapper.h" #include diff --git a/frontend/menu/menu_entries.c b/frontend/menu/menu_entries.c index 05789cfbba..0be6e31076 100644 --- a/frontend/menu/menu_entries.c +++ b/frontend/menu/menu_entries.c @@ -20,7 +20,7 @@ #include #include #include "../../file_ops.h" -#include "../../dir_list.h" +#include #include "../../settings_data.h" #include "../../performance.h" diff --git a/gfx/context/drm_egl_ctx.c b/gfx/context/drm_egl_ctx.c index 592ffbe059..a944a36f48 100644 --- a/gfx/context/drm_egl_ctx.c +++ b/gfx/context/drm_egl_ctx.c @@ -21,7 +21,7 @@ #include "../gfx_context.h" #include "../gl_common.h" #include "../gfx_common.h" -#include "../../dir_list.h" +#include #ifdef HAVE_CONFIG_H #include "../../config.h" diff --git a/gfx/filter.c b/gfx/filter.c index c71e5ccc68..f08a913c98 100644 --- a/gfx/filter.c +++ b/gfx/filter.c @@ -20,7 +20,7 @@ #include "../general.h" #include #include "../file_ext.h" -#include "../dir_list.h" +#include #include "../performance.h" #include diff --git a/gfx/video_thread_wrapper.c b/gfx/video_thread_wrapper.c index 28af262eb3..a6a0435f5a 100644 --- a/gfx/video_thread_wrapper.c +++ b/gfx/video_thread_wrapper.c @@ -15,7 +15,7 @@ #include "video_thread_wrapper.h" #include "../performance.h" -#include "../dir_list.h" +#include #include #include #include diff --git a/griffin/griffin.c b/griffin/griffin.c index f91541dcc4..02cf7a9bc0 100644 --- a/griffin/griffin.c +++ b/griffin/griffin.c @@ -521,7 +521,7 @@ FILE ============================================================ */ #include "../content.c" #include "../libretro-sdk/file/file_path.c" -#include "../dir_list.c" +#include "../libretro-sdk/file/dir_list.c" #include "../libretro-sdk/string/string_list.c" #include "../file_ops.c" #include "../rarch_compr_file_path.c" diff --git a/input/input_autodetect.c b/input/input_autodetect.c index 8843f1e4be..c38120afa7 100644 --- a/input/input_autodetect.c +++ b/input/input_autodetect.c @@ -16,7 +16,7 @@ #include "input_common.h" #include "input_autodetect.h" -#include "../dir_list.h" +#include #include #include #include diff --git a/dir_list.c b/libretro-sdk/file/dir_list.c similarity index 82% rename from dir_list.c rename to libretro-sdk/file/dir_list.c index 804a01a45a..25dd31ef23 100644 --- a/dir_list.c +++ b/libretro-sdk/file/dir_list.c @@ -1,20 +1,26 @@ -/* RetroArch - A frontend for libretro. - * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2014 - Daniel De Matteis - * - * RetroArch is free software: you can redistribute it and/or modify it under the terms - * of the GNU General Public License as published by the Free Software Found- - * ation, either version 3 of the License, or (at your option) any later version. +/* Copyright (C) 2010-2014 The RetroArch team * - * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU General Public License for more details. + * --------------------------------------------------------------------------------------- + * The following license statement only applies to this file (dir_list.c). + * --------------------------------------------------------------------------------------- * - * You should have received a copy of the GNU General Public License along with RetroArch. - * If not, see . + * Permission is hereby granted, free of charge, + * to any person obtaining a copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, + * and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, + * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include "dir_list.h" +#include #include #include #include diff --git a/libretro-sdk/include/file/dir_list.h b/libretro-sdk/include/file/dir_list.h new file mode 100644 index 0000000000..216af5b5b5 --- /dev/null +++ b/libretro-sdk/include/file/dir_list.h @@ -0,0 +1,43 @@ +/* Copyright (C) 2010-2014 The RetroArch team + * + * --------------------------------------------------------------------------------------- + * The following license statement only applies to this file (dir_list.h). + * --------------------------------------------------------------------------------------- + * + * Permission is hereby granted, free of charge, + * to any person obtaining a copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, + * and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, + * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#ifndef __LIBRETRO_SDK_DIR_LIST_H +#define __LIBRETRO_SDK_DIR_LIST_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +struct string_list *dir_list_new(const char *dir, const char *ext, + bool include_dirs); + +void dir_list_sort(struct string_list *list, bool dir_first); + +void dir_list_free(struct string_list *list); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/retroarch.c b/retroarch.c index 6317360e1a..c5a1baa9d1 100644 --- a/retroarch.c +++ b/retroarch.c @@ -25,7 +25,7 @@ #include "content.h" #include "file_ops.h" #include -#include "dir_list.h" +#include #include "general.h" #include #include "screenshot.h" diff --git a/runloop.c b/runloop.c index a5742cca7b..68742ab0ad 100644 --- a/runloop.c +++ b/runloop.c @@ -15,7 +15,6 @@ * If not, see . */ -#include "dir_list.h" #include #include "performance.h" #include "retroarch_logger.h"