diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-09 10:34:25 +0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-01-09 15:51:03 +0800 |
commit | 4f982c175810260851ad86073e40559d66df53f5 (patch) | |
tree | 175b668e48e7d7722cdebfc62f082329bb180ee7 /dive.h | |
parent | 9c06938adcc7670201ed5e94ca2c35ec18702373 (diff) | |
download | subsurface-4f982c175810260851ad86073e40559d66df53f5.tar.gz |
Add unit-aware cylinder size string parserc
Whittling down on the string parsing that doesn't check user-specified
units. Still need to handle temperatures (and will do percentages to
match the pattern too), but this is getting us closer to always honoring
user-specified units.
With this you can say that you have a "10l" cylinder at "3000psi", and
it will do the right thing (it's basically a 72 cuft cylinder in
imperial measurements).
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'dive.h')
-rw-r--r-- | dive.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -819,6 +819,7 @@ extern double strtod_flags(const char *str, const char **ptr, unsigned int flags extern weight_t string_to_weight(const char *str); extern depth_t string_to_depth(const char *str); extern pressure_t string_to_pressure(const char *str); +extern volume_t string_to_volume(const char *str, pressure_t workp); #include "pref.h" |