From 1f2ab849c05c3eb4eaf9088536733e351050c98e Mon Sep 17 00:00:00 2001 From: rsc Date: Sat, 8 Apr 2006 23:49:08 +0000 Subject: add exitcode --- src/cmd/rc/plan9ish.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/cmd/rc') diff --git a/src/cmd/rc/plan9ish.c b/src/cmd/rc/plan9ish.c index f5e4e6a3..2e5514e1 100644 --- a/src/cmd/rc/plan9ish.c +++ b/src/cmd/rc/plan9ish.c @@ -545,3 +545,14 @@ void Memcpy(char *a, char *b, long n) void *Malloc(ulong n){ return malloc(n); } + +int +exitcode(char *msg) +{ + int n; + + n = atoi(msg); + if(n == 0) + n = 1; + return n; +} -- cgit v1.2.3