From b8a3187c2057f24989fa603c7d78db71cb35717b Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Sun, 7 Apr 2024 05:12:29 -0700 Subject: [PATCH] Remove HD prefix from toupper/tolower --- src/H5FDs3comms.c | 6 +++--- src/H5private.h | 6 ------ src/H5system.c | 4 ++-- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/src/H5FDs3comms.c b/src/H5FDs3comms.c index 2b7b5419c61..caf02b3e30a 100644 --- a/src/H5FDs3comms.c +++ b/src/H5FDs3comms.c @@ -244,7 +244,7 @@ H5FD_s3comms_hrb_node_set(hrb_node_t **L, const char *name, const char *value) if (lowername == NULL) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "cannot make space for lowercase name copy."); for (i = 0; i < namelen; i++) - lowername[i] = (char)HDtolower((int)name[i]); + lowername[i] = (char)tolower((int)name[i]); lowername[namelen] = 0; /* If value supplied, copy name, value, and concatenated "name: value". @@ -2172,7 +2172,7 @@ H5FD_s3comms_nlowercase(char *dest, const char *s, size_t len) H5MM_memcpy(dest, s, len); do { len--; - dest[len] = (char)HDtolower((int)dest[len]); + dest[len] = (char)tolower((int)dest[len]); } while (len > 0); } @@ -2264,7 +2264,7 @@ H5FD_s3comms_parse_url(const char *str, parsed_url_t **_purl) strncpy(purl->scheme, curstr, (size_t)len); purl->scheme[len] = '\0'; for (i = 0; i < len; i++) - purl->scheme[i] = (char)HDtolower(purl->scheme[i]); + purl->scheme[i] = (char)tolower(purl->scheme[i]); /* Skip "://" */ tmpstr += 3; diff --git a/src/H5private.h b/src/H5private.h index 904aa9f3652..c5d1f13b93f 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -917,12 +917,6 @@ H5_DLL H5_ATTR_CONST int Nflock(int fd, int operation); #ifndef HDtmpfile #define HDtmpfile() tmpfile() #endif -#ifndef HDtolower -#define HDtolower(C) tolower(C) -#endif -#ifndef HDtoupper -#define HDtoupper(C) toupper(C) -#endif #ifndef HDtzset #define HDtzset() tzset() #endif diff --git a/src/H5system.c b/src/H5system.c index 7c540e5bf6b..edfc2a14393 100644 --- a/src/H5system.c +++ b/src/H5system.c @@ -689,7 +689,7 @@ H5_build_extpath(const char *name, char **extpath /*out*/) * Unix: does not apply */ if (H5_CHECK_ABS_DRIVE(name)) { - drive = HDtoupper(name[0]) - 'A' + 1; + drive = toupper(name[0]) - 'A' + 1; retcwd = HDgetdcwd(drive, cwdpath, MAX_PATH_LEN); strncpy(new_name, &name[2], name_len); } @@ -1404,7 +1404,7 @@ H5_strcasestr(const char *haystack, const char *needle) const char *h = haystack; const char *n = needle; /* loop while lowercase strings match, or needle ends */ - while (HDtolower(*h) == HDtolower(*n) && *n) { + while (tolower(*h) == tolower(*n) && *n) { h++; n++; }