Long term project: convert core to C++ so that we can
use higer-level constructs, notably std::vector<>.
This does not change any code - only fixes compile issues.
Mostly casting of (void *) to the proper type. Also designated
initialization of the sample struct had to be rearranged.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
For consistency with equipment, use our table macros for pictures.
Generally tables (arrays) are preferred over linked lists, because
they allow random access.
This is mostly copy & paste of the equipment code.
Sadly, our table macros are quite messy and need some revamping.
Therefore, the resulting code is likewise somewhat messy.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
The comment said "Clear everything but the first element" but
actually the macro freed the whole list including the first element.
For dive computers it was explicitly called on the second element.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Make dive.h a bit slimmer. It's only a drop in the bucket - but at
least when modifying tag functions not the *whole* application is
rebuilt anymore.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>