*** UNIX MANUAL PAGE BROWSER ***

A Nergahak database for man pages research.

Navigation

Directory Browser

1Browse 4.4BSD4.4BSD
1Browse Digital UNIXDigital UNIX 4.0e
1Browse FreeBSDFreeBSD 14.3
1Browse MINIXMINIX 3.4.0rc6-d5e4fc0
1Browse NetBSDNetBSD 10.1
1Browse OpenBSDOpenBSD 7.7
1Browse UNIX v7Version 7 UNIX
1Browse UNIX v10Version 10 UNIX

Manual Page Search

Manual Page Result

0 Command: qsort | Section: 3 | Source: Digital UNIX | File: qsort.3.gz
qsort(3) Library Functions Manual qsort(3) NAME qsort - Sorts a table in place LIBRARY Standard C Library (libc.so, libc.a) SYNOPSIS #include <stdlib.h> void qsort( void *base, size_t nmemb, size_t size, int (*compar) (const void *, const void *)); STANDARDS Interfaces documented on this reference page conform to industry stan- dards as follows: qsort(): XPG4, XPG4-UNIX Refer to the standards(5) reference page for more information about in- dustry standards and associated tags. PARAMETERS Points to the first entry in the table. Specifies the number of en- tries in the table. Specifies the size in bytes of each table entry. Points to the user-specified function to be used to compare pairs of table elements. The comparison function will be called with two para- meters that point to the two elements to be compared. The comparison function must return an integer less than, equal to, or greater than zero, depending on whether the first element in the comparison is con- sidered less than, equal to, or greater than the second element. DESCRIPTION The qsort() function sorts a table having a specified number of en- tries. The contents of the table are sorted in ascending order accord- ing to a user-specified comparison function (the strcmp() function, for example). NOTES The comparison function need not compare every byte, so arbitrary data may be contained in the elements in addition to the values being com- pared. When two members compare equal, their order in the sorted array is in- determinate. RELATED INFORMATION Functions: bsearch(3), lsearch(3) Standards: standards(5) delim off qsort(3)

Navigation Options