summaryrefslogtreecommitdiff
path: root/src/print_forest.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/print_forest.c')
-rw-r--r--src/print_forest.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/print_forest.c b/src/print_forest.c
new file mode 100644
index 0000000..58832c9
--- /dev/null
+++ b/src/print_forest.c
@@ -0,0 +1,21 @@
+#include <stdio.h>
+#include "helper.h"
+#include "big_endian.h"
+
+int
+main(int argc, char **argv)
+{
+ if (argc < 2) {
+ fprintf(stderr, "One argument is required, which is the file name of the forest.\n");
+
+ return 1;
+ }
+
+ if (argc < 3) {
+ fprintf(stderr, "It is required to supply the ouput file name.\n");
+
+ return 1;
+ }
+
+ print_forest_file(*(argv+1), *(argv+2));
+}