mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Start "output unit management" support
This doesn't actually *do* anything yet, but it introduces the notion of output units, and allows you to pick metric or imperial. Of course, since the output doesn't currently care, the units you pick are irrelevant. But just wait.. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
a5a3cba574
commit
05857e0a05
3 changed files with 68 additions and 36 deletions
16
dive.h
16
dive.h
|
@ -126,6 +126,22 @@ struct dive {
|
|||
struct sample sample[];
|
||||
};
|
||||
|
||||
/*
|
||||
* We keep our internal data in well-specified units, but
|
||||
* the input and output may come in some random format. This
|
||||
* keeps track of those units.
|
||||
*/
|
||||
struct units {
|
||||
enum { METERS, FEET } length;
|
||||
enum { LITER, CUFT } volume;
|
||||
enum { BAR, PSI, PASCAL } pressure;
|
||||
enum { CELSIUS, FAHRENHEIT, KELVIN } temperature;
|
||||
enum { KG, LBS } weight;
|
||||
};
|
||||
|
||||
extern const struct units SI_units, IMPERIAL_units;
|
||||
extern struct units input_units, output_units;
|
||||
|
||||
extern int verbose;
|
||||
|
||||
struct dive_table {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue