From 0a57c4de78f8a3cd4efb631a79b000b42f16fc15 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 24 Jul 2016 15:43:51 +0100 Subject: [PATCH] Tidy headers --- src/command/cmd_ac.c | 12 +++++------ src/command/cmd_defs.c | 18 ++++++++-------- src/command/cmd_funcs.c | 40 ++++++++++++++++++++---------------- src/common.c | 4 +--- src/config/account.c | 4 ++-- src/config/accounts.c | 4 ++-- src/config/scripts.c | 2 +- src/config/theme.c | 1 + src/config/tlscerts.c | 2 +- src/config/tlscerts.h | 2 ++ src/event/client_events.c | 6 ++++-- src/event/server_events.c | 13 ++++++------ src/log.c | 1 - src/log.h | 2 +- src/otr/otr.c | 12 +++++------ src/otr/otrlibv3.c | 4 ++-- src/otr/otrlibv4.c | 4 ++-- src/pgp/gpg.c | 2 +- src/plugins/api.c | 8 ++++---- src/plugins/c_plugins.c | 2 +- src/plugins/callbacks.c | 3 +-- src/plugins/plugins.c | 7 +++---- src/plugins/python_api.c | 2 +- src/plugins/python_plugins.c | 1 - src/plugins/settings.c | 2 +- src/plugins/themes.c | 2 +- src/profanity.c | 30 +++++++++++++++------------ src/profanity.h | 1 + src/tools/http_upload.c | 6 +++--- src/tools/http_upload.h | 1 + src/ui/buffer.h | 4 ++-- src/ui/console.c | 10 ++++----- src/ui/core.c | 28 +++++++++++++------------ src/ui/inputwin.c | 14 ++++++------- src/ui/mucconfwin.c | 2 +- src/ui/mucwin.c | 6 +++--- src/ui/notifier.c | 8 +++++--- src/ui/occupantswin.c | 4 ++-- src/ui/privwin.c | 5 ++--- src/ui/rosterwin.c | 6 +++--- src/ui/statusbar.c | 2 +- src/ui/titlebar.c | 2 +- src/ui/tray.c | 4 ++-- src/ui/ui.h | 5 +++-- src/ui/win_types.h | 3 ++- src/ui/window.c | 3 ++- src/ui/window.h | 14 ++++++------- src/ui/window_list.c | 8 ++++---- src/ui/xmlwin.c | 2 +- src/xmpp/blocking.c | 1 + src/xmpp/bookmark.c | 7 ++++--- src/xmpp/capabilities.c | 3 ++- src/xmpp/capabilities.h | 1 + src/xmpp/chat_session.c | 4 ++-- src/xmpp/chat_state.c | 6 +++--- src/xmpp/connection.c | 1 + src/xmpp/contact.c | 4 ++-- src/xmpp/contact.h | 2 +- src/xmpp/form.c | 1 + src/xmpp/form.h | 5 +++-- src/xmpp/iq.c | 23 +++++++++++---------- src/xmpp/jid.c | 3 +-- src/xmpp/message.c | 17 +++++++-------- src/xmpp/muc.c | 6 +++--- src/xmpp/muc.h | 4 ++-- src/xmpp/presence.c | 11 +++++----- src/xmpp/roster.c | 12 +++++------ src/xmpp/roster_list.c | 6 +++--- src/xmpp/session.c | 10 ++++----- src/xmpp/session.h | 11 +--------- src/xmpp/stanza.c | 4 ++-- src/xmpp/stanza.h | 1 + src/xmpp/xmpp.h | 5 +++-- 73 files changed, 247 insertions(+), 229 deletions(-) diff --git a/src/command/cmd_ac.c b/src/command/cmd_ac.c index b1273bc9..afc642e4 100644 --- a/src/command/cmd_ac.c +++ b/src/command/cmd_ac.c @@ -41,17 +41,17 @@ #include #include "common.h" -#include "tools/parser.h" -#include "ui/win_types.h" -#include "command/cmd_funcs.h" #include "config/preferences.h" #include "config/scripts.h" +#include "command/cmd_ac.h" +#include "command/cmd_funcs.h" +#include "tools/parser.h" +#include "plugins/plugins.h" +#include "ui/win_types.h" +#include "ui/window_list.h" #include "xmpp/muc.h" #include "xmpp/xmpp.h" #include "xmpp/roster_list.h" -#include "ui/window_list.h" -#include "plugins/plugins.h" -#include "command/cmd_ac.h" #ifdef HAVE_LIBGPGME #include "pgp/gpg.h" diff --git a/src/command/cmd_defs.c b/src/command/cmd_defs.c index fa55ec83..14afd7c2 100644 --- a/src/command/cmd_defs.c +++ b/src/command/cmd_defs.c @@ -48,29 +48,29 @@ #include -#include "xmpp/chat_session.h" +#include "profanity.h" +#include "log.h" +#include "common.h" #include "command/cmd_defs.h" #include "command/cmd_funcs.h" #include "command/cmd_ac.h" -#include "common.h" #include "config/accounts.h" #include "config/preferences.h" #include "config/theme.h" #include "config/tlscerts.h" #include "config/scripts.h" -#include "xmpp/contact.h" -#include "xmpp/roster_list.h" -#include "xmpp/jid.h" -#include "log.h" -#include "xmpp/muc.h" #include "plugins/plugins.h" -#include "profanity.h" #include "tools/autocomplete.h" #include "tools/parser.h" #include "tools/tinyurl.h" -#include "xmpp/xmpp.h" #include "ui/ui.h" #include "ui/window_list.h" +#include "xmpp/xmpp.h" +#include "xmpp/contact.h" +#include "xmpp/roster_list.h" +#include "xmpp/jid.h" +#include "xmpp/chat_session.h" +#include "xmpp/muc.h" #ifdef HAVE_LIBOTR #include "otr/otr.h" diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c index f68f725d..26b22c4f 100644 --- a/src/command/cmd_funcs.c +++ b/src/command/cmd_funcs.c @@ -49,41 +49,45 @@ #include #include -#include "xmpp/chat_session.h" +#include "profanity.h" +#include "log.h" +#include "common.h" #include "command/cmd_funcs.h" #include "command/cmd_defs.h" #include "command/cmd_ac.h" -#include "common.h" #include "config/accounts.h" #include "config/account.h" #include "config/preferences.h" #include "config/theme.h" #include "config/tlscerts.h" #include "config/scripts.h" -#include "xmpp/contact.h" -#include "xmpp/roster_list.h" -#include "xmpp/jid.h" -#include "log.h" -#include "xmpp/muc.h" -#ifdef HAVE_LIBOTR -#include "otr/otr.h" -#endif -#ifdef HAVE_LIBGPGME -#include "pgp/gpg.h" -#endif -#include "profanity.h" -#include "plugins/plugins.h" +#include "event/client_events.h" +#include "tools/http_upload.h" #include "tools/autocomplete.h" #include "tools/parser.h" #include "tools/tinyurl.h" -#include "xmpp/xmpp.h" +#include "plugins/plugins.h" #include "ui/ui.h" #include "ui/window_list.h" -#include "event/client_events.h" +#include "xmpp/xmpp.h" +#include "xmpp/contact.h" +#include "xmpp/roster_list.h" +#include "xmpp/jid.h" +#include "xmpp/muc.h" +#include "xmpp/chat_session.h" + +#ifdef HAVE_LIBOTR +#include "otr/otr.h" +#endif + +#ifdef HAVE_LIBGPGME +#include "pgp/gpg.h" +#endif + #ifdef HAVE_GTK #include "ui/tray.h" #endif -#include "tools/http_upload.h" + #ifdef HAVE_PYTHON #include "plugins/python_plugins.h" #endif diff --git a/src/common.c b/src/common.c index c12f184f..b7868c79 100644 --- a/src/common.c +++ b/src/common.c @@ -53,11 +53,9 @@ #include #endif -#include "tools/p_sha1.h" - #include "log.h" #include "common.h" - +#include "tools/p_sha1.h" struct curl_data_t { diff --git a/src/config/account.c b/src/config/account.c index 0a2c9132..879759f5 100644 --- a/src/config/account.c +++ b/src/config/account.c @@ -38,10 +38,10 @@ #include -#include "xmpp/jid.h" -#include "config/account.h" #include "common.h" #include "log.h" +#include "config/account.h" +#include "xmpp/jid.h" ProfAccount* account_new(const gchar *const name, const gchar *const jid, diff --git a/src/config/accounts.c b/src/config/accounts.c index c504b5d3..7f852e6f 100644 --- a/src/config/accounts.c +++ b/src/config/accounts.c @@ -41,12 +41,12 @@ #include "accounts.h" #include "common.h" +#include "log.h" #include "config/account.h" #include "config/conflists.h" -#include "xmpp/jid.h" -#include "log.h" #include "tools/autocomplete.h" #include "xmpp/xmpp.h" +#include "xmpp/jid.h" static gchar *accounts_loc; static GKeyFile *accounts; diff --git a/src/config/scripts.c b/src/config/scripts.c index 04c4c1cd..14f05f29 100644 --- a/src/config/scripts.c +++ b/src/config/scripts.c @@ -42,9 +42,9 @@ #include "common.h" #include "log.h" -#include "ui/window_list.h" #include "command/cmd_defs.h" #include "ui/ui.h" +#include "ui/window_list.h" #include "xmpp/xmpp.h" void diff --git a/src/config/theme.c b/src/config/theme.c index 6c47b9f0..0ba9c786 100644 --- a/src/config/theme.c +++ b/src/config/theme.c @@ -38,6 +38,7 @@ #include #include + #ifdef HAVE_NCURSESW_NCURSES_H #include #elif HAVE_NCURSES_H diff --git a/src/config/tlscerts.c b/src/config/tlscerts.c index ba59acfc..b51f5ff9 100644 --- a/src/config/tlscerts.c +++ b/src/config/tlscerts.c @@ -38,9 +38,9 @@ #include #include -#include "config/tlscerts.h" #include "log.h" #include "common.h" +#include "config/tlscerts.h" #include "tools/autocomplete.h" static gchar *tlscerts_loc; diff --git a/src/config/tlscerts.h b/src/config/tlscerts.h index 0001fc28..76b2a344 100644 --- a/src/config/tlscerts.h +++ b/src/config/tlscerts.h @@ -35,6 +35,8 @@ #ifndef CONFIG_TLSCERTS_H #define CONFIG_TLSCERTS_H +#include + typedef struct tls_cert_t { int version; char *serialnumber; diff --git a/src/event/client_events.c b/src/event/client_events.c index 4829133c..dd9c4432 100644 --- a/src/event/client_events.c +++ b/src/event/client_events.c @@ -38,15 +38,17 @@ #include #include "log.h" -#include "ui/ui.h" +#include "plugins/plugins.h" #include "ui/window_list.h" +#include "ui/ui.h" #include "xmpp/xmpp.h" #include "xmpp/roster_list.h" #include "xmpp/chat_session.h" -#include "plugins/plugins.h" + #ifdef HAVE_LIBOTR #include "otr/otr.h" #endif + #ifdef HAVE_LIBGPGME #include "pgp/gpg.h" #endif diff --git a/src/event/server_events.c b/src/event/server_events.c index 4adb3a2d..b8154b8e 100644 --- a/src/event/server_events.c +++ b/src/event/server_events.c @@ -38,22 +38,23 @@ #include #include -#include "xmpp/chat_session.h" +#include "profanity.h" #include "log.h" -#include "xmpp/muc.h" #include "config/preferences.h" +#include "config/tlscerts.h" #include "config/account.h" #include "config/scripts.h" -#include "xmpp/roster_list.h" +#include "event/client_events.h" #include "plugins/plugins.h" #include "ui/window_list.h" -#include "config/tlscerts.h" -#include "profanity.h" -#include "event/client_events.h" +#include "xmpp/muc.h" +#include "xmpp/chat_session.h" +#include "xmpp/roster_list.h" #ifdef HAVE_LIBOTR #include "otr/otr.h" #endif + #ifdef HAVE_LIBGPGME #include "pgp/gpg.h" #endif diff --git a/src/log.c b/src/log.c index 5e4e86da..363c1be7 100644 --- a/src/log.c +++ b/src/log.c @@ -44,7 +44,6 @@ #include "glib/gstdio.h" #include "log.h" - #include "common.h" #include "config/preferences.h" #include "xmpp/xmpp.h" diff --git a/src/log.h b/src/log.h index 531e44da..b065a448 100644 --- a/src/log.h +++ b/src/log.h @@ -35,7 +35,7 @@ #ifndef LOG_H #define LOG_H -#include "glib.h" +#include // log levels typedef enum { diff --git a/src/otr/otr.c b/src/otr/otr.c index 27bd171b..343bdcbc 100644 --- a/src/otr/otr.c +++ b/src/otr/otr.c @@ -38,16 +38,16 @@ #include #include +#include "log.h" +#include "config/preferences.h" #include "otr/otr.h" #include "otr/otrlib.h" -#include "log.h" -#include "xmpp/roster_list.h" -#include "ui/window_list.h" -#include "xmpp/contact.h" #include "ui/ui.h" -#include "xmpp/xmpp.h" -#include "config/preferences.h" +#include "ui/window_list.h" #include "xmpp/chat_session.h" +#include "xmpp/roster_list.h" +#include "xmpp/contact.h" +#include "xmpp/xmpp.h" #define PRESENCE_ONLINE 1 #define PRESENCE_OFFLINE 0 diff --git a/src/otr/otrlibv3.c b/src/otr/otrlibv3.c index 81b9cc5b..4f7a6135 100644 --- a/src/otr/otrlibv3.c +++ b/src/otr/otrlibv3.c @@ -35,10 +35,10 @@ #include #include -#include "ui/ui.h" -#include "window_list.h" #include "otr/otr.h" #include "otr/otrlib.h" +#include "ui/ui.h" +#include "ui/window_list.h" OtrlPolicy otrlib_policy(void) diff --git a/src/otr/otrlibv4.c b/src/otr/otrlibv4.c index 74166808..ab39e81c 100644 --- a/src/otr/otrlibv4.c +++ b/src/otr/otrlibv4.c @@ -36,11 +36,11 @@ #include #include -#include "ui/ui.h" -#include "ui/window_list.h" #include "log.h" #include "otr/otr.h" #include "otr/otrlib.h" +#include "ui/ui.h" +#include "ui/window_list.h" static GTimer *timer; static unsigned int current_interval; diff --git a/src/pgp/gpg.c b/src/pgp/gpg.c index b757abca..fb1f2db1 100644 --- a/src/pgp/gpg.c +++ b/src/pgp/gpg.c @@ -44,9 +44,9 @@ #include #include -#include "pgp/gpg.h" #include "log.h" #include "common.h" +#include "pgp/gpg.h" #include "tools/autocomplete.h" #include "ui/ui.h" diff --git a/src/plugins/api.c b/src/plugins/api.c index a0e69043..8ac4856f 100644 --- a/src/plugins/api.c +++ b/src/plugins/api.c @@ -38,7 +38,11 @@ #include +#include "profanity.h" #include "log.h" +#include "common.h" +#include "config/theme.h" +#include "command/cmd_defs.h" #include "event/server_events.h" #include "event/client_events.h" #include "plugins/callbacks.h" @@ -46,12 +50,8 @@ #include "plugins/themes.h" #include "plugins/settings.h" #include "plugins/disco.h" -#include "profanity.h" #include "ui/ui.h" -#include "config/theme.h" -#include "command/cmd_defs.h" #include "ui/window_list.h" -#include "common.h" void api_cons_alert(void) diff --git a/src/plugins/c_plugins.c b/src/plugins/c_plugins.c index b9fc74e9..c7f8fcdb 100644 --- a/src/plugins/c_plugins.c +++ b/src/plugins/c_plugins.c @@ -39,8 +39,8 @@ #include -#include "config/preferences.h" #include "log.h" +#include "config/preferences.h" #include "plugins/api.h" #include "plugins/callbacks.h" #include "plugins/plugins.h" diff --git a/src/plugins/callbacks.c b/src/plugins/callbacks.c index 0bcdd34b..40a35400 100644 --- a/src/plugins/callbacks.c +++ b/src/plugins/callbacks.c @@ -41,9 +41,8 @@ #include "plugins/plugins.h" #include "tools/autocomplete.h" #include "tools/parser.h" -#include "ui/window_list.h" - #include "ui/ui.h" +#include "ui/window_list.h" static GHashTable *p_commands = NULL; static GHashTable *p_timed_functions = NULL; diff --git a/src/plugins/plugins.c b/src/plugins/plugins.c index a90940e0..8e9b2d37 100644 --- a/src/plugins/plugins.c +++ b/src/plugins/plugins.c @@ -35,11 +35,10 @@ #include #include +#include "log.h" #include "config.h" #include "common.h" #include "config/preferences.h" -#include "log.h" -#include "xmpp/xmpp.h" #include "plugins/callbacks.h" #include "plugins/autocompleters.h" #include "plugins/api.h" @@ -47,6 +46,8 @@ #include "plugins/themes.h" #include "plugins/settings.h" #include "plugins/disco.h" +#include "ui/ui.h" +#include "xmpp/xmpp.h" #ifdef HAVE_PYTHON #include "plugins/python_plugins.h" @@ -58,8 +59,6 @@ #include "plugins/c_api.h" #endif -#include "ui/ui.h" - static GHashTable *plugins; void diff --git a/src/plugins/python_api.c b/src/plugins/python_api.c index ef6b9ccd..13b1f665 100644 --- a/src/plugins/python_api.c +++ b/src/plugins/python_api.c @@ -41,12 +41,12 @@ #include +#include "log.h" #include "plugins/api.h" #include "plugins/python_api.h" #include "plugins/python_plugins.h" #include "plugins/callbacks.h" #include "plugins/autocompleters.h" -#include "log.h" static char* _python_plugin_name(void); diff --git a/src/plugins/python_plugins.c b/src/plugins/python_plugins.c index 40046200..dc1c17f9 100644 --- a/src/plugins/python_plugins.c +++ b/src/plugins/python_plugins.c @@ -35,7 +35,6 @@ #include #include "config.h" - #include "config/preferences.h" #include "plugins/api.h" #include "plugins/callbacks.h" diff --git a/src/plugins/settings.c b/src/plugins/settings.c index d75152a8..df32b379 100644 --- a/src/plugins/settings.c +++ b/src/plugins/settings.c @@ -38,8 +38,8 @@ #include #include -#include "config/theme.h" #include "common.h" +#include "config/theme.h" static GKeyFile *settings; diff --git a/src/plugins/themes.c b/src/plugins/themes.c index 60e1f11a..cfa718cc 100644 --- a/src/plugins/themes.c +++ b/src/plugins/themes.c @@ -35,8 +35,8 @@ #include #include -#include "config/theme.h" #include "common.h" +#include "config/theme.h" static GKeyFile *themes; diff --git a/src/profanity.c b/src/profanity.c index 68f6bbb0..7d90c1c9 100644 --- a/src/profanity.c +++ b/src/profanity.c @@ -40,6 +40,7 @@ #ifdef HAVE_GTK #include "ui/tray.h" #endif + #include #include #include @@ -48,32 +49,35 @@ #include #include "profanity.h" -#include "xmpp/chat_session.h" -#include "xmpp/chat_state.h" +#include "common.h" +#include "log.h" +#include "config/tlscerts.h" #include "config/accounts.h" #include "config/preferences.h" #include "config/theme.h" +#include "config/tlscerts.h" #include "config/scripts.h" #include "command/cmd_defs.h" -#include "common.h" +#include "plugins/plugins.h" +#include "event/client_events.h" +#include "ui/ui.h" +#include "ui/window_list.h" +#include "xmpp/resource.h" +#include "xmpp/xmpp.h" +#include "xmpp/muc.h" +#include "xmpp/chat_session.h" +#include "xmpp/chat_state.h" #include "xmpp/contact.h" #include "xmpp/roster_list.h" -#include "config/tlscerts.h" -#include "log.h" -#include "xmpp/muc.h" -#include "plugins/plugins.h" + #ifdef HAVE_LIBOTR #include "otr/otr.h" #endif + #ifdef HAVE_LIBGPGME #include "pgp/gpg.h" #endif -#include "xmpp/resource.h" -#include "xmpp/xmpp.h" -#include "ui/ui.h" -#include "ui/window_list.h" -#include "event/client_events.h" -#include "config/tlscerts.h" + static void _check_autoaway(void); static void _init(char *log_level); diff --git a/src/profanity.h b/src/profanity.h index ef1f2ea1..94d7ef45 100644 --- a/src/profanity.h +++ b/src/profanity.h @@ -36,6 +36,7 @@ #define PROFANITY_H #include +#include void prof_run(char *log_level, char *account_name); diff --git a/src/tools/http_upload.c b/src/tools/http_upload.c index 835618ca..80b46c87 100644 --- a/src/tools/http_upload.c +++ b/src/tools/http_upload.c @@ -45,11 +45,11 @@ #include #include "profanity.h" +#include "event/client_events.h" +#include "tools/http_upload.h" +#include "config/preferences.h" #include "ui/ui.h" #include "ui/window.h" -#include "tools/http_upload.h" -#include "event/client_events.h" -#include "config/preferences.h" #define FALLBACK_MIMETYPE "application/octet-stream" #define FALLBACK_CONTENTTYPE_HEADER "Content-Type: application/octet-stream" diff --git a/src/tools/http_upload.h b/src/tools/http_upload.h index e3d6cb8a..217c1321 100644 --- a/src/tools/http_upload.h +++ b/src/tools/http_upload.h @@ -41,6 +41,7 @@ #include #include + #include "ui/win_types.h" typedef struct http_upload_t { diff --git a/src/ui/buffer.h b/src/ui/buffer.h index e37f58fa..19b7bfb7 100644 --- a/src/ui/buffer.h +++ b/src/ui/buffer.h @@ -35,11 +35,11 @@ #ifndef UI_BUFFER_H #define UI_BUFFER_H +#include + #include "config.h" #include "config/theme.h" -#include - typedef struct delivery_receipt_t { char *id; gboolean received; diff --git a/src/ui/console.c b/src/ui/console.c index 3122b2d6..600bbdf3 100644 --- a/src/ui/console.c +++ b/src/ui/console.c @@ -43,18 +43,18 @@ #include #endif -#include "command/cmd_defs.h" #include "common.h" #include "log.h" -#include "xmpp/muc.h" -#include "xmpp/roster_list.h" #include "config/preferences.h" #include "config/theme.h" -#include "ui/window.h" -#include "window_list.h" +#include "command/cmd_defs.h" +#include "ui/window_list.h" #include "ui/ui.h" +#include "ui/window.h" #include "ui/statusbar.h" #include "xmpp/xmpp.h" +#include "xmpp/muc.h" +#include "xmpp/roster_list.h" #ifdef HAVE_GIT_VERSION #include "gitversion.h" diff --git a/src/ui/core.c b/src/ui/core.c index cca836f7..2dad71fb 100644 --- a/src/ui/core.c +++ b/src/ui/core.c @@ -44,38 +44,40 @@ #include #include +#include + #ifdef HAVE_LIBXSS #include #endif -#include + #ifdef HAVE_NCURSESW_NCURSES_H #include #elif HAVE_NCURSES_H #include #endif -#include "xmpp/chat_session.h" +#include "log.h" +#include "common.h" #include "command/cmd_defs.h" #include "command/cmd_ac.h" -#include "common.h" #include "config/preferences.h" #include "config/theme.h" -#include "xmpp/contact.h" -#include "xmpp/roster_list.h" -#include "xmpp/jid.h" -#include "log.h" -#include "xmpp/muc.h" -#ifdef HAVE_LIBOTR -#include "otr/otr.h" -#endif #include "ui/ui.h" #include "ui/titlebar.h" #include "ui/statusbar.h" #include "ui/inputwin.h" #include "ui/window.h" -#include "window_list.h" +#include "ui/window_list.h" #include "xmpp/xmpp.h" -#include "plugins/plugins.h" +#include "xmpp/muc.h" +#include "xmpp/chat_session.h" +#include "xmpp/contact.h" +#include "xmpp/roster_list.h" +#include "xmpp/jid.h" + +#ifdef HAVE_LIBOTR +#include "otr/otr.h" +#endif static char *win_title; static int inp_size; diff --git a/src/ui/inputwin.c b/src/ui/inputwin.c index 1f5c69cc..fdfdb0ac 100644 --- a/src/ui/inputwin.c +++ b/src/ui/inputwin.c @@ -53,22 +53,22 @@ #include #endif -#include "command/cmd_ac.h" -#include "xmpp/chat_state.h" +#include "profanity.h" +#include "log.h" #include "common.h" +#include "command/cmd_ac.h" #include "config/accounts.h" #include "config/preferences.h" #include "config/theme.h" -#include "log.h" -#include "xmpp/muc.h" -#include "profanity.h" -#include "xmpp/roster_list.h" #include "ui/ui.h" #include "ui/statusbar.h" #include "ui/inputwin.h" #include "ui/window.h" -#include "window_list.h" +#include "ui/window_list.h" #include "xmpp/xmpp.h" +#include "xmpp/muc.h" +#include "xmpp/roster_list.h" +#include "xmpp/chat_state.h" static WINDOW *inp_win; static int pad_start = 0; diff --git a/src/ui/mucconfwin.c b/src/ui/mucconfwin.c index a52f2378..b31bb928 100644 --- a/src/ui/mucconfwin.c +++ b/src/ui/mucconfwin.c @@ -38,7 +38,7 @@ #include "ui/ui.h" #include "ui/window.h" #include "ui/win_types.h" -#include "window_list.h" +#include "ui/window_list.h" static void _mucconfwin_form_field(ProfWin *window, char *tag, FormField *field); diff --git a/src/ui/mucwin.c b/src/ui/mucwin.c index 08e9bb38..3f773431 100644 --- a/src/ui/mucwin.c +++ b/src/ui/mucwin.c @@ -38,12 +38,12 @@ #include #include -#include "ui/win_types.h" -#include "window_list.h" #include "log.h" #include "config/preferences.h" -#include "ui/window.h" #include "plugins/plugins.h" +#include "ui/window.h" +#include "ui/win_types.h" +#include "ui/window_list.h" void mucwin_role_change(ProfMucWin *mucwin, const char *const role, const char *const actor, const char *const reason) diff --git a/src/ui/notifier.c b/src/ui/notifier.c index f992729a..4c7bc8df 100644 --- a/src/ui/notifier.c +++ b/src/ui/notifier.c @@ -38,19 +38,21 @@ #include #include + #ifdef HAVE_LIBNOTIFY #include #endif + #ifdef PLATFORM_CYGWIN #include #endif #include "log.h" -#include "xmpp/muc.h" -#include "ui/ui.h" -#include "window_list.h" #include "config/preferences.h" +#include "ui/ui.h" +#include "ui/window_list.h" #include "xmpp/xmpp.h" +#include "xmpp/muc.h" static GTimer *remind_timer; diff --git a/src/ui/occupantswin.c b/src/ui/occupantswin.c index efa8146c..716ddda7 100644 --- a/src/ui/occupantswin.c +++ b/src/ui/occupantswin.c @@ -34,10 +34,10 @@ #include +#include "config/preferences.h" #include "ui/ui.h" #include "ui/window.h" -#include "window_list.h" -#include "config/preferences.h" +#include "ui/window_list.h" static void _occuptantswin_occupant(ProfLayoutSplit *layout, Occupant *occupant, gboolean showjid) diff --git a/src/ui/privwin.c b/src/ui/privwin.c index 716adf2d..1caf4845 100644 --- a/src/ui/privwin.c +++ b/src/ui/privwin.c @@ -36,12 +36,11 @@ #include #include +#include "config/preferences.h" #include "ui/win_types.h" #include "ui/window.h" #include "ui/titlebar.h" -#include "window_list.h" -#include "config/preferences.h" - +#include "ui/window_list.h" void privwin_incoming_msg(ProfPrivateWin *privatewin, const char *const message, GDateTime *timestamp) diff --git a/src/ui/rosterwin.c b/src/ui/rosterwin.c index 06d34894..690677cd 100644 --- a/src/ui/rosterwin.c +++ b/src/ui/rosterwin.c @@ -36,12 +36,12 @@ #include #include -#include "xmpp/contact.h" +#include "config/preferences.h" #include "ui/ui.h" #include "ui/window.h" -#include "window_list.h" -#include "config/preferences.h" +#include "ui/window_list.h" #include "xmpp/roster_list.h" +#include "xmpp/contact.h" typedef enum { ROSTER_CONTACT, diff --git a/src/ui/statusbar.c b/src/ui/statusbar.c index 36017168..af165908 100644 --- a/src/ui/statusbar.c +++ b/src/ui/statusbar.c @@ -45,10 +45,10 @@ #endif #include "config/theme.h" +#include "config/preferences.h" #include "ui/ui.h" #include "ui/statusbar.h" #include "ui/inputwin.h" -#include "config/preferences.h" #define TIME_CHECK 60000000 diff --git a/src/ui/titlebar.c b/src/ui/titlebar.c index 67764221..701c01c2 100644 --- a/src/ui/titlebar.c +++ b/src/ui/titlebar.c @@ -44,7 +44,7 @@ #include "ui/ui.h" #include "ui/titlebar.h" #include "ui/inputwin.h" -#include "window_list.h" +#include "ui/window_list.h" #include "ui/window.h" #include "xmpp/roster_list.h" #include "xmpp/chat_session.h" diff --git a/src/ui/tray.c b/src/ui/tray.c index 9011bec9..8471f039 100644 --- a/src/ui/tray.c +++ b/src/ui/tray.c @@ -39,10 +39,10 @@ #include #include -#include "tray.h" -#include "window_list.h" #include "log.h" #include "config/preferences.h" +#include "ui/tray.h" +#include "ui/window_list.h" static gboolean gtk_ready = FALSE; static GtkStatusIcon *prof_tray = NULL; diff --git a/src/ui/ui.h b/src/ui/ui.h index 3e4292c9..2683a32b 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -37,11 +37,12 @@ #include "config.h" +#include "config/tlscerts.h" +#include "config/account.h" #include "command/cmd_funcs.h" #include "ui/win_types.h" #include "xmpp/muc.h" -#include "config/tlscerts.h" -#include "config/account.h" + #ifdef HAVE_LIBOTR #include "otr/otr.h" #endif diff --git a/src/ui/win_types.h b/src/ui/win_types.h index b523ef2f..47bc7657 100644 --- a/src/ui/win_types.h +++ b/src/ui/win_types.h @@ -39,15 +39,16 @@ #include #include + #ifdef HAVE_NCURSESW_NCURSES_H #include #elif HAVE_NCURSES_H #include #endif +#include "tools/autocomplete.h" #include "ui/buffer.h" #include "xmpp/chat_state.h" -#include "tools/autocomplete.h" #define LAYOUT_SPLIT_MEMCHECK 12345671 #define PROFCHATWIN_MEMCHECK 22374522 diff --git a/src/ui/window.c b/src/ui/window.c index 9b210972..89e5f1ac 100644 --- a/src/ui/window.c +++ b/src/ui/window.c @@ -41,6 +41,7 @@ #include #include + #ifdef HAVE_NCURSESW_NCURSES_H #include #elif HAVE_NCURSES_H @@ -49,10 +50,10 @@ #include "config/theme.h" #include "config/preferences.h" -#include "xmpp/roster_list.h" #include "ui/ui.h" #include "ui/window.h" #include "xmpp/xmpp.h" +#include "xmpp/roster_list.h" #define CONS_WIN_TITLE "Profanity. Type /help for help information." #define XML_WIN_TITLE "XML Console" diff --git a/src/ui/window.h b/src/ui/window.h index c570e6c7..cc9ae8df 100644 --- a/src/ui/window.h +++ b/src/ui/window.h @@ -39,19 +39,19 @@ #include -#include "xmpp/contact.h" -#include "xmpp/muc.h" -#include "ui/ui.h" -#include "ui/buffer.h" -#include "xmpp/xmpp.h" -#include "xmpp/chat_state.h" - #ifdef HAVE_NCURSESW_NCURSES_H #include #elif HAVE_NCURSES_H #include #endif +#include "ui/ui.h" +#include "ui/buffer.h" +#include "xmpp/xmpp.h" +#include "xmpp/chat_state.h" +#include "xmpp/contact.h" +#include "xmpp/muc.h" + #define PAD_SIZE 1000 void win_move_to_end(ProfWin *window); diff --git a/src/ui/window_list.c b/src/ui/window_list.c index 1e5ff426..20994e34 100644 --- a/src/ui/window_list.c +++ b/src/ui/window_list.c @@ -41,14 +41,14 @@ #include #include "common.h" -#include "xmpp/roster_list.h" +#include "config/preferences.h" #include "config/theme.h" +#include "plugins/plugins.h" #include "ui/ui.h" #include "ui/statusbar.h" -#include "window_list.h" -#include "plugins/plugins.h" +#include "ui/window_list.h" #include "xmpp/xmpp.h" -#include "config/preferences.h" +#include "xmpp/roster_list.h" static GHashTable *windows; static int current; diff --git a/src/ui/xmlwin.c b/src/ui/xmlwin.c index 16246585..80870b46 100644 --- a/src/ui/xmlwin.c +++ b/src/ui/xmlwin.c @@ -36,7 +36,7 @@ #include #include "ui/win_types.h" -#include "window_list.h" +#include "ui/window_list.h" void xmlwin_show(ProfXMLWin *xmlwin, const char *const msg) diff --git a/src/xmpp/blocking.c b/src/xmpp/blocking.c index 39cfb65a..a5a920e4 100644 --- a/src/xmpp/blocking.c +++ b/src/xmpp/blocking.c @@ -38,6 +38,7 @@ #ifdef HAVE_LIBMESODE #include #endif + #ifdef HAVE_LIBSTROPHE #include #endif diff --git a/src/xmpp/bookmark.c b/src/xmpp/bookmark.c index 69c74b2e..940b7982 100644 --- a/src/xmpp/bookmark.c +++ b/src/xmpp/bookmark.c @@ -43,21 +43,22 @@ #ifdef HAVE_LIBMESODE #include #endif + #ifdef HAVE_LIBSTROPHE #include #endif #include "common.h" #include "log.h" -#include "muc.h" #include "event/server_events.h" +#include "plugins/plugins.h" +#include "ui/ui.h" #include "xmpp/connection.h" #include "xmpp/iq.h" #include "xmpp/stanza.h" #include "xmpp/xmpp.h" #include "xmpp/bookmark.h" -#include "ui/ui.h" -#include "plugins/plugins.h" +#include "xmpp/muc.h" #define BOOKMARK_TIMEOUT 5000 diff --git a/src/xmpp/capabilities.c b/src/xmpp/capabilities.c index 2a8aff0e..4d9c0a36 100644 --- a/src/xmpp/capabilities.c +++ b/src/xmpp/capabilities.c @@ -47,17 +47,18 @@ #ifdef HAVE_LIBMESODE #include #endif + #ifdef HAVE_LIBSTROPHE #include #endif #include "common.h" #include "log.h" +#include "plugins/plugins.h" #include "xmpp/xmpp.h" #include "xmpp/stanza.h" #include "xmpp/form.h" #include "xmpp/capabilities.h" -#include "plugins/plugins.h" static gchar *cache_loc; static GKeyFile *cache; diff --git a/src/xmpp/capabilities.h b/src/xmpp/capabilities.h index d5d3d777..71fc06f1 100644 --- a/src/xmpp/capabilities.h +++ b/src/xmpp/capabilities.h @@ -40,6 +40,7 @@ #ifdef HAVE_LIBMESODE #include #endif + #ifdef HAVE_LIBSTROPHE #include #endif diff --git a/src/xmpp/chat_session.c b/src/xmpp/chat_session.c index 7e844871..61d7018c 100644 --- a/src/xmpp/chat_session.c +++ b/src/xmpp/chat_session.c @@ -38,10 +38,10 @@ #include -#include "chat_session.h" -#include "config/preferences.h" #include "log.h" +#include "config/preferences.h" #include "xmpp/xmpp.h" +#include "xmpp/chat_session.h" static GHashTable *sessions; diff --git a/src/xmpp/chat_state.c b/src/xmpp/chat_state.c index 66c24265..ad78c3b9 100644 --- a/src/xmpp/chat_state.c +++ b/src/xmpp/chat_state.c @@ -37,12 +37,12 @@ #include -#include "chat_state.h" -#include "xmpp/chat_session.h" +#include "config/preferences.h" #include "ui/window_list.h" #include "ui/win_types.h" #include "xmpp/xmpp.h" -#include "config/preferences.h" +#include "xmpp/chat_state.h" +#include "xmpp/chat_session.h" #define PAUSED_TIMEOUT 10.0 #define INACTIVE_TIMEOUT 30.0 diff --git a/src/xmpp/connection.c b/src/xmpp/connection.c index c590b7ba..8a963bb4 100644 --- a/src/xmpp/connection.c +++ b/src/xmpp/connection.c @@ -41,6 +41,7 @@ #ifdef HAVE_LIBMESODE #include #endif + #ifdef HAVE_LIBSTROPHE #include #endif diff --git a/src/xmpp/contact.c b/src/xmpp/contact.c index 000d7668..d50af5cd 100644 --- a/src/xmpp/contact.c +++ b/src/xmpp/contact.c @@ -38,10 +38,10 @@ #include -#include "contact.h" #include "common.h" -#include "resource.h" #include "tools/autocomplete.h" +#include "xmpp/resource.h" +#include "xmpp/contact.h" struct p_contact_t { char *barejid; diff --git a/src/xmpp/contact.h b/src/xmpp/contact.h index 6a13d01e..8e71faef 100644 --- a/src/xmpp/contact.h +++ b/src/xmpp/contact.h @@ -35,8 +35,8 @@ #ifndef XMPP_CONTACT_H #define XMPP_CONTACT_H -#include "resource.h" #include "tools/autocomplete.h" +#include "xmpp/resource.h" typedef struct p_contact_t *PContact; diff --git a/src/xmpp/form.c b/src/xmpp/form.c index bc0c9da9..3619f95b 100644 --- a/src/xmpp/form.c +++ b/src/xmpp/form.c @@ -40,6 +40,7 @@ #ifdef HAVE_LIBMESODE #include #endif + #ifdef HAVE_LIBSTROPHE #include #endif diff --git a/src/xmpp/form.h b/src/xmpp/form.h index f9740d68..5ce9ce31 100644 --- a/src/xmpp/form.h +++ b/src/xmpp/form.h @@ -35,15 +35,16 @@ #ifndef XMPP_FORM_H #define XMPP_FORM_H -#include "xmpp/xmpp.h" - #ifdef HAVE_LIBMESODE #include #endif + #ifdef HAVE_LIBSTROPHE #include #endif +#include "xmpp/xmpp.h" + DataForm* form_create(xmpp_stanza_t *const stanza); xmpp_stanza_t* form_create_submission(DataForm *form); char* form_get_form_type_field(DataForm *form); diff --git a/src/xmpp/iq.c b/src/xmpp/iq.c index c5f75ed0..3a29fbfc 100644 --- a/src/xmpp/iq.c +++ b/src/xmpp/iq.c @@ -46,30 +46,31 @@ #ifdef HAVE_LIBMESODE #include #endif + #ifdef HAVE_LIBSTROPHE #include #endif -#include "log.h" -#include "muc.h" #include "profanity.h" -#include "ui/ui.h" -#include "ui/window_list.h" +#include "log.h" #include "config/preferences.h" #include "event/server_events.h" +#include "plugins/plugins.h" +#include "tools/http_upload.h" +#include "ui/ui.h" +#include "ui/window_list.h" +#include "xmpp/xmpp.h" +#include "xmpp/connection.h" +#include "xmpp/session.h" +#include "xmpp/iq.h" #include "xmpp/capabilities.h" #include "xmpp/blocking.h" #include "xmpp/session.h" #include "xmpp/stanza.h" #include "xmpp/form.h" -#include "roster_list.h" -#include "xmpp/xmpp.h" -#include "xmpp/connection.h" -#include "xmpp/session.h" -#include "xmpp/iq.h" +#include "xmpp/roster_list.h" #include "xmpp/roster.h" -#include "plugins/plugins.h" -#include "tools/http_upload.h" +#include "xmpp/muc.h" typedef struct p_room_info_data_t { char *room; diff --git a/src/xmpp/jid.c b/src/xmpp/jid.c index 1fe5d8f5..fb4361d7 100644 --- a/src/xmpp/jid.c +++ b/src/xmpp/jid.c @@ -37,9 +37,8 @@ #include -#include "jid.h" - #include "common.h" +#include "xmpp/jid.h" Jid* jid_create(const gchar *const str) diff --git a/src/xmpp/message.c b/src/xmpp/message.c index 9b485954..fc314e30 100644 --- a/src/xmpp/message.c +++ b/src/xmpp/message.c @@ -40,26 +40,27 @@ #ifdef HAVE_LIBMESODE #include #endif + #ifdef HAVE_LIBSTROPHE #include #endif -#include "chat_session.h" -#include "config/preferences.h" -#include "log.h" -#include "muc.h" #include "profanity.h" -#include "ui/ui.h" +#include "log.h" +#include "config/preferences.h" #include "event/server_events.h" +#include "pgp/gpg.h" +#include "plugins/plugins.h" +#include "ui/ui.h" +#include "xmpp/chat_session.h" +#include "xmpp/muc.h" #include "xmpp/session.h" #include "xmpp/message.h" #include "xmpp/roster.h" -#include "roster_list.h" +#include "xmpp/roster_list.h" #include "xmpp/stanza.h" #include "xmpp/connection.h" #include "xmpp/xmpp.h" -#include "pgp/gpg.h" -#include "plugins/plugins.h" static int _message_handler(xmpp_conn_t *const conn, xmpp_stanza_t *const stanza, void *const userdata); diff --git a/src/xmpp/muc.c b/src/xmpp/muc.c index 83766c80..b7c9884e 100644 --- a/src/xmpp/muc.c +++ b/src/xmpp/muc.c @@ -38,13 +38,13 @@ #include -#include "xmpp/contact.h" #include "common.h" -#include "xmpp/jid.h" #include "tools/autocomplete.h" #include "ui/ui.h" #include "ui/window_list.h" -#include "muc.h" +#include "xmpp/jid.h" +#include "xmpp/muc.h" +#include "xmpp/contact.h" typedef struct _muc_room_t { char *room; // e.g. test@conference.server diff --git a/src/xmpp/muc.h b/src/xmpp/muc.h index b5d9a38b..84be1dd2 100644 --- a/src/xmpp/muc.h +++ b/src/xmpp/muc.h @@ -37,10 +37,10 @@ #include -#include "xmpp/contact.h" -#include "xmpp/jid.h" #include "tools/autocomplete.h" #include "ui/win_types.h" +#include "xmpp/contact.h" +#include "xmpp/jid.h" typedef enum { MUC_ROLE_NONE, diff --git a/src/xmpp/presence.c b/src/xmpp/presence.c index eed95fe1..84f2873e 100644 --- a/src/xmpp/presence.c +++ b/src/xmpp/presence.c @@ -44,24 +44,25 @@ #ifdef HAVE_LIBMESODE #include #endif + #ifdef HAVE_LIBSTROPHE #include #endif +#include "profanity.h" +#include "log.h" #include "common.h" #include "config/preferences.h" -#include "log.h" -#include "muc.h" -#include "profanity.h" -#include "ui/ui.h" #include "event/server_events.h" +#include "plugins/plugins.h" +#include "ui/ui.h" #include "xmpp/connection.h" #include "xmpp/capabilities.h" #include "xmpp/session.h" #include "xmpp/stanza.h" #include "xmpp/iq.h" #include "xmpp/xmpp.h" -#include "plugins/plugins.h" +#include "xmpp/muc.h" static Autocomplete sub_requests_ac; diff --git a/src/xmpp/roster.c b/src/xmpp/roster.c index 0449499b..7955aef3 100644 --- a/src/xmpp/roster.c +++ b/src/xmpp/roster.c @@ -43,26 +43,26 @@ #ifdef HAVE_LIBMESODE #include #endif + #ifdef HAVE_LIBSTROPHE #include #endif -#include "log.h" -#include "plugins/plugins.h" #include "profanity.h" -#include "ui/ui.h" +#include "log.h" +#include "config/preferences.h" +#include "plugins/plugins.h" #include "event/server_events.h" #include "event/client_events.h" #include "tools/autocomplete.h" -#include "config/preferences.h" +#include "ui/ui.h" #include "xmpp/session.h" #include "xmpp/iq.h" #include "xmpp/connection.h" #include "xmpp/roster.h" -#include "roster_list.h" +#include "xmpp/roster_list.h" #include "xmpp/stanza.h" #include "xmpp/xmpp.h" -#include "plugins/plugins.h" // callback data for group commands typedef struct _group_data { diff --git a/src/xmpp/roster_list.c b/src/xmpp/roster_list.c index 789449c2..057146a2 100644 --- a/src/xmpp/roster_list.c +++ b/src/xmpp/roster_list.c @@ -39,12 +39,12 @@ #include #include -#include "roster_list.h" +#include "config/preferences.h" +#include "tools/autocomplete.h" +#include "xmpp/roster_list.h" #include "xmpp/resource.h" #include "xmpp/contact.h" #include "xmpp/jid.h" -#include "tools/autocomplete.h" -#include "config/preferences.h" typedef struct prof_roster_t { // contacts, indexed on barejid diff --git a/src/xmpp/session.c b/src/xmpp/session.c index 6dc94aef..5c9c3b4c 100644 --- a/src/xmpp/session.c +++ b/src/xmpp/session.c @@ -38,14 +38,11 @@ #include #include -#include "chat_session.h" +#include "profanity.h" +#include "log.h" #include "common.h" #include "config/preferences.h" -#include "jid.h" -#include "log.h" -#include "muc.h" #include "plugins/plugins.h" -#include "profanity.h" #include "event/server_events.h" #include "xmpp/bookmark.h" #include "xmpp/blocking.h" @@ -58,6 +55,9 @@ #include "xmpp/roster.h" #include "xmpp/stanza.h" #include "xmpp/xmpp.h" +#include "xmpp/muc.h" +#include "xmpp/chat_session.h" +#include "xmpp/jid.h" // for auto reconnect static struct { diff --git a/src/xmpp/session.h b/src/xmpp/session.h index dcd276b3..1bc67b63 100644 --- a/src/xmpp/session.h +++ b/src/xmpp/session.h @@ -35,16 +35,7 @@ #ifndef XMPP_SESSION_H #define XMPP_SESSION_H -#include "config.h" - -#ifdef HAVE_LIBMESODE -#include -#endif -#ifdef HAVE_LIBSTROPHE -#include -#endif - -#include "resource.h" +#include void session_login_success(gboolean secured); void session_login_failed(void); diff --git a/src/xmpp/stanza.c b/src/xmpp/stanza.c index 9174bcd2..971b7bfc 100644 --- a/src/xmpp/stanza.c +++ b/src/xmpp/stanza.c @@ -47,6 +47,7 @@ #ifdef HAVE_LIBMESODE #include #endif + #ifdef HAVE_LIBSTROPHE #include #endif @@ -58,8 +59,7 @@ #include "xmpp/capabilities.h" #include "xmpp/connection.h" #include "xmpp/form.h" - -#include "muc.h" +#include "xmpp/muc.h" #if 0 xmpp_stanza_t* diff --git a/src/xmpp/stanza.h b/src/xmpp/stanza.h index 49be2d56..bc649107 100644 --- a/src/xmpp/stanza.h +++ b/src/xmpp/stanza.h @@ -40,6 +40,7 @@ #ifdef HAVE_LIBMESODE #include #endif + #ifdef HAVE_LIBSTROPHE #include #endif diff --git a/src/xmpp/xmpp.h b/src/xmpp/xmpp.h index b883c139..c34ee60a 100644 --- a/src/xmpp/xmpp.h +++ b/src/xmpp/xmpp.h @@ -40,16 +40,17 @@ #ifdef HAVE_LIBMESODE #include #endif + #ifdef HAVE_LIBSTROPHE #include #endif #include "config/accounts.h" #include "config/tlscerts.h" -#include "contact.h" -#include "jid.h" #include "tools/autocomplete.h" #include "tools/http_upload.h" +#include "xmpp/contact.h" +#include "xmpp/jid.h" #define JABBER_PRIORITY_MIN -128 #define JABBER_PRIORITY_MAX 127