Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/atari/stand KNF, ANSIfy etc.



details:   https://anonhg.NetBSD.org/src/rev/d9889de69f5d
branches:  trunk
changeset: 746957:d9889de69f5d
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Mon Aug 24 13:04:37 2009 +0000

description:
KNF, ANSIfy etc.

diffstat:

 sys/arch/atari/stand/bootxx/bootxx.c   |   9 +++++----
 sys/arch/atari/stand/bootxxx/bootxxx.c |  22 ++++++++++------------
 2 files changed, 15 insertions(+), 16 deletions(-)

diffs (106 lines):

diff -r cf10d13a5cac -r d9889de69f5d sys/arch/atari/stand/bootxx/bootxx.c
--- a/sys/arch/atari/stand/bootxx/bootxx.c      Mon Aug 24 13:03:43 2009 +0000
+++ b/sys/arch/atari/stand/bootxx/bootxx.c      Mon Aug 24 13:04:37 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bootxx.c,v 1.14 2009/03/18 16:00:10 cegger Exp $       */
+/*     $NetBSD: bootxx.c,v 1.15 2009/08/24 13:04:37 tsutsui Exp $      */
 
 /*
  * Copyright (c) 1995 Waldi Ravens.
@@ -61,7 +61,7 @@
        setheap(end, (void*)(LOADADDR3 - 4));
 
        printf("\033v\nNetBSD/atari secondary bootloader"
-                                               " ($Revision: 1.14 $)\n\n");
+                                               " ($Revision: 1.15 $)\n\n");
 
        if (init_dskio(readsector, disklabel, -1))
                return -1;
@@ -191,7 +191,7 @@
        }
        if (fd < 0)
                return -1;
-       while((bsize = read(fd, bstart, 1024)) > 0) {
+       while ((bsize = read(fd, bstart, 1024)) > 0) {
                bstart += bsize;
        }
        close(fd);
@@ -201,7 +201,8 @@
 void
 _rtt(void)
 {
+
        printf("Halting...\n");
-       for(;;)
+       for (;;)
                ;
 }
diff -r cf10d13a5cac -r d9889de69f5d sys/arch/atari/stand/bootxxx/bootxxx.c
--- a/sys/arch/atari/stand/bootxxx/bootxxx.c    Mon Aug 24 13:03:43 2009 +0000
+++ b/sys/arch/atari/stand/bootxxx/bootxxx.c    Mon Aug 24 13:04:37 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bootxxx.c,v 1.7 2009/03/18 16:00:10 cegger Exp $       */
+/*     $NetBSD: bootxxx.c,v 1.8 2009/08/24 13:04:37 tsutsui Exp $      */
 
 /*
  * Copyright (c) 2001 Leo Weppelman.
@@ -47,10 +47,7 @@
 void   boot_BSD(struct kparamb *)__attribute__((noreturn));
 
 int
-bootxxx(readsector, disklabel, od)
-       void    *readsector,
-               *disklabel;
-       osdsc_t *od;
+bootxxx(void *readsector, void *disklabel, osdsc_t *od)
 {
        int             fd;
        char            *errmsg;
@@ -61,20 +58,20 @@
        /* XXX: Limit should be 16MB */
        setheap(end, (void*)0x1000000);
        printf("\033v\nNetBSD/Atari tertiary bootloader "
-                                       "($Revision: 1.7 $)\n\n");
+                                       "($Revision: 1.8 $)\n\n");
 
        if (init_dskio(readsector, disklabel, od->rootfs))
-               return(-1);
+               return -1;
 
        sys_info(od);
        if (!(od->cputype & ATARI_ANYCPU)) {
                printf("Unknown CPU-type.\n");
-               return(-2);
+               return -2;
        }
 
        if ((fd = open(od->osname, 0)) < 0) {
                printf("Cannot open kernel '%s'\n", od->osname);
-               return (-3);
+               return -3;
        }
 
 #ifndef __ELF__                /* a.out */
@@ -82,10 +79,10 @@
 #else
        if (elf_load(fd, od, &errmsg, 1) != 0)
 #endif
-               return(-4);
+               return -4;
 
        boot_BSD(&od->kp);
-       return(-5);
+       return -5;
 
        /* NOTREACHED */
 }
@@ -93,7 +90,8 @@
 void
 _rtt(void)
 {
+
        printf("Halting...\n");
-       for(;;)
+       for (;;)
                ;
 }



Home | Main Index | Thread Index | Old Index