diff options
| author | Klaatu <[email protected]> | 2015-05-17 15:33:21 +1200 |
|---|---|---|
| committer | Klaatu <[email protected]> | 2015-05-17 15:33:21 +1200 |
| commit | b0de699679e8f1e39af847ed172d1ba605b4370c (patch) | |
| tree | 01dac00471d61f727394e508c613b29cff0ceae5 /djb/atoulong.c | |
bulk upload of source
Diffstat (limited to 'djb/atoulong.c')
| -rw-r--r-- | djb/atoulong.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/djb/atoulong.c b/djb/atoulong.c new file mode 100644 index 0000000..95c96d4 --- /dev/null +++ b/djb/atoulong.c @@ -0,0 +1,7 @@ +unsigned int atoulong(char *s) /*EXTRACT_INCL*/ { + register unsigned int dest=0; + register unsigned char c; + + while ((c=*s-'0')<10) { ++s; dest=dest*10 + c; } + return dest; +} |
