diff options
author | Christian Neukirchen <chneukirchen@gmail.com> | 2016-07-13 15:52:52 +0200 |
---|---|---|
committer | Christian Neukirchen <chneukirchen@gmail.com> | 2016-07-13 15:52:52 +0200 |
commit | 0e892a5d833ff0552d3000dcae7a4ee1e573b679 (patch) | |
tree | 0cad353dc188f0ae51d1ffb32575a302b1fcb3d8 /show.c | |
parent | 17355dbe63c675517f88d501d36f7e0fb2d52885 (diff) | |
download | mblaze-0e892a5d833ff0552d3000dcae7a4ee1e573b679.tar.gz mblaze-0e892a5d833ff0552d3000dcae7a4ee1e573b679.tar.xz mblaze-0e892a5d833ff0552d3000dcae7a4ee1e573b679.zip |
show: fix api usage
Diffstat (limited to 'show.c')
-rw-r--r-- | show.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/show.c b/show.c index aa7a29c..1d847c6 100644 --- a/show.c +++ b/show.c @@ -31,7 +31,7 @@ show(char *file) { struct message *msg; - msg = blaze822(file); + msg = blaze822_file(file); if (!msg) return; @@ -48,19 +48,9 @@ show(char *file) } } - int fd = blaze822_body(msg, file); - if (fd < 0) - return; - printf("\n"); - fflush(stdout); - char buf[2048]; - ssize_t rd; - // XXX skip initial lf here, convert crlf - // XXX do mime... - while ((rd = read(fd, buf, sizeof buf))) - write(1, buf, rd); + fwrite(blaze822_body(msg), blaze822_bodylen(msg), 1, stdout); } int |