Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove HD prefix from toupper/tolower #4340

Merged
merged 2 commits into from
Apr 7, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/H5FDs3comms.c
Original file line number Diff line number Diff line change
Expand Up @@ -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".
Expand Down Expand Up @@ -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);
}

Expand Down Expand Up @@ -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;
Expand Down
6 changes: 0 additions & 6 deletions src/H5private.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/H5system.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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++;
}
Expand Down
Loading