#ifdef POSIX_ICONV
if (input_dsc) {
size_t src_len, dst_len;
- up = s;
+ up = (unsigned char *)s;
src_len = strlen(s);
dst_len = sizeof(buf);
if (iconv(input_dsc, (char**)&up, &src_len,
#else
if( IC==EUC && input_kcode == SJIS ){
while(*s){
- up = s;
+ up = (unsigned char *)s;
if(is_kanji(*up)){
pp = sj2e((unsigned char *)s);
*(p++) = pp[0];
#ifdef POSIX_ICONV
if(output_dsc){
size_t src_len, dst_len;
- up = s;
+ up = (unsigned char *)s;
src_len = strlen(s);
dst_len = sizeof(buf);
if(iconv(output_dsc, (char**)&up, &src_len,
#else
if( IC==EUC && output_kcode == SJIS ){
while(*s){
- up = s;
+ up = (unsigned char *)s;
if( *up & 0x80 ){
pp = e2sj((unsigned char *)s);
*(p++) = pp[0];
return c;
}
} else {
- return is_kanji2(s, pos);
+ return is_kanji2((char *)s, pos);
}
}
unsigned char cc[3];
if(IC==SJIS)
- memcpy(cc, (char *)sj2e(c), 2);
+ memcpy(cc, (char *)sj2e((unsigned char *)c), 2);
else
memcpy(cc, c, 2);
if(!is_kanji1(engr, nxt)) return 0;
j = kanji2index(engr[nxt], engr[nxt + 1]);
- if (j >= 0x0000 && j <= 0x02B1) p = &ro0[j << 2];
- else if (j >= 0x0582 && j <= 0x1116) p = &ro1[(j - 0x0582) << 2];
- else if (j >= 0x1142 && j <= 0x1E7F) p = &ro2[(j - 0x1142) << 2];
- else p = "\81H";
+ if (j >= 0x0000 && j <= 0x02B1)
+ p = (unsigned char *)&ro0[j << 2];
+ else if (j >= 0x0582 && j <= 0x1116)
+ p = (unsigned char *)&ro1[(j - 0x0582) << 2];
+ else if (j >= 0x1142 && j <= 0x1E7F)
+ p = (unsigned char *)&ro2[(j - 0x1142) << 2];
+ else p = (unsigned char *)"\81H";
if (p[2] != ' ' || p[3] != ' ') p += select_rnd * 2;
engr[nxt] = *p++;
#if 1 /*JP*/
{
int n;
- n = offset_in_kanji(tmp, bufp - tmp);
+ n = offset_in_kanji((unsigned char *)tmp, bufp - tmp);
if (n > 0) {
/* \8cã\82Å1\83o\83C\83g\88ø\82©\82ê\82é\82Ì\82Å\82»\82Ì\95ª\82Í\82±\82±\82Å\82Í\88ø\82©\82È\82¢ */
bufp = bufp - (n - 1);
#if 0 /*JP*/
} else if (' ' <= (unsigned char) c && c != '\177'
#else
- } else if (' ' <= uc && uc < '\377'
+ } else if (' ' <= uc && uc < 255
#endif
/* avoid isprint() - some people don't have it
' ' is not always a printing char */