Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/sort undo broken revision 1.4



details:   https://anonhg.NetBSD.org/src/rev/cf8d89eb950b
branches:  trunk
changeset: 502202:cf8d89eb950b
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Sat Jan 13 19:01:14 2001 +0000

description:
undo broken revision 1.4

diffstat:

 usr.bin/sort/fields.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 4a42e9e47726 -r cf8d89eb950b usr.bin/sort/fields.c
--- a/usr.bin/sort/fields.c     Sat Jan 13 17:27:21 2001 +0000
+++ b/usr.bin/sort/fields.c     Sat Jan 13 19:01:14 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fields.c,v 1.5 2001/01/12 19:39:02 jdolecek Exp $      */
+/*     $NetBSD: fields.c,v 1.6 2001/01/13 19:01:14 jdolecek Exp $      */
 
 /*-
  * Copyright (c) 1993
@@ -41,7 +41,7 @@
 #include "sort.h"
 
 #ifndef lint
-__RCSID("$NetBSD: fields.c,v 1.5 2001/01/12 19:39:02 jdolecek Exp $");
+__RCSID("$NetBSD: fields.c,v 1.6 2001/01/13 19:01:14 jdolecek Exp $");
 __SCCSID("@(#)fields.c 8.1 (Berkeley) 6/6/93");
 #endif /* not lint */
 
@@ -94,7 +94,8 @@
                                /* don't include rec_delimiter */
        keypos = keybuf->data;
 
-       for (i = 0, clpos = clist; i < ncols; i++, clpos++) {
+       for (i = 0; i < ncols; i++, clpos++) {
+               clpos = clist + i;
                for (; (col < clpos->num) && (pos < lineend); col++)
                        { NEXTCOL(pos); }
                if (pos >= lineend)



Home | Main Index | Thread Index | Old Index