summaryrefslogtreecommitdiffstats
path: root/tools/lib
diff options
context:
space:
mode:
authorScot Breitenfeld <brtnfld@hdfgroup.org>2015-07-02 19:12:03 (GMT)
committerScot Breitenfeld <brtnfld@hdfgroup.org>2015-07-02 19:12:03 (GMT)
commit985e8d02a47c7e282e9d5eb7ed11dc6d47e7ae0e (patch)
tree98599798b2d21610307b4109ce76679e3948f6ca /tools/lib
parent2a567e8155a883a1d79a7879e953449ed7505945 (diff)
parent9804fed58f4f30843d406861a2daf67944c244de (diff)
downloadhdf5-985e8d02a47c7e282e9d5eb7ed11dc6d47e7ae0e.zip
hdf5-985e8d02a47c7e282e9d5eb7ed11dc6d47e7ae0e.tar.gz
hdf5-985e8d02a47c7e282e9d5eb7ed11dc6d47e7ae0e.tar.bz2
[svn-r27327] svn merge -r27208:27326 https://svn.hdfgroup.uiuc.edu/hdf5/trunk
Diffstat (limited to 'tools/lib')
-rw-r--r--tools/lib/h5tools_str.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c
index 2603984..470620f 100644
--- a/tools/lib/h5tools_str.c
+++ b/tools/lib/h5tools_str.c
@@ -48,6 +48,7 @@
static char *h5tools_escape(char *s, size_t size);
static hbool_t h5tools_str_is_zero(const void *_mem, size_t size);
static void h5tools_print_char(h5tools_str_t *str, const h5tool_format_t *info, char ch);
+void h5tools_str_indent(h5tools_str_t *str, const h5tool_format_t *info, h5tools_context_t *ctx);
/*-------------------------------------------------------------------------
* Function: h5tools_str_close
@@ -144,16 +145,16 @@ h5tools_str_append(h5tools_str_t *str/*in,out*/, const char *fmt, ...)
nchars = HDvsnprintf(str->s + str->len, avail, fmt, ap);
HDva_end(ap);
- /* Note: HDvsnprintf() behaves differently on Windows as Unix, when
- * buffer is smaller than source string. On Unix, this function
- * returns length of the source string and copy string upto the
- * buffer size with NULL at the end of the buffer. However on
- * Windows with the same condition, this function returns -1 and
+ /* Note: HDvsnprintf() behaves differently on Windows as Unix, when
+ * buffer is smaller than source string. On Unix, this function
+ * returns length of the source string and copy string upto the
+ * buffer size with NULL at the end of the buffer. However on
+ * Windows with the same condition, this function returns -1 and
* doesn't add NULL at the end of the buffer.
* Because of this different return results, the strlen of the new string
* is used to handle when HDvsnprintf() returns -1 on Windows due
* to lack of buffer size, so try one more time after realloc more
- * buffer size before return NULL.
+ * buffer size before return NULL.
*/
if (nchars < 0) {
/* failure, such as bad format */
@@ -277,7 +278,7 @@ h5tools_str_fmt(h5tools_str_t *str/*in,out*/, size_t start, const char *fmt)
if (HDstrchr(fmt, '%')) {
size_t n = sizeof(_temp);
if (str->len - start + 1 > n) {
- n = str->len - start + 1;
+ n = str->len - start + 1;
temp = (char*)HDmalloc(n);
HDassert(temp);
}
@@ -665,12 +666,12 @@ h5tools_str_indent(h5tools_str_t *str, const h5tool_format_t *info,
*
* PVN, 28 March 2006
* added H5T_NATIVE_LDOUBLE case
- *
+ *
* Raymond Lu, 2011-09-01
* CLANG compiler complained about the line (about 800):
* tempint = (tempint >> packed_data_offset) & packed_data_mask;
- * The right shift may cause undefined behavior if PACKED_DATA_OFFSET is
- * 32-bit or more. For every kind of native integers, I changed the code
+ * The right shift may cause undefined behavior if PACKED_DATA_OFFSET is
+ * 32-bit or more. For every kind of native integers, I changed the code
* to make it zero if PACKED_DATA_OFFSET is greater than or equal to the
* size of integer.
*-------------------------------------------------------------------------
@@ -1371,14 +1372,14 @@ h5tools_str_is_zero(const void *_mem, size_t size)
*
* Purpose: replace all occurrences of substring.
*
- * Return: char *
+ * Return: char *
*
* Programmer: Peter Cao
* March 8, 2012
*
* Notes:
- * Applications need to call free() to free the memoery allocated for
- * the return string
+ * Applications need to call free() to free the memoery allocated for
+ * the return string
*
*-------------------------------------------------------------------------
*/
@@ -1411,6 +1412,6 @@ h5tools_str_replace ( const char *string, const char *substr, const char *replac
head = newstr + (tok - oldstr) + HDstrlen( replacement );
HDfree (oldstr);
}
-
+
return newstr;
}