]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
common: Move filematch headers to new filematch.h
authorCloudwalk <cloudwalk009@gmail.com>
Sat, 31 Jul 2021 16:45:42 +0000 (12:45 -0400)
committerCloudwalk <cloudwalk009@gmail.com>
Sat, 31 Jul 2021 17:04:36 +0000 (13:04 -0400)
common.c
common.h
darkplaces-sdl2-vs2017.vcxproj
darkplaces-sdl2-vs2019.vcxproj
darkplaces.h
filematch.h [new file with mode: 0644]

index 5af54cae43fdb921422ef8f02ba1ca9dfd8c5283..8db1f27025ab61c545583f0f2cba1821ab41ff6d 100644 (file)
--- a/common.c
+++ b/common.c
@@ -1,6 +1,6 @@
 /*
 Copyright (C) 1996-1997 Id Software, Inc.
 /*
 Copyright (C) 1996-1997 Id Software, Inc.
-Copyright (C) 2000-2021 DarkPlaces contributors
+Copyright (C) 2000-2020 DarkPlaces contributors
 
 This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License
 
 This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License
index 9b6621736941341e187805e6a147b8dc9f3e8aed..441d9ce9f221bf1322b51b3d25996206f6f8a42d 100644 (file)
--- a/common.h
+++ b/common.h
@@ -339,22 +339,6 @@ qbool COM_StringDecolorize(const char *in, size_t size_in, char *out, size_t siz
 void COM_ToLowerString (const char *in, char *out, size_t size_out);
 void COM_ToUpperString (const char *in, char *out, size_t size_out);
 
 void COM_ToLowerString (const char *in, char *out, size_t size_out);
 void COM_ToUpperString (const char *in, char *out, size_t size_out);
 
-typedef struct stringlist_s
-{
-       /// maxstrings changes as needed, causing reallocation of strings[] array
-       int maxstrings;
-       int numstrings;
-       char **strings;
-} stringlist_t;
-
-int matchpattern(const char *in, const char *pattern, int caseinsensitive);
-int matchpattern_with_separator(const char *in, const char *pattern, int caseinsensitive, const char *separators, qbool wildcard_least_one);
-void stringlistinit(stringlist_t *list);
-void stringlistfreecontents(stringlist_t *list);
-void stringlistappend(stringlist_t *list, const char *text);
-void stringlistsort(stringlist_t *list, qbool uniq);
-void listdirectory(stringlist_t *list, const char *basepath, const char *path);
-
 // strlcat and strlcpy, from OpenBSD
 // Most (all?) BSDs already have them
 #if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(MACOSX)
 // strlcat and strlcpy, from OpenBSD
 // Most (all?) BSDs already have them
 #if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(MACOSX)
index c1168b76958f7d5b6278025651d275e5cbcc2e2f..85519a6165140b1847fbb13b7f68c7b2c8e58e02 100644 (file)
     <ClInclude Include="darkplaces.h" />\r
     <ClInclude Include="dpvsimpledecode.h" />\r
     <ClInclude Include="draw.h" />\r
     <ClInclude Include="darkplaces.h" />\r
     <ClInclude Include="dpvsimpledecode.h" />\r
     <ClInclude Include="draw.h" />\r
+    <ClInclude Include="filematch.h" />\r
     <ClInclude Include="fs.h" />\r
     <ClInclude Include="ft2.h" />\r
     <ClInclude Include="ft2_defs.h" />\r
     <ClInclude Include="fs.h" />\r
     <ClInclude Include="ft2.h" />\r
     <ClInclude Include="ft2_defs.h" />\r
index e1faf1e5d2589a46d7840129595bd78ca9071b38..47ae78934078141b934861acea0bdf0e98db2dc9 100644 (file)
     <ClInclude Include="darkplaces.h" />\r
     <ClInclude Include="dpvsimpledecode.h" />\r
     <ClInclude Include="draw.h" />\r
     <ClInclude Include="darkplaces.h" />\r
     <ClInclude Include="dpvsimpledecode.h" />\r
     <ClInclude Include="draw.h" />\r
+    <ClInclude Include="filematch.h" />\r
     <ClInclude Include="fs.h" />\r
     <ClInclude Include="ft2.h" />\r
     <ClInclude Include="ft2_defs.h" />\r
     <ClInclude Include="fs.h" />\r
     <ClInclude Include="ft2.h" />\r
     <ClInclude Include="ft2_defs.h" />\r
index adf1581a41dd586c5479aa8caa21b65e1921196f..f04d904bb850703c4a61695b3e006a0acc86f21a 100644 (file)
@@ -47,6 +47,7 @@ extern char engineversion[128];
 #include "thread.h"
 #include "com_infostring.h"
 #include "common.h"
 #include "thread.h"
 #include "com_infostring.h"
 #include "common.h"
+#include "filematch.h"
 #include "fs.h"
 #include "host.h"
 #include "cvar.h"
 #include "fs.h"
 #include "host.h"
 #include "cvar.h"
diff --git a/filematch.h b/filematch.h
new file mode 100644 (file)
index 0000000..a35fee6
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+Copyright (C) 2006-2021 DarkPlaces contributors
+
+This program 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 Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program 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 this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+
+*/
+
+#ifndef FILEMATCH_H
+#define FILEMATCH_H
+
+#include "qtypes.h"
+
+typedef struct stringlist_s
+{
+       /// maxstrings changes as needed, causing reallocation of strings[] array
+       int maxstrings;
+       int numstrings;
+       char **strings;
+} stringlist_t;
+
+int matchpattern(const char *in, const char *pattern, int caseinsensitive);
+int matchpattern_with_separator(const char *in, const char *pattern, int caseinsensitive, const char *separators, qbool wildcard_least_one);
+void stringlistinit(stringlist_t *list);
+void stringlistfreecontents(stringlist_t *list);
+void stringlistappend(stringlist_t *list, const char *text);
+void stringlistsort(stringlist_t *list, qbool uniq);
+void listdirectory(stringlist_t *list, const char *basepath, const char *path);
+
+#endif