[flac-dev] win_utf8_io, print_console and uint32_t

lvqcl lvqcl.mail at gmail.com
Fri Sep 12 11:48:12 PDT 2014


Currently it is required to include share/compat.h before inclusion
of share/win_utf8_io.h. That's because of print_console() declaration:
its 3rd argument have type 'uint32_t' which is defined in share/compat.h.

So share/win_utf8_io.h depends on share/compat.h which in turn
includes share/win_utf8_io.h. Not a problem but it's a bit ugly imho.

Actually, the 3rd argument of print_console() is always "wcslen(wout)",
and return type of wcslen() is size_t. So maybe it's better to change
the declaration of print_console() to this --

     int print_console(FILE *stream, const wchar_t *text, size_t len);

It will also allow to remove

     #include "share/compat.h"

line from win_utf8_io.c.


More information about the flac-dev mailing list