ruby-changes:6655
From: nobu <ko1@a...>
Date: Wed, 23 Jul 2008 03:19:52 +0900 (JST)
Subject: [ruby-changes:6655] Ruby:r18171 (trunk): * ext/nkf/nkf-utf8/nkf.c (struct input_code.name, input_codename):
nobu 2008-07-23 03:19:34 +0900 (Wed, 23 Jul 2008) New Revision: 18171 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=18171 Log: * ext/nkf/nkf-utf8/nkf.c (struct input_code.name, input_codename): constified. Modified files: trunk/ChangeLog trunk/ext/nkf/nkf-utf8/nkf.c Index: ChangeLog =================================================================== --- ChangeLog (revision 18170) +++ ChangeLog (revision 18171) @@ -1,3 +1,8 @@ +Wed Jul 23 03:19:31 2008 Nobuyoshi Nakada <nobu@r...> + + * ext/nkf/nkf-utf8/nkf.c (struct input_code.name, input_codename): + constified. + Wed Jul 23 03:02:08 2008 Nobuyoshi Nakada <nobu@r...> * ext/syck: suppress warnings. Index: ext/nkf/nkf-utf8/nkf.c =================================================================== --- ext/nkf/nkf-utf8/nkf.c (revision 18170) +++ ext/nkf/nkf-utf8/nkf.c (revision 18171) @@ -318,7 +318,7 @@ #endif struct input_code{ - char *name; + const char *name; nkf_char stat; nkf_char score; nkf_char index; @@ -328,7 +328,7 @@ int _file_stat; }; -static char *input_codename = NULL; /* NULL: unestablished, "": BINARY */ +static const char *input_codename = NULL; /* NULL: unestablished, "": BINARY */ static nkf_encoding *input_encoding = NULL; static nkf_encoding *output_encoding = NULL; @@ -439,7 +439,7 @@ #endif static int guess_f = 0; /* 0: OFF, 1: ON, 2: VERBOSE */ -static void set_input_codename(char *codename); +static void set_input_codename(const char *codename); #ifdef EXEC_IO static int exec_f = 0; @@ -3499,7 +3499,7 @@ if (alpha_f&8 && c2 == 0) { /* HTML Entity */ - char *entity = 0; + const char *entity = 0; switch (c1){ case '>': entity = ">"; break; case '<': entity = "<"; break; @@ -3982,7 +3982,7 @@ #endif static void -set_input_codename(char *codename) +set_input_codename(const char *codename) { if (!input_codename) { input_codename = codename; @@ -3991,7 +3991,7 @@ } } -static char* +static const char* get_guessed_code(void) { if (input_codename && !*input_codename) { -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/