Mercurial > hg > Members > kono > nitros9-code
view 3rdparty/packages/uucpbb/src/xatol.c @ 2855:e126b9acab32 lwtools-port
rules.mak: Do not hardcode path for "echo"
It is basically the only tool with full path here and I don't see any
reason for it. We don't use special echo options that would fail
on the shell built-in echo.
Also don't hardcode path for losetup. sudo should make sure you
have the relevant location in your path, and that the path is sanitized,
otherwise your sudo setup is broken.
author | Tormod Volden <debian.tormod@gmail.com> |
---|---|
date | Sat, 13 Jul 2013 11:30:31 +0200 |
parents | 5ba8e711a1a3 |
children |
line wrap: on
line source
/* Copyright 1994 Brad Spencer */ /* Provided at no cost to Bob Billson to do with what he will */ /* A bit different atol, ya it only deals with positive numbers */ #include <stdio.h> long xatol (s) char *s; { long v = 0; if (s == NULL || *s == '\0') return (0); while (*s && (*s >= '0') && (*s <= '9')) { v *= 10; v += ((*s) - '0'); s++; } return (v); }