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. --- lscp.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lscp.c') diff --git a/lscp.c b/lscp.c index d27e88a..efe9d58 100644 --- a/lscp.c +++ b/lscp.c @@ -27,6 +27,13 @@ #include #include +#ifndef HASH +#define HASH "(undefined)" +#endif +#ifndef VERSION +#define VERSION "(undefined)" +#endif + /* FreeBSD: devel/libunistring */ #include @@ -36,9 +43,11 @@ int main(int aArgc, char **aArgv) { exit(EXIT_FAILURE); } if (aArgc != 3) { + fprintf(stderr, "%s version %s, hash %s\n", aArgv[0], VERSION, HASH); fprintf(stderr, "usage: %s start end\n", aArgv[0]); exit(EXIT_FAILURE); } + errno = 0; unsigned long start = strtoul(aArgv[1], NULL, 0); unsigned long end = strtoul(aArgv[2], NULL, 0); @@ -46,6 +55,7 @@ int main(int aArgc, char **aArgv) { fprintf(stderr, "could not convert arguments to integers\n"); exit(EXIT_FAILURE); } + for (unsigned long i = start; i < end; ++i) { char name[UNINAME_MAX + 1]; const char *const p = unicode_character_name((ucs4_t)i, name); -- cgit v1.2.3