rem: if ((i % display_width) == 0 && i != 0) { dprintf("\n[0x%lx] '", address + i * item_size); for (j = 0; j < min_c(display_width, (num-i)) * item_size; j++) { char c = *((char *)address + i * item_size + j); if (!isalnum(c)) {
add: uint32 value;  if ((i % displayWidth) == 0) { int32 displayed = min_c(displayWidth, (num-i)) * itemSize; if (i != 0) kprintf("\n");  kprintf("[0x%lx]  ", address + i * itemSize);  for (j = 0; j < displayed; j++) { char c; if (user_memcpy(&c, (char *)address + i * itemSize + j, 1) != B_OK) { displayed = j; break; } if (!isalnum(c))
context: display_mem(int argc, char **argv){	int item_size;	int display_width;	int num = 1;	addr_t address;	int i;	int j;	if (argc < 2) {		dprintf("usage: dw/ds/db <address> [num]\n"			"\tdw - 4 bytes\n"			"\tds - 2 bytes\n"			"\tdb - 1 byte\n");		return 0;	}	address = strtoul(argv[1], NULL, 0);	if (argc >= 3) {		num = -1;		num = atoi(argv[2]);	}	// build the format string	if (strcmp(argv[0], "db") == 0) {		item_size = 1;		display_width = 16;	} else if (strcmp(argv[0], "ds") == 0) {		item_size = 2;		display_width = 8;	} else if (strcmp(argv[0], "dw") == 0) {		item_size = 4;		display_width = 4;	} else {		dprintf("display_mem called in an invalid way!\n");		return 0;	}	dprintf("[0x%lx] '", address);	for (j = 0; j < min_c(display_width, num) * item_size; j++) {		char c = *((char *)address + j);		if (!isalnum(c)) {			c = '.';		}		dprintf("%c", c);	}	dprintf("'");	for (i = 0; i < num; i++) {		if ((i % display_width) == 0 && i != 0) {			dprintf("\n[0x%lx] '", address + i * item_size);			for (j = 0; j < min_c(display_width, (num-i)) * item_size; j++) {				char c = *((char *)address + i * item_size + j);				if (!isalnum(c)) {					c = '.';				}				dprintf("%c", c);			}			dprintf("'");		}		switch (item_size) {			case 1:				dprintf(" 0x%02x", *((uint8 *)address + i));				break;			case 2:				dprintf(" 0x%04x", *((uint16 *)address + i));				break;			case 4:				dprintf(" 0x%08lx", *((uint32 *)address + i));				break;			default:				dprintf("huh?\n");		}	}	dprintf("\n");	return 0;}