sys/emulation cleanup

Alexey Slynko slynko at tronet.ru
Thu Dec 8 23:33:40 PST 2005


Hi,

1) Ansify function definitions


Index: ibcs2/i386/ibcs2_fcntl.c
===================================================================
RCS file: /mnt/share/dragonfly-cvs/src/sys/emulation/ibcs2/i386/ibcs2_fcntl.c,v
retrieving revision 1.10
diff -u -r1.10 ibcs2_fcntl.c
--- ibcs2/i386/ibcs2_fcntl.c	22 Jun 2005 01:33:25 -0000	1.10
+++ ibcs2/i386/ibcs2_fcntl.c	8 Dec 2005 22:31:33 -0000
@@ -52,8 +52,7 @@
 static int  ioflags2oflags   (int);
 
 static int
-cvt_o_flags(flags)
-	int flags;
+cvt_o_flags(int flags)
 {
 	int r = 0;
 
@@ -73,9 +72,7 @@
 }
 
 static void
-cvt_flock2iflock(flp, iflp)
-	struct flock *flp;
-	struct ibcs2_flock *iflp;
+cvt_flock2iflock(struct flock *flp, struct ibcs2_flock *iflp)
 {
 	switch (flp->l_type) {
 	case F_RDLCK:
@@ -106,9 +103,7 @@
 #endif
 
 static void
-cvt_iflock2flock(iflp, flp)
-	struct ibcs2_flock *iflp;
-	struct flock *flp;
+cvt_iflock2flock(struct ibcs2_flock *iflp, struct flock *flp)
 {
 	flp->l_start = (off_t)iflp->l_start;
 	flp->l_len = (off_t)iflp->l_len;
@@ -129,8 +124,7 @@
 
 /* convert iBCS2 mode into NetBSD mode */
 static int
-ioflags2oflags(flags)
-	int flags;
+ioflags2oflags(int flags)
 {
 	int r = 0;
 	
@@ -150,8 +144,7 @@
 
 /* convert NetBSD mode into iBCS2 mode */
 static int
-oflags2ioflags(flags)
-	int flags;
+oflags2ioflags(int flags)
 {
 	int r = 0;
 	
Index: ibcs2/i386/ibcs2_ioctl.c
===================================================================
RCS file: /mnt/share/dragonfly-cvs/src/sys/emulation/ibcs2/i386/ibcs2_ioctl.c,v
retrieving revision 1.9
diff -u -r1.9 ibcs2_ioctl.c
--- ibcs2/i386/ibcs2_ioctl.c	22 Jun 2005 01:33:25 -0000	1.9
+++ ibcs2/i386/ibcs2_ioctl.c	8 Dec 2005 22:34:33 -0000
@@ -127,9 +127,7 @@
 };
 
 static void
-stios2btios(st, bt)
-	struct ibcs2_termios *st;
-	struct termios *bt;
+stios2btios(struct ibcs2_termios *st, struct termios *bt)
 {
 	u_long l, r;
 
@@ -222,9 +220,7 @@
 }
 
 static void
-btios2stios(bt, st)
-	struct termios *bt;
-	struct ibcs2_termios *st;
+btios2stios(struct termios *bt, struct ibcs2_termios *st)
 {
 	u_long l, r;
 
@@ -312,9 +308,7 @@
 }
 
 static void
-stios2stio(ts, t)
-	struct ibcs2_termios *ts;
-	struct ibcs2_termio *t;
+stios2stio(struct ibcs2_termios *ts, struct ibcs2_termio *t)
 {
 	t->c_iflag = ts->c_iflag;
 	t->c_oflag = ts->c_oflag;
@@ -325,9 +319,7 @@
 }
 
 static void
-stio2stios(t, ts)
-	struct ibcs2_termio *t;
-	struct ibcs2_termios *ts;
+stio2stios(struct ibcs2_termio *t, struct ibcs2_termios *ts)
 {
 	ts->c_iflag = t->c_iflag;
 	ts->c_oflag = t->c_oflag;
Index: ibcs2/i386/ibcs2_ipc.c
===================================================================
RCS file: /mnt/share/dragonfly-cvs/src/sys/emulation/ibcs2/i386/ibcs2_ipc.c,v
retrieving revision 1.5
diff -u -r1.5 ibcs2_ipc.c
--- ibcs2/i386/ibcs2_ipc.c	27 Aug 2003 06:30:03 -0000	1.5
+++ ibcs2/i386/ibcs2_ipc.c	8 Dec 2005 22:29:14 -0000
@@ -65,9 +65,7 @@
  */
 
 static void
-cvt_msqid2imsqid(bp, ibp)
-struct msqid_ds *bp;
-struct ibcs2_msqid_ds *ibp;
+cvt_msqid2imsqid(struct msqid_ds *bp, struct ibcs2_msqid_ds *ibp)
 {
 	cvt_perm2iperm(&bp->msg_perm, &ibp->msg_perm);
 	ibp->msg_first = bp->msg_first;
@@ -84,9 +82,7 @@
 }
 
 static void
-cvt_imsqid2msqid(ibp, bp)
-struct ibcs2_msqid_ds *ibp;
-struct msqid_ds *bp;
+cvt_imsqid2msqid(struct ibcs2_msqid_ds *ibp, struct msqid_ds *bp)
 {
 	cvt_iperm2perm(&ibp->msg_perm, &bp->msg_perm);
 	bp->msg_first = ibp->msg_first;
@@ -153,9 +149,7 @@
  */
 #ifdef unused
 static void
-cvt_sem2isem(bp, ibp)
-struct sem *bp;
-struct ibcs2_sem *ibp;
+cvt_sem2isem(struct sem *bp, struct ibcs2_sem *ibp)
 {
 	ibp->semval = bp->semval;
 	ibp->sempid = bp->sempid;
@@ -165,9 +159,7 @@
 }
 
 static void
-cvt_isem2sem(ibp, bp)
-struct ibcs2_sem *ibp;
-struct sem *bp;
+cvt_isem2sem(struct ibcs2_sem *ibp, struct sem *bp)
 {
 	bp->semval = ibp->semval;
 	bp->sempid = ibp->sempid;
@@ -178,9 +170,7 @@
 #endif
 
 static void
-cvt_iperm2perm(ipp, pp)
-struct ibcs2_ipc_perm *ipp;
-struct ipc_perm *pp;
+cvt_iperm2perm(struct ibcs2_ipc_perm *ipp, struct ipc_perm *pp)
 {
 	pp->uid = ipp->uid;
 	pp->gid = ipp->gid;
@@ -192,9 +182,7 @@
 }
 
 static void
-cvt_perm2iperm(pp, ipp)
-struct ipc_perm *pp;
-struct ibcs2_ipc_perm *ipp;
+cvt_perm2iperm(struct ipc_perm *pp, struct ibcs2_ipc_perm *ipp)
 {
 	ipp->uid = pp->uid;
 	ipp->gid = pp->gid;
@@ -206,9 +194,7 @@
 }
 
 static void
-cvt_semid2isemid(bp, ibp)
-struct semid_ds *bp;
-struct ibcs2_semid_ds *ibp;
+cvt_semid2isemid(struct semid_ds *bp, struct ibcs2_semid_ds *ibp)
 {
 	cvt_perm2iperm(&bp->sem_perm, &ibp->sem_perm);
 	ibp->sem_base = (struct ibcs2_sem *)bp->sem_base;
@@ -219,9 +205,7 @@
 }
 
 static void
-cvt_isemid2semid(ibp, bp)
-struct ibcs2_semid_ds *ibp;
-struct semid_ds *bp;
+cvt_isemid2semid(struct ibcs2_semid_ds *ibp, struct semid_ds *bp)
 {
 	cvt_iperm2perm(&ibp->sem_perm, &bp->sem_perm);
 	bp->sem_base = (struct sem *)ibp->sem_base;
@@ -308,9 +292,7 @@
  */
 
 static void
-cvt_shmid2ishmid(bp, ibp)
-struct shmid_ds *bp;
-struct ibcs2_shmid_ds *ibp;
+cvt_shmid2ishmid(struct shmid_ds *bp, struct ibcs2_shmid_ds *ibp)
 {
 	cvt_perm2iperm(&bp->shm_perm, &ibp->shm_perm);
 	ibp->shm_segsz = bp->shm_segsz;
@@ -325,9 +307,7 @@
 }
 
 static void
-cvt_ishmid2shmid(ibp, bp)
-struct ibcs2_shmid_ds *ibp;
-struct shmid_ds *bp;
+cvt_ishmid2shmid(struct ibcs2_shmid_ds *ibp, struct shmid_ds *bp)
 {
 	cvt_iperm2perm(&ibp->shm_perm, &bp->shm_perm);
 	bp->shm_segsz = ibp->shm_segsz;
Index: ibcs2/i386/ibcs2_signal.c
===================================================================
RCS file: /mnt/share/dragonfly-cvs/src/sys/emulation/ibcs2/i386/ibcs2_signal.c,v
retrieving revision 1.8
diff -u -r1.8 ibcs2_signal.c
--- ibcs2/i386/ibcs2_signal.c	27 Jun 2005 01:49:59 -0000	1.8
+++ ibcs2/i386/ibcs2_signal.c	8 Dec 2005 22:33:14 -0000
@@ -128,9 +128,7 @@
 };
 
 void
-ibcs2_to_bsd_sigset(iss, bss)
-	const ibcs2_sigset_t *iss;
-	sigset_t *bss;
+ibcs2_to_bsd_sigset(const ibcs2_sigset_t *iss, sigset_t *bss)
 {
 	int i, newsig;
 
@@ -145,9 +143,7 @@
 }
 
 static void
-bsd_to_ibcs2_sigset(bss, iss)
-	const sigset_t *bss;
-	ibcs2_sigset_t *iss;
+bsd_to_ibcs2_sigset(const sigset_t *bss, ibcs2_sigset_t *iss)
 {
 	int i, newsig;
 
@@ -162,9 +158,8 @@
 }
 
 static void
-ibcs2_to_bsd_sigaction(isa, bsa)
-	struct ibcs2_sigaction *isa;
-	struct sigaction *bsa;
+ibcs2_to_bsd_sigaction(struct ibcs2_sigaction *isa,
+		       struct sigaction *bsa)
 {
 
 	bsa->sa_handler = isa->isa_handler;
@@ -175,9 +170,8 @@
 }
 
 static void
-bsd_to_ibcs2_sigaction(bsa, isa)
-	struct sigaction *bsa;
-	struct ibcs2_sigaction *isa;
+bsd_to_ibcs2_sigaction(struct sigaction *bsa,
+		       struct ibcs2_sigaction *isa)
 {
 
 	isa->isa_handler = bsa->sa_handler;
Index: ibcs2/i386/ibcs2_stat.c
===================================================================
RCS file: /mnt/share/dragonfly-cvs/src/sys/emulation/ibcs2/i386/ibcs2_stat.c,v
retrieving revision 1.11
diff -u -r1.11 ibcs2_stat.c
--- ibcs2/i386/ibcs2_stat.c	31 Jan 2005 21:55:18 -0000	1.11
+++ ibcs2/i386/ibcs2_stat.c	8 Dec 2005 22:30:14 -0000
@@ -55,9 +55,7 @@
 static int  cvt_statfs         (struct statfs *, caddr_t, int);
 
 static void
-bsd_stat2ibcs_stat(st, st4)
-	struct stat *st;
-	struct ibcs2_stat *st4;
+bsd_stat2ibcs_stat(struct stat *st, struct ibcs2_stat *st4)
 {
 	bzero(st4, sizeof(*st4));
 	st4->st_dev  = (ibcs2_dev_t)st->st_dev;
@@ -77,10 +75,7 @@
 }
 
 static int
-cvt_statfs(sp, buf, len)
-	struct statfs *sp;
-	caddr_t buf;
-	int len;
+cvt_statfs(struct statfs *sp, caddr_t buf, int len)
 {
 	struct ibcs2_statfs ssfs;
 
Index: ibcs2/i386/ibcs2_util.c
===================================================================
RCS file: /mnt/share/dragonfly-cvs/src/sys/emulation/ibcs2/i386/ibcs2_util.c,v
retrieving revision 1.9
diff -u -r1.9 ibcs2_util.c
--- ibcs2/i386/ibcs2_util.c	12 Nov 2004 00:09:16 -0000	1.9
+++ ibcs2/i386/ibcs2_util.c	9 Dec 2005 00:07:43 -0000
@@ -51,14 +51,13 @@
  * If cflag is set, we check if an attempt can be made to create
  * the named file, i.e. we check if the directory it should
  * be in exists.
+ *
+ * Parameters:
+ *	sgp:	Pointer to stackgap memory
  */
 int
-ibcs2_emul_find(sgp, prefix, path, pbuf, cflag)
-	caddr_t		 *sgp;		/* Pointer to stackgap memory */
-	const char	 *prefix;
-	char		 *path;
-	char		**pbuf;
-	int		  cflag;
+ibcs2_emul_find(caddr_t *sgp, const char *prefix, char *path,
+		char **pbuf, int cflag)
 {
 	struct nlookupdata	 nd;
 	struct nlookupdata	 ndroot;
Index: ibcs2/i386/ibcs2_util.h
===================================================================
RCS file: /mnt/share/dragonfly-cvs/src/sys/emulation/ibcs2/i386/ibcs2_util.h,v
retrieving revision 1.4
diff -u -r1.4 ibcs2_util.h
--- ibcs2/i386/ibcs2_util.h	27 Aug 2003 06:30:03 -0000	1.4
+++ ibcs2/i386/ibcs2_util.h	8 Dec 2005 22:26:29 -0000
@@ -59,16 +59,14 @@
 static __inline void *stackgap_alloc(caddr_t *, size_t);
 
 static __inline caddr_t
-stackgap_init()
+stackgap_init(void)
 {
 #define szsigcode (*(curproc->p_sysent->sv_szsigcode))
         return (caddr_t)(PS_STRINGS - szsigcode - SPARE_USRSPACE);
 }
 
 static __inline void *
-stackgap_alloc(sgp, sz)
-	caddr_t	*sgp;
-	size_t   sz;
+stackgap_alloc(caddr_t *sgp, size_t sz)
 {
 	void	*p = (void *) *sgp;
 	*sgp += ALIGN(sz);
Index: linux/linux_util.h
===================================================================
RCS file: /mnt/share/dragonfly-cvs/src/sys/emulation/linux/linux_util.h,v
retrieving revision 1.6
diff -u -r1.6 linux_util.h
--- linux/linux_util.h	13 Nov 2003 04:04:42 -0000	1.6
+++ linux/linux_util.h	8 Dec 2005 22:35:17 -0000
@@ -70,15 +70,13 @@
 #define szsigcode(p) (*((p)->p_sysent->sv_szsigcode))
 
 static __inline caddr_t
-stackgap_init()
+stackgap_init(void)
 {
 	return (caddr_t)(PS_STRINGS - szsigcode(curproc) - SPARE_USRSPACE);
 }
 
 static __inline void *
-stackgap_alloc(sgp, sz)
-	caddr_t	*sgp;
-	size_t   sz;
+stackgap_alloc(caddr_t *sgp, size_t sz)
 {
 	void *p = (void *) *sgp;
 
Index: linux/i386/imgact_linux.c
===================================================================
RCS file: /mnt/share/dragonfly-cvs/src/sys/emulation/linux/i386/imgact_linux.c,v
retrieving revision 1.6
diff -u -r1.6 imgact_linux.c
--- linux/i386/imgact_linux.c	20 Jan 2004 18:41:51 -0000	1.6
+++ linux/i386/imgact_linux.c	8 Dec 2005 22:36:55 -0000
@@ -56,8 +56,7 @@
 static int	exec_linux_imgact (struct image_params *iparams);
 
 static int
-exec_linux_imgact(imgp)
-    struct image_params *imgp;
+exec_linux_imgact(struct image_params *imgp)
 {
     const struct exec *a_out = (const struct exec *) imgp->image_header;
     struct vmspace *vmspace;
Index: linux/i386/linux_sysvec.c
===================================================================
RCS file: /mnt/share/dragonfly-cvs/src/sys/emulation/linux/i386/linux_sysvec.c,v
retrieving revision 1.19
diff -u -r1.19 linux_sysvec.c
--- linux/i386/linux_sysvec.c	21 Nov 2005 21:59:46 -0000	1.19
+++ linux/i386/linux_sysvec.c	8 Dec 2005 22:36:16 -0000
@@ -733,8 +733,7 @@
 static int	exec_linux_imgact_try (struct image_params *iparams);
 
 static int
-exec_linux_imgact_try(imgp)
-    struct image_params *imgp;
+exec_linux_imgact_try(struct image_params *imgp)
 {
     const char *head = (const char *)imgp->image_header;
     int error = -1;
Index: linux/i386/linprocfs/linprocfs_misc.c
===================================================================
RCS file: /mnt/share/dragonfly-cvs/src/sys/emulation/linux/i386/linprocfs/linprocfs_misc.c,v
retrieving revision 1.11
diff -u -r1.11 linprocfs_misc.c
--- linux/i386/linprocfs/linprocfs_misc.c	27 Apr 2005 14:31:19 -0000	1.11
+++ linux/i386/linprocfs/linprocfs_misc.c	8 Dec 2005 22:40:57 -0000
@@ -80,11 +80,8 @@
 #define P2K(x) ((x) << (PAGE_SHIFT - 10))		/* pages to kbytes */
 
 int
-linprocfs_domeminfo(curp, p, pfs, uio)
-	struct proc *curp;
-	struct proc *p;
-	struct pfsnode *pfs;
-	struct uio *uio;
+linprocfs_domeminfo(struct proc *curp, struct proc *p, struct pfsnode *pfs,
+		    struct uio *uio)
 {
 	char *ps;
 	char psbuf[512];		/* XXX - conservative */
@@ -161,11 +158,8 @@
 }
 
 int
-linprocfs_docpuinfo(curp, p, pfs, uio)
-	struct proc *curp;
-	struct proc *p;
-	struct pfsnode *pfs;
-	struct uio *uio;
+linprocfs_docpuinfo(struct proc *curp, struct proc *p, struct pfsnode *pfs,
+		    struct uio *uio)
 {
 	char *ps;
 	char psbuf[512];		/* XXX - conservative */
@@ -262,11 +256,8 @@
 }
 
 int
-linprocfs_dostat(curp, p, pfs, uio)
-	struct proc *curp;
-	struct proc *p;
-	struct pfsnode *pfs;
-	struct uio *uio;
+linprocfs_dostat(struct proc *curp, struct proc *p, struct pfsnode *pfs,
+		 struct uio *uio)
 {
         char *ps;
 	char psbuf[512];
@@ -295,11 +286,8 @@
 }
 
 int
-linprocfs_douptime(curp, p, pfs, uio)
-	struct proc *curp;
-	struct proc *p;
-	struct pfsnode *pfs;
-	struct uio *uio;
+linprocfs_douptime(struct proc *curp, struct proc *p, struct pfsnode *pfs,
+		   struct uio *uio)
 {
 	char *ps;
 	char psbuf[64];
@@ -314,11 +302,8 @@
 }
 
 int
-linprocfs_doversion(curp, p, pfs, uio)
-	struct proc *curp;
-	struct proc *p;
-	struct pfsnode *pfs;
-	struct uio *uio;
+linprocfs_doversion(struct proc *curp, struct proc *p, struct pfsnode *pfs,
+		    struct uio *uio)
 {
         char *ps;
 	int xlen;
@@ -331,11 +316,8 @@
 }
 
 int
-linprocfs_doprocstat(curp, p, pfs, uio)
-    	struct proc *curp;
-	struct proc *p;
-	struct pfsnode *pfs;
-	struct uio *uio;
+linprocfs_doprocstat(struct proc *curp, struct proc *p, struct pfsnode *pfs,
+		     struct uio *uio)
 {
 	char *ps, psbuf[1024];
 
@@ -398,11 +380,8 @@
 };
 
 int
-linprocfs_doprocstatus(curp, p, pfs, uio)
-    	struct proc *curp;
-	struct proc *p;
-	struct pfsnode *pfs;
-	struct uio *uio;
+linprocfs_doprocstatus(struct proc *curp, struct proc *p, struct pfsnode *pfs,
+		       struct uio *uio)
 {
 	char *ps, psbuf[1024];
 	char *state;
Index: linux/i386/linprocfs/linprocfs_subr.c
===================================================================
RCS file: /mnt/share/dragonfly-cvs/src/sys/emulation/linux/i386/linprocfs/linprocfs_subr.c,v
retrieving revision 1.15
diff -u -r1.15 linprocfs_subr.c
--- linux/i386/linprocfs/linprocfs_subr.c	17 Dec 2004 00:18:05 -0000	1.15
+++ linux/i386/linprocfs/linprocfs_subr.c	8 Dec 2005 22:42:37 -0000
@@ -85,11 +85,8 @@
  * the vnode free list.
  */
 int
-linprocfs_allocvp(mp, vpp, pid, pfs_type)
-	struct mount *mp;
-	struct vnode **vpp;
-	long pid;
-	pfstype pfs_type;
+linprocfs_allocvp(struct mount *mp, struct vnode **vpp, long pid,
+		  pfstype pfs_type)
 {
 	struct thread *td = curthread;	/* XXX */
 	struct pfsnode *pfs;
@@ -220,8 +217,7 @@
 }
 
 int
-linprocfs_freevp(vp)
-	struct vnode *vp;
+linprocfs_freevp(struct vnode *vp)
 {
 	struct pfsnode **pfspp;
 	struct pfsnode *pfs = VTOPFS(vp);
@@ -238,8 +234,7 @@
 }
 
 int
-linprocfs_rw(ap)
-	struct vop_read_args *ap;
+linprocfs_rw(struct vop_read_args *ap)
 {
 	struct vnode *vp = ap->a_vp;
 	struct uio *uio = ap->a_uio;
@@ -314,10 +309,7 @@
  * EFAULT:    user i/o buffer is not addressable
  */
 int
-vfs_getuserstr(uio, buf, buflenp)
-	struct uio *uio;
-	char *buf;
-	int *buflenp;
+vfs_getuserstr(struct uio *uio, char *buf, int *buflenp)
 {
 	int xlen;
 	int error;
@@ -349,10 +341,7 @@
 }
 
 vfs_namemap_t *
-vfs_findname(nm, buf, buflen)
-	vfs_namemap_t *nm;
-	char *buf;
-	int buflen;
+vfs_findname(vfs_namemap_t *nm, char *buf, int buflen)
 {
 
 	for (; nm->nm_name; nm++)
Index: linux/i386/linprocfs/linprocfs_vfsops.c
===================================================================
RCS file: /mnt/share/dragonfly-cvs/src/sys/emulation/linux/i386/linprocfs/linprocfs_vfsops.c,v
retrieving revision 1.10
diff -u -r1.10 linprocfs_vfsops.c
--- linux/i386/linprocfs/linprocfs_vfsops.c	17 Sep 2005 07:42:58 -0000	1.10
+++ linux/i386/linprocfs/linprocfs_vfsops.c	8 Dec 2005 22:44:19 -0000
@@ -71,11 +71,7 @@
  */
 /* ARGSUSED */
 static int
-linprocfs_mount(mp, path, data, td)
-	struct mount *mp;
-	char *path;
-	caddr_t data;
-	struct thread *td;
+linprocfs_mount(struct mount *mp, char *path, caddr_t data, struct thread *td)
 {
 	size_t size;
 	int error;
@@ -107,10 +103,7 @@
  * unmount system call
  */
 static int
-linprocfs_unmount(mp, mntflags, td)
-	struct mount *mp;
-	int mntflags;
-	struct thread *td;
+linprocfs_unmount(struct mount *mp, int mntflags, struct thread *td)
 {
 	int error;
 	int flags = 0;
@@ -129,9 +122,7 @@
 }
 
 int
-linprocfs_root(mp, vpp)
-	struct mount *mp;
-	struct vnode **vpp;
+linprocfs_root(struct mount *mp, struct vnode **vpp)
 {
 
 	return (linprocfs_allocvp(mp, vpp, 0, Proot));
@@ -141,10 +132,7 @@
  * Get file system statistics.
  */
 static int
-linprocfs_statfs(mp, sbp, td)
-	struct mount *mp;
-	struct statfs *sbp;
-	struct thread *td;
+linprocfs_statfs(struct mount *mp, struct statfs *sbp, struct thread *td)
 {
 	sbp->f_bsize = PAGE_SIZE;
 	sbp->f_iosize = PAGE_SIZE;
Index: linux/i386/linprocfs/linprocfs_vnops.c
===================================================================
RCS file: /mnt/share/dragonfly-cvs/src/sys/emulation/linux/i386/linprocfs/linprocfs_vnops.c,v
retrieving revision 1.23
diff -u -r1.23 linprocfs_vnops.c
--- linux/i386/linprocfs/linprocfs_vnops.c	19 Nov 2005 17:58:19 -0000	1.23
+++ linux/i386/linprocfs/linprocfs_vnops.c	8 Dec 2005 22:47:52 -0000
@@ -124,13 +124,7 @@
  * memory images.
  */
 static int
-linprocfs_open(ap)
-	struct vop_open_args /* {
-		struct vnode *a_vp;
-		int  a_mode;
-		struct ucred *a_cred;
-		struct thread *a_td;
-	} */ *ap;
+linprocfs_open(struct vop_open_args *ap)
 {
 	struct pfsnode *pfs = VTOPFS(ap->a_vp);
 	struct proc *p2;
@@ -170,13 +164,7 @@
  * any exclusive open flag (see _open above).
  */
 static int
-linprocfs_close(ap)
-	struct vop_close_args /* {
-		struct vnode *a_vp;
-		int  a_fflag;
-		struct ucred *a_cred;
-		struct thread *a_td;
-	} */ *ap;
+linprocfs_close(struct vop_close_args *ap)
 {
 	struct pfsnode *pfs = VTOPFS(ap->a_vp);
 	struct proc *p;
@@ -214,8 +202,7 @@
  * (vp) is not locked on entry or exit.
  */
 static int
-linprocfs_ioctl(ap)
-	struct vop_ioctl_args *ap;
+linprocfs_ioctl(struct vop_ioctl_args *ap)
 {
 	struct pfsnode *pfs = VTOPFS(ap->a_vp);
 	struct proc *procp;
@@ -307,14 +294,7 @@
  * (EIO) would be a reasonable alternative.
  */
 static int
-linprocfs_bmap(ap)
-	struct vop_bmap_args /* {
-		struct vnode *a_vp;
-		daddr_t  a_bn;
-		struct vnode **a_vpp;
-		daddr_t *a_bnp;
-		int *a_runp;
-	} */ *ap;
+linprocfs_bmap(struct vop_bmap_args *ap)
 {
 
 	if (ap->a_vpp != NULL)
@@ -337,10 +317,7 @@
  *      on exit.
  */
 static int
-linprocfs_inactive(ap)
-	struct vop_inactive_args /* {
-		struct vnode *a_vp;
-	} */ *ap;
+linprocfs_inactive(struct vop_inactive_args *ap)
 {
 	/*struct vnode *vp = ap->a_vp;*/
 
@@ -355,10 +332,7 @@
  * from any private lists.
  */
 static int
-linprocfs_reclaim(ap)
-	struct vop_reclaim_args /* {
-		struct vnode *a_vp;
-	} */ *ap;
+linprocfs_reclaim(struct vop_reclaim_args *ap)
 {
 	return (linprocfs_freevp(ap->a_vp));
 }
@@ -369,10 +343,7 @@
  * of (vp).
  */
 static int
-linprocfs_print(ap)
-	struct vop_print_args /* {
-		struct vnode *a_vp;
-	} */ *ap;
+linprocfs_print(struct vop_print_args *ap)
 {
 	struct pfsnode *pfs = VTOPFS(ap->a_vp);
 
@@ -385,7 +356,7 @@
  * generic entry point for unsupported operations
  */
 static int
-linprocfs_badop()
+linprocfs_badop(void)
 {
 
 	return (EIO);
@@ -401,13 +372,7 @@
  * this is relatively minimal for procfs.
  */
 static int
-linprocfs_getattr(ap)
-	struct vop_getattr_args /* {
-		struct vnode *a_vp;
-		struct vattr *a_vap;
-		struct ucred *a_cred;
-		struct thread *a_td;
-	} */ *ap;
+linprocfs_getattr(struct vop_getattr_args *ap)
 {
 	struct pfsnode *pfs = VTOPFS(ap->a_vp);
 	struct vattr *vap = ap->a_vap;
@@ -547,13 +512,7 @@
 }
 
 static int
-linprocfs_setattr(ap)
-	struct vop_setattr_args /* {
-		struct vnode *a_vp;
-		struct vattr *a_vap;
-		struct ucred *a_cred;
-		struct thread *a_td;
-	} */ *ap;
+linprocfs_setattr(struct vop_setattr_args *ap)
 {
 
 	if (ap->a_vap->va_flags != VNOVAL)
@@ -585,13 +544,7 @@
  * that the operation really does make sense.
  */
 static int
-linprocfs_access(ap)
-	struct vop_access_args /* {
-		struct vnode *a_vp;
-		int a_mode;
-		struct ucred *a_cred;
-		struct thread *a_td;
-	} */ *ap;
+linprocfs_access(struct vop_access_args *ap)
 {
 	struct vattr *vap;
 	struct vattr vattr;
@@ -639,12 +592,7 @@
  * for most pseudo-filesystems very little needs to be done.
  */
 static int
-linprocfs_lookup(ap)
-	struct vop_old_lookup_args /* {
-		struct vnode * a_dvp;
-		struct vnode ** a_vpp;
-		struct componentname * a_cnp;
-	} */ *ap;
+linprocfs_lookup(struct vop_old_lookup_args *ap)
 {
 	struct componentname *cnp = ap->a_cnp;
 	struct vnode **vpp = ap->a_vpp;
@@ -785,8 +733,7 @@
  * Does this process have a text file?
  */
 int
-linprocfs_validfile(p)
-	struct proc *p;
+linprocfs_validfile(struct proc *p)
 {
 
 	return (procfs_findtextvp(p) != NULLVP);
@@ -1005,8 +952,7 @@
  * readlink reads the link of `self' or `exe'
  */
 static int
-linprocfs_readlink(ap)
-	struct vop_readlink_args *ap;
+linprocfs_readlink(struct vop_readlink_args *ap)
 {
 	char buf[16];		/* should be enough */
 	struct proc *procp;
@@ -1051,9 +997,7 @@
  * convert decimal ascii to pid_t
  */
 static pid_t
-atopid(b, len)
-	const char *b;
-	u_int len;
+atopid(const char *b, u_int len)
 {
 	pid_t p = 0;
 
@@ -1101,4 +1045,3 @@
 	{ &vop_ioctl_desc,		(void *) linprocfs_ioctl },
 	{ NULL, NULL }
 };
-
Index: ndis/kern_ndis.c
===================================================================
RCS file: /mnt/share/dragonfly-cvs/src/sys/emulation/ndis/kern_ndis.c,v
retrieving revision 1.7
diff -u -r1.7 kern_ndis.c
--- ndis/kern_ndis.c	9 Jun 2005 20:17:53 -0000	1.7
+++ ndis/kern_ndis.c	9 Dec 2005 07:16:00 -0000
@@ -195,8 +195,7 @@
  */
 
 static void
-ndis_runq(arg)
-	void			*arg;
+ndis_runq(void *arg)
 {
 	struct ndis_req		*r = NULL, *die = NULL;
 	struct ndisproc		*p;
@@ -245,7 +244,7 @@
 }
 
 static int
-ndis_create_kthreads()
+ndis_create_kthreads(void)
 {
 	struct ndis_req		*r;
 	int			i, error = 0;
@@ -289,7 +288,7 @@
 }
 
 static void
-ndis_destroy_kthreads()
+ndis_destroy_kthreads(void)
 {
 	struct ndis_req		*r;
 
@@ -311,8 +310,7 @@
 }
 
 static void
-ndis_stop_thread(t)
-	int			t;
+ndis_stop_thread(int t)
 {
 	struct ndis_req		*r;
 	struct ndisqhead	*q;
@@ -357,8 +355,7 @@
 }
 
 static int
-ndis_enlarge_thrqueue(cnt)
-	int			cnt;
+ndis_enlarge_thrqueue(int cnt)
 {
 	struct ndis_req		*r;
 	int			i;
@@ -376,8 +373,7 @@
 }
 
 static int
-ndis_shrink_thrqueue(cnt)
-	int			cnt;
+ndis_shrink_thrqueue(int cnt)
 {
 	struct ndis_req		*r;
 	int			i;
@@ -400,10 +396,7 @@
 }
 
 int
-ndis_unsched(func, arg, t)
-	void			(*func)(void *);
-	void			*arg;
-	int			t;
+ndis_unsched(void (*func)(void *), void *arg, int t)
 {
 	struct ndis_req		*r;
 	struct ndisqhead	*q;
@@ -434,10 +427,7 @@
 }
 
 int
-ndis_sched(func, arg, t)
-	void			(*func)(void *);
-	void			*arg;
-	int			t;
+ndis_sched(void (*func)(void *), void *arg, int t)
 {
 	struct ndis_req		*r;
 	struct ndisqhead	*q;
@@ -494,9 +484,7 @@
 }
 
 int
-ndis_thsuspend(td, timo)
-	int			timo;
+ndis_thsuspend(thread_t td, int timo)
 {
 	int			error;
 
@@ -505,25 +493,20 @@
 }
 
 void
-ndis_thresume(td)
-	struct thread		*td;
+ndis_thresume(struct thread *td)
 {
 	wakeup(td);
 }
 
 __stdcall static void
-ndis_sendrsrcavail_func(adapter)
-	ndis_handle		adapter;
+ndis_sendrsrcavail_func(ndis_handle adapter)
 {
 	return;
 }
 
 __stdcall static void
-ndis_status_func(adapter, status, sbuf, slen)
-	ndis_handle		adapter;
-	ndis_status		status;
-	void			*sbuf;
-	uint32_t		slen;
+ndis_status_func(ndis_handle adapter, ndis_status status, void *sbuf,
+		 uint32_t slen)
 {
 	ndis_miniport_block	*block;
 	block = adapter;
@@ -534,8 +517,7 @@
 }
 
 __stdcall static void
-ndis_statusdone_func(adapter)
-	ndis_handle		adapter;
+ndis_statusdone_func(ndis_handle adapter)
 {
 	ndis_miniport_block	*block;
 	block = adapter;
@@ -546,9 +528,7 @@
 }
 
 __stdcall static void
-ndis_setdone_func(adapter, status)
-	ndis_handle		adapter;
-	ndis_status		status;
+ndis_setdone_func(ndis_handle adapter, ndis_status status)
 {
 	ndis_miniport_block	*block;
 	block = adapter;
@@ -559,9 +539,7 @@
 }
 
 __stdcall static void
-ndis_getdone_func(adapter, status)
-	ndis_handle		adapter;
-	ndis_status		status;
+ndis_getdone_func(ndis_handle adapter, ndis_status status)
 {
 	ndis_miniport_block	*block;
 	block = adapter;
@@ -572,10 +550,8 @@
 }
 
 __stdcall static void
-ndis_resetdone_func(adapter, status, addressingreset)
-	ndis_handle		adapter;
-	ndis_status		status;
-	uint8_t			addressingreset;
+ndis_resetdone_func(ndis_handle adapter, ndis_status status,
+		    uint8_t addressingreset)
 {
 	ndis_miniport_block	*block;
 	block = adapter;
@@ -587,8 +563,7 @@
 }
 
 int
-ndis_create_sysctls(arg)
-	void			*arg;
+ndis_create_sysctls(void *arg)
 {
 	struct ndis_softc	*sc;
 	ndis_cfg		*vals;
@@ -672,12 +647,7 @@
 }
 
 int
-ndis_add_sysctl(arg, key, desc, val, flag)
-	void			*arg;
-	char			*key;
-	char			*desc;
-	char			*val;
-	int			flag;
+ndis_add_sysctl(void *arg, char *key, char *desc, char *val, int flag)
 {
 	struct ndis_softc	*sc;
 	struct ndis_cfglist	*cfg;
@@ -713,8 +683,7 @@
 }
 
 int
-ndis_flush_sysctls(arg)
-	void			*arg;
+ndis_flush_sysctls(void *arg)
 {
 	struct ndis_softc	*sc;
 	struct ndis_cfglist	*cfg;
@@ -733,8 +702,7 @@
 }
 
 static void
-ndis_return(arg)
-	void			*arg;
+ndis_return(void *arg)
 {
 	struct ndis_softc	*sc;
 	ndis_return_handler	returnfunc;
@@ -792,8 +760,7 @@
 }
 
 void
-ndis_free_bufs(b0)
-	ndis_buffer		*b0;
+ndis_free_bufs(ndis_buffer *b0)
 {
 	ndis_buffer		*next;
 
@@ -810,8 +777,7 @@
 }
 
 void
-ndis_free_packet(p)
-	ndis_packet		*p;
+ndis_free_packet(ndis_packet *p)
 {
 	if (p == NULL)
 		return;
@@ -823,8 +789,7 @@
 }
 
 int
-ndis_convert_res(arg)
-	void			*arg;
+ndis_convert_res(void *arg)
 {
 	struct ndis_softc	*sc;
 	ndis_resource_list	*rl = NULL;
@@ -947,9 +912,7 @@
  */ 
 
 int
-ndis_ptom(m0, p)
-	struct mbuf		**m0;
-	ndis_packet		*p;
+ndis_ptom(struct mbuf **m0, ndis_packet *p)
 {
 	struct mbuf		*m, *prev = NULL;
 	ndis_buffer		*buf;
@@ -1015,9 +978,7 @@
  */
 
 int
-ndis_mtop(m0, p)
-	struct mbuf		*m0;
-	ndis_packet		**p;
+ndis_mtop(struct mbuf *m0, ndis_packet **p)
 {
 	struct mbuf		*m;
 	ndis_buffer		*buf = NULL, *prev = NULL;
@@ -1063,10 +1024,7 @@
 }
 
 int
-ndis_get_supported_oids(arg, oids, oidcnt)
-	void			*arg;
-	ndis_oid		**oids;
-	int			*oidcnt;
+ndis_get_supported_oids(void *arg, ndis_oid **oids, int *oidcnt)
 {
 	int			len, rval;
 	ndis_oid		*o;
@@ -1092,11 +1050,7 @@
 }
 
 int
-ndis_set_info(arg, oid, buf, buflen)
-	void			*arg;
-	ndis_oid		oid;
-	void			*buf;
-	int			*buflen;
+ndis_set_info(void *arg, ndis_oid oid, void *buf, int *buflen)
 {
 	struct ndis_softc	*sc;
 	ndis_status		rval;
@@ -1151,10 +1105,7 @@
 typedef __stdcall void (*ndis_senddone_func)(ndis_handle, ndis_packet *, ndis_status);
 
 int
-ndis_send_packets(arg, packets, cnt)
-	void			*arg;
-	ndis_packet		**packets;
-	int			cnt;
+ndis_send_packets(void *arg, ndis_packet **packets, int cnt)
 {
 	struct ndis_softc	*sc;
 	ndis_handle		adapter;
@@ -1191,9 +1142,7 @@
 }
 
 int
-ndis_send_packet(arg, packet)
-	void			*arg;
-	ndis_packet		*packet;
+ndis_send_packet(void *arg, ndis_packet *packet)
 {
 	struct ndis_softc	*sc;
 	ndis_handle		adapter;
@@ -1222,8 +1171,7 @@
 }
 
 int
-ndis_init_dma(arg)
-	void			*arg;
+ndis_init_dma(void *arg)
 {
 	struct ndis_softc	*sc;
 	int			i, error;
@@ -1246,8 +1194,7 @@
 }
 
 int
-ndis_destroy_dma(arg)
-	void			*arg;
+ndis_destroy_dma(void *arg)
 {
 	struct ndis_softc	*sc;
 	struct mbuf		*m;
@@ -1274,8 +1221,7 @@
 }
 
 int
-ndis_reset_nic(arg)
-	void			*arg;
+ndis_reset_nic(void *arg)
 {
 	struct ndis_softc	*sc;
 	ndis_handle		adapter;
@@ -1307,8 +1253,7 @@
 }
 
 int
-ndis_halt_nic(arg)
-	void			*arg;
+ndis_halt_nic(void *arg)
 {
 	struct ndis_softc	*sc;
 	ndis_handle		adapter;
@@ -1345,8 +1290,7 @@
 }
 
 int
-ndis_shutdown_nic(arg)
-	void			*arg;
+ndis_shutdown_nic(void *arg)
 {
 	struct ndis_softc	*sc;
 	ndis_handle		adapter;
@@ -1373,8 +1317,7 @@
 }
 
 int
-ndis_init_nic(arg)
-	void			*arg;
+ndis_init_nic(void *arg)
 {
 	struct ndis_softc	*sc;
 	ndis_miniport_block	*block;
@@ -1417,8 +1360,7 @@
 }
 
 void
-ndis_enable_intr(arg)
-	void			*arg;
+ndis_enable_intr(void *arg)
 {
 	struct ndis_softc	*sc;
 	ndis_handle		adapter;
@@ -1435,8 +1377,7 @@
 }
 
 void
-ndis_disable_intr(arg)
-	void			*arg;
+ndis_disable_intr(void *arg)
 {
 	struct ndis_softc	*sc;
 	ndis_handle		adapter;
@@ -1456,10 +1397,7 @@
 }
 
 int
-ndis_isr(arg, ourintr, callhandler)
-	void			*arg;
-	int			*ourintr;
-	int			*callhandler;
+ndis_isr(void *arg, int *ourintr, int *callhandler)
 {
 	struct ndis_softc	*sc;
 	ndis_handle		adapter;
@@ -1483,8 +1421,7 @@
 }
 
 int
-ndis_intrhand(arg)
-	void			*arg;
+ndis_intrhand(void *arg)
 {
 	struct ndis_softc	*sc;
 	ndis_handle		adapter;
@@ -1508,11 +1445,7 @@
 }
 
 int
-ndis_get_info(arg, oid, buf, buflen)
-	void			*arg;
-	ndis_oid		oid;
-	void			*buf;
-	int			*buflen;
+ndis_get_info(void *arg, ndis_oid oid, void *buf, int *buflen)
 {
 	struct ndis_softc	*sc;
 	ndis_status		rval;
@@ -1568,8 +1501,7 @@
 }
 
 int
-ndis_unload_driver(arg)
-	void			*arg;
+ndis_unload_driver(void *arg)
 {
 	struct ndis_softc	*sc;
 
@@ -1588,9 +1520,7 @@
 #define NDIS_LOADED		htonl(0x42534F44)
 
 int
-ndis_load_driver(img, arg)
-	vm_offset_t		img;
-	void			*arg;
+ndis_load_driver(vm_offset_t img, void *arg)
 {
 	driver_entry		entry;
 	image_optional_header	opt_hdr;
Index: ndis/subr_hal.c
===================================================================
RCS file: /mnt/share/dragonfly-cvs/src/sys/emulation/ndis/subr_hal.c,v
retrieving revision 1.1
diff -u -r1.1 subr_hal.c
--- ndis/subr_hal.c	29 Jul 2004 20:51:34 -0000	1.1
+++ ndis/subr_hal.c	9 Dec 2005 06:42:56 -0000
@@ -86,45 +86,35 @@
 extern struct mtx_pool *ndis_mtxpool;
 
 __stdcall static void
-hal_stall_exec_cpu(usecs)
-	uint32_t		usecs;
+hal_stall_exec_cpu(uint32_t usecs)
 {
 	DELAY(usecs);
 	return;
 }
 
 __stdcall static void
-hal_writeport_ulong(port, val)
-	uint32_t		*port;
-	uint32_t		val;
+hal_writeport_ulong(uint32_t *port, uint32_t val)
 {
 	bus_space_write_4(NDIS_BUS_SPACE_IO, 0x0, (bus_size_t)port, val);
 	return;
 }
 
 __stdcall static void
-hal_writeport_ushort(port, val)
-	uint16_t		*port;
-	uint16_t		val;
+hal_writeport_ushort(uint16_t *port, uint16_t val)
 {
 	bus_space_write_2(NDIS_BUS_SPACE_IO, 0x0, (bus_size_t)port, val);
 	return;
 }
 
 __stdcall static void
-hal_writeport_uchar(port, val)
-	uint8_t			*port;
-	uint8_t			val;
+hal_writeport_uchar(uint8_t *port, uint8_t val)
 {
 	bus_space_write_1(NDIS_BUS_SPACE_IO, 0x0, (bus_size_t)port, val);
 	return;
 }
 
 __stdcall static void
-hal_writeport_buf_ulong(port, val, cnt)
-	uint32_t		*port;
-	uint32_t		*val;
-	uint32_t		cnt;
+hal_writeport_buf_ulong(uint32_t *port, uint32_t *val, uint32_t cnt)
 {
 	bus_space_write_multi_4(NDIS_BUS_SPACE_IO, 0x0,
 	    (bus_size_t)port, val, cnt);
@@ -132,10 +122,7 @@
 }
 
 __stdcall static void
-hal_writeport_buf_ushort(port, val, cnt)
-	uint16_t		*port;
-	uint16_t		*val;
-	uint32_t		cnt;
+hal_writeport_buf_ushort(uint16_t *port, uint16_t *val, uint32_t cnt)
 {
 	bus_space_write_multi_2(NDIS_BUS_SPACE_IO, 0x0,
 	    (bus_size_t)port, val, cnt);
@@ -143,10 +130,7 @@
 }
 
 __stdcall static void
-hal_writeport_buf_uchar(port, val, cnt)
-	uint8_t			*port;
-	uint8_t			*val;
-	uint32_t		cnt;
+hal_writeport_buf_uchar(uint8_t *port, uint8_t *val, uint32_t cnt)
 {
 	bus_space_write_multi_1(NDIS_BUS_SPACE_IO, 0x0,
 	    (bus_size_t)port, val, cnt);
@@ -154,31 +138,25 @@
 }
 
 __stdcall static uint16_t
-hal_readport_ushort(port)
-	uint16_t		*port;
+hal_readport_ushort(uint16_t *port)
 {
 	return(bus_space_read_2(NDIS_BUS_SPACE_IO, 0x0, (bus_size_t)port));
 }
 
 __stdcall static uint32_t
-hal_readport_ulong(port)
-	uint32_t		*port;
+hal_readport_ulong(uint32_t *port)
 {
 	return(bus_space_read_4(NDIS_BUS_SPACE_IO, 0x0, (bus_size_t)port));
 }
 
 __stdcall static uint8_t
-hal_readport_uchar(port)
-	uint8_t			*port;
+hal_readport_uchar(uint8_t *port)
 {
 	return(bus_space_read_1(NDIS_BUS_SPACE_IO, 0x0, (bus_size_t)port));
 }
 
 __stdcall static void
-hal_readport_buf_ulong(port, val, cnt)
-	uint32_t		*port;
-	uint32_t		*val;
-	uint32_t		cnt;
+hal_readport_buf_ulong(uint32_t *port, uint32_t *val, uint32_t cnt)
 {
 	bus_space_read_multi_4(NDIS_BUS_SPACE_IO, 0x0,
 	    (bus_size_t)port, val, cnt);
@@ -186,10 +164,7 @@
 }
 
 __stdcall static void
-hal_readport_buf_ushort(port, val, cnt)
-	uint16_t		*port;
-	uint16_t		*val;
-	uint32_t		cnt;
+hal_readport_buf_ushort(uint16_t *port, uint16_t *val, uint32_t cnt)
 {
 	bus_space_read_multi_2(NDIS_BUS_SPACE_IO, 0x0,
 	    (bus_size_t)port, val, cnt);
@@ -197,10 +172,7 @@
 }
 
 __stdcall static void
-hal_readport_buf_uchar(port, val, cnt)
-	uint8_t			*port;
-	uint8_t			*val;
-	uint32_t		cnt;
+hal_readport_buf_uchar(uint8_t *port, uint8_t *val, uint32_t cnt)
 {
 	bus_space_read_multi_1(NDIS_BUS_SPACE_IO, 0x0,
 	    (bus_size_t)port, val, cnt);
@@ -287,8 +259,7 @@
 }
 
 __stdcall static uint64_t
-hal_perfcount(freq)
-	uint64_t		*freq;
+hal_perfcount(uint64_t *freq)
 {
 	if (freq != NULL)
 		*freq = hz;
@@ -326,7 +297,7 @@
 }
 
 __stdcall
-static void dummy()
+static void dummy(void)
 {
 	printf ("hal dummy called...\n");
 	return;
Index: ndis/subr_ndis.c
===================================================================
RCS file: /mnt/share/dragonfly-cvs/src/sys/emulation/ndis/subr_ndis.c,v
retrieving revision 1.8
diff -u -r1.8 subr_ndis.c
--- ndis/subr_ndis.c	17 Nov 2004 18:59:21 -0000	1.8
+++ ndis/subr_ndis.c	9 Dec 2005 00:17:22 -0000
@@ -293,14 +293,14 @@
 #define NDIS_POOL_EXTRA		16
 
 int
-ndis_libinit()
+ndis_libinit(void)
 {
 	strcpy(ndis_filepath, "/compat/ndis");
 	return(0);
 }
 
 int
-ndis_libfini()
+ndis_libfini(void)
 {
 	return(0);
 }
@@ -313,9 +313,7 @@
  */
 
 int
-ndis_ascii_to_unicode(ascii, unicode)
-	char			*ascii;
-	uint16_t		**unicode;
+ndis_ascii_to_unicode(char *ascii, uint16_t **unicode)
 {
 	uint16_t		*ustr;
 	int			i;
@@ -332,10 +330,7 @@
 }
 
 int
-ndis_unicode_to_ascii(unicode, ulen, ascii)
-	uint16_t		*unicode;
-	int			ulen;
-	char			**ascii;
+ndis_unicode_to_ascii(uint16_t *unicode, int ulen, char **ascii)
 {
 	uint8_t			*astr;
 	int			i;
@@ -352,11 +347,8 @@
 }
 
 __stdcall static void
-ndis_initwrap(wrapper, drv_obj, path, unused)
-	ndis_handle		*wrapper;
-	device_object		*drv_obj;
-	void			*path;
-	void			*unused;
+ndis_initwrap(ndis_handle *wrapper, device_object *drv_obj, void *path,
+	      void *unused)
 {
 	ndis_miniport_block	*block;
 
@@ -367,18 +359,15 @@
 }
 
 __stdcall static void
-ndis_termwrap(handle, syspec)
-	ndis_handle		handle;
-	void			*syspec;
+ndis_termwrap(ndis_handle handle, void *syspec)
 {
 	return;
 }
 
 __stdcall static ndis_status
-ndis_register_miniport(handle, characteristics, len)
-	ndis_handle		handle;
-	ndis_miniport_characteristics *characteristics;
-	int			len;
+ndis_register_miniport(ndis_handle handle,
+		       ndis_miniport_characteristics *characteristics,
+		       int len)
 {
 	ndis_miniport_block	*block;
 	struct ndis_softc	*sc;
@@ -398,10 +387,7 @@
 }
 
 __stdcall static ndis_status
-ndis_malloc_withtag(vaddr, len, tag)
-	void			**vaddr;
-	uint32_t		len;
-	uint32_t		tag;
+ndis_malloc_withtag(void **vaddr, uint32_t len, uint32_t tag)
 {
 	void			*mem;
 
@@ -414,11 +400,8 @@
 }
 
 __stdcall static ndis_status
-ndis_malloc(vaddr, len, flags, highaddr)
-	void			**vaddr;
-	uint32_t		len;
-	uint32_t		flags;
-	ndis_physaddr		highaddr;
+ndis_malloc(void **vaddr, uint32_t len, uint32_t flags,
+	    ndis_physaddr highaddr)
 {
 	void			*mem;
 
@@ -431,10 +414,7 @@
 }
 
 __stdcall static void
-ndis_free(vaddr, len, flags)
-	void			*vaddr;
-	uint32_t		len;
-	uint32_t		flags;
+ndis_free(void *vaddr, uint32_t len, uint32_t flags)
 {
 	if (len == 0)
 		return;
@@ -444,13 +424,9 @@
 }
 
 __stdcall static ndis_status
-ndis_setattr_ex(adapter_handle, adapter_ctx, hangsecs,
-			flags, iftype)
-	ndis_handle			adapter_handle;
-	ndis_handle			adapter_ctx;
-	uint32_t			hangsecs;
-	uint32_t			flags;
-	ndis_interface_type		iftype;
+ndis_setattr_ex(ndis_handle adapter_handle, ndis_handle adapter_ctx,
+		uint32_t hangsecs, uint32_t flags,
+		ndis_interface_type iftype)
 {
 	ndis_miniport_block		*block;
 
@@ -467,10 +443,7 @@
 }
 
 __stdcall static void
-ndis_open_cfg(status, cfg, wrapctx)
-	ndis_status		*status;
-	ndis_handle		*cfg;
-	ndis_handle		wrapctx;
+ndis_open_cfg(ndis_status *status, ndis_handle *cfg, ndis_handle wrapctx)
 {
 	*cfg = wrapctx;
 	*status = NDIS_STATUS_SUCCESS;
@@ -478,11 +451,8 @@
 }
 
 __stdcall static void
-ndis_open_cfgbyname(status, cfg, subkey, subhandle)
-	ndis_status		*status;
-	ndis_handle		cfg;
-	ndis_unicode_string	*subkey;
-	ndis_handle		*subhandle;
+ndis_open_cfgbyname(ndis_status *status, ndis_handle cfg,
+		    ndis_unicode_string *subkey, ndis_handle *subhandle)
 {
 	*subhandle = cfg;
 	*status = NDIS_STATUS_SUCCESS;
@@ -490,23 +460,16 @@
 }
 
 __stdcall static void
-ndis_open_cfgbyidx(status, cfg, idx, subkey, subhandle)
-	ndis_status		*status;
-	ndis_handle		cfg;
-	uint32_t		idx;
-	ndis_unicode_string	*subkey;
-	ndis_handle		*subhandle;
+ndis_open_cfgbyidx(ndis_status *status, ndis_handle cfg, uint32_t idx,
+		   ndis_unicode_string *subkey, ndis_handle *subhandle)
 {
 	*status = NDIS_STATUS_FAILURE;
 	return;
 }
 
 static ndis_status
-ndis_encode_parm(block, oid, type, parm)
-	ndis_miniport_block	*block;
-        struct sysctl_oid	*oid;
-	ndis_parm_type		type;
-	ndis_config_parm	**parm;
+ndis_encode_parm(ndis_miniport_block *block, struct sysctl_oid *oid,
+		 ndis_parm_type type, ndis_config_parm **parm)
 {
 	uint16_t		*unicode;
 	ndis_unicode_string	*ustr;
@@ -549,9 +512,7 @@
 }
 
 int
-ndis_strcasecmp(s1, s2)
-        const char              *s1;
-        const char              *s2;
+ndis_strcasecmp(const char *s1, const char *s2)
 {
 	char			a, b;
 
@@ -573,12 +534,8 @@
 }
 
 __stdcall static void
-ndis_read_cfg(status, parm, cfg, key, type)
-	ndis_status		*status;
-	ndis_config_parm	**parm;
-	ndis_handle		cfg;
-	ndis_unicode_string	*key;
-	ndis_parm_type		type;
+ndis_read_cfg(ndis_status *status, ndis_config_parm **parm, ndis_handle cfg,
+	      ndis_unicode_string *key, ndis_parm_type type)
 {
 	char			*keystr = NULL;
 	uint16_t		*unicode;
@@ -648,10 +605,8 @@
 }
 
 static ndis_status
-ndis_decode_parm(block, parm, val)
-	ndis_miniport_block	*block;
-	ndis_config_parm	*parm;
-	char			*val;
+ndis_decode_parm(ndis_miniport_block *block, ndis_config_parm *parm,
+		 char *val)
 {
 	ndis_unicode_string	*ustr;
 	char			*astr = NULL;
@@ -677,11 +632,8 @@
 }
 
 __stdcall static void
-ndis_write_cfg(status, cfg, key, parm)
-	ndis_status		*status;
-	ndis_handle		cfg;
-	ndis_unicode_string	*key;
-	ndis_config_parm	*parm;
+ndis_write_cfg(ndis_status *status, ndis_handle cfg, ndis_unicode_string *key,
+	       ndis_config_parm *parm)
 {
 	char			*keystr = NULL;
 	ndis_miniport_block	*block;
@@ -729,8 +681,7 @@
 }
 
 __stdcall static void
-ndis_close_cfg(cfg)
-	ndis_handle		cfg;
+ndis_close_cfg(ndis_handle cfg)
 {
 	return;
 }
@@ -739,8 +690,7 @@
  * Initialize a Windows spinlock.
  */
 __stdcall static void
-ndis_create_lock(lock)
-	ndis_spin_lock		*lock;
+ndis_create_lock(ndis_spin_lock *lock)
 {
 	lock->nsl_spinlock = 0;
 	lock->nsl_kirql = 0;
@@ -757,8 +707,7 @@
  * talking to you.)
  */
 __stdcall static void
-ndis_destroy_lock(lock)
-	ndis_spin_lock		*lock;
+ndis_destroy_lock(ndis_spin_lock *lock)
 {
 #ifdef notdef
 	lock->nsl_spinlock = 0;
@@ -772,8 +721,7 @@
  */
 
 __stdcall static void
-ndis_lock(lock)
-	ndis_spin_lock		*lock;
+ndis_lock(ndis_spin_lock *lock)
 {
 	lock->nsl_kirql = FASTCALL2(hal_lock,
 	    &lock->nsl_spinlock, DISPATCH_LEVEL);
@@ -785,8 +733,7 @@
  */
 
 __stdcall static void
-ndis_unlock(lock)
-	ndis_spin_lock		*lock;
+ndis_unlock(ndis_spin_lock *lock)
 {
 	FASTCALL2(hal_unlock, &lock->nsl_spinlock, lock->nsl_kirql);
 	return;
@@ -796,8 +743,7 @@
  * Acquire a spinlock when already running at IRQL == DISPATCH_LEVEL.
  */
 __stdcall static void
-ndis_lock_dpr(lock)
-	ndis_spin_lock		*lock;
+ndis_lock_dpr(ndis_spin_lock *lock)
 {
 	FASTCALL1(ntoskrnl_lock_dpc, &lock->nsl_spinlock);
 	return;
@@ -807,20 +753,15 @@
  * Release a spinlock without leaving IRQL == DISPATCH_LEVEL.
  */
 __stdcall static void
-ndis_unlock_dpr(lock)
-	ndis_spin_lock		*lock;
+ndis_unlock_dpr(ndis_spin_lock *lock)
 {
 	FASTCALL1(ntoskrnl_unlock_dpc, &lock->nsl_spinlock);
 	return;
 }
 
 __stdcall static uint32_t
-ndis_read_pci(adapter, slot, offset, buf, len)
-	ndis_handle		adapter;
-	uint32_t		slot;
-	uint32_t		offset;
-	void			*buf;
-	uint32_t		len;
+ndis_read_pci(ndis_handle adapter, uint32_t slot, uint32_t offset,
+	      void *buf, uint32_t len)
 {
 	ndis_miniport_block	*block;
 	int			i;
@@ -838,12 +779,8 @@
 }
 
 __stdcall static uint32_t
-ndis_write_pci(adapter, slot, offset, buf, len)
-	ndis_handle		adapter;
-	uint32_t		slot;
-	uint32_t		offset;
-	void			*buf;
-	uint32_t		len;
+ndis_write_pci(ndis_handle adapter, uint32_t slot, uint32_t offset,
+	       void *buf, uint32_t len)
 {
 	ndis_miniport_block	*block;
 	int			i;
@@ -901,11 +838,7 @@
 }
 
 static void
-ndis_map_cb(arg, segs, nseg, error)
-	void			*arg;
-	bus_dma_segment_t	*segs;
-	int			nseg;
-	int			error;
+ndis_map_cb(void *arg, bus_dma_segment_t *segs, int nseg, int error)
 {
 	struct ndis_map_arg	*ctx;
 	int			i;
@@ -926,13 +859,9 @@
 }
 
 __stdcall static void
-ndis_vtophys_load(adapter, buf, mapreg, writedev, addrarray, arraysize)
-	ndis_handle		adapter;
-	ndis_buffer		*buf;
-	uint32_t		mapreg;
-	uint8_t			writedev;
-	ndis_paddr_unit		*addrarray;
-	uint32_t		*arraysize;
+ndis_vtophys_load(ndis_handle adapter, ndis_buffer *buf, uint32_t mapreg,
+		  uint8_t writedev, ndis_paddr_unit *addrarray,
+		  uint32_t *arraysize)
 {
 	ndis_miniport_block	*block;
 	struct ndis_softc	*sc;
@@ -968,10 +897,8 @@
 }
 
 __stdcall static void
-ndis_vtophys_unload(adapter, buf, mapreg)
-	ndis_handle		adapter;
-	ndis_buffer		*buf;
-	uint32_t		mapreg;
+ndis_vtophys_unload(ndis_handle adapter, ndis_buffer *buf,
+		    uint32_t mapreg)
 {
 	ndis_miniport_block	*block;
 	struct ndis_softc	*sc;
@@ -1009,10 +936,7 @@
  */
 
 __stdcall static void
-ndis_init_timer(timer, func, ctx)
-	ndis_timer		*timer;
-	ndis_timer_function	func;
-	void			*ctx;
+ndis_init_timer(ndis_timer *timer, ndis_timer_function func, void *ctx)
 {
 	ntoskrnl_init_timer(&timer->nt_ktimer);
 	ntoskrnl_init_dpc(&timer->nt_kdpc, func, ctx);
@@ -1021,11 +945,8 @@
 }
 
 __stdcall static void
-ndis_create_timer(timer, handle, func, ctx)
-	ndis_miniport_timer	*timer;
-	ndis_handle		handle;
-	ndis_timer_function	func;
-	void			*ctx;
+ndis_create_timer(ndis_miniport_timer *timer, ndis_handle handle,
+		  ndis_timer_function func, void *ctx)
 {
 	/* Save the funcptr and context */
 
@@ -1044,9 +965,7 @@
  * but the former is just a macro wrapper around the latter.
  */
 __stdcall static void
-ndis_set_timer(timer, msecs)
-	ndis_timer		*timer;
-	uint32_t		msecs;
+ndis_set_timer(ndis_timer *timer, uint32_t msecs)
 {
 	/*
 	 * KeSetTimer() wants the period in
@@ -1059,9 +978,7 @@
 }
 
 __stdcall static void
-ndis_set_periodic_timer(timer, msecs)
-	ndis_miniport_timer	*timer;
-	uint32_t		msecs;
+ndis_set_periodic_timer(ndis_miniport_timer *timer, uint32_t msecs)
 {
 	ntoskrnl_set_timer_ex(&timer->nmt_ktimer,
 	    ((int64_t)msecs * -10000), msecs, &timer->nmt_kdpc);
@@ -1077,9 +994,7 @@
  */
 
 __stdcall static void
-ndis_cancel_timer(timer, cancelled)
-	ndis_timer		*timer;
-	uint8_t			*cancelled;
+ndis_cancel_timer(ndis_timer *timer, uint8_t *cancelled)
 {
 	*cancelled = ntoskrnl_cancel_timer(&timer->nt_ktimer);
 
@@ -1087,11 +1002,8 @@
 }
 
 __stdcall static void
-ndis_query_resources(status, adapter, list, buflen)
-	ndis_status		*status;
-	ndis_handle		adapter;
-	ndis_resource_list	*list;
-	uint32_t		*buflen;
+ndis_query_resources(ndis_status *status, ndis_handle adapter,
+		     ndis_resource_list *list, uint32_t *buflen)
 {
 	ndis_miniport_block	*block;
 	struct ndis_softc	*sc;
@@ -1114,11 +1026,8 @@
 }
 
 __stdcall static ndis_status
-ndis_register_ioport(offset, adapter, port, numports)
-	void			**offset;
-	ndis_handle		adapter;
-	uint32_t		port;
-	uint32_t		numports;
+ndis_register_ioport(void **offset, ndis_handle adapter,
+		     uint32_t port, uint32_t numports)
 {
 	struct ndis_miniport_block	*block;
 	struct ndis_softc	*sc;
@@ -1142,21 +1051,15 @@
 }
 
 __stdcall static void
-ndis_deregister_ioport(adapter, port, numports, offset)
-	ndis_handle		adapter;
-	uint32_t		port;
-	uint32_t		numports;
-	void			*offset;
+ndis_deregister_ioport(ndis_handle adapter, uint32_t port,
+		       uint32_t numports, void *offset)
 {
 	return;
 }
 
 __stdcall static void
-ndis_read_netaddr(status, addr, addrlen, adapter)
-	ndis_status		*status;
-	void			**addr;
-	uint32_t		*addrlen;
-	ndis_handle		adapter;
+ndis_read_netaddr(ndis_status *status, void **addr,
+		  uint32_t *addrlen, ndis_handle adapter)
 {
 	struct ndis_softc	*sc;
 	ndis_miniport_block	*block;
@@ -1177,21 +1080,15 @@
 }
 
 __stdcall static ndis_status
-ndis_mapreg_cnt(bustype, cnt)
-	uint32_t		bustype;
-	uint32_t		*cnt;
+ndis_mapreg_cnt(uint32_t bustype, uint32_t *cnt)
 {
 	*cnt = 8192;
 	return(NDIS_STATUS_SUCCESS);
 }
 
 __stdcall static ndis_status
-ndis_alloc_mapreg(adapter, dmachannel, dmasize, physmapneeded, maxmap)
-	ndis_handle		adapter;
-	uint32_t		dmachannel;
-	uint8_t			dmasize;
-	uint32_t		physmapneeded;
-	uint32_t		maxmap;
+ndis_alloc_mapreg(ndis_handle adapter, uint32_t dmachannel, uint8_t dmasize,
+		  uint32_t physmapneeded, uint32_t maxmap)
 {
 	struct ndis_softc	*sc;
 	ndis_miniport_block	*block;
@@ -1225,8 +1122,7 @@
 }
 
 __stdcall static void
-ndis_free_mapreg(adapter)
-	ndis_handle		adapter;
+ndis_free_mapreg(ndis_handle adapter)
 {
 	struct ndis_softc	*sc;
 	ndis_miniport_block	*block;
@@ -1246,11 +1142,7 @@
 }
 
 static void
-ndis_mapshared_cb(arg, segs, nseg, error)
-	void			*arg;
-	bus_dma_segment_t	*segs;
-	int			nseg;
-	int			error;
+ndis_mapshared_cb(void *arg, bus_dma_segment_t *segs, int nseg, int error)
 {
 	ndis_physaddr		*p;
 
@@ -1268,12 +1160,8 @@
  * This maps to bus_dmamem_alloc().
  */
 __stdcall static void
-ndis_alloc_sharedmem(adapter, len, cached, vaddr, paddr)
-	ndis_handle		adapter;
-	uint32_t		len;
-	uint8_t			cached;
-	void			**vaddr;
-	ndis_physaddr		*paddr;
+ndis_alloc_sharedmem(ndis_handle adapter, uint32_t len, uint8_t cached,
+		     void **vaddr, ndis_physaddr *paddr)
 {
 	ndis_miniport_block	*block;
 	struct ndis_softc	*sc;
@@ -1348,8 +1236,7 @@
 };
 
 static void
-ndis_asyncmem_complete(arg)
-	void			*arg;
+ndis_asyncmem_complete(void *arg)
 {
 	ndis_miniport_block	*block;
 	struct ndis_softc	*sc;
@@ -1376,11 +1263,8 @@
 }
 
 __stdcall static ndis_status
-ndis_alloc_sharedmem_async(adapter, len, cached, ctx)
-	ndis_handle		adapter;
-	uint32_t		len;
-	uint8_t			cached;
-	void			*ctx;
+ndis_alloc_sharedmem_async(ndis_handle adapter, uint32_t len,
+			   uint8_t cached, void *ctx)
 {
 	struct ndis_allocwork	*w;
 
@@ -1410,12 +1294,8 @@
 }
 
 __stdcall static void
-ndis_free_sharedmem(adapter, len, cached, vaddr, paddr)
-	ndis_handle		adapter;
-	uint32_t		len;
-	uint8_t			cached;
-	void			*vaddr;
-	ndis_physaddr		paddr;
+ndis_free_sharedmem(ndis_handle adapter, uint32_t len, uint8_t cached,
+		    void *vaddr, ndis_physaddr paddr)
 {
 	ndis_miniport_block	*block;
 	struct ndis_softc	*sc;
@@ -1450,11 +1330,8 @@
 }
 
 __stdcall static ndis_status
-ndis_map_iospace(vaddr, adapter, paddr, len)
-	void			**vaddr;
-	ndis_handle		adapter;
-	ndis_physaddr		paddr;
-	uint32_t		len;
+ndis_map_iospace(void **vaddr, ndis_handle adapter, ndis_physaddr paddr,
+		 uint32_t len)
 {
 	ndis_miniport_block	*block;
 	struct ndis_softc	*sc;
@@ -1481,10 +1358,7 @@
 }
 
 __stdcall static void
-ndis_unmap_iospace(adapter, vaddr, len)
-	ndis_handle		adapter;
-	void			*vaddr;
-	uint32_t		len;
+ndis_unmap_iospace(ndis_handle adapter, void *vaddr, uint32_t len)
 {
 	return;
 }
@@ -1496,8 +1370,7 @@
 }
 
 __stdcall static uint32_t
-ndis_dma_align(handle)
-	ndis_handle		handle;
+ndis_dma_align(ndis_handle handle)
 {
 	return(128);
 }
@@ -1514,10 +1387,7 @@
  */
 
 __stdcall static ndis_status
-ndis_init_sc_dma(adapter, is64, maxphysmap)
-	ndis_handle		adapter;
-	uint8_t			is64;
-	uint32_t		maxphysmap;
+ndis_init_sc_dma(ndis_handle adapter, uint8_t is64, uint32_t maxphysmap)
 {
 	struct ndis_softc	*sc;
 	ndis_miniport_block	*block;
@@ -1543,11 +1413,8 @@
 }
 
 __stdcall static void
-ndis_alloc_packetpool(status, pool, descnum, protrsvdlen)
-	ndis_status		*status;
-	ndis_handle		*pool;
-	uint32_t		descnum;
-	uint32_t		protrsvdlen;
+ndis_alloc_packetpool(ndis_status *status, ndis_handle *pool,
+		      uint32_t descnum, uint32_t protrsvdlen)
 {
 	ndis_packet		*cur;
 	int			i;
@@ -1568,20 +1435,16 @@
 }
 
 __stdcall static void
-ndis_ex_alloc_packetpool(status, pool, descnum, oflowdescnum, protrsvdlen)
-	ndis_status		*status;
-	ndis_handle		*pool;
-	uint32_t		descnum;
-	uint32_t		oflowdescnum;
-	uint32_t		protrsvdlen;
+ndis_ex_alloc_packetpool(ndis_status *status, ndis_handle *pool,
+			 uint32_t descnum, uint32_t oflowdescnum,
+			 uint32_t protrsvdlen)
 {
 	return(ndis_alloc_packetpool(status, pool,
 	    descnum + oflowdescnum, protrsvdlen));
 }
 
 __stdcall static uint32_t
-ndis_packetpool_use(pool)
-	ndis_handle		pool;
+ndis_packetpool_use(ndis_handle pool)
 {
 	ndis_packet		*head;
 
@@ -1591,8 +1454,7 @@
 }
 
 __stdcall static void
-ndis_free_packetpool(pool)
-	ndis_handle		pool;
+ndis_free_packetpool(ndis_handle pool)
 {
 	ndis_packet		*head;
 
@@ -1613,10 +1475,7 @@
 }
 
 __stdcall static void
-ndis_alloc_packet(status, packet, pool)
-	ndis_status		*status;
-	ndis_packet		**packet;
-	ndis_handle		pool;
+ndis_alloc_packet(ndis_status *status, ndis_packet **packet, ndis_handle pool)
 {
 	ndis_packet		*head, *pkt;
 
@@ -1669,8 +1528,7 @@
 }
 
 __stdcall static void
-ndis_release_packet(packet)
-	ndis_packet		*packet;
+ndis_release_packet(ndis_packet *packet)
 {
 	ndis_packet		*head;
 
@@ -1697,9 +1555,7 @@
 }
 
 __stdcall static void
-ndis_unchain_headbuf(packet, buf)
-	ndis_packet		*packet;
-	ndis_buffer		**buf;
+ndis_unchain_headbuf(ndis_packet *packet, ndis_buffer **buf)
 {
 	ndis_packet_private	*priv;
 
@@ -1722,9 +1578,7 @@
 }
 
 __stdcall static void
-ndis_unchain_tailbuf(packet, buf)
-	ndis_packet		*packet;
-	ndis_buffer		**buf;
+ndis_unchain_tailbuf(ndis_packet *packet, ndis_buffer **buf)
 {
 	ndis_packet_private	*priv;
 	ndis_buffer		*tmp;
@@ -1761,10 +1615,8 @@
  */
 
 __stdcall static void
-ndis_alloc_bufpool(status, pool, descnum)
-	ndis_status		*status;
-	ndis_handle		*pool;
-	uint32_t		descnum;
+ndis_alloc_bufpool(ndis_status *status, ndis_handle *pool,
+		   uint32_t descnum)
 {
 	ndis_buffer		*cur;
 	int			i;
@@ -1786,8 +1638,7 @@
 }
 
 __stdcall static void
-ndis_free_bufpool(pool)
-	ndis_handle		pool;
+ndis_free_bufpool(ndis_handle pool)
 {
 	ndis_buffer		*head;
 
@@ -1810,12 +1661,8 @@
  * This maps to a bus_dmamap_create() and bus_dmamap_load().
  */
 __stdcall static void
-ndis_alloc_buf(status, buffer, pool, vaddr, len)
-	ndis_status		*status;
-	ndis_buffer		**buffer;
-	ndis_handle		pool;
-	void			*vaddr;
-	uint32_t		len;
+ndis_alloc_buf(ndis_status *status, ndis_buffer **buffer, ndis_handle pool,
+	       void *vaddr, uint32_t len)
 {
 	ndis_buffer		*head, *buf;
 
@@ -1860,8 +1707,7 @@
 }
 
 __stdcall static void
-ndis_release_buf(buf)
-	ndis_buffer		*buf;
+ndis_release_buf(ndis_buffer *buf)
 {
 	ndis_buffer		*head;
 
@@ -1894,8 +1740,7 @@
 /* Aw c'mon. */
 
 __stdcall static uint32_t
-ndis_buflen(buf)
-	ndis_buffer		*buf;
+ndis_buflen(ndis_buffer *buf)
 {
 	return(buf->nb_bytecount);
 }
@@ -1906,10 +1751,7 @@
  */
 
 __stdcall static void
-ndis_query_buf(buf, vaddr, len)
-	ndis_buffer		*buf;
-	void			**vaddr;
-	uint32_t		*len;
+ndis_query_buf(ndis_buffer *buf, void **vaddr, uint32_t *len)
 {
 	if (vaddr != NULL)
 		*vaddr = MDL_VA(buf);
@@ -1921,11 +1763,8 @@
 /* Same as above -- we don't care about the priority. */
 
 __stdcall static void
-ndis_query_buf_safe(buf, vaddr, len, prio)
-	ndis_buffer		*buf;
-	void			**vaddr;
-	uint32_t		*len;
-	uint32_t		prio;
+ndis_query_buf_safe(ndis_buffer *buf, void **vaddr,
+		    uint32_t *len, uint32_t prio)
 {
 	if (vaddr != NULL)
 		*vaddr = MDL_VA(buf);
@@ -1937,24 +1776,19 @@
 /* Damnit Microsoft!! How many ways can you do the same thing?! */
 
 __stdcall static void *
-ndis_buf_vaddr(buf)
-	ndis_buffer		*buf;
+ndis_buf_vaddr(ndis_buffer *buf)
 {
 	return(MDL_VA(buf));
 }
 
 __stdcall static void *
-ndis_buf_vaddr_safe(buf, prio)
-	ndis_buffer		*buf;
-	uint32_t		prio;
+ndis_buf_vaddr_safe(ndis_buffer *buf, uint32_t prio)
 {
 	return(MDL_VA(buf));
 }
 
 __stdcall static void
-ndis_adjust_buflen(buf, len)
-	ndis_buffer		*buf;
-	int			len;
+ndis_adjust_buflen(ndis_buffer *buf, int len)
 {
 	buf->nb_bytecount = len;
 
@@ -1962,24 +1796,21 @@
 }
 
 __stdcall static uint32_t
-ndis_interlock_inc(addend)
-	uint32_t		*addend;
+ndis_interlock_inc(uint32_t *addend)
 {
 	atomic_add_long((u_long *)addend, 1);
 	return(*addend);
 }
 
 __stdcall static uint32_t
-ndis_interlock_dec(addend)
-	uint32_t		*addend;
+ndis_interlock_dec(uint32_t *addend)
 {
 	atomic_subtract_long((u_long *)addend, 1);
 	return(*addend);
 }
 
 __stdcall static void
-ndis_init_event(event)
-	ndis_event		*event;
+ndis_init_event(ndis_event *event)
 {
 	/*
 	 * NDIS events are always notification
@@ -1992,25 +1823,21 @@
 }
 
 __stdcall static void
-ndis_set_event(event)
-	ndis_event		*event;
+ndis_set_event(ndis_event *event)
 {
 	ntoskrnl_set_event(&event->ne_event, 0, 0);
 	return;
 }
 
 __stdcall static void
-ndis_reset_event(event)
-	ndis_event		*event;
+ndis_reset_event(ndis_event *event)
 {
 	ntoskrnl_reset_event(&event->ne_event);
 	return;
 }
 
 __stdcall static uint8_t
-ndis_wait_event(event, msecs)
-	ndis_event		*event;
-	uint32_t		msecs;
+ndis_wait_event(ndis_event *event, uint32_t msecs)
 {
 	int64_t			duetime;
 	uint32_t		rval;
@@ -2027,9 +1854,7 @@
 }
 
 __stdcall static ndis_status
-ndis_unicode2ansi(dstr, sstr)
-	ndis_ansi_string	*dstr;
-	ndis_unicode_string	*sstr;
+ndis_unicode2ansi(ndis_ansi_string *dstr, ndis_unicode_string *sstr)
 {
 	if (dstr == NULL || sstr == NULL)
 		return(NDIS_STATUS_FAILURE);
@@ -2041,9 +1866,7 @@
 }
 
 __stdcall static ndis_status
-ndis_ansi2unicode(dstr, sstr)
-	ndis_unicode_string	*dstr;
-	ndis_ansi_string	*sstr;
+ndis_ansi2unicode(ndis_unicode_string *dstr, ndis_ansi_string *sstr)
 {
 	char			*str;
 	if (dstr == NULL || sstr == NULL)
@@ -2061,10 +1884,8 @@
 }
 
 __stdcall static ndis_status
-ndis_assign_pcirsrc(adapter, slot, list)
-	ndis_handle		adapter;
-	uint32_t		slot;
-	ndis_resource_list	**list;
+ndis_assign_pcirsrc(ndis_handle adapter, uint32_t slot,
+		    ndis_resource_list **list)
 {
 	ndis_miniport_block	*block;
 
@@ -2078,14 +1899,9 @@
 }
 
 __stdcall static ndis_status
-ndis_register_intr(intr, adapter, ivec, ilevel, reqisr, shared, imode)
-	ndis_miniport_interrupt	*intr;
-	ndis_handle		adapter;
-	uint32_t		ivec;
-	uint32_t		ilevel;
-	uint8_t			reqisr;
-	uint8_t			shared;
-	ndis_interrupt_mode	imode;
+ndis_register_intr(ndis_miniport_interrupt *intr, ndis_handle adapter,
+		   uint32_t ivec, uint32_t ilevel, uint8_t reqisr,
+		   uint8_t shared, ndis_interrupt_mode imode)
 {
 	ndis_miniport_block	*block;
 
@@ -2099,17 +1915,14 @@
 }	
 
 __stdcall static void
-ndis_deregister_intr(intr)
-	ndis_miniport_interrupt	*intr;
+ndis_deregister_intr(ndis_miniport_interrupt *intr)
 {
 	return;
 }
 
 __stdcall static void
-ndis_register_shutdown(adapter, shutdownctx, shutdownfunc)
-	ndis_handle		adapter;
-	void			*shutdownctx;
-	ndis_shutdown_handler	shutdownfunc;
+ndis_register_shutdown(ndis_handle adapter, void *shutdownctx,
+		       ndis_shutdown_handler shutdownfunc)
 {
 	ndis_miniport_block	*block;
 	ndis_miniport_characteristics *chars;
@@ -2129,8 +1942,7 @@
 }
 
 __stdcall static void
-ndis_deregister_shutdown(adapter)
-	ndis_handle		adapter;
+ndis_deregister_shutdown(ndis_handle adapter)
 {
 	ndis_miniport_block	*block;
 	ndis_miniport_characteristics *chars;
@@ -2150,8 +1962,7 @@
 }
 
 __stdcall static uint32_t
-ndis_numpages(buf)
-	ndis_buffer		*buf;
+ndis_numpages(ndis_buffer *buf)
 {
 	if (buf == NULL)
 		return(0);
@@ -2161,9 +1972,7 @@
 }
 
 __stdcall static void
-ndis_buf_physpages(buf, pages)
-	ndis_buffer		*buf;
-	uint32_t		*pages;
+ndis_buf_physpages(ndis_buffer *buf, uint32_t *pages)
 {
 	if (buf == NULL)
 		return;
@@ -2173,10 +1982,7 @@
 }
 
 __stdcall static void
-ndis_query_bufoffset(buf, off, len)
-	ndis_buffer		*buf;
-	uint32_t		*off;
-	uint32_t		*len;
+ndis_query_bufoffset(ndis_buffer *buf, uint32_t *off, uint32_t *len)
 {
 	if (buf == NULL)
 		return;
@@ -2188,8 +1994,7 @@
 }
 
 __stdcall static void
-ndis_sleep(usecs)
-	uint32_t		usecs;
+ndis_sleep(uint32_t usecs)
 {
 	struct timeval		tv;
 
@@ -2202,11 +2007,8 @@
 }
 
 __stdcall static uint32_t
-ndis_read_pccard_amem(handle, offset, buf, len)
-	ndis_handle		handle;
-	uint32_t		offset;
-	void			*buf;
-	uint32_t		len;
+ndis_read_pccard_amem(ndis_handle handle, uint32_t offset, void *buf,
+		      uint32_t len)
 {
 	struct ndis_softc	*sc;
 	ndis_miniport_block	*block;
@@ -2232,11 +2034,8 @@
 }
 
 __stdcall static uint32_t
-ndis_write_pccard_amem(handle, offset, buf, len)
-	ndis_handle		handle;
-	uint32_t		offset;
-	void			*buf;
-	uint32_t		len;
+ndis_write_pccard_amem(ndis_handle handle, uint32_t offset, void *buf,
+		       uint32_t len)
 {
 	struct ndis_softc	*sc;
 	ndis_miniport_block	*block;
@@ -2262,10 +2061,7 @@
 }
 
 __stdcall static list_entry *
-ndis_insert_head(head, entry, lock)
-	list_entry		*head;
-	list_entry		*entry;
-	ndis_spin_lock		*lock;
+ndis_insert_head(list_entry *head, list_entry *entry, ndis_spin_lock *lock)
 {
 	list_entry		*flink;
 
@@ -2282,9 +2078,7 @@
 }
 
 __stdcall static list_entry *
-ndis_remove_head(head, lock)
-	list_entry		*head;
-	ndis_spin_lock		*lock;
+ndis_remove_head(list_entry *head, ndis_spin_lock *lock)
 {
 	list_entry		*flink;
 	list_entry		*entry;
@@ -2301,10 +2095,7 @@
 }
 
 __stdcall static list_entry *
-ndis_insert_tail(head, entry, lock)
-	list_entry		*head;
-	list_entry		*entry;
-	ndis_spin_lock		*lock;
+ndis_insert_tail(list_entry *head, list_entry *entry, ndis_spin_lock *lock)
 {
 	list_entry		*blink;
 
@@ -2321,10 +2112,8 @@
 }
 
 __stdcall static uint8_t
-ndis_sync_with_intr(intr, syncfunc, syncctx)
-	ndis_miniport_interrupt	*intr;
-	void			*syncfunc;
-	void			*syncctx;
+ndis_sync_with_intr(ndis_miniport_interrupt *intr, void *syncfunc,
+		    void *syncctx)
 {
 	struct ndis_softc	*sc;
 	__stdcall uint8_t (*sync)(void *);
@@ -2348,8 +2137,7 @@
  * January 1, 1601. (?!?!)
  */
 __stdcall static void
-ndis_time(tval)
-	uint64_t		*tval;
+ndis_time(uint64_t *tval)
 {
 	struct timespec		ts;
 
@@ -2364,8 +2152,7 @@
  * Return the number of milliseconds since the system booted.
  */
 __stdcall static void
-ndis_uptime(tval)
-	uint32_t		*tval;
+ndis_uptime(uint32_t *tval)
 {
 	struct timespec		ts;
 
@@ -2376,9 +2163,7 @@
 }
 
 __stdcall static void
-ndis_init_string(dst, src)
-	ndis_unicode_string	*dst;
-	char			*src;
+ndis_init_string(ndis_unicode_string *dst, char *src)
 {
 	ndis_unicode_string	*u;
 
@@ -2391,8 +2176,7 @@
 }
 
 __stdcall static void
-ndis_free_string(str)
-	ndis_unicode_string	*str;
+ndis_free_string(ndis_unicode_string *str)
 {
 	if (str == NULL)
 		return;
@@ -2403,16 +2187,13 @@
 }
 
 __stdcall static ndis_status
-ndis_remove_miniport(adapter)
-	ndis_handle		*adapter;
+ndis_remove_miniport(ndis_handle *adapter)
 {
 	return(NDIS_STATUS_SUCCESS);
 }
 
 __stdcall static void
-ndis_init_ansi_string(dst, src)
-	ndis_ansi_string	*dst;
-	char			*src;
+ndis_init_ansi_string(ndis_ansi_string *dst, char *src)
 {
 	ndis_ansi_string	*a;
 
@@ -2431,9 +2212,7 @@
 }
 
 __stdcall static void
-ndis_init_unicode_string(dst, src)
-	ndis_unicode_string	*dst;
-	uint16_t		*src;
+ndis_init_unicode_string(ndis_unicode_string *dst, uint16_t *src)
 {
 	ndis_unicode_string	*u;
 	int			i;
@@ -2455,14 +2234,10 @@
 	return;
 }
 
-__stdcall static void ndis_get_devprop(adapter, phydevobj,
-	funcdevobj, nextdevobj, resources, transresources)
-	ndis_handle		adapter;
-	device_object		**phydevobj;
-	device_object		**funcdevobj;
-	device_object		**nextdevobj;
-	cm_resource_list	*resources;
-	cm_resource_list	*transresources;
+__stdcall static void
+ndis_get_devprop(ndis_handle adapter, device_object **phydevobj,
+		 device_object **funcdevobj, device_object **nextdevobj,
+		 cm_resource_list *resources, cm_resource_list *transresources)
 {
 	ndis_miniport_block	*block;
 
@@ -2477,12 +2252,8 @@
 }
 
 __stdcall static void
-ndis_firstbuf(packet, buf, firstva, firstlen, totlen)
-	ndis_packet		*packet;
-	ndis_buffer		**buf;
-	void			**firstva;
-	uint32_t		*firstlen;
-	uint32_t		*totlen;
+ndis_firstbuf(ndis_packet *packet, ndis_buffer **buf, void **firstva,
+	      uint32_t *firstlen, uint32_t *totlen)
 {
 	ndis_buffer		*tmp;
 
@@ -2502,25 +2273,16 @@
 }
 
 __stdcall static void
-ndis_firstbuf_safe(packet, buf, firstva, firstlen, totlen, prio)
-	ndis_packet		*packet;
-	ndis_buffer		**buf;
-	void			**firstva;
-	uint32_t		*firstlen;
-	uint32_t		*totlen;
-	uint32_t		prio;
+ndis_firstbuf_safe(ndis_packet *packet, ndis_buffer **buf, void **firstva,
+		   uint32_t *firstlen, uint32_t *totlen, uint32_t prio)
 {
 	ndis_firstbuf(packet, buf, firstva, firstlen, totlen);
 }
 
 /* can also return NDIS_STATUS_RESOURCES/NDIS_STATUS_ERROR_READING_FILE */
 __stdcall static void
-ndis_open_file(status, filehandle, filelength, filename, highestaddr)
-	ndis_status		*status;
-	ndis_handle		*filehandle;
-	uint32_t		*filelength;
-	ndis_unicode_string	*filename;
-	ndis_physaddr		highestaddr;
+ndis_open_file(ndis_status *status, ndis_handle *filehandle, uint32_t *filelength,
+	       ndis_unicode_string *filename, ndis_physaddr highestaddr)
 {
 	char			*afilename = NULL;
@@ -2569,10 +2331,7 @@
 }
 
 __stdcall static void
-ndis_map_file(status, mappedbuffer, filehandle)
-	ndis_status		*status;
-	void			**mappedbuffer;
-	ndis_handle		filehandle;
+ndis_map_file(ndis_status *status, void **mappedbuffer, ndis_handle filehandle)
 {
 	ndis_fh			*fh;
 	struct thread		*td = curthread;
@@ -2611,8 +2370,7 @@
 }
 
 __stdcall static void
-ndis_unmap_file(filehandle)
-	ndis_handle		filehandle;
+ndis_unmap_file(ndis_handle filehandle)
 {
 	ndis_fh			*fh;
 	fh = (ndis_fh *)filehandle;
@@ -2626,8 +2384,7 @@
 }
 
 __stdcall static void
-ndis_close_file(filehandle)
-	ndis_handle		filehandle;
+ndis_close_file(ndis_handle filehandle)
 {
 	struct thread		*td = curthread;
 	ndis_fh			*fh;
@@ -2653,7 +2410,7 @@
 }
 
 __stdcall static uint8_t
-ndis_cpu_cnt()
+ndis_cpu_cnt(void)
 {
 	return(ncpus);
 }
@@ -2663,8 +2420,7 @@
         void *, uint32_t);
 
 __stdcall static void
-ndis_ind_statusdone(adapter)
-	ndis_handle		adapter;
+ndis_ind_statusdone(ndis_handle adapter)
 {
 	ndis_miniport_block	*block;
 	ndis_statusdone_handler	statusdonefunc;
@@ -2677,11 +2433,8 @@
 }
 
 __stdcall static void
-ndis_ind_status(adapter, status, sbuf, slen)
-	ndis_handle		adapter;
-	ndis_status		status;
-	void			*sbuf;
-	uint32_t		slen;
+ndis_ind_status(ndis_handle adapter, ndis_status status, void *sbuf,
+		uint32_t slen)
 {
 	ndis_miniport_block	*block;
 	ndis_status_handler	statusfunc;
@@ -2694,8 +2447,7 @@
 }
 
 static void
-ndis_workfunc(ctx)
-	void			*ctx;
+ndis_workfunc(void *ctx)
 {
 	ndis_work_item		*work;
 	ndis_proc		workfunc;
@@ -2707,21 +2459,15 @@
 }
 
 __stdcall static ndis_status
-ndis_sched_workitem(work)
-	ndis_work_item		*work;
+ndis_sched_workitem(ndis_work_item *work)
 {
 	ndis_sched(ndis_workfunc, work, NDIS_TASKQUEUE);
 	return(NDIS_STATUS_SUCCESS);
 }
 
 __stdcall static void
-ndis_pkt_to_pkt(dpkt, doff, reqlen, spkt, soff, cpylen)
-	ndis_packet		*dpkt;
-	uint32_t		doff;
-	uint32_t		reqlen;
-	ndis_packet		*spkt;
-	uint32_t		soff;
-	uint32_t		*cpylen;
+ndis_pkt_to_pkt(ndis_packet *dpkt, uint32_t doff, uint32_t reqlen,
+		ndis_packet *spkt, uint32_t soff, uint32_t *cpylen)
 {
 	ndis_buffer		*src, *dst;
 	char			*sptr, *dptr;
@@ -2805,27 +2551,18 @@
 }
 
 __stdcall static void
-ndis_pkt_to_pkt_safe(dpkt, doff, reqlen, spkt, soff, cpylen, prio)
-	ndis_packet		*dpkt;
-	uint32_t		doff;
-	uint32_t		reqlen;
-	ndis_packet		*spkt;
-	uint32_t		soff;
-	uint32_t		*cpylen;
-	uint32_t		prio;
+ndis_pkt_to_pkt_safe(ndis_packet *dpkt, uint32_t doff, uint32_t reqlen,
+		     ndis_packet *spkt, uint32_t soff, uint32_t *cpylen,
+		     uint32_t prio)
 {
 	ndis_pkt_to_pkt(dpkt, doff, reqlen, spkt, soff, cpylen);
 	return;
 }
 
 __stdcall static ndis_status
-ndis_register_dev(handle, devname, symname, majorfuncs, devobj, devhandle)
-	ndis_handle		handle;
-	ndis_unicode_string	*devname;
-	ndis_unicode_string	*symname;
-	driver_dispatch		*majorfuncs[];
-	void			**devobj;
-	ndis_handle		*devhandle;
+ndis_register_dev(ndis_handle handle, ndis_unicode_string *devname,
+		  ndis_unicode_string *symname, driver_dispatch **majorfuncs,
+		  void **devobj, ndis_handle *devhandle)
 {
 	ndis_miniport_block	*block;
 
@@ -2837,16 +2574,13 @@
 }
 
 __stdcall static ndis_status
-ndis_deregister_dev(handle)
-	ndis_handle		handle;
+ndis_deregister_dev(ndis_handle handle)
 {
 	return(NDIS_STATUS_SUCCESS);
 }
 
 __stdcall static ndis_status
-ndis_query_name(name, handle)
-	ndis_unicode_string	*name;
-	ndis_handle		handle;
+ndis_query_name(ndis_unicode_string *name, ndis_handle handle)
 {
 	ndis_miniport_block	*block;
 
@@ -2859,15 +2593,13 @@
 }
 
 __stdcall static void
-ndis_register_unload(handle, func)
-	ndis_handle		handle;
-	void			*func;
+ndis_register_unload(ndis_handle handle, void *func)
 {
 	return;
 }
 
 __stdcall static void
-dummy()
+dummy(void)
 {
 	printf ("NDIS dummy called...\n");
 	return;
Index: ndis/subr_ntoskrnl.c
===================================================================
RCS file: /mnt/share/dragonfly-cvs/src/sys/emulation/ndis/subr_ntoskrnl.c,v
retrieving revision 1.6
diff -u -r1.6 subr_ntoskrnl.c
--- ndis/subr_ntoskrnl.c	10 Jun 2005 23:27:02 -0000	1.6
+++ ndis/subr_ntoskrnl.c	9 Dec 2005 07:22:14 -0000
@@ -186,7 +186,7 @@
 static MALLOC_DEFINE(M_NDIS, "ndis", "ndis emulation");
 
 int
-ntoskrnl_libinit()
+ntoskrnl_libinit(void)
 {
 	lwkt_token_init(&ntoskrnl_dispatchtoken);
 	ntoskrnl_init_lock(&ntoskrnl_global);
@@ -195,17 +195,16 @@
 }
 
 int
-ntoskrnl_libfini()
+ntoskrnl_libfini(void)
 {
 	lwkt_token_uninit(&ntoskrnl_dispatchtoken);
 	return(0);
 }
 
 __stdcall static uint8_t 
-ntoskrnl_unicode_equal(str1, str2, caseinsensitive)
-	ndis_unicode_string	*str1;
-	ndis_unicode_string	*str2;
-	uint8_t			caseinsensitive;
+ntoskrnl_unicode_equal(ndis_unicode_string *str1,
+		       ndis_unicode_string *str2,
+		       uint8_t caseinsensitive)
 {
 	int			i;
 
@@ -227,9 +226,8 @@
 }
 
 __stdcall static void
-ntoskrnl_unicode_copy(dest, src)
-	ndis_unicode_string	*dest;
-	ndis_unicode_string	*src;
+ntoskrnl_unicode_copy(ndis_unicode_string *dest,
+		      ndis_unicode_string *src)
 {
 
 	if (dest->nus_maxlen >= src->nus_len)
@@ -241,10 +239,9 @@
 }
 
 __stdcall static ndis_status
-ntoskrnl_unicode_to_ansi(dest, src, allocate)
-	ndis_ansi_string	*dest;
-	ndis_unicode_string	*src;
-	uint8_t			allocate;
+ntoskrnl_unicode_to_ansi(ndis_ansi_string *dest,
+			 ndis_unicode_string *src,
+			 uint8_t allocate)
 {
 	char			*astr = NULL;
 
@@ -267,10 +264,9 @@
 }
 
 __stdcall static ndis_status
-ntoskrnl_ansi_to_unicode(dest, src, allocate)
-	ndis_unicode_string	*dest;
-	ndis_ansi_string	*src;
-	uint8_t			allocate;
+ntoskrnl_ansi_to_unicode(ndis_unicode_string *dest,
+			 ndis_ansi_string *src,
+			 uint8_t allocate)
 {
 	uint16_t		*ustr = NULL;
 
@@ -292,14 +288,9 @@
 }
 
 __stdcall static void *
-ntoskrnl_iobuildsynchfsdreq(func, dobj, buf, len, off, event, status)
-	uint32_t		func;
-	void			*dobj;
-	void			*buf;
-	uint32_t		len;
-	uint32_t		*off;
-	void			*event;
-	void			*status;
+ntoskrnl_iobuildsynchfsdreq(uint32_t func, void *dobj, void *buf,
+			    uint32_t len, uint32_t *off,
+			    void *event, void *status)
 {
 	return(NULL);
 }
@@ -316,8 +307,7 @@
 }
 
 static void
-ntoskrnl_wakeup(arg)
-	void			*arg;
+ntoskrnl_wakeup(void *arg)
 {
 	nt_dispatch_header	*obj;
 	wait_block		*w;
@@ -348,8 +338,7 @@
 }
 
 static void 
-ntoskrnl_time(tval)
-	uint64_t                *tval;
+ntoskrnl_time(uint64_t *tval)
 {
 	struct timespec		ts;
 
@@ -413,12 +402,8 @@
  */
 
 __stdcall uint32_t
-ntoskrnl_waitforobj(obj, reason, mode, alertable, duetime)
-	nt_dispatch_header	*obj;
-	uint32_t		reason;
-	uint32_t		mode;
-	uint8_t			alertable;
-	int64_t			*duetime;
+ntoskrnl_waitforobj(nt_dispatch_header *obj, uint32_t reason,
+		    uint32_t mode, uint8_t alertable, int64_t *duetime)
 {
 	struct thread		*td = curthread;
 	kmutant			*km;
@@ -532,16 +517,10 @@
 }
 
 __stdcall static uint32_t
-ntoskrnl_waitforobjs(cnt, obj, wtype, reason, mode,
-	alertable, duetime, wb_array)
-	uint32_t		cnt;
-	nt_dispatch_header	*obj[];
-	uint32_t		wtype;
-	uint32_t		reason;
-	uint32_t		mode;
-	uint8_t			alertable;
-	int64_t			*duetime;
-	wait_block		*wb_array;
+ntoskrnl_waitforobjs(uint32_t cnt, nt_dispatch_header *obj[],
+		     uint32_t wtype, uint32_t reason, uint32_t mode,
+		     uint8_t alertable, int64_t *duetime,
+		     wait_block *wb_array)
 {
 	struct thread		*td = curthread;
 	kmutant			*km;
@@ -681,137 +660,106 @@
 }
 
 __stdcall static void
-ntoskrnl_writereg_ushort(reg, val)
-	uint16_t		*reg;
-	uint16_t		val;
+ntoskrnl_writereg_ushort(uint16_t *reg, uint16_t val)
 {
 	bus_space_write_2(NDIS_BUS_SPACE_MEM, 0x0, (bus_size_t)reg, val);
 	return;
 }
 
 __stdcall static uint16_t
-ntoskrnl_readreg_ushort(reg)
-	uint16_t		*reg;
+ntoskrnl_readreg_ushort(uint16_t *reg)
 {
 	return(bus_space_read_2(NDIS_BUS_SPACE_MEM, 0x0, (bus_size_t)reg));
 }
 
 __stdcall static void
-ntoskrnl_writereg_ulong(reg, val)
-	uint32_t		*reg;
-	uint32_t		val;
+ntoskrnl_writereg_ulong(uint32_t *reg, uint32_t val)
 {
 	bus_space_write_4(NDIS_BUS_SPACE_MEM, 0x0, (bus_size_t)reg, val);
 	return;
 }
 
 __stdcall static uint32_t
-ntoskrnl_readreg_ulong(reg)
-	uint32_t		*reg;
+ntoskrnl_readreg_ulong(uint32_t *reg)
 {
 	return(bus_space_read_4(NDIS_BUS_SPACE_MEM, 0x0, (bus_size_t)reg));
 }
 
 __stdcall static uint8_t
-ntoskrnl_readreg_uchar(reg)
-	uint8_t			*reg;
+ntoskrnl_readreg_uchar(uint8_t *reg)
 {
 	return(bus_space_read_1(NDIS_BUS_SPACE_MEM, 0x0, (bus_size_t)reg));
 }
 
 __stdcall static void
-ntoskrnl_writereg_uchar(reg, val)
-	uint8_t			*reg;
-	uint8_t			val;
+ntoskrnl_writereg_uchar(uint8_t *reg, uint8_t val)
 {
 	bus_space_write_1(NDIS_BUS_SPACE_MEM, 0x0, (bus_size_t)reg, val);
 	return;
 }
 
 __stdcall static int64_t
-_allmul(a, b)
-	int64_t			a;
-	int64_t			b;
+_allmul(int64_t a, int64_t b)
 {
 	return (a * b);
 }
 
 __stdcall static int64_t
-_alldiv(a, b)
-	int64_t			a;
-	int64_t			b;
+_alldiv(int64_t a, int64_t b)
 {
 	return (a / b);
 }
 
 __stdcall static int64_t
-_allrem(a, b)
-	int64_t			a;
-	int64_t			b;
+_allrem(int64_t a, int64_t b)
 {
 	return (a % b);
 }
 
 __stdcall static uint64_t
-_aullmul(a, b)
-	uint64_t		a;
-	uint64_t		b;
+_aullmul(uint64_t a, uint64_t b)
 {
 	return (a * b);
 }
 
 __stdcall static uint64_t
-_aulldiv(a, b)
-	uint64_t		a;
-	uint64_t		b;
+_aulldiv(uint64_t a, uint64_t b)
 {
 	return (a / b);
 }
 
 __stdcall static uint64_t
-_aullrem(a, b)
-	uint64_t		a;
-	uint64_t		b;
+_aullrem(uint64_t a, uint64_t b)
 {
 	return (a % b);
 }
 
 __regparm static int64_t
-_allshl(a, b)
-	int64_t			a;
-	uint8_t			b;
+_allshl(int64_t a, uint8_t b)
 {
 	return (a << b);
 }
 
 __regparm static uint64_t
-_aullshl(a, b)
-	uint64_t		a;
-	uint8_t			b;
+_aullshl(uint64_t a, uint8_t b)
 {
 	return (a << b);
 }
 
 __regparm static int64_t
-_allshr(a, b)
-	int64_t			a;
-	uint8_t			b;
+_allshr(int64_t a, uint8_t b)
 {
 	return (a >> b);
 }
 
 __regparm static uint64_t
-_aullshr(a, b)
-	uint64_t		a;
-	uint8_t			b;
+_aullshr(uint64_t a, uint8_t b)
 {
 	return (a >> b);
 }
 
 static slist_entry *
-ntoskrnl_pushsl(head, entry)
-	slist_header		*head;
-	slist_entry		*entry;
+ntoskrnl_pushsl(slist_header *head, slist_entry *entry)
 {
 	slist_entry		*oldhead;
 
@@ -825,8 +773,7 @@
 }
 
 static slist_entry *
-ntoskrnl_popsl(head)
-	slist_header		*head;
+ntoskrnl_popsl(slist_header *head)
 {
 	slist_entry		*first;
 
@@ -841,32 +788,24 @@
 }
 
 __stdcall static void *
-ntoskrnl_allocfunc(pooltype, size, tag)
-	uint32_t		pooltype;
-	size_t			size;
-	uint32_t		tag;
+ntoskrnl_allocfunc(uint32_t pooltype, size_t size, uint32_t tag)
 {
 	return(malloc(size, M_DEVBUF, M_WAITOK));
 }
 
 __stdcall static void
-ntoskrnl_freefunc(buf)
-	void			*buf;
+ntoskrnl_freefunc(void *buf)
 {
 	free(buf, M_DEVBUF);
 	return;
 }
 
 __stdcall static void
-ntoskrnl_init_lookaside(lookaside, allocfunc, freefunc,
-    flags, size, tag, depth)
-	paged_lookaside_list	*lookaside;
-	lookaside_alloc_func	*allocfunc;
-	lookaside_free_func	*freefunc;
-	uint32_t		flags;
-	size_t			size;
-	uint32_t		tag;
-	uint16_t		depth;
+ntoskrnl_init_lookaside(paged_lookaside_list *lookaside,
+			lookaside_alloc_func *allocfunc,
+			lookaside_free_func *freefunc,
+			uint32_t flags, size_t size,
+			uint32_t tag, uint16_t depth)
 {
 	bzero((char *)lookaside, sizeof(paged_lookaside_list));
 
@@ -894,8 +833,7 @@
 }
 
 __stdcall static void
-ntoskrnl_delete_lookaside(lookaside)
-	paged_lookaside_list   *lookaside;
+ntoskrnl_delete_lookaside(paged_lookaside_list *lookaside)
 {
 	void			*buf;
 	__stdcall void		(*freefunc)(void *);
@@ -908,15 +846,11 @@
 }
 
 __stdcall static void
-ntoskrnl_init_nplookaside(lookaside, allocfunc, freefunc,
-    flags, size, tag, depth)
-	npaged_lookaside_list	*lookaside;
-	lookaside_alloc_func	*allocfunc;
-	lookaside_free_func	*freefunc;
-	uint32_t		flags;
-	size_t			size;
-	uint32_t		tag;
-	uint16_t		depth;
+ntoskrnl_init_nplookaside(npaged_lookaside_list *lookaside,
+			  lookaside_alloc_func *allocfunc,
+			  lookaside_free_func *freefunc,
+			  uint32_t flags, size_t size,
+			  uint32_t tag, uint16_t depth)
 {
 	bzero((char *)lookaside, sizeof(npaged_lookaside_list));
 
@@ -944,8 +878,7 @@
 }
 
 __stdcall static void
-ntoskrnl_delete_nplookaside(lookaside)
-	npaged_lookaside_list   *lookaside;
+ntoskrnl_delete_nplookaside(npaged_lookaside_list *lookaside)
 {
 	void			*buf;
 	__stdcall void		(*freefunc)(void *);
@@ -1053,8 +986,7 @@
 };
 
 __stdcall static void
-ntoskrnl_freemdl(mdl)
-	ndis_buffer		*mdl;
+ntoskrnl_freemdl(ndis_buffer *mdl)
 {
 	ndis_buffer		*head;
 
@@ -1085,9 +1017,7 @@
 }
 
 __stdcall static uint32_t
-ntoskrnl_sizeofmdl(vaddr, len)
-	void			*vaddr;
-	size_t			len;
+ntoskrnl_sizeofmdl(void *vaddr, size_t len)
 {
 	uint32_t		l;
 
@@ -1098,38 +1028,28 @@
 }
 
 __stdcall static void
-ntoskrnl_build_npaged_mdl(mdl)
-	ndis_buffer		*mdl;
+ntoskrnl_build_npaged_mdl(ndis_buffer *mdl)
 {
 	mdl->nb_mappedsystemva = (char *)mdl->nb_startva + mdl->nb_byteoffset;
 	return;
 }
 
 __stdcall static void *
-ntoskrnl_mmaplockedpages(buf, accessmode)
-	ndis_buffer		*buf;
-	uint8_t			accessmode;
+ntoskrnl_mmaplockedpages(ndis_buffer *buf, uint8_t accessmode)
 {
 	return(MDL_VA(buf));
 }
 
 __stdcall static void *
-ntoskrnl_mmaplockedpages_cache(buf, accessmode, cachetype, vaddr,
-    bugcheck, prio)
-	ndis_buffer		*buf;
-	uint8_t			accessmode;
-	uint32_t		cachetype;
-	void			*vaddr;
-	uint32_t		bugcheck;
-	uint32_t		prio;
+ntoskrnl_mmaplockedpages_cache(ndis_buffer *buf, uint8_t accessmode,
+			       uint32_t cachetype, void *vaddr,
+			       uint32_t bugcheck, uint32_t prio)
 {
 	return(MDL_VA(buf));
 }
 
 __stdcall static void
-ntoskrnl_munmaplockedpages(vaddr, buf)
-	void			*vaddr;
-	ndis_buffer		*buf;
+ntoskrnl_munmaplockedpages(void *vaddr, ndis_buffer *buf)
 {
 	return;
 }
@@ -1142,8 +1062,7 @@
  * function. Instead, we grab a mutex from the mutex pool.
  */
 __stdcall static void
-ntoskrnl_init_lock(lock)
-	kspin_lock		*lock;
+ntoskrnl_init_lock(kspin_lock *lock)
 {
 	*lock = 0;
 
@@ -1151,10 +1070,7 @@
 }
 
 __stdcall static size_t
-ntoskrnl_memcmp(s1, s2, len)
-	const void		*s1;
-	const void		*s2;
-	size_t			len;
+ntoskrnl_memcmp(const void *s1, const void *s2, size_t len)
 {
 	size_t			i, total = 0;
 	uint8_t			*m1, *m2;
@@ -1170,9 +1086,7 @@
 }
 
 __stdcall static void
-ntoskrnl_init_ansi_string(dst, src)
-	ndis_ansi_string	*dst;
-	char			*src;
+ntoskrnl_init_ansi_string(ndis_ansi_string *dst, char *src)
 {
 	ndis_ansi_string	*a;
 
@@ -1191,9 +1105,7 @@
 }
 
 __stdcall static void
-ntoskrnl_init_unicode_string(dst, src)
-	ndis_unicode_string	*dst;
-	uint16_t		*src;
+ntoskrnl_init_unicode_string(ndis_unicode_string *dst, uint16_t *src)
 {
 	ndis_unicode_string	*u;
 	int			i;
@@ -1216,10 +1128,8 @@
 }
 
 __stdcall ndis_status
-ntoskrnl_unicode_to_int(ustr, base, val)
-	ndis_unicode_string	*ustr;
-	uint32_t		base;
-	uint32_t		*val;
+ntoskrnl_unicode_to_int(ndis_unicode_string *ustr, uint32_t base,
+			uint32_t *val)
 {
 	uint16_t		*uchr;
 	int			len, neg = 0;
@@ -1270,8 +1180,7 @@
 }
 
 __stdcall static void
-ntoskrnl_free_unicode_string(ustr)
-	ndis_unicode_string	*ustr;
+ntoskrnl_free_unicode_string(ndis_unicode_string *ustr)
 {
 	if (ustr->nus_buf == NULL)
 		return;
@@ -1281,8 +1190,7 @@
 }
 
 __stdcall static void
-ntoskrnl_free_ansi_string(astr)
-	ndis_ansi_string	*astr;
+ntoskrnl_free_ansi_string(ndis_ansi_string *astr)
 {
 	if (astr->nas_buf == NULL)
 		return;
@@ -1292,15 +1200,13 @@
 }
 
 static int
-atoi(str)
-	const char		*str;
+atoi(const char *str)
 {
 	return (int)strtol(str, (char **)NULL, 10);
 }
 
 static long
-atol(str)
-	const char		*str;
+atol(const char *str)
 {
 	return strtol(str, (char **)NULL, 10);
 }
@@ -1316,9 +1222,7 @@
 }
 
 __stdcall static uint8_t
-ntoskrnl_wdmver(major, minor)
-	uint8_t			major;
-	uint8_t			minor;
+ntoskrnl_wdmver(uint8_t major, uint8_t minor)
 {
 	if (major == WDM_MAJOR && minor == WDM_MINOR_WINXP)
 		return(TRUE);
@@ -1326,12 +1230,8 @@
 }
 
 __stdcall static ndis_status
-ntoskrnl_devprop(devobj, regprop, buflen, prop, reslen)
-	device_object		*devobj;
-	uint32_t		regprop;
-	uint32_t		buflen;
-	void			*prop;
-	uint32_t		*reslen;
+ntoskrnl_devprop(device_object *devobj, uint32_t regprop, uint32_t buflen,
+		 void *prop, uint32_t *reslen)
 {
 	ndis_miniport_block	*block;
 
@@ -1352,9 +1252,7 @@
 }
 
 __stdcall static void
-ntoskrnl_init_mutex(kmutex, level)
-	kmutant			*kmutex;
-	uint32_t		level;
+ntoskrnl_init_mutex(kmutant *kmutex, uint32_t level)
 {
 	INIT_LIST_HEAD((&kmutex->km_header.dh_waitlisthead));
 	kmutex->km_abandoned = FALSE;
@@ -1368,9 +1266,7 @@
 }
 
 __stdcall static uint32_t
-ntoskrnl_release_mutex(kmutex, kwait)
-	kmutant			*kmutex;
-	uint8_t			kwait;
+ntoskrnl_release_mutex(kmutant *kmutex, uint8_t kwait)
 {
 	struct lwkt_tokref	tokref;
 
@@ -1391,17 +1287,13 @@
 }
 
 __stdcall static uint32_t
-ntoskrnl_read_mutex(kmutex)
-	kmutant			*kmutex;
+ntoskrnl_read_mutex(kmutant *kmutex)
 {
 	return(kmutex->km_header.dh_sigstate);
 }
 
 __stdcall void
-ntoskrnl_init_event(kevent, type, state)
-	nt_kevent		*kevent;
-	uint32_t		type;
-	uint8_t			state;
+ntoskrnl_init_event(nt_kevent *kevent, uint32_t type, uint8_t state)
 {
 	INIT_LIST_HEAD((&kevent->k_header.dh_waitlisthead));
 	kevent->k_header.dh_sigstate = state;
@@ -1411,8 +1303,7 @@
 }
 
 __stdcall uint32_t
-ntoskrnl_reset_event(kevent)
-	nt_kevent		*kevent;
+ntoskrnl_reset_event(nt_kevent *kevent)
 {
 	uint32_t		prevstate;
 	struct lwkt_tokref	tokref;
@@ -1426,10 +1317,7 @@
 }
 
 __stdcall uint32_t
-ntoskrnl_set_event(kevent, increment, kwait)
-	nt_kevent		*kevent;
-	uint32_t		increment;
-	uint8_t			kwait;
+ntoskrnl_set_event(nt_kevent *kevent, uint32_t increment, uint8_t kwait)
 {
 	uint32_t		prevstate;
 
@@ -1440,28 +1328,21 @@
 }
 
 __stdcall void
-ntoskrnl_clear_event(kevent)
-	nt_kevent		*kevent;
+ntoskrnl_clear_event(nt_kevent *kevent)
 {
 	kevent->k_header.dh_sigstate = FALSE;
 	return;
 }
 
 __stdcall uint32_t
-ntoskrnl_read_event(kevent)
-	nt_kevent		*kevent;
+ntoskrnl_read_event(nt_kevent *kevent)
 {
 	return(kevent->k_header.dh_sigstate);
 }
 
 __stdcall static ndis_status
-ntoskrnl_objref(handle, reqaccess, otype, accessmode, object, handleinfo)
-	ndis_handle		handle;
-	uint32_t		reqaccess;
-	void			*otype;
-	uint8_t			accessmode;
-	void			**object;
-	void			**handleinfo;
+ntoskrnl_objref(ndis_handle handle, uint32_t reqaccess, void *otype,
+		uint8_t accessmode, void **object, void **handleinfo)
 {
 	nt_objref		*nr;
 
@@ -1489,8 +1370,7 @@
 }
 
 __stdcall static uint32_t
-ntoskrnl_zwclose(handle)
-	ndis_handle		handle;
+ntoskrnl_zwclose(ndis_handle handle)
 {
 	return(STATUS_SUCCESS);
 }
@@ -1500,8 +1380,7 @@
  * PsTerminateSystemThread().
  */
 static void
-ntoskrnl_thrfunc(arg)
-	void			*arg;
+ntoskrnl_thrfunc(void *arg)
 {
 	thread_context		*thrctx;
 	__stdcall uint32_t (*tfunc)(void *);
@@ -1520,15 +1399,9 @@
 }
 
 __stdcall static ndis_status
-ntoskrnl_create_thread(handle, reqaccess, objattrs, phandle,
-	clientid, thrfunc, thrctx)
-	ndis_handle		*handle;
-	uint32_t		reqaccess;
-	void			*objattrs;
-	ndis_handle		phandle;
-	void			*clientid;
-	void			*thrfunc;
-	void			*thrctx;
+ntoskrnl_create_thread(ndis_handle *handle, uint32_t reqaccess,
+		       void *objattrs, ndis_handle phandle,
+		       void *clientid, void *thrfunc, void *thrctx)
 {
 	int			error;
 	char			tname[128];
@@ -1559,8 +1432,7 @@
  * them.
  */
 __stdcall static ndis_status
-ntoskrnl_thread_exit(status)
-	ndis_status		status;
+ntoskrnl_thread_exit(ndis_status status)
 {
 	struct nt_objref	*nr;
 
@@ -1602,8 +1474,7 @@
 }
 
 static void
-ntoskrnl_timercall(arg)
-	void			*arg;
+ntoskrnl_timercall(void *arg)
 {
 	ktimer			*timer;
 
@@ -1637,8 +1508,7 @@
 }
 
 __stdcall void
-ntoskrnl_init_timer(timer)
-	ktimer			*timer;
+ntoskrnl_init_timer(ktimer *timer)
 {
 	if (timer == NULL)
 		return;
@@ -1647,9 +1517,7 @@
 }
 
 __stdcall void
-ntoskrnl_init_timer_ex(timer, type)
-	ktimer			*timer;
-	uint32_t		type;
+ntoskrnl_init_timer_ex(ktimer *timer, uint32_t type)
 {
 	if (timer == NULL)
 		return;
@@ -1671,8 +1539,7 @@
  * I can tell, defered procedure calls must run at DISPATCH_LEVEL.
  */
 static void
-ntoskrnl_run_dpc(arg)
-	void			*arg;
+ntoskrnl_run_dpc(void *arg)
 {
 	kdpc_func		dpcfunc;
 	kdpc			*dpc;
@@ -1688,10 +1555,7 @@
 }
 
 __stdcall void
-ntoskrnl_init_dpc(dpc, dpcfunc, dpcctx)
-	kdpc			*dpc;
-	void			*dpcfunc;
-	void			*dpcctx;
+ntoskrnl_init_dpc(kdpc *dpc, void *dpcfunc, void *dpcctx)
 {
 	if (dpc == NULL)
 		return;
@@ -1703,10 +1567,7 @@
 }
 
 __stdcall uint8_t
-ntoskrnl_queue_dpc(dpc, sysarg1, sysarg2)
-	kdpc			*dpc;
-	void			*sysarg1;
-	void			*sysarg2;
+ntoskrnl_queue_dpc(kdpc *dpc, void *sysarg1, void *sysarg2)
 {
 	dpc->k_sysarg1 = sysarg1;
 	dpc->k_sysarg2 = sysarg2;
@@ -1717,8 +1578,7 @@
 }
 
 __stdcall uint8_t
-ntoskrnl_dequeue_dpc(dpc)
-	kdpc			*dpc;
+ntoskrnl_dequeue_dpc(kdpc *dpc)
 {
 	if (ndis_unsched(ntoskrnl_run_dpc, dpc, NDIS_SWI))
 		return(FALSE);
@@ -1727,11 +1587,8 @@
 }
 
 __stdcall uint8_t
-ntoskrnl_set_timer_ex(timer, duetime, period, dpc)
-	ktimer			*timer;
-	int64_t			duetime;
-	uint32_t		period;
-	kdpc			*dpc;
+ntoskrnl_set_timer_ex(ktimer *timer, int64_t duetime, uint32_t period,
+		      kdpc *dpc)
 {
 	struct timeval		tv;
 	uint64_t		curtime;
@@ -1782,17 +1639,13 @@
 }
 
 __stdcall uint8_t
-ntoskrnl_set_timer(timer, duetime, dpc)
-	ktimer			*timer;
-	int64_t			duetime;
-	kdpc			*dpc;
+ntoskrnl_set_timer(ktimer *timer, int64_t duetime, kdpc *dpc)
 {
 	return (ntoskrnl_set_timer_ex(timer, duetime, 0, dpc));
 }
 
 __stdcall uint8_t
-ntoskrnl_cancel_timer(timer)
-	ktimer			*timer;
+ntoskrnl_cancel_timer(ktimer *timer)
 {
 	uint8_t			pending;
 
@@ -1816,14 +1669,13 @@
 }
 
 __stdcall uint8_t
-ntoskrnl_read_timer(timer)
-	ktimer			*timer;
+ntoskrnl_read_timer(ktimer *timer)
 {
 	return(timer->k_header.dh_sigstate);
 }
 
 __stdcall static void
-dummy()
+dummy(void)
 {
 	printf ("ntoskrnl dummy called...\n");
 	return;
Index: ndis/subr_pe.c
===================================================================
RCS file: /mnt/share/dragonfly-cvs/src/sys/emulation/ndis/subr_pe.c,v
retrieving revision 1.1
diff -u -r1.1 subr_pe.c
--- ndis/subr_pe.c	29 Jul 2004 20:51:34 -0000	1.1
+++ ndis/subr_pe.c	9 Dec 2005 00:10:32 -0000
@@ -74,9 +74,7 @@
  */
 
 int
-pe_get_dos_header(imgbase, hdr)
-	vm_offset_t		imgbase;
-	image_dos_header	*hdr;
+pe_get_dos_header(vm_offset_t imgbase, image_dos_header *hdr)
 {
 	uint16_t		signature;
 
@@ -97,8 +95,7 @@
  */
 
 int
-pe_is_nt_image(imgbase)
-	vm_offset_t		imgbase;
+pe_is_nt_image(vm_offset_t imgbase)
 {
 	uint32_t		signature;
 	image_dos_header	*dos_hdr;
@@ -124,9 +121,7 @@
  */
 
 int
-pe_get_optional_header(imgbase, hdr)
-	vm_offset_t		imgbase;
-	image_optional_header	*hdr;
+pe_get_optional_header(vm_offset_t imgbase, image_optional_header *hdr)
 {
 	image_dos_header	*dos_hdr;
 	image_nt_header		*nt_hdr;
@@ -152,9 +147,7 @@
  */
 
 int
-pe_get_file_header(imgbase, hdr)
-	vm_offset_t		imgbase;
-	image_file_header	*hdr;
+pe_get_file_header(vm_offset_t imgbase, image_file_header *hdr)
 {
 	image_dos_header	*dos_hdr;
 	image_nt_header		*nt_hdr;
@@ -180,9 +173,7 @@
  */
 
 int
-pe_get_section_header(imgbase, hdr)
-	vm_offset_t		imgbase;
-	image_section_header	*hdr;
+pe_get_section_header(vm_offset_t imgbase, image_section_header *hdr)
 {
 	image_dos_header	*dos_hdr;
 	image_nt_header		*nt_hdr;
@@ -209,8 +200,7 @@
  */
 
 int
-pe_numsections(imgbase)
-	vm_offset_t		imgbase;
+pe_numsections(vm_offset_t imgbase)
 {
 	image_file_header	file_hdr;
 
@@ -226,8 +216,7 @@
  */
 
 vm_offset_t
-pe_imagebase(imgbase)
-	vm_offset_t		imgbase;
+pe_imagebase(vm_offset_t imgbase)
 {
 	image_optional_header	optional_hdr;
 
@@ -243,9 +232,7 @@
  */
 
 vm_offset_t
-pe_directory_offset(imgbase, diridx)
-	vm_offset_t		imgbase;
-	uint32_t		diridx;
+pe_directory_offset(vm_offset_t imgbase, uint32_t diridx)
 {
 	image_optional_header	opt_hdr;
 	vm_offset_t		dir;
@@ -262,9 +249,7 @@
 }
 
 vm_offset_t
-pe_translate_addr(imgbase, rva)
-	vm_offset_t		imgbase;
-	uint32_t		rva;
+pe_translate_addr(vm_offset_t imgbase, uint32_t rva)
 {
 	image_optional_header	opt_hdr;
 	image_section_header	*sect_hdr;
@@ -317,10 +302,8 @@
  */
 
 int
-pe_get_section(imgbase, hdr, name)
-	vm_offset_t		imgbase;
-	image_section_header	*hdr;
-	const char		*name;
+pe_get_section(vm_offset_t imgbase, image_section_header *hdr,
+	       const char *name)
 {
 	image_dos_header	*dos_hdr;
 	image_nt_header		*nt_hdr;
@@ -361,8 +344,7 @@
  */
 
 int
-pe_relocate(imgbase)
-	vm_offset_t		imgbase;
+pe_relocate(vm_offset_t imgbase)
 {
 	image_section_header	sect;
 	image_base_reloc	*relhdr;
@@ -425,10 +407,8 @@
  */
 
 int
-pe_get_import_descriptor(imgbase, desc, module)
-	vm_offset_t		imgbase;
-	image_import_descriptor	*desc;
-	char			*module;
+pe_get_import_descriptor(vm_offset_t imgbase, image_import_descriptor *desc,
+			 char *module)
 {	
 	vm_offset_t		offset;
 	image_import_descriptor	*imp_desc;
@@ -458,9 +438,7 @@
 }
 
 int
-pe_get_messagetable(imgbase, md)
-	vm_offset_t		imgbase;
-	message_resource_data	**md;
+pe_get_messagetable(vm_offset_t imgbase, message_resource_data **md)
 {
 	image_resource_directory	*rdir, *rtype;
 	image_resource_directory_entry	*dent, *dent2;
@@ -504,12 +482,8 @@
 }
 
 int
-pe_get_message(imgbase, id, str, len, flags)
-	vm_offset_t		imgbase;
-	uint32_t		id;
-	char			**str;
-	int			*len;
-	uint16_t		*flags;
+pe_get_message(vm_offset_t imgbase, uint32_t id, char **str, int *len,
+	       uint16_t *flags)
 {
 	message_resource_data	*md = NULL;
 	message_resource_block	*mb;
@@ -549,9 +523,7 @@
  */
 
 static vm_offset_t
-pe_functbl_match(functbl, name)
-	image_patch_table	*functbl;
-	char			*name;
+pe_functbl_match(image_patch_table *functbl, char *name)
 {
 	image_patch_table	*p;
 
@@ -579,10 +551,8 @@
  */
 
 int
-pe_patch_imports(imgbase, module, functbl)
-	vm_offset_t		imgbase;
-	char			*module;
-	image_patch_table	*functbl;
+pe_patch_imports(vm_offset_t imgbase, char *module,
+		 image_patch_table *functbl)
 {
 	image_import_descriptor	imp_desc;
 	char			*fname;
Index: svr4/imgact_svr4.c
===================================================================
RCS file: /mnt/share/dragonfly-cvs/src/sys/emulation/svr4/imgact_svr4.c,v
retrieving revision 1.7
diff -u -r1.7 imgact_svr4.c
--- svr4/imgact_svr4.c	20 Jan 2004 18:41:51 -0000	1.7
+++ svr4/imgact_svr4.c	8 Dec 2005 22:49:36 -0000
@@ -57,8 +57,7 @@
 static int	exec_svr4_imgact (struct image_params *iparams);
 
 static int
-exec_svr4_imgact(imgp)
-    struct image_params *imgp;
+exec_svr4_imgact(struct image_params *imgp)
 {
     const struct exec *a_out = (const struct exec *) imgp->image_header;
     struct vmspace *vmspace;
Index: svr4/svr4_fcntl.c
===================================================================
RCS file: /mnt/share/dragonfly-cvs/src/sys/emulation/svr4/svr4_fcntl.c,v
retrieving revision 1.16
diff -u -r1.16 svr4_fcntl.c
--- svr4/svr4_fcntl.c	22 Jun 2005 01:33:29 -0000	1.16
+++ svr4/svr4_fcntl.c	8 Dec 2005 22:53:55 -0000
@@ -65,8 +65,7 @@
 static void svr4_to_bsd_flock64 (struct svr4_flock64 *, struct flock *);
 
 static u_long
-svr4_to_bsd_cmd(cmd)
-	u_long	cmd;
+svr4_to_bsd_cmd(u_long cmd)
 {
 	switch (cmd) {
 	case SVR4_F_DUPFD:
@@ -91,8 +90,7 @@
 }
 
 static int
-svr4_to_bsd_flags(l)
-	int	l;
+svr4_to_bsd_flags(int l)
 {
 	int	r = 0;
 	r |= (l & SVR4_O_RDONLY) ? O_RDONLY : 0;
@@ -111,8 +109,7 @@
 }
 
 static int
-bsd_to_svr4_flags(l)
-	int	l;
+bsd_to_svr4_flags(int l)
 {
 	int	r = 0;
 	r |= (l & O_RDONLY) ? SVR4_O_RDONLY : 0;
@@ -132,9 +129,7 @@
 
 
 static void
-bsd_to_svr4_flock(iflp, oflp)
-	struct flock		*iflp;
-	struct svr4_flock	*oflp;
+bsd_to_svr4_flock(struct flock *iflp, struct svr4_flock *oflp)
 {
 	switch (iflp->l_type) {
 	case F_RDLCK:
@@ -160,9 +155,7 @@
 
 
 static void
-svr4_to_bsd_flock(iflp, oflp)
-	struct svr4_flock	*iflp;
-	struct flock		*oflp;
+svr4_to_bsd_flock(struct svr4_flock *iflp, struct flock *oflp)
 {
 	switch (iflp->l_type) {
 	case SVR4_F_RDLCK:
@@ -187,9 +180,7 @@
 }
 
 static void
-bsd_to_svr4_flock64(iflp, oflp)
-	struct flock		*iflp;
-	struct svr4_flock64	*oflp;
+bsd_to_svr4_flock64(struct flock *iflp, struct svr4_flock64 *oflp)
 {
 	switch (iflp->l_type) {
 	case F_RDLCK:
@@ -215,9 +206,7 @@
 
 
 static void
-svr4_to_bsd_flock64(iflp, oflp)
-	struct svr4_flock64	*iflp;
-	struct flock		*oflp;
+svr4_to_bsd_flock64(struct svr4_flock64 *iflp, struct flock *oflp)
 {
 	switch (iflp->l_type) {
 	case SVR4_F_RDLCK:
Index: svr4/svr4_filio.c
===================================================================
RCS file: /mnt/share/dragonfly-cvs/src/sys/emulation/svr4/svr4_filio.c,v
retrieving revision 1.8
diff -u -r1.8 svr4_filio.c
--- svr4/svr4_filio.c	22 Jun 2005 01:33:29 -0000	1.8
+++ svr4/svr4_filio.c	8 Dec 2005 22:57:55 -0000
@@ -172,13 +172,8 @@
 #endif /* BOGUS */
 
 int
-svr4_fil_ioctl(fp, td, retval, fd, cmd, data)
-	struct file *fp;
-	struct thread *td;
-	register_t *retval;
-	int fd;
-	u_long cmd;
-	caddr_t data;
+svr4_fil_ioctl(struct file *fp, struct thread *td, register_t *retval,
+	       int fd, u_long cmd, caddr_t data)
 {
 	struct proc *p = td->td_proc;
 	int error;
Index: svr4/svr4_misc.c
===================================================================
RCS file: /mnt/share/dragonfly-cvs/src/sys/emulation/svr4/svr4_misc.c,v
retrieving revision 1.31
diff -u -r1.31 svr4_misc.c
--- svr4/svr4_misc.c	1 Dec 2005 18:30:12 -0000	1.31
+++ svr4/svr4_misc.c	8 Dec 2005 22:55:53 -0000
@@ -631,11 +631,8 @@
 
 
 static int
-svr4_mknod(retval, path, mode, dev)
-	register_t *retval;
-	char *path;
-	svr4_mode_t mode;
-	svr4_dev_t dev;
+svr4_mknod(register_t *retval, char *path, svr4_mode_t mode,
+	   svr4_dev_t dev)
 {
 	caddr_t sg = stackgap_init();
 	int error;
@@ -847,8 +844,7 @@
 }
 
 static __inline clock_t
-timeval_to_clock_t(tv)
-	struct timeval *tv;
+timeval_to_clock_t(struct timeval *tv)
 {
 	return tv->tv_sec * hz + tv->tv_usec / (1000000 / hz);
 }
@@ -966,8 +962,7 @@
 }
 
 static struct proc *
-svr4_pfind(pid)
-	pid_t pid;
+svr4_pfind(pid_t pid)
 {
 	struct proc *p;
 
@@ -1143,10 +1138,7 @@
 
 
 static int
-svr4_setinfo(p, st, s)
-	struct proc *p;
-	int st;
-	svr4_siginfo_t *s;
+svr4_setinfo(struct proc *p, int st, svr4_siginfo_t *s)
 {
 	svr4_siginfo_t i;
 	int sig;
Index: svr4/svr4_resource.c
===================================================================
RCS file: /mnt/share/dragonfly-cvs/src/sys/emulation/svr4/svr4_resource.c,v
retrieving revision 1.6
diff -u -r1.6 svr4_resource.c
--- svr4/svr4_resource.c	4 Nov 2003 05:01:10 -0000	1.6
+++ svr4/svr4_resource.c	8 Dec 2005 23:20:47 -0000
@@ -91,8 +91,7 @@
 static __inline int svr4_to_native_rl (int);
 
 static __inline int
-svr4_to_native_rl(rl)
-	int rl;
+svr4_to_native_rl(int rl)
 {
 	switch (rl) {
 	case SVR4_RLIMIT_CPU:
Index: svr4/svr4_signal.c
===================================================================
RCS file: /mnt/share/dragonfly-cvs/src/sys/emulation/svr4/svr4_signal.c,v
retrieving revision 1.10
diff -u -r1.10 svr4_signal.c
--- svr4/svr4_signal.c	27 Jun 2005 01:49:59 -0000	1.10
+++ svr4/svr4_signal.c	8 Dec 2005 22:51:59 -0000
@@ -126,8 +126,7 @@
 };
 
 void
-svr4_sigfillset(s)
-	svr4_sigset_t *s;
+svr4_sigfillset(svr4_sigset_t *s)
 {
 	int i;
 
@@ -138,9 +137,7 @@
 }
 
 void
-svr4_to_bsd_sigset(sss, bss)
-	const svr4_sigset_t *sss;
-	sigset_t *bss;
+svr4_to_bsd_sigset(const svr4_sigset_t *sss, sigset_t *bss)
 {
 	int i, newsig;
 
@@ -154,9 +151,7 @@
 }
 
 void
-bsd_to_svr4_sigset(bss, sss)
-	const sigset_t *bss;
-	svr4_sigset_t *sss;
+bsd_to_svr4_sigset(const sigset_t *bss, svr4_sigset_t *sss)
 {
 	int i, newsig;
 
@@ -178,9 +173,8 @@
  * XXX: Only a subset of the flags is currently implemented.
  */
 void
-svr4_to_bsd_sigaction(ssa, bsa)
-	const struct svr4_sigaction *ssa;
-	struct sigaction *bsa;
+svr4_to_bsd_sigaction(const struct svr4_sigaction *ssa,
+		      struct sigaction *bsa)
 {
 
 	bsa->sa_handler = (sig_t) ssa->ssa_handler;
@@ -205,9 +199,8 @@
 }
 
 void
-bsd_to_svr4_sigaction(bsa, ssa)
-	const struct sigaction *bsa;
-	struct svr4_sigaction *ssa;
+bsd_to_svr4_sigaction(const struct sigaction *bsa,
+		      struct svr4_sigaction *ssa)
 {
 
 	ssa->ssa_handler = (svr4_sig_t) bsa->sa_handler;
@@ -226,9 +219,8 @@
 }
 
 void
-svr4_to_bsd_sigaltstack(sss, bss)
-	const struct svr4_sigaltstack *sss;
-	struct sigaltstack *bss;
+svr4_to_bsd_sigaltstack(const struct svr4_sigaltstack *sss,
+			struct sigaltstack *bss)
 {
 
 	bss->ss_sp = sss->ss_sp;
@@ -243,9 +235,8 @@
 }
 
 void
-bsd_to_svr4_sigaltstack(bss, sss)
-	const struct sigaltstack *bss;
-	struct svr4_sigaltstack *sss;
+bsd_to_svr4_sigaltstack(const struct sigaltstack *bss,
+			struct svr4_sigaltstack *sss)
 {
 
 	sss->ss_sp = bss->ss_sp;
Index: svr4/svr4_socket.c
===================================================================
RCS file: /mnt/share/dragonfly-cvs/src/sys/emulation/svr4/svr4_socket.c,v
retrieving revision 1.7
diff -u -r1.7 svr4_socket.c
--- svr4/svr4_socket.c	2 Aug 2005 13:03:54 -0000	1.7
+++ svr4/svr4_socket.c	8 Dec 2005 23:17:11 -0000
@@ -78,11 +78,7 @@
 extern int svr4_str_initialized;
 
 struct sockaddr_un *
-svr4_find_socket(td, fp, dev, ino)
-	struct thread *td;
-	struct file *fp;
-	udev_t dev;
-	ino_t ino;
+svr4_find_socket(struct thread *td, struct file *fp, udev_t dev, ino_t ino)
 {
 	struct svr4_sockcache_entry *e;
 	void *cookie = ((struct socket *) fp->f_data)->so_emuldata;
@@ -118,10 +114,7 @@
  * the streams "soo_close()" routine).
  */
 int
-svr4_add_socket(td, path, st)
-	struct thread *td;
-	const char *path;
-	struct stat *st;
+svr4_add_socket(struct thread *td, const char *path, struct stat *st)
 {
 	struct svr4_sockcache_entry *e;
 	int len, error;
Index: svr4/svr4_sockio.c
===================================================================
RCS file: /mnt/share/dragonfly-cvs/src/sys/emulation/svr4/svr4_sockio.c,v
retrieving revision 1.7
diff -u -r1.7 svr4_sockio.c
--- svr4/svr4_sockio.c	2 Aug 2004 13:22:32 -0000	1.7
+++ svr4/svr4_sockio.c	8 Dec 2005 23:18:26 -0000
@@ -52,8 +52,7 @@
 	if (bf & __CONCAT(I,a))	sf |= __CONCAT(SVR4_I,a)
 
 static int
-bsd_to_svr4_flags(bf)
-	int bf;
+bsd_to_svr4_flags(int bf)
 {
 	int sf = 0;
 	bsd_to_svr4_flag(FF_UP);
@@ -73,13 +72,8 @@
 }
 
 int
-svr4_sock_ioctl(fp, td, retval, fd, cmd, data)
-	struct file *fp;
-	struct thread *td;
-	register_t *retval;
-	int fd;
-	u_long cmd;
-	caddr_t data;
+svr4_sock_ioctl(struct file *fp, struct thread *td, register_t *retval,
+		int fd, u_long cmd, caddr_t data)
 {
 	int error;
 
Index: svr4/svr4_stat.c
===================================================================
RCS file: /mnt/share/dragonfly-cvs/src/sys/emulation/svr4/svr4_stat.c,v
retrieving revision 1.9
diff -u -r1.9 svr4_stat.c
--- svr4/svr4_stat.c	20 Nov 2003 06:05:30 -0000	1.9
+++ svr4/svr4_stat.c	8 Dec 2005 22:57:11 -0000
@@ -89,9 +89,7 @@
 static void bsd_to_svr4_stat (struct stat *, struct svr4_stat *);
 
 static void
-bsd_to_svr4_stat(st, st4)
-	struct stat		*st;
-	struct svr4_stat 	*st4;
+bsd_to_svr4_stat(struct stat *st, struct svr4_stat *st4)
 {
 	memset(st4, 0, sizeof(*st4));
 	st4->st_dev = bsd_to_svr4_odev_t(st->st_dev);
@@ -110,9 +108,7 @@
 
 
 static void
-bsd_to_svr4_xstat(st, st4)
-	struct stat		*st;
-	struct svr4_xstat	*st4;
+bsd_to_svr4_xstat(struct stat *st, struct svr4_xstat *st4)
 {
 	memset(st4, 0, sizeof(*st4));
 	st4->st_dev = bsd_to_svr4_dev_t(st->st_dev);
@@ -133,9 +129,7 @@
 
 
 static void
-bsd_to_svr4_stat64(st, st4)
-	struct stat		*st;
-	struct svr4_stat64	*st4;
+bsd_to_svr4_stat64(struct stat *st, struct svr4_stat64 *st4)
 {
 	memset(st4, 0, sizeof(*st4));
 	st4->st_dev = bsd_to_svr4_dev_t(st->st_dev);
@@ -695,8 +689,7 @@
 }
 
 static int
-svr4_to_bsd_pathconf(name)
-	int name;
+svr4_to_bsd_pathconf(int name)
 {
 	switch (name) {
 	case SVR4_PC_LINK_MAX:
Index: svr4/svr4_stream.c
===================================================================
RCS file: /mnt/share/dragonfly-cvs/src/sys/emulation/svr4/svr4_stream.c,v
retrieving revision 1.14
diff -u -r1.14 svr4_stream.c
--- svr4/svr4_stream.c	22 Jun 2005 01:33:29 -0000	1.14
+++ svr4/svr4_stream.c	8 Dec 2005 23:16:12 -0000
@@ -147,12 +147,8 @@
  * I will take out all the #ifdef COMPAT_OLDSOCK gumph, though.
  */
 static int
-svr4_sendit(td, s, mp, flags, retval)
-	struct thread *td;
-	int s;
-	struct msghdr *mp;
-	int flags;
-	int *retval;
+svr4_sendit(struct thread *td, int s, struct msghdr *mp, int flags,
+	    int *retval)
 {
 	struct proc *p;
 	struct file *fp;
@@ -256,12 +252,8 @@
 }
 
 static int
-svr4_recvit(td, s, mp, namelenp, retval)
-	struct thread *td;
-	int s;
-	struct msghdr *mp;
-	caddr_t namelenp;
-	int *retval;
+svr4_recvit(struct thread *td, int s, struct msghdr *mp, caddr_t namelenp,
+	    int *retval)
 {
 	struct proc *p = td->td_proc;
 	struct file *fp;
@@ -392,9 +384,7 @@
 			  struct svr4_strbuf *, int);
 
 static void
-bufprint(buf, len)
-	u_char *buf;
-	size_t len;
+bufprint(u_char *buf, size_t len)
 {
 	size_t i;
 
@@ -407,9 +397,7 @@
 }
 
 static int
-show_ioc(str, ioc)
-	const char		*str;
-	struct svr4_strioctl	*ioc;
+show_ioc(const char *str, struct svr4_strioctl *ioc)
 {
 	u_char *ptr = (u_char *) malloc(ioc->len, M_TEMP, M_WAITOK);
 	int error;
@@ -432,8 +420,7 @@
 
 
 static int
-show_strbuf(str)
-	struct svr4_strbuf *str;
+show_strbuf(struct svr4_strbuf *str)
 {
 	int error;
 	u_char *ptr = NULL;
@@ -470,12 +457,8 @@
 
 
 static void
-show_msg(str, fd, ctl, dat, flags)
-	const char		*str;
-	int			 fd;
-	struct svr4_strbuf	*ctl;
-	struct svr4_strbuf	*dat;
-	int			 flags;
+show_msg(const char *str, int fd, struct svr4_strbuf *ctl,
+	 struct svr4_strbuf *dat, int flags)
 {
 	struct svr4_strbuf	buf;
 	int error;
@@ -559,9 +542,7 @@
 
 
 static void
-sockaddr_to_netaddr_in(sc, sain)
-	struct svr4_strmcmd *sc;
-	const struct sockaddr_in *sain;
+sockaddr_to_netaddr_in(struct svr4_strmcmd *sc, const struct sockaddr_in *sain)
 {
 	struct svr4_netaddr_in *na;
 	na = SVR4_ADDROF(sc);
@@ -575,9 +556,7 @@
 
 
 static void
-sockaddr_to_netaddr_un(sc, saun)
-	struct svr4_strmcmd *sc;
-	const struct sockaddr_un *saun;
+sockaddr_to_netaddr_un(struct svr4_strmcmd *sc, const struct sockaddr_un *saun)
 {
 	struct svr4_netaddr_un *na;
 	char *dst, *edst = ((char *) sc) + sc->offs + sizeof(na->family) + 1  -
@@ -594,9 +573,7 @@
 
 
 static void
-netaddr_to_sockaddr_in(sain, sc)
-	struct sockaddr_in *sain;
-	const struct svr4_strmcmd *sc;
+netaddr_to_sockaddr_in(struct sockaddr_in *sain, const struct svr4_strmcmd *sc)
 {
 	const struct svr4_netaddr_in *na;
 
@@ -613,9 +590,7 @@
 
 
 static void
-netaddr_to_sockaddr_un(saun, sc)
-	struct sockaddr_un *saun;
-	const struct svr4_strmcmd *sc;
+netaddr_to_sockaddr_un(struct sockaddr_un *saun, const struct svr4_strmcmd *sc)
 {
 	const struct svr4_netaddr_un *na;
 	char *dst, *edst = &saun->sun_path[sizeof(saun->sun_path) - 1];
@@ -634,9 +609,7 @@
 
 
 static void
-getparm(fp, pa)
-	struct file *fp;
-	struct svr4_si_sockparms *pa;
+getparm(struct file *fp, struct svr4_si_sockparms *pa)
 {
 	struct svr4_strm *st = svr4_stream_get(fp);
 	struct socket *so = (struct socket *) fp->f_data;
@@ -675,11 +648,8 @@
 
 
 static int
-si_ogetudata(fp, fd, ioc, td)
-	struct file		*fp;
-	int 			 fd;
-	struct svr4_strioctl	*ioc;
-	struct thread 		*td;
+si_ogetudata(struct file *fp, int fd, struct svr4_strioctl *ioc,
+	     struct thread *td)
 {
 	int error;
 	struct svr4_si_oudata ud;
@@ -732,11 +702,8 @@
 
 
 static int
-si_sockparams(fp, fd, ioc, td)
-	struct file		*fp;
-	int 			 fd;
-	struct svr4_strioctl	*ioc;
-	struct thread		*td;
+si_sockparams(struct file *fp, int fd, struct svr4_strioctl *ioc,
+	      struct thread *td)
 {
 	struct svr4_si_sockparms pa;
 
@@ -746,11 +713,8 @@
 
 
 static int
-si_listen(fp, fd, ioc, td)
-	struct file		*fp;
-	int 			 fd;
-	struct svr4_strioctl	*ioc;
-	struct thread		*td;
+si_listen(struct file *fp, int fd, struct svr4_strioctl *ioc,
+	  struct thread *td)
 {
 	int error;
 	struct svr4_strm *st = svr4_stream_get(fp);
@@ -810,11 +774,8 @@
 
 
 static int
-si_getudata(fp, fd, ioc, td)
-	struct file		*fp;
-	int 			 fd;
-	struct svr4_strioctl	*ioc;
-	struct thread		*td;
+si_getudata(struct file *fp, int fd, struct svr4_strioctl *ioc,
+	    struct thread *td)
 {
 	int error;
 	struct svr4_si_udata ud;
@@ -869,11 +830,8 @@
 
 
 static int
-si_shutdown(fp, fd, ioc, td)
-	struct file		*fp;
-	int 			 fd;
-	struct svr4_strioctl	*ioc;
-	struct thread		*td;
+si_shutdown(struct file *fp, int fd, struct svr4_strioctl *ioc,
+	    struct thread *td)
 {
 	int error;
 	struct shutdown_args ap;
@@ -894,11 +852,8 @@
 
 
 static int
-sockmod(fp, fd, ioc, td)
-	struct file		*fp;
-	int			 fd;
-	struct svr4_strioctl	*ioc;
-	struct thread		*td;
+sockmod(struct file *fp, int fd, struct svr4_strioctl *ioc,
+	struct thread *td)
 {
 	switch (ioc->cmd) {
 	case SVR4_SI_OGETUDATA:
@@ -950,11 +905,8 @@
 
 
 static int
-ti_getinfo(fp, fd, ioc, td)
-	struct file		*fp;
-	int 			 fd;
-	struct svr4_strioctl	*ioc;
-	struct thread		*td;
+ti_getinfo(struct file *fp, int fd, struct svr4_strioctl *ioc,
+	   struct thread *td)
 {
 	int error;
@@ -988,11 +940,8 @@
 
 
 static int
-ti_bind(fp, fd, ioc, td)
-	struct file		*fp;
-	int 			 fd;
-	struct svr4_strioctl	*ioc;
-	struct thread		*td;
+ti_bind(struct file *fp, int fd, struct svr4_strioctl *ioc,
+	struct thread *td)
 {
 	int error;
 	struct svr4_strm *st = svr4_stream_get(fp);
@@ -1091,11 +1040,7 @@
 
 
 static int
-timod(fp, fd, ioc, td)
-	struct file		*fp;
-	int			 fd;
-	struct svr4_strioctl	*ioc;
-	struct thread		*td;
+timod(struct file *fp, int fd, struct svr4_strioctl *ioc, struct thread *td)
 {
 	switch (ioc->cmd) {
 	case SVR4_TI_GETINFO:
@@ -1122,13 +1067,8 @@
 
 
 int
-svr4_stream_ti_ioctl(fp, td, retval, fd, cmd, dat)
-	struct file *fp;
-	struct thread *td;
-	register_t *retval;
-	int fd;
-	u_long cmd;
-	caddr_t dat;
+svr4_stream_ti_ioctl(struct file *fp, struct thread *td, register_t *retval,
+		     int fd, u_long cmd, caddr_t dat)
 {
 	struct svr4_strbuf skb, *sub = (struct svr4_strbuf *) dat;
 	struct svr4_strm *st = svr4_stream_get(fp);
@@ -1264,13 +1204,8 @@
 
 
 static int
-i_nread(fp, td, retval, fd, cmd, dat)
-	struct file *fp;
-	struct thread *td;
-	register_t *retval;
-	int fd;
-	u_long cmd;
-	caddr_t dat;
+i_nread(struct file *fp, struct thread *td, register_t *retval,
+	int fd, u_long cmd, caddr_t dat)
 {
 	int error;
 	int nread = 0;	
@@ -1294,13 +1229,8 @@
 }
 
 static int
-i_fdinsert(fp, td, retval, fd, cmd, dat)
-	struct file *fp;
-	struct thread *td;
-	register_t *retval;
-	int fd;
-	u_long cmd;
-	caddr_t dat;
+i_fdinsert(struct file *fp, struct thread *td, register_t *retval,
+	   int fd, u_long cmd, caddr_t dat)
 {
 	/*
 	 * Major hack again here. We assume that we are using this to
@@ -1356,13 +1286,8 @@
 
 
 static int
-_i_bind_rsvd(fp, td, retval, fd, cmd, dat)
-	struct file *fp;
-	struct thread *td;
-	register_t *retval;
-	int fd;
-	u_long cmd;
-	caddr_t dat;
+_i_bind_rsvd(struct file *fp, struct thread *td, register_t *retval,
+	     int fd, u_long cmd, caddr_t dat)
 {
 	struct mkfifo_args ap;
 
@@ -1380,13 +1305,8 @@
 }
 
 static int
-_i_rele_rsvd(fp, td, retval, fd, cmd, dat)
-	struct file *fp;
-	struct thread *td;
-	register_t *retval;
-	int fd;
-	u_long cmd;
-	caddr_t dat;
+_i_rele_rsvd(struct file *fp, struct thread *td, register_t *retval,
+	     int fd, u_long cmd, caddr_t dat)
 {
 	struct unlink_args ap;
 
@@ -1400,13 +1320,8 @@
 }
 
 static int
-i_str(fp, td, retval, fd, cmd, dat)
-	struct file *fp;
-	struct thread *td;
-	register_t *retval;
-	int fd;
-	u_long cmd;
-	caddr_t dat;
+i_str(struct file *fp, struct thread *td, register_t *retval,
+      int fd, u_long cmd, caddr_t dat)
 {
 	int			 error;
 	struct svr4_strioctl	 ioc;
@@ -1444,13 +1359,8 @@
 }
 
 static int
-i_setsig(fp, td, retval, fd, cmd, dat)
-	struct file *fp;
-	struct thread *td;
-	register_t *retval;
-	int fd;
-	u_long cmd;
-	caddr_t dat;
+i_setsig(struct file *fp, struct thread *td, register_t *retval,
+	 int fd, u_long cmd, caddr_t dat)
 {
 	/* 
 	 * This is the best we can do for now; we cannot generate
@@ -1522,13 +1432,8 @@
 }
 
 static int
-i_getsig(fp, td, retval, fd, cmd, dat)
-	struct file *fp;
-	struct thread *td;
-	register_t *retval;
-	int fd;
-	u_long cmd;
-	caddr_t dat;
+i_getsig(struct file *fp, struct thread *td, register_t *retval,
+	 int fd, u_long cmd, caddr_t dat)
 {
 	int error;
 
@@ -1549,13 +1454,8 @@
 }
 
 int
-svr4_stream_ioctl(fp, td, retval, fd, cmd, dat)
-	struct file *fp;
-	struct thread *td;
-	register_t *retval;
-	int fd;
-	u_long cmd;
-	caddr_t dat;
+svr4_stream_ioctl(struct file *fp, struct thread *td, register_t *retval,
+		  int fd, u_long cmd, caddr_t dat)
 {
 	*retval = 0;
 
@@ -2261,7 +2161,8 @@
 	return error;
 }
 
-int svr4_sys_send(struct svr4_sys_send_args *uap)
+int
+svr4_sys_send(struct svr4_sys_send_args *uap)
 {
 	struct osend_args osa;
 	int error;
@@ -2276,7 +2177,8 @@
 	return(error);
 }
 
-int svr4_sys_recv(struct svr4_sys_recv_args *uap)
+int
+svr4_sys_recv(struct svr4_sys_recv_args *uap)
 {
 	struct orecv_args ora;
 	int error;
Index: svr4/svr4_sysvec.c
===================================================================
RCS file: /mnt/share/dragonfly-cvs/src/sys/emulation/svr4/svr4_sysvec.c,v
retrieving revision 1.13
diff -u -r1.13 svr4_sysvec.c
--- svr4/svr4_sysvec.c	1 Jun 2005 16:51:46 -0000	1.13
+++ svr4/svr4_sysvec.c	8 Dec 2005 22:49:20 -0000
@@ -242,14 +242,13 @@
  * be in exists.
  *
  * Code shamelessly stolen by Mark Newton from IBCS2 emulation code.
+ *
+ * PArameters:
+ *	sgp:	Pointer to stackgap memory
  */
 int
-svr4_emul_find(sgp, prefix, path, pbuf, cflag)
-	caddr_t		 *sgp;		/* Pointer to stackgap memory */
-	const char	 *prefix;
-	char		 *path;
-	char		**pbuf;
-	int		  cflag;
+svr4_emul_find(caddr_t *sgp, const char *prefix, char *path, char **pbuf,
+	       int cflag)
 {
 	struct thread *td = curthread;	/* XXX */
 	struct nlookupdata	 nd;
Index: svr4/svr4_termios.c
===================================================================
RCS file: /mnt/share/dragonfly-cvs/src/sys/emulation/svr4/svr4_termios.c,v
retrieving revision 1.5
diff -u -r1.5 svr4_termios.c
--- svr4/svr4_termios.c	27 Aug 2003 06:07:10 -0000	1.5
+++ svr4/svr4_termios.c	9 Dec 2005 00:08:55 -0000
@@ -167,9 +167,7 @@
 #endif /* DEBUG_SVR4 */
 
 static u_long
-bsd_to_svr4_speed(sp, mask)
-	u_long sp;
-	u_long mask;
+bsd_to_svr4_speed(u_long sp, u_long mask)
 {
 	switch (sp) {
 #undef getval
@@ -205,9 +203,7 @@
 
 
 static u_long
-svr4_to_bsd_speed(sp, mask)
-	u_long sp;
-	u_long mask;
+svr4_to_bsd_speed(u_long sp, u_long mask)
 {
 	while ((mask & 1) == 0) {
 		mask >>= 1;
@@ -241,10 +237,8 @@
 
 
 static void
-svr4_to_bsd_termios(st, bt, new)
-	const struct svr4_termios	*st;
-	struct termios	 		*bt;
-	int				 new;
+svr4_to_bsd_termios(const struct svr4_termios *st, struct termios *bt,
+		    int new)
 {
 	/* control characters */
 	/*
@@ -343,9 +337,7 @@
 
 
 static void
-bsd_to_svr4_termios(bt, st)
-	const struct termios 	*bt;
-	struct svr4_termios	*st;
+bsd_to_svr4_termios(const struct termios *bt, struct svr4_termios *st)
 {
 	/* control characters */
 	/*
@@ -446,9 +438,7 @@
 
 
 static void
-svr4_termio_to_termios(t, ts)
-	const struct svr4_termio	*t;
-	struct svr4_termios		*ts;
+svr4_termio_to_termios(const struct svr4_termio *t, struct svr4_termios *ts)
 {
 	int i;
 
@@ -463,9 +453,7 @@
 
 
 static void
-svr4_termios_to_termio(ts, t)
-	const struct svr4_termios	*ts;
-	struct svr4_termio		*t;
+svr4_termios_to_termio(const struct svr4_termios *ts, struct svr4_termio *t)
 {
 	int i;
 
@@ -480,13 +468,8 @@
 }
 
 int
-svr4_term_ioctl(fp, td, retval, fd, cmd, data)
-	struct file *fp;
-	struct thread *td;
-	register_t *retval;
-	int fd;
-	u_long cmd;
-	caddr_t data;
+svr4_term_ioctl(struct file *fp, struct thread *td, register_t *retval,
+		int fd, u_long cmd, caddr_t data)
 {
 	struct termios 		bt;
 	struct svr4_termios	st;
Index: svr4/svr4_ttold.c
===================================================================
RCS file: /mnt/share/dragonfly-cvs/src/sys/emulation/svr4/svr4_ttold.c,v
retrieving revision 1.5
diff -u -r1.5 svr4_ttold.c
--- svr4/svr4_ttold.c	27 Aug 2003 06:07:10 -0000	1.5
+++ svr4/svr4_ttold.c	8 Dec 2005 23:00:29 -0000
@@ -95,9 +95,7 @@
 #endif /* DEBUG_SVR4 */
 
 static void
-svr4_tchars_to_bsd_tchars(st, bt)
-	const struct svr4_tchars	*st;
-	struct tchars			*bt;
+svr4_tchars_to_bsd_tchars(const struct svr4_tchars *st, struct tchars *bt)
 {
 	bt->t_intrc  = st->t_intrc;
 	bt->t_quitc  = st->t_quitc;
@@ -109,9 +107,7 @@
 
 
 static void
-bsd_tchars_to_svr4_tchars(bt, st)
-	const struct tchars	*bt;
-	struct svr4_tchars	*st;
+bsd_tchars_to_svr4_tchars(const struct tchars *bt, struct svr4_tchars *st)
 {
 	st->t_intrc  = bt->t_intrc;
 	st->t_quitc  = bt->t_quitc;
@@ -123,9 +119,7 @@
 
 
 static void
-svr4_sgttyb_to_bsd_sgttyb(ss, bs)
-	const struct svr4_sgttyb	*ss;
-	struct sgttyb			*bs;
+svr4_sgttyb_to_bsd_sgttyb(const struct svr4_sgttyb *ss, struct sgttyb *bs)
 {
 	bs->sg_ispeed = ss->sg_ispeed;
 	bs->sg_ospeed = ss->sg_ospeed;
@@ -136,9 +130,7 @@
 
 
 static void
-bsd_sgttyb_to_svr4_sgttyb(bs, ss)
-	const struct sgttyb	*bs;
-	struct svr4_sgttyb	*ss;
+bsd_sgttyb_to_svr4_sgttyb(const struct sgttyb *bs, struct svr4_sgttyb *ss)
 {
 	ss->sg_ispeed = bs->sg_ispeed;
 	ss->sg_ospeed = bs->sg_ospeed;
@@ -149,9 +141,7 @@
 
 
 static void
-svr4_ltchars_to_bsd_ltchars(sl, bl)
-	const struct svr4_ltchars	*sl;
-	struct ltchars			*bl;
+svr4_ltchars_to_bsd_ltchars(const struct svr4_ltchars *sl, struct ltchars *bl)
 {
 	bl->t_suspc  = sl->t_suspc;
 	bl->t_dsuspc = sl->t_dsuspc;
@@ -163,9 +153,7 @@
 
 
 static void
-bsd_ltchars_to_svr4_ltchars(bl, sl)
-	const struct ltchars	*bl;
-	struct svr4_ltchars	*sl;
+bsd_ltchars_to_svr4_ltchars(const struct ltchars *bl, struct svr4_ltchars *sl)
 {
 	sl->t_suspc  = bl->t_suspc;
 	sl->t_dsuspc = bl->t_dsuspc;
@@ -177,13 +165,8 @@
 
 
 int
-svr4_ttold_ioctl(fp, td, retval, fd, cmd, data)
-	struct file *fp;
-	struct thread *td;
-	register_t *retval;
-	int fd;
-	u_long cmd;
-	caddr_t data;
+svr4_ttold_ioctl(struct file *fp, struct thread *td, register_t *retval,
+		 int fd, u_long cmd, caddr_t data)
 {
 	int			error;
 
Index: svr4/svr4_util.h
===================================================================
RCS file: /mnt/share/dragonfly-cvs/src/sys/emulation/svr4/svr4_util.h,v
retrieving revision 1.4
diff -u -r1.4 svr4_util.h
--- svr4/svr4_util.h	27 Aug 2003 06:07:10 -0000	1.4
+++ svr4/svr4_util.h	26 Nov 2005 00:51:16 -0000
@@ -52,16 +52,14 @@
 static __inline void *stackgap_alloc(caddr_t *, size_t);
 
 static __inline caddr_t
-stackgap_init()
+stackgap_init(void)
 {
 #define szsigcode (*(curproc->p_sysent->sv_szsigcode))
         return (caddr_t)(((caddr_t)PS_STRINGS) - szsigcode - SPARE_USRSPACE);
 }
 
 static __inline void *
-stackgap_alloc(sgp, sz)
-	caddr_t	*sgp;
-	size_t   sz;
+stackgap_alloc(caddr_t *sgp, size_t sz)
 {
 	void	*p = (void *) *sgp;
 	*sgp += ALIGN(sz);
Index: svr4/i386/svr4_machdep.c
===================================================================
RCS file: /mnt/share/dragonfly-cvs/src/sys/emulation/svr4/i386/svr4_machdep.c,v
retrieving revision 1.8
diff -u -r1.8 svr4_machdep.c
--- svr4/i386/svr4_machdep.c	20 Dec 2003 05:52:22 -0000	1.8
+++ svr4/i386/svr4_machdep.c	8 Dec 2005 23:20:24 -0000
@@ -89,11 +89,8 @@
 #endif /* __NetBSD__ */
 
 void
-svr4_getcontext(p, uc, mask, oonstack)
-	struct proc *p;
-	struct svr4_ucontext *uc;
-	sigset_t *mask;
-	int oonstack;
+svr4_getcontext(struct proc *p, struct svr4_ucontext *uc, sigset_t *mask,
+		int oonstack)
 {
 	struct trapframe *tf = p->p_md.md_regs;
 	svr4_greg_t *r = uc->uc_mcontext.greg;
@@ -178,9 +175,7 @@
  * a machine fault.
  */
 int
-svr4_setcontext(p, uc)
-	struct proc *p;
-	struct svr4_ucontext *uc;
+svr4_setcontext(struct proc *p, struct svr4_ucontext *uc)
 {
 #if defined(DONE_MORE_SIGALTSTACK_WORK)
 	struct sigacts *psp = p->p_sigacts;
@@ -285,11 +280,8 @@
 
 
 static void
-svr4_getsiginfo(si, sig, code, addr)
-	union svr4_siginfo	*si;
-	int			 sig;
-	u_long			 code;
-	caddr_t			 addr;
+svr4_getsiginfo(union svr4_siginfo *si, int sig, u_long code,
+		caddr_t addr)
 {
 	si->si_signo = bsd_to_svr4_sig[sig];
 	si->si_errno = 0;
@@ -388,11 +380,7 @@
  * will return to the user pc, psl.
  */
 void
-svr4_sendsig(catcher, sig, mask, code)
-	sig_t catcher;
-	int sig;
-	sigset_t *mask;
-	u_long code;
+svr4_sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code)
 {
 	struct proc *p = curproc;
 	struct trapframe *tf;




More information about the Submit mailing list