chiark / gitweb /
Merge branches 'idx/verh' and 'idx/qmqpc'
[qmail] / scan_8long.c
CommitLineData
2117e02e
MW
1#include "scan.h"
2
3unsigned int scan_8long(s,u) register char *s; register unsigned long *u;
4{
5 register unsigned int pos; register unsigned long result;
6 register unsigned long c;
7 pos = 0; result = 0;
8 while ((c = (unsigned long) (unsigned char) (s[pos] - '0')) < 8)
9 { result = result * 8 + c; ++pos; }
10 *u = result; return pos;
11}