summaryrefslogtreecommitdiff
path: root/src/wildmat.c
diff options
context:
space:
mode:
authorJannis Hoffmann <jannis@fehcom.de>2024-07-08 17:29:45 +0200
committerJannis Hoffmann <jannis@fehcom.de>2024-07-08 17:29:45 +0200
commit0a5e41e80d9fb344f7bbcc1f44a061bbf9bd0242 (patch)
treee060f4528c24510e89ec3cc6b62abfed8813a342 /src/wildmat.c
parentfde72e50fc280e583b8aec13b4d4af3bd1d205e5 (diff)
make wildmat arguments const
Diffstat (limited to 'src/wildmat.c')
-rw-r--r--src/wildmat.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/wildmat.c b/src/wildmat.c
index bcff8dd..8fe06da 100644
--- a/src/wildmat.c
+++ b/src/wildmat.c
@@ -37,6 +37,8 @@
* on.
*/
+#include "wildmat.h"
+
#define TRUE 1
#define FALSE 0
#define ABORT -1
@@ -51,7 +53,7 @@
/**
* Match text and p, return TRUE, FALSE, or ABORT.
*/
-static int DoMatch(char *text, char *p)
+static int DoMatch(const char *text, const char *p)
{
int last;
int matched;
@@ -93,7 +95,7 @@ static int DoMatch(char *text, char *p)
/**
* User-level routine. Returns TRUE or FALSE.
*/
-int wildmat(char *text, char *p)
+int wildmat(const char *text, const char *p)
{
#ifdef OPTIMIZE_JUST_STAR
if (p[0] == '*' && p[1] == '\0') return TRUE;