int
ecore_str_compare(const void *key1, const void *key2)
{
   const char *k1, *k2;

   if (!key1 || !key2)
      return ecore_direct_compare(key1, key2);
   else if (key1 == key2)
      return 0;

   k1 = key1;
   k2 = key2;

   return strcmp(k1, k2);
}
Пример #2
0
static int
ewl_io_manager_strcasecompare(const void *key1, const void *key2)
{
        DENTER_FUNCTION(DLEVEL_STABLE);

        if (!key1 || !key2)
        {
                DRETURN_INT(ecore_direct_compare(key1, key2), DLEVEL_STABLE);
        }
        else if (key1 == key2)
        {
                DRETURN_INT(0, DLEVEL_STABLE);
        }

        DRETURN_INT(strcasecmp((const char *)key1,
                                (const char *)key2), DLEVEL_STABLE);
}