From 732533ee5ab58a6f0da2d90423d54e9e4520db04 Mon Sep 17 00:00:00 2001 From: James Booth Date: Mon, 15 Jun 2015 17:11:11 +0100 Subject: I removed ncurses header dependencies, removed unused code --- src/common.c | 12 ------------ src/common.h | 7 ------- src/config/preferences.c | 6 ------ src/config/preferences.h | 5 ----- src/config/theme.h | 5 ----- src/ui/ui.h | 5 ----- src/ui/window.h | 12 ++++++------ src/ui/windows.c | 6 ------ 8 files changed, 6 insertions(+), 52 deletions(-) (limited to 'src') diff --git a/src/common.c b/src/common.c index 4fa45608..832e85dd 100644 --- a/src/common.c +++ b/src/common.c @@ -253,18 +253,6 @@ utf8_display_len(const char * const str) return len; } -gboolean -utf8_is_printable(const wint_t ch) -{ - char bytes[MB_CUR_MAX+1]; - size_t utf_len = wcrtomb(bytes, ch, NULL); - bytes[utf_len] = '\0'; - - gunichar unichar = g_utf8_get_char(bytes); - - return g_unichar_isprint(unichar) && (ch != KEY_MOUSE); -} - char * prof_getline(FILE *stream) { diff --git a/src/common.h b/src/common.h index c1aa532d..9da0c974 100644 --- a/src/common.h +++ b/src/common.h @@ -38,12 +38,6 @@ #include #include -#ifdef HAVE_NCURSESW_NCURSES_H -#include -#elif HAVE_NCURSES_H -#include -#endif - #include #if !GLIB_CHECK_VERSION(2,28,0) @@ -113,7 +107,6 @@ char * str_replace(const char *string, const char *substr, int str_contains(const char str[], int size, char ch); gboolean strtoi_range(char *str, int *saveptr, int min, int max, char **err_msg); int utf8_display_len(const char * const str); -gboolean utf8_is_printable(const wint_t ch); char * prof_getline(FILE *stream); char* release_get_latest(void); gboolean release_is_new(char *found_version); diff --git a/src/config/preferences.c b/src/config/preferences.c index 36250cd8..62e2522b 100644 --- a/src/config/preferences.c +++ b/src/config/preferences.c @@ -41,12 +41,6 @@ #include #include -#ifdef HAVE_NCURSESW_NCURSES_H -#include -#elif HAVE_NCURSES_H -#include -#endif - #include "common.h" #include "log.h" #include "preferences.h" diff --git a/src/config/preferences.h b/src/config/preferences.h index d1faca63..273ce6bb 100644 --- a/src/config/preferences.h +++ b/src/config/preferences.h @@ -38,11 +38,6 @@ #include "config.h" #include -#ifdef HAVE_NCURSESW_NCURSES_H -#include -#elif HAVE_NCURSES_H -#include -#endif #define PREFS_MIN_LOG_SIZE 64 #define PREFS_MAX_LOG_SIZE 1048580 diff --git a/src/config/theme.h b/src/config/theme.h index 13099eb4..2ddbb17b 100644 --- a/src/config/theme.h +++ b/src/config/theme.h @@ -38,11 +38,6 @@ #include "config.h" #include -#ifdef HAVE_NCURSESW_NCURSES_H -#include -#elif HAVE_NCURSES_H -#include -#endif typedef enum { THEME_TEXT, diff --git a/src/ui/ui.h b/src/ui/ui.h index 29ee6bef..7a2c956b 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -40,11 +40,6 @@ #include #include -#ifdef HAVE_NCURSESW_NCURSES_H -#include -#elif HAVE_NCURSES_H -#include -#endif #include "contact.h" #include "jid.h" diff --git a/src/ui/window.h b/src/ui/window.h index 06fbf7b5..e4d9ca33 100644 --- a/src/ui/window.h +++ b/src/ui/window.h @@ -39,18 +39,18 @@ #include -#ifdef HAVE_NCURSESW_NCURSES_H -#include -#elif HAVE_NCURSES_H -#include -#endif - #include "contact.h" #include "muc.h" #include "ui/buffer.h" #include "xmpp/xmpp.h" #include "chat_state.h" +#ifdef HAVE_NCURSESW_NCURSES_H +#include +#elif HAVE_NCURSES_H +#include +#endif + #define NO_ME 1 #define NO_DATE 2 #define NO_EOL 4 diff --git a/src/ui/windows.c b/src/ui/windows.c index 2334efc8..38c7079a 100644 --- a/src/ui/windows.c +++ b/src/ui/windows.c @@ -40,12 +40,6 @@ #include -#ifdef HAVE_NCURSESW_NCURSES_H -#include -#elif HAVE_NCURSES_H -#include -#endif - #include "common.h" #include "roster_list.h" #include "config/theme.h" -- cgit 1.4.1-2-gfad0