Module Name: src Committed By: rillig Date: Fri Dec 29 18:53:24 UTC 2023
Modified Files: src/usr.bin/make: dir.c make.c suff.c Log Message: make: fix declared types of list nodes No functional change. To generate a diff of this commit: cvs rdiff -u -r1.285 -r1.286 src/usr.bin/make/dir.c cvs rdiff -u -r1.260 -r1.261 src/usr.bin/make/make.c cvs rdiff -u -r1.373 -r1.374 src/usr.bin/make/suff.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/make/dir.c diff -u src/usr.bin/make/dir.c:1.285 src/usr.bin/make/dir.c:1.286 --- src/usr.bin/make/dir.c:1.285 Tue Dec 19 19:33:39 2023 +++ src/usr.bin/make/dir.c Fri Dec 29 18:53:24 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: dir.c,v 1.285 2023/12/19 19:33:39 rillig Exp $ */ +/* $NetBSD: dir.c,v 1.286 2023/12/29 18:53:24 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -132,7 +132,7 @@ #include "job.h" /* "@(#)dir.c 8.2 (Berkeley) 1/2/94" */ -MAKE_RCSID("$NetBSD: dir.c,v 1.285 2023/12/19 19:33:39 rillig Exp $"); +MAKE_RCSID("$NetBSD: dir.c,v 1.286 2023/12/29 18:53:24 rillig Exp $"); /* * A search path is a list of CachedDir structures. A CachedDir has in it the @@ -227,8 +227,6 @@ struct CachedDir { typedef List CachedDirList; typedef ListNode CachedDirListNode; -typedef ListNode SearchPathNode; - /* A list of cached directories, with fast lookup by directory name. */ typedef struct OpenDirs { CachedDirList list; @@ -803,7 +801,7 @@ DirExpandCurly(const char *word, const c static void DirExpandPath(const char *pattern, SearchPath *path, StringList *expansions) { - SearchPathNode *ln; + CachedDirListNode *ln; for (ln = path->dirs.first; ln != NULL; ln = ln->next) { CachedDir *dir = ln->datum; DirMatchFiles(pattern, dir, expansions); @@ -1044,7 +1042,7 @@ static bool FindFileRelative(SearchPath *path, bool seenDotLast, const char *name, char **out_file) { - SearchPathNode *ln; + CachedDirListNode *ln; bool checkedDot = false; char *file; @@ -1107,7 +1105,7 @@ FindFileAbsolute(SearchPath *path, bool const char *name, const char *base, char **out_file) { char *file; - SearchPathNode *ln; + CachedDirListNode *ln; DEBUG0(DIR, " Trying exact path matches...\n"); @@ -1180,7 +1178,7 @@ Dir_FindFile(const char *name, SearchPat * of each of the directories on the search path. */ if (base == name || (base - name == 2 && *name == '.')) { - SearchPathNode *ln; + CachedDirListNode *ln; /* * Look through all the directories on the path seeking one @@ -1463,7 +1461,7 @@ SearchPath_Add(SearchPath *path, const c { if (path != NULL && strcmp(name, ".DOTLAST") == 0) { - SearchPathNode *ln; + CachedDirListNode *ln; /* XXX: Linear search gets slow with thousands of entries. */ for (ln = path->dirs.first; ln != NULL; ln = ln->next) { @@ -1496,7 +1494,7 @@ SearchPath * Dir_CopyDirSearchPath(void) { SearchPath *path = SearchPath_New(); - SearchPathNode *ln; + CachedDirListNode *ln; for (ln = dirSearchPath.dirs.first; ln != NULL; ln = ln->next) { CachedDir *dir = ln->datum; Lst_Append(&path->dirs, CachedDir_Ref(dir)); @@ -1514,7 +1512,7 @@ char * SearchPath_ToFlags(SearchPath *path, const char *flag) { Buffer buf; - SearchPathNode *ln; + CachedDirListNode *ln; Buf_Init(&buf); @@ -1534,7 +1532,7 @@ SearchPath_ToFlags(SearchPath *path, con void SearchPath_Free(SearchPath *path) { - SearchPathNode *ln; + CachedDirListNode *ln; for (ln = path->dirs.first; ln != NULL; ln = ln->next) { CachedDir *dir = ln->datum; @@ -1565,7 +1563,7 @@ SearchPath_Clear(SearchPath *path) void SearchPath_AddAll(SearchPath *dst, SearchPath *src) { - SearchPathNode *ln; + CachedDirListNode *ln; for (ln = src->dirs.first; ln != NULL; ln = ln->next) { CachedDir *dir = ln->datum; @@ -1602,7 +1600,7 @@ Dir_PrintDirectories(void) void SearchPath_Print(const SearchPath *path) { - SearchPathNode *ln; + CachedDirListNode *ln; for (ln = path->dirs.first; ln != NULL; ln = ln->next) { const CachedDir *dir = ln->datum; Index: src/usr.bin/make/make.c diff -u src/usr.bin/make/make.c:1.260 src/usr.bin/make/make.c:1.261 --- src/usr.bin/make/make.c:1.260 Fri Dec 29 12:20:55 2023 +++ src/usr.bin/make/make.c Fri Dec 29 18:53:24 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: make.c,v 1.260 2023/12/29 12:20:55 rillig Exp $ */ +/* $NetBSD: make.c,v 1.261 2023/12/29 18:53:24 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -104,7 +104,7 @@ #include "job.h" /* "@(#)make.c 8.1 (Berkeley) 6/6/93" */ -MAKE_RCSID("$NetBSD: make.c,v 1.260 2023/12/29 12:20:55 rillig Exp $"); +MAKE_RCSID("$NetBSD: make.c,v 1.261 2023/12/29 18:53:24 rillig Exp $"); /* Sequence # to detect recursion. */ static unsigned int checked_seqno = 1; @@ -1224,7 +1224,7 @@ MakePrintStatusList(GNodeList *gnodes, i static void ExamineLater(GNodeList *examine, GNodeList *toBeExamined) { - ListNode *ln; + GNodeListNode *ln; for (ln = toBeExamined->first; ln != NULL; ln = ln->next) { GNode *gn = ln->datum; Index: src/usr.bin/make/suff.c diff -u src/usr.bin/make/suff.c:1.373 src/usr.bin/make/suff.c:1.374 --- src/usr.bin/make/suff.c:1.373 Fri Dec 29 12:20:55 2023 +++ src/usr.bin/make/suff.c Fri Dec 29 18:53:24 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: suff.c,v 1.373 2023/12/29 12:20:55 rillig Exp $ */ +/* $NetBSD: suff.c,v 1.374 2023/12/29 18:53:24 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -115,7 +115,7 @@ #include "dir.h" /* "@(#)suff.c 8.4 (Berkeley) 3/21/94" */ -MAKE_RCSID("$NetBSD: suff.c,v 1.373 2023/12/29 12:20:55 rillig Exp $"); +MAKE_RCSID("$NetBSD: suff.c,v 1.374 2023/12/29 18:53:24 rillig Exp $"); typedef List SuffixList; typedef ListNode SuffixListNode; @@ -1541,7 +1541,7 @@ ApplyTransform(GNode *tgn, GNode *sgn, S static void ExpandMember(GNode *gn, const char *eoarch, GNode *mem, Suffix *memSuff) { - GNodeListNode *ln; + SuffixListNode *ln; size_t nameLen = (size_t)(eoarch - gn->name); /* Use first matching suffix... */