#ifndef _BASE_QSORT_H_INCLUDED
#define _BASE_QSORT_H_INCLUDED

#include "base/all/cprdcpr/huff/huff.h"

#ifdef INCL_BASE_QSORT_EXCLUSIVE
  #define DECLEXT
#else
  #define DECLEXT extern
#endif


typedef struct
{
        INT     Hyphen;
        USHORT  Elements   [BASE_CPRDCPR_HUFF_MAXCODE + 2],
                Frequencies[(BASE_CPRDCPR_HUFF_MAXCODE + 2) * 2];
} tBASE_QSORT;

DECLEXT tBASE_QSORT
        BASE_QSORT;

void    BASE_QSORT_SortRange(INT Left, INT Right);
void    BASE_QSORT_DoQuicksort(INT Elements);

#ifndef USE_ASM
void    BASE_QSORT_XchgElements(PUSHORT Var1, PUSHORT Var2);
#endif



#undef DECLEXT

#endif
