summaryrefslogtreecommitdiff
path: root/sys/arch/atari/dev
diff options
context:
space:
mode:
authorleo <leo@NetBSD.org>1996-02-22 10:10:44 +0000
committerleo <leo@NetBSD.org>1996-02-22 10:10:44 +0000
commitc9dfd5cb44e0e2730a3cff5fcb89ad1928856d2d (patch)
treee4c1e4810cb1a3bbb93edecb0c9f41a8924a6c84 /sys/arch/atari/dev
parentc86505a6a5873985ccbd9bd77760c2e0cb1e2ac8 (diff)
First bunch of changes due to stricter prototype checking.
Diffstat (limited to 'sys/arch/atari/dev')
-rw-r--r--sys/arch/atari/dev/clock.c18
-rw-r--r--sys/arch/atari/dev/dma.c43
-rw-r--r--sys/arch/atari/dev/fd.c62
-rw-r--r--sys/arch/atari/dev/grf.c16
-rw-r--r--sys/arch/atari/dev/grfabs_tt.c6
-rw-r--r--sys/arch/atari/dev/grfvar.h20
-rw-r--r--sys/arch/atari/dev/ite.c70
-rw-r--r--sys/arch/atari/dev/ite_cc.c18
-rw-r--r--sys/arch/atari/dev/itevar.h4
-rw-r--r--sys/arch/atari/dev/kbd.c18
-rw-r--r--sys/arch/atari/dev/view.c7
-rw-r--r--sys/arch/atari/dev/zs.c13
12 files changed, 170 insertions, 125 deletions
diff --git a/sys/arch/atari/dev/clock.c b/sys/arch/atari/dev/clock.c
index 3a89de52dc9..71b6266b6c3 100644
--- a/sys/arch/atari/dev/clock.c
+++ b/sys/arch/atari/dev/clock.c
@@ -1,4 +1,4 @@
-/* $NetBSD: clock.c,v 1.8 1996/02/11 12:42:19 leo Exp $ */
+/* $NetBSD: clock.c,v 1.9 1996/02/22 10:11:19 leo Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -44,7 +44,9 @@
#include <sys/param.h>
#include <sys/kernel.h>
+#include <sys/systm.h>
#include <sys/device.h>
+#include <sys/cpu.h>
#include <machine/psl.h>
#include <machine/cpu.h>
#include <machine/iomap.h>
@@ -79,6 +81,8 @@ struct cfdriver clockcd = {
DV_DULL, sizeof(struct device), NULL, 0
};
+void statintr __P((struct clockframe *));
+
static u_long gettod __P((void));
static int settod __P((u_long));
@@ -177,6 +181,7 @@ void cpu_initclocks()
#endif /* STATCLOCK */
}
+void
setstatclockrate(newhz)
int newhz;
{
@@ -216,6 +221,7 @@ statintr(frame)
* Returns number of usec since last recorded clock "tick"
* (i.e. clock interrupt).
*/
+long
clkread()
{
u_int delta;
@@ -338,6 +344,7 @@ u_int regno, value;
* Initialize the time of day register, based on the time base which is, e.g.
* from a filesystem.
*/
+void
inittodr(base)
time_t base;
{
@@ -354,6 +361,7 @@ time_t base;
time.tv_sec = timbuf;
}
+void
resettodr()
{
if(settod(time.tv_sec) == 1)
@@ -383,17 +391,17 @@ gettod()
MC146818_GETTOD(RTC, &clkregs);
splx(sps);
- if(range_test(clkregs[MC_SEC], 0, 59))
+ if(clkregs[MC_SEC] > 59)
return(0);
- if(range_test(clkregs[MC_MIN], 0, 59))
+ if(clkregs[MC_MIN] > 59)
return(0);
- if(range_test(clkregs[MC_HOUR], 0, 23))
+ if(clkregs[MC_HOUR] > 23)
return(0);
if(range_test(clkregs[MC_DOM], 1, 31))
return(0);
if (range_test(clkregs[MC_MONTH], 1, 12))
return(0);
- if(range_test(clkregs[MC_YEAR], 0, 2000 - GEMSTARTOFTIME))
+ if(clkregs[MC_YEAR] > (2000 - GEMSTARTOFTIME))
return(0);
clkregs[MC_YEAR] += GEMSTARTOFTIME;
diff --git a/sys/arch/atari/dev/dma.c b/sys/arch/atari/dev/dma.c
index decad0ce889..e3cd8f93554 100644
--- a/sys/arch/atari/dev/dma.c
+++ b/sys/arch/atari/dev/dma.c
@@ -1,4 +1,4 @@
-/* $NetBSD: dma.c,v 1.5 1995/11/06 21:13:38 leo Exp $ */
+/* $NetBSD: dma.c,v 1.6 1996/02/22 10:11:20 leo Exp $ */
/*
* Copyright (c) 1995 Leo Weppelman.
@@ -62,10 +62,10 @@
#define NDMA_DEV 10 /* Max 2 floppy's, 8 hard-disks */
typedef struct dma_entry {
TAILQ_ENTRY(dma_entry) entries; /* List pointers */
- void (*call_func)(); /* Call when lock granted */
- void (*int_func)(); /* Call on DMA interrupt */
- void *softc; /* Arg. to int_func */
- int *lock_stat; /* status of DMA lock */
+ void (*call_func)(void *); /* Call when lock granted */
+ void (*int_func)(void *); /* Call on DMA interrupt */
+ void *softc; /* Arg. to int_func */
+ int *lock_stat; /* status of DMA lock */
} DMA_ENTRY;
/*
@@ -82,10 +82,14 @@ static TAILQ_HEAD(acthead, dma_entry) dma_active;
static int must_init = 1; /* Must initialize */
+void cdmaint __P((int));
+
+long sr; /* sr at time of interrupt */
static void cdmasoft __P((void));
static void init_queues __P((void));
-static void init_queues()
+static void
+init_queues()
{
int i;
@@ -96,12 +100,13 @@ static void init_queues()
TAILQ_INSERT_HEAD(&dma_free, &dmatable[i], entries);
}
-int st_dmagrab(int_func, call_func, softc, lock_stat, rcaller)
-void (*int_func)();
-void (*call_func)();
-void *softc;
-int *lock_stat;
-int rcaller;
+int
+st_dmagrab(int_func, call_func, softc, lock_stat, rcaller)
+dma_farg int_func;
+dma_farg call_func;
+void *softc;
+int *lock_stat;
+int rcaller;
{
int sps;
DMA_ENTRY *req;
@@ -193,8 +198,9 @@ st_dmawanted()
return(dma_active.tqh_first->entries.tqe_next != NULL);
}
+void
cdmaint(sr)
-long sr; /* sr at time of interrupt */
+int sr; /* sr at time of interrupt */
{
if(dma_active.tqh_first != NULL) {
if(!BASEPRI(sr)) {
@@ -209,11 +215,12 @@ long sr; /* sr at time of interrupt */
else printf("DMA interrupt discarded\n");
}
-static void cdmasoft()
+static void
+cdmasoft()
{
- int s;
- void (*int_func)();
- void *softc;
+ int s;
+ dma_farg int_func;
+ void *softc;
/*
* Prevent a race condition here. DMA might be freed while
@@ -225,7 +232,7 @@ static void cdmasoft()
int_func = dma_active.tqh_first->int_func;
softc = dma_active.tqh_first->softc;
}
- else int_func = NULL;
+ else int_func = softc = NULL;
splx(s);
if(int_func != NULL)
diff --git a/sys/arch/atari/dev/fd.c b/sys/arch/atari/dev/fd.c
index f55be39fcb8..970e45bef17 100644
--- a/sys/arch/atari/dev/fd.c
+++ b/sys/arch/atari/dev/fd.c
@@ -1,4 +1,4 @@
-/* $NetBSD: fd.c,v 1.14 1996/02/02 18:05:52 mycroft Exp $ */
+/* $NetBSD: fd.c,v 1.15 1996/02/22 10:11:21 leo Exp $ */
/*
* Copyright (c) 1995 Leo Weppelman.
@@ -53,6 +53,7 @@
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/buf.h>
+#include <sys/proc.h>
#include <sys/device.h>
#include <sys/ioctl.h>
#include <sys/fcntl.h>
@@ -172,6 +173,17 @@ struct fd_types {
typedef void (*FPV)();
/*
+ * {b,c}devsw[] function prototypes
+ */
+dev_type_open(Fdopen);
+dev_type_close(fdclose);
+dev_type_read(fdread);
+dev_type_write(fdwrite);
+dev_type_ioctl(fdioctl);
+dev_type_size(fdsize);
+dev_type_dump(fddump);
+
+/*
* Private drive functions....
*/
static void fdstart __P((struct fd_softc *));
@@ -236,8 +248,9 @@ void *auxp;
extern struct cfdriver fdcd;
struct fd_softc fdsoftc;
- int i, nfound, first_found = 0;
+ int i, nfound, first_found;
+ nfound = first_found = 0;
printf("\n");
fddeselect();
for(i = 0; i < NR_DRIVES; i++) {
@@ -247,7 +260,8 @@ void *auxp;
*/
fdsoftc.unit = i;
fdsoftc.flags = 0;
- st_dmagrab(fdcint, fdtestdrv, &fdsoftc, &lock_stat, 0);
+ st_dmagrab((dma_farg)fdcint, (dma_farg)fdtestdrv, &fdsoftc,
+ &lock_stat, 0);
st_dmafree(&fdsoftc, &lock_stat);
if(!(fdsoftc.flags & FLPF_NOTRESP)) {
@@ -301,7 +315,6 @@ struct device *pdp;
struct cfdata *cfp;
void *auxp;
{
- int unit = (int)auxp;
return(1);
}
@@ -324,6 +337,7 @@ void *auxp;
disk_attach(&sc->dkdev);
}
+int
fdioctl(dev, cmd, addr, flag, p)
dev_t dev;
u_long cmd;
@@ -332,7 +346,6 @@ caddr_t addr;
struct proc *p;
{
struct fd_softc *sc;
- void *data;
sc = getsoftc(fdcd, DISKUNIT(dev));
@@ -358,9 +371,8 @@ struct proc *p;
case DIOCWDINFO:
case DIOCWLABEL:
#endif /* notyet */
- default:
- return(ENOTTY);
}
+ return(ENOTTY);
}
/*
@@ -371,6 +383,7 @@ struct proc *p;
* partition 0: 360Kb
* partition 1: 780Kb
*/
+int
Fdopen(dev, flags, devtype, proc)
dev_t dev;
int flags, devtype;
@@ -437,7 +450,8 @@ struct proc *proc;
*/
sc->flags |= FLPF_INOPEN|FLPF_GETSTAT;
sps = splbio();
- st_dmagrab(fdcint, fdstatus, sc, &lock_stat, 0);
+ st_dmagrab((dma_farg)fdcint, (dma_farg)fdstatus, sc,
+ &lock_stat, 0);
while(sc->flags & FLPF_GETSTAT)
tsleep((caddr_t)sc, PRIBIO, "Fdopen", 0);
splx(sps);
@@ -466,8 +480,10 @@ struct proc *proc;
#ifdef FLP_DEBUG
printf("Fdopen open succeeded on type %d\n", sc->part);
#endif
+ return (0);
}
+int
fdclose(dev, flags, devtype, proc)
dev_t dev;
int flags, devtype;
@@ -492,7 +508,7 @@ struct buf *bp;
{
struct fd_softc *sc;
struct disklabel *lp;
- int sps, nblocks;
+ int sps;
sc = getsoftc(fdcd, DISKUNIT(bp->b_dev));
@@ -523,7 +539,8 @@ struct buf *bp;
if (fd_state & FLP_MON)
untimeout((FPV)fdmotoroff, (void*)sc);
fd_state = FLP_IDLE;
- st_dmagrab(fdcint, fdstart, sc, &lock_stat, 0);
+ st_dmagrab((dma_farg)fdcint, (dma_farg)fdstart, sc,
+ &lock_stat, 0);
}
splx(sps);
@@ -539,7 +556,11 @@ done:
* no dumps to floppy disks thank you.
*/
int
-fddump(dev_t dev)
+fddump(dev, blkno, va, size)
+dev_t dev;
+daddr_t blkno;
+caddr_t va;
+size_t size;
{
return(ENXIO);
}
@@ -555,17 +576,19 @@ dev_t dev;
}
int
-fdread(dev, uio)
+fdread(dev, uio, flags)
dev_t dev;
struct uio *uio;
+int flags;
{
return(physio(fdstrategy, NULL, dev, B_READ, fdminphys, uio));
}
int
-fdwrite(dev, uio)
+fdwrite(dev, uio, flags)
dev_t dev;
struct uio *uio;
+int flags;
{
return(physio(fdstrategy, NULL, dev, B_WRITE, fdminphys, uio));
}
@@ -679,7 +702,7 @@ register struct fd_softc *sc;
#ifdef FLP_DEBUG
printf("fddone: Staring job on unit %d\n", sc1->unit);
#endif
- st_dmagrab(fdcint, fdstart, sc1, &lock_stat, 0);
+ st_dmagrab((dma_farg)fdcint, (dma_farg)fdstart, sc1, &lock_stat, 0);
}
static int
@@ -749,11 +772,11 @@ static void
fd_xfer(sc)
struct fd_softc *sc;
{
- register int head = 0;
+ register int head;
register int track, sector, hbit;
- int i;
u_long phys_addr;
+ head = track = 0;
switch(fd_state) {
case FLP_XFER:
/*
@@ -1106,7 +1129,8 @@ struct fd_softc *sc;
if(selected) {
int tmp;
- st_dmagrab(fdcint, fdmoff, sc, &tmp, 0);
+ st_dmagrab((dma_farg)fdcint, (dma_farg)fdmoff,
+ sc, &tmp, 0);
}
else fd_state = FLP_IDLE;
break;
@@ -1182,7 +1206,7 @@ static void
fdtestdrv(fdsoftc)
struct fd_softc *fdsoftc;
{
- int i, status;
+ int status;
/*
* Select the right unit and head.
@@ -1217,7 +1241,7 @@ fdgetdisklabel(sc, dev)
struct fd_softc *sc;
dev_t dev;
{
- struct disklabel *lp, *dlp;
+ struct disklabel *lp;
int part;
/*
diff --git a/sys/arch/atari/dev/grf.c b/sys/arch/atari/dev/grf.c
index 81f78e5577b..1b8eb49b434 100644
--- a/sys/arch/atari/dev/grf.c
+++ b/sys/arch/atari/dev/grf.c
@@ -1,4 +1,4 @@
-/* $NetBSD: grf.c,v 1.6 1995/06/26 19:55:45 leo Exp $ */
+/* $NetBSD: grf.c,v 1.7 1996/02/22 10:11:23 leo Exp $ */
/*
* Copyright (c) 1995 Leo Weppelman
@@ -366,14 +366,14 @@ struct proc *p;
error = grfsinfo(dev, (struct grfdyninfo *) data);
break;
case GRFGETVMODE:
- return(gp->g_mode(gp, GM_GRFGETVMODE, data));
+ return(gp->g_mode(gp, GM_GRFGETVMODE, data, 0, 0));
case GRFSETVMODE:
- error = gp->g_mode(gp, GM_GRFSETVMODE, data);
+ error = gp->g_mode(gp, GM_GRFSETVMODE, data, 0, 0);
if (error == 0 && gp->g_itedev)
ite_reinit(gp->g_itedev);
break;
case GRFGETNUMVM:
- return(gp->g_mode(gp, GM_GRFGETNUMVM, data));
+ return(gp->g_mode(gp, GM_GRFGETNUMVM, data, 0, 0));
/*
* these are all hardware dependant, and have to be resolved
* in the respective driver.
@@ -447,7 +447,8 @@ grfon(dev)
if (gp->g_itedev != NODEV)
ite_off(gp->g_itedev, 3);
- return(gp->g_mode(gp, (dev & GRFOVDEV) ? GM_GRFOVON : GM_GRFON));
+ return(gp->g_mode(gp, (dev & GRFOVDEV) ? GM_GRFOVON : GM_GRFON,
+ NULL, 0, 0));
}
int
@@ -463,7 +464,8 @@ grfoff(dev)
return(0);
gp->g_flags &= ~GF_GRFON;
- error = gp->g_mode(gp, (dev & GRFOVDEV) ? GM_GRFOVOFF : GM_GRFOFF);
+ error = gp->g_mode(gp, (dev & GRFOVDEV) ? GM_GRFOVOFF : GM_GRFOFF,
+ NULL, 0, 0);
/*
* Closely tied together no X's
@@ -483,7 +485,7 @@ grfsinfo(dev, dyninfo)
int error;
gp = grfsp[GRFUNIT(dev)];
- error = gp->g_mode(gp, GM_GRFCONFIG, dyninfo);
+ error = gp->g_mode(gp, GM_GRFCONFIG, dyninfo, 0, 0);
/*
* Closely tied together no X's
diff --git a/sys/arch/atari/dev/grfabs_tt.c b/sys/arch/atari/dev/grfabs_tt.c
index 65d2a871585..04fdbb0c1ea 100644
--- a/sys/arch/atari/dev/grfabs_tt.c
+++ b/sys/arch/atari/dev/grfabs_tt.c
@@ -1,4 +1,4 @@
-/* $NetBSD: grfabs_tt.c,v 1.1 1995/08/20 18:17:34 leo Exp $ */
+/* $NetBSD: grfabs_tt.c,v 1.2 1996/02/22 10:11:25 leo Exp $ */
/*
* Copyright (c) 1995 Leo Weppelman.
@@ -38,6 +38,7 @@
#include <sys/queue.h>
#include <sys/malloc.h>
#include <sys/device.h>
+#include <sys/systm.h>
#include <machine/iomap.h>
#include <machine/video.h>
@@ -157,8 +158,6 @@ tt_free_view(v)
view_t *v;
{
if(v) {
- dmode_t *md = v->mode;
-
tt_remove_view(v);
if (v->colormap != &gra_con_cmap)
free(v->colormap, M_DEVBUF);
@@ -304,7 +303,6 @@ alloc_bitmap(width, height, depth)
u_long width, height;
u_char depth;
{
- int i;
u_long total_size, bm_size;
void *hw_address;
bmap_t *bm;
diff --git a/sys/arch/atari/dev/grfvar.h b/sys/arch/atari/dev/grfvar.h
index 121fd265bca..546b4291648 100644
--- a/sys/arch/atari/dev/grfvar.h
+++ b/sys/arch/atari/dev/grfvar.h
@@ -1,4 +1,4 @@
-/* $NetBSD: grfvar.h,v 1.2 1995/05/28 19:45:38 leo Exp $ */
+/* $NetBSD: grfvar.h,v 1.3 1996/02/22 10:11:26 leo Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -58,14 +58,18 @@ struct grf_softc {
dev_t g_grfdev; /* grf device number */
dev_t g_viewdev; /* view device number */
caddr_t g_data; /* device dependent data */
- int (*g_mode)();
+ int (*g_mode) __P((struct grf_softc *, int, void *,
+ int, int));
int g_conpri; /* priority of ite as console */
- void (*g_iteinit)();
- void (*g_itedeinit)();
- void (*g_iteclear)();
- void (*g_iteputc)();
- void (*g_itecursor)();
- void (*g_itescroll)();
+ void (*g_iteinit) __P((struct ite_softc *));
+ void (*g_itedeinit) __P((struct ite_softc *));
+ void (*g_iteclear) __P((struct ite_softc *, int, int,
+ int, int));
+ void (*g_iteputc) __P((struct ite_softc *, int, int,
+ int, int));
+ void (*g_itecursor) __P((struct ite_softc *, int));
+ void (*g_itescroll) __P((struct ite_softc *, int, int,
+ int, int));
};
/* flags */
diff --git a/sys/arch/atari/dev/ite.c b/sys/arch/atari/dev/ite.c
index 3d29cc47bbe..ea9261134c3 100644
--- a/sys/arch/atari/dev/ite.c
+++ b/sys/arch/atari/dev/ite.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ite.c,v 1.7 1995/09/04 19:39:21 leo Exp $ */
+/* $NetBSD: ite.c,v 1.8 1996/02/22 10:11:27 leo Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -91,8 +91,11 @@ u_char cons_tabs[MAX_TABS];
struct ite_softc *kbd_ite;
int kbd_init;
+static void iteprecheckwrap __P((struct ite_softc *));
+static void itecheckwrap __P((struct ite_softc *));
+
static char *index __P((const char *, int));
-static int inline atoi __P((const char *));
+static __inline__ int atoi __P((const char *));
static void ite_switch __P((int));
void iteputchar __P((int c, struct ite_softc *ip));
void ite_putstr __P((const u_char * s, int len, dev_t dev));
@@ -142,7 +145,6 @@ iteattach(pdp, dp, auxp)
struct device *pdp, *dp;
void *auxp;
{
- extern int hz;
struct grf_softc *gp;
struct ite_softc *ip;
int s;
@@ -439,7 +441,7 @@ itewrite(dev, uio, flag)
return ((*linesw[tp->t_line].l_write) (tp, uio, flag));
}
-int
+void
itestop(tp, flag)
struct tty *tp;
int flag;
@@ -521,7 +523,7 @@ itestart(tp)
struct clist *rbp;
struct ite_softc *ip;
u_char buf[ITEBURST];
- int s, len, n;
+ int s, len;
ip = getitesp(tp->t_dev);
@@ -591,7 +593,7 @@ ite_on(dev, flag)
return (0);
}
-int
+void
ite_off(dev, flag)
dev_t dev;
int flag;
@@ -733,7 +735,7 @@ enum caller caller;
if(!up)
key_mod ^= KBD_MOD_CAPS;
splx(s);
- return;
+ return -1;
break;
}
if(mask) {
@@ -1069,7 +1071,7 @@ enum caller caller;
}
/* helper functions, makes the code below more readable */
-static void inline
+static __inline__ void
ite_sendstr(str)
char *str;
{
@@ -1094,7 +1096,7 @@ alignment_display(ip)
SUBR_CURSOR(ip, DRAW_CURSOR);
}
-static void inline
+static __inline__ void
snap_cury(ip)
struct ite_softc *ip;
{
@@ -1107,7 +1109,7 @@ snap_cury(ip)
}
}
-static void inline
+static __inline__ void
ite_dnchar(ip, n)
struct ite_softc *ip;
int n;
@@ -1125,7 +1127,7 @@ ite_dnchar(ip, n)
SUBR_CURSOR(ip, DRAW_CURSOR);
}
-static void inline
+static __inline__ void
ite_inchar(ip, n)
struct ite_softc *ip;
int n;
@@ -1143,7 +1145,7 @@ ite_inchar(ip, n)
SUBR_CURSOR(ip, DRAW_CURSOR);
}
-static void inline
+static __inline__ void
ite_clrtoeol(ip)
struct ite_softc *ip;
{
@@ -1156,7 +1158,7 @@ ite_clrtoeol(ip)
}
}
-static void inline
+static __inline__ void
ite_clrtobol(ip)
struct ite_softc *ip;
{
@@ -1166,7 +1168,7 @@ ite_clrtobol(ip)
SUBR_CURSOR(ip, DRAW_CURSOR);
}
-static void inline
+static __inline__ void
ite_clrline(ip)
struct ite_softc *ip;
{
@@ -1178,7 +1180,7 @@ ite_clrline(ip)
-static void inline
+static __inline__ void
ite_clrtoeos(ip)
struct ite_softc *ip;
{
@@ -1191,7 +1193,7 @@ ite_clrtoeos(ip)
}
}
-static void inline
+static __inline__ void
ite_clrtobos(ip)
struct ite_softc *ip;
{
@@ -1204,7 +1206,7 @@ ite_clrtobos(ip)
}
}
-static void inline
+static __inline__ void
ite_clrscreen(ip)
struct ite_softc *ip;
{
@@ -1215,7 +1217,7 @@ ite_clrscreen(ip)
-static void inline
+static __inline__ void
ite_dnline(ip, n)
struct ite_softc *ip;
int n;
@@ -1237,7 +1239,7 @@ ite_dnline(ip, n)
SUBR_CURSOR(ip, DRAW_CURSOR);
}
-static void inline
+static __inline__ void
ite_inline(ip, n)
struct ite_softc *ip;
int n;
@@ -1259,7 +1261,7 @@ ite_inline(ip, n)
SUBR_CURSOR(ip, DRAW_CURSOR);
}
-static void inline
+static __inline__ void
ite_lf (ip)
struct ite_softc *ip;
{
@@ -1274,7 +1276,7 @@ ite_lf (ip)
clr_attr(ip, ATTR_INV);
}
-static void inline
+static __inline__ void
ite_crlf (ip)
struct ite_softc *ip;
{
@@ -1282,7 +1284,7 @@ ite_crlf (ip)
ite_lf (ip);
}
-static void inline
+static __inline__ void
ite_cr (ip)
struct ite_softc *ip;
{
@@ -1293,7 +1295,7 @@ ite_cr (ip)
}
}
-static void inline
+static __inline__ void
ite_rlf (ip)
struct ite_softc *ip;
{
@@ -1308,7 +1310,7 @@ ite_rlf (ip)
clr_attr(ip, ATTR_INV);
}
-static int inline
+static __inline__ int
atoi (cp)
const char *cp;
{
@@ -1331,7 +1333,7 @@ index (cp, ch)
-static int inline
+static __inline__ int
ite_argnum (ip)
struct ite_softc *ip;
{
@@ -1349,11 +1351,11 @@ ite_argnum (ip)
return n;
}
-static int inline
+static __inline__ int
ite_zargnum (ip)
struct ite_softc *ip;
{
- char ch, *cp;
+ char ch;
int n;
/* convert argument string into number */
@@ -1367,17 +1369,6 @@ ite_zargnum (ip)
return n; /* don't "n ? n : 1" here, <CSI>0m != <CSI>1m ! */
}
-static int inline
-strncmp (a, b, l)
- const char *a, *b;
- int l;
-{
- for (;l--; a++, b++)
- if (*a != *b)
- return *a - *b;
- return 0;
-}
-
void
ite_putstr(s, len, dev)
const u_char *s;
@@ -1417,7 +1408,6 @@ iteputchar(c, ip)
if (ip->escape)
{
-doesc:
switch (ip->escape)
{
case ESC:
@@ -2322,6 +2312,7 @@ doesc:
}
}
+static void
iteprecheckwrap(ip)
struct ite_softc *ip;
{
@@ -2338,6 +2329,7 @@ iteprecheckwrap(ip)
}
}
+static void
itecheckwrap(ip)
struct ite_softc *ip;
{
diff --git a/sys/arch/atari/dev/ite_cc.c b/sys/arch/atari/dev/ite_cc.c
index 676c499e061..2a30e696cb9 100644
--- a/sys/arch/atari/dev/ite_cc.c
+++ b/sys/arch/atari/dev/ite_cc.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ite_cc.c,v 1.4 1995/05/28 19:45:39 leo Exp $ */
+/* $NetBSD: ite_cc.c,v 1.5 1996/02/22 10:11:29 leo Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@@ -192,7 +192,7 @@ struct itewinsize *winsz;
{
struct view_size vs;
ipriv_t *cci = ip->priv;
- u_long fbp, i, j;
+ u_long i, j;
int error = 0;
view_t *view;
@@ -279,10 +279,11 @@ struct proc *p;
{
struct winsize ws;
struct itewinsize *is;
- struct itebell *ib;
int error = 0;
- ipriv_t *cci = ip->priv;
view_t *view = viewview(ip->grf->g_viewdev);
+#if 0 /* LWP: notyet */
+ struct itebell *ib;
+#endif
switch (cmd) {
case ITEIOCGWINSZ:
@@ -512,8 +513,6 @@ int dir, sx, count;
if(dir == SCROLL_UP) {
int dy = sy - count;
- int height = ip->bottom_margin - sy + 1;
- int i;
cursor32(ip, ERASE_CURSOR);
scrollbmap(bm, 0, dy*ip->font.height, bm->bytes_per_row >> 3,
@@ -521,11 +520,7 @@ int dir, sx, count;
0, -(count*ip->font.height));
}
else if(dir == SCROLL_DOWN) {
- int dy = sy + count;
- int height = ip->bottom_margin - dy + 1;
- int i;
-
- cursor32(ip, ERASE_CURSOR);
+ cursor32(ip, ERASE_CURSOR);
scrollbmap(bm, 0, sy*ip->font.height, bm->bytes_per_row >> 3,
(ip->bottom_margin-sy+1)*ip->font.height,
0, count*ip->font.height);
@@ -578,7 +573,6 @@ int dir, sx, count;
static void
scrollbmap (bmap_t *bm, u_short x, u_short y, u_short width, u_short height, short dx, short dy)
{
- u_short depth = bm->depth;
u_short lwpr = bm->bytes_per_row >> 2;
if(dx) {
diff --git a/sys/arch/atari/dev/itevar.h b/sys/arch/atari/dev/itevar.h
index 1607302db84..342057ba572 100644
--- a/sys/arch/atari/dev/itevar.h
+++ b/sys/arch/atari/dev/itevar.h
@@ -1,4 +1,4 @@
-/* $NetBSD: itevar.h,v 1.2 1995/07/25 13:49:26 leo Exp $ */
+/* $NetBSD: itevar.h,v 1.3 1996/02/22 10:11:31 leo Exp $ */
/*
* Copyright (c) 1995 Leo Weppelman (Atari modifications)
@@ -190,7 +190,7 @@ void itestart __P((struct tty *));
/* ite functions */
int ite_on __P((dev_t, int));
-int ite_off __P((dev_t, int));
+void ite_off __P((dev_t, int));
void ite_reinit __P((dev_t));
int ite_param __P((struct tty *, struct termios *));
void ite_reset __P((struct ite_softc *));
diff --git a/sys/arch/atari/dev/kbd.c b/sys/arch/atari/dev/kbd.c
index 32a80018a25..2add3b976ef 100644
--- a/sys/arch/atari/dev/kbd.c
+++ b/sys/arch/atari/dev/kbd.c
@@ -1,4 +1,4 @@
-/* $NetBSD: kbd.c,v 1.5 1995/06/26 14:31:27 leo Exp $ */
+/* $NetBSD: kbd.c,v 1.6 1996/02/22 10:11:32 leo Exp $ */
/*
* Copyright (c) 1995 Leo Weppelman
@@ -83,6 +83,16 @@ struct kbd_softc {
static struct kbd_softc kbd_softc;
+/* {b,c}devsw[] function prototypes */
+dev_type_open(kbdopen);
+dev_type_close(kbdclose);
+dev_type_read(kbdread);
+dev_type_ioctl(kbdioctl);
+dev_type_select(kbdselect);
+
+/* Interrupt handler */
+void kbdintr __P((int));
+
void kbd_write __P((u_char *, int));
static void kbdsoft __P((void));
@@ -189,8 +199,6 @@ kbdenable()
int kbdopen(dev_t dev, int flags, int mode, struct proc *p)
{
- int s, error;
-
if (kbd_softc.k_events.ev_io)
return EBUSY;
@@ -268,7 +276,7 @@ kbdselect (dev_t dev, int rw, struct proc *p)
/*
* Keyboard interrupt handler called straight from MFP at spl6.
*/
-int
+void
kbdintr(sr)
int sr; /* sr at time of interrupt */
{
@@ -413,7 +421,7 @@ static char sound[] = {
0xF8,0x10,0x10,0x10,0x00,0x20,0x03
};
-int
+void
kbdbell()
{
register int i, sps;
diff --git a/sys/arch/atari/dev/view.c b/sys/arch/atari/dev/view.c
index 09dbaf75244..6056c20d290 100644
--- a/sys/arch/atari/dev/view.c
+++ b/sys/arch/atari/dev/view.c
@@ -1,4 +1,4 @@
-/* $NetBSD: view.c,v 1.6 1995/08/17 20:32:50 leo Exp $ */
+/* $NetBSD: view.c,v 1.7 1996/02/22 10:11:34 leo Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@@ -38,6 +38,7 @@
* a interface to graphics. */
#include <sys/param.h>
+#include <sys/systm.h>
#include <sys/proc.h>
#include <sys/ioctl.h>
#include <sys/file.h>
@@ -61,7 +62,7 @@ int viewioctl __P((dev_t, u_long, caddr_t, int, struct proc *));
int viewopen __P((dev_t, int));
int viewmmap __P((dev_t, int, int));
-int viewprobe ();
+int viewprobe __P((void));
struct view_softc views[NVIEW];
static int view_inited;
@@ -75,6 +76,7 @@ int view_default_depth = 1;
/*
* functions for probeing.
*/
+void
viewattach(cnt)
int cnt;
{
@@ -83,6 +85,7 @@ viewattach(cnt)
}
/* this function is called early to set up a display. */
+int
viewprobe()
{
int i;
diff --git a/sys/arch/atari/dev/zs.c b/sys/arch/atari/dev/zs.c
index b58ec39f31f..ee8644eaf2c 100644
--- a/sys/arch/atari/dev/zs.c
+++ b/sys/arch/atari/dev/zs.c
@@ -1,4 +1,4 @@
-/* $NetBSD: zs.c,v 1.14 1996/01/23 09:35:15 leo Exp $ */
+/* $NetBSD: zs.c,v 1.15 1996/02/22 10:11:37 leo Exp $ */
/*
* Copyright (c) 1995 L. Weppelman (Atari modifications)
@@ -176,6 +176,13 @@ struct cfdriver zscd = {
NULL, "zs", (cfmatch_t)zsmatch, zsattach, DV_TTY,
sizeof(struct zs_softc), NULL, 0 };
+/* {b,c}devsw[] function prototypes */
+dev_type_open(zsopen);
+dev_type_close(zsclose);
+dev_type_read(zsread);
+dev_type_write(zswrite);
+dev_type_ioctl(zsioctl);
+
/* Interrupt handlers. */
int zshard __P((long));
static int zssoft __P((long));
@@ -192,7 +199,6 @@ static int zsparam __P((struct tty *, struct termios *));
static int zsbaudrate __P((int, int, int *, int *, int *, int *));
/* Routines purely local to this driver. */
-static void zs_reset __P((volatile struct zschan *, int, int));
static int zs_modem __P((struct zs_chanstate *, int, int));
static void zs_loadchannelregs __P((volatile struct zschan *, u_char *));
@@ -221,7 +227,6 @@ void *aux;
register struct zs_softc *zi;
register struct zs_chanstate *cs;
register volatile struct zsdevice *addr;
- register struct tty *tp;
char tmp;
addr = (struct zsdevice *)AD_SCC;
@@ -817,7 +822,7 @@ struct proc *p;
break;
}
case TIOCSFLAGS: {
- int userbits, driverbits = 0;
+ int userbits = 0;
error = suser(p->p_ucred, &p->p_acflag);
if(error != 0)