graphviz_swiprolog.c 250 Bytes
Newer Older
Thierry Martinez's avatar
Thierry Martinez committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#include <SWI-Prolog.h>

static foreign_t
pl_say_hello(term_t to) {
    char *a;

    if (PL_get_atom_chars(to, &a)) {
        PL_succeed;
    }

    PL_fail;
}

install_t
install_mylib() {
    PL_register_foreign("say_hello", 1, pl_say_hello, 0);
}