glob.c (243779) | glob.c (249381) |
---|---|
1/* 2 * Copyright (c) 1989, 1993 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 * Copyright (c) 2011 The FreeBSD Foundation --- 25 unchanged lines hidden (view full) --- 34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 35 * SUCH DAMAGE. 36 */ 37 38#if defined(LIBC_SCCS) && !defined(lint) 39static char sccsid[] = "@(#)glob.c 8.3 (Berkeley) 10/13/93"; 40#endif /* LIBC_SCCS and not lint */ 41#include <sys/cdefs.h> | 1/* 2 * Copyright (c) 1989, 1993 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 * Copyright (c) 2011 The FreeBSD Foundation --- 25 unchanged lines hidden (view full) --- 34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 35 * SUCH DAMAGE. 36 */ 37 38#if defined(LIBC_SCCS) && !defined(lint) 39static char sccsid[] = "@(#)glob.c 8.3 (Berkeley) 10/13/93"; 40#endif /* LIBC_SCCS and not lint */ 41#include <sys/cdefs.h> |
42__FBSDID("$FreeBSD: head/lib/libc/gen/glob.c 243779 2012-12-01 21:26:46Z marcel $"); | 42__FBSDID("$FreeBSD: head/lib/libc/gen/glob.c 249381 2013-04-11 20:15:37Z emaste $"); |
43 44/* 45 * glob(3) -- a superset of the one defined in POSIX 1003.2. 46 * 47 * The [!...] convention to negate a range is supported (SysV, Posix, ksh). 48 * 49 * Optional extra services, controlled by flags not defined by POSIX: 50 * --- 682 unchanged lines hidden (view full) --- 733 (*pglob->gl_closedir)(dirp); 734 else 735 closedir(dirp); 736 return (err); 737} 738 739 740/* | 43 44/* 45 * glob(3) -- a superset of the one defined in POSIX 1003.2. 46 * 47 * The [!...] convention to negate a range is supported (SysV, Posix, ksh). 48 * 49 * Optional extra services, controlled by flags not defined by POSIX: 50 * --- 682 unchanged lines hidden (view full) --- 733 (*pglob->gl_closedir)(dirp); 734 else 735 closedir(dirp); 736 return (err); 737} 738 739 740/* |
741 * Extend the gl_pathv member of a glob_t structure to accomodate a new item, | 741 * Extend the gl_pathv member of a glob_t structure to accommodate a new item, |
742 * add the new item, and update gl_pathc. 743 * 744 * This assumes the BSD realloc, which only copies the block when its size 745 * crosses a power-of-two boundary; for v7 realloc, this would cause quadratic 746 * behavior. 747 * 748 * Return 0 if new item added, error code if memory couldn't be allocated. 749 * --- 220 unchanged lines hidden --- | 742 * add the new item, and update gl_pathc. 743 * 744 * This assumes the BSD realloc, which only copies the block when its size 745 * crosses a power-of-two boundary; for v7 realloc, this would cause quadratic 746 * behavior. 747 * 748 * Return 0 if new item added, error code if memory couldn't be allocated. 749 * --- 220 unchanged lines hidden --- |