From 1ba7b3a044045ea2aa91dd46acc3a1b4531a8bc1 Mon Sep 17 00:00:00 2001 From: Jens Schweikhardt Date: Sun, 31 Aug 2025 11:19:44 +0200 Subject: Replace renumber.pl with hextosrc.c. Improved TTF. * Introduce VERSION and HASH for utility programs. * Fontlint complained about the + in BDF U+1234 character names, so I changed them to U1234. --- txttopng.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'txttopng.c') diff --git a/txttopng.c b/txttopng.c index bac5900..22371ed 100644 --- a/txttopng.c +++ b/txttopng.c @@ -27,6 +27,13 @@ /* From libpng; on FreeBSD: /usr/ports/graphics/png. */ #include +#ifndef HASH +#define HASH "(undefined)" +#endif +#ifndef VERSION +#define VERSION "(undefined)" +#endif + /* Default option values. */ #define TextFilename "input.txt" #define FontFilename "jsgallant.hex" @@ -112,8 +119,12 @@ int main(int aArgc, char **aArgv) { // void parse_options(int aArgc, char **aArgv) { int ch; - while ((ch = getopt(aArgc, aArgv, "f:hip:T:t:")) != -1) { + while ((ch = getopt(aArgc, aArgv, "f:hip:T:t:V")) != -1) { switch (ch) { + case 'V': + printf("%s version %s, hash %s\n", aArgv[0], VERSION, HASH); + exit (EXIT_SUCCESS); + break; case 'f': gFontFilename = optarg; break; -- cgit v1.2.3