summaryrefslogtreecommitdiff
path: root/ext/nkf/nkf-utf8
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-07-22 18:19:34 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-07-22 18:19:34 +0000
commite35550c3e7784921734dc3a8128cf7c0f94879c9 (patch)
tree9463892468e81ca292e8514b25c92decce95e594 /ext/nkf/nkf-utf8
parent5c0dcf52fd376d4b075e9ec0d402369a449fa441 (diff)
* ext/nkf/nkf-utf8/nkf.c (struct input_code.name, input_codename):
constified. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/nkf/nkf-utf8')
-rw-r--r--ext/nkf/nkf-utf8/nkf.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/nkf/nkf-utf8/nkf.c b/ext/nkf/nkf-utf8/nkf.c
index 136ebf2..a4ad15d 100644
--- a/ext/nkf/nkf-utf8/nkf.c
+++ b/ext/nkf/nkf-utf8/nkf.c
@@ -318,7 +318,7 @@ extern POINT _BufferSize;
#endif
struct input_code{
- char *name;
+ const char *name;
nkf_char stat;
nkf_char score;
nkf_char index;
@@ -328,7 +328,7 @@ struct input_code{
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 @@ static nkf_char (*iconv_for_check)(nkf_char c2,nkf_char c1,nkf_char c0) = 0;
#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 @@ z_conv(nkf_char c2, nkf_char c1)
if (alpha_f&8 && c2 == 0) {
/* HTML Entity */
- char *entity = 0;
+ const char *entity = 0;
switch (c1){
case '>': entity = "&gt;"; break;
case '<': entity = "&lt;"; break;
@@ -3982,7 +3982,7 @@ debug(const char *str)
#endif
static void
-set_input_codename(char *codename)
+set_input_codename(const char *codename)
{
if (!input_codename) {
input_codename = codename;
@@ -3991,7 +3991,7 @@ set_input_codename(char *codename)
}
}
-static char*
+static const char*
get_guessed_code(void)
{
if (input_codename && !*input_codename) {