#include <ctype.h>
#include <errno.h>
#include <stdbool.h>
+#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
static struct glyph {
char data[YSIZE];
- int unicode;
+ int_least32_t unicode;
char const *name;
- unsigned int flags;
+ uint_least8_t flags;
#define SEP 0x01 /* Separated graphics */
#define MOS6 0x02 /* 6-cell mosaic graphics character */
#define MOS4 0x04 /* 4-cell mosaic graphics character */
printf("OtfFeatName: 'ss16' 1033 \"6-cell separated graphics\"\n");
printf("Lookup: 257 0 0 \"palt: proportional metrics\" {\"palt\"} "
"['palt' ('DFLT' <'dflt'> 'latn' <'dflt'>)]\n");
- printf("BeginChars: %d %d\n", 0x110000 + extraglyphs, nglyphs);
+ printf("BeginChars: %ld %d\n", 0x110000L + extraglyphs, nglyphs);
extraglyphs = 0;
for (i = 0; i < nglyphs; i++)
glyphs_by_name[i] = glyphs + i;
&compare_glyphs_by_name);
for (i = 0; i < nglyphs; i++) {
printf("\nStartChar: %s\n", glyphs[i].name);
- printf("Encoding: %d %d %d\n",
- glyphs[i].unicode != -1 ? glyphs[i].unicode :
- 0x110000 + extraglyphs++, glyphs[i].unicode, i);
+ printf("Encoding: %ld %ld %d\n",
+ (long)(glyphs[i].unicode != -1 ? glyphs[i].unicode :
+ 0x110000 + extraglyphs++),
+ (long)glyphs[i].unicode, i);
printf("Width: %g\n", (double)(XSIZE * XPIX));
if (glyphs[i].flags & (MOS6|MOS4))
printf("Flags: W\n");
glyph_complement()
{
int const nrow = 16, ncol=12;
- int i, unicol = 32/nrow, col = -1, row = 0;
+ long unicol = 32/nrow;
+ int i, col = -1, row = 0;
int const nglyphs = sizeof(glyphs) / sizeof(glyphs[0]);
int npages = 0;
bool newcol = false;
newcol = true;
}
if (newcol && g->unicode != -1) {
- printf("gsave %d 0 translate (%03X) colnum grestore\n",
+ printf("gsave %d 0 translate (%03lX) colnum grestore\n",
col * 40, unicol);
newcol = false;
}
printf("gsave %d %d translate ",
(col * 40),
- -((g->unicode == -1 ? row++ : g->unicode%nrow) * 40));
+ (int)-((g->unicode == -1 ?
+ row++ : g->unicode % nrow) * 40));
if (g->unicode != -1)
- printf("(U+%04X)", g->unicode);
+ printf("(U+%04lX)", (long)g->unicode);
else
printf("()");
printf("/%s ", g->name);