*** empty log message ***
[m17n/m17n-test.git] / test.c
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include <dlfcn.h>
4 #include <m17n-flt.h>
5
6 int
7 main ()
8 {
9   MFLTOtfSpec spec;
10   int result;
11   void *handle;
12   int (*parse_otf_command) (MSymbol, MFLTOtfSpec *);
13
14   M17N_INIT ();
15   handle = dlopen (NULL, RTLD_NOW);
16   if (! handle)
17     exit (1);
18   *(void **) (&parse_otf_command) = dlsym (handle, "mflt_find");
19   if (dlerror () != NULL)
20     exit (2);
21   *(void **) (&parse_otf_command) = dlsym (handle, "parse_otf_command");
22   if (dlerror () != NULL)
23     exit (3);
24   result = (*parse_otf_command) (msymbol (":otf=arab"), &spec);
25   printf ("result = %d\n", result);
26   exit (0);
27 }