diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2004-11-01 10:40:38 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2004-11-01 10:40:38 +0100 |
commit | 0b62aff0e3385ed0c11fda145c2a5167bbc1c56d (patch) | |
tree | 6067296e3f76b842a59919c3453a45c83538ad97 /config.c | |
parent | c88e65b6385a9c72778ea46fe4c4c805976c7b96 (diff) | |
download | vdr-0b62aff0e3385ed0c11fda145c2a5167bbc1c56d.tar.gz vdr-0b62aff0e3385ed0c11fda145c2a5167bbc1c56d.tar.bz2 |
Now using qsort() to sort cListBase lists
Diffstat (limited to 'config.c')
-rw-r--r-- | config.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: config.c 1.127 2004/05/16 12:43:55 kls Exp $ + * $Id: config.c 1.128 2004/10/31 16:17:39 kls Exp $ */ #include "config.h" @@ -193,19 +193,19 @@ cSetupLine::~cSetupLine() free(value); } -bool cSetupLine::operator< (const cListObject &ListObject) +int cSetupLine::Compare(const cListObject &ListObject) const { const cSetupLine *sl = (cSetupLine *)&ListObject; if (!plugin && !sl->plugin) - return strcasecmp(name, sl->name) < 0; + return strcasecmp(name, sl->name); if (!plugin) - return true; + return -1; if (!sl->plugin) - return false; + return 1; int result = strcasecmp(plugin, sl->plugin); if (result == 0) result = strcasecmp(name, sl->name); - return result < 0; + return result; } bool cSetupLine::Parse(char *s) |