summaryrefslogtreecommitdiff
path: root/audio/rio500/patches/patch-ad
blob: de74399870ba862e19030f229a5243536cdc082c (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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
$NetBSD: patch-ad,v 1.2 2000/08/22 15:40:12 dmcmahill Exp $

--- lib/libfon.c.orig	Tue Aug 22 14:54:21 2000
+++ lib/libfon.c	Tue Aug 22 14:54:35 2000
@@ -23,7 +23,7 @@
 #include "libfon.h"
 
 #ifdef WORDS_BIGENDIAN
-#include <byteswap.h>
+#include <machine/bswap.h>
 #endif
 
 struct fon_font *
@@ -61,9 +61,9 @@
 	fread (&MZ_hdr, sizeof (MZ_Header), 1, fp);
 
 #ifdef WORDS_BIGENDIAN
-	MZ_hdr.magic = bswap_16(MZ_hdr.magic);
-        MZ_hdr.dummy[29] = bswap_16(MZ_hdr.dummy[29]);
-	//MZ_hdr.ne_location = bswap_16(MZ_hdr.ne_location); 
+	MZ_hdr.magic = bswap16(MZ_hdr.magic);
+        MZ_hdr.dummy[29] = bswap16(MZ_hdr.dummy[29]);
+	//MZ_hdr.ne_location = bswap16(MZ_hdr.ne_location); 
 #endif
 
 /* ne_location is a 16bit quantity,l_e.  It appears fseek below wants 
@@ -82,15 +82,15 @@
 	fread (&NE_hdr, sizeof (NE_Header), 1, fp);
 	
 	#ifdef WORDS_BIGENDIAN
-	NE_hdr.magic = bswap_16(NE_hdr.magic);
-	NE_hdr.dummy1[15] = bswap_16(NE_hdr.dummy1[15]);
+	NE_hdr.magic = bswap16(NE_hdr.magic);
+	NE_hdr.dummy1[15] = bswap16(NE_hdr.dummy1[15]);
 	
-	//NE_hdr.nonres_name_length = bswap_16(NE_hdr.nonres_name_length);
+	//NE_hdr.nonres_name_length = bswap16(NE_hdr.nonres_name_length);
 	/* fseek seems to like l_e quantities */
 	
 	/* Ok . . I'm an idiot, nonres_name_start was 32bit, can use bswap */
 	
-	NE_hdr.nonres_name_start=bswap_32(NE_hdr.nonres_name_start);
+	NE_hdr.nonres_name_start=bswap32(NE_hdr.nonres_name_start);
 	#endif 
 	
 	if (NE_hdr.magic != NE_HEADER_MAGIC ) {
@@ -119,7 +119,7 @@
 	fread(&number_of_fonts, 2, 1, fp);
 	
 	#ifdef WORDS_BIGENDIAN
-	number_of_fonts = bswap_32(number_of_fonts);
+	number_of_fonts = bswap32(number_of_fonts);
 	#endif 
 	/* font info stored in 32bit 32bit 32bit l_e format for win fonts */
 	/* need to swap to use on ppc */
@@ -181,13 +181,13 @@
 	/* Do any sort of byte swapping necessary for big endian after reading data */
 
 	#ifdef WORDS_BIGENDIAN
-	font->Header[i].Windows_version = bswap_16(font->Header[i].Windows_version);
-	font->Header[i].Bytes_per_char_cell = bswap_16(font->Header[i].Bytes_per_char_cell);
-	font->Header[i].File_sizeH = bswap_16(font->Header[i].File_sizeH);
-	font->Header[i].File_sizeL = bswap_16(font->Header[i].File_sizeL);
-	font->Header[i].Nominal_point_size = bswap_16(font->Header[i].Nominal_point_size);
-	font->Header[i].Vertical_resolution = bswap_16(font->Header[i].Vertical_resolution);
-	font->Header[i].Horizontal_resolution = bswap_16(font->Header[i].Horizontal_resolution);
+	font->Header[i].Windows_version = bswap16(font->Header[i].Windows_version);
+	font->Header[i].Bytes_per_char_cell = bswap16(font->Header[i].Bytes_per_char_cell);
+	font->Header[i].File_sizeH = bswap16(font->Header[i].File_sizeH);
+	font->Header[i].File_sizeL = bswap16(font->Header[i].File_sizeL);
+	font->Header[i].Nominal_point_size = bswap16(font->Header[i].Nominal_point_size);
+	font->Header[i].Vertical_resolution = bswap16(font->Header[i].Vertical_resolution);
+	font->Header[i].Horizontal_resolution = bswap16(font->Header[i].Horizontal_resolution);
 	#endif
 
 	}
@@ -231,7 +231,7 @@
 		(void)fread(&bitmap_start_offset, 2, 1, fp);
 
 		#ifdef WORDS_BIGENDIAN
-		bitmap_start_offset = bswap_32(bitmap_start_offset);
+		bitmap_start_offset = bswap32(bitmap_start_offset);
 		#endif
 		
 		/* b_s_off comes out of .fon in l_e, need to convert */