Sun Mar 15 21:29:15 2009 UTC ()
ansify function definitions


(cegger)
diff -r1.10 -r1.11 src/sys/dev/rasops/rasops_bitops.h

cvs diff -r1.10 -r1.11 src/sys/dev/rasops/rasops_bitops.h (expand / switch to unified diff)

--- src/sys/dev/rasops/rasops_bitops.h 2008/04/28 20:23:56 1.10
+++ src/sys/dev/rasops/rasops_bitops.h 2009/03/15 21:29:15 1.11
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: rasops_bitops.h,v 1.10 2008/04/28 20:23:56 martin Exp $ */ 1/* $NetBSD: rasops_bitops.h,v 1.11 2009/03/15 21:29:15 cegger Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 1999 The NetBSD Foundation, Inc. 4 * Copyright (c) 1999 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Andrew Doran. 8 * by Andrew Doran.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -26,30 +26,27 @@ @@ -26,30 +26,27 @@
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE. 29 * POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32#ifndef _RASOPS_BITOPS_H_ 32#ifndef _RASOPS_BITOPS_H_
33#define _RASOPS_BITOPS_H_ 1 33#define _RASOPS_BITOPS_H_ 1
34 34
35/* 35/*
36 * Erase columns. 36 * Erase columns.
37 */ 37 */
38static void 38static void
39NAME(erasecols)(cookie, row, col, num, attr) 39NAME(erasecols)(void *cookie, int row, int col, int num, long attr)
40 void *cookie; 
41 int row, col, num; 
42 long attr; 
43{ 40{
44 int lmask, rmask, lclr, rclr, clr; 41 int lmask, rmask, lclr, rclr, clr;
45 struct rasops_info *ri; 42 struct rasops_info *ri;
46 int32_t *dp, *rp; 43 int32_t *dp, *rp;
47 int height, cnt; 44 int height, cnt;
48 45
49 ri = (struct rasops_info *)cookie; 46 ri = (struct rasops_info *)cookie;
50 47
51#ifdef RASOPS_CLIPPING 48#ifdef RASOPS_CLIPPING
52 if ((unsigned)row >= (unsigned)ri->ri_rows) 49 if ((unsigned)row >= (unsigned)ri->ri_rows)
53 return; 50 return;
54 51
55 if (col < 0) { 52 if (col < 0) {
@@ -103,28 +100,27 @@ NAME(erasecols)(cookie, row, col, num, a @@ -103,28 +100,27 @@ NAME(erasecols)(cookie, row, col, num, a
103 for (cnt = num; cnt > 0; cnt--) 100 for (cnt = num; cnt > 0; cnt--)
104 *dp++ = clr; 101 *dp++ = clr;
105 102
106 if (rmask) 103 if (rmask)
107 *dp = (*dp & rmask) | rclr; 104 *dp = (*dp & rmask) | rclr;
108 } 105 }
109 } 106 }
110} 107}
111 108
112/* 109/*
113 * Actually paint the cursor. 110 * Actually paint the cursor.
114 */ 111 */
115static void 112static void
116NAME(do_cursor)(ri) 113NAME(do_cursor)(struct rasops_info *ri)
117 struct rasops_info *ri; 
118{ 114{
119 int lmask, rmask, height, row, col, num; 115 int lmask, rmask, height, row, col, num;
120 int32_t *dp, *rp; 116 int32_t *dp, *rp;
121 117
122 row = ri->ri_crow; 118 row = ri->ri_crow;
123 col = ri->ri_ccol * ri->ri_font->fontwidth << PIXEL_SHIFT; 119 col = ri->ri_ccol * ri->ri_font->fontwidth << PIXEL_SHIFT;
124 height = ri->ri_font->fontheight; 120 height = ri->ri_font->fontheight;
125 num = ri->ri_font->fontwidth << PIXEL_SHIFT; 121 num = ri->ri_font->fontwidth << PIXEL_SHIFT;
126 rp = (int32_t *)(ri->ri_bits + row * ri->ri_yscale + ((col >> 3) & ~3)); 122 rp = (int32_t *)(ri->ri_bits + row * ri->ri_yscale + ((col >> 3) & ~3));
127 123
128 if ((col & 31) + num <= 32) { 124 if ((col & 31) + num <= 32) {
129 lmask = rasops_pmask[col & 31][num]; 125 lmask = rasops_pmask[col & 31][num];
130 126
@@ -144,29 +140,27 @@ NAME(do_cursor)(ri) @@ -144,29 +140,27 @@ NAME(do_cursor)(ri)
144 if (lmask != -1) 140 if (lmask != -1)
145 *dp++ ^= lmask; 141 *dp++ ^= lmask;
146 142
147 if (rmask != -1) 143 if (rmask != -1)
148 *dp ^= rmask; 144 *dp ^= rmask;
149 } 145 }
150 } 146 }
151} 147}
152 148
153/* 149/*
154 * Copy columns. Ick! 150 * Copy columns. Ick!
155 */ 151 */
156static void 152static void
157NAME(copycols)(cookie, row, src, dst, num) 153NAME(copycols)(void *cookie, int row, int src, int dst, int num)
158 void *cookie; 
159 int row, src, dst, num; 
160{ 154{
161 int tmp, lmask, rmask, height, lnum, rnum, sb, db, cnt, full; 155 int tmp, lmask, rmask, height, lnum, rnum, sb, db, cnt, full;
162 int32_t *sp, *dp, *srp, *drp; 156 int32_t *sp, *dp, *srp, *drp;
163 struct rasops_info *ri; 157 struct rasops_info *ri;
164 158
165 sp = NULL; /* XXX gcc */ 159 sp = NULL; /* XXX gcc */
166 160
167 ri = (struct rasops_info *)cookie; 161 ri = (struct rasops_info *)cookie;
168 162
169#ifdef RASOPS_CLIPPING 163#ifdef RASOPS_CLIPPING
170 if (dst == src) 164 if (dst == src)
171 return; 165 return;
172 166