fa6e7bacf999282156279cf970fc078038b20e72
[universe.git] / misc.cc
1
2 ////////////////////////////////////////////////////////////////////////////////
3 // This program is free software; you can redistribute it and/or              //
4 // modify it under the terms of the GNU General Public License                //
5 // version 2 as published by the Free Software Foundation.                    //
6 //                                                                            //
7 // This program is distributed in the hope that it will be useful, but        //
8 // WITHOUT ANY WARRANTY; without even the implied warranty of                 //
9 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU          //
10 // General Public License for more details.                                   //
11 //                                                                            //
12 // Written and (C) by François Fleuret                                        //
13 // Contact <francois.fleuret@epfl.ch> for comments & bug reports              //
14 ////////////////////////////////////////////////////////////////////////////////
15
16 // $Id: misc.cc,v 1.1 2006-07-16 10:27:35 fleuret Exp $
17
18 #include "misc.h"
19
20 int compare_couple(const void *a, const void *b) {
21   if(((Couple *) a)->value < ((Couple *) b)->value) return -1;
22   else if(((Couple *) a)->value > ((Couple *) b)->value) return 1;
23   else return 0;
24 }