mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Make relative times default in planner 2
In planning you usually plan lengths of segments rather than runtimes to leave a level. This patch superseeds a previous one with a similar name and (even more) broken spacing. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
2a6fded3b7
commit
c083ec45a9
1 changed files with 7 additions and 2 deletions
|
@ -832,12 +832,17 @@ static int validate_time(const char *text, int *sec_p, int *rel_p)
|
||||||
while (g_ascii_isspace(*text))
|
while (g_ascii_isspace(*text))
|
||||||
text++;
|
text++;
|
||||||
|
|
||||||
rel = 0;
|
rel = 1;
|
||||||
if (*text == '+') {
|
if (*text == '+') {
|
||||||
rel = 1;
|
rel = 1;
|
||||||
text++;
|
text++;
|
||||||
while (g_ascii_isspace(*text))
|
while (g_ascii_isspace(*text))
|
||||||
text++;
|
text++;
|
||||||
|
} else if (*text == '@') {
|
||||||
|
rel = 0;
|
||||||
|
text++;
|
||||||
|
while (g_ascii_isspace(*text))
|
||||||
|
text++;
|
||||||
}
|
}
|
||||||
|
|
||||||
min = strtol(text, &end, 10);
|
min = strtol(text, &end, 10);
|
||||||
|
@ -1269,7 +1274,7 @@ void input_plan()
|
||||||
char *explanationtext = _("<small>Add segments below.\nEach line describes part of the planned dive.\n"
|
char *explanationtext = _("<small>Add segments below.\nEach line describes part of the planned dive.\n"
|
||||||
"An entry with depth, time and gas describes a segment that ends "
|
"An entry with depth, time and gas describes a segment that ends "
|
||||||
"at the given depth, takes the given time (if relative, e.g. '+3:30') "
|
"at the given depth, takes the given time (if relative, e.g. '+3:30') "
|
||||||
"or ends at the given time (if absolute), and uses the given gas.\n"
|
"or ends at the given time (if absolute e.g '@5:00', 'runtime'), and uses the given gas.\n"
|
||||||
"An empty gas means 'use previous gas' (or AIR if no gas was specified).\n"
|
"An empty gas means 'use previous gas' (or AIR if no gas was specified).\n"
|
||||||
"An entry that has a depth and a gas given but no time is special; it "
|
"An entry that has a depth and a gas given but no time is special; it "
|
||||||
"informs the planner that the gas specified is available for the ascent "
|
"informs the planner that the gas specified is available for the ascent "
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue