2 * loadfont - load ascii font (for NetBSD/X680x0)
3 * from: amiga/stand/loadkmap/loadkmap.c
4 * Copyright 1993 by Masaru Oki
6 * $NetBSD: loadfont.c,v 1.6 2005/12/11 12:19:45 christos Exp $
10 __RCSID("$NetBSD: loadfont.c,v 1.6 2005/12/11 12:19:45 christos Exp $");
15 #include <sys/ioctl.h>
16 #define ITEKANJI 1 /* XXX */
17 #include <machine/iteioctl.h>
19 void load_font(const char *);
22 main(int argc
, char *argv
[])
26 fprintf(stderr
, "Usage: %s fontfile\n", argv
[0]);
35 load_font(const char *file
)
37 unsigned char buf
[4096];
40 if ((fd
= open(file
, O_RDONLY
)) >= 0) {
41 if (read (fd
, buf
, sizeof(buf
)) == sizeof (buf
)) {
42 if (ioctl(0, ITELOADFONT
, buf
) == 0)
45 perror("ITELOADFONT");