summaryrefslogtreecommitdiff
path: root/src/stdlib/a64l.c
blob: e47fe49f56c7f5229d66348b8fbe2d17e137b3f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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)
*/