#if DEBUG_RAW_IO
-# include <c-ctype.h>
static char *
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
#if DEBUG_RAW_IO
-# include <c-ctype.h>
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]);
size_t i;
for (i = 0; str[i]; i++)
- if (!c_isprint(str[i]))
+ if (!g_ascii_isprint(str[i]))
return false;
return true;
size_t i;
for (i = 0; i < buflen; i++)
- if (!c_isprint(buf[i]))
+ if (!g_ascii_isprint(buf[i]))
return false;
return true;
#include <stddef.h>
#include <wchar.h>
#include <wctype.h>
-#include "c-ctype.h"
#include "viralloc.h"
#include "virbuffer.h"
* 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;