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): rename Buf_Size to Buf_Len
details: https://anonhg.NetBSD.org/src/rev/0a3057702a39
branches: trunk
changeset: 939678:0a3057702a39
user: rillig <rillig%NetBSD.org@localhost>
date: Sun Sep 27 16:52:22 2020 +0000
description:
make(1): rename Buf_Size to Buf_Len
The new name better matches the field name Buffer.len as well as the
variables around the calls to this function.
diffstat:
usr.bin/make/buf.h | 4 ++--
usr.bin/make/for.c | 6 +++---
usr.bin/make/main.c | 6 +++---
usr.bin/make/var.c | 10 +++++-----
4 files changed, 13 insertions(+), 13 deletions(-)
diffs (117 lines):
diff -r 6810048edb3b -r 0a3057702a39 usr.bin/make/buf.h
--- a/usr.bin/make/buf.h Sun Sep 27 16:45:21 2020 +0000
+++ b/usr.bin/make/buf.h Sun Sep 27 16:52:22 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: buf.h,v 1.32 2020/09/27 16:38:32 rillig Exp $ */
+/* $NetBSD: buf.h,v 1.33 2020/09/27 16:52:22 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -107,7 +107,7 @@
}
static inline MAKE_ATTR_UNUSED size_t
-Buf_Size(const Buffer *bp)
+Buf_Len(const Buffer *bp)
{
return bp->len;
}
diff -r 6810048edb3b -r 0a3057702a39 usr.bin/make/for.c
--- a/usr.bin/make/for.c Sun Sep 27 16:45:21 2020 +0000
+++ b/usr.bin/make/for.c Sun Sep 27 16:52:22 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: for.c,v 1.86 2020/09/25 15:54:50 rillig Exp $ */
+/* $NetBSD: for.c,v 1.87 2020/09/27 16:52:22 rillig Exp $ */
/*
* Copyright (c) 1992, The Regents of the University of California.
@@ -60,7 +60,7 @@
#include "strlist.h"
/* "@(#)for.c 8.1 (Berkeley) 6/6/93" */
-MAKE_RCSID("$NetBSD: for.c,v 1.86 2020/09/25 15:54:50 rillig Exp $");
+MAKE_RCSID("$NetBSD: for.c,v 1.87 2020/09/27 16:52:22 rillig Exp $");
typedef enum {
FOR_SUB_ESCAPE_CHAR = 0x0001,
@@ -433,7 +433,7 @@
}
Buf_AddBytesBetween(&cmds, cmd_cp, body_end);
- *ret_len = Buf_Size(&cmds);
+ *ret_len = Buf_Len(&cmds);
cmds_str = Buf_Destroy(&cmds, FALSE);
if (DEBUG(FOR))
(void)fprintf(debug_file, "For: loop body:\n%s", cmds_str);
diff -r 6810048edb3b -r 0a3057702a39 usr.bin/make/main.c
--- a/usr.bin/make/main.c Sun Sep 27 16:45:21 2020 +0000
+++ b/usr.bin/make/main.c Sun Sep 27 16:52:22 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.349 2020/09/26 17:39:45 rillig Exp $ */
+/* $NetBSD: main.c,v 1.350 2020/09/27 16:52:22 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -126,7 +126,7 @@
#endif
/* "@(#)main.c 8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: main.c,v 1.349 2020/09/26 17:39:45 rillig Exp $");
+MAKE_RCSID("$NetBSD: main.c,v 1.350 2020/09/27 16:52:22 rillig Exp $");
#if defined(MAKE_NATIVE) && !defined(lint)
__COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993\
The Regents of the University of California. All rights reserved.");
@@ -1679,7 +1679,7 @@
JobReapChild(pid, status, FALSE);
continue;
}
- res_len = Buf_Size(&buf);
+ res_len = Buf_Len(&buf);
res = Buf_Destroy(&buf, FALSE);
if (savederr != 0)
diff -r 6810048edb3b -r 0a3057702a39 usr.bin/make/var.c
--- a/usr.bin/make/var.c Sun Sep 27 16:45:21 2020 +0000
+++ b/usr.bin/make/var.c Sun Sep 27 16:52:22 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: var.c,v 1.544 2020/09/27 16:10:07 rillig Exp $ */
+/* $NetBSD: var.c,v 1.545 2020/09/27 16:52:22 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -121,7 +121,7 @@
#include "metachar.h"
/* "@(#)var.c 8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.544 2020/09/27 16:10:07 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.545 2020/09/27 16:52:22 rillig Exp $");
#define VAR_DEBUG_IF(cond, fmt, ...) \
if (!(DEBUG(VAR) && (cond))) \
@@ -1551,7 +1551,7 @@
for (i = 0; i < words.len; i++) {
modifyWord(words.words[i], &result, modifyWord_args);
- if (Buf_Size(&result.buf) > 0)
+ if (Buf_Len(&result.buf) > 0)
SepBuf_Sep(&result);
}
@@ -1942,7 +1942,7 @@
*pp = ++p;
if (out_length != NULL)
- *out_length = Buf_Size(&buf);
+ *out_length = Buf_Len(&buf);
*out_part = Buf_Destroy(&buf, FALSE);
VAR_DEBUG("Modifier part: \"%s\"\n", *out_part);
@@ -3361,7 +3361,7 @@
}
}
*pp = p;
- *out_varname_len = Buf_Size(&buf);
+ *out_varname_len = Buf_Len(&buf);
return Buf_Destroy(&buf, FALSE);
}
Home |
Main Index |
Thread Index |
Old Index