1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

I removed ncurses header dependencies, removed unused code

This commit is contained in:
James Booth 2015-06-15 17:11:11 +01:00
parent a780168566
commit 732533ee5a
8 changed files with 6 additions and 52 deletions

View File

@ -253,18 +253,6 @@ utf8_display_len(const char * const str)
return len; 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 * char *
prof_getline(FILE *stream) prof_getline(FILE *stream)
{ {

View File

@ -38,12 +38,6 @@
#include <stdio.h> #include <stdio.h>
#include <wchar.h> #include <wchar.h>
#ifdef HAVE_NCURSESW_NCURSES_H
#include <ncursesw/ncurses.h>
#elif HAVE_NCURSES_H
#include <ncurses.h>
#endif
#include <glib.h> #include <glib.h>
#if !GLIB_CHECK_VERSION(2,28,0) #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); int str_contains(const char str[], int size, char ch);
gboolean strtoi_range(char *str, int *saveptr, int min, int max, char **err_msg); gboolean strtoi_range(char *str, int *saveptr, int min, int max, char **err_msg);
int utf8_display_len(const char * const str); int utf8_display_len(const char * const str);
gboolean utf8_is_printable(const wint_t ch);
char * prof_getline(FILE *stream); char * prof_getline(FILE *stream);
char* release_get_latest(void); char* release_get_latest(void);
gboolean release_is_new(char *found_version); gboolean release_is_new(char *found_version);

View File

@ -41,12 +41,6 @@
#include <glib.h> #include <glib.h>
#include <glib/gstdio.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 "common.h"
#include "log.h" #include "log.h"
#include "preferences.h" #include "preferences.h"

View File

@ -38,11 +38,6 @@
#include "config.h" #include "config.h"
#include <glib.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_MIN_LOG_SIZE 64
#define PREFS_MAX_LOG_SIZE 1048580 #define PREFS_MAX_LOG_SIZE 1048580

View File

@ -38,11 +38,6 @@
#include "config.h" #include "config.h"
#include <glib.h> #include <glib.h>
#ifdef HAVE_NCURSESW_NCURSES_H
#include <ncursesw/ncurses.h>
#elif HAVE_NCURSES_H
#include <ncurses.h>
#endif
typedef enum { typedef enum {
THEME_TEXT, THEME_TEXT,

View File

@ -40,11 +40,6 @@
#include <wchar.h> #include <wchar.h>
#include <glib.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 "contact.h"
#include "jid.h" #include "jid.h"

View File

@ -39,18 +39,18 @@
#include <wchar.h> #include <wchar.h>
#ifdef HAVE_NCURSESW_NCURSES_H
#include <ncursesw/ncurses.h>
#elif HAVE_NCURSES_H
#include <ncurses.h>
#endif
#include "contact.h" #include "contact.h"
#include "muc.h" #include "muc.h"
#include "ui/buffer.h" #include "ui/buffer.h"
#include "xmpp/xmpp.h" #include "xmpp/xmpp.h"
#include "chat_state.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_ME 1
#define NO_DATE 2 #define NO_DATE 2
#define NO_EOL 4 #define NO_EOL 4

View File

@ -40,12 +40,6 @@
#include <glib.h> #include <glib.h>
#ifdef HAVE_NCURSESW_NCURSES_H
#include <ncursesw/ncurses.h>
#elif HAVE_NCURSES_H
#include <ncurses.h>
#endif
#include "common.h" #include "common.h"
#include "roster_list.h" #include "roster_list.h"
#include "config/theme.h" #include "config/theme.h"