]> sjero.net Git - wget/blobdiff - src/utils.c
[svn] Move fnmatch() to cmpt.c and don't use it under GNU libc.
[wget] / src / utils.c
index b563d40ac958f50c37fc2e2282cf247c57424fa5..c78b170866a047add504f679206de31c10f3e6c6 100644 (file)
@@ -92,7 +92,6 @@ so, delete this exception statement from your version.  */
 
 #include "wget.h"
 #include "utils.h"
-#include "fnmatch.h"
 #include "hash.h"
 
 #ifndef errno
@@ -874,6 +873,18 @@ suffix (const char *str)
     return NULL;
 }
 
+/* Return non-zero if S contains globbing wildcards (`*', `?', `[' or
+   `]').  */
+
+int
+has_wildcards_p (const char *s)
+{
+  for (; *s; s++)
+    if (*s == '*' || *s == '?' || *s == '[' || *s == ']')
+      return 1;
+  return 0;
+}
+
 /* Return non-zero if FNAME ends with a typical HTML suffix.  The
    following (case-insensitive) suffixes are presumed to be HTML files: