X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=dive.c;h=c913e9476798e518861d2cdf7c47185caba0dfb6;hb=18b8247cb357a9a716846854e451e306b752e542;hp=9edf36c9183998d9eef986598ec6bb5fa845cfd8;hpb=f9cb526c969488e6a12d7fe2baf4a71417521460;p=ext%2Fsubsurface.git diff --git a/dive.c b/dive.c index 9edf36c..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) @@ -240,6 +258,9 @@ struct dive *fixup_dive(struct dive *dive) update_temperature(&dive->watertemp, mintemp); update_depth(&dive->maxdepth, maxdepth); + add_people(dive->buddy); + add_people(dive->divemaster); + add_location(dive->location); for (i = 0; i < MAX_CYLINDERS; i++) { cylinder_type_t *type = &dive->cylinder[i].type; add_cylinder_description(type);