summaryrefslogtreecommitdiff
path: root/print.c
blob: c457647feae17d763e32e657c4d771c8c77f90af (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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;
}