From 9b3497cab9986883ff2499722f8758795afa34b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= Date: Tue, 1 Jan 2013 09:44:05 +0700 Subject: wildmatch: rename constants and update prototype MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - All exported constants now have a prefix WM_ - Do not rely on FNM_* constants, use the WM_ counterparts - Remove TRUE and FALSE to follow Git's coding style - While at it, turn flags type from int to unsigned int - Add an (unused yet) argument to carry extra information so that we don't have to change the prototype again later when we need to pass other stuff to wildmatch Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- wildmatch.h | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'wildmatch.h') diff --git a/wildmatch.h b/wildmatch.h index 984a38cdc2..1c814fd5ff 100644 --- a/wildmatch.h +++ b/wildmatch.h @@ -1,9 +1,17 @@ -/* wildmatch.h */ +#ifndef WILDMATCH_H +#define WILDMATCH_H -#define ABORT_MALFORMED 2 -#define NOMATCH 1 -#define MATCH 0 -#define ABORT_ALL -1 -#define ABORT_TO_STARSTAR -2 +#define WM_CASEFOLD 1 -int wildmatch(const char *pattern, const char *text, int flags); +#define WM_ABORT_MALFORMED 2 +#define WM_NOMATCH 1 +#define WM_MATCH 0 +#define WM_ABORT_ALL -1 +#define WM_ABORT_TO_STARSTAR -2 + +struct wildopts; + +int wildmatch(const char *pattern, const char *text, + unsigned int flags, + struct wildopts *wo); +#endif -- cgit v1.2.1