mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Save CCR cylinder use in XML and git
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
84dc8b8962
commit
202c5cbfeb
6 changed files with 31 additions and 1 deletions
12
parse-xml.c
12
parse-xml.c
|
@ -317,6 +317,16 @@ static void pressure(char *buffer, pressure_t *pressure)
|
|||
}
|
||||
}
|
||||
|
||||
static void cylinder_use(char *buffer, enum cylinderuse *cyl_use)
|
||||
{
|
||||
for (enum cylinderuse i = 0; i < NUM_GAS_USE; i++) {
|
||||
if (same_string(buffer, cylinderuse_text[i])) {
|
||||
*cyl_use = i;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void salinity(char *buffer, int *salinity)
|
||||
{
|
||||
union int_or_float val;
|
||||
|
@ -1226,6 +1236,8 @@ static void try_to_fill_dive(struct dive *dive, const char *name, char *buf)
|
|||
return;
|
||||
if (MATCH("end.cylinder", pressure, &dive->cylinder[cur_cylinder_index].end))
|
||||
return;
|
||||
if (MATCH("use.cylinder", cylinder_use, &dive->cylinder[cur_cylinder_index].cylinder_use))
|
||||
return;
|
||||
if (MATCH("description.weightsystem", utf8_string, &dive->weightsystem[cur_ws_index].description))
|
||||
return;
|
||||
if (MATCH("weight.weightsystem", weight, &dive->weightsystem[cur_ws_index].weight))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue