aboutsummaryrefslogtreecommitdiff
path: root/src/lib9/atoll.c
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2004-04-02 22:57:49 +0000
committerrsc <devnull@localhost>2004-04-02 22:57:49 +0000
commit3a9dccd76ee6916d5586a3fba49cb8e0edb3ca5d (patch)
tree0dd8d1779ff25a56054201bf39eddd5526cff32b /src/lib9/atoll.c
parent85117729d01e8f911beef396040eb2e739e5cc65 (diff)
downloadplan9port-3a9dccd76ee6916d5586a3fba49cb8e0edb3ca5d.tar.gz
plan9port-3a9dccd76ee6916d5586a3fba49cb8e0edb3ca5d.tar.bz2
plan9port-3a9dccd76ee6916d5586a3fba49cb8e0edb3ca5d.zip
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.
Diffstat (limited to 'src/lib9/atoll.c')
-rw-r--r--src/lib9/atoll.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lib9/atoll.c b/src/lib9/atoll.c
new file mode 100644
index 00000000..6c345df6
--- /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);
+}
+