print.c: used gas & gasmix question

Dirk Hohndel dirk at hohndel.org
Wed Oct 2 10:17:54 UTC 2013


On Wed, 2013-10-02 at 19:14 +0300, Lubomir I. Ivanov wrote:
> hello,
> 
> a question about a couple of *cylinder* properties that i found in
> print.c:print_tanks() and that are shown in the table that is printed
> in the "6 dives/2 dives per-page" mode:
> 
> - used gas:
> this is done in the lines of:
> gas_usage = start_pressure(cyl) - end_pressure(cyl);
> using some helper functions local to print.c.
> 
> - gas mix:
> this is already done in the Qt divelist, but the old print.c does them
> slightly differently with:
> print_ean_trimix(...)
> -> EAN, Tx, Oxygen, air
> 
> should these be exposed somehow to dive.h, so that other interfaces
> (like the one that does that Qt printing) can access them, or should i
> simply double these as helper functions in the new cpp files related
> to printing and not add them to dive.h/c?

Add them to a .h file and use them wherever useful

/D



More information about the subsurface mailing list