From f9c3227975e02a576c039e55a2d775dd9d691e03 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sun, 25 Oct 2020 14:10:52 +0100 Subject: cleanup: remove system includes from dive.c Let the various source files include the system headers they need themselves. Signed-off-by: Berthold Stoeger --- core/dive.h | 10 ++-------- core/gaspressures.c | 2 ++ core/import-csv.c | 1 + core/import-shearwater.c | 2 ++ core/import-suunto.c | 2 ++ core/save-html.c | 2 ++ core/statistics.c | 10 ++++++---- core/statistics.h | 2 ++ core/unix.c | 2 +- 9 files changed, 20 insertions(+), 13 deletions(-) (limited to 'core') diff --git a/core/dive.h b/core/dive.h index 6e49c2893..0b0597477 100644 --- a/core/dive.h +++ b/core/dive.h @@ -4,19 +4,13 @@ // dive and dive computer related structures and helpers -#include -#include -#include -#include -#include -#include -#include - #include "divemode.h" #include "divecomputer.h" #include "equipment.h" #include "picture.h" +#include + #ifdef __cplusplus extern "C" { #endif diff --git a/core/gaspressures.c b/core/gaspressures.c index 2fa85368c..a9ba6afd6 100644 --- a/core/gaspressures.c +++ b/core/gaspressures.c @@ -26,6 +26,8 @@ #include "gaspressures.h" #include "pref.h" +#include + /* * simple structure to track the beginning and end tank pressure as * well as the integral of depth over time spent while we have no diff --git a/core/import-csv.c b/core/import-csv.c index 5bdcfd989..4775b7c58 100644 --- a/core/import-csv.c +++ b/core/import-csv.c @@ -1,4 +1,5 @@ #include +#include #include #include diff --git a/core/import-shearwater.c b/core/import-shearwater.c index ad3c97b57..21ae2282b 100644 --- a/core/import-shearwater.c +++ b/core/import-shearwater.c @@ -14,6 +14,8 @@ #include "membuffer.h" #include "gettext.h" +#include + static int shearwater_cylinders(void *param, int columns, char **data, char **column) { UNUSED(columns); diff --git a/core/import-suunto.c b/core/import-suunto.c index 63a9cc622..5a1b0731e 100644 --- a/core/import-suunto.c +++ b/core/import-suunto.c @@ -15,6 +15,8 @@ #include "gettext.h" #include "tag.h" +#include + static int dm4_events(void *param, int columns, char **data, char **column) { UNUSED(columns); diff --git a/core/save-html.c b/core/save-html.c index 90aeb9d41..eeab875b9 100644 --- a/core/save-html.c +++ b/core/save-html.c @@ -17,7 +17,9 @@ #include "tag.h" #include "subsurface-time.h" #include "trip.h" + #include +#include static void write_attribute(struct membuffer *b, const char *att_name, const char *value, const char *separator) { diff --git a/core/statistics.c b/core/statistics.c index 86d1cfce6..eae7414d9 100644 --- a/core/statistics.c +++ b/core/statistics.c @@ -6,19 +6,21 @@ * void calculate_stats_summary(struct stats_summary *out, bool selected_only); * void calculate_stats_selected(stats_t *stats_selection); */ -#include "gettext.h" -#include -#include +#include "statistics.h" #include "dive.h" #include "display.h" #include "event.h" +#include "gettext.h" #include "sample.h" #include "subsurface-time.h" #include "trip.h" -#include "statistics.h" #include "units.h" +#include +#include +#include + static void process_temperatures(struct dive *dp, stats_t *stats) { temperature_t min_temp, mean_temp, max_temp = {.mkelvin = 0}; diff --git a/core/statistics.h b/core/statistics.h index 6e125a217..ef702ea15 100644 --- a/core/statistics.h +++ b/core/statistics.h @@ -16,6 +16,8 @@ #define STATS_MAX_TEMP 40 /* Max temp for stats bucket is 40C */ #define STATS_TEMP_BUCKET 5 /* Size of buckets for temp range */ +struct dive; + typedef struct { int period; diff --git a/core/unix.c b/core/unix.c index bcac33ff3..3c30b36b8 100644 --- a/core/unix.c +++ b/core/unix.c @@ -7,7 +7,7 @@ #include "subsurface-string.h" #include "display.h" #include "membuffer.h" -#include +#include #include #include #include -- cgit v1.2.3-70-g09d2