Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Revert OUnit breakage, inappropriate debug fn; define modf

  • Loading branch information...
commit a0154c720c4258cb58748cd983e350438869607c 1 parent e556ce0
@dsheets authored
Showing with 6 additions and 9 deletions.
  1. +6 −9 src/stdlib/primitives.js
View
15 src/stdlib/primitives.js
@@ -175,6 +175,10 @@ var caml_classify_float = function (f) {
// can't determine subnormal from js afaik
else return 0; // FP_normal
}
+var caml_modf_float = function (f) {
+ var r = f % 1.0;
+ return [r,f-r];
+}
var caml_greaterthan = function (v1, v2) { return compare_val(v1, v2, 0) > 0; }
var caml_greaterequal = function (v1, v2) { return compare_val(v1, v2, 0) >= 0; }
@@ -283,8 +287,8 @@ var caml_ml_open_descriptor_in = function () { return 0; } // XXX
var caml_ml_open_descriptor_out = function () { return 0; } // XXX
var caml_ml_out_channels_list = function () { return 0; }
-var caml_ml_output = function (c, b, s, l) { throw "caml_ml_output"; }
-var caml_ml_output_char = function (c, ch) { throw "caml_ml_output_char"; }
+var caml_ml_output = function (c, b, s, l) { print_verbatim(b); }
+var caml_ml_output_char = function (c, ch) { }
var caml_ml_output_int = function () { throw "caml_ml_output_int"; }
var caml_ml_pos_in = function () { throw "caml_ml_pos_in"; }
@@ -518,13 +522,6 @@ var caml_parser_trace = false
/* Auxiliary for printing token just read */
-function print(s)
-{
- if (window.console) {
- window.console.log(s);
- }
-}
-
function token_name(names, number)
{
var n = 0;
Please sign in to comment.
Something went wrong with that request. Please try again.