annotate toys/bzcat.c @ 54:60a7fb8ddeb4

Add a quick and dirt bzcat (stdin to stdout only for the moment) to test out the bunzip2 library.
author Rob Landley <rob@landley.net>
date Tue, 16 Jan 2007 13:26:02 -0500
parents
children 67ee3a0b76e1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
54
60a7fb8ddeb4 Add a quick and dirt bzcat (stdin to stdout only for the moment) to test
Rob Landley <rob@landley.net>
parents:
diff changeset
1 /* vi: set sw=4 ts=4: */
60a7fb8ddeb4 Add a quick and dirt bzcat (stdin to stdout only for the moment) to test
Rob Landley <rob@landley.net>
parents:
diff changeset
2 /*
60a7fb8ddeb4 Add a quick and dirt bzcat (stdin to stdout only for the moment) to test
Rob Landley <rob@landley.net>
parents:
diff changeset
3 * bzcat.c - decompress stdin to stdout using bunzip2.
60a7fb8ddeb4 Add a quick and dirt bzcat (stdin to stdout only for the moment) to test
Rob Landley <rob@landley.net>
parents:
diff changeset
4 */
60a7fb8ddeb4 Add a quick and dirt bzcat (stdin to stdout only for the moment) to test
Rob Landley <rob@landley.net>
parents:
diff changeset
5
60a7fb8ddeb4 Add a quick and dirt bzcat (stdin to stdout only for the moment) to test
Rob Landley <rob@landley.net>
parents:
diff changeset
6 #include "toys.h"
60a7fb8ddeb4 Add a quick and dirt bzcat (stdin to stdout only for the moment) to test
Rob Landley <rob@landley.net>
parents:
diff changeset
7
60a7fb8ddeb4 Add a quick and dirt bzcat (stdin to stdout only for the moment) to test
Rob Landley <rob@landley.net>
parents:
diff changeset
8 int bzcat_main(void)
60a7fb8ddeb4 Add a quick and dirt bzcat (stdin to stdout only for the moment) to test
Rob Landley <rob@landley.net>
parents:
diff changeset
9 {
60a7fb8ddeb4 Add a quick and dirt bzcat (stdin to stdout only for the moment) to test
Rob Landley <rob@landley.net>
parents:
diff changeset
10 char *error = bunzipStream(0, 1);
60a7fb8ddeb4 Add a quick and dirt bzcat (stdin to stdout only for the moment) to test
Rob Landley <rob@landley.net>
parents:
diff changeset
11
60a7fb8ddeb4 Add a quick and dirt bzcat (stdin to stdout only for the moment) to test
Rob Landley <rob@landley.net>
parents:
diff changeset
12 if (error) error_exit(error);
60a7fb8ddeb4 Add a quick and dirt bzcat (stdin to stdout only for the moment) to test
Rob Landley <rob@landley.net>
parents:
diff changeset
13 return 0;
60a7fb8ddeb4 Add a quick and dirt bzcat (stdin to stdout only for the moment) to test
Rob Landley <rob@landley.net>
parents:
diff changeset
14 }