[Fwd: Re: [GRASS-dev] r.colors: rules file list unsorted]

Daniel Calvelo dca.gis at gmail.com
Sun Jan 28 16:28:34 EST 2007


I fully agree with Hamish here.

FWIW, Linux and OSX have it. Googling around it seems that Solaris 10
has it, but older Solaris/SunOS versions don't seem to. Ditto for IRIX
and, of course Win32.

Daniel.

On 1/28/07, Hamish <hamish_nospam at yahoo.com> wrote:
> Wolf Bergenheim wrote:
> > It uses scandir() to sort the directory entries alphabetically. I'm
> > not 100% sure scandir can be found on all platforms in which case we
> > need to do something, like qsort() the names list instead.
>
>
> from the scandir(3) man page:
>
> CONFORMING TO
>        None of these functions is in  POSIX.   LSB  has  deprecated  the
>        library call alphasort() and never contained scandir().
>
>        The  functions  scandir()  and  alphasort() are from BSD 4.3, and
>        have been available under Linux since libc4.  Libc4 and libc5 use
>        the more precise prototype
>
>        int alphasort(const struct dirent **a, const struct dirent **b);
>
>        but glibc 2.0 returns to the imprecise BSD prototype.
>
>        The  function  versionsort()  is a GNU extension, available since
>        glibc 2.1.  Since glibc 2.1, alphasort() calls  strcoll(3);  ear-
>        lier it used strcmp(3).
>
>
>
> .. a POSIX compliant solution would be nice,
>
> Hamish
>
> _______________________________________________
> grass-dev mailing list
> grass-dev at grass.itc.it
> http://grass.itc.it/mailman/listinfo/grass-dev
>


-- 
-- Daniel Calvelo Aros




More information about the grass-dev mailing list