three small changes to acid. remove extraneous blank line here: cpu% acid 169453 /proc/169453/text:386 plan 9 executable <<< this one! /sys/lib/acid/port /sys/lib/acid/386 fix unary + not to crash: cpu% /n/sources/plan9/386/bin/acid 8.out:386 plan 9 executable /sys/lib/acid/port /sys/lib/acid/386 acid: +1 acid 169539: suicide: sys: trap: fault read addr=0x8 pc=0x000059f6 force printing of unary + expressions: cpu% acid 8.out:386 plan 9 executable /sys/lib/acid/port /sys/lib/acid/386 acid: {} acid: +{} {} acid: i could have sworn that this was a documented feature that i was just restoring, but i can't find where i saw it documented. Reference: /n/sources/patch/applied/acid Date: Tue Dec 4 07:19:30 CET 2007 Signed-off-by: rsc@swtch.com --- /sys/src/cmd/acid/main.c Tue Dec 4 07:17:24 2007 +++ /sys/src/cmd/acid/main.c Tue Dec 4 07:17:24 2007 @@ -279,7 +279,7 @@ print("%s: (error) syminit: %r\n", argv0); return; } - print("%s:%s\n\n", s, fhdr.name); + print("%s:%s\n", s, fhdr.name); if(mach->sbreg && lookup(0, mach->sbreg, &sym)) { mach->sb = sym.value; --- /sys/src/cmd/acid/expr.c Tue Dec 4 07:17:27 2007 +++ /sys/src/cmd/acid/expr.c Tue Dec 4 07:17:25 2007 @@ -333,6 +333,10 @@ { Node l, r; + if(n->right == nil){ // unary + + expr(n->left, res); + return; + } expr(n->left, &l); expr(n->right, &r); res->fmt = l.fmt; --- /sys/src/cmd/acid/exec.c Tue Dec 4 07:17:27 2007 +++ /sys/src/cmd/acid/exec.c Tue Dec 4 07:17:27 2007 @@ -84,7 +84,7 @@ switch(n->op) { default: expr(n, &res); - if(ret || (res.type == TLIST && res.l == 0)) + if(ret || (res.type == TLIST && res.l == 0 && n->op != OADD)) break; prnt->right = &res; expr(prnt, &xx);