X-Git-Url: http://git.chise.org/gitweb/?p=m17n%2Fm17n-test.git;a=blobdiff_plain;f=test.c;fp=test.c;h=97a8d0b226fb69b19405787bb7ad72e5dc840099;hp=0000000000000000000000000000000000000000;hb=2a663196e7aface7bb4e021c038588ce49f72ae5;hpb=cd803399122dd9368b95036960dd3b130381db4e diff --git a/test.c b/test.c new file mode 100644 index 0000000..97a8d0b --- /dev/null +++ b/test.c @@ -0,0 +1,27 @@ +#include +#include +#include +#include + +int +main () +{ + MFLTOtfSpec spec; + int result; + void *handle; + int (*parse_otf_command) (MSymbol, MFLTOtfSpec *); + + M17N_INIT (); + handle = dlopen (NULL, RTLD_NOW); + if (! handle) + exit (1); + *(void **) (&parse_otf_command) = dlsym (handle, "mflt_find"); + if (dlerror () != NULL) + exit (2); + *(void **) (&parse_otf_command) = dlsym (handle, "parse_otf_command"); + if (dlerror () != NULL) + exit (3); + result = (*parse_otf_command) (msymbol (":otf=arab"), &spec); + printf ("result = %d\n", result); + exit (0); +}