summaryrefslogtreecommitdiff
path: root/graphics/mgl/patches/patch-aw
blob: 0a3c9694452dae08bb93197f399ba82b4b09455f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
$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 <sys/types.h>
 #include <sys/mman.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
 
 #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;
 		}