diff options
author | Michael Vetter <jubalh@iodoru.org> | 2020-07-07 13:53:30 +0200 |
---|---|---|
committer | Michael Vetter <jubalh@iodoru.org> | 2020-07-07 13:53:30 +0200 |
commit | a4cadf78faabc157e5db00e42302d495bba432c0 (patch) | |
tree | 6ff212e24fe750b04b37ca66c418fe366c5e5fd4 /src/tools/bookmark_ignore.c | |
parent | 28fde3cd0129202d586cb4c24877a3e3f55ca582 (diff) | |
download | profani-tty-a4cadf78faabc157e5db00e42302d495bba432c0.tar.gz |
Revert "Apply coding style"
This reverts commit 9b55f2dec0ea27a9ce4856e303425e12f866cea2. Sorting the includes creates some problems.
Diffstat (limited to 'src/tools/bookmark_ignore.c')
-rw-r--r-- | src/tools/bookmark_ignore.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/tools/bookmark_ignore.c b/src/tools/bookmark_ignore.c index 7c97dfc8..09053e5b 100644 --- a/src/tools/bookmark_ignore.c +++ b/src/tools/bookmark_ignore.c @@ -35,22 +35,22 @@ #include "config.h" -#include "config/files.h" -#include "config/preferences.h" #include <glib.h> #include <glib/gstdio.h> #include <stdlib.h> #include <string.h> +#include "config/files.h" +#include "config/preferences.h" #include "log.h" -static GKeyFile* bookmark_ignore_keyfile = NULL; -static char* account_jid = NULL; +static GKeyFile *bookmark_ignore_keyfile = NULL; +static char *account_jid = NULL; static void _bookmark_ignore_load() { - char* bi_loc; + char *bi_loc; bi_loc = files_get_data_path(FILE_BOOKMARK_AUTOJOIN_IGNORE); @@ -68,9 +68,9 @@ static void _bookmark_save() { gsize g_data_size; - gchar* g_bookmark_ignore_data = g_key_file_to_data(bookmark_ignore_keyfile, &g_data_size, NULL); + gchar *g_bookmark_ignore_data = g_key_file_to_data(bookmark_ignore_keyfile, &g_data_size, NULL); - char* bi_loc; + char *bi_loc; bi_loc = files_get_data_path(FILE_BOOKMARK_AUTOJOIN_IGNORE); g_file_set_contents(bi_loc, g_bookmark_ignore_data, g_data_size, NULL); @@ -81,9 +81,9 @@ _bookmark_save() } void -bookmark_ignore_on_connect(const char* const barejid) +bookmark_ignore_on_connect(const char *const barejid) { - if (bookmark_ignore_keyfile == NULL) { + if(bookmark_ignore_keyfile == NULL) { _bookmark_ignore_load(); account_jid = strdup(barejid); } @@ -98,26 +98,26 @@ bookmark_ignore_on_disconnect() } gboolean -bookmark_ignored(Bookmark* bookmark) +bookmark_ignored(Bookmark *bookmark) { return g_key_file_get_boolean(bookmark_ignore_keyfile, account_jid, bookmark->barejid, NULL); } -gchar** -bookmark_ignore_list(gsize* len) +gchar ** +bookmark_ignore_list(gsize *len) { return g_key_file_get_keys(bookmark_ignore_keyfile, account_jid, len, NULL); } void -bookmark_ignore_add(const char* const barejid) +bookmark_ignore_add(const char *const barejid) { g_key_file_set_boolean(bookmark_ignore_keyfile, account_jid, barejid, TRUE); _bookmark_save(); } void -bookmark_ignore_remove(const char* const barejid) +bookmark_ignore_remove(const char *const barejid) { g_key_file_remove_key(bookmark_ignore_keyfile, account_jid, barejid, NULL); _bookmark_save(); |