9b4edc0a49
One place less to worry about thread safety. Also combine wildmatch and iwildmatch into one. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 lines
363 B
C
15 lines
363 B
C
#include "cache.h"
|
|
#include "wildmatch.h"
|
|
|
|
int main(int argc, char **argv)
|
|
{
|
|
if (!strcmp(argv[1], "wildmatch"))
|
|
return !!wildmatch(argv[3], argv[2], 0);
|
|
else if (!strcmp(argv[1], "iwildmatch"))
|
|
return !!wildmatch(argv[3], argv[2], FNM_CASEFOLD);
|
|
else if (!strcmp(argv[1], "fnmatch"))
|
|
return !!fnmatch(argv[3], argv[2], FNM_PATHNAME);
|
|
else
|
|
return 1;
|
|
}
|