From 48eb689e9109c6bd8f948017255dc8b0d4a622e1 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Thu, 29 Feb 2024 10:53:52 +0600 Subject: [PATCH 1/2] Added debug outputs --- source/libublsettings.c | 2 ++ source/libublsettings.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/source/libublsettings.c b/source/libublsettings.c index 9bb1b9e..b430b9b 100644 --- a/source/libublsettings.c +++ b/source/libublsettings.c @@ -1372,12 +1372,14 @@ int yon_config_save_registered(char *path){ for_dictionaries(dct,sections_add){ char *command = yon_dictionary_get_data(dct,char*); yon_launch(command); + printf("%s\n",command); } yon_dictionary_free_all(sections_add,free); if (sections_remove) for_dictionaries(dct,sections_remove){ char *command = yon_dictionary_get_data(dct,char*); yon_launch(command); + printf("%s\n",command); } yon_dictionary_free_all(sections_remove,free); if (sections_add||sections_remove) diff --git a/source/libublsettings.h b/source/libublsettings.h index ee8822d..3549096 100644 --- a/source/libublsettings.h +++ b/source/libublsettings.h @@ -607,6 +607,8 @@ typedef enum { YON_CONFIG_DEFAULT } YON_CONFIG_TYPE; +static int debug_output = 0; + /**yon_config_load(char *command, int *str_len) * [EN] * From 08b3a72cbbaccc03fe1ea0da9f8f5ea803dc3c46 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Thu, 29 Feb 2024 10:54:10 +0600 Subject: [PATCH 2/2] Added debug outputs --- source/libublsettings.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/libublsettings.c b/source/libublsettings.c index b430b9b..68ff6ba 100644 --- a/source/libublsettings.c +++ b/source/libublsettings.c @@ -1372,6 +1372,7 @@ int yon_config_save_registered(char *path){ for_dictionaries(dct,sections_add){ char *command = yon_dictionary_get_data(dct,char*); yon_launch(command); + if (debug_output) printf("%s\n",command); } yon_dictionary_free_all(sections_add,free); @@ -1379,6 +1380,7 @@ int yon_config_save_registered(char *path){ for_dictionaries(dct,sections_remove){ char *command = yon_dictionary_get_data(dct,char*); yon_launch(command); + if (debug_output) printf("%s\n",command); } yon_dictionary_free_all(sections_remove,free);