You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Sami Vaarala cf01194f44 Add print-alert extra 9 years ago
..
Makefile Add print-alert extra 9 years ago
README.rst Add print-alert extra 9 years ago
duk_print_alert.c Add print-alert extra 9 years ago
duk_print_alert.h Add print-alert extra 9 years ago
test.c Add print-alert extra 9 years ago

README.rst

===================================================
Duktape 1.x compatible print() and alert() bindings
===================================================

The default ``print()`` and ``alert()`` built-ins were removed in Duktape 2.x
because they depended on stdout/stderr and were thus a portability issue for
some targets. This directory contains Duktape 1.x compatible optional
print() and alert() bindings:

* Add ``duk_print_alert.c`` to list of C sources to compile.

* Ensure ``duk_print_alert.h`` is in the include path.

* Include the extra header in calling code::

#include "duktape.h"
#include "duk_print_alert.h"

/* After initializing the Duktape heap or when creating a new
* thread with a new global environment:
*/
duk_print_alert_init(ctx);

* After these steps, ``print()`` and ``alert()`` will be registered to the
global object and are ready to use.