mirror of
https://github.com/profanity-im/profanity.git
synced 2025-01-03 14:57:42 -05:00
Tidied all includes
This commit is contained in:
parent
2bbac1c811
commit
fe519410b1
@ -27,7 +27,6 @@
|
||||
|
||||
#include "chat_log.h"
|
||||
#include "common.h"
|
||||
#include "common.h"
|
||||
#include "log.h"
|
||||
|
||||
static GHashTable *logs;
|
||||
|
@ -23,8 +23,6 @@
|
||||
#ifndef CHAT_LOG_H
|
||||
#define CHAT_LOG_H
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
typedef enum {
|
||||
IN,
|
||||
OUT
|
||||
|
@ -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
|
||||
|
@ -23,6 +23,8 @@
|
||||
#ifndef COMMAND_H
|
||||
#define COMMAND_H
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
// Command help strings
|
||||
struct cmd_help_t {
|
||||
const gchar *usage;
|
||||
|
@ -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>
|
||||
|
||||
|
16
src/common.h
16
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
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -20,9 +20,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "prof_history.h"
|
||||
|
||||
#define MAX_HISTORY 100
|
||||
|
@ -20,7 +20,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef HISTORY_H
|
||||
#define HISTORY_H
|
||||
|
||||
|
@ -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;
|
||||
|
10
src/jabber.c
10
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
|
||||
|
||||
|
16
src/jabber.h
16
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);
|
||||
|
@ -25,8 +25,8 @@
|
||||
|
||||
#include "glib.h"
|
||||
|
||||
#include "log.h"
|
||||
#include "common.h"
|
||||
#include "log.h"
|
||||
|
||||
#define PROF "prof"
|
||||
|
||||
|
@ -23,8 +23,6 @@
|
||||
#ifndef LOG_H
|
||||
#define LOG_H
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
// log levels
|
||||
typedef enum {
|
||||
PROF_LEVEL_DEBUG,
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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;
|
||||
|
@ -24,6 +24,7 @@
|
||||
#define PREFERENCES_H
|
||||
|
||||
#include <glib.h>
|
||||
#include <ncurses.h>
|
||||
|
||||
void prefs_load(void);
|
||||
void prefs_close(void);
|
||||
|
@ -23,9 +23,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
#include "common.h"
|
||||
#include "prof_autocomplete.h"
|
||||
|
||||
struct p_autocomplete_t {
|
||||
|
@ -20,23 +20,19 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
#include "config.h"
|
||||
#include "profanity.h"
|
||||
#include "log.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.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);
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -20,5 +20,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
gboolean tinyurl_valid(char *url);
|
||||
char * tinyurl_get(char *url);
|
||||
|
@ -22,9 +22,6 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ncurses.h>
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
#include "common.h"
|
||||
#include "ui.h"
|
||||
|
4
src/ui.h
4
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
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user