summaryrefslogtreecommitdiff
path: root/src/stdlib/a64l.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/stdlib/a64l.c')
-rw-r--r--src/stdlib/a64l.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/stdlib/a64l.c b/src/stdlib/a64l.c
new file mode 100644
index 00000000..e47fe49f
--- /dev/null
+++ b/src/stdlib/a64l.c
@@ -0,0 +1,21 @@
+#include <stdlib.h>
+
+long a64l(const char *s)
+{
+ long l = 0;
+ int i = 0;
+ int n = 0;
+ int base = 1;
+ while (i < 6) {
+ /*n = indexof ((char*)radix64, s[i]); */
+ if (n == -1)
+ return l;
+ l += n * base;
+ base *= 64;
+ }
+ return l;
+}
+
+/*
+XOPEN(400)
+*/