*** empty log message ***
[m17n/m17n-test.git] / imtest2.c
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include <string.h>
4 #include <m17n.h>
5
6 int
7 main ()
8 {
9   MInputMethod *im;
10   MInputContext *ic;
11   char buf[256];
12   int i;
13
14   for (i = 0; i < 2; i++)
15     {
16       M17N_INIT ();
17       im = minput_open_im (Mt, msymbol ("unicode"), NULL);
18       ic = minput_create_ic (im, NULL);
19       while (fgets (buf, 256, stdin))
20         {
21           if (buf[strlen (buf) - 1] == '\n')
22             buf[strlen (buf) - 1] = '\0';
23           minput_filter (ic, msymbol (buf), NULL);
24         }
25       minput_destroy_ic (ic);
26       minput_close_im (im);
27       M17N_FINI ();
28     }
29   exit (0);
30 }