mirror of
https://github.com/irssi/irssi.git
synced 2026-08-23 10:32:31 +02:00
Move wcwidth.c and utf8.{h,c} to core.
This move makes sense since these files contain rather fundamental functions (fundamental here means that we shouldn't have had to implement them) which are required by other functions located in core/special-vars.c.
This commit is contained in:
parent
2b92e43d37
commit
e720a48ee9
7 changed files with 8 additions and 8 deletions
|
|
@ -44,6 +44,8 @@ libcore_a_SOURCES = \
|
|||
settings.c \
|
||||
signals.c \
|
||||
special-vars.c \
|
||||
utf8.c \
|
||||
wcwidth.c \
|
||||
write-buffer.c
|
||||
|
||||
structure_headers = \
|
||||
|
|
|
|||
|
|
@ -8,12 +8,14 @@
|
|||
#define is_big5_hi(hi) (0x81 <= (hi) && (hi) <= 0xFE)
|
||||
#define is_big5(hi,lo) (is_big5_hi(hi) && is_big5_lo(lo))
|
||||
|
||||
typedef guint32 unichar;
|
||||
|
||||
/* Returns width for character (0-2). */
|
||||
int mk_wcwidth(unichar c);
|
||||
|
||||
/* Return the number of columns occupied by a given string. */
|
||||
int get_utf8_char_width(const gchar *);
|
||||
int get_utf8_string_width(const gchar *);
|
||||
int get_utf8_string_width(const gchar *, int);
|
||||
int get_utf8_chars_for_width(const gchar *, unsigned int, int, unsigned int *);
|
||||
|
||||
#define unichar_isprint(c) (((c) & ~0x80) >= 32)
|
||||
|
|
@ -60,6 +60,7 @@
|
|||
*/
|
||||
|
||||
#include "module.h"
|
||||
#include "utf8.h"
|
||||
|
||||
struct interval {
|
||||
int first;
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#define MODULE_NAME "fe-common/core"
|
||||
|
||||
typedef guint32 unichar;
|
||||
#include "utf8.h"
|
||||
typedef struct {
|
||||
time_t time;
|
||||
char *nick;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue