diff options
author | Nathan Samson <nathansamson@gmail.com> | 2011-09-04 22:15:55 +0200 |
---|---|---|
committer | Nathan Samson <nathansamson@gmail.com> | 2011-09-04 22:15:55 +0200 |
commit | 6b075e0339f419555f08ece3a6c4a29407ecc32b (patch) | |
tree | c8c9df6d8690edddec8da8f8f3a87123f86dead0 /parse-xml.c | |
parent | c4514b062a9866153c179d4b6ecf7972c9496891 (diff) | |
parent | aab4d593bdbffef8442282318778a9833cbc7a43 (diff) | |
download | subsurface-6b075e0339f419555f08ece3a6c4a29407ecc32b.tar.gz |
Merge hbonse's UI tweaks, but fixing the compile warnings. Also bringing it up to date with the master (and my own UI improvements)
Signed-off-by: Nathan Samson <nathansamson@gmail.com>
Diffstat (limited to 'parse-xml.c')
-rw-r--r-- | parse-xml.c | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/parse-xml.c b/parse-xml.c index 635bf56f2..3221111c7 100644 --- a/parse-xml.c +++ b/parse-xml.c @@ -683,28 +683,6 @@ static void dive_start(void) memset(&tm, 0, sizeof(tm)); } -static char *generate_name(struct dive *dive) -{ - int len; - struct tm *tm; - char buffer[256], *p; - - tm = gmtime(&dive->when); - - len = snprintf(buffer, sizeof(buffer), - "%04d-%02d-%02d " - "%02d:%02d:%02d " - "(%d ft, %d min)", - tm->tm_year+1900, tm->tm_mon+1, tm->tm_mday, - tm->tm_hour, tm->tm_min, tm->tm_sec, - to_feet(dive->maxdepth), dive->duration.seconds / 60); - p = malloc(len+1); - if (!p) - exit(1); - memcpy(p, buffer, len+1); - return p; -} - static void sanitize_gasmix(gasmix_t *mix) { unsigned int o2, he; @@ -772,8 +750,6 @@ static void dive_end(void) { if (!dive) return; - if (!dive->name) - dive->name = generate_name(dive); sanitize_cylinder_info(dive); record_dive(dive); dive = NULL; |