ni: fix bug when executing a callback to Nit on an extern receiver

A missing "not" was causing this bug. Only boxed types should be
prepared before a callback to Nit, not tagged types.

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
lib: fix write_char to use more standard C code

The previous implementation was not supported by some compilers.

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
ni: fix use of multiple native global refs and according test

Fix a bug occuring when the number of global references from the
C code was higher than one.

The according test is moved from the native interface format to
the FFI. It also has a more complex test case.

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
lib: fix Float::to_precision

The new implementation works as expected. It may not be ideal because we
do not have access to the math module. For this reason, we use the FFI
to access fprintf.

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
tests.sh: adds env var to notify tested programs of automated tests

Allows for tested programs to know if it is executed normally or if it
is being executed by an automated test. The program may then avoid to
display UI and such.

Will be used the the calculator example program.

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
lib: intro of the GTK module

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
examples: adds an example use of the gtk module, calculator

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
ni: fixes type check in C to support null instances

This commit fixes a bug where a call to Object_is_a_nullable_Something
failed with a null argument, also concerns Object_as_nullable_Something.

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Merge branch 'alexis/libs/gtk'

Conflicts:
	tests/sav/nitstats_args1.sav