On Tue, Feb 19, 2013 at 3:57 PM, Giorgos Keramidas keram...@freebsd.org wrote:
Author: keramida (doc committer)
Date: Tue Feb 19 23:57:39 2013
New Revision: 247014
URL: http://svnweb.freebsd.org/changeset/base/247014
Log:
Add a sample program that shows how a custom comparison function
On 20 Feb 2013, at 08:25, m...@freebsd.org wrote:
These should be declared const int *. And the cast shouldn't be
needed in C, since void * can be assigned to any other pointer type.
In fact, the entire function body can be replaced with:
return (*(int*)p1 - *(int*)p2);
qsort doesn't
On 2013-02-20 09:32, David Chisnall thera...@freebsd.org wrote:
On 20 Feb 2013, at 08:25, m...@freebsd.org wrote:
These should be declared const int *. And the cast shouldn't be
needed in C, since void * can be assigned to any other pointer type.
In fact, the entire function body can be
On Wed, Feb 20, 2013 at 09:32:43AM +, David Chisnall wrote:
On 20 Feb 2013, at 08:25, m...@freebsd.org wrote:
These should be declared const int *. And the cast shouldn't be
needed in C, since void * can be assigned to any other pointer type.
In fact, the entire function body can be
On 2013-02-20 10:49, Stefan Farfeleder stef...@freebsd.org wrote:
On Wed, Feb 20, 2013 at 09:32:43AM +, David Chisnall wrote:
On 20 Feb 2013, at 08:25, m...@freebsd.org wrote:
These should be declared const int *. And the cast shouldn't be
needed in C, since void * can be assigned to any
Author: keramida (doc committer)
Date: Tue Feb 19 23:57:39 2013
New Revision: 247014
URL: http://svnweb.freebsd.org/changeset/base/247014
Log:
Add a sample program that shows how a custom comparison function and
qsort(3) can work together to sort an array of integers.
PR: