diff options
author | 2014-05-31 06:46:30 -0700 | |
---|---|---|
committer | 2014-05-31 06:46:30 -0700 | |
commit | 738c472daf76cde95f61c4b9a615af82b01e60d3 (patch) | |
tree | 8ee51c37c7a887b574cd00c3d183fd4275486cff /planner.c | |
parent | 8cbf2071693f06a2fe25c6ae322c3131302dd2bf (diff) | |
parent | eb26823b3476dca68200017948b73cb405ef803a (diff) | |
download | subsurface-738c472daf76cde95f61c4b9a615af82b01e60d3.tar.gz |
Merge branch 'latest'
Diffstat (limited to 'planner.c')
-rw-r--r-- | planner.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -49,6 +49,20 @@ void dump_plan(struct diveplan *diveplan) } #endif +bool diveplan_empty(struct diveplan *diveplan) +{ + struct divedatapoint *dp; + if (!diveplan || !diveplan->dp) + return true; + dp = diveplan->dp; + while(dp) { + if (dp->time) + return false; + dp = dp->next; + } + return true; +} + void set_last_stop(bool last_stop_6m) { if (last_stop_6m == true) |