#include <stdio.h>
#include <stdlib.h>
#include <EIMIL.h>

int main(int argc, char **argv)
{
    char buf[1024];
    unsigned char *pfn;
    EIMIL_handle eh, eh2;

    getcwd(buf, sizeof(buf));

    EIMIL_initialize();

    /* test1: register class */
    EIMIL_register_class("org.OpenI18N.test", buf);
    pfn = EIMIL_find_file("org.OpenI18N.test", "parser-test1.xml");

    if (!EIMIL_parse_file(&eh, pfn)) {
	EIMIL_get_errormsg(eh, &pfn);
	fprintf(stderr, "%s\n", pfn);
    }
    EIMIL_send_event(eh, NULL);

    EIMIL_duplicate_handle(&eh2, eh);

    return 0;
}

