kopia lustrzana https://gitlab.com/sane-project/backends
pixma: print characters @ pixma_hexdump()
rodzic
e58641a430
commit
05459de5e8
|
@ -48,6 +48,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
#include <ctype.h>
|
||||||
#include <math.h> /* pow(C90) */
|
#include <math.h> /* pow(C90) */
|
||||||
|
|
||||||
#include <sys/time.h> /* gettimeofday(4.3BSD) */
|
#include <sys/time.h> /* gettimeofday(4.3BSD) */
|
||||||
|
@ -143,6 +144,24 @@ pixma_hexdump (int level, const void *d_, unsigned len)
|
||||||
p++;
|
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';
|
p[0] = '\0';
|
||||||
pixma_dbg (level, "%s\n", line);
|
pixma_dbg (level, "%s\n", line);
|
||||||
ofs += c;
|
ofs += c;
|
||||||
|
|
Ładowanie…
Reference in New Issue