* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * "If it's squinky, then you know it's BrilligWare!" * * * * * * * * Source available at http://pando.org/downloads * * * * Brillig Enterprises (aka Chris Pando) 2004 * * * * * * * * This work is licensed under a Creative Commons Attribution- * * * * NonCommercial-ShareAlike License: * * * * http://creativecommons.org/licenses/by-nc-sa/2.0/legalcode * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Generic sort procedure, utilizing C runtime routines * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * hactgrp(*caller) dftactgrp(*no) bnddir('QC2LE') * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ... procedure interfaces * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * dcp0201r pr D dtaPtr * D keyLength 10i 0 D dtaLength 10i 0 D dtaCount 10i 0 dcp0201r pi D dtaPtr * D keyLength 10i 0 D dtaLength 10i 0 D dtaCount 10i 0 dqsort pr ExtProc('qsort') d * Value d 10i 0 Value d 10i 0 Value d * Value ProcPtr dmemcmp pr 10i 0 ExtProc('memcmp') d * Value d * Value d 10i 0 Value dcomp pr 10i 0 d * Value d * Value * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ... mainline ... * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /free *InLR = *On; qsort(dtaPtr : dtaCount : dtaLength : %PAddr('COMP')); Return; /end-free * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ... compare ... * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * pcomp b d pi 10i 0 d aPtr * Value d bPtr * Value /free Return memcmp(aPtr : bPtr : keyLength); /end-free pcomp e