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: improve comments and a parameter name



details:   https://anonhg.NetBSD.org/src/rev/9af3307c2ca1
branches:  trunk
changeset: 362595:9af3307c2ca1
user:      rillig <rillig%NetBSD.org@localhost>
date:      Thu Mar 03 19:55:27 2022 +0000

description:
make: improve comments and a parameter name

No binary change.

diffstat:

 usr.bin/make/lst.h   |   6 +++---
 usr.bin/make/parse.c |   6 +++---
 usr.bin/make/suff.c  |  12 ++++++------
 3 files changed, 12 insertions(+), 12 deletions(-)

diffs (89 lines):

diff -r b65712132a47 -r 9af3307c2ca1 usr.bin/make/lst.h
--- a/usr.bin/make/lst.h        Thu Mar 03 19:52:41 2022 +0000
+++ b/usr.bin/make/lst.h        Thu Mar 03 19:55:27 2022 +0000
@@ -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 @@
 
 /* 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 *);
diff -r b65712132a47 -r 9af3307c2ca1 usr.bin/make/parse.c
--- a/usr.bin/make/parse.c      Thu Mar 03 19:52:41 2022 +0000
+++ b/usr.bin/make/parse.c      Thu Mar 03 19:55:27 2022 +0000
@@ -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 @@
        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' */
 
diff -r b65712132a47 -r 9af3307c2ca1 usr.bin/make/suff.c
--- a/usr.bin/make/suff.c       Thu Mar 03 19:52:41 2022 +0000
+++ b/usr.bin/make/suff.c       Thu Mar 03 19:55:27 2022 +0000
@@ -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 @@
 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 @@
 
 /* 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;
 }
 



Home | Main Index | Thread Index | Old Index