diff options
author | max99x <max99x@gmail.com> | 2011-08-23 08:50:23 +0300 |
---|---|---|
committer | max99x <max99x@gmail.com> | 2011-08-23 08:51:29 +0300 |
commit | dc1e8a0fb689436866d253036090e9fe7d4f3d73 (patch) | |
tree | 6b28e902b69c27e834f6154c3ceef32d5c510006 /src | |
parent | 0e2cbf14971ff4145c62e61e118fc6095a658a3a (diff) |
Added strcoll() and strtoul() and improved strtol().
Diffstat (limited to 'src')
-rw-r--r-- | src/library.js | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/library.js b/src/library.js index 23a63481..634f98dc 100644 --- a/src/library.js +++ b/src/library.js @@ -3575,15 +3575,22 @@ LibraryManager.library = { return pdest; }, - strtol: function(ptr) { - assert(!arguments[1] && !arguments[2], "We don't support all strtol params yet"); - return parseInt(Pointer_stringify(ptr)); + strtol: function(ptr, endptr, base) { + assert(!endptr, "We don't support all strtol params yet"); + return parseInt(Pointer_stringify(ptr), base); + }, + strtoul__deps: ['strtol'], + strtoul: function(ptr, endptr, base) { + var result = _strtol(ptr, endptr, base); + return unSign(result, 32); }, strcmp__deps: ['strncmp'], strcmp: function(px, py) { return _strncmp(px, py, TOTAL_MEMORY); }, + // We always assume ASCII locale. + strcoll: 'strcmp', strcasecmp__deps: ['strncasecmp'], strcasecmp: function(px, py) { |