Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

59 lines
1.4 KiB

/**************************************************************************
* *
* Copyright (C) 1992, Silicon Graphics, Inc. *
* *
* These coded instructions, statements, and computer programs contain *
* unpublished proprietary information of Silicon Graphics, Inc., and *
* are protected by Federal copyright law. They may not be disclosed *
* to third parties or copied or duplicated in any form, in whole or *
* in part, without the prior written consent of Silicon Graphics, Inc. *
* *
**************************************************************************/
/*
* flistsorter.c++ - $Revision: 1.1 $
* Derrick Burns - 1991
*/
#include "glimport.h"
#include "flistsor.h"
FlistSorter::FlistSorter( void ) : Sorter( sizeof( REAL ) )
{
}
void
FlistSorter::qsort( REAL *p, int n )
{
Sorter::qsort( (char *)p, n );
}
int
FlistSorter::qscmp( char *i, char *j )
{
REAL f0 = *(REAL *)i;
REAL f1 = *(REAL *)j;
return (f0 < f1) ? -1 : 1;
}
void
FlistSorter::qsexc( char *i, char *j )
{
REAL *f0 = (REAL *)i;
REAL *f1 = (REAL *)j;
REAL tmp = *f0;
*f0 = *f1;
*f1 = tmp;
}
void
FlistSorter::qstexc( char *i, char *j, char *k )
{
REAL *f0 = (REAL *)i;
REAL *f1 = (REAL *)j;
REAL *f2 = (REAL *)k;
REAL tmp = *f0;
*f0 = *f2;
*f2 = *f1;
*f1 = tmp;
}