projects
/
framework
/
uifw
/
harfbuzz.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6f729b4
)
Convert to uppercase in hb_ot_tag_from_language()
author
Behdad Esfahbod
<behdad@behdad.org>
Thu, 29 Apr 2010 08:41:41 +0000
(
04:41
-0400)
committer
Behdad Esfahbod
<behdad@behdad.org>
Thu, 29 Apr 2010 08:41:41 +0000
(
04:41
-0400)
src/hb-ot-tag.c
patch
|
blob
|
history
diff --git
a/src/hb-ot-tag.c
b/src/hb-ot-tag.c
index
40356b0
..
8b88eb3
100644
(file)
--- a/
src/hb-ot-tag.c
+++ b/
src/hb-ot-tag.c
@@
-599,8
+599,10
@@
hb_ot_tag_from_language (hb_language_t language)
int i;
lang_str += 6;
i = 0;
- while (i < 4 && lang_str[i]) {
- tag[i] = lang_str[i];
+#define IS_LETTER(c) (((c) >= 'a' && (c) <= 'z') || ((c) >= 'A' && (c) <= 'Z'))
+#define TO_UPPER(c) (((c) >= 'a' && (c) <= 'z') ? (c) + 'A' - 'a' : (c))
+ while (i < 4 && IS_LETTER (lang_str[i])) {
+ tag[i] = TO_UPPER (lang_str[i]);
}
while (i < 4)
tag[i] = ' ';