Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/sort fix few confusing indentation. XXX still broken



details:   https://anonhg.NetBSD.org/src/rev/4a42e9e47726
branches:  trunk
changeset: 502201:4a42e9e47726
user:      itojun <itojun%NetBSD.org@localhost>
date:      Sat Jan 13 17:27:21 2001 +0000

description:
fix few confusing indentation.  XXX still broken

diffstat:

 usr.bin/sort/files.c |   8 ++++----
 usr.bin/sort/fsort.c |  37 +++++++++++++++++++------------------
 2 files changed, 23 insertions(+), 22 deletions(-)

diffs (124 lines):

diff -r 697744fe464d -r 4a42e9e47726 usr.bin/sort/files.c
--- a/usr.bin/sort/files.c      Sat Jan 13 17:04:50 2001 +0000
+++ b/usr.bin/sort/files.c      Sat Jan 13 17:27:21 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: files.c,v 1.11 2001/01/13 10:17:43 jdolecek Exp $      */
+/*     $NetBSD: files.c,v 1.12 2001/01/13 17:27:21 itojun Exp $        */
 
 /*-
  * Copyright (c) 1993
@@ -40,7 +40,7 @@
 #include "fsort.h"
 
 #ifndef lint
-__RCSID("$NetBSD: files.c,v 1.11 2001/01/13 10:17:43 jdolecek Exp $");
+__RCSID("$NetBSD: files.c,v 1.12 2001/01/13 17:27:21 itojun Exp $");
 __SCCSID("@(#)files.c  8.1 (Berkeley) 6/6/93");
 #endif /* not lint */
 
@@ -210,8 +210,8 @@
        static int overflow = 0;
        int c;
        if (overflow) {
-               overflow =
-                 enterkey(buffer, line, bufend - (u_char *) buffer, ftbl);
+               overflow = enterkey(buffer, line, bufend - (u_char *) buffer,
+                   ftbl);
                if (overflow)
                        return (BUFFEND);
                else
diff -r 697744fe464d -r 4a42e9e47726 usr.bin/sort/fsort.c
--- a/usr.bin/sort/fsort.c      Sat Jan 13 17:04:50 2001 +0000
+++ b/usr.bin/sort/fsort.c      Sat Jan 13 17:27:21 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fsort.c,v 1.8 2001/01/11 14:05:24 jdolecek Exp $       */
+/*     $NetBSD: fsort.c,v 1.9 2001/01/13 17:27:21 itojun Exp $ */
 
 /*-
  * Copyright (c) 1993
@@ -47,7 +47,7 @@
 #include "fsort.h"
 
 #ifndef lint
-__RCSID("$NetBSD: fsort.c,v 1.8 2001/01/11 14:05:24 jdolecek Exp $");
+__RCSID("$NetBSD: fsort.c,v 1.9 2001/01/13 17:27:21 itojun Exp $");
 __SCCSID("@(#)fsort.c  8.1 (Berkeley) 6/6/93");
 #endif /* not lint */
 
@@ -160,8 +160,9 @@
                                                : radixsort(keylist, nelem,
                                                        weights, REC_D) )
                                                err(2, NULL);
-                                       append(keylist, nelem, depth, fstack[
-                                        MAXFCT-16+mfct].fp, putrec, ftbl);
+                                       append(keylist, nelem, depth,
+                                           fstack[MAXFCT-16+mfct].fp, putrec,
+                                           ftbl);
                                        mfct++;
                                        /* reduce number of open files */
                                        if (mfct == 16 ||(c == EOF && ntfiles)) {
@@ -172,9 +173,9 @@
                                                fstack[base + ntfiles].fp
                                                    = ftmp();
                                                fmerge(0, MSTART, filelist,
-                                                 mfct, geteasy,
-                                                 fstack[base].fp,
-                                                 putrec, ftbl);
+                                                   mfct, geteasy,
+                                                   fstack[base].fp,
+                                                   putrec, ftbl);
                                                ++ntfiles;
                                                mfct = 0;
                                                memmove(crec->data, tmpbuf,
@@ -184,7 +185,7 @@
                                } else {
                                        fstack[base + ntfiles].fp= ftmp();
                                        onepass(keylist, depth, nelem, sizes,
-                                       weights, fstack[base + ntfiles].fp);
+                                           weights, fstack[base + ntfiles].fp);
                                        ++ntfiles;
                                }
                        }
@@ -211,12 +212,12 @@
                }
                total = maxb = lastb = 0;       /* find if one bin dominates */
                for (i = 0; i < NBINS; i++)
-                 if (sizes[i]) {
-                       if (sizes[i] > sizes[maxb])
-                               maxb = i;
-                       lastb = i;
-                       total += sizes[i];
-               }
+                       if (sizes[i]) {
+                               if (sizes[i] > sizes[maxb])
+                                       maxb = i;
+                               lastb = i;
+                               total += sizes[i];
+                       }
                if (sizes[maxb] < max((total / 2) , BUFSIZE))
                        maxb = lastb;   /* otherwise pop after last bin */
                fstack[base].lastb = lastb;
@@ -242,10 +243,10 @@
                        for (i = maxb+1; i <= lastb; i++)
                                if (!sizes[i]) {
                                        getnext(i, base, NULL, ntfiles, crec,
-                                               bufend,0);
+                                           bufend,0);
                                } else {
                                        fsort(i, depth+1, base, filelist,
-                                               ntfiles, prevfp, ftbl);
+                                           ntfiles, prevfp, ftbl);
                                }
                }
 
@@ -304,8 +305,8 @@
                if (c <= 1)
                        continue;
        }
-       for(aj = a; aj < an; *aj = r, aj = bin[c+1]) 
-               for(r = *aj; aj < (ak = --top[c = tr[r[depth]]]) ;)                     
+       for (aj = a; aj < an; *aj = r, aj = bin[c+1]) 
+               for (r = *aj; aj < (ak = --top[c = tr[r[depth]]]) ;)
                        swap(*ak, r, t);
 
        for (ak = a, c = 0; c < 256; c++) {



Home | Main Index | Thread Index | Old Index