Author: atsushi
Date: 2005-04-06 09:01:37 -0400 (Wed, 06 Apr 2005)
New Revision: 42604

Modified:
   trunk/mono/mono/metadata/ChangeLog
   trunk/mono/mono/metadata/icall.c
   trunk/mono/mono/metadata/locales.c
Log:
2005-04-06  Atsushi Enomoto  <[EMAIL PROTECTED]>

        * locales.c,
          icall.c : removed InternalToUpper_Comp() and
          InternalToLower_Comp().



Modified: trunk/mono/mono/metadata/ChangeLog
===================================================================
--- trunk/mono/mono/metadata/ChangeLog  2005-04-06 12:55:25 UTC (rev 42603)
+++ trunk/mono/mono/metadata/ChangeLog  2005-04-06 13:01:37 UTC (rev 42604)
@@ -1,5 +1,11 @@
 2005-04-06  Atsushi Enomoto  <[EMAIL PROTECTED]>
 
+       * locales.c,
+         icall.c : removed InternalToUpper_Comp() and
+         InternalToLower_Comp().
+
+2005-04-06  Atsushi Enomoto  <[EMAIL PROTECTED]>
+
        * char-conversions.h : The tables were incorrectly generated. Should
          be generated against invariant culture.
 

Modified: trunk/mono/mono/metadata/icall.c
===================================================================
--- trunk/mono/mono/metadata/icall.c    2005-04-06 12:55:25 UTC (rev 42603)
+++ trunk/mono/mono/metadata/icall.c    2005-04-06 13:01:37 UTC (rev 42604)
@@ -5903,9 +5903,7 @@
 };
 
 static const IcallEntry char_icalls [] = {
-       {"GetDataTablePointers", ves_icall_System_Char_GetDataTablePointers},
-       {"InternalToLower(char,System.Globalization.CultureInfo)", 
ves_icall_System_Char_InternalToLower_Comp},
-       {"InternalToUpper(char,System.Globalization.CultureInfo)", 
ves_icall_System_Char_InternalToUpper_Comp}
+       {"GetDataTablePointers", ves_icall_System_Char_GetDataTablePointers}
 };
 
 static const IcallEntry defaultconf_icalls [] = {
@@ -6496,8 +6494,6 @@
        {"InternalStrcpy(string,int,char[],int,int)", 
ves_icall_System_String_InternalStrcpy_CharsN},
        {"InternalStrcpy(string,int,string)", 
ves_icall_System_String_InternalStrcpy_Str},
        {"InternalStrcpy(string,int,string,int,int)", 
ves_icall_System_String_InternalStrcpy_StrN},
-       {"InternalToLower(System.Globalization.CultureInfo)", 
ves_icall_System_String_InternalToLower_Comp},
-       {"InternalToUpper(System.Globalization.CultureInfo)", 
ves_icall_System_String_InternalToUpper_Comp},
        {"InternalTrim", ves_icall_System_String_InternalTrim},
        {"get_Chars", ves_icall_System_String_get_Chars}
 };

Modified: trunk/mono/mono/metadata/locales.c
===================================================================
--- trunk/mono/mono/metadata/locales.c  2005-04-06 12:55:25 UTC (rev 42603)
+++ trunk/mono/mono/metadata/locales.c  2005-04-06 13:01:37 UTC (rev 42604)
@@ -1521,190 +1521,7 @@
        return(ret);
 }
 
-MonoString *ves_icall_System_String_InternalToLower_Comp (MonoString *this, 
MonoCultureInfo *cult)
-{
-       MonoString *ret;
-       UChar *udest;
-       UErrorCode ec;
-       char *icu_loc;
-       int32_t len;
-
-       MONO_ARCH_SAVE_REGS;
-
-#ifdef DEBUG
-       g_message (G_GNUC_PRETTY_FUNCTION ": [%s]",
-                  mono_string_to_utf8 (this));
-#endif
-
-#ifdef DEBUG
-       g_message (G_GNUC_PRETTY_FUNCTION ": LCID is %d", cult->lcid);
-#endif
-
-       icu_loc=mono_string_to_icu_locale (cult->icu_name);
-       if(icu_loc==NULL) {
-               mono_raise_exception ((MonoException *)mono_exception_from_name 
(mono_get_corlib (), "System", "SystemException"));
-               return(NULL);
-       }
-       
-       udest=(UChar *)g_malloc0 (sizeof(UChar)*(mono_string_length (this)+1));
-       
-       /* According to the docs, this might result in a longer or
-        * shorter string than we started with...
-        */
-
-       ec=U_ZERO_ERROR;
-       len=u_strToLower (udest, mono_string_length (this)+1,
-                         mono_string_chars (this), mono_string_length (this),
-                         icu_loc, &ec);
-       if(ec==U_BUFFER_OVERFLOW_ERROR ||
-          ec==U_STRING_NOT_TERMINATED_WARNING) {
-               g_free (udest);
-               udest=(UChar *)g_malloc0 (sizeof(UChar)*(len+1));
-               len=u_strToLower (udest, len+1, mono_string_chars (this),
-                                 mono_string_length (this), icu_loc, &ec);
-       }
-
-       if(U_SUCCESS (ec)) {
-               ret=mono_string_from_utf16 ((gunichar2 *)udest);
-       } else {
-               g_message (G_GNUC_PRETTY_FUNCTION ": u_strToLower error: %s",
-                          u_errorName (ec));
-               /* return something */
-               ret=this;
-       }
-       
-       g_free (icu_loc);
-       g_free (udest);
-       
-#ifdef DEBUG
-       g_message (G_GNUC_PRETTY_FUNCTION ": returning [%s]",
-                  mono_string_to_utf8 (ret));
-#endif
-
-       return(ret);
-}
-
-MonoString *ves_icall_System_String_InternalToUpper_Comp (MonoString *this, 
MonoCultureInfo *cult)
-{
-       MonoString *ret;
-       UChar *udest;
-       UErrorCode ec;
-       char *icu_loc;
-       int32_t len;
-
-       MONO_ARCH_SAVE_REGS;
-
-#ifdef DEBUG
-       g_message (G_GNUC_PRETTY_FUNCTION ": [%s]",
-                  mono_string_to_utf8 (this));
-#endif
-
-#ifdef DEBUG
-       g_message (G_GNUC_PRETTY_FUNCTION ": LCID is %d", cult->lcid);
-#endif
-
-       icu_loc=mono_string_to_icu_locale (cult->icu_name);
-       if(icu_loc==NULL) {
-               mono_raise_exception ((MonoException *)mono_exception_from_name 
(mono_get_corlib (), "System", "SystemException"));
-               return(NULL);
-       }
-       
-       udest=(UChar *)g_malloc0 (sizeof(UChar)*(mono_string_length (this)+1));
-       
-       /* According to the docs, this might result in a longer or
-        * shorter string than we started with...
-        */
-
-       ec=U_ZERO_ERROR;
-       len=u_strToUpper (udest, mono_string_length (this)+1,
-                         mono_string_chars (this), mono_string_length (this),
-                         icu_loc, &ec);
-       if(ec==U_BUFFER_OVERFLOW_ERROR ||
-          ec==U_STRING_NOT_TERMINATED_WARNING) {
-               g_free (udest);
-               udest=(UChar *)g_malloc0 (sizeof(UChar)*(len+1));
-               len=u_strToUpper (udest, len+1, mono_string_chars (this),
-                                 mono_string_length (this), icu_loc, &ec);
-       }
-
-       if(U_SUCCESS (ec)) {
-               ret=mono_string_from_utf16 ((gunichar2 *)udest);
-       } else {
-               g_message (G_GNUC_PRETTY_FUNCTION ": u_strToUpper error: %s",
-                          u_errorName (ec));
-               /* return something */
-               ret=this;
-       }
-       
-       g_free (icu_loc);
-       g_free (udest);
-       
-#ifdef DEBUG
-       g_message (G_GNUC_PRETTY_FUNCTION ": returning [%s]",
-                  mono_string_to_utf8 (ret));
-#endif
-       
-       return(ret);
-}
-
-gunichar2 ves_icall_System_Char_InternalToUpper_Comp (gunichar2 c, 
MonoCultureInfo *cult)
-{
-       UChar udest;
-       UErrorCode ec;
-       char *icu_loc;
-       int32_t len;
-       
-       MONO_ARCH_SAVE_REGS;
-
-       icu_loc=mono_string_to_icu_locale (cult->icu_name);
-       if(icu_loc==NULL) {
-               mono_raise_exception ((MonoException *)mono_exception_from_name 
(mono_get_corlib (), "System", "SystemException"));
-               return(0);
-       }
-       
-       ec=U_ZERO_ERROR;
-       len=u_strToUpper (&udest, 1, &c, 1, icu_loc, &ec);
-       g_free (icu_loc);
-
-       if(U_SUCCESS (ec) && len==1) {
-               return udest;
-       } else {
-               /* return something */
-               return c;
-       }
-}
-
-
-gunichar2 ves_icall_System_Char_InternalToLower_Comp (gunichar2 c, 
MonoCultureInfo *cult)
-{
-       UChar udest;
-       UErrorCode ec;
-       char *icu_loc;
-       int32_t len;
-       
-       MONO_ARCH_SAVE_REGS;
-
-       icu_loc=mono_string_to_icu_locale (cult->icu_name);
-       if(icu_loc==NULL) {
-               mono_raise_exception ((MonoException *)mono_exception_from_name 
(mono_get_corlib (), "System", "SystemException"));
-               return(0);
-       }
-       
-       ec=U_ZERO_ERROR;
-       len=u_strToLower (&udest, 1, &c, 1, icu_loc, &ec);
-       g_free (icu_loc);
-
-       if(U_SUCCESS (ec) && len==1) {
-               return udest;
-       } else {
-               /* return something */
-               return c;
-       }
-}
-
 #else /* HAVE_ICU */
-static MonoString *string_invariant_tolower (MonoString *this);
-static MonoString *string_invariant_toupper (MonoString *this);
 
 void ves_icall_System_Globalization_CultureInfo_construct_internal_locale 
(MonoCultureInfo *this, MonoString *locale)
 {
@@ -1788,75 +1605,6 @@
        return(string_invariant_replace (this, old, new));
 }
 
-MonoString *ves_icall_System_String_InternalToLower_Comp (MonoString *this, 
MonoCultureInfo *cult)
-{
-       MONO_ARCH_SAVE_REGS;
-       
-       return(string_invariant_tolower (this));
-}
-
-MonoString *ves_icall_System_String_InternalToUpper_Comp (MonoString *this, 
MonoCultureInfo *cult)
-{
-       MONO_ARCH_SAVE_REGS;
-       
-       return(string_invariant_toupper (this));
-}
-
-gunichar2 ves_icall_System_Char_InternalToUpper_Comp (gunichar2 c, 
MonoCultureInfo *cult)
-{
-       MONO_ARCH_SAVE_REGS;
-
-       return g_unichar_toupper (c);
-}
-
-
-gunichar2 ves_icall_System_Char_InternalToLower_Comp (gunichar2 c, 
MonoCultureInfo *cult)
-{
-       MONO_ARCH_SAVE_REGS;
-
-       return g_unichar_tolower (c);
-}
-
-static MonoString *string_invariant_tolower (MonoString *this)
-{
-       MonoString *ret;
-       gunichar2 *src; 
-       gunichar2 *dest;
-       gint32 i;
-
-       ret = mono_string_new_size(mono_domain_get (),
-                                  mono_string_length(this));
-
-       src = mono_string_chars (this);
-       dest = mono_string_chars (ret);
-
-       for (i = 0; i < mono_string_length (this); ++i) {
-               dest[i] = g_unichar_tolower(src[i]);
-       }
-
-       return(ret);
-}
-
-static MonoString *string_invariant_toupper (MonoString *this)
-{
-       MonoString *ret;
-       gunichar2 *src; 
-       gunichar2 *dest;
-       guint32 i;
-
-       ret = mono_string_new_size(mono_domain_get (),
-                                  mono_string_length(this));
-
-       src = mono_string_chars (this);
-       dest = mono_string_chars (ret);
-
-       for (i = 0; i < mono_string_length (this); ++i) {
-               dest[i] = g_unichar_toupper(src[i]);
-       }
-
-       return(ret);
-}
-
 #endif /* HAVE_ICU */
 
 static gint32 string_invariant_compare_char (gunichar2 c1, gunichar2 c2,

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to