dlls/kernel32/tests/file.c
/*
 *   Debugging routine to dump a buffer in a hexdump-like fashion.
 */
Debugging routine to dump a buffer in a hexdump-like fashion.
Debugging routine to dump a buffer in a hexdump - like fashion .
static void dumpmem(unsigned char *mem, int len)
{
    int x = 0;
    char hex[49], *p;
    char txt[17], *c;
    while (x < len)
    {
        p = hex;
        c = txt;
        do {
            p += sprintf(p, "%02x ", mem[x]);
            *c++ = (mem[x] >= 32 && mem[x] <= 127) ? mem[x] : '.';
        } while (++x % 16 && x < len);
        *c = '\0';
        trace("%04x: %-48s- %s\n", x, hex, txt);
    }
}
static void dumpmem ( unsigned char * mem , int len ) { int x = 0 ; char hex [ 49 ] , * p ; char txt [ 17 ] , * c ; while ( x < len ) { p = hex ; c = txt ; do { p += sprintf ( p , " " , mem [ x ] ) ; * c ++ = ( mem [ x ] >= 32 && mem [ x ] <= 127 ) ? mem [ x ] : ' ' ; } while ( ++ x % 16 && x < len ) ; * c = ' \0 ' ; trace ( " \n " , x , hex , txt ) ; } }
Debugging routine to dump a buffer in a hexdump-like fashion.
Debugging routine to dump a buffer in a hexdump - like fashion .