From 45a833ffc7cfcad1e649010895aa3fd26f01ad24 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rafa=C3=ABl=20Carr=C3=A9?= Date: Fri, 6 Dec 2013 11:25:51 +0100 Subject: [PATCH] messages: Don't mix fprintf and utf8_fprintf On windows the latter uses the console API under the hood. This gives VLC output the same format on Linux and on Windows (tested with wine), rather than printing the pointer ID at the end of the line. --- src/misc/messages.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/misc/messages.c b/src/misc/messages.c index 4272f1d532..55e128856b 100644 --- a/src/misc/messages.c +++ b/src/misc/messages.c @@ -219,7 +219,7 @@ static void PrintColorMsg (void *d, int type, const vlc_log_t *p_item, int canc = vlc_savecancel (); flockfile (stream); - fprintf (stream, "["GREEN"%0*"PRIxPTR""GRAY"] ", ptr_width, p_item->i_object_id); + utf8_fprintf (stream, "["GREEN"%0*"PRIxPTR""GRAY"] ", ptr_width, p_item->i_object_id); if (p_item->psz_header != NULL) utf8_fprintf (stream, "[%s] ", p_item->psz_header); utf8_fprintf (stream, "%s %s%s: %s", p_item->psz_module, @@ -245,7 +245,7 @@ static void PrintMsg (void *d, int type, const vlc_log_t *p_item, int canc = vlc_savecancel (); flockfile (stream); - fprintf (stream, "[%0*"PRIxPTR"] ", ptr_width, p_item->i_object_id); + utf8_fprintf (stream, "[%0*"PRIxPTR"] ", ptr_width, p_item->i_object_id); if (p_item->psz_header != NULL) utf8_fprintf (stream, "[%s] ", p_item->psz_header); utf8_fprintf (stream, "%s %s%s: ", p_item->psz_module, -- 2.11.4.GIT