plan9port

fork of plan9port with libvec, libstr and libsdb
Log | Files | Refs | README | LICENSE

commit 1f2ab849c05c3eb4eaf9088536733e351050c98e
parent 45cb54e8a6b6eb4d5308d5404960e7be40b760c1
Author: rsc <devnull@localhost>
Date:   Sat,  8 Apr 2006 23:49:08 +0000

add exitcode

Diffstat:
Msrc/cmd/rc/plan9ish.c | 11+++++++++++
1 file changed, 11 insertions(+), 0 deletions(-)

diff --git 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; +}