commit | 3a9dccd76ee6916d5586a3fba49cb8e0edb3ca5d | [log] [tgz] |
---|---|---|
author | rsc <devnull@localhost> | Fri Apr 02 22:57:49 2004 +0000 |
committer | rsc <devnull@localhost> | Fri Apr 02 22:57:49 2004 +0000 |
tree | 0dd8d1779ff25a56054201bf39eddd5526cff32b | |
parent | 85117729d01e8f911beef396040eb2e739e5cc65 [diff] [blame] |
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.
diff --git a/src/lib9/atoll.c b/src/lib9/atoll.c new file mode 100644 index 0000000..6c345df --- /dev/null +++ b/src/lib9/atoll.c
@@ -0,0 +1,9 @@ +#include <u.h> +#include <libc.h> + +vlong +atoll(char *s) +{ + return strtoll(s, 0, 0); +} +