diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-06-04 20:41:31 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-06-19 13:11:10 -0700 |
commit | f4ef1c4bc8805600e018777f18f3f29682e40c2d (patch) | |
tree | f6797f32bd6f4c91aa762bc3bc85c3d491aedf92 /core/divelist.c | |
parent | 821f68550d09f8e9bc394de682bfc7e8f8a37879 (diff) | |
download | subsurface-f4ef1c4bc8805600e018777f18f3f29682e40c2d.tar.gz |
Cleanup: localize enum and table in divelist.c
The cns_table was only used in divelist.c. Make it of static
linkage accordingly.
The cns_table_headers enum is likewise only used in divelist.c.
Therefore move it from the header to the .c file.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/divelist.c')
-rw-r--r-- | core/divelist.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/divelist.c b/core/divelist.c index 3da17c79a..71391d505 100644 --- a/core/divelist.c +++ b/core/divelist.c @@ -159,6 +159,7 @@ static int calculate_otu(const struct dive *dive) } return lrint(otu); } + /* Table of maximum oxygen exposure durations, used in CNS calulations. This table shows the official NOAA maximum O2 exposure limits (in seconds) for different PO2 values. It also gives slope values for linear interpolation for intermediate PO2 values between the tabulated PO2 values in the 1st column. @@ -169,7 +170,8 @@ static int calculate_otu(const struct dive *dive) preserve the integer structure of the table, all slopes are given as slope*10: divide by 10 to get the valid slope. The columns below are: po2 (mbar), Maximum Single Exposure (seconds), single_slope, Maximum 24 hour Exposure (seconds), 24h_slope */ -int const cns_table[][5] = { +enum cns_table_headers {PO2VAL, SINGLE_EXP, SINGLE_SLOPE, DAILY_EXP, DAILY_SLOPE, NO_COLUMNS}; +static int const cns_table[][5] = { { 1600, 45 * 60, 456, 150 * 60, 180 }, { 1550, 83 * 60, 456, 165 * 60, 180 }, { 1500, 120 * 60, 444, 180 * 60, 180 }, |