libowfat/scan/scan_xlong.c

14 lines
266 B
C
Raw Normal View History

2001-02-02 17:54:47 +00:00
#include "scan.h"
2006-11-07 17:56:05 +00:00
size_t scan_xlong(const char *src,unsigned long *dest) {
2001-02-02 17:54:47 +00:00
register const char *tmp=src;
register unsigned long l=0;
2001-02-02 17:54:47 +00:00
register unsigned char c;
while ((c=scan_fromhex(*tmp))<16) {
2001-02-02 17:54:47 +00:00
l=(l<<4)+c;
++tmp;
}
*dest=l;
return tmp-src;
}