summaryrefslogtreecommitdiffstats
path: root/dive.c
diff options
context:
space:
mode:
Diffstat (limited to 'dive.c')
-rw-r--r--dive.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/dive.c b/dive.c
index 67f08f972..5705921fc 100644
--- a/dive.c
+++ b/dive.c
@@ -2541,6 +2541,20 @@ int count_dives_with_location(const char *location)
return counter;
}
+// count the dives with exactly the suit
+int count_dives_with_suit(const char *suit)
+{
+ int i, counter = 0;
+ struct dive *d;
+
+ for_each_dive (i, d) {
+ if (same_string(d->suit, suit))
+ counter++;
+ }
+ return counter;
+}
+
+
struct dive *merge_dives(struct dive *a, struct dive *b, int offset, bool prefer_downloaded)
{
struct dive *res = alloc_dive();