summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org>2011-08-30 17:51:35 -0700
committerGravatar Linus Torvalds <torvalds@linux-foundation.org>2011-08-30 17:51:35 -0700
commit17fcb3d32d6353bfcbf83a98bd8255727b055259 (patch)
tree17b35e71f66eb4ac2e6b026c336e1bdd55bdb1c5
parentfc38f4f0c4dba1b7339edbe7ef01b53cbcc78f15 (diff)
downloadsubsurface-17fcb3d32d6353bfcbf83a98bd8255727b055259.tar.gz
Clean up dive reporting
Show date, max depth, and time by default. The stuff that matters and should always exist. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--parse.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/parse.c b/parse.c
index 5c991fa8a..0faf31f81 100644
--- a/parse.c
+++ b/parse.c
@@ -140,10 +140,10 @@ static void show_dive(int nr, struct dive *dive)
tm = gmtime(&dive->when);
- printf("Dive %d with %d samples at %02d:%02d:%02d %04d-%02d-%02d\n",
- nr, dive->samples,
+ printf("At %02d:%02d:%02d %04d-%02d-%02d (%d ft max, %d minutes)\n",
tm->tm_hour, tm->tm_min, tm->tm_sec,
- tm->tm_year+1900, tm->tm_mon+1, tm->tm_mday);
+ tm->tm_year+1900, tm->tm_mon+1, tm->tm_mday,
+ to_feet(dive->maxdepth), dive->duration.seconds / 60);
if (!verbose)
return;
@@ -595,7 +595,6 @@ static void entry(const char *name, int size, const char *raw)
static const char *nodename(xmlNode *node, char *buf, int len)
{
-
if (!node || !node->name)
return "root";