if (strcmp(a->name, ".notdef") == 0) return -1;
if (strcmp(b->name, ".notdef") == 0) return +1;
/* Then characters with Unicode code-points in order. */
- if ((unsigned int)a->unicode < (unsigned int)b->unicode) return -1;
- if ((unsigned int)a->unicode > (unsigned int)b->unicode) return +1;
+ if ((unsigned long)a->unicode < (unsigned long)b->unicode) return -1;
+ if ((unsigned long)a->unicode > (unsigned long)b->unicode) return +1;
/* Finally sort by glyph name for an arbitrary stable order. */
return namecmp(a->name, b->name);
}
struct glyph const *a = *(struct glyph const **)va,
*b = *(struct glyph const **)vb;
- /* Cast to unsigned int so -1 sorts last. */
- if ((unsigned int)a->unicode < (unsigned int)b->unicode) return -1;
- if ((unsigned int)a->unicode > (unsigned int)b->unicode) return +1;
+ /* Cast to unsigned long so -1 sorts last. */
+ if ((unsigned long)a->unicode < (unsigned long)b->unicode) return -1;
+ if ((unsigned long)a->unicode > (unsigned long)b->unicode) return +1;
return namecmp(a->name, b->name);
}