From: handa Date: Sun, 13 Feb 2011 23:34:55 +0000 (+0000) Subject: *** empty log message *** X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e93bba51f57dabaff1544d2ab8811b31c1ee16a4;p=m17n%2Fm17n-test.git *** empty log message *** --- diff --git a/Makefile.am b/Makefile.am index 271d7e9..55bd14b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,5 +1,5 @@ noinst_PROGRAMS = \ - linebreak replace mimdemo mimdaemon fifotest1 fifotest2 \ + linebreak replace mimdemo mimdaemon fifotest1 fifotest2 imlist\ imtest findfont gdkdraw finddb imsim langname viewfile pangotest \ flt-gui flt-otf flt-hb flt-pango find-flt test key-aliases conv-by-im \ mim-xml reader2 @@ -49,6 +49,10 @@ find_flt_SOURCES = find-flt.c find_flt_CFLAGS = ${baseCFLAGS} @M17NFLT_CFLAGS@ find_flt_LDFLAGS = ${baseLIBS} @M17NFLT_LIBS@ +imlist_SOURCES = imlist.c +imlist_CFLAGS = @M17N_CFLAGS@ +imlist_LDFLAGS = @M17N_LIBS@ + mim_xml_SOURCES = mim-xml.c mim_xml_CFLAGS = `xml2-config --cflags` mim_xml_LDFLAGS = `xml2-config --libs` diff --git a/imlist.c b/imlist.c new file mode 100644 index 0000000..3735c92 --- /dev/null +++ b/imlist.c @@ -0,0 +1,31 @@ +#include +#include +#include +#include + +int +main (int argc, char **argv) +{ + MSymbol lang; + MPlist *imlist, *pl; + + M17N_INIT (); + lang = (argc > 1) ? msymbol (argv[1]) : Mnil; + imlist = minput_list (lang); + for (pl = imlist; mplist_key (pl) != Mnil; pl = mplist_next (pl)) + { + MPlist *p = mplist_value (pl); + MSymbol name; + + lang = mplist_value (p); + p = mplist_next (p); + name = mplist_value (p); + + printf ("%s %s\n", msymbol_name (lang), msymbol_name (name)); + } + + m17n_object_unref (imlist); + M17N_FINI (); + exit (0); +} +