print_wchar uses wchar_printable, but this isn't needed -- all the
relevant cases are already handled by the 'switch'. This changes the
code to use gdb_iswprint, and removes a somewhat confusing comment
related to this code.
*need_escapep = false;
- /* iswprint implementation on Windows returns 1 for tab character.
- In order to avoid different printout on this host, we explicitly
- use wchar_printable function. */
+ /* If any additional cases are added to this switch block, then the
+ function wchar_printable will likely need updating too. */
switch (w)
{
case LCST ('\a'):
break;
default:
{
- if (wchar_printable (w) && (!need_escape || (!gdb_iswdigit (w)
- && w != LCST ('8')
- && w != LCST ('9'))))
+ if (gdb_iswprint (w) && (!need_escape || (!gdb_iswdigit (w)
+ && w != LCST ('8')
+ && w != LCST ('9'))))
{
gdb_wchar_t wchar = w;