$NetBSD: patch-aw,v 1.1 2007/12/05 13:38:27 obache Exp $ --- lib/ferom.c.orig 2000-12-09 17:49:34.000000000 +0000 +++ lib/ferom.c @@ -30,6 +30,9 @@ #include #include +#include +#include +#include #include "mgl2.h" @@ -83,6 +86,7 @@ static struct romfont { }; #define ferom_font ((struct romfont *)(s->_pen_font.opt)) +#define ferom_font_p (s->_pen_font.opt) #define ferom_attr (s->_pen_font.attr) #define ferom_width (s->_pen_font.width) #define ferom_height (s->_pen_font.height) @@ -96,36 +100,36 @@ static void ferom_set_font(struct screen ferom_off = 0; switch (size) { case 12: - ferom_font = &romfont[0]; + ferom_font_p = &romfont[0]; ferom_width = ferom_height = 12; break; case 16: - ferom_font = &romfont[1]; + ferom_font_p = &romfont[1]; if (ferom_font->height == 0) { - ferom_font = &romfont[0]; + ferom_font_p = &romfont[0]; ferom_off = 2; } ferom_width = ferom_height = 16; break; case 24: - ferom_font = &romfont[2]; + ferom_font_p = &romfont[2]; if (ferom_font->height == 0) { - ferom_font = &romfont[0]; + ferom_font_p = &romfont[0]; ferom_off = 6; } ferom_width = ferom_height = 24; break; default: if (size == romfont[4].height) { - ferom_font = &romfont[4]; + ferom_font_p = &romfont[4]; ferom_width = ferom_font->width; ferom_height = ferom_font->height; } else if ( size == romfont[5].height) { - ferom_font = &romfont[5]; + ferom_font_p = &romfont[5]; ferom_width = ferom_font->width; ferom_height = ferom_font->height; } else { - ferom_font = &romfont[0]; + ferom_font_p = &romfont[0]; ferom_width = ferom_font->width; ferom_height = ferom_font->height; }