Index: head/tools/tools/vt/setfont/setfont.c =================================================================== --- head/tools/tools/vt/setfont/setfont.c (revision 297162) +++ head/tools/tools/vt/setfont/setfont.c (nonexistent) @@ -1,89 +0,0 @@ -#include -__FBSDID("$FreeBSD$"); - -#include -#include -#include -#include - -#include -#include -#include -#include - -struct file_header { - uint8_t magic[8]; - uint8_t width; - uint8_t height; - uint16_t pad; - uint32_t glyph_count; - uint32_t map_count[4]; -} __packed; - -static vfnt_map_t * -load_mappingtable(unsigned int nmappings) -{ - vfnt_map_t *t; - unsigned int i; - - if (nmappings == 0) - return (NULL); - - t = malloc(sizeof *t * nmappings); - - if (fread(t, sizeof *t * nmappings, 1, stdin) != 1) { - perror("mappings"); - exit(1); - } - - for (i = 0; i < nmappings; i++) { - t[i].src = be32toh(t[i].src); - t[i].dst = be16toh(t[i].dst); - t[i].len = be16toh(t[i].len); - } - - return (t); -} - -int -main(int argc __unused, char *argv[] __unused) -{ - struct file_header fh; - static vfnt_t vfnt; - size_t glyphsize; - unsigned int i; - - if (fread(&fh, sizeof fh, 1, stdin) != 1) { - perror("file_header"); - return (1); - } - - if (memcmp(fh.magic, "VFNT0002", 8) != 0) { - fprintf(stderr, "Bad magic\n"); - return (1); - } - - for (i = 0; i < VFNT_MAPS; i++) - vfnt.map_count[i] = be32toh(fh.map_count[i]); - vfnt.glyph_count = be32toh(fh.glyph_count); - vfnt.width = fh.width; - vfnt.height = fh.height; - - glyphsize = howmany(vfnt.width, 8) * vfnt.height * vfnt.glyph_count; - vfnt.glyphs = malloc(glyphsize); - - if (fread(vfnt.glyphs, glyphsize, 1, stdin) != 1) { - perror("glyphs"); - return (1); - } - - for (i = 0; i < VFNT_MAPS; i++) - vfnt.map[i] = load_mappingtable(vfnt.map_count[i]); - - if (ioctl(STDOUT_FILENO, PIO_VFONT, &vfnt) == -1) { - perror("PIO_VFONT"); - return (1); - } - - return (0); -} Property changes on: head/tools/tools/vt/setfont/setfont.c ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/tools/tools/vt/setfont/Makefile =================================================================== --- head/tools/tools/vt/setfont/Makefile (revision 297162) +++ head/tools/tools/vt/setfont/Makefile (nonexistent) @@ -1,6 +0,0 @@ -PROG= setfont -MAN1= - -WARNS?= 6 - -.include Property changes on: head/tools/tools/vt/setfont/Makefile ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property