Sorry for the typos in the previous post, and I apologize if I
misrepresent anyone or anything.

>> If this is too specialized to go into gnulib, would it be easy for a
>> project to use its own replacement functions instead of the ones from
>> gnulib?

For this, can't the caller (info-utils.c) simply do "#undef wcwidth"
after including <wchar.h>?  Though perhaps it might not work with C++.

>>   int
>> ! wcwidth_given_encoding (wchar_t wc, const char *encoding)
>
> This will make consumers to replace all wcwidth calls with this new
> function, which is good as a short-term solution and breaks consistency
> with other similar functions, like mbrtowc.

"not good", I meant.  In addition to the above reasons, the name sounds
that it's leaking the implementation detail, unless it is documented
(e.g. "ENCODING is only used as a hint for performance").

Regards,
--
Daiki Ueno

Reply via email to