You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
338 B
11 lines
338 B
#include "scan.h"
|
|
|
|
unsigned int scan_ulong(register char *s,register unsigned long *u)
|
|
{
|
|
register unsigned int pos; register unsigned long result;
|
|
register unsigned long c;
|
|
pos = 0; result = 0;
|
|
while ((c = (unsigned long) (unsigned char) (s[pos] - '0')) < 10)
|
|
{ result = result * 10 + c; ++pos; }
|
|
*u = result; return pos;
|
|
}
|
|
|