Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/i386/stand/lib add prototypes, slight formatting ch...



details:   https://anonhg.NetBSD.org/src/rev/2997435ee725
branches:  trunk
changeset: 471888:2997435ee725
user:      drochner <drochner%NetBSD.org@localhost>
date:      Wed Apr 14 11:17:04 1999 +0000

description:
add prototypes, slight formatting changes

diffstat:

 sys/arch/i386/stand/lib/dosfile.c |  15 +++++++++------
 sys/arch/i386/stand/lib/getsecs.c |  38 ++++++++++++++++++++------------------
 sys/arch/i386/stand/lib/pcio.c    |  10 ++++++----
 3 files changed, 35 insertions(+), 28 deletions(-)

diffs (143 lines):

diff -r 248ea4c4e941 -r 2997435ee725 sys/arch/i386/stand/lib/dosfile.c
--- a/sys/arch/i386/stand/lib/dosfile.c Wed Apr 14 10:57:59 1999 +0000
+++ b/sys/arch/i386/stand/lib/dosfile.c Wed Apr 14 11:17:04 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dosfile.c,v 1.4 1997/09/17 18:09:04 drochner Exp $      */
+/*     $NetBSD: dosfile.c,v 1.5 1999/04/14 11:17:04 drochner Exp $      */
 
 /*
  * Copyright (c) 1996
@@ -49,16 +49,19 @@
 extern int dosseek __P((int, int, int));
 
 struct dosfile {
-       int             doshandle, off;
+       int doshandle, off;
 };
 
-extern int      doserrno;      /* in dos_file.S */
+extern int doserrno;   /* in dos_file.S */
 
-static int dos2errno()
+static int dos2errno __P((void));
+
+static int
+dos2errno()
 {
        int err;
 
-       switch(doserrno) {
+       switch (doserrno) {
            case 1:
            case 4:
            case 12:
@@ -72,7 +75,7 @@
            case 6:
                err = EINVAL;
        }
-       return(err);
+       return (err);
 }
 
 int 
diff -r 248ea4c4e941 -r 2997435ee725 sys/arch/i386/stand/lib/getsecs.c
--- a/sys/arch/i386/stand/lib/getsecs.c Wed Apr 14 10:57:59 1999 +0000
+++ b/sys/arch/i386/stand/lib/getsecs.c Wed Apr 14 11:17:04 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: getsecs.c,v 1.1.1.1 1997/03/14 02:40:32 perry Exp $    */
+/*     $NetBSD: getsecs.c,v 1.2 1999/04/14 11:17:05 drochner Exp $     */
 
 /* extracted from netbsd:sys/arch/i386/netboot/misc.c */
 
@@ -10,32 +10,34 @@
 
 extern int biosgetrtc __P((u_long*));
 
+static inline u_long bcd2dec __P((u_long));
+
 static inline u_long
 bcd2dec(arg)
-u_long arg;
+       u_long arg;
 {
-  return((arg >> 4) * 10 + (arg & 0x0f));
+       return ((arg >> 4) * 10 + (arg & 0x0f));
 }
 
 time_t
 getsecs() {
-  /*
-   * Return the current time in seconds
-   */
+       /*
+        * Return the current time in seconds
+        */
 
-  u_long t;
-  time_t sec;
+       u_long t;
+       time_t sec;
 
-  if(biosgetrtc(&t))
-      panic("RTC invalid");
+       if (biosgetrtc(&t))
+               panic("RTC invalid");
 
-  sec = bcd2dec(t & 0xff);
-  sec *= 60;
-  t >>= 8;
-  sec += bcd2dec(t & 0xff);
-  sec *= 60;
-  t >>= 8;
-  sec += bcd2dec(t & 0xff);
+       sec = bcd2dec(t & 0xff);
+       sec *= 60;
+       t >>= 8;
+       sec += bcd2dec(t & 0xff);
+       sec *= 60;
+       t >>= 8;
+       sec += bcd2dec(t & 0xff);
 
-  return(sec);
+       return (sec);
 }
diff -r 248ea4c4e941 -r 2997435ee725 sys/arch/i386/stand/lib/pcio.c
--- a/sys/arch/i386/stand/lib/pcio.c    Wed Apr 14 10:57:59 1999 +0000
+++ b/sys/arch/i386/stand/lib/pcio.c    Wed Apr 14 11:17:04 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pcio.c,v 1.8 1999/03/12 04:14:37 sommerfe Exp $         */
+/*     $NetBSD: pcio.c,v 1.9 1999/04/14 11:17:05 drochner Exp $         */
 
 /*
  * Copyright (c) 1996, 1997
@@ -78,7 +78,7 @@
 #ifdef SUPPORT_SERIAL
 static int
 getcomaddr(idx)
-int idx;
+       int idx;
 {
        short addr;
        /* read in BIOS data area */
@@ -203,9 +203,11 @@
 #endif /* SUPPORT_SERIAL */
 }
 
+static inline void internal_putchar __P((int));
+
 static inline void
 internal_putchar(c)
-       int             c;
+       int c;
 {
 #ifdef SUPPORT_SERIAL
        switch (iodev) {
@@ -226,7 +228,7 @@
 
 void
 putchar(c)
-       int             c;
+       int c;
 {
        if (c == '\n')
                internal_putchar('\r');



Home | Main Index | Thread Index | Old Index