Move string_list to SDK

This commit is contained in:
twinaphex 2014-10-21 19:59:27 +02:00
parent 85980e6671
commit a92b675f8e
11 changed files with 105 additions and 94 deletions

View File

@ -94,7 +94,7 @@ OBJ += frontend/frontend.o \
file.o \
libretro-sdk/file/file_list.o \
dir_list.o \
string_list.o \
libretro-sdk/string/string_list.o \
file_path.o \
hash.o \
driver.o \
@ -632,6 +632,6 @@ endif
JOYCONFIG_OBJ += tools/retroarch-joyconfig.o \
conf/config_file.o \
file_path.o \
string_list.o \
libretro-sdk/string/string_list.o \
libretro-sdk/compat/compat.o \
tools/input_common_joyconfig.o

View File

@ -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 file_path.c dir_list.c 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 file_path.c 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

View File

@ -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 file_path.o 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 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
PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak

View File

@ -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 file_path.o 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 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
ifeq ($(HAVE_LOGGER), 1)
CFLAGS += -DHAVE_LOGGER

View File

@ -15,7 +15,7 @@
*/
#include "config_file_userdata.h"
#include "../string_list.h"
#include <string/string_list.h>
#define get_array_setup() \
struct config_file_userdata *dsp = (struct config_file_userdata*)userdata; \

View File

@ -17,7 +17,7 @@
#ifndef _DIR_LIST_H
#define _DIR_LIST_H
#include "string_list.h"
#include <string/string_list.h>
#ifdef __cplusplus
extern "C" {

View File

@ -22,7 +22,7 @@
#include <stdint.h>
#include <stddef.h>
#include <sys/types.h>
#include "string_list.h"
#include <string/string_list.h>
#ifdef __cplusplus
extern "C" {

View File

@ -24,7 +24,6 @@
#include "../menu_common.h"
#include "../menu_driver.h"
#include "menu_display.h"
#include "../../../string_list.h"
#include "../../../general.h"
#include "../../../file_path.h"
#include "../../../gfx/gl_common.h"

View File

@ -0,0 +1,78 @@
/* Copyright (C) 2010-2014 The RetroArch team
*
* ---------------------------------------------------------------------------------------
* The following license statement only applies to this file (string_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_STRING_LIST_H
#define __LIBRETRO_SDK_STRING_LIST_H
#include <boolean.h>
#include <stdlib.h>
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
union string_list_elem_attr
{
bool b;
int i;
void *p;
};
struct string_list_elem
{
char *data;
union string_list_elem_attr attr;
};
struct string_list
{
struct string_list_elem *elems;
size_t size;
size_t cap;
};
bool string_list_find_elem(const struct string_list *list, const char *elem);
bool string_list_find_elem_prefix(const struct string_list *list,
const char *prefix, const char *elem);
struct string_list *string_split(const char *str, const char *delim);
struct string_list *string_list_new(void);
bool string_list_append(struct string_list *list, const char *elem,
union string_list_elem_attr attr);
void string_list_free(struct string_list *list);
void string_list_join_concat(char *buffer, size_t size,
const struct string_list *list, const char *sep);
void string_list_set(struct string_list *list, unsigned idx,
const char *str);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -1,22 +1,28 @@
/* 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 (string_list.c).
* ---------------------------------------------------------------------------------------
*
* You should have received a copy of the GNU General Public License along with RetroArch.
* If not, see <http://www.gnu.org/licenses/>.
* 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 <stdio.h>
#include <stdint.h>
#include "string_list.h"
#include <string/string_list.h>
#include <string.h>
#include <retro_miscellaneous.h>
#include <compat/strl.h>

View File

@ -1,72 +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 <http://www.gnu.org/licenses/>.
*/
#ifndef __RARCH_STRING_LIST_H
#define __RARCH_STRING_LIST_H
#include <boolean.h>
#include <stdlib.h>
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
union string_list_elem_attr
{
bool b;
int i;
void *p;
};
struct string_list_elem
{
char *data;
union string_list_elem_attr attr;
};
struct string_list
{
struct string_list_elem *elems;
size_t size;
size_t cap;
};
bool string_list_find_elem(const struct string_list *list, const char *elem);
bool string_list_find_elem_prefix(const struct string_list *list,
const char *prefix, const char *elem);
struct string_list *string_split(const char *str, const char *delim);
struct string_list *string_list_new(void);
bool string_list_append(struct string_list *list, const char *elem,
union string_list_elem_attr attr);
void string_list_free(struct string_list *list);
void string_list_join_concat(char *buffer, size_t size,
const struct string_list *list, const char *sep);
void string_list_set(struct string_list *list, unsigned idx,
const char *str);
#ifdef __cplusplus
}
#endif
#endif