+/* We're in the top-level trip xml. Try to convert whatever value to a trip value */
+static void try_to_fill_trip(struct dive **divep, const char *name, char *buf)
+{
+ int len = strlen(name);
+
+ start_match("trip", name, buf);
+
+ struct dive *dive = *divep;
+
+ if (MATCH(".date", divedate, &dive->when)) {
+ dive->when = utc_mktime(&cur_tm);
+ return;
+ }
+ if (MATCH(".location", utf8_string, &dive->location))
+ return;
+ if (MATCH(".notes", utf8_string, &dive->notes))
+ return;
+
+ nonmatch("trip", name, buf);
+}
+