mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Remove missing/strtol.c
It is never used. We don't need it anyway as it's part of C89 which is our current minimum requirement. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58430 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
16ffd47639
commit
70c9bb4b81
5 changed files with 0 additions and 39 deletions
|
@ -1,27 +0,0 @@
|
|||
/* public domain rewrite of strtol(3) */
|
||||
|
||||
#include "ruby/missing.h"
|
||||
#include <ctype.h>
|
||||
|
||||
long
|
||||
strtol(const char *nptr, char **endptr, int base)
|
||||
{
|
||||
long result;
|
||||
const char *p = nptr;
|
||||
|
||||
while (isspace(*p)) {
|
||||
p++;
|
||||
}
|
||||
if (*p == '-') {
|
||||
p++;
|
||||
result = -strtoul(p, endptr, base);
|
||||
}
|
||||
else {
|
||||
if (*p == '+') p++;
|
||||
result = strtoul(p, endptr, base);
|
||||
}
|
||||
if (endptr != 0 && *endptr == p) {
|
||||
*endptr = (char *)nptr;
|
||||
}
|
||||
return result;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue