Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Jun 2002 14:03:54 +0400
From:      "Andrey A. Chernov" <ache@nagual.pp.ru>
To:        "Tim J. Robbins" <tjr@FreeBSD.org>
Cc:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/usr.bin/uniq uniq.c
Message-ID:  <20020606100352.GA86621@nagual.pp.ru>
In-Reply-To: <20020606192402.A45186@treetop.robbins.dropbear.id.au>
References:  <200206060313.g563DAi26751@freefall.freebsd.org> <20020606031545.GA83612@nagual.pp.ru> <20020606161843.A44561@treetop.robbins.dropbear.id.au> <20020606083246.GA85860@nagual.pp.ru> <20020606192402.A45186@treetop.robbins.dropbear.id.au>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jun 06, 2002 at 19:24:02 +1000, Tim J. Robbins wrote:

> uniq is defined in terms of string equality, not string collatng order.
> It doesn't matter how the input is split into collating elements or their
> weights, what matters is that the lines have the same bit patterns. The GNU
> implementation uses memcmp() to compare lines. Solaris appears to use
> strcmp() (objdump -T on /bin/uniq shows no reference to strcoll or strxfrm).
> SUSv3 does not mention LC_COLLATE as affecting uniq. NetBSD uses strcmp().
> AT&T AST uses memcmp().

1) There is no order here, I never mention any order, we talk about 
equality possibility in collate. Please learn something about collate 
before commiting anything in that area.

2) I never mention any weights too, see above.

3) There is no much sense to discuss non-localized implementations you mention.

4) Uniq must be consistent with other utilities 'unique' concept to
operate in the flow, like comm, join and sort, they _use_ collate, so uniq
must not produce different conflicting results.

5) From common sense: in some languages
<ss>alala
and
ssalala
are the same.

6) If you are user of such locale and want binary uniq, reset your LANG to 
C

-- 
Andrey A. Chernov
http://ache.pp.ru/

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020606100352.GA86621>