summaryrefslogtreecommitdiff
path: root/usr.bin/make/dir.c
diff options
context:
space:
mode:
authorrillig <rillig@NetBSD.org>2020-09-27 22:17:07 +0000
committerrillig <rillig@NetBSD.org>2020-09-27 22:17:07 +0000
commit22ea481b8f36d7bd7bb40bac4c05b7d66cf93bf4 (patch)
tree710ee1f0e879fce4c860afe7844ac191b684cb79 /usr.bin/make/dir.c
parent7721efffdab7f762edaa951990226551cde90e55 (diff)
make(1): improve documentation of CachedDir and Dir_AddDir
Diffstat (limited to 'usr.bin/make/dir.c')
-rw-r--r--usr.bin/make/dir.c32
1 files changed, 11 insertions, 21 deletions
diff --git a/usr.bin/make/dir.c b/usr.bin/make/dir.c
index 57b50bcc4bc..d54525fc094 100644
--- a/usr.bin/make/dir.c
+++ b/usr.bin/make/dir.c
@@ -1,4 +1,4 @@
-/* $NetBSD: dir.c,v 1.149 2020/09/27 21:35:16 rillig Exp $ */
+/* $NetBSD: dir.c,v 1.150 2020/09/27 22:17:07 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -136,7 +136,7 @@
#include "job.h"
/* "@(#)dir.c 8.2 (Berkeley) 1/2/94" */
-MAKE_RCSID("$NetBSD: dir.c,v 1.149 2020/09/27 21:35:16 rillig Exp $");
+MAKE_RCSID("$NetBSD: dir.c,v 1.150 2020/09/27 22:17:07 rillig Exp $");
#define DIR_DEBUG0(fmt) \
if (!DEBUG(DIR)) (void) 0; else fprintf(debug_file, fmt)
@@ -1480,27 +1480,17 @@ Dir_MTime(GNode *gn, Boolean recheck)
return gn->mtime;
}
-/*-
- *-----------------------------------------------------------------------
- * Dir_AddDir --
- * Add the given name to the end of the given path. The order of
- * the arguments is backwards so ParseDoDependency can do a
- * Lst_ForEachUntil of its list of paths...
- *
- * Input:
- * path the path to which the directory should be
- * added
- * XXX: Why would this ever be NULL, and what does
- * that mean?
- * name the name of the directory to add
+/* Read the list of filenames in the directory and store the result
+ * in openDirectories.
*
- * Results:
- * none
+ * If a path is given, append the directory to that path.
*
- * Side Effects:
- * A structure is added to the list and the directory is
- * read and hashed.
- *-----------------------------------------------------------------------
+ * Input:
+ * path The path to which the directory should be
+ * added, or NULL to only add the directory to
+ * openDirectories
+ * name The name of the directory to add.
+ * The name is not normalized in any way.
*/
CachedDir *
Dir_AddDir(SearchPath *path, const char *name)