diff options
author | FreeArtMan <dos21h@gmail.com> | 2019-09-25 19:17:09 +0100 |
---|---|---|
committer | FreeArtMan <dos21h@gmail.com> | 2019-09-25 19:17:09 +0100 |
commit | 3e187c094f12ef41ea6de2f55d128c3e037b5c12 (patch) | |
tree | f0dbbc5df260532e284ca5264297d0a8044eaeb4 /cmd/cmd_dump.c | |
parent | bbd73385a0db271b457c63e4d6bab54f581410f9 (diff) | |
download | ihe-3e187c094f12ef41ea6de2f55d128c3e037b5c12.tar.gz ihe-3e187c094f12ef41ea6de2f55d128c3e037b5c12.zip |
Untested version, recompiled with new buf library and with c+
Diffstat (limited to 'cmd/cmd_dump.c')
-rw-r--r-- | cmd/cmd_dump.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/cmd/cmd_dump.c b/cmd/cmd_dump.c index bf2e5d1..999822e 100644 --- a/cmd/cmd_dump.c +++ b/cmd/cmd_dump.c @@ -5,22 +5,24 @@ #include "libcmd/cmd_parse.h" extern file_t *g_file; -extern buf_t *g_buf; +extern Buf *g_buf; extern int g_flags; int c_dump( cmd_arg_t *arg ) { int i; - if ( g_buf->buf == NULL) + if ( g_buf->isempty()) { printf("Buffer to print empty\n"); return -1; } - for (i=0; i<g_buf->size; i++) + for (i=0; i<g_buf->size(); i++) { - printf("%02x",(unsigned char)g_buf->buf[i]); + char c; + g_buf->getc(i,&c); + printf("%02x",(unsigned char)c); } printf("\n"); |