- if (!cyl->end.mbar || pressure < cyl->end.mbar)
- cyl->end.mbar = pressure;
+ /* we need to handle the user entering beginning and end tank pressures
+ * - maybe even IF we have samples. But for now if we have air pressure
+ * data in the samples, we use that instead of the minimum
+ * if (!cyl->end.mbar || pressure < cyl->end.mbar)
+ */
+ cyl->end.mbar = pressure;
#define MERGE_MAX(res, a, b, n) res->n = MAX(a->n, b->n)
#define MERGE_MIN(res, a, b, n) res->n = (a->n)?(b->n)?MIN(a->n, b->n):(a->n):(b->n)
#define MERGE_TXT(res, a, b, n) res->n = merge_text(a->n, b->n)
#define MERGE_MAX(res, a, b, n) res->n = MAX(a->n, b->n)
#define MERGE_MIN(res, a, b, n) res->n = (a->n)?(b->n)?MIN(a->n, b->n):(a->n):(b->n)
#define MERGE_TXT(res, a, b, n) res->n = merge_text(a->n, b->n)
+ MERGE_NONZERO(res, a, b, latitude);
+ MERGE_NONZERO(res, a, b, longitude);
MERGE_TXT(res, a, b, location);
MERGE_TXT(res, a, b, notes);
MERGE_TXT(res, a, b, buddy);
MERGE_TXT(res, a, b, location);
MERGE_TXT(res, a, b, notes);
MERGE_TXT(res, a, b, buddy);