From b11f092bda30eae2cf77a9e51558f2b0db40e0cd Mon Sep 17 00:00:00 2001 From: ENGO150 Date: Sat, 26 Aug 2023 18:57:53 +0200 Subject: [PATCH] replaced local macros with flags --- include/chat/flags.h | 1 + src/chat/config.c | 7 ++----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/include/chat/flags.h b/include/chat/flags.h index 18f3362..44a1987 100644 --- a/include/chat/flags.h +++ b/include/chat/flags.h @@ -32,5 +32,6 @@ along with this program. If not, see . #define WHY2_CHAT_CONFIG_DIR "/home/{USER}/.config/WHY2" #define WHY2_CHAT_CONFIG_URL "https://raw.githubusercontent.com/ENGO150/WHY2/development/src/chat/" #define WHY2_CHAT_CONFIG_SERVER "server.yml" +#define WHY2_CHAT_CONFIG_CLIENT "client.yml" #endif \ No newline at end of file diff --git a/src/chat/config.c b/src/chat/config.c index e2a3f72..c065632 100644 --- a/src/chat/config.c +++ b/src/chat/config.c @@ -31,9 +31,6 @@ along with this program. If not, see . #include #include -#define SERVER "server.yml" -#define CLIENT "client.yml" - //LOCAL void init_config(char *filename) { @@ -74,10 +71,10 @@ void init_config(char *filename) //GLOBAL void why2_chat_init_server_config(void) { - init_config(SERVER); + init_config(WHY2_CHAT_CONFIG_SERVER); } void why2_chat_init_client_config(void) { - init_config(CLIENT); + init_config(WHY2_CHAT_CONFIG_CLIENT); } \ No newline at end of file