From 29caab0673ead635ab623c9ee4d04d27326fef0b Mon Sep 17 00:00:00 2001 From: Jef Driesen Date: Tue, 12 Jul 2016 19:42:18 +0200 Subject: [PATCH] Rename the frog parameter and field to hwos. The frog parameter and field are not only used for the Frog, but also for all hwOS based models. Therefore, using the more generic hwos as the name is more meaningful. --- include/libdivecomputer/hw_ostc.h | 2 +- src/hw_ostc_parser.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/libdivecomputer/hw_ostc.h b/include/libdivecomputer/hw_ostc.h index 4dfb523..2b293e2 100644 --- a/include/libdivecomputer/hw_ostc.h +++ b/include/libdivecomputer/hw_ostc.h @@ -65,7 +65,7 @@ dc_status_t hw_ostc_extract_dives (dc_device_t *device, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata); dc_status_t -hw_ostc_parser_create (dc_parser_t **parser, dc_context_t *context, unsigned int frog); +hw_ostc_parser_create (dc_parser_t **parser, dc_context_t *context, unsigned int hwos); dc_status_t hw_ostc_device_fwupdate (dc_device_t *abstract, const char *filename); diff --git a/src/hw_ostc_parser.c b/src/hw_ostc_parser.c index b6a6989..357fbdc 100644 --- a/src/hw_ostc_parser.c +++ b/src/hw_ostc_parser.c @@ -83,7 +83,7 @@ typedef struct hw_ostc_gasmix_t { typedef struct hw_ostc_parser_t { dc_parser_t base; - unsigned int frog; + unsigned int hwos; // Cached fields. unsigned int cached; unsigned int version; @@ -181,7 +181,7 @@ hw_ostc_parser_cache (hw_ostc_parser_t *parser) } // Check the profile version - unsigned int version = data[parser->frog ? 8 : 2]; + unsigned int version = data[parser->hwos ? 8 : 2]; const hw_ostc_layout_t *layout = NULL; unsigned int header = 0; switch (version) { @@ -267,7 +267,7 @@ hw_ostc_parser_cache (hw_ostc_parser_t *parser) } dc_status_t -hw_ostc_parser_create (dc_parser_t **out, dc_context_t *context, unsigned int frog) +hw_ostc_parser_create (dc_parser_t **out, dc_context_t *context, unsigned int hwos) { hw_ostc_parser_t *parser = NULL; @@ -282,7 +282,7 @@ hw_ostc_parser_create (dc_parser_t **out, dc_context_t *context, unsigned int fr } // Set the default values. - parser->frog = frog; + parser->hwos = hwos; parser->cached = 0; parser->version = 0; parser->header = 0;