diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2017-01-17 09:53:56 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-01-17 09:57:40 -0800 |
commit | 22267762ce2d92064733a94e66caf9d617089ab2 (patch) | |
tree | 439def42064e39b87ae1cc997ba8ebc063a1591b /smtk-import/smartrak.c | |
parent | e1ee577c4fc693a4cfe948ab5ae02ab1af44edfa (diff) | |
download | subsurface-22267762ce2d92064733a94e66caf9d617089ab2.tar.gz |
Smart Trak tool compile fix
In commit 70e2404492bb ("Stop accessing the internals of
dc_descriptor_t") the structure definition of the libdivecomputer
descriptor was removed from Subsurface and replaced with accessor
functions. This adapts the Smart Trakl import tool to use the same
accessor functions, which allows it to compile again in current master.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'smtk-import/smartrak.c')
-rw-r--r-- | smtk-import/smartrak.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/smtk-import/smartrak.c b/smtk-import/smartrak.c index b3407e3cf..25df0901c 100644 --- a/smtk-import/smartrak.c +++ b/smtk-import/smartrak.c @@ -607,8 +607,8 @@ static int prepare_data(int data_model, dc_family_t dc_fam, device_data_t *dev_d dev_data->context = NULL; dev_data->descriptor = get_data_descriptor(data_model, dc_fam); if (dev_data->descriptor) { - dev_data->vendor = copy_string(dev_data->descriptor->vendor); - dev_data->product = copy_string(dev_data->descriptor->product); + dev_data->vendor = copy_string(dc_descriptor_get_vendor(dev_data->descriptor)); + dev_data->product = copy_string(dc_descriptor_get_product(dev_data->descriptor)); dev_data->model = smtk_concat_str(dev_data->model, "", "%s %s", dev_data->vendor, dev_data->product); return DC_STATUS_SUCCESS; } else { @@ -625,10 +625,10 @@ static int prepare_data(int data_model, dc_family_t dc_fam, device_data_t *dev_d static dc_status_t libdc_buffer_complete(device_data_t *dev_data, unsigned char *hdr_buffer, int hdr_length, unsigned char *prf_buffer, int prf_length, unsigned char *compl_buf) { - switch (dev_data->descriptor->type) { + switch (dc_descriptor_get_type(dev_data->descriptor)) { case DC_FAMILY_UWATEC_ALADIN: case DC_FAMILY_UWATEC_MEMOMOUSE: - compl_buf[3] = (unsigned char) dev_data->descriptor->model; + compl_buf[3] = (unsigned char) dc_descriptor_get_model(dev_data->descriptor); memcpy(compl_buf+hdr_length, prf_buffer, prf_length); break; case DC_FAMILY_UWATEC_SMART: @@ -708,7 +708,7 @@ void smartrak_import(const char *file, struct dive_table *divetable) if (rc == DC_STATUS_SUCCESS) { prf_buffer = mdb_ole_read_full(mdb, col[coln(PROFILE)], &prf_length); if (prf_length > 0) { - if (devdata->descriptor->type == DC_FAMILY_UWATEC_ALADIN || devdata->descriptor->type == DC_FAMILY_UWATEC_MEMOMOUSE) + if (dc_descriptor_get_type(devdata->descriptor) == DC_FAMILY_UWATEC_ALADIN || dc_descriptor_get_type(devdata->descriptor) == DC_FAMILY_UWATEC_MEMOMOUSE) hdr_length = 18; compl_buffer = calloc(hdr_length+prf_length, sizeof(char)); rc = libdc_buffer_complete(devdata, hdr_buffer, hdr_length, prf_buffer, prf_length, compl_buffer); |