From d55e092015722c212ddb6f2c3eedec943a379c48 Mon Sep 17 00:00:00 2001 From: "NARUSE, Yui" Date: Mon, 24 Jan 2005 17:19:34 +0000 Subject: [PATCH] * (reinit): should initialize all static variables. [ruby-list:40445] --- nkf.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/nkf.c b/nkf.c index 5f56527..e620549 100644 --- a/nkf.c +++ b/nkf.c @@ -39,7 +39,7 @@ ** E-Mail: furukawa@tcp-ip.or.jp ** まで御連絡をお願いします。 ***********************************************************************/ -/* $Id: nkf.c,v 1.54 2005/01/02 05:46:01 naruse Exp $ */ +/* $Id: nkf.c,v 1.55 2005/01/24 08:19:34 naruse Exp $ */ #define NKF_VERSION "2.0.4" #define NKF_RELEASE_DATE "2005-01-01" #include "config.h" @@ -1322,6 +1322,10 @@ struct input_code * find_inputcode_byfunc(iconv_func) return 0; } +#ifdef CHECK_OPTION +static int (*iconv_for_check)() = 0; +#endif + #ifdef ANSI_C_PROTOTYPE void set_iconv(int f, int (*iconv_func)(int c2,int c1,int c0)) #else @@ -1330,9 +1334,6 @@ void set_iconv(f, iconv_func) int (*iconv_func)(); #endif { -#ifdef CHECK_OPTION - static int (*iconv_for_check)() = 0; -#endif #ifdef INPUT_CODE_FIX if (f || !input_f) #endif @@ -4556,7 +4557,9 @@ reinit() broken_counter = 0; broken_last = 0; z_prev2=0,z_prev1=0; - +#ifdef CHECK_OPTION + iconv_for_check = 0; +#endif } #endif -- 2.11.0