diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2012-12-10 09:20:57 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2012-12-10 10:26:06 -0800 |
commit | 92c0d8c5160232642571b52b66176594c796f21d (patch) | |
tree | d3b78a6deba3af0119b493dbfd0a8ec8c4a13304 /parse-xml.c | |
parent | 54919c1c4ec94cd21150c5320fa0956d13df5904 (diff) | |
download | subsurface-92c0d8c5160232642571b52b66176594c796f21d.tar.gz |
Move global variables covered by Preferences into one structure
Now we can simply remember the state of all the preferences at the
beginning of preferences_dialog() and restore them if the user presses
'Cancel'.
Fixes #21
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'parse-xml.c')
-rw-r--r-- | parse-xml.c | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/parse-xml.c b/parse-xml.c index 35299257a..eb4d4832e 100644 --- a/parse-xml.c +++ b/parse-xml.c @@ -129,29 +129,8 @@ static int match(const char *pattern, int plen, struct units input_units; - -/* - * We're going to default to SI units for input. Yes, - * technically the SI unit for pressure is Pascal, but - * we default to bar (10^5 pascal), which people - * actually use. Similarly, C instead of Kelvin. - * And kg instead of g. - */ -const struct units SI_units = { - .length = METERS, - .volume = LITER, - .pressure = BAR, - .temperature = CELSIUS, - .weight = KG -}; - -const struct units IMPERIAL_units = { - .length = FEET, - .volume = CUFT, - .pressure = PSI, - .temperature = FAHRENHEIT, - .weight = LBS -}; +const struct units SI_units = SI_UNITS; +const struct units IMPERIAL_units = IMPERIAL_UNITS; /* * Dive info as it is being built up.. |