1 /*- 2 * Copyright (c) 1980 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * %sccs.include.proprietary.c% 6 */ 7 8 #ifndef lint 9 static char sccsid[] = "@(#)qsort_.c 5.2 (Berkeley) 04/12/91"; 10 #endif /* not lint */ 11 12 /* 13 * quick sort interface 14 * 15 * calling sequence: 16 * external compar 17 * call qsort (array, len, isize, compar) 18 * ---- 19 * integer*2 function compar (obj1, obj2) 20 * where: 21 * array contains the elements to be sorted 22 * len is the number of elements in the array 23 * isize is the size of an element, typically - 24 * 4 for integer, float 25 * 8 for double precision 26 * (length of character object) for character arrays 27 * compar is the name of an integer*2 function that will return - 28 * <0 if object 1 is logically less than object 2 29 * =0 if object 1 is logically equal to object 2 30 * >0 if object 1 is logically greater than object 2 31 */ 32 33 qsort_(array, len, isize, compar) 34 long *len, *isize; 35 long *array; 36 int (*compar)(); /* may be problematical */ 37 { 38 qsort(array, (int)*len, (int)*isize, compar); 39 } 40