1: /* 2: * Copyright (c) 1980 Regents of the University of California. 3: * All rights reserved. The Berkeley software License Agreement 4: * specifies the terms and conditions for redistribution. 5: * 6: * @(#)qsort_.c 5.1 6/7/85 7: */ 8: 9: /* 10: * quick sort interface 11: * 12: * calling sequence: 13: * external compar 14: * call qsort (array, len, isize, compar) 15: * ---- 16: * integer*2 function compar (obj1, obj2) 17: * where: 18: * array contains the elements to be sorted 19: * len is the number of elements in the array 20: * isize is the size of an element, typically - 21: * 4 for integer, float 22: * 8 for double precision 23: * (length of character object) for character arrays 24: * compar is the name of an integer*2 function that will return - 25: * <0 if object 1 is logically less than object 2 26: * =0 if object 1 is logically equal to object 2 27: * >0 if object 1 is logically greater than object 2 28: */ 29: 30: qsort_(array, len, isize, compar) 31: long *len, *isize; 32: long *array; 33: int (*compar)(); /* may be problematical */ 34: { 35: qsort(array, (int)*len, (int)*isize, compar); 36: }