source: trunk/minix/man/man3/qsort.3@ 11

Last change on this file since 11 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 1.0 KB
RevLine 
[9]1.\" Copyright (c) 1980 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
5.\" @(#)qsort.3 6.1 (Berkeley) 5/15/85
6.\"
7.TH QSORT 3 "May 15, 1985"
8.UC 4
9.SH NAME
10qsort \- quicker sort
11.SH SYNOPSIS
12.nf
13.ft B
14#include <sys/types.h>
15#include <stdlib.h>
16
17.fi
18.in +.5i
19.ti -.5i
20void qsort(void *\fIbase\fP, size_t \fInel\fP, size_t \fIwidth\fP, int (*\fIcompar\fP)(const void *, const void *))
21.in -.5i
22.ft R
23.SH DESCRIPTION
24.B Qsort
25is an implementation of the quicker-sort algorithm.
26The first argument is a pointer to the base of the data;
27the second is the number of elements;
28the third is the width of an element in bytes;
29the last is the name of the comparison routine
30to be called with two arguments which are pointers
31to the elements being compared.
32The routine must return an integer less than, equal to, or greater than 0
33according as the first argument is to be considered
34less than, equal to, or greater than the second.
35.SH "SEE ALSO"
36.BR sort (1).
Note: See TracBrowser for help on using the repository browser.