Commit MetaInfo

Revision7edca5947d0bf9d5abd3e3a1e806859388116ded (tree)
Time2022-10-23 02:29:17
AuthorSHIRAKATA Kentaro <argrath@ub32...>
CommiterSHIRAKATA Kentaro

Log Message

remove ic2str

Change Summary

Incremental Difference

--- a/include/extern.h
+++ b/include/extern.h
@@ -3025,9 +3025,6 @@ E void FDECL(setkcode,(int));
30253025 E unsigned char *FDECL(e2sj, (unsigned char *));
30263026 E unsigned char *FDECL(sj2e, (unsigned char *));
30273027 E const char *FDECL(str2ic, (const char *));
3028-#ifdef SJIS_FILESYSTEM
3029-E const char *FDECL(ic2str, (const char *));
3030-#endif
30313028 E int FDECL(jbuffer, (unsigned int, unsigned int *, void (*)(unsigned int), void (*)(unsigned char *)));
30323029 E int FDECL(cbuffer, (unsigned int));
30333030 E void FDECL(cputchar,(int));
--- a/japanese/jlib.c
+++ b/japanese/jlib.c
@@ -232,63 +232,6 @@ noconvert:
232232 }
233233
234234 /*
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-/*
292235 ** primitive function
293236 */
294237
Show on old repository browser