home *** CD-ROM | disk | FTP | other *** search
/ minnie.tuhs.org / unixen.tar / unixen / PDP-11 / Trees / V6 / usr / man / man3 / qsort.3 < prev    next >
Encoding:
Text File  |  1975-06-26  |  707 b   |  30 lines

  1. .th QSORT III 2/8/75
  2. .sh NAME
  3. qsort \*- quicker sort
  4. .sh SYNOPSIS
  5. .nf
  6. .ft B
  7. qsort(base, nel, width, compar)
  8. char *base;
  9. int (*compar)( );
  10. .fi
  11. .ft R
  12. .sh DESCRIPTION
  13. .it Qsort
  14. is an implementation
  15. of the quicker-sort algorithm.
  16. The first argument is a pointer to the base of the data;
  17. the second is the number of elements;
  18. the third is the width of an element
  19. in bytes;
  20. the last is the name of the comparison routine.
  21. It is called with two arguments which are pointers
  22. to the elements being compared.
  23. The routine must return
  24. an integer less than, equal to, or greater than 0
  25. according as the first argument is to be considered
  26. less than, equal to, or greater than the second.
  27. .sh "SEE ALSO"
  28. sort (I)
  29. .sh BUGS
  30.