summaryrefslogtreecommitdiffstats
path: root/profile.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-03-03 13:25:55 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-03-03 13:29:22 -0800
commit7c535452f97947c0bf77a1da0323b86b9e514c8f (patch)
treeb3b7d43a057605ac91c805777978c504e672ba2d /profile.c
parent917ce5aff50370e7dc4805920a4f5eec09884bb3 (diff)
downloadsubsurface-7c535452f97947c0bf77a1da0323b86b9e514c8f.tar.gz
Whitespace cleanup
Minor change to the perl postprocessing script and resulting changes to the affected source files. This deals with two issues: - "foreach"-like structures were not always treated correctly - some longer calculations that ended on "+ constant" were reformatted in a rather unatractive manner In one source file (divelist.c) I ended up adding braces to the sources... trying to cascade the indentation further down without having the block there seemed a lot more trouble than it's worth. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'profile.c')
-rw-r--r--profile.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/profile.c b/profile.c
index 194a0c4de..c9f3892ab 100644
--- a/profile.c
+++ b/profile.c
@@ -1278,17 +1278,14 @@ static void calculate_gas_information(struct dive *dive, struct plot_info *pi)
* END just uses N2 */
entry->mod = (prefs.mod_ppO2 / fo2 * 1000 - 1) * 10000;
entry->ead = (entry->depth + 10000) *
- (entry->po2 + (amb_pressure - entry->po2) * (1 - ratio)) / amb_pressure -
- 10000;
+ (entry->po2 + (amb_pressure - entry->po2) * (1 - ratio)) / amb_pressure - 10000;
entry->end = (entry->depth + 10000) *
- (amb_pressure - entry->po2) * (1 - ratio) / amb_pressure / N2_IN_AIR * 1000 -
- 10000;
+ (amb_pressure - entry->po2) * (1 - ratio) / amb_pressure / N2_IN_AIR * 1000 - 10000;
entry->eadd = (entry->depth + 10000) *
(entry->po2 / amb_pressure * O2_DENSITY + entry->pn2 / amb_pressure *
N2_DENSITY +
entry->phe / amb_pressure * HE_DENSITY) /
- (O2_IN_AIR * O2_DENSITY + N2_IN_AIR * N2_DENSITY) * 1000 -
- 10000;
+ (O2_IN_AIR * O2_DENSITY + N2_IN_AIR * N2_DENSITY) * 1000 - 10000;
if (entry->mod < 0)
entry->mod = 0;
if (entry->ead < 0)
@@ -1343,17 +1340,14 @@ static void calculate_gas_information_new(struct dive *dive, struct plot_info *p
* END just uses N2 */
entry->mod = (prefs.mod_ppO2 / fo2 * 1000 - 1) * 10000;
entry->ead = (entry->depth + 10000) *
- (entry->po2 + (amb_pressure - entry->po2) * (1 - ratio)) / amb_pressure -
- 10000;
+ (entry->po2 + (amb_pressure - entry->po2) * (1 - ratio)) / amb_pressure - 10000;
entry->end = (entry->depth + 10000) *
- (amb_pressure - entry->po2) * (1 - ratio) / amb_pressure / N2_IN_AIR * 1000 -
- 10000;
+ (amb_pressure - entry->po2) * (1 - ratio) / amb_pressure / N2_IN_AIR * 1000 - 10000;
entry->eadd = (entry->depth + 10000) *
(entry->po2 / amb_pressure * O2_DENSITY + entry->pn2 / amb_pressure *
N2_DENSITY +
entry->phe / amb_pressure * HE_DENSITY) /
- (O2_IN_AIR * O2_DENSITY + N2_IN_AIR * N2_DENSITY) * 1000 -
- 10000;
+ (O2_IN_AIR * O2_DENSITY + N2_IN_AIR * N2_DENSITY) * 1000 - 10000;
if (entry->mod < 0)
entry->mod = 0;
if (entry->ead < 0)