mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core: use divelog struct in parser state
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
8cd451fc33
commit
40275ea56b
8 changed files with 30 additions and 61 deletions
|
|
@ -201,7 +201,7 @@ static int cobalt_dive(void *param, int columns, char **data, char **column)
|
|||
return 1;
|
||||
}
|
||||
sprintf(tmp, "%s / %s", location, location_site);
|
||||
add_dive_to_dive_site(state->cur_dive, find_or_create_dive_site_with_name(tmp, state->sites));
|
||||
add_dive_to_dive_site(state->cur_dive, find_or_create_dive_site_with_name(tmp, state->log->sites));
|
||||
free(tmp);
|
||||
}
|
||||
free(location);
|
||||
|
|
@ -229,10 +229,7 @@ int parse_cobalt_buffer(sqlite3 *handle, const char *url, const char *buffer, in
|
|||
struct parser_state state;
|
||||
|
||||
init_parser_state(&state);
|
||||
state.target_table = log->dives;
|
||||
state.trips = log->trips;
|
||||
state.sites = log->sites;
|
||||
state.devices = log->devices;
|
||||
state.log = log;
|
||||
state.sql_handle = handle;
|
||||
|
||||
char get_dives[] = "select Id,strftime('%s',DiveStartTime),LocationId,'buddy','notes',Units,(MaxDepthPressure*10000/SurfacePressure)-10000,DiveMinutes,SurfacePressure,SerialNumber,'model' from Dive where IsViewDeleted = 0";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue