summaryrefslogtreecommitdiffstats
path: root/usr.bin/make/buf.c
diff options
context:
space:
mode:
authorharti <harti@FreeBSD.org>2005-02-07 07:49:16 +0000
committerharti <harti@FreeBSD.org>2005-02-07 07:49:16 +0000
commitc45831f7c65accf983e86b1f1a883f20c27133e0 (patch)
tree66fb0e86c2921f8ecff474aa405874087d374906 /usr.bin/make/buf.c
parentd2bbb620e902ad472a90d5c5d1fc3286b192a0a2 (diff)
downloadFreeBSD-src-c45831f7c65accf983e86b1f1a883f20c27133e0.zip
FreeBSD-src-c45831f7c65accf983e86b1f1a883f20c27133e0.tar.gz
Invent a Buf_Append function to append a NUL-terminated string
and use it thoughout the code. Submitted by: Max Okumoto <okumoto@ucsd.edu>
Diffstat (limited to 'usr.bin/make/buf.c')
-rw-r--r--usr.bin/make/buf.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/usr.bin/make/buf.c b/usr.bin/make/buf.c
index 3327c7f..738f92a 100644
--- a/usr.bin/make/buf.c
+++ b/usr.bin/make/buf.c
@@ -194,6 +194,16 @@ Buf_ReplaceLastByte(Buffer *bp, Byte byte)
}
/**
+ * Append characters in str to Buffer object
+ */
+void
+Buf_Append(Buffer *bp, const char str[])
+{
+
+ Buf_AddBytes(bp, strlen(str), str);
+}
+
+/**
* Clear the contents of the buffer.
*/
void
OpenPOWER on IntegriCloud