From: Martin Mares Date: Wed, 26 Nov 1997 22:17:12 +0000 (+0000) Subject: '\' works as an escape character now. X-Git-Tag: holmes-import~1688 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=b0ccc07f3011959ac4a11e76e1b50c84ba31efe9;p=libucw.git '\' works as an escape character now. --- diff --git a/lib/patimatch.c b/lib/patimatch.c index 5458d323..8a0c8851 100644 --- a/lib/patimatch.c +++ b/lib/patimatch.c @@ -31,8 +31,13 @@ match_pattern_nocase(byte *p, byte *s) } return 0; } - else if (Cupcase(*p++) != Cupcase(*s++)) - return 0; + else + { + if (*p == '\\' && p[1]) + p++; + if (Cupcase(*p++) != Cupcase(*s++)) + return 0; + } } return !*s; } diff --git a/lib/patmatch.c b/lib/patmatch.c index 32e3df1d..c1d60932 100644 --- a/lib/patmatch.c +++ b/lib/patmatch.c @@ -30,8 +30,13 @@ match_pattern(byte *p, byte *s) } return 0; } - else if (*p++ != *s++) - return 0; + else + { + if (*p == '\\' && p[1]) + p++; + if (*p++ != *s++) + return 0; + } } return !*s; }