comparison toys/bzcat.c @ 307:937148640ac5

Finish bzcat.
author Rob Landley <rob@landley.net>
date Thu, 03 Jul 2008 19:16:38 -0500
parents 163498bf547b
children
comparison
equal deleted inserted replaced
306:523441f8ed01 307:937148640ac5
8 8
9 USE_BZCAT(NEWTOY(bzcat, NULL, TOYFLAG_USR|TOYFLAG_BIN)) 9 USE_BZCAT(NEWTOY(bzcat, NULL, TOYFLAG_USR|TOYFLAG_BIN))
10 10
11 config BZCAT 11 config BZCAT
12 bool "bzcat" 12 bool "bzcat"
13 default n 13 default y
14 help 14 help
15 usage: bzcat [filename...] 15 usage: bzcat [filename...]
16 16
17 Decompress listed files to stdout. Use stdin if no files listed. 17 Decompress listed files to stdout. Use stdin if no files listed.
18 */ 18 */
19 19
20 #include "toys.h" 20 #include "toys.h"
21 21
22 static void do_bzcat(int fd, char *name)
23 {
24 bunzipStream(fd, 1);
25 }
26
22 void bzcat_main(void) 27 void bzcat_main(void)
23 { 28 {
24 bunzipStream(0, 1); 29 loopfiles(toys.optargs, do_bzcat);
25 } 30 }