Robert Webb wrote:
> I believe it's the same on all systems. qsort() just
> compares the sign.
Of course it would be impossible to check every qsort() on all systems(), but
the
fact that strcmp() uses that logic is a pretty good sign (!) that qsort() will
as
well.
However, as others have poi
2008/8/24 Bram Moolenaar <[EMAIL PROTECTED]>:
> Robert Webb wrote:
>
>> The help for sort() says the following with respect to the function
>> reference argument:
>>
>> ...The function is invoked with two
>> items as argument and must return zero if they are equal, 1 if
>> the first on
On 25/08/08 05:07, Bram Moolenaar wrote:
[...]
> Vim uses qsort(). My man page says that the value of the compare
> function can be any value less than, equal to or bigger than zero.
> Is it like that on all systems?
>
Mine says the same; it also says
CONFORMING TO
SVr4, 4.3BSD, C89, C9
Bram replied:
> > The help for sort() says the following with respect to the function
> > reference argument:
> >
> > ...The function is invoked with two
> > items as argument and must return zero if they are equal, 1 if
> > the first one sorts after the second one, -1 if the first o
Robert Webb wrote:
> The help for sort() says the following with respect to the function
> reference argument:
>
> ...The function is invoked with two
> items as argument and must return zero if they are equal, 1 if
> the first one sorts after the second one, -1 if the first one
>