DarkPlaces
Game engine based on the Quake 1 engine by id Software, developed by LadyHavoc
 
filematch.h
Go to the documentation of this file.
1/*
2Copyright (C) 2006-2021 DarkPlaces contributors
3
4This program is free software; you can redistribute it and/or
5modify it under the terms of the GNU General Public License
6as published by the Free Software Foundation; either version 2
7of the License, or (at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
13See the GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with this program; if not, write to the Free Software
17Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18
19*/
20
21#ifndef FILEMATCH_H
22#define FILEMATCH_H
23
24#include "qtypes.h"
25
26typedef struct stringlist_s
27{
31 char **strings;
33
34int matchpattern(const char *in, const char *pattern, int caseinsensitive);
35int matchpattern_with_separator(const char *in, const char *pattern, int caseinsensitive, const char *separators, qbool wildcard_least_one);
38void stringlistappend(stringlist_t *list, const char *text);
39void stringlistsort(stringlist_t *list, qbool uniq);
40void listdirectory(stringlist_t *list, const char *basepath, const char *path);
41
42#endif
void stringlistfreecontents(stringlist_t *list)
Definition filematch.c:87
void stringlistinit(stringlist_t *list)
Definition filematch.c:82
void stringlistsort(stringlist_t *list, qbool uniq)
Definition filematch.c:129
int matchpattern(const char *in, const char *pattern, int caseinsensitive)
Definition filematch.c:16
void stringlistappend(stringlist_t *list, const char *text)
Definition filematch.c:103
void listdirectory(stringlist_t *list, const char *basepath, const char *path)
Definition filematch.c:198
int matchpattern_with_separator(const char *in, const char *pattern, int caseinsensitive, const char *separators, qbool wildcard_least_one)
Definition filematch.c:23
bool qbool
Definition qtypes.h:9
char ** strings
Definition filematch.h:31
int maxstrings
maxstrings changes as needed, causing reallocation of strings[] array
Definition filematch.h:29