From 7989265fa018343666b73eb9339fe73e8421c1a4 Mon Sep 17 00:00:00 2001 From: Keith Winstein Date: Tue, 1 Feb 2011 06:11:35 -0500 Subject: [PATCH] Use iswprint() instead of isprint() --- parse.cpp | 2 +- parseraction.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/parse.cpp b/parse.cpp index 637d4f8..d43c19f 100644 --- a/parse.cpp +++ b/parse.cpp @@ -168,7 +168,7 @@ int vt_parser( int fd, Parser::UTF8Parser *parser ) assert( act ); if ( act->char_present ) { - if ( isprint( act->ch ) ) { + if ( iswprint( act->ch ) ) { printf( "%s(0x%02x=%lc) ", act->name().c_str(), act->ch, act->ch ); } else { printf( "%s(0x%02x) ", act->name().c_str(), act->ch ); diff --git a/parseraction.cpp b/parseraction.cpp index ef7fb64..9d1326e 100644 --- a/parseraction.cpp +++ b/parseraction.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include "parseraction.hpp" #include "terminal.hpp" @@ -10,7 +10,7 @@ std::string Action::str( void ) { char thechar[ 10 ] = { 0 }; if ( char_present ) { - snprintf( thechar, 10, isprint( ch ) ? "(%lc)" : "(0x%x)", ch ); + snprintf( thechar, 10, iswprint( ch ) ? "(%lc)" : "(0x%x)", ch ); } return name() + std::string( thechar );