From df92ef5e8e6cf62358b37f441952b7b5f310b20c Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Thu, 3 Jul 2008 19:16:38 -0500 Subject: [PATCH] Finish bzcat. --- toys/bzcat.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/toys/bzcat.c b/toys/bzcat.c index d540524..b8e1695 100644 --- a/toys/bzcat.c +++ b/toys/bzcat.c @@ -10,7 +10,7 @@ USE_BZCAT(NEWTOY(bzcat, NULL, TOYFLAG_USR|TOYFLAG_BIN)) config BZCAT bool "bzcat" - default n + default y help usage: bzcat [filename...] @@ -19,7 +19,12 @@ config BZCAT #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); } -- 2.7.4