bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

striconveh: optimize conversion from UTF-8 to UTF-8


From: Bruno Haible
Subject: striconveh: optimize conversion from UTF-8 to UTF-8
Date: Sun, 30 Mar 2008 17:58:11 +0100
User-agent: KMail/1.5.4

A minor optimization.

2008-03-30  Bruno Haible  <address@hidden>

        * lib/striconveh.h (mem_iconveh, str_iconveh): Optimize the conversion
        from UTF-8 to UTF-8//TRANSLIT in the same way as from UTF-8 to UTF-8.

*** lib/striconveh.c.orig       2008-03-30 18:56:21.000000000 +0200
--- lib/striconveh.c    2008-03-30 18:54:15.000000000 +0200
***************
*** 1017,1023 ****
            }
        }
  
!       if (STRCASEEQ (to_codeset, "UTF-8", 'U','T','F','-','8',0,0,0,0))
        cd2 = (iconv_t)(-1);
        else
        {
--- 1017,1027 ----
            }
        }
  
!       if (STRCASEEQ (to_codeset, "UTF-8", 'U','T','F','-','8',0,0,0,0)
! # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2 || 
_LIBICONV_VERSION >= 0x0105
!         || c_strcasecmp (to_codeset, "UTF-8//TRANSLIT") == 0
! # endif
!        )
        cd2 = (iconv_t)(-1);
        else
        {
***************
*** 1153,1159 ****
            }
        }
  
!       if (STRCASEEQ (to_codeset, "UTF-8", 'U','T','F','-','8',0,0,0,0))
        cd2 = (iconv_t)(-1);
        else
        {
--- 1157,1167 ----
            }
        }
  
!       if (STRCASEEQ (to_codeset, "UTF-8", 'U','T','F','-','8',0,0,0,0)
! # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2 || 
_LIBICONV_VERSION >= 0x0105
!         || c_strcasecmp (to_codeset, "UTF-8//TRANSLIT") == 0
! # endif
!        )
        cd2 = (iconv_t)(-1);
        else
        {





reply via email to

[Prev in Thread] Current Thread [Next in Thread]