+static void get_temp(struct dive *dive, int *val, char **str)
+{
+ int value = dive->watertemp.mkelvin;
+ char buffer[80];
+
+ *val = value;
+ *str = "";
+ if (value) {
+ double deg;
+ switch (output_units.temperature) {
+ case CELSIUS:
+ deg = mkelvin_to_C(value);
+ break;
+ case FAHRENHEIT:
+ deg = mkelvin_to_F(value);
+ break;
+ default:
+ return;
+ }
+ snprintf(buffer, sizeof(buffer), "%.1f", deg);
+ *str = strdup(buffer);
+ }
+}
+
+static void get_nitrox(struct dive *dive, int *val, char **str)
+{
+ int value = dive->cylinder[0].gasmix.o2.permille;
+ char buffer[80];
+
+ *val = value;
+ *str = "";
+ if (value) {
+ snprintf(buffer, sizeof(buffer), "%.1f", value/10.0);
+ *str = strdup(buffer);
+ }
+}
+
+static void get_sac(struct dive *dive, int *val, char **str)
+{
+ *val = 0;
+ *str = "";
+}
+