vlc | branch: master | Rafaël Carré <[email protected]> | Fri Dec  6 11:25:51 
2013 +0100| [45a833ffc7cfcad1e649010895aa3fd26f01ad24] | committer: Rafaël Carré

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.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=45a833ffc7cfcad1e649010895aa3fd26f01ad24
---

 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 4272f1d..55e1288 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,

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to