diff --git a/Makefile b/Makefile index dc85145e7f..42d6fc8454 100644 --- a/Makefile +++ b/Makefile @@ -57,7 +57,7 @@ RETROLAUNCH_OBJ = tools/retrolaunch/main.o \ tools/retrolaunch/sha1.o \ tools/retrolaunch/parser.o \ tools/retrolaunch/cd_detect.o \ - tools/retrolaunch/rl_fnmatch.o \ + compat/rarch_fnmatch.o \ tools/input_common_launch.o \ file_path.o \ compat/compat.o \ diff --git a/tools/retrolaunch/rl_fnmatch.c b/compat/rarch_fnmatch.c similarity index 82% rename from tools/retrolaunch/rl_fnmatch.c rename to compat/rarch_fnmatch.c index 81430dcef0..7a09a0221e 100644 --- a/tools/retrolaunch/rl_fnmatch.c +++ b/compat/rarch_fnmatch.c @@ -1,11 +1,29 @@ +/* RetroArch - A frontend for libretro. + * Copyright (C) 2010-2014 - Hans-Kristian Arntzen + * Copyright (C) 2011-2014 - Daniel De Matteis + * Copyright (C) 2012-2014 - Ficoos + * + * 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 . + */ + #if __TEST_FNMATCH__ #include #endif -#include "rl_fnmatch.h" +#include "rarch_fnmatch.h" // Implemnentation of fnmatch(3) so it can be distributed to non *nix platforms // No flags are implemented ATM. We don't use them. Add flags as needed. + int rl_fnmatch(const char *pattern, const char *string, int flags) { const char *c; diff --git a/compat/rarch_fnmatch.h b/compat/rarch_fnmatch.h new file mode 100644 index 0000000000..5f18dfc150 --- /dev/null +++ b/compat/rarch_fnmatch.h @@ -0,0 +1,25 @@ +/* RetroArch - A frontend for libretro. + * Copyright (C) 2010-2014 - Hans-Kristian Arntzen + * Copyright (C) 2011-2014 - Daniel De Matteis + * Copyright (C) 2012-2014 - Ficoos + * + * 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 __RL_FNMATCH_H__ +#define __RL_FNMATCH_H__ + +#define FNM_NOMATCH 1 + +int rl_fnmatch(const char *pattern, const char *string, int flags); + +#endif diff --git a/tools/retrolaunch/main.c b/tools/retrolaunch/main.c index b459afbc49..e9b63df2a0 100644 --- a/tools/retrolaunch/main.c +++ b/tools/retrolaunch/main.c @@ -15,7 +15,7 @@ #include "sha1.h" #include "parser.h" #include "cd_detect.h" -#include "rl_fnmatch.h" +#include "../../compat/rarch_fnmatch.h" #include "../../file.h" #include "log.h" diff --git a/tools/retrolaunch/rl_fnmatch.h b/tools/retrolaunch/rl_fnmatch.h deleted file mode 100644 index 43895ccdb1..0000000000 --- a/tools/retrolaunch/rl_fnmatch.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef __RL_FNMATCH_H__ -#define __RL_FNMATCH_H__ - -#define FNM_NOMATCH 1 - -int rl_fnmatch(const char *pattern, const char *string, int flags); - -#endif