|
|
1.1 root 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.2 (Berkeley) 4/10/87
6: .\"
7: .TH QSORT 3 "April 10, 1987"
8: .UC 4
9: .SH NAME
10: qsort \- quicker sort
11: .SH SYNOPSIS
12: .nf
13: .B qsort(base, nel, width, compar)
14: .B char *base;
15: .B int (*compar)();
16: .fi
17: .SH DESCRIPTION
18: .I Qsort
19: is an implementation of the quicker-sort algorithm.
20: The first argument is a pointer to the base of the data;
21: the second is the number of elements;
22: the third is the width of an element in bytes;
23: the last is the name of the comparison routine
24: to be called with two arguments which are pointers
25: to the elements being compared.
26: The routine must return an integer less than, equal to, or greater than 0
27: according as the first argument is to be considered
28: less than, equal to, or greater than the second.
29: .SH "SEE ALSO"
30: sort(1)
31: .SH BUGS
32: The comparison routine may not itself call \fIqsort\fP.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.