diff options
author | harti <harti@FreeBSD.org> | 2005-02-07 07:54:23 +0000 |
---|---|---|
committer | harti <harti@FreeBSD.org> | 2005-02-07 07:54:23 +0000 |
commit | 92a5e4fdd6e689f9a8570f20066b1db264ded799 (patch) | |
tree | 5139321e24b73eb766d0d1666c28d2d79a8abd00 /usr.bin/make/buf.c | |
parent | c45831f7c65accf983e86b1f1a883f20c27133e0 (diff) | |
download | FreeBSD-src-92a5e4fdd6e689f9a8570f20066b1db264ded799.zip FreeBSD-src-92a5e4fdd6e689f9a8570f20066b1db264ded799.tar.gz |
Invent a Buf_AppendRange function that appends a non-NUL-terminated string
given by a pointer to the start of the string and a pointer one behind
the end.
Submitted by: Max Okumoto <okumoto@ucsd.edu>
Diffstat (limited to 'usr.bin/make/buf.c')
-rw-r--r-- | usr.bin/make/buf.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/usr.bin/make/buf.c b/usr.bin/make/buf.c index 738f92a..b3748f0 100644 --- a/usr.bin/make/buf.c +++ b/usr.bin/make/buf.c @@ -204,6 +204,15 @@ Buf_Append(Buffer *bp, const char str[]) } /** + * Append characters between str and end to Buffer object. + */ +void +Buf_AppendRange(Buffer *bp, const char str[], const char *end) +{ + Buf_AddBytes(bp, end - str, str); +} + +/** * Clear the contents of the buffer. */ void |