X-Git-Url: http://lists.indexdata.com/cgi-bin?a=blobdiff_plain;ds=sidebyside;f=src%2Freclists.c;h=07dd0fe3148e9027fe3d5f4bd9f36752b770c08b;hb=bb879dfc882455b329168fbb5684f0b277c26b82;hp=097b8c789f332ec6957d94ff146f78408525516e;hpb=61a9c0fc574244c16e5a6bd44e796549de0bd559;p=pazpar2-moved-to-github.git diff --git a/src/reclists.c b/src/reclists.c index 097b8c7..07dd0fe 100644 --- a/src/reclists.c +++ b/src/reclists.c @@ -398,6 +398,14 @@ struct record_cluster *reclist_insert(struct reclist *l, return cluster; } +int reclist_sortparms_cmp(struct reclist_sortparms *sort1, struct reclist_sortparms *sort2) +{ + if (sort1 == sort2) + return 0; + if (sort1 == 0 || sort2 == 0) + return 1; + return strcmp(sort1->name, sort2->name) || sort1->increasing != sort1->increasing || sort1->type != sort2->type; +} /* * Local variables: * c-basic-offset: 4