diff options
author | alon@honor <none@none> | 2010-09-22 21:29:02 -0700 |
---|---|---|
committer | alon@honor <none@none> | 2010-09-22 21:29:02 -0700 |
commit | 1dd1b85c8462a76388686b4fdeb4ec15f420a30a (patch) | |
tree | 29f3fbc6e634e30ef2ceeb75d82fa43bc31fcdfb /src/snippets.js | |
parent | 17f4f4918767c3159f55c78f3c443067f0297b70 (diff) |
several stdlib implementations
Diffstat (limited to 'src/snippets.js')
-rw-r--r-- | src/snippets.js | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/snippets.js b/src/snippets.js index 813ecacd..ddcb6d37 100644 --- a/src/snippets.js +++ b/src/snippets.js @@ -102,8 +102,21 @@ var Snippets = { isdigit: function(chr) { return chr >= '0'.charCodeAt(0) && chr <= '9'.charCodeAt(0); }, + + // iostream + _ZNSt8ios_base4InitC1Ev: function() { + }, + _ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_: 0, // endl + + // math.h + sqrt: function(x) { return Math.sqrt(x) }, + cos: function(x) { return Math.cos(x) }, + sin: function(x) { return Math.sin(x) }, }; -// Aliases +// Aliases ============================ + Snippets.__cxa_atexit = Snippets.atexit; +// iostream +Snippets._ZNSolsEi = Snippets._ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc = Snippets._ZNSolsEd = Snippets._ZNSolsEPFRSoS_E = function(stream, data) { print(data) }; |