+Sat Jun 22 10:44:09 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
+
+ * posix/glob.c: Include <alloca.h> only [HAVE_ALLOCA_H], not [sparc].
+
+Fri Jun 21 00:27:51 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
+
+ * posix/fnmatch.c (fnmatch): Fix \*[*?]+ case to increment name ptr
+ only for ?s, not for *s. Fix from Chet Ramey.
+
+Wed May 22 17:22:14 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
+
+ * posix/glob.c [VMS]: Don't include <pwd.h>.
+ [HAVE_VMSDIR_H]: Include "vmsdir.h".
+ (glob) [VMS]: Don't grok ~.
+
Mon May 13 12:03:03 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
+ * posix/glob.h [_AMIGA]: Remove `struct stat;' forward decl.
+
* posix/glob.c [_AMIGA]: Don't include <pwd.h>.
(glob): Remove bogus & in call to globfree.
[_AMIGA]: Use AmigaDOS file name conventions.
(n == string || ((flags & FNM_FILE_NAME) && n[-1] == '/')))
return FNM_NOMATCH;
- for (c = *p++; c == '?' || c == '*'; c = *p++, ++n)
- if (((flags & FNM_FILE_NAME) && *n == '/') ||
- (c == '?' && *n == '\0'))
- return FNM_NOMATCH;
+ for (c = *p++; c == '?' || c == '*'; c = *p++)
+ {
+ if ((flags & FNM_FILE_NAME) && *n == '/')
+ /* A slash does not match a wildcard under FNM_FILE_NAME. */
+ return FNM_NOMATCH;
+ else if (c == '?')
+ {
+ /* A ? needs to match one character. */
+ if (*n == '\0')
+ /* There isn't another character; no match. */
+ return FNM_NOMATCH;
+ else
+ /* One character of the string is consumed in matching
+ this ? wildcard, so *??? won't match if there are
+ less than three characters. */
+ ++n;
+ }
+ }
if (c == '\0')
return 0;
#endif
#endif
-#ifndef _AMIGA
+#if !defined (_AMIGA) && !defined (VMS)
#include <pwd.h>
#endif
# ifdef HAVE_NDIR_H
# include <ndir.h>
# endif
+# ifdef HAVE_VMSDIR_H
+# include "vmsdir.h"
+# endif /* HAVE_VMSDIR_H */
#endif
#undef alloca
#define alloca(n) __builtin_alloca (n)
#else /* Not GCC. */
-#if defined (sparc) || defined (HAVE_ALLOCA_H)
+#ifdef HAVE_ALLOCA_H
#include <alloca.h>
-#else /* Not sparc or HAVE_ALLOCA_H. */
+#else /* Not HAVE_ALLOCA_H. */
#ifndef _AIX
extern char *alloca ();
#endif /* Not _AIX. */
oldcount = pglob->gl_pathc;
+#ifndef VMS
if ((flags & GLOB_TILDE) && dirname[0] == '~')
{
if (dirname[1] == '\0')
#endif
}
}
+#endif /* Not VMS. */
if (glob_pattern_p (dirname, !(flags & GLOB_NOESCAPE)))
{
-/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1995, 1996 Free Software Foundation, Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
#define GLOB_NOMATCH 3 /* No matches found. */
/* Structure describing a globbing run. */
+#ifndef _AMIGA /* Buggy compiler. */
struct stat;
+#endif
typedef struct
{
int gl_pathc; /* Count of paths matched by the pattern. */