On Fri, Jul 17, 2020 at 11:04:07AM +0100, Stuart Henderson wrote: > Seems useful. While it's not especially likely anyone is parsing the output > of this, just in case they are it's usually more admin-friendly to add a new > column at the end unless there's a good reason not to.
Good point, here is a revised diff adding the new column at the end, and the new output as follow: # Name Encoding W H Chars 0 Boldface ibm 8 16 254 1 Spleen 6x12 iso 6 12 96 2 Spleen 8x16 iso 8 16 224 3 Spleen 12x24 iso 12 24 224 4 Spleen 16x32 iso 16 32 224 5 Spleen 32x64 iso 32 64 224 Comments? OK? Index: usr.sbin/wsfontload/wsfontload.c =================================================================== RCS file: /cvs/src/usr.sbin/wsfontload/wsfontload.c,v retrieving revision 1.21 diff -u -p -r1.21 wsfontload.c --- usr.sbin/wsfontload/wsfontload.c 28 Jun 2019 13:32:51 -0000 1.21 +++ usr.sbin/wsfontload/wsfontload.c 20 Jul 2020 11:41:32 -0000 @@ -141,7 +141,8 @@ main(int argc, char *argv[]) if (list) { i = 0; - p = " # Name Encoding W H"; + p = " # Name Encoding" \ + " W H Chars"; do { f.index = i; res = ioctl(wsfd, WSDISPLAYIO_LSFONT, &f); @@ -151,10 +152,11 @@ main(int argc, char *argv[]) puts(p); p = NULL; } - printf("%2d %-32s %8s %2d %2d\n", + printf("%2d %-32s %8s %2d %2d %8d\n", f.index, f.name, encodings[f.encoding].name, - f.fontwidth, f.fontheight); + f.fontwidth, f.fontheight, + f.numchars); } } i++;