Author: stefan2
Date: Mon Jul 29 11:05:15 2013
New Revision: 1507999
URL: http://svn.apache.org/r1507999
Log:
On the fsx branch: Merge the new svn_stringbuf_appendfill API (r1489949)
from /branches/fsfs-format7. The addtion of libsvn_fs_fs/reps.* was reverted.
Modified:
subversion/branches/fsx/ (props changed)
subversion/branches/fsx/subversion/include/svn_string.h
subversion/branches/fsx/subversion/libsvn_subr/string.c
Propchange: subversion/branches/fsx/
------------------------------------------------------------------------------
Merged /subversion/branches/fsfs-format7:r1489949
Modified: subversion/branches/fsx/subversion/include/svn_string.h
URL:
http://svn.apache.org/viewvc/subversion/branches/fsx/subversion/include/svn_string.h?rev=1507999&r1=1507998&r2=1507999&view=diff
==============================================================================
--- subversion/branches/fsx/subversion/include/svn_string.h (original)
+++ subversion/branches/fsx/subversion/include/svn_string.h Mon Jul 29 11:05:15
2013
@@ -313,6 +313,16 @@ svn_stringbuf_appendbytes(svn_stringbuf_
const char *bytes,
apr_size_t count);
+/** Append @a byte @a count times onto @a targetstr.
+ *
+ * reallocs if necessary. @a targetstr is affected, nothing else is.
+ * @since New in 1.9.
+ */
+void
+svn_stringbuf_appendfill(svn_stringbuf_t *targetstr,
+ char byte,
+ apr_size_t count);
+
/** Append the stringbuf @c appendstr onto @a targetstr.
*
* reallocs if necessary. @a targetstr is affected, nothing else is.
Modified: subversion/branches/fsx/subversion/libsvn_subr/string.c
URL:
http://svn.apache.org/viewvc/subversion/branches/fsx/subversion/libsvn_subr/string.c?rev=1507999&r1=1507998&r2=1507999&view=diff
==============================================================================
--- subversion/branches/fsx/subversion/libsvn_subr/string.c (original)
+++ subversion/branches/fsx/subversion/libsvn_subr/string.c Mon Jul 29 11:05:15
2013
@@ -606,6 +606,21 @@ svn_stringbuf_appendbytes(svn_stringbuf_
to null-terminate. */
}
+void
+svn_stringbuf_appendfill(svn_stringbuf_t *str,
+ char byte,
+ apr_size_t count)
+{
+ apr_size_t new_len = str->len + count;
+ svn_stringbuf_ensure(str, new_len);
+
+ memset(str->data + str->len, byte, count);
+
+ /* update buffer length and always NUL-terminate it */
+ str->len = new_len;
+ str->data[new_len] = '\0';
+}
+
void
svn_stringbuf_appendstr(svn_stringbuf_t *targetstr,