mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
parent
15ef53fb80
commit
d7c89a79f8
2 changed files with 7 additions and 3 deletions
|
@ -424,7 +424,8 @@ static void save_dc(struct membuffer *b, struct dive *dive, struct divecomputer
|
||||||
*/
|
*/
|
||||||
static void create_dive_buffer(struct dive *dive, struct membuffer *b)
|
static void create_dive_buffer(struct dive *dive, struct membuffer *b)
|
||||||
{
|
{
|
||||||
put_format(b, "duration %u:%02u min\n", FRACTION(dive->dc.duration.seconds, 60));
|
if (dive->dc.duration.seconds > 0)
|
||||||
|
put_format(b, "duration %u:%02u min\n", FRACTION(dive->dc.duration.seconds, 60));
|
||||||
SAVE("rating", rating);
|
SAVE("rating", rating);
|
||||||
SAVE("visibility", visibility);
|
SAVE("visibility", visibility);
|
||||||
cond_put_format(dive->tripflag == NO_TRIP, b, "notrip\n");
|
cond_put_format(dive->tripflag == NO_TRIP, b, "notrip\n");
|
||||||
|
|
|
@ -457,8 +457,11 @@ void save_one_dive_to_mb(struct membuffer *b, struct dive *dive)
|
||||||
fprintf(stderr, "removed reference to non-existant dive site with uuid %08x\n", dive->dive_site_uuid);
|
fprintf(stderr, "removed reference to non-existant dive site with uuid %08x\n", dive->dive_site_uuid);
|
||||||
}
|
}
|
||||||
show_date(b, dive->when);
|
show_date(b, dive->when);
|
||||||
put_format(b, " duration='%u:%02u min'>\n",
|
if (dive->dc.duration.seconds > 0)
|
||||||
FRACTION(dive->dc.duration.seconds, 60));
|
put_format(b, " duration='%u:%02u min'>\n",
|
||||||
|
FRACTION(dive->dc.duration.seconds, 60));
|
||||||
|
else
|
||||||
|
put_format(b, ">\n");
|
||||||
save_overview(b, dive);
|
save_overview(b, dive);
|
||||||
save_cylinder_info(b, dive);
|
save_cylinder_info(b, dive);
|
||||||
save_weightsystem_info(b, dive);
|
save_weightsystem_info(b, dive);
|
||||||
|
|
Loading…
Add table
Reference in a new issue