summary refs log tree commit diff
path: root/mshow.c
diff options
context:
space:
mode:
Diffstat (limited to 'mshow.c')
-rw-r--r--mshow.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/mshow.c b/mshow.c
index 5715d5f..fbe1683 100644
--- a/mshow.c
+++ b/mshow.c
@@ -419,16 +419,22 @@ extract_mime(int depth, struct message *msg, char *body, size_t bodylen)
 }
 
 void
-extract(char *file, int argc, char **argv, int use_stdout)
+extract_cb(char *file)
 {
 	struct message *msg = blaze822_file(file);
 	if (!msg)
 		return;
 	mimecount = 0;
+	walk_mime(msg, 0, extract_mime);
+}
+
+void
+extract(char *file, int argc, char **argv, int use_stdout)
+{
 	extract_argc = argc;
 	extract_argv = argv;
 	extract_stdout = use_stdout;
-	walk_mime(msg, 0, extract_mime);
+	blaze822_loop1(file, extract_cb);
 }
 
 static char *newcur;