diff options
author | 2013-01-31 14:44:14 +1100 | |
---|---|---|
committer | 2013-01-31 14:44:14 +1100 | |
commit | 36b34bd5a5abdfabbd0f3ab0bb0d33e6e3477dd9 (patch) | |
tree | daccb7c8d172fa8c87efd79de3620dedf4996772 /main.c | |
parent | aef211030db06b5394384f3b22a1226263506a9b (diff) | |
parent | 635c28923d28335bb7d39f95c17c2edbf16ee2ac (diff) | |
download | subsurface-36b34bd5a5abdfabbd0f3ab0bb0d33e6e3477dd9.tar.gz |
Merge branch 'integrate-from-webservice'
Bring in the better implementation of merging gps locations from the
webservice
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -50,6 +50,11 @@ static int sortfn(const void *_a, const void *_b) return 0; } +void sort_table(struct dive_table *table) +{ + qsort(table->dives, table->nr, sizeof(struct dive *), sortfn); +} + const char *weekday(int wday) { static const char wday_array[7][7] = { @@ -157,7 +162,7 @@ void report_dives(gboolean is_imported, gboolean prefer_imported) /* This does the right thing for -1: NULL */ last = get_dive(preexisting-1); - qsort(dive_table.dives, dive_table.nr, sizeof(struct dive *), sortfn); + sort_table(&dive_table); for (i = 1; i < dive_table.nr; i++) { struct dive **pp = &dive_table.dives[i-1]; |