[Top][All Lists]

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

Re: Issue with ls -v / sort -V and strverscmp() usage

From: Kamil Dudka
Subject: Re: Issue with ls -v / sort -V and strverscmp() usage
Date: Mon, 22 Sep 2008 15:44:09 +0200
User-agent: KMail/1.9.9

On Monday 22 September 2008 14:36:02 Eric Blake wrote:
> On the other hand, the fact that strverscmp provides a distinction based
> on leading zeros is nice, as it guarantees a stable sort (no two strings
> that differ on strcmp will compare equal with strverscmp).
Good point, thanks.

The function should return 0 if (and only if) the strings are identical. In 
other case, the relative order of equivalent (from filevercmp perspective) 
strings will be ambiguous. So the sort -V or ls -v results can be dependent 
on particular sort algorithm (or its parameter). I will try to improve dpkg's 
code in this way.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]