X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/blobdiff_plain/62cdf1edd4ad3e56b38ec0126d2af260a2f22b08..56668e6dca80813a2c9f03d4c02ed20e22f1061b:/wildcard.c diff --git a/wildcard.c b/wildcard.c index 4084e093..ae8bad80 100644 --- a/wildcard.c +++ b/wildcard.c @@ -10,6 +10,8 @@ #include #include +#include "putty.h" + /* * Definition of wildcard syntax: * @@ -28,6 +30,17 @@ */ /* + * Some notes on differences from POSIX globs (IEEE Std 1003.1, 2003 ed.): + * - backslashes act as escapes even within [] bracket expressions + * - does not support [!...] for non-matching list (POSIX are weird); + * NB POSIX allows [^...] as well via "A bracket expression starting + * with an unquoted circumflex character produces unspecified + * results". If we wanted to allow [!...] we might want to define + * [^!] as having its literal meaning (match '^' or '!'). + * - none of the scary [[:class:]] stuff, etc + */ + +/* * The wildcard matching technique we use is very simple and * potentially O(N^2) in running time, but I don't anticipate it * being that bad in reality (particularly since N will be the size