From b0ccc07f3011959ac4a11e76e1b50c84ba31efe9 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Wed, 26 Nov 1997 22:17:12 +0000 Subject: [PATCH] '\' works as an escape character now. --- lib/patimatch.c | 9 +++++++-- lib/patmatch.c | 9 +++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) 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; } -- 2.39.2