Thus, future callers will not have to include the monster dive.h
include if they just want to copy cylinders.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This function was used to count the number of weightsystems
used in a dive. Since the weightsysems are now collected
in a dynamic table it became unused. Remove.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Replace the fixed-size weightsystem table by a dynamically
relocated table. Reuse the table-macros used in other parts
of the code.
The table stores weightsystem entries, not pointers to
weightsystems. Thus, ownership of the description string is
taken when adding a weightsystem. An extra function adds
a cloned weightsystem at the end of the table.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This will be used later when joining and editing dives.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Since this function doesn't act on a dive and is only related
to cylinders, move it to equipment.c and equipment.h.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
The last direct user of the used parameter was removed in
16276faa45, the last actual user in
e2bbd0ceec.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
But only functions that operate only on gases. Functions concerning
cylinders or dives remain in dive.c or are moved to equipment.c
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
There is an equipment.c file, but no corresponding header. Move the
corresponding functions into a newly created header. This does not
improve compile time since, at least for now, equipment.h is included
in dive.h. But it makes things more consistent.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>