ReactOS  0.4.12-dev-36-g472787f
quicksort.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


void quicksort (void *v[], int left, int right, int(*comp)(void *, void *))

Function Documentation

◆ quicksort()

void quicksort ( void v[],
int  left,
int  right,
int(*)(void *, void *)  comp 

Definition at line 62 of file

Referenced by DBGfindDiagonals(), MC_partitionY(), partitionY(), quicksort(), and directedLine::sortAllPolygons().

64 {
65  int i, last;
66  if(left >= right) /*do nothing if array contains */
67  return; /*fewer than two elements*/
69  swap(v, left, (left+right)/2);
70  last = left;
71  for(i=left+1; i<=right; i++)
72  if((*comp)(v[i], v[left])<0)
73  swap(v, ++last, i);
74  swap(v, left, last);
75  quicksort(v, left, last-1, comp);
76  quicksort(v, last+1, right, comp);
77 }
POINT last
Definition: font.c:46
void quicksort(void *v[], int left, int right, int(*comp)(void *, void *))
static void swap(void *v[], int i, int j)
GLenum GLclampf GLint i
Definition: glfuncs.h:14
GLint left
Definition: glext.h:7726
GLdouble GLdouble right
Definition: glext.h:10859