From: handa Date: Tue, 4 Dec 2007 01:46:18 +0000 (+0000) Subject: (m17n_init_flt, m17n_fini_flt): New arg with_shell. X-Git-Tag: REL-1-5-0~32 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=36610619e7253e1124e11f35fefd2323edd458ea;p=m17n%2Fm17n-lib.git (m17n_init_flt, m17n_fini_flt): New arg with_shell. --- diff --git a/src/m17n-flt.c b/src/m17n-flt.c index 8268ae7..65f9d75 100644 --- a/src/m17n-flt.c +++ b/src/m17n-flt.c @@ -2177,20 +2177,25 @@ int m17n__flt_initialized; by the macro M17N_INIT (). */ void -m17n_init_flt (void) +m17n_init_flt (int with_shell) { int mdebug_flag = MDEBUG_INIT; merror_code = MERROR_NONE; - if (m17n__flt_initialized++) - return; + if (m17n__flt_initialized) + { + m17n__flt_initialized++; + return; + } m17n_init_core (); if (merror_code != MERROR_NONE) + return; + if (with_shell) { - m17n__flt_initialized--; - return; + m17n_init (); + if (merror_code != MERROR_NONE) + return; } - MDEBUG_PUSH_TIME (); Mcond = msymbol ("cond"); @@ -2204,10 +2209,11 @@ m17n_init_flt (void) MDEBUG_PRINT_TIME ("INIT", (stderr, " to initialize the flt modules.")); MDEBUG_POP_TIME (); + m17n__flt_initialized++; } void -m17n_fini_flt (void) +m17n_fini_flt (int with_shell) { int mdebug_flag = MDEBUG_FINI; @@ -2219,6 +2225,8 @@ m17n_fini_flt (void) free_flt_list (); MDEBUG_PRINT_TIME ("FINI", (stderr, " to finalize the flt modules.")); MDEBUG_POP_TIME (); + if (with_shell) + m17n_fini (); m17n_fini_core (); }