tadd exitcode - plan9port - [fork] Plan 9 from user space (HTM) git clone git://src.adamsgaard.dk/plan9port (DIR) Log (DIR) Files (DIR) Refs (DIR) README (DIR) LICENSE --- (DIR) commit 1f2ab849c05c3eb4eaf9088536733e351050c98e (DIR) parent 45cb54e8a6b6eb4d5308d5404960e7be40b760c1 (HTM) Author: rsc <devnull@localhost> Date: Sat, 8 Apr 2006 23:49:08 +0000 add exitcode Diffstat: M src/cmd/rc/plan9ish.c | 11 +++++++++++ 1 file changed, 11 insertions(+), 0 deletions(-) --- (DIR) diff --git a/src/cmd/rc/plan9ish.c b/src/cmd/rc/plan9ish.c t@@ -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; +}