/*
ISORT.C
*/

#include <sort.g>

#define IdataBuf ((INT *)DataBuf)

LOCAL_C INT OrdFunc(INT i,INT j,VOID *DataBuf)
/*
order function used in qsort
*/
    {
    return(IdataBuf[i]-IdataBuf[j]);
    }

LOCAL_C VOID ExchFunc(INT i,INT j,VOID *DataBuf)
/*
exchange function used in qsort
*/
    {
    INT k;

    k=IdataBuf[i];
    IdataBuf[i]=IdataBuf[j];
    IdataBuf[j]=k;
    }

#pragma METHOD_CALL

METHOD VOID isort_sort(PR_ROOT *self,INT *start,INT num)
    {
    p_qsort(num,OrdFunc,ExchFunc,start);
    }

