Module Name: src
Committed By: rillig
Date: Sat Nov 7 13:17:04 UTC 2020
Modified Files:
src/usr.bin/make: arch.c
Log Message:
make(1): clean up ArchStatMember
Whether an archive entry is hashed or not is completely irrelevant. The
interesting thing is whether it ends up in a cache.
To generate a diff of this commit:
cvs rdiff -u -r1.163 -r1.164 src/usr.bin/make/arch.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/arch.c
diff -u src/usr.bin/make/arch.c:1.163 src/usr.bin/make/arch.c:1.164
--- src/usr.bin/make/arch.c:1.163 Sat Nov 7 13:09:13 2020
+++ src/usr.bin/make/arch.c Sat Nov 7 13:17:04 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: arch.c,v 1.163 2020/11/07 13:09:13 rillig Exp $ */
+/* $NetBSD: arch.c,v 1.164 2020/11/07 13:17:04 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -125,7 +125,7 @@
#include "config.h"
/* "@(#)arch.c 8.2 (Berkeley) 1/2/94" */
-MAKE_RCSID("$NetBSD: arch.c,v 1.163 2020/11/07 13:09:13 rillig Exp $");
+MAKE_RCSID("$NetBSD: arch.c,v 1.164 2020/11/07 13:17:04 rillig Exp $");
typedef struct List ArchList;
typedef struct ListNode ArchListNode;
@@ -390,13 +390,13 @@ Arch_ParseArchive(char **pp, GNodeList *
* Input:
* archive Path to the archive
* member Name of member; only its basename is used.
- * hash TRUE if archive should be hashed if not already so.
+ * addToCache TRUE if archive should be cached if not already so.
*
* Results:
- * The ar_hdr for the member.
+ * The ar_hdr for the member, or NULL.
*/
static struct ar_hdr *
-ArchStatMember(const char *archive, const char *member, Boolean hash)
+ArchStatMember(const char *archive, const char *member, Boolean addToCache)
{
#define AR_MAX_NAME_LEN (sizeof arh.ar_name - 1)
FILE *arch; /* Stream to archive */
@@ -444,7 +444,7 @@ ArchStatMember(const char *archive, cons
}
}
- if (!hash) {
+ if (!addToCache) {
/*
* Caller doesn't want the thing hashed, just use ArchFindMember
* to read the header for the member out and close down the stream
@@ -576,7 +576,7 @@ ArchStatMember(const char *archive, cons
/*
* Now that the archive has been read and cached, we can look into
- * the hash table to find the desired member's header.
+ * the addToCache table to find the desired member's header.
*/
return HashTable_FindValue(&ar->members, member);