Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/amiga/stand - ANSIfy



details:   https://anonhg.NetBSD.org/src/rev/776fd64b603a
branches:  trunk
changeset: 521212:776fd64b603a
user:      aymeric <aymeric%NetBSD.org@localhost>
date:      Sat Jan 26 13:16:06 2002 +0000

description:
- ANSIfy
- remove some trailing spaces/tabs
- minor style nits

diffstat:

 sys/arch/amiga/stand/binpatch/binpatch.c         |  22 +++++++++++-----------
 sys/arch/amiga/stand/bootblock/aout2bb/aout2bb.c |  18 +++++++++---------
 sys/arch/amiga/stand/bootblock/aout2bb/aout2bb.h |   6 +++---
 sys/arch/amiga/stand/bootblock/aout2bb/chksum.h  |   4 ++--
 4 files changed, 25 insertions(+), 25 deletions(-)

diffs (206 lines):

diff -r 8b3c056a6f17 -r 776fd64b603a sys/arch/amiga/stand/binpatch/binpatch.c
--- a/sys/arch/amiga/stand/binpatch/binpatch.c  Sat Jan 26 12:45:00 2002 +0000
+++ b/sys/arch/amiga/stand/binpatch/binpatch.c  Sat Jan 26 13:16:06 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: binpatch.c,v 1.7 1997/11/01 06:49:17 lukem Exp $       */
+/*     $NetBSD: binpatch.c,v 1.8 2002/01/26 13:16:06 aymeric Exp $     */
 
 /* Author: Markus Wild mw%eunet.ch@localhost ???   */
 /* Modified: Rob Leland leland%mitre.org@localhost */
@@ -27,7 +27,7 @@
 \t%s - Allows the patching of BSD binaries
 SYNOPSIS
 \t%s [-HELP]
-\t%s [-b|-w|-l] -s symbol[[[index]][=value]] binary 
+\t%s [-b|-w|-l] -s symbol[[[index]][=value]] binary
 \t%s [-b|-w|-l] [-o offset] -s symbol [-r value] binary
 \t%s [-b|-w|-l] [-o offset] -a address [-r value] binary
 ";
@@ -52,7 +52,7 @@
 \t\tbinpatch -l -s _hz netbsd
 \tNow it gets more advanced, replace the value:
 \t\tbinpatch -l -s _sbic_debug -r 1 netbsd
-\tNow patch a variable at a given 'index' not offset, 
+\tNow patch a variable at a given 'index' not offset,
 \tunder NetBSD you must use '', under AmigaDos CLI '' is optional.:
 \t\tbinpatch -w -s '_vieww[4]' -r 0 a.out
 \tsame as
@@ -107,8 +107,8 @@
   u_long  lval;
   u_short sval;
   u_char  cval;
-  
- 
+
+
   while ((c = getopt (argc, argv, "H:a:bwlr:s:o:")) != -1)
     switch (c)
       {
@@ -164,7 +164,7 @@
           offset = atoi (optarg);
         break;
       }/* while switch() */
-  
+
   if (argc > 1)
   {
     if (addr || symbol)
@@ -224,7 +224,7 @@
       addr += offset;
 
       /* if replace-mode, have to reopen the file for writing.
-         Can't do that from the beginning, or nlist() will not 
+         Can't do that from the beginning, or nlist() will not
          work (at least not under AmigaDOS) */
       if (do_replace)
       {
@@ -265,7 +265,7 @@
           break;
         }/* switch size */
 
-      
+
       if (symbol)
         printf ("%s(0x%x): %d (0x%x)\n", symbol, addr, lval, lval);
       else
@@ -349,7 +349,7 @@
                  treated as a index if-and-only-if a '-b -w -l' option
                  was given. Otherwise it is treated like an offset.
                  See above documentation in for of help!
-*/ 
+*/
 static void FindOffset(char *symbol,u_long *index)
 {
   char *sb=strchr(symbol,'['); /* Start of '[', now line must
@@ -383,7 +383,7 @@
       else
       {
         fprintf(stderr,"Error: Garbage trailing ']'\n");
-      } 
+      }
     }
     else
     {
@@ -413,7 +413,7 @@
     if (nscan != 1)
       error("Invalid value following '='");
     dr = 1;
-    *ce = '\0';/* Now were left with just symbol */ 
+    *ce = '\0';/* Now were left with just symbol */
   }/* if (ce) */
   return(dr);
 }/* FindAssign */
diff -r 8b3c056a6f17 -r 776fd64b603a sys/arch/amiga/stand/bootblock/aout2bb/aout2bb.c
--- a/sys/arch/amiga/stand/bootblock/aout2bb/aout2bb.c  Sat Jan 26 12:45:00 2002 +0000
+++ b/sys/arch/amiga/stand/bootblock/aout2bb/aout2bb.c  Sat Jan 26 13:16:06 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: aout2bb.c,v 1.5 2001/12/17 05:43:40 mhitch Exp $       */
+/*     $NetBSD: aout2bb.c,v 1.6 2002/01/26 13:17:12 aymeric Exp $      */
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -53,7 +53,7 @@
 #include "aout2bb.h"
 #include "chksum.h"
 
-void usage __P((void));
+void usage(void);
 int intcmp(const void *, const void *);
 int main(int argc, char *argv[]);
 
@@ -68,7 +68,7 @@
 char *progname;
 int bbsize = BBSIZE;
 u_int8_t *buffer;
-u_int32_t *relbuf; 
+u_int32_t *relbuf;
        /* can't have more relocs than that*/
 
 extern char *optarg;
@@ -81,7 +81,7 @@
 
        r = (*(u_int32_t *)i) < (*(u_int32_t *)j);
        
-       return 2*r-1; 
+       return 2*r-1;
 }
 
 int
@@ -164,7 +164,7 @@
        drsz = ntohl(eh->a_drsize);
        entry = ntohl(eh->a_entry);
 
-       dprintf(("tsz = 0x%x, dsz = 0x%x, bsz = 0x%x, total 0x%x, entry=0x%x\n", 
+       dprintf(("tsz = 0x%x, dsz = 0x%x, bsz = 0x%x, total 0x%x, entry=0x%x\n",
                tsz, dsz, bsz, tsz+dsz+bsz, entry));
 
        if ((trsz+drsz)==0)
@@ -185,7 +185,7 @@
        memcpy(buffer, image + N_TXTOFF(*eh), tsz+dsz);
 
        /*
-        * Hm. This tool REALLY should understand more than one 
+        * Hm. This tool REALLY should understand more than one
         * relocator version. For now, check that the relocator at
         * the image start does understand what we output.
         */
@@ -333,8 +333,8 @@
            : rpo >= buffer + bbsize)
                errx(1, "Relocs don't fit.");
 
-       ((u_int32_t *)buffer)[1] = 0; 
-       ((u_int32_t *)buffer)[1] = 
+       ((u_int32_t *)buffer)[1] = 0;
+       ((u_int32_t *)buffer)[1] =
            (0xffffffff - chksum((u_int32_t *)buffer, sumsize * 512 / 4));
 
        ofd = open(argv[1], O_CREAT|O_WRONLY, 0644);
@@ -348,7 +348,7 @@
 }
 
 void
-usage()
+usage(void)
 {
        fprintf(stderr, "Usage: %s [-F] [-S bbsize] bootprog bootprog.bin\n",
            progname);
diff -r 8b3c056a6f17 -r 776fd64b603a sys/arch/amiga/stand/bootblock/aout2bb/aout2bb.h
--- a/sys/arch/amiga/stand/bootblock/aout2bb/aout2bb.h  Sat Jan 26 12:45:00 2002 +0000
+++ b/sys/arch/amiga/stand/bootblock/aout2bb/aout2bb.h  Sat Jan 26 13:16:06 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: aout2bb.h,v 1.3 1999/02/16 23:34:10 is Exp $ */
+/* $NetBSD: aout2bb.h,v 1.4 2002/01/26 13:17:12 aymeric Exp $ */
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -40,12 +40,12 @@
  * Relocator version definitions for aout to Amiga bootblock converter.
  */
 
-/* 
+/*
  * All the tables are at the end of the bootblock, with logical start at the
  * end.
  */
 
-/* 
+/*
  * The following formats are for a length of 8 kBytes only.
  */
 
diff -r 8b3c056a6f17 -r 776fd64b603a sys/arch/amiga/stand/bootblock/aout2bb/chksum.h
--- a/sys/arch/amiga/stand/bootblock/aout2bb/chksum.h   Sat Jan 26 12:45:00 2002 +0000
+++ b/sys/arch/amiga/stand/bootblock/aout2bb/chksum.h   Sat Jan 26 13:16:06 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: chksum.h,v 1.3 1999/02/16 23:34:11 is Exp $ */
+/* $NetBSD: chksum.h,v 1.4 2002/01/26 13:17:12 aymeric Exp $ */
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -38,5 +38,5 @@
 
 #define CHKSUMOFFS 1
 
-u_int32_t chksum __P((u_int32_t *, int));
+u_int32_t chksum(u_int32_t *, int);
 



Home | Main Index | Thread Index | Old Index