Mirror of :pserver:cvs@cvs.fefe.de:/cvs libowfat https://www.fefe.de/libowfat/
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.

20 lines
342 B

22 years ago
#include "scan.h"
unsigned int scan_long(const char *src,long *dest) {
register const char *tmp;
register long int l;
22 years ago
register unsigned char c;
int neg;
tmp=src; l=0; neg=0;
switch (*tmp) {
case '-': neg=1;
case '+': ++tmp;
while ((c=*tmp-'0')<10) {
return tmp-src;