diff options
author | James Booth <boothj5@gmail.com> | 2012-08-26 01:50:50 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2012-08-26 01:50:50 +0100 |
commit | fe519410b1b3a176807f34c490b645c29f13d525 (patch) | |
tree | 86b54d8bf41cdf3a91aa18686dd70af0011e3aee /src | |
parent | 2bbac1c811ba017512349ff8170aa877b853b2a4 (diff) | |
download | profani-tty-fe519410b1b3a176807f34c490b645c29f13d525.tar.gz |
Tidied all includes
Diffstat (limited to 'src')
-rw-r--r-- | src/chat_log.c | 1 | ||||
-rw-r--r-- | src/chat_log.h | 2 | ||||
-rw-r--r-- | src/command.c | 8 | ||||
-rw-r--r-- | src/command.h | 2 | ||||
-rw-r--r-- | src/common.c | 8 | ||||
-rw-r--r-- | src/common.h | 16 | ||||
-rw-r--r-- | src/contact_list.c | 7 | ||||
-rw-r--r-- | src/contact_list.h | 2 | ||||
-rw-r--r-- | src/history.c | 3 | ||||
-rw-r--r-- | src/history.h | 1 | ||||
-rw-r--r-- | src/input_win.c | 9 | ||||
-rw-r--r-- | src/jabber.c | 10 | ||||
-rw-r--r-- | src/jabber.h | 16 | ||||
-rw-r--r-- | src/log.c | 2 | ||||
-rw-r--r-- | src/log.h | 2 | ||||
-rw-r--r-- | src/main.c | 4 | ||||
-rw-r--r-- | src/preferences.c | 3 | ||||
-rw-r--r-- | src/preferences.h | 1 | ||||
-rw-r--r-- | src/prof_autocomplete.c | 3 | ||||
-rw-r--r-- | src/profanity.c | 20 | ||||
-rw-r--r-- | src/tinyurl.c | 2 | ||||
-rw-r--r-- | src/tinyurl.h | 2 | ||||
-rw-r--r-- | src/title_bar.c | 3 | ||||
-rw-r--r-- | src/ui.h | 4 | ||||
-rw-r--r-- | src/windows.c | 11 |
25 files changed, 56 insertions, 86 deletions
diff --git a/src/chat_log.c b/src/chat_log.c index 1ef1a079..7c70c8a1 100644 --- a/src/chat_log.c +++ b/src/chat_log.c @@ -27,7 +27,6 @@ #include "chat_log.h" #include "common.h" -#include "common.h" #include "log.h" static GHashTable *logs; diff --git a/src/chat_log.h b/src/chat_log.h index 1cb38746..100786a6 100644 --- a/src/chat_log.h +++ b/src/chat_log.h @@ -23,8 +23,6 @@ #ifndef CHAT_LOG_H #define CHAT_LOG_H -#include <stdio.h> - typedef enum { IN, OUT diff --git a/src/command.c b/src/command.c index 0b021853..a34f6faa 100644 --- a/src/command.c +++ b/src/command.c @@ -20,19 +20,21 @@ * */ -#include <string.h> #include <stdlib.h> +#include <string.h> #include <glib.h> #include "command.h" +#include "common.h" +#include "contact_list.h" #include "history.h" #include "jabber.h" -#include "ui.h" +#include "log.h" #include "preferences.h" #include "prof_autocomplete.h" #include "tinyurl.h" -#include "log.h" +#include "ui.h" /* * Command structure diff --git a/src/command.h b/src/command.h index 7c5c6eb3..9f27debf 100644 --- a/src/command.h +++ b/src/command.h @@ -23,6 +23,8 @@ #ifndef COMMAND_H #define COMMAND_H +#include <glib.h> + // Command help strings struct cmd_help_t { const gchar *usage; diff --git a/src/common.c b/src/common.c index 064e032c..7873e812 100644 --- a/src/common.c +++ b/src/common.c @@ -20,14 +20,10 @@ * */ -#include <sys/types.h> -#include <sys/stat.h> -#include <stdlib.h> #include <errno.h> -#include <stdio.h> -#include <time.h> +#include <stdlib.h> #include <string.h> -#include <ctype.h> +#include <sys/stat.h> #include <glib.h> diff --git a/src/common.h b/src/common.h index 1061f27f..351aa230 100644 --- a/src/common.h +++ b/src/common.h @@ -25,22 +25,6 @@ #include <glib.h> -typedef enum { - JABBER_STARTED, - JABBER_CONNECTING, - JABBER_CONNECTED, - JABBER_DISCONNECTED -} jabber_conn_status_t; - -typedef enum { - PRESENCE_OFFLINE, - PRESENCE_ONLINE, - PRESENCE_AWAY, - PRESENCE_DND, - PRESENCE_CHAT, - PRESENCE_XA -} jabber_presence_t; - #if !GLIB_CHECK_VERSION(2,28,0) #define g_slist_free_full(items, free_func) p_slist_free_full(items, free_func) #endif diff --git a/src/contact_list.c b/src/contact_list.c index b244ac3e..328b8d04 100644 --- a/src/contact_list.c +++ b/src/contact_list.c @@ -20,14 +20,7 @@ * */ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include <glib.h> - #include "contact.h" -#include "contact_list.h" #include "prof_autocomplete.h" static PAutocomplete ac; diff --git a/src/contact_list.h b/src/contact_list.h index 7bae9d87..4790a286 100644 --- a/src/contact_list.h +++ b/src/contact_list.h @@ -25,8 +25,6 @@ #include <glib.h> -#include "contact.h" - void contact_list_init(void); void contact_list_clear(void); void reset_search_attempts(void); diff --git a/src/history.c b/src/history.c index e5362572..444ca210 100644 --- a/src/history.c +++ b/src/history.c @@ -20,9 +20,6 @@ * */ -#include <stdlib.h> -#include <string.h> - #include "prof_history.h" #define MAX_HISTORY 100 diff --git a/src/history.h b/src/history.h index a65ac397..982278a3 100644 --- a/src/history.h +++ b/src/history.h @@ -20,7 +20,6 @@ * */ - #ifndef HISTORY_H #define HISTORY_H diff --git a/src/input_win.c b/src/input_win.c index a79ed5c5..29d221c2 100644 --- a/src/input_win.c +++ b/src/input_win.c @@ -39,16 +39,17 @@ * cols : 4 */ -#include <string.h> #include <stdlib.h> +#include <string.h> #include <ncurses.h> -#include "ui.h" -#include "history.h" -#include "preferences.h" #include "common.h" #include "command.h" +#include "contact_list.h" +#include "history.h" +#include "preferences.h" +#include "ui.h" static WINDOW *inp_win; static int pad_start = 0; diff --git a/src/jabber.c b/src/jabber.c index 6d5a50b4..3af7f203 100644 --- a/src/jabber.c +++ b/src/jabber.c @@ -22,16 +22,16 @@ #include <string.h> #include <stdlib.h> + #include <strophe.h> -#include "jabber.h" -#include "common.h" -#include "log.h" #include "chat_log.h" -#include "contact_list.h" -#include "ui.h" #include "common.h" +#include "contact_list.h" +#include "jabber.h" +#include "log.h" #include "preferences.h" +#include "ui.h" #define PING_INTERVAL 120000 // 2 minutes diff --git a/src/jabber.h b/src/jabber.h index da6570b3..b717fe2d 100644 --- a/src/jabber.h +++ b/src/jabber.h @@ -23,7 +23,21 @@ #ifndef JABBER_H #define JABBER_H -#include "common.h" +typedef enum { + JABBER_STARTED, + JABBER_CONNECTING, + JABBER_CONNECTED, + JABBER_DISCONNECTED +} jabber_conn_status_t; + +typedef enum { + PRESENCE_OFFLINE, + PRESENCE_ONLINE, + PRESENCE_AWAY, + PRESENCE_DND, + PRESENCE_CHAT, + PRESENCE_XA +} jabber_presence_t; void jabber_init(const int disable_tls); jabber_conn_status_t jabber_connection_status(void); diff --git a/src/log.c b/src/log.c index 8b9fb5cf..2ecc08e4 100644 --- a/src/log.c +++ b/src/log.c @@ -25,8 +25,8 @@ #include "glib.h" -#include "log.h" #include "common.h" +#include "log.h" #define PROF "prof" diff --git a/src/log.h b/src/log.h index d8c09e14..1e297cc9 100644 --- a/src/log.h +++ b/src/log.h @@ -23,8 +23,6 @@ #ifndef LOG_H #define LOG_H -#include <stdio.h> - // log levels typedef enum { PROF_LEVEL_DEBUG, diff --git a/src/main.c b/src/main.c index 8c696fdc..7d4887ae 100644 --- a/src/main.c +++ b/src/main.c @@ -19,10 +19,8 @@ * along with Profanity. If not, see <http://www.gnu.org/licenses/>. * */ -#include <config.h> -#include <stdio.h> -#include <string.h> +#include <config.h> #include <glib.h> diff --git a/src/preferences.c b/src/preferences.c index 02b97a59..6620de6c 100644 --- a/src/preferences.c +++ b/src/preferences.c @@ -23,11 +23,10 @@ #include <stdlib.h> #include <string.h> -#include <ncurses.h> #include <glib.h> +#include <ncurses.h> #include "log.h" -#include "preferences.h" #include "prof_autocomplete.h" static GString *prefs_loc; diff --git a/src/preferences.h b/src/preferences.h index 2c644b9f..cad9bea0 100644 --- a/src/preferences.h +++ b/src/preferences.h @@ -24,6 +24,7 @@ #define PREFERENCES_H #include <glib.h> +#include <ncurses.h> void prefs_load(void); void prefs_close(void); diff --git a/src/prof_autocomplete.c b/src/prof_autocomplete.c index ba43aae7..c12e2df0 100644 --- a/src/prof_autocomplete.c +++ b/src/prof_autocomplete.c @@ -23,9 +23,6 @@ #include <stdlib.h> #include <string.h> -#include <glib.h> - -#include "common.h" #include "prof_autocomplete.h" struct p_autocomplete_t { diff --git a/src/profanity.c b/src/profanity.c index 66593b97..a1665271 100644 --- a/src/profanity.c +++ b/src/profanity.c @@ -20,23 +20,19 @@ * */ -#include <string.h> -#include <stdlib.h> -#include <stdio.h> +#include "config.h" -#include <glib.h> +#include <stdlib.h> +#include <string.h> -#include "config.h" -#include "profanity.h" -#include "log.h" #include "chat_log.h" -#include "history.h" -#include "ui.h" -#include "jabber.h" #include "command.h" -#include "preferences.h" +#include "common.h" #include "contact_list.h" -#include "tinyurl.h" +#include "history.h" +#include "log.h" +#include "preferences.h" +#include "ui.h" static log_level_t _get_log_level(char *log_level); gboolean _process_input(char *inp); diff --git a/src/tinyurl.c b/src/tinyurl.c index 666cf9a1..60ced9a1 100644 --- a/src/tinyurl.c +++ b/src/tinyurl.c @@ -23,9 +23,9 @@ #include <stdlib.h> #include <string.h> +#include <glib.h> #include <curl/curl.h> #include <curl/easy.h> -#include <glib.h> struct curl_data_t { diff --git a/src/tinyurl.h b/src/tinyurl.h index 98e74517..a36f2b51 100644 --- a/src/tinyurl.h +++ b/src/tinyurl.h @@ -20,5 +20,7 @@ * */ +#include <glib.h> + gboolean tinyurl_valid(char *url); char * tinyurl_get(char *url); diff --git a/src/title_bar.c b/src/title_bar.c index 5af45c94..17187f17 100644 --- a/src/title_bar.c +++ b/src/title_bar.c @@ -22,9 +22,6 @@ #include <stdlib.h> #include <string.h> -#include <ncurses.h> - -#include <glib.h> #include "common.h" #include "ui.h" diff --git a/src/ui.h b/src/ui.h index 0ba23dc8..28040448 100644 --- a/src/ui.h +++ b/src/ui.h @@ -23,10 +23,10 @@ #ifndef WINDOWS_H #define WINDOWS_h +#include <glib.h> #include <ncurses.h> -#include "common.h" -#include "contact_list.h" +#include "jabber.h" #define INP_WIN_MAX 1000 diff --git a/src/windows.c b/src/windows.c index afd88056..136d9d78 100644 --- a/src/windows.c +++ b/src/windows.c @@ -19,24 +19,23 @@ * along with Profanity. If not, see <http://www.gnu.org/licenses/>. * */ + #include "config.h" #include <string.h> -#include <stdlib.h> -#include <ncurses.h> #include <glib.h> #ifdef HAVE_LIBNOTIFY #include <libnotify/notify.h> #endif +#include <ncurses.h> -#include "ui.h" +#include "command.h" #include "common.h" #include "contact.h" -#include "command.h" -#include "preferences.h" -#include "tinyurl.h" #include "log.h" +#include "preferences.h" +#include "ui.h" #define CONS_WIN_TITLE "_cons" #define PAD_SIZE 200 |