diff --git a/src/qemu/qemu_agent.c b/src/qemu/qemu_agent.c index e6add56cd6..5fa8d24a91 100644 --- a/src/qemu/qemu_agent.c +++ b/src/qemu/qemu_agent.c @@ -146,7 +146,6 @@ VIR_ONCE_GLOBAL_INIT(qemuAgent); #if DEBUG_RAW_IO -# include static char * qemuAgentEscapeNonPrintable(const char *text) { @@ -155,7 +154,7 @@ qemuAgentEscapeNonPrintable(const char *text) for (i = 0; text[i] != '\0'; i++) { if (text[i] == '\\') virBufferAddLit(&buf, "\\\\"); - else if (c_isprint(text[i]) || text[i] == '\n' || + else if (g_ascii_isprint(text[i]) || text[i] == '\n' || (text[i] == '\r' && text[i+1] == '\n')) virBufferAddChar(&buf, text[i]); else diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 6e6678eb9b..ea3e62dc8e 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -199,14 +199,13 @@ VIR_ENUM_IMPL(qemuMonitorDumpStatus, #if DEBUG_RAW_IO -# include static char * qemuMonitorEscapeNonPrintable(const char *text) { size_t i; virBuffer buf = VIR_BUFFER_INITIALIZER; for (i = 0; text[i] != '\0'; i++) { - if (c_isprint(text[i]) || + if (g_ascii_isprint(text[i]) || text[i] == '\n' || (text[i] == '\r' && text[i + 1] == '\n')) virBufferAddChar(&buf, text[i]); diff --git a/src/util/virstring.c b/src/util/virstring.c index 40c83841e9..a66b406298 100644 --- a/src/util/virstring.c +++ b/src/util/virstring.c @@ -1350,7 +1350,7 @@ virStringIsPrintable(const char *str) size_t i; for (i = 0; str[i]; i++) - if (!c_isprint(str[i])) + if (!g_ascii_isprint(str[i])) return false; return true; @@ -1369,7 +1369,7 @@ virStringBufferIsPrintable(const uint8_t *buf, size_t i; for (i = 0; i < buflen; i++) - if (!c_isprint(buf[i])) + if (!g_ascii_isprint(buf[i])) return false; return true; diff --git a/tools/vsh-table.c b/tools/vsh-table.c index 28072c9719..a2365b2c32 100644 --- a/tools/vsh-table.c +++ b/tools/vsh-table.c @@ -25,7 +25,6 @@ #include #include #include -#include "c-ctype.h" #include "viralloc.h" #include "virbuffer.h" @@ -244,7 +243,7 @@ vshTableSafeEncode(const char *s, size_t *width) * Not valid multibyte sequence -- maybe it's * printable char according to the current locales. */ - if (!c_isprint(*p)) { + if (!g_ascii_isprint(*p)) { g_snprintf(buf, HEX_ENCODE_LENGTH + 1, "\\x%02x", *p); buf += HEX_ENCODE_LENGTH; *width += HEX_ENCODE_LENGTH;