Revision | 7edca5947d0bf9d5abd3e3a1e806859388116ded (tree) |
---|---|
Time | 2022-10-23 02:29:17 |
Author | SHIRAKATA Kentaro <argrath@ub32...> |
Commiter | SHIRAKATA Kentaro |
remove ic2str
@@ -3025,9 +3025,6 @@ E void FDECL(setkcode,(int)); | ||
3025 | 3025 | E unsigned char *FDECL(e2sj, (unsigned char *)); |
3026 | 3026 | E unsigned char *FDECL(sj2e, (unsigned char *)); |
3027 | 3027 | E const char *FDECL(str2ic, (const char *)); |
3028 | -#ifdef SJIS_FILESYSTEM | |
3029 | -E const char *FDECL(ic2str, (const char *)); | |
3030 | -#endif | |
3031 | 3028 | E int FDECL(jbuffer, (unsigned int, unsigned int *, void (*)(unsigned int), void (*)(unsigned char *))); |
3032 | 3029 | E int FDECL(cbuffer, (unsigned int)); |
3033 | 3030 | E void FDECL(cputchar,(int)); |
@@ -232,63 +232,6 @@ noconvert: | ||
232 | 232 | } |
233 | 233 | |
234 | 234 | /* |
235 | -** translate string to output kcode | |
236 | -*/ | |
237 | -const char * | |
238 | -ic2str(s) | |
239 | - const char *s; | |
240 | -{ | |
241 | - static unsigned char buf[1024]; | |
242 | - const unsigned char *up; | |
243 | - unsigned char *p; | |
244 | -#ifndef POSIX_ICONV | |
245 | - unsigned char *pp; | |
246 | -#endif | |
247 | - | |
248 | - if(!s) | |
249 | - return s; | |
250 | - | |
251 | - buf[0] = '\0'; | |
252 | - | |
253 | - p = buf; | |
254 | -#ifdef POSIX_ICONV | |
255 | - if(output_dsc){ | |
256 | - size_t src_len, dst_len; | |
257 | - up = (unsigned char *)s; | |
258 | - src_len = strlen(s); | |
259 | - dst_len = sizeof(buf); | |
260 | - if(iconv(output_dsc, (char**)&up, &src_len, | |
261 | - (char**)&p, &dst_len) == (size_t)-1) | |
262 | - goto noconvert; | |
263 | - } | |
264 | -#else | |
265 | - if( IC==EUC && output_kcode == SJIS ){ | |
266 | - while(*s){ | |
267 | - up = (unsigned char *)s; | |
268 | - if( *up & 0x80 ){ | |
269 | - pp = e2sj((unsigned char *)s); | |
270 | - *(p++) = pp[0]; | |
271 | - *(p++) = pp[1]; | |
272 | - s += 2; | |
273 | - } | |
274 | - else | |
275 | - *(p++) = (unsigned char)*(s++); | |
276 | - } | |
277 | - } | |
278 | -#endif | |
279 | - else{ | |
280 | -#ifdef POSIX_ICONV | |
281 | -noconvert: | |
282 | -#endif | |
283 | - strcpy((char *)buf, s); | |
284 | - return (char *)buf; | |
285 | - } | |
286 | - | |
287 | - *(p++) = '\0'; | |
288 | - return (char *)buf; | |
289 | -} | |
290 | - | |
291 | -/* | |
292 | 235 | ** primitive function |
293 | 236 | */ |
294 | 237 |