changeset 307:937148640ac5

Finish bzcat.
author Rob Landley <rob@landley.net>
date Thu, 03 Jul 2008 19:16:38 -0500
parents 523441f8ed01
children 52600eee8dd6
files toys/bzcat.c
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/toys/bzcat.c	Thu Jul 03 19:14:23 2008 -0500
+++ b/toys/bzcat.c	Thu Jul 03 19:16:38 2008 -0500
@@ -10,7 +10,7 @@
 
 config BZCAT
 	bool "bzcat"
-	default n
+	default y
 	help
 	  usage: bzcat [filename...]
 
@@ -19,7 +19,12 @@
 
 #include "toys.h"
 
+static void do_bzcat(int fd, char *name)
+{
+    bunzipStream(fd, 1);
+}
+
 void bzcat_main(void)
 {
-	bunzipStream(0, 1);
+    loopfiles(toys.optargs, do_bzcat);
 }