summaryrefslogtreecommitdiffstats
path: root/parse.c
AgeCommit message (Collapse)Author
2011-08-30Start actually reporting the numbers we parsedGravatar Linus Torvalds
.. which also showed that the sampletime thing had gotten a bit too much copy-paste from the temperature parsing ;) Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-08-30Add 'verbose' flagGravatar Linus Torvalds
Now that we actually parse some of the dives, don't spam stdout with the list of stuff we can't parse by default. Add a 'verbose' flag, which enables that output when set. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-08-30Start parsing numeric fieldsGravatar Linus Torvalds
Depth, pressure, and sample times. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-08-30Start parsing dive datesGravatar Linus Torvalds
.. only the suunto XML format, though. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-08-30Move the "text" nodename hackery out of 'nodename()'Gravatar Linus Torvalds
It's better to do it in the caller. Debug users may well want the full node name. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-08-30Fix stupid mis-initialization of current sampleGravatar Linus Torvalds
.. nice compiler warning hidden by the crazy gcc pointer sign warnings that nobody wants to see (yes, we really do want to do 'strlen()' even on unsigned strings, don't complain, crazy bitch compiler). So this also makes our CFLAGS set -Wno-pointer-sign. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-08-30Start showing unparsed entriesGravatar Linus Torvalds
(ie all of them) This also shows the type of entry, which makes it clear that I've screwed up the sample matching. Oh well. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-08-30Fill in dummy parse target codeGravatar Linus Torvalds
.. but don't actually parse anything yet. But hey - now it tells you how many samples it (hasn't) parsed. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-08-29Move the parser closer to being usableGravatar Linus Torvalds
Ok, so we have the dive split and the sample splits, so now we could really just start filling in data. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-08-29Turn the XML into something almost parseable.Gravatar Linus Torvalds
Of course, now the problem is that the different XML files have different node names, but at least we've turned it into a half-way sane format, and have a nice callback place per value. Soon we could use that to actually fill in useful information. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-08-28Add crazy (bad) xml parser thingGravatar Linus Torvalds
It only works for the Suunto "one xml file per dive" format, not for the libdivecomputer one that just puts many dives in one file. Maybe there is some way for libxml2 to handle concatenated xml files (start again on errors), but I don't know it yet. I need to get stinking drunk before I look at more xml mess. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>