From 3ba87dc43a63cfb983233857550c1caed32c9079 Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Wed, 20 Nov 2024 23:55:07 +0100 Subject: Added begin/end decls --- FICS/fics_getsalt.h | 12 ++++-------- FICS/ficslim.h | 10 +++------- FICS/iset.h | 11 +++-------- FICS/utils.h | 10 ++-------- 4 files changed, 12 insertions(+), 31 deletions(-) diff --git a/FICS/fics_getsalt.h b/FICS/fics_getsalt.h index c22f9c8..317ae27 100644 --- a/FICS/fics_getsalt.h +++ b/FICS/fics_getsalt.h @@ -1,17 +1,13 @@ #ifndef FICS_GETSALT_H #define FICS_GETSALT_H +#include "common.h" + #define FICS_SALT_BEG "$2b$10$" #define FICS_SALT_SIZE 30 -#ifdef __cplusplus -extern "C" { -#endif - +__FICS_BEGIN_DECLS char *fics_getsalt(void); - -#ifdef __cplusplus -} -#endif +__FICS_END_DECLS #endif diff --git a/FICS/ficslim.h b/FICS/ficslim.h index 79d819c..40f9b9a 100644 --- a/FICS/ficslim.h +++ b/FICS/ficslim.h @@ -3,15 +3,11 @@ #include -#ifdef __cplusplus -extern "C" { -#endif +#include "common.h" +__FICS_BEGIN_DECLS extern const time_t g_time_min; extern const time_t g_time_max; - -#ifdef __cplusplus -} -#endif +__FICS_END_DECLS #endif diff --git a/FICS/iset.h b/FICS/iset.h index f88d9fb..3fa3f6f 100644 --- a/FICS/iset.h +++ b/FICS/iset.h @@ -2,15 +2,10 @@ #define GUARD_ISET_H #include "command.h" /* param_list */ +#include "common.h" -#ifdef __cplusplus -extern "C" { -#endif - +__FICS_BEGIN_DECLS int com_iset(int, param_list); - -#ifdef __cplusplus -} -#endif +__FICS_END_DECLS #endif diff --git a/FICS/utils.h b/FICS/utils.h index 3bcdd4d..df986eb 100644 --- a/FICS/utils.h +++ b/FICS/utils.h @@ -55,10 +55,7 @@ #define ClearFlag(VAR, FLAG) (VAR &= ~(FLAG)) #define CheckFlag(VAR, FLAG) (VAR & (FLAG)) -#ifdef __cplusplus -extern "C" { -#endif - +__FICS_BEGIN_DECLS extern char *dotQuad(unsigned int); extern char *eattailwhite(char *); extern char *eatwhite(char *); @@ -110,9 +107,6 @@ extern int untenths(unsigned int); extern unsigned int tenth_secs(void); //extern void pprintf_dohightlight(int); //extern void sprintf_dohightlight(int, char *); - -#ifdef __cplusplus -} -#endif +__FICS_END_DECLS #endif /* _UTILS_H */ -- cgit v1.2.3