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>
This commit is contained in:

committed by
Junio C Hamano

parent
b6a3d3353f
commit
9b3497cab9
22
wildmatch.h
22
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
|
||||
|
Reference in New Issue
Block a user