ReactOS  0.4.13-dev-52-g0efcfec
quicksort.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

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 quicksort.cc.

64 {
65  int i, last;
66  if(left >= right) /*do nothing if array contains */
67  return; /*fewer than two elements*/
68 
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 *))
Definition: quicksort.cc:62
static void swap(void *v[], int i, int j)
Definition: quicksort.cc:42
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
GLint left
Definition: glext.h:7726
GLdouble GLdouble right
Definition: glext.h:10859
const GLdouble * v
Definition: gl.h:2040

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