| version 1.5.4.2, 1996/09/19 20:03:12 |
version 1.6, 1997/07/13 19:15:11 |
|
|
| * SUCH DAMAGE. |
* SUCH DAMAGE. |
| */ |
*/ |
| |
|
| |
#include <sys/cdefs.h> |
| #if defined(LIBC_SCCS) && !defined(lint) |
#if defined(LIBC_SCCS) && !defined(lint) |
| #if 0 |
#if 0 |
| static char sccsid[] = "@(#)glob.c 8.3 (Berkeley) 10/13/93"; |
static char sccsid[] = "@(#)glob.c 8.3 (Berkeley) 10/13/93"; |
| #else |
#else |
| static char rcsid[] = "$NetBSD$"; |
__RCSID("$NetBSD$"); |
| #endif |
#endif |
| #endif /* LIBC_SCCS and not lint */ |
#endif /* LIBC_SCCS and not lint */ |
| |
|
| Line 69 static char rcsid[] = "$NetBSD$"; |
|
| Line 70 static char rcsid[] = "$NetBSD$"; |
|
| * Number of matches in the current invocation of glob. |
* Number of matches in the current invocation of glob. |
| */ |
*/ |
| |
|
| #include "namespace.h" |
|
| #include <sys/param.h> |
#include <sys/param.h> |
| #include <sys/stat.h> |
#include <sys/stat.h> |
| |
|
| Line 83 static char rcsid[] = "$NetBSD$"; |
|
| Line 83 static char rcsid[] = "$NetBSD$"; |
|
| #include <string.h> |
#include <string.h> |
| #include <unistd.h> |
#include <unistd.h> |
| |
|
| #ifdef __weak_alias |
|
| __weak_alias(glob,_glob); |
|
| __weak_alias(globfree,_globfree); |
|
| #endif |
|
| |
|
| #define DOLLAR '$' |
#define DOLLAR '$' |
| #define DOT '.' |
#define DOT '.' |
| #define EOS '\0' |
#define EOS '\0' |
| Line 580 glob3(pathbuf, pathend, pattern, restpat |
|
| Line 575 glob3(pathbuf, pathend, pattern, restpat |
|
| * and dirent.h as taking pointers to differently typed opaque |
* and dirent.h as taking pointers to differently typed opaque |
| * structures. |
* structures. |
| */ |
*/ |
| struct dirent *(*readdirfunc)(); |
struct dirent *(*readdirfunc) __P((void *)); |
| |
|
| *pathend = EOS; |
*pathend = EOS; |
| errno = 0; |
errno = 0; |
| Line 602 glob3(pathbuf, pathend, pattern, restpat |
|
| Line 597 glob3(pathbuf, pathend, pattern, restpat |
|
| if (pglob->gl_flags & GLOB_ALTDIRFUNC) |
if (pglob->gl_flags & GLOB_ALTDIRFUNC) |
| readdirfunc = pglob->gl_readdir; |
readdirfunc = pglob->gl_readdir; |
| else |
else |
| readdirfunc = readdir; |
readdirfunc = (struct dirent *(*)__P((void *))) readdir; |
| while ((dp = (*readdirfunc)(dirp))) { |
while ((dp = (*readdirfunc)(dirp))) { |
| register u_char *sc; |
register u_char *sc; |
| register Char *dc; |
register Char *dc; |