From b22f9fc31fe6ffc2b95e1a389e584942d6af47ab Mon Sep 17 00:00:00 2001 From: handa Date: Tue, 4 Dec 2007 11:33:14 +0000 Subject: [PATCH] Handle the case of _M17N_H_ being defined. --- src/m17n-flt.h | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/src/m17n-flt.h b/src/m17n-flt.h index 380f823..8afea0c 100644 --- a/src/m17n-flt.h +++ b/src/m17n-flt.h @@ -31,20 +31,29 @@ M17N_BEGIN_HEADER #if !defined (FOR_DOXYGEN) || defined (DOXYGEN_INTERNAL_MODULE) -extern void m17n_init_flt (int); +extern void m17n_init_flt (void); #undef M17N_INIT #ifdef _M17N_H_ -#define M17N_INIT() m17n_init_flt (1) +#define M17N_INIT() \ + do { \ + m17n_init (); \ + if (merror_code == MERROR_NONE) \ + m17n_init_flt (); \ + } while (0) #else /* not _M17N_H_ */ -#define M17N_INIT() m17n_init_flt (0) +#define M17N_INIT() m17n_init_flt () #endif /* not _M17N_H_ */ -extern void m17n_fini_flt (int); +extern void m17n_fini_flt (void); #undef M17N_FINI #ifdef _M17N_H_ -#define M17N_FINI() m17n_fini_flt (1) +#define M17N_FINI() \ + do { \ + m17n_fini_flt (); \ + m17n_fini (); \ + } while (0) #else /* not _M17N_H_ */ -#define M17N_FINI() m17n_fini_flt (0) +#define M17N_FINI() m17n_fini_flt () #endif /* not _M17N_H_ */ #endif -- 1.7.10.4