summaryrefslogtreecommitdiff
path: root/ext/nkf
diff options
context:
space:
mode:
Diffstat (limited to 'ext/nkf')
-rw-r--r--ext/nkf/nkf-utf8/nkf.c8
-rw-r--r--ext/nkf/nkf.c2
2 files changed, 5 insertions, 5 deletions
diff --git a/ext/nkf/nkf-utf8/nkf.c b/ext/nkf/nkf-utf8/nkf.c
index 084b2c469f..523462362b 100644
--- a/ext/nkf/nkf-utf8/nkf.c
+++ b/ext/nkf/nkf-utf8/nkf.c
@@ -2456,14 +2456,14 @@ void w_oconv32(nkf_char c2, nkf_char c1)
#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 @@ static void init_broken_state(void)
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 @@ void options(unsigned char *cp)
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;
}
diff --git a/ext/nkf/nkf.c b/ext/nkf/nkf.c
index ba8ffc978f..c11a042c57 100644
--- a/ext/nkf/nkf.c
+++ b/ext/nkf/nkf.c
@@ -80,7 +80,7 @@ rb_encoding* rb_nkf_enc_get(const char *name)
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;