aboutsummaryrefslogtreecommitdiffstats
path: root/src/screen_utils.c
diff options
context:
space:
mode:
authorKalle Wallin <kaw@linux.se>2004-07-13 21:10:06 +0000
committerKalle Wallin <kaw@linux.se>2004-07-13 21:10:06 +0000
commit9a500d13055f16b70796a5fce5ec6de4a2844187 (patch)
tree8f57c14c8454ee836597cc47ed7eedd3b6f4dabe /src/screen_utils.c
parente9f21b11c862ad168bb5a850730861e01ad6f3d8 (diff)
downloadmpd-9a500d13055f16b70796a5fce5ec6de4a2844187.tar.gz
mpd-9a500d13055f16b70796a5fce5ec6de4a2844187.tar.xz
mpd-9a500d13055f16b70796a5fce5ec6de4a2844187.zip
Use glib's str functions (g_strlcat, g_strlcpy, g_snprintf, g_strdup_vprintf)
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1868 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/screen_utils.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/screen_utils.c b/src/screen_utils.c
index 9870fc33a..baa371be1 100644
--- a/src/screen_utils.c
+++ b/src/screen_utils.c
@@ -223,13 +223,14 @@ set_xterm_title(char *format, ...)
{
if( g_getenv("WINDOWID") )
{
- char buffer[512];
+ char *msg;
va_list ap;
va_start(ap,format);
- vsnprintf(buffer,sizeof(buffer),format,ap);
+ msg = g_strdup_vprintf(format,ap);
va_end(ap);
- printf("%c]0;%s%c", '\033', buffer, '\007');
+ printf("%c]0;%s%c", '\033', msg, '\007');
+ g_free(msg);
}
else
options.enable_xterm_title = FALSE;