root/dos/atou.c
| Revision b65b18a241c6e22bbbd53b94939549cd5b0a6c5f, 149 bytes (checked in by H. Peter Anvin <hpa@…>, 3 years ago) | |
|---|---|
|
|
| Line | |
|---|---|
| 1 | #include "mystuff.h" |
| 2 | |
| 3 | unsigned int atou(const char *s) |
| 4 | { |
| 5 | unsigned int i = 0; |
| 6 | while (isdigit(*s)) |
| 7 | i = i * 10 + (*s++ - '0'); |
| 8 | return i; |
| 9 | } |
Note: See TracBrowser
for help on using the browser.
