]> mj.ucw.cz Git - libucw.git/commitdiff
'\' works as an escape character now.
authorMartin Mares <mj@ucw.cz>
Wed, 26 Nov 1997 22:17:12 +0000 (22:17 +0000)
committerMartin Mares <mj@ucw.cz>
Wed, 26 Nov 1997 22:17:12 +0000 (22:17 +0000)
lib/patimatch.c
lib/patmatch.c

index 5458d323142b7bf1ba0ee2ca3df861dc1a21e6a7..8a0c8851f80b8798750092d31e8bff4c92cbbd7a 100644 (file)
@@ -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;
 }
index 32e3df1dbcaf7be527f6efcea6b0295a4af68ec1..c1d60932cd44544252f1777adc04a06ae3310e93 100644 (file)
@@ -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;
 }