char const *alias_of;
int subr_idx;
};
- int_least32_t unicode;
-#define NU (-1)
+ uint_least32_t unicode;
+#define NU (0xFFFFFFFF)
char const *name;
uint_least16_t flags;
#define SEP 0x01 /* Separated graphics */
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 long)a->unicode < (unsigned long)b->unicode) return -1;
- if ((unsigned long)a->unicode > (unsigned long)b->unicode) return +1;
+ if (a->unicode < b->unicode) return -1;
+ if (a->unicode > b->unicode) return +1;
/* Finally sort by glyph name for an arbitrary stable order. */
return namecmp(a->name, b->name);
}
}
printf(">\n");
for (i = 0; i < lenof(glyphs); i++)
- if (glyphs[i].unicode >= 0 &&
- glyphs[i].unicode < limit)
+ if (glyphs[i].unicode < limit)
printf("<map code='0x%lx' name='%s'/>\n",
- (long)glyphs[i].unicode, glyphs[i].name);
+ (unsigned long)glyphs[i].unicode,
+ glyphs[i].name);
printf("</cmap_format_%d>\n", format);
}
struct glyph const *a = *(struct glyph const **)va,
*b = *(struct glyph const **)vb;
- /* 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;
+ if (a->unicode < b->unicode) return -1;
+ if (a->unicode > b->unicode) return +1;
return namecmp(a->name, b->name);
}
printf("gsave %d %d translate ",
(col * 40),
(int)-((g->unicode == NU ?
- row++ : g->unicode % nrow) * 40));
+ row++ : (int)(g->unicode % nrow)) * 40));
if (g->unicode != NU)
printf("(U+%04lX)", (unsigned long)g->unicode);
else