unsigned int da, db;
const char *p;
- p = strstr (a, "-");
+ p = strchr (a, '-');
da = p ? (unsigned int) (p - a) : strlen (a);
- p = strstr (b, "-");
+ p = strchr (b, '-');
db = p ? (unsigned int) (p - b) : strlen (b);
return strncmp (a, b, MAX (da, db));
const char *lang_str, *s;
const LangTag *lang_tag;
- if (language == NULL)
+ if (language == HB_LANGUAGE_INVALID)
return HB_OT_TAG_DEFAULT_LANGUAGE;
lang_str = hb_language_to_string (language);
}
}
- /* Else return a custom language in the form of "x-hbotXXXX" */
+ /* Else return a custom language in the form of "x-hbotABCD" */
{
unsigned char buf[11] = "x-hbot";
buf[6] = tag >> 24;