diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2006-11-08 07:54:33 +0000 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2006-11-08 07:54:33 +0000 |
commit | c20ce83d20526e24601c6c8acabc7a61ab3c3a78 (patch) | |
tree | a8e1b79498ef7cd410176680d9bfb585270aa576 /src/gui/curses/gui-curses-window.c | |
parent | b5a7d8e99e372378cb47069a3d2ad0bf65ccc530 (diff) | |
download | weechat-c20ce83d20526e24601c6c8acabc7a61ab3c3a78.zip |
Added charset plugin (WeeChat is now full UTF-8 for internal data storage), fixed compilation problems with FreeBSD, fixed status bar display bug
Diffstat (limited to 'src/gui/curses/gui-curses-window.c')
-rw-r--r-- | src/gui/curses/gui-curses-window.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/gui/curses/gui-curses-window.c b/src/gui/curses/gui-curses-window.c index ac2d2d7c9..5794e771e 100644 --- a/src/gui/curses/gui-curses-window.c +++ b/src/gui/curses/gui-curses-window.c @@ -25,6 +25,7 @@ #endif #include <stdlib.h> +#include <stdarg.h> #include <string.h> #include <signal.h> #include <libgen.h> @@ -33,6 +34,7 @@ #include "../gui.h" #include "../../common/hotlist.h" #include "../../common/log.h" +#include "../../common/util.h" #include "../../common/weeconfig.h" #include "gui-curses.h" @@ -131,6 +133,27 @@ gui_window_objects_free (t_gui_window *window, int free_separator) } /* + * gui_window_wprintw: decode then display string with wprintw + */ + +void +gui_window_wprintw (WINDOW *window, char *data, ...) +{ + va_list argptr; + static char buf[4096]; + char *buf2; + + va_start (argptr, data); + vsnprintf (buf, sizeof (buf) - 1, data, argptr); + va_end (argptr); + + buf2 = weechat_iconv_from_internal (NULL, buf); + wprintw (window, "%s", (buf2) ? buf2 : buf); + if (buf2) + free (buf2); +} + +/* * gui_window_curses_clear: clear a Curses window */ |