summaryrefslogtreecommitdiff
path: root/wildmatch.h
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2013-01-01 09:44:05 +0700
committerJunio C Hamano <gitster@pobox.com>2013-01-01 15:32:36 -0800
commit9b3497cab9986883ff2499722f8758795afa34b7 (patch)
tree40128a4fcdb34d5dcd0d0a191b9cb69ab602a839 /wildmatch.h
parentb6a3d3353f799c8c5afedb2da4df6e7cdc5d00c9 (diff)
downloadgit-9b3497cab9986883ff2499722f8758795afa34b7.tar.gz
wildmatch: rename constants and update prototype
- 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 <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'wildmatch.h')
-rw-r--r--wildmatch.h22
1 files changed, 15 insertions, 7 deletions
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