aboutsummaryrefslogtreecommitdiffstats
path: root/src/wreadln.c
diff options
context:
space:
mode:
authorKalle Wallin <kaw@linux.se>2005-06-11 09:14:52 +0000
committerKalle Wallin <kaw@linux.se>2005-06-11 09:14:52 +0000
commitaa1b75b13528c723952cc1c0cd0ca078bbaddbe4 (patch)
tree0f292ffb5c3da0ab9f6d48fea22d48c3fb3f50a9 /src/wreadln.c
parent38880bd748572c2f3b05c6625ab1029ece2483c4 (diff)
downloadmpd-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 '')
-rw-r--r--src/wreadln.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/wreadln.c b/src/wreadln.c
index 930cb5429..d817ee628 100644
--- a/src/wreadln.c
+++ b/src/wreadln.c
@@ -44,6 +44,7 @@ wrln_gcmp_pre_cb_t wrln_pre_completion_callback = NULL;
wrln_gcmp_post_cb_t wrln_post_completion_callback = NULL;
extern void screen_bell(void);
+extern size_t my_strlen(char *str);
gchar *
wreadln(WINDOW *w,
@@ -61,7 +62,7 @@ wreadln(WINDOW *w,
/* move the cursor one step to the right */
void cursor_move_right(void) {
- if( cursor < strlen(line) && cursor<wrln_max_line_size-1 )
+ if( cursor < my_strlen(line) && cursor<wrln_max_line_size-1 )
{
cursor++;
if( cursor+x0 >= x1 && start<cursor-width+1)
@@ -79,7 +80,7 @@ wreadln(WINDOW *w,
}
/* move the cursor to the end of the line */
void cursor_move_to_eol(void) {
- cursor = strlen(line);
+ cursor = my_strlen(line);
if( cursor+x0 >= x1 )
start = cursor-width+1;
}
@@ -247,7 +248,7 @@ wreadln(WINDOW *w,
break;
case KEY_DC: /* handle delete key. As above */
case KEY_CTRL_D:
- if( cursor <= strlen(line) - 1 )
+ if( cursor <= my_strlen(line) - 1 )
{
for (i = cursor; line[i] != 0; i++)
line[i] = line[i + 1];