mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Convert the C code to using stdbool and true/false
Earlier we converted the C++ code to using true/false, and this converts the C code to using the same style. We already depended on stdbool.h in subsurfacestartup.[ch], and we build with -std=gnu99 so nobody could build subsurface without a c99 compiler. [Dirk Hohndel: small change suggested by Thiago Macieira: don't include stdbool.h for C++] Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
dca59f06d7
commit
33391a77e9
14 changed files with 131 additions and 147 deletions
16
dive.h
16
dive.h
|
@ -28,23 +28,7 @@
|
|||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#else
|
||||
#if __STDC_VERSION__ >= 199901L
|
||||
#include <stdbool.h>
|
||||
#ifndef TRUE
|
||||
#define TRUE true
|
||||
#endif
|
||||
#ifndef FALSE
|
||||
#define FALSE false
|
||||
#endif
|
||||
#else
|
||||
typedef int bool;
|
||||
#ifndef TRUE
|
||||
#define TRUE 1
|
||||
#endif
|
||||
#ifndef FALSE
|
||||
#define FALSE 0
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define O2_IN_AIR 209 // permille
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue