- Timestamp:
- Jun 13, 2015, 11:25:37 PM (10 years ago)
- Branches:
- master
- Children:
- 61fdba7
- Parents:
- a56efea
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
icbd.c
ra56efea r3347cd9 36 36 #include <login_cap.h> 37 37 #include <locale.h> 38 #include <ctype.h> 38 39 #include <netdb.h> 39 40 #include <event.h> … … 386 387 is->rlen, is->length, is->host, is->port); 387 388 for (i = 0; i < (int)is->rlen; i++) 388 printf(" %02x", (unsigned char)is->buffer[i]); 389 printf(isprint(is->buffer[i]) ? "%c" : 390 "\\x%02x", (unsigned char)is->buffer[i]); 389 391 printf("\n"); 390 392 } … … 415 417 printf("-> wrote %lu to %s:%d:\n", size, is->host, is->port); 416 418 for (i = 0; i < size; i++) 417 printf(" %02x", (unsigned char)buf[i]); 419 printf(isprint(buf[i]) ? "%c" : "\\x%02x", 420 (unsigned char)buf[i]); 418 421 printf("\n"); 419 422 }
Note:
See TracChangeset
for help on using the changeset viewer.