aboutsummaryrefslogtreecommitdiff
path: root/toys/bzcat.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2007-01-16 13:26:02 -0500
committerRob Landley <rob@landley.net>2007-01-16 13:26:02 -0500
commit636b5cf46650d3aa3bbc9b29feb0e07589085e3f (patch)
tree1285eeff7aa30b3360389bcefd5a130eea01ebed /toys/bzcat.c
parent055cfcbe5b0534c700b30216f54336b7581f7be4 (diff)
downloadtoybox-636b5cf46650d3aa3bbc9b29feb0e07589085e3f.tar.gz
Add a quick and dirt bzcat (stdin to stdout only for the moment) to test
out the bunzip2 library.
Diffstat (limited to 'toys/bzcat.c')
-rw-r--r--toys/bzcat.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/toys/bzcat.c b/toys/bzcat.c
new file mode 100644
index 00000000..30437bb8
--- /dev/null
+++ b/toys/bzcat.c
@@ -0,0 +1,14 @@
+/* vi: set sw=4 ts=4: */
+/*
+ * bzcat.c - decompress stdin to stdout using bunzip2.
+ */
+
+#include "toys.h"
+
+int bzcat_main(void)
+{
+ char *error = bunzipStream(0, 1);
+
+ if (error) error_exit(error);
+ return 0;
+}