diff options
| author | 2013-09-26 09:47:18 +0200 | |
|---|---|---|
| committer | 2013-09-26 09:47:18 +0200 | |
| commit | 0cdd324d729a6864a95b7343c6927a7819047141 (patch) | |
| tree | db87f4a8ee35ee2d21b9d63a92c3f4faf60e7137 | |
| parent | 9099c5d9e28ca6348fc1b0431f47e2592649ae84 (diff) | |
| download | libirecovery-0cdd324d729a6864a95b7343c6927a7819047141.tar.gz libirecovery-0cdd324d729a6864a95b7343c6927a7819047141.tar.bz2 | |
Remove rather obsolete irecv_hexdump() helper
| -rw-r--r-- | include/libirecovery.h | 2 | ||||
| -rw-r--r-- | src/libirecovery.c | 36 |
2 files changed, 0 insertions, 38 deletions
diff --git a/include/libirecovery.h b/include/libirecovery.h index 05ff13f..56e5fd2 100644 --- a/include/libirecovery.h +++ b/include/libirecovery.h | |||
| @@ -229,8 +229,6 @@ irecv_error_t irecv_get_nonce(irecv_client_t client, unsigned char** nonce, int* | |||
| 229 | irecv_error_t irecv_get_srnm(irecv_client_t client, char* srnm); | 229 | irecv_error_t irecv_get_srnm(irecv_client_t client, char* srnm); |
| 230 | irecv_error_t irecv_get_imei(irecv_client_t client, char* imei); | 230 | irecv_error_t irecv_get_imei(irecv_client_t client, char* imei); |
| 231 | 231 | ||
| 232 | void irecv_hexdump(unsigned char* buf, unsigned int len, unsigned int addr); | ||
| 233 | |||
| 234 | void irecv_init(); | 232 | void irecv_init(); |
| 235 | void irecv_exit(); | 233 | void irecv_exit(); |
| 236 | irecv_client_t irecv_reconnect(irecv_client_t client, int initial_pause); | 234 | irecv_client_t irecv_reconnect(irecv_client_t client, int initial_pause); |
diff --git a/src/libirecovery.c b/src/libirecovery.c index c7186a0..e82bce2 100644 --- a/src/libirecovery.c +++ b/src/libirecovery.c | |||
| @@ -1549,39 +1549,3 @@ irecv_client_t irecv_reconnect(irecv_client_t client, int initial_pause) { | |||
| 1549 | new_client->progress_callback = progress_callback; | 1549 | new_client->progress_callback = progress_callback; |
| 1550 | return new_client; | 1550 | return new_client; |
| 1551 | } | 1551 | } |
| 1552 | |||
| 1553 | void irecv_hexdump(unsigned char* buf, unsigned int len, unsigned int addr) { | ||
| 1554 | int i, j; | ||
| 1555 | printf("0x%08x: ", addr); | ||
| 1556 | for (i = 0; i < (int)len; i++) { | ||
| 1557 | if (i % 16 == 0 && i != 0) { | ||
| 1558 | for (j=i-16; j < i; j++) { | ||
| 1559 | unsigned char car = buf[j]; | ||
| 1560 | if (car < 0x20 || car > 0x7f) car = '.'; | ||
| 1561 | printf("%c", car); | ||
| 1562 | } | ||
| 1563 | printf("\n"); | ||
| 1564 | addr += 0x10; | ||
| 1565 | printf("0x%08x: ", addr); | ||
| 1566 | } | ||
| 1567 | printf("%02x ", buf[i]); | ||
| 1568 | } | ||
| 1569 | |||
| 1570 | int done = (i % 16); | ||
| 1571 | int remains = 16 - done; | ||
| 1572 | if (done > 0) { | ||
| 1573 | for (j = 0; j < remains; j++) { | ||
| 1574 | printf(" "); | ||
| 1575 | } | ||
| 1576 | } | ||
| 1577 | |||
| 1578 | if ((i - done) >= 0) { | ||
| 1579 | if (done == 0 && i > 0) done = 16; | ||
| 1580 | for (j = (i - done); j < i; j++) { | ||
| 1581 | unsigned char car = buf[j]; | ||
| 1582 | if (car < 0x20 || car > 0x7f) car = '.'; | ||
| 1583 | printf("%c", car); | ||
| 1584 | } | ||
| 1585 | } | ||
| 1586 | printf("\n"); | ||
| 1587 | } | ||
