ruby-changes:4655
From: ko1@a...
Date: Tue, 22 Apr 2008 21:21:01 +0900 (JST)
Subject: [ruby-changes:4655] naruse - Ruby:r16149 (trunk): * ext/nkf/nkf-utf8/nkf.c (score_table_A0, score_table_F0):
naruse 2008-04-22 21:20:36 +0900 (Tue, 22 Apr 2008) New Revision: 16149 Modified files: trunk/ChangeLog trunk/ext/nkf/nkf-utf8/nkf.c trunk/ext/nkf/nkf.c Log: * ext/nkf/nkf-utf8/nkf.c (score_table_A0, score_table_F0): type of content is unsigned char. * ext/nkf/nkf-utf8/nkf.c (push_broken_buf): 'c' is nkf_char. * ext/nkf/nkf-utf8/nkf.c (push_broken_buf): enc is 0 or pointer. * ext/nkf//nkf.c (options): type of option is unsigned char. http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=16149&r2=16148&diff_format=u http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ext/nkf/nkf.c?r1=16149&r2=16148&diff_format=u http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ext/nkf/nkf-utf8/nkf.c?r1=16149&r2=16148&diff_format=u Index: ChangeLog =================================================================== --- ChangeLog (revision 16148) +++ ChangeLog (revision 16149) @@ -1,3 +1,14 @@ +Tue Apr 22 21:09:05 2008 NARUSE, Yui <naruse@r...> + + * ext/nkf/nkf-utf8/nkf.c (score_table_A0, score_table_F0): + type of content is unsigned char. + + * ext/nkf/nkf-utf8/nkf.c (push_broken_buf): 'c' is nkf_char. + + * ext/nkf/nkf-utf8/nkf.c (push_broken_buf): enc is 0 or pointer. + + * ext/nkf//nkf.c (options): type of option is unsigned char. + Tue Apr 22 20:51:58 2008 NARUSE, Yui <naruse@r...> * ext/nkf/nkf-utf8/nkf.c (z_conv): characters must be nkf_char. Index: ext/nkf/nkf.c =================================================================== --- ext/nkf/nkf.c (revision 16148) +++ ext/nkf/nkf.c (revision 16149) @@ -80,7 +80,7 @@ int nkf_split_options(const char *arg) { int count = 0; - char option[256]; + unsigned char option[256]; int i = 0, j = 0; int is_escaped = FALSE; int is_single_quoted = FALSE; Index: ext/nkf/nkf-utf8/nkf.c =================================================================== --- ext/nkf/nkf-utf8/nkf.c (revision 16148) +++ ext/nkf/nkf-utf8/nkf.c (revision 16149) @@ -2456,14 +2456,14 @@ #define SCORE_INIT (SCORE_iMIME) -static const char score_table_A0[] = { +static const unsigned char score_table_A0[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, SCORE_DEPEND, SCORE_DEPEND, SCORE_DEPEND, SCORE_DEPEND, SCORE_DEPEND, SCORE_DEPEND, SCORE_NO_EXIST, }; -static const char score_table_F0[] = { +static const unsigned char score_table_F0[] = { SCORE_L2, SCORE_L2, SCORE_L2, SCORE_L2, SCORE_L2, SCORE_DEPEND, SCORE_NO_EXIST, SCORE_NO_EXIST, SCORE_DEPEND, SCORE_DEPEND, SCORE_CP932, SCORE_CP932, @@ -3041,7 +3041,7 @@ memset(&broken_state, 0, sizeof(broken_state)); } -static void push_broken_buf(c) +static void push_broken_buf(nkf_char c) { broken_state.buf[broken_state.count++] = c; } @@ -5599,7 +5599,7 @@ if (strcmp(long_option[i].name, "oc=") == 0){ nkf_str_upcase((char *)p, codeset, 32); enc = nkf_enc_find(codeset); - if (enc <= 0) continue; + if (enc == 0) continue; output_encoding = enc; continue; } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/