utf_toupper(int a)
{
    // If 'casemap' contains "keepascii" use ASCII style toupper().
    if (a < 128 && (cmp_flags & CMP_KEEPASCII))
	return TOUPPER_ASC(a);

#if defined(HAVE_TOWUPPER) && defined(__STDC_ISO_10646__)
    // If towupper() is available and handles Unicode, use it.
    if (!(cmp_flags & CMP_INTERNAL))
	return towupper(a);
#endif

    // For characters below 128 use locale sensitive toupper().
    if (a < 128)
	return TOUPPER_LOC(a);

    // For any other characters use the above mapping table.
    return utf_convert(a, toUpper, (int)sizeof(toUpper));
}
utf_toupper(int a)
{
     
    if (a < 128 && (cmp_flags & CMP_KEEPASCII))
	return TOUPPER_ASC(a);

#if defined(HAVE_TOWUPPER) && defined(__STDC_ISO_10646__)
     
    if (!(cmp_flags & CMP_INTERNAL))
	return towupper(a);
#endif

     
    if (a < 128)
	return TOUPPER_LOC(a);

     
    return utf_convert(a, toUpper, (int)sizeof(toUpper));
}