Hi Guido, I mentioned this before, please don't mark comments with "glerch <date info>" If someone wants't to know who wrote this and when, they can use "git blame"
/D On Thu, Sep 10, 2015 at 07:54:29PM +0200, Guido Lerch wrote: > From a10c9b8877a708157f52e335d4009bb9a22d33c5 Mon Sep 17 00:00:00 2001 > From: glerch <[email protected]> > Date: Thu, 10 Sep 2015 16:05:16 +0200 > Subject: [PATCH 2/8] Uemis - New Find divespot by diveid > > New routine to support finding a dive spot based on the dive id, > this is needed due to the weird way Uemis is providing data. > This function will be used in the uemis-downloader.c within > do_uemis_import. > > Signed-off-by: glerch <[email protected]> > --- > uemis.c | 14 ++++++++++++++ > uemis.h | 2 ++ > 2 files changed, 16 insertions(+) > > diff --git a/uemis.c b/uemis.c > index e60e94a..0e55a8e 100644 > --- a/uemis.c > +++ b/uemis.c > @@ -155,6 +155,20 @@ void uemis_mark_divelocation(int diveid, int divespot, > uint32_t dive_site_uuid) > hp->dive_site_uuid = dive_site_uuid; > } > > +/* glerch Sep 2015 > + * support finding a dive spot based on the diveid > + */ > +int uemis_get_divespot_id_by_diveid(uint32_t diveid) > +{ > + struct uemis_helper *hp = uemis_helper; > + while(hp) { > + if (hp->diveid == diveid) > + return hp->divespot; > + hp = hp->next; > + } > + return 0; > +} > + > void uemis_set_divelocation(int divespot, char *text, double longitude, > double latitude) > { > struct uemis_helper *hp = uemis_helper; > diff --git a/uemis.h b/uemis.h > index d19f293..a836b21 100644 > --- a/uemis.h > +++ b/uemis.h > @@ -17,6 +17,8 @@ int uemis_get_weight_unit(int diveid); > void uemis_mark_divelocation(int diveid, int divespot, uint32_t > dive_site_uuid); > void uemis_set_divelocation(int divespot, char *text, double longitude, > double latitude); > void uemis_set_max_diveid_from_dialog(int diveid); > +// glerch Sep 2015 > +int uemis_get_divespot_id_by_diveid(uint32_t diveid); > > typedef struct > { > -- > 1.9.5 (Apple Git-50.3) > _______________________________________________ subsurface mailing list [email protected] http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
