From 5538578820550c1a62dc4d0e6451332229eeee75 Mon Sep 17 00:00:00 2001 From: Xavier G Date: Fri, 13 May 2016 01:26:33 +0200 Subject: [PATCH] Move utf8.{h,c} from fe-common/core to core. --- src/core/Makefile.am | 1 + src/{fe-common => }/core/utf8.c | 2 ++ src/{fe-common => }/core/utf8.h | 3 +++ src/{fe-common => }/core/wcwidth.c | 0 src/fe-common/core/Makefile.am | 5 ----- src/fe-common/core/module.h | 2 +- src/fe-text/term.h | 2 +- 7 files changed, 8 insertions(+), 7 deletions(-) rename src/{fe-common => }/core/utf8.c (96%) rename src/{fe-common => }/core/utf8.h (93%) rename src/{fe-common => }/core/wcwidth.c (100%) 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 similarity index 96% rename from src/fe-common/core/utf8.c rename to 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 similarity index 93% rename from src/fe-common/core/utf8.h rename to 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 +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 similarity index 100% rename from src/fe-common/core/wcwidth.c rename to 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;