cleanup: move FRACTION macro from dive.h to units.h

There appears to be no reason to slurp in all dive.h when compiling
membuffer.c. units.h might not seem like the perfect place, but it
is the most fitting I found.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2020-05-01 12:53:43 +02:00 committed by Dirk Hohndel
parent 8ce7c4664a
commit c13040798c
3 changed files with 3 additions and 3 deletions

View file

@ -396,8 +396,6 @@ extern const char *existing_filename;
extern void subsurface_command_line_init(int *, char ***);
extern void subsurface_command_line_exit(int *, char ***);
#define FRACTION(n, x) ((unsigned)(n) / (x)), ((unsigned)(n) % (x))
extern bool is_dc_planner(const struct divecomputer *dc);
extern bool has_planned(const struct dive *dive, bool planned);

View file

@ -9,7 +9,7 @@
#include <string.h>
#include <stdio.h>
#include "dive.h"
#include "units.h"
#include "membuffer.h"
/* Only for internal use */

View file

@ -13,6 +13,8 @@ extern "C" {
#include <stdbool.h>
#endif
#define FRACTION(n, x) ((unsigned)(n) / (x)), ((unsigned)(n) % (x))
#define O2_IN_AIR 209 // permille
#define N2_IN_AIR 781
#define O2_DENSITY 1331 // mg/Liter