diff options
author | Peter Mikkelsen <petermikkelsen10@gmail.com> | 2022-01-08 22:45:00 +0000 |
---|---|---|
committer | Peter Mikkelsen <petermikkelsen10@gmail.com> | 2022-01-08 22:45:00 +0000 |
commit | 1ef3119fe613823a2145126c58948361ca7d3cd8 (patch) | |
tree | 5252d957ae512e1a727c9dec2b31e7b2a1d63e56 /print.c | |
parent | 214cdacca02552649d63f9045fdb8a17cfbb6fca (diff) |
Add initial code, just to get started
Diffstat (limited to 'print.c')
-rw-r--r-- | print.c | 25 |
1 files changed, 25 insertions, 0 deletions
@@ -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 |