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 comments in buf.c
details: https://anonhg.NetBSD.org/src/rev/1347cbe18fc9
branches: trunk
changeset: 1015460:1347cbe18fc9
user: rillig <rillig%NetBSD.org@localhost>
date: Sat Oct 24 04:27:24 2020 +0000
description:
make(1): clean up comments in buf.c
diffstat:
usr.bin/make/buf.c | 17 ++++++++---------
1 files changed, 8 insertions(+), 9 deletions(-)
diffs (64 lines):
diff -r 8ad882239b2b -r 1347cbe18fc9 usr.bin/make/buf.c
--- a/usr.bin/make/buf.c Sat Oct 24 04:20:50 2020 +0000
+++ b/usr.bin/make/buf.c Sat Oct 24 04:27:24 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: buf.c,v 1.40 2020/09/27 16:59:02 rillig Exp $ */
+/* $NetBSD: buf.c,v 1.41 2020/10/24 04:27:24 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -69,15 +69,15 @@
* SUCH DAMAGE.
*/
-/* Functions for automatically-expanded null-terminated buffers. */
+/* Automatically-expanding null-terminated buffers. */
#include <limits.h>
#include "make.h"
/* "@(#)buf.c 8.1 (Berkeley) 6/6/93" */
-MAKE_RCSID("$NetBSD: buf.c,v 1.40 2020/09/27 16:59:02 rillig Exp $");
+MAKE_RCSID("$NetBSD: buf.c,v 1.41 2020/10/24 04:27:24 rillig Exp $");
-/* Extend the buffer for adding a single byte. */
+/* Make space in the buffer for adding a single byte. */
void
Buf_Expand_1(Buffer *buf)
{
@@ -85,7 +85,7 @@
buf->data = bmake_realloc(buf->data, buf->cap);
}
-/* Add the given bytes to the buffer. */
+/* Add the bytes to the buffer. */
void
Buf_AddBytes(Buffer *buf, const char *bytes, size_t bytes_len)
{
@@ -110,14 +110,14 @@
Buf_AddBytes(buf, start, (size_t)(end - start));
}
-/* Add the given string to the buffer. */
+/* Add the string to the buffer. */
void
Buf_AddStr(Buffer *buf, const char *str)
{
Buf_AddBytes(buf, str, strlen(str));
}
-/* Add the given number to the buffer. */
+/* Add the number to the buffer. */
void
Buf_AddInt(Buffer *buf, int n)
{
@@ -138,8 +138,7 @@
* The returned data is valid until the next modifying operation
* on the buffer.
*
- * Returns the pointer to the data and optionally the length of the
- * data in the buffer. */
+ * Returns the data and optionally the length of the data. */
char *
Buf_GetAll(Buffer *buf, size_t *out_len)
{
Home |
Main Index |
Thread Index |
Old Index