diff options
author | Jannis Hoffmann <jannis@fehcom.de> | 2024-07-08 17:29:45 +0200 |
---|---|---|
committer | Jannis Hoffmann <jannis@fehcom.de> | 2024-07-08 17:29:45 +0200 |
commit | 0a5e41e80d9fb344f7bbcc1f44a061bbf9bd0242 (patch) | |
tree | e060f4528c24510e89ec3cc6b62abfed8813a342 /src | |
parent | fde72e50fc280e583b8aec13b4d4af3bd1d205e5 (diff) |
make wildmat arguments const
Diffstat (limited to 'src')
-rw-r--r-- | src/include/wildmat.h | 2 | ||||
-rw-r--r-- | src/wildmat.c | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/include/wildmat.h b/src/include/wildmat.h index 99b275b..f46d35b 100644 --- a/src/include/wildmat.h +++ b/src/include/wildmat.h @@ -1,6 +1,6 @@ #ifndef WILDMAT_H #define WILDMAT_H -extern int wildmat(char *, char *); +extern int wildmat(const char *, const char *); #endif 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; |