Skip to content
Snippets Groups Projects
Commit f37aadd3 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

pp

parent 2bac923c
No related branches found
No related tags found
No related merge requests found
......@@ -18,6 +18,29 @@
#include "TreeUtils.h"
#include "GmshMessage.h"
int fcmp_int(const void *a, const void *b)
{
return (*(int *)a - *(int *)b);
}
int fcmp_absint(const void *a, const void *b)
{
return (abs(*(int *)a) - abs(*(int *)b));
}
int fcmp_double(const void *a, const void *b)
{
double cmp;
cmp = *(double *)a - *(double *)b;
if(cmp > 1.e-16)
return 1;
else if(cmp < -1.e-16)
return -1;
else
return 0;
}
List_T *List_Create(int n, int incr, int size)
{
List_T *liste;
......@@ -271,28 +294,3 @@ List_T *ListOfDouble2ListOfInt(List_T *dList)
return iList;
}
// Comparison functions
int fcmp_int(const void *a, const void *b)
{
return (*(int *)a - *(int *)b);
}
int fcmp_absint(const void *a, const void *b)
{
return (abs(*(int *)a) - abs(*(int *)b));
}
int fcmp_double(const void *a, const void *b)
{
double cmp;
cmp = *(double *)a - *(double *)b;
if(cmp > 1.e-16)
return 1;
else if(cmp < -1.e-16)
return -1;
else
return 0;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment