aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2015-06-15 17:11:11 +0100
committerJames Booth <boothj5@gmail.com>2015-06-15 17:11:11 +0100
commit732533ee5ab58a6f0da2d90423d54e9e4520db04 (patch)
treee68b14fa06cb62148feebc024546f36bd34f77eb /src
parenta780168566eb4594b811c3324ff2456a9ba1358d (diff)
downloadprofani-tty-732533ee5ab58a6f0da2d90423d54e9e4520db04.tar.gz
I removed ncurses header dependencies, removed unused code
Diffstat (limited to 'src')
-rw-r--r--src/common.c12
-rw-r--r--src/common.h7
-rw-r--r--src/config/preferences.c6
-rw-r--r--src/config/preferences.h5
-rw-r--r--src/config/theme.h5
-rw-r--r--src/ui/ui.h5
-rw-r--r--src/ui/window.h12
-rw-r--r--src/ui/windows.c6
8 files changed, 6 insertions, 52 deletions
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 <stdio.h>
#include <wchar.h>
-#ifdef HAVE_NCURSESW_NCURSES_H
-#include <ncursesw/ncurses.h>
-#elif HAVE_NCURSES_H
-#include <ncurses.h>
-#endif
-
#include <glib.h>
#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 <glib.h>
#include <glib/gstdio.h>
-#ifdef HAVE_NCURSESW_NCURSES_H
-#include <ncursesw/ncurses.h>
-#elif HAVE_NCURSES_H
-#include <ncurses.h>
-#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 <glib.h>
-#ifdef HAVE_NCURSESW_NCURSES_H
-#include <ncursesw/ncurses.h>
-#elif HAVE_NCURSES_H
-#include <ncurses.h>
-#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 <glib.h>
-#ifdef HAVE_NCURSESW_NCURSES_H
-#include <ncursesw/ncurses.h>
-#elif HAVE_NCURSES_H
-#include <ncurses.h>
-#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 <wchar.h>
#include <glib.h>
-#ifdef HAVE_NCURSESW_NCURSES_H
-#include <ncursesw/ncurses.h>
-#elif HAVE_NCURSES_H
-#include <ncurses.h>
-#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 <wchar.h>
-#ifdef HAVE_NCURSESW_NCURSES_H
-#include <ncursesw/ncurses.h>
-#elif HAVE_NCURSES_H
-#include <ncurses.h>
-#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 <ncursesw/ncurses.h>
+#elif HAVE_NCURSES_H
+#include <ncurses.h>
+#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 <glib.h>
-#ifdef HAVE_NCURSESW_NCURSES_H
-#include <ncursesw/ncurses.h>
-#elif HAVE_NCURSES_H
-#include <ncurses.h>
-#endif
-
#include "common.h"
#include "roster_list.h"
#include "config/theme.h"