From 37f9b475c056b050cf1d25d612baa68fff3370bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Lang=C3=B3?= Date: Fri, 22 Jul 2016 09:05:19 +0200 Subject: [PATCH] Fix API examples after the IO Port update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com --- docs/03.API-EXAMPLE.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/03.API-EXAMPLE.md b/docs/03.API-EXAMPLE.md index cb9a221ab..3a574f168 100644 --- a/docs/03.API-EXAMPLE.md +++ b/docs/03.API-EXAMPLE.md @@ -184,27 +184,27 @@ print_value (const jerry_value_t value) { if (jerry_value_is_undefined (value)) { - jerry_port_logmsg (stdout, "undefined"); + jerry_port_console ("undefined"); } else if (jerry_value_is_null (value)) { - jerry_port_logmsg (stdout, "null"); + jerry_port_console ("null"); } else if (jerry_value_is_boolean (value)) { if (jerry_get_boolean_value (value)) { - jerry_port_logmsg (stdout, "true"); + jerry_port_console ("true"); } else { - jerry_port_logmsg (stdout, "false"); + jerry_port_console ("false"); } } /* Float value */ else if (jerry_value_is_number (value)) { - jerry_port_logmsg (stdout, "number"); + jerry_port_console ("number"); } /* String value */ else if (jerry_value_is_string (value)) @@ -215,15 +215,15 @@ print_value (const jerry_value_t value) jerry_string_to_char_buffer (value, str_buf_p, req_sz); - jerry_port_logmsg (stdout, "%s", (const char *) str_buf_p); + jerry_port_console ("%s", (const char *) str_buf_p); } /* Object reference */ else if (jerry_value_is_object (value)) { - jerry_port_logmsg (stdout, "[JS object]"); + jerry_port_console ("[JS object]"); } - jerry_port_logmsg (stdout, "\n"); + jerry_port_console ("\n"); } ``` @@ -264,7 +264,7 @@ main (int argc, char * argv[]) char *cmd_tail = cmd; size_t len = 0; - jerry_port_logmsg (stdout, "> "); + jerry_port_console ("> "); /* Read next command */ while (true) @@ -295,7 +295,7 @@ main (int argc, char * argv[]) { /* Evaluated JS code thrown an exception * and didn't handle it with try-catch-finally */ - jerry_port_errormsg ("Unhandled JS exception occured: "); + jerry_port_console ("Unhandled JS exception occured: "); } print_value (ret_val);