diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2022-09-10 10:37:23 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2022-09-10 10:37:23 -0700 |
commit | f82c0ee2d491b700bb8ae38dea3cf711e6bfb176 (patch) | |
tree | d73bc90af04d54257e6445c0a53edfad6db61d67 /chars.c | |
parent | 2325f84273ac846fdfc89f4655c21fd3b89da2bc (diff) |
Reduce scope of some variables
No difference seen in elf binary
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'chars.c')
-rw-r--r-- | chars.c | 11 |
1 files changed, 4 insertions, 7 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 + |