Deleted Added
full compact
fnmatch.c (26492) fnmatch.c (90045)
1/*
2 * Copyright (c) 1989, 1993, 1994
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Guido van Rossum.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 23 unchanged lines hidden (view full) ---

32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
35 */
36
37#if defined(LIBC_SCCS) && !defined(lint)
38static char sccsid[] = "@(#)fnmatch.c 8.2 (Berkeley) 4/16/94";
39#endif /* LIBC_SCCS and not lint */
1/*
2 * Copyright (c) 1989, 1993, 1994
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Guido van Rossum.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 23 unchanged lines hidden (view full) ---

32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
35 */
36
37#if defined(LIBC_SCCS) && !defined(lint)
38static char sccsid[] = "@(#)fnmatch.c 8.2 (Berkeley) 4/16/94";
39#endif /* LIBC_SCCS and not lint */
40#include <sys/cdefs.h>
41__FBSDID("$FreeBSD: head/lib/libc/gen/fnmatch.c 90045 2002-02-01 01:32:19Z obrien $");
40
41/*
42 * Function fnmatch() as specified in POSIX 1003.2-1992, section B.6.
43 * Compares a filename or pathname to a pattern.
44 */
45
46#include <ctype.h>
47#include <fnmatch.h>
48#include <string.h>
49#include <stdio.h>
50
51#include "collate.h"
52
53#define EOS '\0'
54
55#define RANGE_MATCH 1
56#define RANGE_NOMATCH 0
57#define RANGE_ERROR (-1)
58
42
43/*
44 * Function fnmatch() as specified in POSIX 1003.2-1992, section B.6.
45 * Compares a filename or pathname to a pattern.
46 */
47
48#include <ctype.h>
49#include <fnmatch.h>
50#include <string.h>
51#include <stdio.h>
52
53#include "collate.h"
54
55#define EOS '\0'
56
57#define RANGE_MATCH 1
58#define RANGE_NOMATCH 0
59#define RANGE_ERROR (-1)
60
59static int rangematch __P((const char *, char, int, char **));
61static int rangematch(const char *, char, int, char **);
60
61int
62fnmatch(pattern, string, flags)
63 const char *pattern, *string;
64 int flags;
65{
66 const char *stringstart;
67 char *newp;

--- 164 unchanged lines hidden ---
62
63int
64fnmatch(pattern, string, flags)
65 const char *pattern, *string;
66 int flags;
67{
68 const char *stringstart;
69 char *newp;

--- 164 unchanged lines hidden ---