dir.c (236769) | dir.c (237578) |
---|---|
1/* $NetBSD: dir.c,v 1.64 2012/04/07 18:29:08 christos Exp $ */ | 1/* $NetBSD: dir.c,v 1.65 2012/06/12 19:21:50 joerg Exp $ */ |
2 3/* 4 * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. 5 * All rights reserved. 6 * 7 * This code is derived from software contributed to Berkeley by 8 * Adam de Boor. 9 * --- 55 unchanged lines hidden (view full) --- 65 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 66 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 67 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 68 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 69 * SUCH DAMAGE. 70 */ 71 72#ifndef MAKE_NATIVE | 2 3/* 4 * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. 5 * All rights reserved. 6 * 7 * This code is derived from software contributed to Berkeley by 8 * Adam de Boor. 9 * --- 55 unchanged lines hidden (view full) --- 65 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 66 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 67 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 68 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 69 * SUCH DAMAGE. 70 */ 71 72#ifndef MAKE_NATIVE |
73static char rcsid[] = "$NetBSD: dir.c,v 1.64 2012/04/07 18:29:08 christos Exp $"; | 73static char rcsid[] = "$NetBSD: dir.c,v 1.65 2012/06/12 19:21:50 joerg Exp $"; |
74#else 75#include <sys/cdefs.h> 76#ifndef lint 77#if 0 78static char sccsid[] = "@(#)dir.c 8.2 (Berkeley) 1/2/94"; 79#else | 74#else 75#include <sys/cdefs.h> 76#ifndef lint 77#if 0 78static char sccsid[] = "@(#)dir.c 8.2 (Berkeley) 1/2/94"; 79#else |
80__RCSID("$NetBSD: dir.c,v 1.64 2012/04/07 18:29:08 christos Exp $"); | 80__RCSID("$NetBSD: dir.c,v 1.65 2012/06/12 19:21:50 joerg Exp $"); |
81#endif 82#endif /* not lint */ 83#endif 84 85/*- 86 * dir.c -- 87 * Directory searching using wildcards and/or normal names... 88 * Used both for source wildcarding in the Makefile and for finding --- 766 unchanged lines hidden (view full) --- 855 * The path to the file or NULL. This path is guaranteed to be in a 856 * different part of memory than name and so may be safely free'd. 857 * 858 * Side Effects: 859 * None. 860 *----------------------------------------------------------------------- 861 */ 862static char * | 81#endif 82#endif /* not lint */ 83#endif 84 85/*- 86 * dir.c -- 87 * Directory searching using wildcards and/or normal names... 88 * Used both for source wildcarding in the Makefile and for finding --- 766 unchanged lines hidden (view full) --- 855 * The path to the file or NULL. This path is guaranteed to be in a 856 * different part of memory than name and so may be safely free'd. 857 * 858 * Side Effects: 859 * None. 860 *----------------------------------------------------------------------- 861 */ 862static char * |
863DirLookup(Path *p, const char *name __unused, const char *cp, 864 Boolean hasSlash __unused) | 863DirLookup(Path *p, const char *name MAKE_ATTR_UNUSED, const char *cp, 864 Boolean hasSlash MAKE_ATTR_UNUSED) |
865{ 866 char *file; /* the current filename to check */ 867 868 if (DEBUG(DIR)) { 869 fprintf(debug_file, " %s ...\n", p->name); 870 } 871 872 if (Hash_FindEntry(&p->files, cp) == NULL) --- 126 unchanged lines hidden (view full) --- 999 * The path to the file or NULL. This path is guaranteed to be in a 1000 * different part of memory than name and so may be safely free'd. 1001 * 1002 * Side Effects: 1003 * Hit counts change 1004 *----------------------------------------------------------------------- 1005 */ 1006static char * | 865{ 866 char *file; /* the current filename to check */ 867 868 if (DEBUG(DIR)) { 869 fprintf(debug_file, " %s ...\n", p->name); 870 } 871 872 if (Hash_FindEntry(&p->files, cp) == NULL) --- 126 unchanged lines hidden (view full) --- 999 * The path to the file or NULL. This path is guaranteed to be in a 1000 * different part of memory than name and so may be safely free'd. 1001 * 1002 * Side Effects: 1003 * Hit counts change 1004 *----------------------------------------------------------------------- 1005 */ 1006static char * |
1007DirFindDot(Boolean hasSlash __unused, const char *name, const char *cp) | 1007DirFindDot(Boolean hasSlash MAKE_ATTR_UNUSED, const char *name, const char *cp) |
1008{ 1009 1010 if (Hash_FindEntry(&dot->files, cp) != NULL) { 1011 if (DEBUG(DIR)) { 1012 fprintf(debug_file, " in '.'\n"); 1013 } 1014 hits += 1; 1015 dot->hits += 1; --- 787 unchanged lines hidden --- | 1008{ 1009 1010 if (Hash_FindEntry(&dot->files, cp) != NULL) { 1011 if (DEBUG(DIR)) { 1012 fprintf(debug_file, " in '.'\n"); 1013 } 1014 hits += 1; 1015 dot->hits += 1; --- 787 unchanged lines hidden --- |