scan_ulong.c
changeset 0 eeadadee24f6
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scan_ulong.c	Fri Oct 19 11:01:15 2007 +0200
@@ -0,0 +1,11 @@
+#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;
+}