Mercurial > hg > toybox
comparison toys/other/bzcat.c @ 653:2986aa63a021
Move commands into "posix", "lsb", and "other" menus/directories.
author | Rob Landley <rob@landley.net> |
---|---|
date | Sat, 25 Aug 2012 14:25:22 -0500 |
parents | toys/bzcat.c@937148640ac5 |
children | 6df4ccc0acbe |
comparison
equal
deleted
inserted
replaced
652:2d7c56913fda | 653:2986aa63a021 |
---|---|
1 /* vi: set sw=4 ts=4: | |
2 * | |
3 * bzcat.c - decompress stdin to stdout using bunzip2. | |
4 * | |
5 * Copyright 2007 Rob Landley <rob@landley.net> | |
6 * | |
7 * Not in SUSv3. | |
8 | |
9 USE_BZCAT(NEWTOY(bzcat, NULL, TOYFLAG_USR|TOYFLAG_BIN)) | |
10 | |
11 config BZCAT | |
12 bool "bzcat" | |
13 default y | |
14 help | |
15 usage: bzcat [filename...] | |
16 | |
17 Decompress listed files to stdout. Use stdin if no files listed. | |
18 */ | |
19 | |
20 #include "toys.h" | |
21 | |
22 static void do_bzcat(int fd, char *name) | |
23 { | |
24 bunzipStream(fd, 1); | |
25 } | |
26 | |
27 void bzcat_main(void) | |
28 { | |
29 loopfiles(toys.optargs, do_bzcat); | |
30 } |