Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/bebox Constify, shadow resolution and some volatile...
details: https://anonhg.NetBSD.org/src/rev/b5ea042169dd
branches: trunk
changeset: 581929:b5ea042169dd
user: jmc <jmc%NetBSD.org@localhost>
date: Fri Jun 10 16:41:38 2005 +0000
description:
Constify, shadow resolution and some volatile casts
diffstat:
sys/arch/bebox/bebox/extintr.c | 10 +++++-----
sys/arch/bebox/isa/isaclock.c | 10 +++++-----
sys/arch/bebox/isa/pccons.c | 21 +++++++++++----------
3 files changed, 21 insertions(+), 20 deletions(-)
diffs (158 lines):
diff -r 450735553cae -r b5ea042169dd sys/arch/bebox/bebox/extintr.c
--- a/sys/arch/bebox/bebox/extintr.c Fri Jun 10 16:07:45 2005 +0000
+++ b/sys/arch/bebox/bebox/extintr.c Fri Jun 10 16:41:38 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: extintr.c,v 1.21 2004/03/13 07:05:54 jmc Exp $ */
+/* $NetBSD: extintr.c,v 1.22 2005/06/10 16:41:38 jmc Exp $ */
/* $OpenBSD: isabus.c,v 1.1 1997/10/11 11:53:00 pefo Exp $ */
/*-
@@ -74,7 +74,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: extintr.c,v 1.21 2004/03/13 07:05:54 jmc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: extintr.c,v 1.22 2005/06/10 16:41:38 jmc Exp $");
#include <sys/param.h>
#include <sys/malloc.h>
@@ -217,14 +217,14 @@
}
void
-bebox_intr_mask(imen)
- int imen;
+bebox_intr_mask(in)
+ int in;
{
int i;
int mask = 0;
for (i = 0; i < BEBOX_INTR_SIZE; i++)
- if (!(imen & (1 << (i + BEBOX_ISA_INTR))))
+ if (!(in & (1 << (i + BEBOX_ISA_INTR))))
mask |= bebox_intr_map[i];
*(unsigned int *)(bebox_mb_reg + CPU0_INT_MASK) = BEBOX_INTR_MASK;
diff -r 450735553cae -r b5ea042169dd sys/arch/bebox/isa/isaclock.c
--- a/sys/arch/bebox/isa/isaclock.c Fri Jun 10 16:07:45 2005 +0000
+++ b/sys/arch/bebox/isa/isaclock.c Fri Jun 10 16:41:38 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: isaclock.c,v 1.10 2003/08/07 16:27:10 agc Exp $ */
+/* $NetBSD: isaclock.c,v 1.11 2005/06/10 16:41:38 jmc Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -121,7 +121,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: isaclock.c,v 1.10 2003/08/07 16:27:10 agc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isaclock.c,v 1.11 2005/06/10 16:41:38 jmc Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -293,7 +293,7 @@
{
mc_todregs rtclk;
time_t n;
- int sec, min, hr, dom, mon, yr;
+ int sec, mn, hr, dom, mon, yr;
int i, days = 0;
int s;
@@ -320,14 +320,14 @@
splx(s);
sec = hexdectodec(rtclk[MC_SEC]);
- min = hexdectodec(rtclk[MC_MIN]);
+ mn = hexdectodec(rtclk[MC_MIN]);
hr = hexdectodec(rtclk[MC_HOUR]);
dom = hexdectodec(rtclk[MC_DOM]);
mon = hexdectodec(rtclk[MC_MONTH]);
yr = hexdectodec(rtclk[MC_YEAR]);
yr = (yr < 70) ? yr+100 : yr;
- n = sec + 60 * min + 3600 * hr;
+ n = sec + 60 * mn + 3600 * hr;
n += (dom - 1) * 3600 * 24;
if (yeartoday(yr) == 366)
diff -r 450735553cae -r b5ea042169dd sys/arch/bebox/isa/pccons.c
--- a/sys/arch/bebox/isa/pccons.c Fri Jun 10 16:07:45 2005 +0000
+++ b/sys/arch/bebox/isa/pccons.c Fri Jun 10 16:41:38 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pccons.c,v 1.33 2004/03/13 17:31:33 bjh21 Exp $ */
+/* $NetBSD: pccons.c,v 1.34 2005/06/10 16:41:48 jmc Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -79,7 +79,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pccons.c,v 1.33 2004/03/13 17:31:33 bjh21 Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pccons.c,v 1.34 2005/06/10 16:41:48 jmc Exp $");
#include "opt_ddb.h"
#include "opt_xserver.h"
@@ -274,7 +274,7 @@
char *sget __P((void));
#endif
char *strans __P((u_char));
-void sput __P((u_char *, int));
+void sput __P((const u_char *, int));
#ifdef XSERVER
void pc_xmode_on __P((void));
void pc_xmode_off __P((void));
@@ -401,9 +401,9 @@
* Pass command to keyboard itself
*/
int
-kbd_cmd(val, polling)
+kbd_cmd(val, do_polling)
u_char val;
- u_char polling;
+ u_char do_polling;
{
u_int retries = 3;
register u_int i;
@@ -413,7 +413,7 @@
return (0);
ack = nak = 0;
isa_outb(IO_KBD + KBOUTP, val);
- if (polling)
+ if (do_polling)
for (i = 100000; i; i--) {
if (isa_inb(IO_KBD + KBSTATP) & KBS_DIB) {
register u_char c;
@@ -1302,8 +1302,8 @@
cursor_shape = 0x0012;
#endif
- Crtat = (u_short *)cp;
- crtat = (u_short *)(cp + cursorat);
+ Crtat = __UNVOLATILE(cp);
+ crtat = (u_short*)(__UNVOLATILE(cp)) + cursorat;
vs.ncol = COL;
vs.nrow = ROW;
@@ -1319,7 +1319,8 @@
}
#define wrtchar(c, at) do {\
- char *cp = (char *)crtat; *cp++ = (c); *cp = (at); crtat++; vs.col++; \
+ char *_cp = (char *)crtat; *_cp++ = (c); *_cp = (at); crtat++; \
+ vs.col++; \
} while (0)
/* translate ANSI color codes to standard pc ones */
@@ -1360,7 +1361,7 @@
*/
void
sput(cp, n)
- u_char *cp;
+ const u_char *cp;
int n;
{
u_char c, scroll = 0;
Home |
Main Index |
Thread Index |
Old Index