summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier G <xavier.github@kindwolf.org>2016-05-13 01:26:33 +0200
committerXavier G <xavier.github@kindwolf.org>2016-05-13 01:26:33 +0200
commit5538578820550c1a62dc4d0e6451332229eeee75 (patch)
treefe7bfe41e28d86ddaf406423b3a0c025d780e328
parent2ba4b9d26afb87c2e661b1c07313ca78b3c5618e (diff)
downloadirssi-5538578820550c1a62dc4d0e6451332229eeee75.zip
Move utf8.{h,c} from fe-common/core to core.
-rw-r--r--src/core/Makefile.am1
-rw-r--r--src/core/utf8.c (renamed from src/fe-common/core/utf8.c)2
-rw-r--r--src/core/utf8.h (renamed from src/fe-common/core/utf8.h)3
-rw-r--r--src/core/wcwidth.c (renamed from src/fe-common/core/wcwidth.c)0
-rw-r--r--src/fe-common/core/Makefile.am5
-rw-r--r--src/fe-common/core/module.h2
-rw-r--r--src/fe-text/term.h2
7 files changed, 8 insertions, 7 deletions
diff --git a/src/core/Makefile.am b/src/core/Makefile.am
index fc32e17e..cc200034 100644
--- a/src/core/Makefile.am
+++ b/src/core/Makefile.am
@@ -44,6 +44,7 @@ libcore_a_SOURCES = \
settings.c \
signals.c \
special-vars.c \
+ utf8.c \
write-buffer.c
structure_headers = \
diff --git a/src/fe-common/core/utf8.c b/src/core/utf8.c
index 2d07ea8e..1ab6def9 100644
--- a/src/fe-common/core/utf8.c
+++ b/src/core/utf8.c
@@ -22,5 +22,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
+#include "utf8.h"
#include "module.h"
+#include "wcwidth.c"
diff --git a/src/fe-common/core/utf8.h b/src/core/utf8.h
index 3c15dc7d..63261a24 100644
--- a/src/fe-common/core/utf8.h
+++ b/src/core/utf8.h
@@ -8,6 +8,9 @@
#define is_big5_hi(hi) (0x81 <= (hi) && (hi) <= 0xFE)
#define is_big5(hi,lo) (is_big5_hi(hi) && is_big5_lo(lo))
+#include <glib.h>
+typedef guint32 unichar;
+
/* Returns width for character (0-2). */
int mk_wcwidth(unichar c);
diff --git a/src/fe-common/core/wcwidth.c b/src/core/wcwidth.c
index 80d20fa1..80d20fa1 100644
--- a/src/fe-common/core/wcwidth.c
+++ b/src/core/wcwidth.c
diff --git a/src/fe-common/core/Makefile.am b/src/fe-common/core/Makefile.am
index e755b510..63f91fa6 100644
--- a/src/fe-common/core/Makefile.am
+++ b/src/fe-common/core/Makefile.am
@@ -24,8 +24,6 @@ libfe_common_core_a_SOURCES = \
fe-queries.c \
fe-server.c \
fe-settings.c \
- utf8.c \
- wcwidth.c \
formats.c \
hilight-text.c \
keyboard.c \
@@ -62,6 +60,3 @@ pkginc_fe_common_core_HEADERS = \
window-items.h \
windows-layout.h \
fe-windows.h
-
-noinst_HEADERS = \
- utf8.h
diff --git a/src/fe-common/core/module.h b/src/fe-common/core/module.h
index 51b61b3e..db712ec7 100644
--- a/src/fe-common/core/module.h
+++ b/src/fe-common/core/module.h
@@ -2,7 +2,7 @@
#define MODULE_NAME "fe-common/core"
-typedef guint32 unichar;
+#include "utf8.h"
typedef struct {
time_t time;
char *nick;
diff --git a/src/fe-text/term.h b/src/fe-text/term.h
index 9b726d82..0c7847f6 100644
--- a/src/fe-text/term.h
+++ b/src/fe-text/term.h
@@ -27,7 +27,7 @@ typedef struct _TERM_WINDOW TERM_WINDOW;
#define TERM_TYPE_UTF8 1
#define TERM_TYPE_BIG5 2
-typedef guint32 unichar;
+#include "utf8.h"
extern TERM_WINDOW *root_window;
extern int term_width, term_height;