Module Name: src
Committed By: rillig
Date: Thu Mar 3 19:55:27 UTC 2022
Modified Files:
src/usr.bin/make: lst.h parse.c suff.c
Log Message:
make: improve comments and a parameter name
No binary change.
To generate a diff of this commit:
cvs rdiff -u -r1.102 -r1.103 src/usr.bin/make/lst.h
cvs rdiff -u -r1.666 -r1.667 src/usr.bin/make/parse.c
cvs rdiff -u -r1.364 -r1.365 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/lst.h
diff -u src/usr.bin/make/lst.h:1.102 src/usr.bin/make/lst.h:1.103
--- src/usr.bin/make/lst.h:1.102 Wed Dec 15 12:24:13 2021
+++ src/usr.bin/make/lst.h Thu Mar 3 19:55:27 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: lst.h,v 1.102 2021/12/15 12:24:13 rillig Exp $ */
+/* $NetBSD: lst.h,v 1.103 2022/03/03 19:55:27 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -137,9 +137,9 @@ ListNode *Lst_FindDatum(List *, const vo
/* Insert a datum before the given node. */
void Lst_InsertBefore(List *, ListNode *, void *);
-/* Add a datum at the front of the list. */
+/* Add a datum at the head of the list. */
void Lst_Prepend(List *, void *);
-/* Add a datum at the end of the list. */
+/* Add a datum at the tail of the list. */
void Lst_Append(List *, void *);
/* Remove the node from the list. */
void Lst_Remove(List *, ListNode *);
Index: src/usr.bin/make/parse.c
diff -u src/usr.bin/make/parse.c:1.666 src/usr.bin/make/parse.c:1.667
--- src/usr.bin/make/parse.c:1.666 Wed Feb 9 21:28:57 2022
+++ src/usr.bin/make/parse.c Thu Mar 3 19:55:27 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: parse.c,v 1.666 2022/02/09 21:28:57 rillig Exp $ */
+/* $NetBSD: parse.c,v 1.667 2022/03/03 19:55:27 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -106,7 +106,7 @@
#include "pathnames.h"
/* "@(#)parse.c 8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: parse.c,v 1.666 2022/02/09 21:28:57 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.667 2022/03/03 19:55:27 rillig Exp $");
/*
* A file being read.
@@ -124,7 +124,7 @@ typedef struct IncludedFile {
bool depending; /* state of doing_depend on EOF */
Buffer buf; /* the file's content or the body of the .for
- * loop; always ends with '\n' */
+ * loop; either empty or ends with '\n' */
char *buf_ptr; /* next char to be read */
char *buf_end; /* buf_end[-1] == '\n' */
Index: src/usr.bin/make/suff.c
diff -u src/usr.bin/make/suff.c:1.364 src/usr.bin/make/suff.c:1.365
--- src/usr.bin/make/suff.c:1.364 Fri Jan 7 20:54:45 2022
+++ src/usr.bin/make/suff.c Thu Mar 3 19:55:27 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: suff.c,v 1.364 2022/01/07 20:54:45 rillig Exp $ */
+/* $NetBSD: suff.c,v 1.365 2022/03/03 19:55:27 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.364 2022/01/07 20:54:45 rillig Exp $");
+MAKE_RCSID("$NetBSD: suff.c,v 1.365 2022/03/03 19:55:27 rillig Exp $");
typedef List SuffixList;
typedef ListNode SuffixListNode;
@@ -145,8 +145,8 @@ static int sNum = 0;
typedef List SuffixListList;
/*
- * A suffix such as ".c" or ".o" that is used in suffix transformation rules
- * such as ".c.o:".
+ * A suffix such as ".c" or ".o" that may be used in suffix transformation
+ * rules such as ".c.o:".
*/
typedef struct Suffix {
/* The suffix itself, such as ".c" */
@@ -859,9 +859,9 @@ Suff_AddSuffix(const char *name)
/* Return the search path for the given suffix, or NULL. */
SearchPath *
-Suff_GetPath(const char *sname)
+Suff_GetPath(const char *name)
{
- Suffix *suff = FindSuffixByName(sname);
+ Suffix *suff = FindSuffixByName(name);
return suff != NULL ? suff->searchPath : NULL;
}