mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Dive list: replace dive-list of trips by a table
The dives of each trip were kept in a list. Replace this by a struct dive_table. This will make it significantly easier to keep the dives of a trip in sorted state. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
bc7afebc23
commit
6b283e598a
9 changed files with 63 additions and 80 deletions
15
core/dive.h
15
core/dive.h
|
|
@ -286,13 +286,18 @@ typedef enum {
|
|||
NUM_TRIPFLAGS
|
||||
} tripflag_t;
|
||||
|
||||
struct dive_table {
|
||||
int nr, allocated;
|
||||
struct dive **dives;
|
||||
};
|
||||
|
||||
typedef struct dive_trip
|
||||
{
|
||||
timestamp_t when;
|
||||
char *location;
|
||||
char *notes;
|
||||
struct dive *dives;
|
||||
int nrdives, showndives;
|
||||
struct dive_table dives;
|
||||
int showndives;
|
||||
/* Used by the io-routines to mark trips that have already been written. */
|
||||
bool saved;
|
||||
bool autogen;
|
||||
|
|
@ -306,7 +311,6 @@ struct dive {
|
|||
int number;
|
||||
tripflag_t tripflag;
|
||||
dive_trip_t *divetrip;
|
||||
struct dive *next, **pprev;
|
||||
bool selected;
|
||||
bool hidden_by_filter;
|
||||
timestamp_t when;
|
||||
|
|
@ -428,11 +432,6 @@ extern const struct units SI_units, IMPERIAL_units;
|
|||
extern const struct units *get_units(void);
|
||||
extern int run_survey, verbose, quit, force_root;
|
||||
|
||||
struct dive_table {
|
||||
int nr, allocated;
|
||||
struct dive **dives;
|
||||
};
|
||||
|
||||
extern struct dive_table dive_table, downloadTable;
|
||||
extern struct dive displayed_dive;
|
||||
extern unsigned int dc_number;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue