#include <stdio.h> 
#include <epp/epp.h>

/* Synchronous call example */

int main(int argc, char *argv[]) {
    epp_query q;

    /* Initialise Prolog */
    pl_init_from_state(*argv);

    /* PAL: Prolog Call */
    pl_call("runme", NULL);

    /* EPP: Prolog using multi-result API */
    epp_open_query(&q, EPP_DIRECT_CALL, "runme", NULL);
    epp_next_solution(&q);
    epp_close_query(&q);

    /* Shutdown Prolog */
    pl_shutdown();
    return(0);
}
