Commit: b7c42ef93edeadc28015a6eae184ff07f26e9c36
Author: Campbell Barton
Date:   Tue Jul 14 09:17:00 2015 +1000
Branches: master
https://developer.blender.org/rBb7c42ef93edeadc28015a6eae184ff07f26e9c36

Cleanup: use ascii as suffix (as with utf8)

===================================================================

M       source/blender/blenkernel/intern/unit.c
M       source/blender/blenlib/BLI_string.h
M       source/blender/blenlib/intern/string.c
M       source/blender/windowmanager/intern/wm_operators.c

===================================================================

diff --git a/source/blender/blenkernel/intern/unit.c 
b/source/blender/blenkernel/intern/unit.c
index 0d83695..d1fd055 100644
--- a/source/blender/blenkernel/intern/unit.c
+++ b/source/blender/blenkernel/intern/unit.c
@@ -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);
diff --git a/source/blender/blenlib/BLI_string.h 
b/source/blender/blenlib/BLI_string.h
index 007cb13..8278039 100644
--- a/source/blender/blenlib/BLI_string.h
+++ b/source/blender/blenlib/BLI_string.h
@@ -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();
diff --git a/source/blender/blenlib/intern/string.c 
b/source/blender/blenlib/intern/string.c
index 28cc5eb..6d75f7c 100644
--- a/source/blender/blenlib/intern/string.c
+++ b/source/blender/blenlib/intern/string.c
@@ -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;
 
diff --git a/source/blender/windowmanager/intern/wm_operators.c 
b/source/blender/windowmanager/intern/wm_operators.c
index 60b102c..c4f6a5a 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -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);
                }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to