diff --git a/src/h.h b/src/h.h index a3cb6347..b6f22bd6 100644 --- a/src/h.h +++ b/src/h.h @@ -403,7 +403,7 @@ void printRaw(B x) { BS2B xget = TI(x).get; for (usz i = 0; i < ia; i++) { B c = xget(x,i); - if (c.u==0) { printf(" "); continue; } + if (c.u==0 | c.u==bi_noFill.u) { printf(" "); continue; } if (!isC32(c)) err("bad printRaw argument: expected all character items"); printUTF8((u32)c.u); } diff --git a/src/md1.c b/src/md1.c index 3af1399b..03aeea2c 100644 --- a/src/md1.c +++ b/src/md1.c @@ -122,7 +122,7 @@ B scan_c2(B d, B w, B x) { B f = c(Md1D,d)->f; if (xr==0) return err("`: 𝕩 cannot be a scalar"); if (wr+1 != xr) return err("`: shape of 𝕨 must match the cell of 𝕩"); if (memcmp(wsh, xsh+1, wr)) return err("`: shape of 𝕨 must match the cell of 𝕩"); - if (ia==0) { ptr_dec(r.c); return x; } + if (ia==0) { ptr_dec(r.c); return x; } // only safe as r would have 0 items too usz csz = arr_csz(x); for (usz i = 0; i < csz; i++) r.a[i] = c2(f, wget(w,i), xget(x,i)); for (usz i = csz; i < ia; i++) r.a[i] = c2(f, inc(r.a[i-csz]), xget(x,i)); diff --git a/src/sysfn.c b/src/sysfn.c index 8ff4709b..d49ea638 100644 --- a/src/sysfn.c +++ b/src/sysfn.c @@ -150,6 +150,9 @@ B sys_c1(B t, B x) { B c = xget(x,i); if (eqStr(c, U"internal")) r.a[i] = inc(bi_internal); else if (eqStr(c, U"eq")) r.a[i] = inc(bi_feq); + else if (eqStr(c, U"decompose")) r.a[i] = inc(bi_decp); + else if (eqStr(c, U"primind")) r.a[i] = inc(bi_primInd); + else if (eqStr(c, U"type")) r.a[i] = inc(bi_type); else err("Unknown system function"); } dec(x);