File: atou.c

package info (click to toggle)
syslinux 1%3A3.31-4
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 7,584 kB
  • ctags: 8,059
  • sloc: ansic: 58,348; asm: 6,652; pascal: 6,176; perl: 907; makefile: 844; python: 266; sh: 139
file content (13 lines) | stat: -rw-r--r-- 198 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
static inline int
isdigit(int ch)
{
  return (ch >= '0') && (ch <= '9');
}

unsigned int atou(const char *s)
{
  unsigned int i = 0;
  while (isdigit(*s))
    i = i*10 + (*s++ - '0');
  return i;
}