@@ -281,30 +281,6 @@ namespace cppp{namespace base{namespace reiconv
281281 typedef int verify_size_1[2 * (sizeof (struct conv_struct ) <= sizeof (iconv_allocation_t )) - 1 ];
282282 typedef int verify_size_2[2 * (sizeof (struct wchar_conv_struct ) <= sizeof (iconv_allocation_t )) - 1 ];
283283
284- int iconv_open_into (const char * tocode, const char * fromcode,
285- iconv_allocation_t * resultp)
286- {
287- struct conv_struct * cd;
288- unsigned int from_index;
289- int from_wchar;
290- unsigned int from_surface;
291- unsigned int to_index;
292- int to_wchar;
293- unsigned int to_surface;
294- int discard_ilseq;
295-
296- #include " iconv_open1.h"
297-
298- cd = (struct conv_struct *) resultp;
299-
300- #include " iconv_open2.h"
301-
302- return 0 ;
303- invalid:
304- errno = EINVAL;
305- return -1 ;
306- }
307-
308284 /* Bit mask of all valid surfaces. */
309285 #define ALL_SURFACES (ICONV_SURFACE_EBCDIC_ZOS_UNIX)
310286
@@ -510,61 +486,7 @@ namespace cppp{namespace base{namespace reiconv
510486 # include " canonical_local.h"
511487 #endif
512488 };
513-
514- const char * iconv_canonicalize (const char * name)
515- {
516- const char * code;
517- char buf[MAX_WORD_LENGTH+10 +1 ];
518- const char * cp;
519- char * bp;
520- const struct alias * ap;
521- unsigned int count;
522- unsigned int index;
523- const char * pool;
524-
525- /* Before calling aliases_lookup, convert the input string to upper case,
526- * and check whether it's entirely ASCII (we call gperf with option "-7"
527- * to achieve a smaller table) and non-empty. If it's not entirely ASCII,
528- * or if it's too long, it is not a valid encoding name.
529- */
530- for (code = name;;) {
531- /* Search code in the table. */
532- for (cp = code, bp = buf, count = MAX_WORD_LENGTH+10 +1 ; ; cp++, bp++) {
533- unsigned char c = (unsigned char ) *cp;
534- if (c >= 0x80 )
535- goto invalid;
536- if (c >= ' a' && c <= ' z' )
537- c -= ' a' -' A' ;
538- *bp = c;
539- if (c == ' \0 ' )
540- break ;
541- if (--count == 0 )
542- goto invalid;
543- }
544- for (;;) {
545- if (bp-buf >= 8 && memcmp (bp-8 ," //IGNORE" ,8 )==0 ) {
546- bp -= 8 ;
547- *bp = ' \0 ' ;
548- continue ;
549- }
550- break ;
551- }
552- pool = stringpool;
553- ap = aliases_lookup (buf,bp-buf);
554- if (ap == NULL ) {
555- pool = stringpool2;
556- ap = aliases2_lookup (buf);
557- if (ap == NULL )
558- goto invalid;
559- }
560- index = ap->encoding_index ;
561- break ;
562- }
563- return all_canonical[index] + pool;
564- invalid:
565- return name;
566- }
567-
489+
568490 /* version number: (major<<8) + minor */
569491 int reiconv_version = (3 << 8 ) + 0 ;
570492
0 commit comments