mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 22:03:23 +00:00
Add #include guards to statistics.h and the extern "C" for C++
If the extern "C" is missing, the C++ compiler will try to find a function by its mangled name. Since the function is in a .c file, there will be no mangled name. Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
1240455a9a
commit
265376db06
1 changed files with 14 additions and 0 deletions
14
statistics.h
14
statistics.h
|
@ -4,6 +4,14 @@
|
||||||
* core logic functions called from statistics UI
|
* core logic functions called from statistics UI
|
||||||
* common types and variables
|
* common types and variables
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef STATISTICS_H
|
||||||
|
#define STATISTICS_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int period;
|
int period;
|
||||||
duration_t total_time;
|
duration_t total_time;
|
||||||
|
@ -32,3 +40,9 @@ extern char *get_minutes(int seconds);
|
||||||
extern void process_all_dives(struct dive *dive, struct dive **prev_dive);
|
extern void process_all_dives(struct dive *dive, struct dive **prev_dive);
|
||||||
extern void get_selected_dives_text(char *buffer, int size);
|
extern void get_selected_dives_text(char *buffer, int size);
|
||||||
extern volume_t get_gas_used(struct dive *dive);
|
extern volume_t get_gas_used(struct dive *dive);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue