Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/make make(1): clean up ArchStatMember
details: https://anonhg.NetBSD.org/src/rev/2fe6958b1bf1
branches: trunk
changeset: 942377:2fe6958b1bf1
user: rillig <rillig%NetBSD.org@localhost>
date: Sat Nov 07 13:17:04 2020 +0000
description:
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.
diffstat:
usr.bin/make/arch.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diffs (53 lines):
diff -r 4e1c34fc5143 -r 2fe6958b1bf1 usr.bin/make/arch.c
--- a/usr.bin/make/arch.c Sat Nov 07 13:13:19 2020 +0000
+++ b/usr.bin/make/arch.c Sat Nov 07 13:17:04 2020 +0000
@@ -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 @@
* 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 @@
}
}
- 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 @@
/*
* 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);
Home |
Main Index |
Thread Index |
Old Index