/*
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
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)
<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="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
#include "thread.h"
#include "com_infostring.h"
#include "common.h"
+#include "filematch.h"
#include "fs.h"
#include "host.h"
#include "cvar.h"
--- /dev/null
+/*
+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