summaryrefslogtreecommitdiffstats
path: root/save-xml.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-06-08 17:17:49 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-06-08 17:17:49 -0700
commit1604299a5b4ed183187d7cb13df445d306eda60e (patch)
tree35d61548a77ed5f0a2ded4e603ca9ba50d6788e8 /save-xml.c
parent3a14076b1d1cbf78587305cc83802a1a9ae4c38c (diff)
downloadsubsurface-1604299a5b4ed183187d7cb13df445d306eda60e.tar.gz
Picture handling: change data structure to store offset instead timestamp
It makes no sense to store a 64bit time stamp with every picture. Even the 32bit offset (in seconds) from the dive start is WAY overkill. But switching to that makes the code much more simple in a number of spots. And makes what is saved to the XML file easier to read, too. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'save-xml.c')
-rw-r--r--save-xml.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/save-xml.c b/save-xml.c
index 17f463a93..037fc45cb 100644
--- a/save-xml.c
+++ b/save-xml.c
@@ -333,8 +333,8 @@ static void save_picture(struct membuffer *b, struct picture *pic)
put_string(b, " <picture filename='");
put_string(b, pic->filename);
put_string(b, "'");
- if (pic->timestamp)
- put_format(b, " timestamp='%ld'", pic->timestamp);
+ if (pic->offset)
+ put_format(b, " offset='%d'", pic->offset);
if (pic->latitude.udeg || pic->longitude.udeg) {
put_degrees(b, pic->latitude, " gps='", " ");
put_degrees(b, pic->longitude, "", "'");