summaryrefslogtreecommitdiffstats
path: root/src/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/util.c b/src/util.c
index b2a3115..c14a848 100644
--- a/src/util.c
+++ b/src/util.c
@@ -1,4 +1,5 @@
#include <errno.h>
+#include <stdio.h>
#include "defs.h"
#include "util.h"
#include "cache.h"
@@ -70,3 +71,19 @@ int split(struct stream * const src, struct stream * const A, struct stream * co
err:
return ret;
}
+
+int print_data(struct stream * const in)
+{
+ int ret = 0;
+ struct entry_l store;
+ size_t i;
+
+ puts( " position | value |\n"
+ " | |");
+
+ for (i = 0; in->get(in, &store); ++i) {
+ printf(" %10lu | " "%20"fieldprint" |\n", in->settings->ss + i, store.val);
+ }
+
+ return ret;
+}