summary refs log tree commit diff
path: root/show.c
diff options
context:
space:
mode:
Diffstat (limited to 'show.c')
-rw-r--r--show.c14
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