X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Fm17n-core.c;h=66fef04267dbb6d5e8caa58e69e6ace81f28b1fc;hb=dc435aeb919b8077dbc6fc65cff9d8e973fab915;hp=36204170e6789a70bf5a13863dcf50afc1d2aa6a;hpb=748967427e0c59649099ee428b73f1d6a7987a6c;p=m17n%2Fm17n-lib.git diff --git a/src/m17n-core.c b/src/m17n-core.c index 3620417..66fef04 100644 --- a/src/m17n-core.c +++ b/src/m17n-core.c @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the m17n library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 02111-1307, USA. */ /***en @@ -366,6 +366,7 @@ #include #include #include +#include #include #include #include @@ -534,7 +535,12 @@ m17n_init_core (void) mdebug__output = NULL; if (env_value) - mdebug__output = fopen (env_value, "a"); + { + if (strcmp (env_value, "stdout")) + mdebug__output = stdout; + else + mdebug__output = fopen (env_value, "a"); + } if (! mdebug__output) mdebug__output = stderr; } @@ -559,6 +565,15 @@ m17n_init_core (void) mdatabase__finder = NULL; mdatabase__loader = NULL; +#if ENABLE_NLS + bindtextdomain ("m17n-lib", GETTEXTDIR); + bindtextdomain ("m17n-db", GETTEXTDIR); + bindtextdomain ("m17n-contrib", GETTEXTDIR); + bind_textdomain_codeset ("m17n-lib", "UTF-8"); + bind_textdomain_codeset ("m17n-db", "UTF-8"); + bind_textdomain_codeset ("m17n-contrib", "UTF-8"); +#endif + err: MDEBUG_POP_TIME (); MDEBUG_PRINT_TIME ("INIT", (stderr, " to initialize the core modules.")); @@ -578,14 +593,16 @@ m17n_fini_core (void) MDEBUG_PUSH_TIME (); mchartable__fini (); MDEBUG_PRINT_TIME ("FINI", (stderr, " to finalize chartable module.")); - mtext__prop_fini (); - MDEBUG_PRINT_TIME ("FINI", (stderr, " to finalize textprop module.")); mtext__fini (); MDEBUG_PRINT_TIME ("FINI", (stderr, " to finalize mtext module.")); msymbol__fini (); MDEBUG_PRINT_TIME ("FINI", (stderr, " to finalize symbol module.")); mplist__fini (); MDEBUG_PRINT_TIME ("FINI", (stderr, " to finalize plist module.")); + /* We must call this after the aboves because it frees interval + pools. */ + mtext__prop_fini (); + MDEBUG_PRINT_TIME ("FINI", (stderr, " to finalize textprop module.")); MDEBUG_POP_TIME (); MDEBUG_PRINT_TIME ("FINI", (stderr, " to finalize the core modules.")); MDEBUG_POP_TIME ();