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): remove "Results: none" from the docume...
details: https://anonhg.NetBSD.org/src/rev/ee483bdbdec5
branches: trunk
changeset: 945347:ee483bdbdec5
user: rillig <rillig%NetBSD.org@localhost>
date: Mon Oct 26 23:28:52 2020 +0000
description:
make(1): remove "Results: none" from the documentation of void functions
diffstat:
usr.bin/make/dir.c | 67 +++++++++-------------------------------------------
usr.bin/make/job.c | 7 +---
usr.bin/make/main.c | 43 ++++++---------------------------
3 files changed, 22 insertions(+), 95 deletions(-)
diffs (219 lines):
diff -r 045701e2bc50 -r ee483bdbdec5 usr.bin/make/dir.c
--- a/usr.bin/make/dir.c Mon Oct 26 23:19:17 2020 +0000
+++ b/usr.bin/make/dir.c Mon Oct 26 23:28:52 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dir.c,v 1.189 2020/10/25 21:51:48 rillig Exp $ */
+/* $NetBSD: dir.c,v 1.190 2020/10/26 23:28:52 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -135,7 +135,7 @@
#include "job.h"
/* "@(#)dir.c 8.2 (Berkeley) 1/2/94" */
-MAKE_RCSID("$NetBSD: dir.c,v 1.189 2020/10/25 21:51:48 rillig Exp $");
+MAKE_RCSID("$NetBSD: dir.c,v 1.190 2020/10/26 23:28:52 rillig Exp $");
#define DIR_DEBUG0(text) DEBUG0(DIR, text)
#define DIR_DEBUG1(fmt, arg1) DEBUG1(DIR, fmt, arg1)
@@ -1503,23 +1503,11 @@
return Buf_Destroy(&buf, FALSE);
}
-/*-
- *-----------------------------------------------------------------------
- * Dir_Destroy --
- * Nuke a directory descriptor, if possible. Callback procedure
- * for the suffixes module when destroying a search path.
+/* Nuke a directory descriptor, if possible. Callback procedure for the
+ * suffixes module when destroying a search path.
*
* Input:
* dirp The directory descriptor to nuke
- *
- * Results:
- * None.
- *
- * Side Effects:
- * If no other path references this directory (refCount == 0),
- * the CachedDir and all its data are freed.
- *
- *-----------------------------------------------------------------------
*/
void
Dir_Destroy(void *dirp)
@@ -1536,23 +1524,8 @@
}
}
-/*-
- *-----------------------------------------------------------------------
- * Dir_ClearPath --
- * Clear out all elements of the given search path. This is different
- * from destroying the list, notice.
- *
- * Input:
- * path Path to clear
- *
- * Results:
- * None.
- *
- * Side Effects:
- * The path is set to the empty list.
- *
- *-----------------------------------------------------------------------
- */
+/* Clear out all elements from the given search path.
+ * The path is set to the empty list but is not destroyed. */
void
Dir_ClearPath(SearchPath *path)
{
@@ -1563,34 +1536,18 @@
}
-/*-
- *-----------------------------------------------------------------------
- * Dir_Concat --
- * Concatenate two paths, adding the second to the end of the first.
- * Makes sure to avoid duplicates.
- *
- * Input:
- * path1 Dest
- * path2 Source
- *
- * Results:
- * None
- *
- * Side Effects:
- * Reference counts for added dirs are upped.
- *
- *-----------------------------------------------------------------------
- */
+/* Concatenate two paths, adding the second to the end of the first,
+ * skipping duplicates. */
void
-Dir_Concat(SearchPath *path1, SearchPath *path2)
+Dir_Concat(SearchPath *dst, SearchPath *src)
{
SearchPathNode *ln;
- for (ln = path2->first; ln != NULL; ln = ln->next) {
+ for (ln = src->first; ln != NULL; ln = ln->next) {
CachedDir *dir = ln->datum;
- if (Lst_FindDatum(path1, dir) == NULL) {
+ if (Lst_FindDatum(dst, dir) == NULL) {
dir->refCount++;
- Lst_Append(path1, dir);
+ Lst_Append(dst, dir);
}
}
}
diff -r 045701e2bc50 -r ee483bdbdec5 usr.bin/make/job.c
--- a/usr.bin/make/job.c Mon Oct 26 23:19:17 2020 +0000
+++ b/usr.bin/make/job.c Mon Oct 26 23:28:52 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: job.c,v 1.292 2020/10/26 23:19:17 rillig Exp $ */
+/* $NetBSD: job.c,v 1.293 2020/10/26 23:28:52 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -143,7 +143,7 @@
#include "trace.h"
/* "@(#)job.c 8.2 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: job.c,v 1.292 2020/10/26 23:19:17 rillig Exp $");
+MAKE_RCSID("$NetBSD: job.c,v 1.293 2020/10/26 23:28:52 rillig Exp $");
/* A shell defines how the commands are run. All commands for a target are
* written into a single file, which is then given to the shell to execute
@@ -1721,9 +1721,6 @@
* finish TRUE if this is the last time we'll be called
* for this job
*
- * Results:
- * None
- *
* Side Effects:
* curPos may be shifted as may the contents of outBuf.
*-----------------------------------------------------------------------
diff -r 045701e2bc50 -r ee483bdbdec5 usr.bin/make/main.c
--- a/usr.bin/make/main.c Mon Oct 26 23:19:17 2020 +0000
+++ b/usr.bin/make/main.c Mon Oct 26 23:28:52 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.391 2020/10/26 21:34:10 rillig Exp $ */
+/* $NetBSD: main.c,v 1.392 2020/10/26 23:28:52 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -118,7 +118,7 @@
#include "trace.h"
/* "@(#)main.c 8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: main.c,v 1.391 2020/10/26 21:34:10 rillig Exp $");
+MAKE_RCSID("$NetBSD: main.c,v 1.392 2020/10/26 23:28:52 rillig Exp $");
#if defined(MAKE_NATIVE) && !defined(lint)
__COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993 "
"The Regents of the University of California. "
@@ -1783,17 +1783,8 @@
exit(2); /* Not 1 so -q can distinguish error */
}
-/*
- * Punt --
- * Major exception once jobs are being created. Kills all jobs, prints
- * a message and exits.
- *
- * Results:
- * None
- *
- * Side Effects:
- * All children are killed indiscriminately and the program Lib_Exits
- */
+/* Major exception once jobs are being created.
+ * Kills all jobs, prints a message and exits. */
void
Punt(const char *fmt, ...)
{
@@ -1812,16 +1803,7 @@
DieHorribly();
}
-/*-
- * DieHorribly --
- * Exit without giving a message.
- *
- * Results:
- * None
- *
- * Side Effects:
- * A big one...
- */
+/* Exit without giving a message. */
void
DieHorribly(void)
{
@@ -1833,20 +1815,11 @@
exit(2); /* Not 1, so -q can distinguish error */
}
-/*
- * Finish --
- * Called when aborting due to errors in child shell to signal
- * abnormal exit.
- *
- * Results:
- * None
- *
- * Side Effects:
- * The program exits
- */
+/* Called when aborting due to errors in child shell to signal abnormal exit.
+ * The program exits.
+ * Errors is the number of errors encountered in Make_Make. */
void
Finish(int errors)
- /* number of errors encountered in Make_Make */
{
if (dieQuietly(NULL, -1))
exit(2);
Home |
Main Index |
Thread Index |
Old Index