X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=dive.c;h=c913e9476798e518861d2cdf7c47185caba0dfb6;hb=18b8247cb357a9a716846854e451e306b752e542;hp=b57205bc5ff096841cc0d0f3626265a650f9228f;hpb=41a1cf4b1967c689f4c3dab60ac284a1313bb9b4;p=ext%2Fsubsurface.git diff --git a/dive.c b/dive.c index b57205b..c913e94 100644 --- a/dive.c +++ b/dive.c @@ -26,6 +26,24 @@ void add_event(struct dive *dive, int time, int type, int flags, int value, cons while (*p) p = &(*p)->next; *p = ev; + remember_event(name); +} + +double get_temp_units(unsigned int mk, const char **units) +{ + double deg; + const char *unit; + + if (output_units.temperature == FAHRENHEIT) { + deg = mkelvin_to_F(mk); + unit = UTF8_DEGREE "F"; + } else { + deg = mkelvin_to_C(mk); + unit = UTF8_DEGREE "C"; + } + if (units) + *units = unit; + return deg; } double get_depth_units(unsigned int mm, int *frac, const char **units)