Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

sort(1)

QSORT(3)

NAME

qsort − quicker sort

USAGE

qsort(base, nel, width, compar)
char *base;
int (*compar)();

DESCRIPTION

Qsort is an implementation of a quicker-sort algorithm.  The first argument is a pointer to the base of the data; the second is the number of elements; and the third is the width of an element in bytes. 

The last argument is the name of the comparison routine to be called; the routine is called with two arguments that are pointers to the two elements being compared.  The routine must return an integer less than, equal to, or greater than zero, depending on whether the first argument (i.e., the first element being compared) is to be considered less than, equal to, or greater than the second. 

RELATED INFORMATION

sort(1)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026