From 3a9dccd76ee6916d5586a3fba49cb8e0edb3ca5d Mon Sep 17 00:00:00 2001 From: rsc Date: Fri, 2 Apr 2004 22:57:49 +0000 Subject: Change _p9strsig to return nil if tmp==nil. Add atoi, atol, atoll. These versions call strtol/strtoll with base==0. The Unix versions use base==10. --- src/lib9/atoi.c | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 src/lib9/atoi.c (limited to 'src/lib9/atoi.c') diff --git a/src/lib9/atoi.c b/src/lib9/atoi.c new file mode 100644 index 00000000..66ecb4ef --- /dev/null +++ b/src/lib9/atoi.c @@ -0,0 +1,9 @@ +#include +#include + +int +atoi(char *s) +{ + return strtol(s, 0, 0); +} + -- cgit v1.2.3