InnoDB Plugin  1.0
Macros
ut0sort.h File Reference
#include "univ.i"
Include dependency graph for ut0sort.h:

Go to the source code of this file.

Macros

#define UT_SORT_FUNCTION_BODY(SORT_FUN, ARR, AUX_ARR, LOW, HIGH, CMP_FUN)

Detailed Description

Sort utility

Created 11/9/1995 Heikki Tuuri

Macro Definition Documentation

#define UT_SORT_FUNCTION_BODY (   SORT_FUN,
  ARR,
  AUX_ARR,
  LOW,
  HIGH,
  CMP_FUN 
)

This macro expands to the body of a standard sort function. The sort function uses mergesort and must be defined separately for each type of array. Also the comparison function has to be defined individually for each array cell type. SORT_FUN is the sort function name. The function takes the array to be sorted (ARR), the array of auxiliary space (AUX_ARR) of same size, and the low (LOW), inclusive, and high (HIGH), noninclusive, limits for the sort interval as arguments. CMP_FUN is the comparison function name. It takes as arguments two elements from the array and returns 1, if the first is bigger, 0 if equal, and -1 if the second bigger.