Cleanup: use ascii as suffix (as with utf8)

This commit is contained in:
Campbell Barton 2015-07-14 09:17:00 +10:00
parent 2de497eee0
commit b7c42ef93e
4 changed files with 7 additions and 7 deletions

@ -645,7 +645,7 @@ bool bUnit_ReplaceString(char *str, int len_max, const char *str_prev, double sc
}
/* make lowercase */
BLI_ascii_strtolower(str, len_max);
BLI_str_tolower_ascii(str, len_max);
/* Try to find a default unit from current or previous string. */
default_unit = unit_detect_from_str(usys, str, str_prev);

@ -81,8 +81,8 @@ int BLI_strcmp_ignore_pad(const char *str1, const char *str2, const char pad) AT
size_t BLI_strnlen(const char *str, const size_t maxlen) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
void BLI_ascii_strtolower(char *str, const size_t len) ATTR_NONNULL();
void BLI_ascii_strtoupper(char *str, const size_t len) ATTR_NONNULL();
void BLI_str_tolower_ascii(char *str, const size_t len) ATTR_NONNULL();
void BLI_str_toupper_ascii(char *str, const size_t len) ATTR_NONNULL();
int BLI_str_rstrip_float_zero(char *str, const char pad) ATTR_NONNULL();
int BLI_str_index_in_array_n(const char *__restrict str, const char **__restrict str_array, const int str_array_len) ATTR_NONNULL();

@ -730,7 +730,7 @@ size_t BLI_strnlen(const char *s, const size_t maxlen)
return len;
}
void BLI_ascii_strtolower(char *str, const size_t len)
void BLI_str_tolower_ascii(char *str, const size_t len)
{
size_t i;
@ -739,7 +739,7 @@ void BLI_ascii_strtolower(char *str, const size_t len)
str[i] += 'a' - 'A';
}
void BLI_ascii_strtoupper(char *str, const size_t len)
void BLI_str_toupper_ascii(char *str, const size_t len)
{
size_t i;

@ -543,7 +543,7 @@ void WM_operator_py_idname(char *to, const char *from)
/* note, we use ascii tolower instead of system tolower, because the
* latter depends on the locale, and can lead to idname mismatch */
memcpy(to, from, sizeof(char) * ofs);
BLI_ascii_strtolower(to, ofs);
BLI_str_tolower_ascii(to, ofs);
to[ofs] = '.';
BLI_strncpy(to + (ofs + 1), sep + 4, OP_MAX_TYPENAME - (ofs + 1));
@ -564,7 +564,7 @@ void WM_operator_bl_idname(char *to, const char *from)
int ofs = (sep - from);
memcpy(to, from, sizeof(char) * ofs);
BLI_ascii_strtoupper(to, ofs);
BLI_str_toupper_ascii(to, ofs);
strcpy(to + ofs, "_OT_");
strcpy(to + (ofs + 4), sep + 1);
}