diff --git a/backend/pixma/pixma_common.c b/backend/pixma/pixma_common.c index bb4f6d181..b164566fe 100644 --- a/backend/pixma/pixma_common.c +++ b/backend/pixma/pixma_common.c @@ -48,6 +48,7 @@ #include #include #include +#include #include /* pow(C90) */ #include /* gettimeofday(4.3BSD) */ @@ -143,6 +144,24 @@ pixma_hexdump (int level, const void *d_, unsigned len) p++; } } + for (c = 0; c < 4; c++) + { + p[0] = ' '; + p++; + } + for (c = 0; c != 16 && (ofs + c) < plen; c++) + { + if (isprint(d[ofs + c])) + p[0] = d[ofs + c]; + else + p[0] = '.'; + p++; + if (c == 7) + { + p[0] = ' '; + p++; + } + } p[0] = '\0'; pixma_dbg (level, "%s\n", line); ofs += c;