OSDN Git Service

remove ic2str
authorSHIRAKATA Kentaro <argrath@ub32.org>
Fri, 7 Jan 2022 20:58:35 +0000 (05:58 +0900)
committerSHIRAKATA Kentaro <argrath@ub32.org>
Sat, 22 Oct 2022 17:29:17 +0000 (02:29 +0900)
include/extern.h
japanese/jlib.c

index b38a183..e7f1440 100644 (file)
@@ -3025,9 +3025,6 @@ E void FDECL(setkcode,(int));
 E unsigned char *FDECL(e2sj, (unsigned char *));
 E unsigned char *FDECL(sj2e, (unsigned char *));
 E const char *FDECL(str2ic, (const char *));
-#ifdef SJIS_FILESYSTEM
-E const char *FDECL(ic2str, (const char *));
-#endif
 E int FDECL(jbuffer, (unsigned int, unsigned int *, void (*)(unsigned int), void (*)(unsigned char *)));
 E int FDECL(cbuffer, (unsigned int));
 E void FDECL(cputchar,(int));
index 42674d9..873fa93 100644 (file)
@@ -232,63 +232,6 @@ noconvert:
 }
 
 /*
-**      translate string to output kcode
-*/
-const char *
-ic2str(s)
-     const char *s;
-{
-    static unsigned char buf[1024];
-    const unsigned char *up;
-    unsigned char *p;
-#ifndef POSIX_ICONV
-    unsigned char *pp;
-#endif
-
-    if(!s)
-      return s;
-
-    buf[0] = '\0';
-
-    p = buf;
-#ifdef POSIX_ICONV
-    if(output_dsc){
-        size_t src_len, dst_len;
-        up = (unsigned char *)s;
-        src_len = strlen(s);
-        dst_len = sizeof(buf);
-        if(iconv(output_dsc, (char**)&up, &src_len,
-                (char**)&p, &dst_len) == (size_t)-1)
-            goto noconvert;
-    }
-#else
-    if( IC==EUC && output_kcode == SJIS ){
-        while(*s){
-            up = (unsigned char *)s;
-            if( *up & 0x80 ){
-                pp = e2sj((unsigned char *)s);
-                *(p++) = pp[0];
-                *(p++) = pp[1];
-                s += 2;
-            }
-            else
-              *(p++) = (unsigned char)*(s++);
-        }
-    }
-#endif
-    else{
-#ifdef POSIX_ICONV
-noconvert:
-#endif
-        strcpy((char *)buf, s);
-        return (char *)buf;
-    }
-
-    *(p++) = '\0';
-    return (char *)buf;
-}
-
-/*
 **      primitive function
 */