bdf2sfd

BDF to SFD converter, allowing to vectorize bitmap fonts
Log | Files | Refs | README | LICENSE

commit 289a3d67d49017b1664936ea50cfc65ae48c22a3
parent 3cbf83c1e28e8156b11731ba4601ba53789380d7
Author: Frederic Cambus <fred@statdns.com>
Date:   Wed, 29 Jan 2020 23:33:55 +0100

Move variable declarations at the beginning of main().

Diffstat:
Msrc/bdftosfd.c | 29+++++++++++++++--------------
1 file changed, 15 insertions(+), 14 deletions(-)

diff --git a/src/bdftosfd.c b/src/bdftosfd.c @@ -59,6 +59,21 @@ displayUsage() int main(int argc, char *argv[]) { + bool readglyph = false; + char *token = NULL; + char *charname = NULL, *copyright = NULL, *name = NULL, *encoding = NULL, *version = NULL; + + char *value = NULL; + int32_t height = 0, width = 0; + int32_t ascent = 0, descent = 0; + + int32_t x = 0, y = 0; + uint32_t mask = 0; + int32_t xlength = 64, ylength = 64; /* Default values for 8x16 fonts */ + + struct fontinfo font; + memset(&font, 0, sizeof(struct fontinfo)); + if (pledge("stdio rpath", NULL) == -1) { err(EXIT_FAILURE, "pledge"); } @@ -106,20 +121,6 @@ main(int argc, char *argv[]) return EXIT_FAILURE; } - bool readglyph = false; - char *token = NULL; - char *charname = NULL, *copyright = NULL, *name = NULL, *encoding = NULL, *version = NULL; - - char *value = NULL; - int32_t height = 0, width = 0; - int32_t ascent = 0, descent = 0; - - int32_t x = 0, y = 0; - uint32_t mask = 0; - int32_t xlength = 64, ylength = 64; /* Default values for 8x16 fonts */ - - struct fontinfo font; - memset(&font, 0, sizeof(struct fontinfo)); while (fgets(lineBuffer, LINE_LENGTH_MAX, bdfFile)) { if (*lineBuffer) {