From 189731aad01e09db1807c78af421c615ed3a3242 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Mon, 3 Jan 2022 18:41:48 +0000 Subject: rc: make it portable (for UNIX) Fixup remaining Plan9 dependencies (chartorune()). Add Makefile for UNIX-like systems (tested with Linux and APE). Make error printing consistent, use Errstr() explicitely. Get rid of NSTATUS buffer limit, just malloc it. --- sys/src/cmd/rc/code.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/src/cmd/rc/code.c') diff --git a/sys/src/cmd/rc/code.c b/sys/src/cmd/rc/code.c index f39b3a573..d5427aff5 100644 --- a/sys/src/cmd/rc/code.c +++ b/sys/src/cmd/rc/code.c @@ -460,7 +460,7 @@ codeswitch(tree *t, int eflag) int out; /* jump here to leave switch */ int nextcase; /* patch jump address to next case */ tree *tt; - if(c1->child[0]==nil + if(c1->child[0]==0 || c1->child[0]->type!=';' || !iscase(c1->child[0]->child[0])){ yyerror("case missing in switch"); -- cgit v1.2.3