logo

oasis

Own branch of Oasis Linux (upstream: <https://git.sr.ht/~mcf/oasis/>) git clone https://anongit.hacktivis.me/git/oasis.git
commit: 858cfd217f4db2613550379898561a41bc34e741
parent c51f2d5f6296b99641332f81d40a347d724f533c
Author: Michael Forney <mforney@mforney.org>
Date:   Tue,  5 Mar 2019 23:10:03 -0800

terminus-font: Simplify ucstoany.awk slightly

Diffstat:

Mpkg/terminus-font/ucstoany.awk23+++++++++--------------
1 file changed, 9 insertions(+), 14 deletions(-)

diff --git a/pkg/terminus-font/ucstoany.awk b/pkg/terminus-font/ucstoany.awk @@ -33,23 +33,18 @@ END { while (getline < font) { if ($1 == "STARTCHAR") { readchar() - break + continue } - if ($1 == "CHARS") + if ($1 == "CHARS") { $2 = unimap_len - else if ($1 == "FONT") + } else if ($1 == "FONT") { sub(/-[^-]*-[^-]*$/, "-" charset, $2) + } else if ($1 == "ENDFONT") { + for (i = 0; i < unimap_len; ++i) { + encoding = unimap[i] + printchar(i >= 32 ? encoding : i, encoding) + } + } print } - while (getline < font) { - if ($1 == "STARTCHAR") - readchar() - else - tail = tail $0 "\n" - } - for (i = 0; i < unimap_len; ++i) { - encoding = unimap[i] - printchar(i >= 32 ? encoding : i, encoding) - } - printf "%s", tail }