diff options
author | Kalle Wallin <kaw@linux.se> | 2005-06-11 09:14:52 +0000 |
---|---|---|
committer | Kalle Wallin <kaw@linux.se> | 2005-06-11 09:14:52 +0000 |
commit | aa1b75b13528c723952cc1c0cd0ca078bbaddbe4 (patch) | |
tree | 0f292ffb5c3da0ab9f6d48fea22d48c3fb3f50a9 /src/support.c | |
parent | 38880bd748572c2f3b05c6625ab1029ece2483c4 (diff) | |
download | mpd-aa1b75b13528c723952cc1c0cd0ca078bbaddbe4.tar.gz mpd-aa1b75b13528c723952cc1c0cd0ca078bbaddbe4.tar.xz mpd-aa1b75b13528c723952cc1c0cd0ca078bbaddbe4.zip |
support wide-char ncurses library (ncursesw)
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@3325 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/support.c')
-rw-r--r-- | src/support.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/support.c b/src/support.c index 254c15eb1..ade5ee4eb 100644 --- a/src/support.c +++ b/src/support.c @@ -35,6 +35,15 @@ extern void screen_status_printf(char *format, ...); static gboolean noconvert = TRUE; +size_t +my_strlen(char *str) +{ + if( g_utf8_validate(str,-1,NULL) ) + return g_utf8_strlen(str,-1); + else + return strlen(str); +} + char * remove_trailing_slash(char *path) { @@ -136,7 +145,6 @@ strscroll(char *str, char *separator, int width, scroll_state_t *st) } - void charset_init(gboolean disable) { |