Profile: dynamically allocate plot pressure data

All accesses to the pressure data were converted to use functions.
Therefore it is now rather trivial to dynamically allocate the
pressure array and just change the functions.

The only thing to take care of is the idiosyncratic memory
management. Make sure to free and copy the buffer in the
appropriate places.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2019-07-06 17:18:43 +02:00 committed by Dirk Hohndel
parent bef1eac7fa
commit 00289cd222
4 changed files with 19 additions and 7 deletions

View file

@ -21,6 +21,7 @@ struct plot_info {
double endtempcoord;
double maxpp;
struct plot_data *entry;
struct plot_pressure_data *pressures; /* MAX_CYLINDERS blocks of nr entries. */
};
extern struct divecomputer *select_dc(struct dive *);