Date: Sun, 15 Nov 1998 14:24:59 +0300 From: Dmitrij Tejblum <dima@tejblum.dnttm.rssi.ru> To: Wolfram Schneider <wosch@panke.de.freebsd.org> Cc: current@FreeBSD.ORG Subject: Re: sort option for find Message-ID: <199811151125.OAA02022@tejblum.dnttm.rssi.ru> In-Reply-To: Your message of "Sat, 14 Nov 1998 20:50:02 %2B0100." <19981114205002.A27346@panke.de.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Wolfram Schneider wrote: > +extern int sflag; (This probably should be 'extern int issort;' in extern.h) > + > +/* > + * find_compare -- > + * A function which be used in fts_open() to order the > + * traversal of the hierarchy. > + * This function give you a lexicographical sorted output. > + */ > +static int find_compare(s1, s2) > + const FTSENT **s1, **s2; > +{ > + return strcoll( (*s1)->fts_name, (*s2)->fts_name ); > +} That depends on what do you call "lexicographical order". How do you compare "foo-1.2.3/Makefile" and "foo/Makefile", for example? (Anyhow, strcoll is not supposed to compare in lexicographical order at all. Most implementation don't give lexicographical sorting in non-C locale.). Dima To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199811151125.OAA02022>