mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
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:
parent
8ce7c4664a
commit
c13040798c
3 changed files with 3 additions and 3 deletions
|
@ -396,8 +396,6 @@ extern const char *existing_filename;
|
||||||
extern void subsurface_command_line_init(int *, char ***);
|
extern void subsurface_command_line_init(int *, char ***);
|
||||||
extern void subsurface_command_line_exit(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 is_dc_planner(const struct divecomputer *dc);
|
||||||
extern bool has_planned(const struct dive *dive, bool planned);
|
extern bool has_planned(const struct dive *dive, bool planned);
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "dive.h"
|
#include "units.h"
|
||||||
#include "membuffer.h"
|
#include "membuffer.h"
|
||||||
|
|
||||||
/* Only for internal use */
|
/* Only for internal use */
|
||||||
|
|
|
@ -13,6 +13,8 @@ extern "C" {
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define FRACTION(n, x) ((unsigned)(n) / (x)), ((unsigned)(n) % (x))
|
||||||
|
|
||||||
#define O2_IN_AIR 209 // permille
|
#define O2_IN_AIR 209 // permille
|
||||||
#define N2_IN_AIR 781
|
#define N2_IN_AIR 781
|
||||||
#define O2_DENSITY 1331 // mg/Liter
|
#define O2_DENSITY 1331 // mg/Liter
|
||||||
|
|
Loading…
Reference in a new issue