<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/lib/libc/string/strverscmp.c, branch releng/14.4</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=releng%2F14.4</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=releng%2F14.4'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2022-08-25T00:29:03Z</updated>
<entry>
<title>libc: Add strverscmp(3) and versionsort(3)</title>
<updated>2022-08-25T00:29:03Z</updated>
<author>
<name>Aymeric Wibo</name>
<email>obiwac@gmail.com</email>
</author>
<published>2022-08-24T23:20:13Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=05c9a0158f6837bb3a3781e4ed75f66115f6415a'/>
<id>urn:sha1:05c9a0158f6837bb3a3781e4ed75f66115f6415a</id>
<content type='text'>
Add a strverscmp(3) function to libc, a GNU extension I implemented by
reading its glibc manual page. It orders strings following a much more
natural ordering (e.g. "ent1 &lt; ent2 &lt; ent10" as opposed to
"ent1 &lt; ent10 &lt; ent2" with strcmp(3)'s lexicographic ordering).

Also add versionsort(3) for use as scandir(3)'s compar argument.

Update manual page for scandir(3) and add one for strverscmp(3).

Reviewed by:	pstef, gbe, kib
MFC after:	1 week
Differential Revision: https://reviews.freebsd.org/D35807
</content>
</entry>
</feed>
