summaryrefslogtreecommitdiffstats
path: root/core/units.c
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2021-01-02 13:56:56 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2021-01-02 10:26:29 -0800
commit91ffa5a59a32b7c2a6e61b0d00e9074d8a418331 (patch)
tree3ed00fa518c34419ca83fec09794e2d35662249b /core/units.c
parent966cd873c524423400b770fdf9836e2f7447a069 (diff)
downloadsubsurface-91ffa5a59a32b7c2a6e61b0d00e9074d8a418331.tar.gz
cleanup: move definition of get_units() to core/unit.c
The function is declared in core/unit.h, therefore it seems logical to define it in the corresponding source file. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/units.c')
-rw-r--r--core/units.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/units.c b/core/units.c
index df6ca5f07..59c09e4dc 100644
--- a/core/units.c
+++ b/core/units.c
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0
#include "units.h"
#include "gettext.h"
+#include "pref.h"
int get_pressure_units(int mb, const char **units)
{
@@ -168,3 +169,8 @@ double get_weight_units(unsigned int grams, int *frac, const char **units)
*units = unit;
return value;
}
+
+const struct units *get_units()
+{
+ return &prefs.units;
+}