Commit 45a833ff authored by Rafaël Carré's avatar 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.
parent b130680e
...@@ -219,7 +219,7 @@ static void PrintColorMsg (void *d, int type, const vlc_log_t *p_item, ...@@ -219,7 +219,7 @@ static void PrintColorMsg (void *d, int type, const vlc_log_t *p_item,
int canc = vlc_savecancel (); int canc = vlc_savecancel ();
flockfile (stream); 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) if (p_item->psz_header != NULL)
utf8_fprintf (stream, "[%s] ", p_item->psz_header); utf8_fprintf (stream, "[%s] ", p_item->psz_header);
utf8_fprintf (stream, "%s %s%s: %s", p_item->psz_module, 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, ...@@ -245,7 +245,7 @@ static void PrintMsg (void *d, int type, const vlc_log_t *p_item,
int canc = vlc_savecancel (); int canc = vlc_savecancel ();
flockfile (stream); 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) if (p_item->psz_header != NULL)
utf8_fprintf (stream, "[%s] ", p_item->psz_header); utf8_fprintf (stream, "[%s] ", p_item->psz_header);
utf8_fprintf (stream, "%s %s%s: ", p_item->psz_module, utf8_fprintf (stream, "%s %s%s: ", p_item->psz_module,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment