summaryrefslogtreecommitdiffstats
path: root/src/H5RS.c
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2023-09-15 22:13:18 (GMT)
committerGitHub <noreply@github.com>2023-09-15 22:13:18 (GMT)
commit44a00ef876ad3e1922847e93feac57c479217fbe (patch)
tree5e9fc677913a06a71eba1342633f92e93bd07a6c /src/H5RS.c
parent59a90368cdb696205bdf15040d1a48b4f69af97f (diff)
downloadhdf5-44a00ef876ad3e1922847e93feac57c479217fbe.zip
hdf5-44a00ef876ad3e1922847e93feac57c479217fbe.tar.gz
hdf5-44a00ef876ad3e1922847e93feac57c479217fbe.tar.bz2
Strip HD prefix from string/char C API calls (#3540)
* Strip HD prefix from string/char C API calls * HD(f)(put|get)(s|c) * HDstr* * HDv*printf * HD(s)(print|scan)f * HDperror But NOT: * HDstrcase* * HDvasprintf * HDstrtok_r * HDstrndup As those are not C99 and have portability work-around implementations. They will be handled later. * Fix th5_system.c screwup
Diffstat (limited to 'src/H5RS.c')
-rw-r--r--src/H5RS.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/H5RS.c b/src/H5RS.c
index 46e9266..b0322be 100644
--- a/src/H5RS.c
+++ b/src/H5RS.c
@@ -113,7 +113,7 @@ H5RS__xstrdup(H5RS_str_t *rs, const char *s)
assert(rs);
if (s) {
- size_t len = HDstrlen(s);
+ size_t len = strlen(s);
/* Determine size of buffer to allocate */
rs->max = H5RS_ALLOC_SIZE;
@@ -322,7 +322,7 @@ H5RS_wrap(const char *s)
ret_value->s = (char *)s;
H5_GCC_CLANG_DIAG_ON("cast-qual")
- ret_value->len = HDstrlen(s);
+ ret_value->len = strlen(s);
ret_value->end = ret_value->s + ret_value->len;
ret_value->wrapped = true;
@@ -372,7 +372,7 @@ H5RS_asprintf_cat(H5RS_str_t *rs, const char *fmt, ...)
/* Attempt to write formatted output into the managed string */
va_start(args1, fmt);
va_copy(args2, args1);
- while ((out_len = (size_t)HDvsnprintf(rs->end, (rs->max - rs->len), fmt, args1)) >= (rs->max - rs->len)) {
+ while ((out_len = (size_t)vsnprintf(rs->end, (rs->max - rs->len), fmt, args1)) >= (rs->max - rs->len)) {
/* Allocate a large enough buffer */
if (H5RS__resize_for_append(rs, out_len) < 0)
HGOTO_ERROR(H5E_RS, H5E_CANTRESIZE, FAIL, "can't resize ref-counted string buffer");
@@ -418,7 +418,7 @@ H5RS_acat(H5RS_str_t *rs, const char *s)
/* Concatenate the provided string on to the managed string */
if (*s) {
- size_t len = HDstrlen(s);
+ size_t len = strlen(s);
/* Allocate the underlying string, if necessary */
if (H5RS__prepare_for_append(rs) < 0)
@@ -464,7 +464,7 @@ H5RS_ancat(H5RS_str_t *rs, const char *s, size_t n)
/* Concatenate the provided string on to the managed string */
if (n && *s) {
- size_t len = HDstrlen(s);
+ size_t len = strlen(s);
/* Limit characters to copy to the minimum of 'n' and 'len' */
n = MIN(len, n);
@@ -677,7 +677,7 @@ H5RS_cmp(const H5RS_str_t *rs1, const H5RS_str_t *rs2)
assert(rs2);
assert(rs2->s);
- FUNC_LEAVE_NOAPI(HDstrcmp(rs1->s, rs2->s))
+ FUNC_LEAVE_NOAPI(strcmp(rs1->s, rs2->s))
} /* end H5RS_cmp() */
/*--------------------------------------------------------------------------
@@ -707,7 +707,7 @@ H5RS_len(const H5RS_str_t *rs)
assert(rs);
assert(rs->s);
- FUNC_LEAVE_NOAPI(HDstrlen(rs->s))
+ FUNC_LEAVE_NOAPI(strlen(rs->s))
} /* end H5RS_len() */
/*--------------------------------------------------------------------------