Move macros around
This commit is contained in:
parent
07233581c9
commit
db5227c40e
|
@ -639,10 +639,8 @@ hb_ot_tag_from_language (hb_language_t language)
|
|||
char tag[4];
|
||||
int i;
|
||||
lang_str += 6;
|
||||
#define IS_LETTER(c) (((c) >= 'a' && (c) <= 'z') || ((c) >= 'A' && (c) <= 'Z'))
|
||||
#define TO_UPPER(c) (((c) >= 'a' && (c) <= 'z') ? (c) + 'A' - 'a' : (c))
|
||||
for (i = 0; i < 4 && IS_LETTER (lang_str[i]); i++)
|
||||
tag[i] = TO_UPPER (lang_str[i]);
|
||||
for (i = 0; i < 4 && ISALPHA (lang_str[i]); i++)
|
||||
tag[i] = TOUPPER (lang_str[i]);
|
||||
for (; i < 4; i++)
|
||||
tag[i] = ' ';
|
||||
return HB_TAG_CHAR4 (tag);
|
||||
|
|
|
@ -263,6 +263,13 @@ typedef int hb_mutex_t;
|
|||
#define hb_be_uint32_cmp(a,b) (a[0] == b[0] && a[1] == b[1] && a[2] == b[2] && a[3] == b[3])
|
||||
|
||||
|
||||
/* ASCII character handling */
|
||||
|
||||
#define ISALPHA(c) (((c) >= 'a' && (c) <= 'z') || ((c) >= 'A' && (c) <= 'Z'))
|
||||
#define TOUPPER(c) (((c) >= 'a' && (c) <= 'z') ? (c) - 'a' + 'A' : (c))
|
||||
#define TOLOWER(c) (((c) >= 'A' && (c) <= 'Z') ? (c) - 'A' + 'a' : (c))
|
||||
|
||||
|
||||
/* Debug */
|
||||
|
||||
#ifndef HB_DEBUG
|
||||
|
|
Loading…
Reference in New Issue