mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
9c06938adc
commit
4f982c1758
2 changed files with 41 additions and 22 deletions
1
dive.h
1
dive.h
|
|
@ -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"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue