diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-04-23 18:50:47 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-04-23 18:50:47 -0700 |
commit | f6fa219f1275b8a98c768d1f8593613ed85d5cfe (patch) | |
tree | 89b4848d4bd5a1fbdf9100f346c1583c657b341d /src | |
parent | 430dcb4c1533a7c2e9486a2bcbb4e0bda3025c0c (diff) | |
parent | 029c076151fb9cb47c54af53c52870ef0b620c5c (diff) |
Merge pull request #1063 from waywardmonkeys/musl-libc1.3.7
Add wchar and multibyte libc functions
Diffstat (limited to 'src')
-rw-r--r-- | src/library.js | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/src/library.js b/src/library.js index 04878ffc..29c3386f 100644 --- a/src/library.js +++ b/src/library.js @@ -4168,32 +4168,6 @@ LibraryManager.library = { } }, - mbtowc: function(pwc, pmb, maxx) { - // XXX doesn't really handle multibyte at all - if (!pmb) return 0; - maxx = Math.min({{{ cDefine('_NL_CTYPE_MB_CUR_MAX') }}}, maxx); - var i; - for (i = 0; i < maxx; i++) { - var curr = {{{ makeGetValue('pmb', 0, 'i8') }}}; - if (pwc) { - {{{ makeSetValue('pwc', '0', 'curr', 'i8') }}}; - {{{ makeSetValue('pwc', '1', '0', 'i8') }}}; - pwc += 2; - } - pmb++; - if (!curr) break; - } - return i; - }, - - wcrtomb: function(s, wc, ps) { - // XXX doesn't really handle multibyte at all - if (s) { - {{{ makeSetValue('s', '0', 'wc', 'i8') }}}; - } - return 1; - }, - arc4random: 'rand', // ========================================================================== @@ -4243,8 +4217,6 @@ LibraryManager.library = { return ret|0; }, - wmemcpy: function() { throw 'wmemcpy not implemented' }, - llvm_memcpy_i32: 'memcpy', llvm_memcpy_i64: 'memcpy', llvm_memcpy_p0i8_p0i8_i32: 'memcpy', @@ -4274,8 +4246,6 @@ LibraryManager.library = { llvm_memmove_p0i8_p0i8_i32: 'memmove', llvm_memmove_p0i8_p0i8_i64: 'memmove', - wmemmove: function() { throw 'wmemmove not implemented' }, - memset__inline: function(ptr, value, num, align) { return makeSetValues(ptr, 0, value, 'null', num, align); }, @@ -4316,8 +4286,6 @@ LibraryManager.library = { llvm_memset_p0i8_i32: 'memset', llvm_memset_p0i8_i64: 'memset', - wmemset: function() { throw 'wmemset not implemented' }, - strlen__sig: 'ii', strlen__asm: true, strlen: function(ptr) { @@ -4330,18 +4298,6 @@ LibraryManager.library = { return (curr - ptr)|0; }, - // TODO: Implement when we have real unicode support. - mblen: function() { - return 1; - }, - - wcslen: function() { throw 'wcslen not implemented' }, - mbrlen: function() { throw 'mbrlen not implemented' }, - mbsrtowcs: function() { throw 'mbsrtowcs not implemented' }, - wcsnrtombs: function() { throw 'wcsnrtombs not implemented' }, - mbsnrtowcs: function() { throw 'mbsnrtowcs not implemented' }, - mbrtowc: function() { throw 'mbrtowc not implemented' }, - strspn: function(pstr, pset) { var str = pstr, set, strcurr, setcurr; while (1) { |