Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev ANSIfy.



details:   https://anonhg.NetBSD.org/src/rev/ee4b25dc0996
branches:  trunk
changeset: 515705:ee4b25dc0996
user:      augustss <augustss%NetBSD.org@localhost>
date:      Tue Oct 02 23:31:54 2001 +0000

description:
ANSIfy.

diffstat:

 sys/dev/auconv.c   |   62 +------
 sys/dev/auconv.h   |   26 +-
 sys/dev/audio.c    |  387 +++++++++++++++++-----------------------------------
 sys/dev/audio_if.h |   71 ++++----
 sys/dev/mulaw.c    |   82 ++--------
 sys/dev/mulaw.h    |   34 ++--
 6 files changed, 220 insertions(+), 442 deletions(-)

diffs (truncated from 1399 to 300 lines):

diff -r 2f0b8a7e5036 -r ee4b25dc0996 sys/dev/auconv.c
--- a/sys/dev/auconv.c  Tue Oct 02 22:41:22 2001 +0000
+++ b/sys/dev/auconv.c  Tue Oct 02 23:31:54 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: auconv.c,v 1.3 1999/11/01 18:12:19 augustss Exp $      */
+/*     $NetBSD: auconv.c,v 1.4 2001/10/02 23:31:55 augustss Exp $      */
 
 /*
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -39,10 +39,7 @@
 #include <dev/auconv.h>
 
 void
-change_sign8(v, p, cc)
-       void *v;
-       u_char *p;
-       int cc;
+change_sign8(void *v, u_char *p, int cc)
 {
        while (--cc >= 0) {
                *p ^= 0x80;
@@ -51,10 +48,7 @@
 }
 
 void
-change_sign16_le(v, p, cc)
-       void *v;
-       u_char *p;
-       int cc;
+change_sign16_le(void *v, u_char *p, int cc)
 {
        while ((cc -= 2) >= 0) {
                p[1] ^= 0x80;
@@ -63,10 +57,7 @@
 }
 
 void
-change_sign16_be(v, p, cc)
-       void *v;
-       u_char *p;
-       int cc;
+change_sign16_be(void *v, u_char *p, int cc)
 {
        while ((cc -= 2) >= 0) {
                p[0] ^= 0x80;
@@ -75,10 +66,7 @@
 }
 
 void
-swap_bytes(v, p, cc)
-       void *v;
-       u_char *p;
-       int cc;
+swap_bytes(void *v, u_char *p, int cc)
 {
        u_char t;
 
@@ -91,10 +79,7 @@
 }
 
 void
-swap_bytes_change_sign16_le(v, p, cc)
-       void *v;
-       u_char *p;
-       int cc;
+swap_bytes_change_sign16_le(void *v, u_char *p, int cc)
 {
        u_char t;
 
@@ -107,10 +92,7 @@
 }
 
 void
-swap_bytes_change_sign16_be(v, p, cc)
-       void *v;
-       u_char *p;
-       int cc;
+swap_bytes_change_sign16_be(void *v, u_char *p, int cc)
 {
        u_char t;
 
@@ -123,28 +105,19 @@
 }
 
 void
-change_sign16_swap_bytes_le(v, p, cc)
-       void *v;
-       u_char *p;
-       int cc;
+change_sign16_swap_bytes_le(void *v, u_char *p, int cc)
 {
        swap_bytes_change_sign16_be(v, p, cc);
 }
 
 void
-change_sign16_swap_bytes_be(v, p, cc)
-       void *v;
-       u_char *p;
-       int cc;
+change_sign16_swap_bytes_be(void *v, u_char *p, int cc)
 {
        swap_bytes_change_sign16_le(v, p, cc);
 }
 
 void
-linear8_to_linear16_le(v, p, cc)
-       void *v;
-       u_char *p;
-       int cc;
+linear8_to_linear16_le(void *v, u_char *p, int cc)
 {
        u_char *q = p;
 
@@ -158,10 +131,7 @@
 }
 
 void
-linear8_to_linear16_be(v, p, cc)
-       void *v;
-       u_char *p;
-       int cc;
+linear8_to_linear16_be(void *v, u_char *p, int cc)
 {
        u_char *q = p;
 
@@ -175,10 +145,7 @@
 }
 
 void
-linear16_to_linear8_le(v, p, cc)
-       void *v;
-       u_char *p;
-       int cc;
+linear16_to_linear8_le(void *v, u_char *p, int cc)
 {
        u_char *q = p;
 
@@ -189,10 +156,7 @@
 }
 
 void
-linear16_to_linear8_be(v, p, cc)
-       void *v;
-       u_char *p;
-       int cc;
+linear16_to_linear8_be(void *v, u_char *p, int cc)
 {
        u_char *q = p;
 
diff -r 2f0b8a7e5036 -r ee4b25dc0996 sys/dev/auconv.h
--- a/sys/dev/auconv.h  Tue Oct 02 22:41:22 2001 +0000
+++ b/sys/dev/auconv.h  Tue Oct 02 23:31:54 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: auconv.h,v 1.5 1999/11/01 18:12:19 augustss Exp $      */
+/*     $NetBSD: auconv.h,v 1.6 2001/10/02 23:31:55 augustss Exp $      */
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -37,17 +37,17 @@
  */
 
 /* Convert between signed and unsigned. */
-extern void change_sign8 __P((void *, u_char *, int));
-extern void change_sign16_le __P((void *, u_char *, int));
-extern void change_sign16_be __P((void *, u_char *, int));
+extern void change_sign8(void *, u_char *, int);
+extern void change_sign16_le(void *, u_char *, int);
+extern void change_sign16_be(void *, u_char *, int);
 /* Convert between little and big endian. */
-extern void swap_bytes __P((void *, u_char *, int));
-extern void swap_bytes_change_sign16_le __P((void *, u_char *, int));
-extern void swap_bytes_change_sign16_be __P((void *, u_char *, int));
-extern void change_sign16_swap_bytes_le __P((void *, u_char *, int));
-extern void change_sign16_swap_bytes_be __P((void *, u_char *, int));
+extern void swap_bytes(void *, u_char *, int);
+extern void swap_bytes_change_sign16_le(void *, u_char *, int);
+extern void swap_bytes_change_sign16_be(void *, u_char *, int);
+extern void change_sign16_swap_bytes_le(void *, u_char *, int);
+extern void change_sign16_swap_bytes_be(void *, u_char *, int);
 /* Byte expansion/contraction */
-extern void linear8_to_linear16_le __P((void *, u_char *, int));
-extern void linear8_to_linear16_be __P((void *, u_char *, int));
-extern void linear16_to_linear8_le __P((void *, u_char *, int));
-extern void linear16_to_linear8_be __P((void *, u_char *, int));
+extern void linear8_to_linear16_le(void *, u_char *, int);
+extern void linear8_to_linear16_be(void *, u_char *, int);
+extern void linear16_to_linear8_le(void *, u_char *, int);
+extern void linear16_to_linear8_be(void *, u_char *, int);
diff -r 2f0b8a7e5036 -r ee4b25dc0996 sys/dev/audio.c
--- a/sys/dev/audio.c   Tue Oct 02 22:41:22 2001 +0000
+++ b/sys/dev/audio.c   Tue Oct 02 23:31:54 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: audio.c,v 1.139 2001/09/16 16:34:36 wiz Exp $  */
+/*     $NetBSD: audio.c,v 1.140 2001/10/02 23:31:54 augustss Exp $     */
 
 /*
  * Copyright (c) 1991-1993 Regents of the University of California.
@@ -97,54 +97,54 @@
 
 int    audio_blk_ms = AUDIO_BLK_MS;
 
-int    audiosetinfo __P((struct audio_softc *, struct audio_info *));
-int    audiogetinfo __P((struct audio_softc *, struct audio_info *));
+int    audiosetinfo(struct audio_softc *, struct audio_info *);
+int    audiogetinfo(struct audio_softc *, struct audio_info *);
 
-int    audio_open __P((dev_t, struct audio_softc *, int, int, struct proc *));
-int    audio_close __P((struct audio_softc *, int, int, struct proc *));
-int    audio_read __P((struct audio_softc *, struct uio *, int));
-int    audio_write __P((struct audio_softc *, struct uio *, int));
-int    audio_ioctl __P((struct audio_softc *, u_long, caddr_t, int, struct proc *));
-int    audio_poll __P((struct audio_softc *, int, struct proc *));
-paddr_t        audio_mmap __P((struct audio_softc *, off_t, int));
+int    audio_open(dev_t, struct audio_softc *, int, int, struct proc *);
+int    audio_close(struct audio_softc *, int, int, struct proc *);
+int    audio_read(struct audio_softc *, struct uio *, int);
+int    audio_write(struct audio_softc *, struct uio *, int);
+int    audio_ioctl(struct audio_softc *, u_long, caddr_t, int, struct proc *);
+int    audio_poll(struct audio_softc *, int, struct proc *);
+paddr_t        audio_mmap(struct audio_softc *, off_t, int);
 
-int    mixer_open __P((dev_t, struct audio_softc *, int, int, struct proc *));
-int    mixer_close __P((struct audio_softc *, int, int, struct proc *));
-int    mixer_ioctl __P((struct audio_softc *, u_long, caddr_t, int, struct proc *));
-static void mixer_remove __P((struct audio_softc *, struct proc *p));
-static void mixer_signal __P((struct audio_softc *));
+int    mixer_open(dev_t, struct audio_softc *, int, int, struct proc *);
+int    mixer_close(struct audio_softc *, int, int, struct proc *);
+int    mixer_ioctl(struct audio_softc *, u_long, caddr_t, int, struct proc *);
+static void mixer_remove(struct audio_softc *, struct proc *p);
+static void mixer_signal(struct audio_softc *);
     
-void   audio_init_record __P((struct audio_softc *));
-void   audio_init_play __P((struct audio_softc *));
-int    audiostartr __P((struct audio_softc *));
-int    audiostartp __P((struct audio_softc *));
-void   audio_rint __P((void *));
-void   audio_pint __P((void *));
-int    audio_check_params __P((struct audio_params *));
+void   audio_init_record(struct audio_softc *);
+void   audio_init_play(struct audio_softc *);
+int    audiostartr(struct audio_softc *);
+int    audiostartp(struct audio_softc *);
+void   audio_rint(void *);
+void   audio_pint(void *);
+int    audio_check_params(struct audio_params *);
 
-void   audio_calc_blksize __P((struct audio_softc *, int));
-void   audio_fill_silence __P((struct audio_params *, u_char *, int));
-int    audio_silence_copyout __P((struct audio_softc *, int, struct uio *));
+void   audio_calc_blksize(struct audio_softc *, int);
+void   audio_fill_silence(struct audio_params *, u_char *, int);
+int    audio_silence_copyout(struct audio_softc *, int, struct uio *);
 
-void   audio_init_ringbuffer __P((struct audio_ringbuffer *));
-int    audio_initbufs __P((struct audio_softc *));
-void   audio_calcwater __P((struct audio_softc *));
-static __inline int audio_sleep_timo __P((int *, char *, int));
-static __inline int audio_sleep __P((int *, char *));
-static __inline void audio_wakeup __P((int *));
-int    audio_drain __P((struct audio_softc *));
-void   audio_clear __P((struct audio_softc *));
+void   audio_init_ringbuffer(struct audio_ringbuffer *);
+int    audio_initbufs(struct audio_softc *);
+void   audio_calcwater(struct audio_softc *);
+static __inline int audio_sleep_timo(int *, char *, int);
+static __inline int audio_sleep(int *, char *);
+static __inline void audio_wakeup(int *);
+int    audio_drain(struct audio_softc *);
+void   audio_clear(struct audio_softc *);
 static __inline void audio_pint_silence 
-       __P((struct audio_softc *, struct audio_ringbuffer *, u_char *, int));
+       (struct audio_softc *, struct audio_ringbuffer *, u_char *, int);
 
 int    audio_alloc_ring 
-       __P((struct audio_softc *, struct audio_ringbuffer *, int, size_t));
-void   audio_free_ring __P((struct audio_softc *, struct audio_ringbuffer *));
+       (struct audio_softc *, struct audio_ringbuffer *, int, size_t);
+void   audio_free_ring(struct audio_softc *, struct audio_ringbuffer *);
 
-int    audioprobe __P((struct device *, struct cfdata *, void *));
-void   audioattach __P((struct device *, struct device *, void *));
-int    audiodetach __P((struct device *, int));
-int    audioactivate __P((struct device *, enum devact));
+int    audioprobe(struct device *, struct cfdata *, void *);
+void   audioattach(struct device *, struct device *, void *);
+int    audiodetach(struct device *, int);
+int    audioactivate(struct device *, enum devact);
 
 struct portname {
        char    *name;
@@ -162,21 +162,21 @@
        { AudioNline,           AUDIO_LINE_OUT },
        { 0 }
 };
-void   au_check_ports __P((struct audio_softc *, struct au_mixer_ports *, 
+void   au_check_ports(struct audio_softc *, struct au_mixer_ports *, 
                            mixer_devinfo_t *, int, char *, char *,
-                           struct portname *));
-int    au_set_gain __P((struct audio_softc *, struct au_mixer_ports *, 



Home | Main Index | Thread Index | Old Index