diff options
| author | Jakob Kaivo <jkk@ung.org> | 2019-02-09 14:26:35 -0500 |
|---|---|---|
| committer | Jakob Kaivo <jkk@ung.org> | 2019-02-09 14:26:35 -0500 |
| commit | 7b7cca986ed85ecb2dd8d39478088f236a24b9a1 (patch) | |
| tree | 94e777147773774da48d2c6baf64d797a182f50d /src/stdlib/a64l.c | |
| parent | 3d7bacbaf22b36170371cd89facd0c1cd298b67b (diff) | |
merge XOPEN identifiers
Diffstat (limited to 'src/stdlib/a64l.c')
| -rw-r--r-- | src/stdlib/a64l.c | 21 |
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) +*/ |
