diff options
-rw-r--r-- | chars.c | 11 | ||||
-rw-r--r-- | header.c | 9 |
2 files changed, 7 insertions, 13 deletions
@@ -76,7 +76,6 @@ EmitBitmap(FILE *outFile, unsigned char *data) { char *glyphName; - unsigned int row; /*- * format: @@ -118,7 +117,7 @@ EmitBitmap(FILE *outFile, * emit the bitmap */ fprintf(outFile, "BITMAP\n"); - for (row = 0; row < (charInfo->ascent + charInfo->descent); row++) { + for (unsigned row = 0; row < (charInfo->ascent + charInfo->descent); row++) { unsigned byte; unsigned bit; @@ -151,7 +150,6 @@ EmitCharacters(FILE *outFile, { FSXCharInfo *extents; FSXCharInfo *charInfo; - unsigned int encoding; FSOffset *offsets; unsigned char *glyph; unsigned char *glyphs; @@ -196,11 +194,10 @@ EmitCharacters(FILE *outFile, glyph = glyphs; for (chHigh = firstCharHigh; chHigh <= lastCharHigh; chHigh++) { for (chLow = firstCharLow; chLow <= lastCharLow; chLow++) { - int bpr; + int bpr = GLWIDTHBYTESPADDED((charInfo->right - charInfo->left), + SCANLINE_PAD_BYTES); + unsigned int encoding = (chHigh << 8) + chLow; - bpr = GLWIDTHBYTESPADDED((charInfo->right - charInfo->left), - SCANLINE_PAD_BYTES); - encoding = (chHigh << 8) + chLow; if ((charInfo->width != 0) || (charInfo->right != charInfo->left)) EmitBitmap(outFile, fontHeader, charInfo, encoding, bpr, glyph); glyph = glyphs + @@ -72,11 +72,10 @@ FindStringProperty(const char *propName, { FSPropOffset *propOffset; unsigned int length; - unsigned int i; propOffset = &propOffsets[0]; length = (unsigned int) strlen(propName); - for (i = propInfo->num_offsets; i--; propOffset++) { + for (unsigned int i = propInfo->num_offsets; i--; propOffset++) { if (propOffset->type == PropTypeString) { #ifdef DEBUG @@ -109,12 +108,11 @@ FindNumberProperty(const char *propName, unsigned char *propData) { FSPropOffset *propOffset; - unsigned int i; unsigned int length; propOffset = &propOffsets[0]; length = (unsigned int) strlen(propName); - for (i = propInfo->num_offsets; i--; propOffset++) { + for (unsigned int i = propInfo->num_offsets; i--; propOffset++) { if ((propOffset->type == PropTypeSigned) || (propOffset->type == PropTypeUnsigned)) { if ((propOffset->name.length == length) && @@ -142,7 +140,6 @@ EmitHeader(FILE *outFile, unsigned int len; int type; char *cp; - const char **cpp; unsigned long xResolution; fprintf(outFile, "STARTFONT 2.1\n"); @@ -156,7 +153,7 @@ EmitHeader(FILE *outFile, fwrite(cp, 1, len, outFile); fputc('\n', outFile); } - for (cpp = warning; *cpp; cpp++) + for (const char **cpp = warning; *cpp; cpp++) fprintf(outFile, "%s\n", *cpp); /* |