X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2Fsorting.c;h=396d363db0df1da486042eba368589d56d5af068;hb=a5b34ad069a52ff6cf981f01667d102292988811;hp=54bfdf0158747bed2ebcbacbd94976f66f9ec2d0;hpb=20283c6cf5c6951cc1f2787492c67a7fb72aee9a;p=routino diff --git a/src/sorting.c b/src/sorting.c index 54bfdf0..396d363 100644 --- a/src/sorting.c +++ b/src/sorting.c @@ -1,11 +1,11 @@ /*************************************** - $Header: /home/amb/routino/src/RCS/sorting.c,v 1.8 2010/04/09 15:15:02 amb Exp $ + $Header: /home/amb/routino/src/RCS/sorting.c,v 1.11 2010/09/25 13:54:18 amb Exp $ Merge sort functions. Part of the Routino routing software. ******************/ /****************** - This file Copyright 2009 Andrew M. Bishop + This file Copyright 2009-2010 Andrew M. Bishop This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by @@ -27,6 +27,7 @@ #include #include +#include "files.h" #include "functions.h" @@ -107,7 +108,7 @@ void filesort_fixed(int fd_in,int fd_out,size_t itemsize,int (*compare)(const vo /* Sort the data pointers using a heap sort */ - heapsort(datap,n,compare); + filesort_heapsort(datap,n,compare); /* Shortcut if all read in and sorted at once */ @@ -129,7 +130,7 @@ void filesort_fixed(int fd_in,int fd_out,size_t itemsize,int (*compare)(const vo sprintf(filename,"%s/filesort.%d.tmp",option_tmpdirname,nfiles); - fd=OpenFile(filename); + fd=OpenFileNew(filename); for(i=0;i