summaryrefslogtreecommitdiff
path: root/print.c
diff options
context:
space:
mode:
Diffstat (limited to 'print.c')
-rw-r--r--print.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/print.c b/print.c
new file mode 100644
index 0000000..c457647
--- /dev/null
+++ b/print.c
@@ -0,0 +1,25 @@
+#include <u.h>
+#include <libc.h>
+#include <bio.h>
+
+#include "apl9.h"
+
+Rune *
+ppdatum(Datum d)
+{
+ return runestrdup(d.strrep);
+}
+
+Rune *
+ppdatums(Datum *ds, int n)
+{
+ int i;
+ Rune *res = runesmprint("");
+ Rune *tmp;
+ for(i = 0; i < n; i++){
+ tmp = res;
+ res = runesmprint("%S %S", res, ppdatum(ds[i]));
+ free(tmp);
+ }
+ return res;
+} \ No newline at end of file