mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-12 10:45:13 +01:00
Handle the end of the string properly when max_len is set. (#88545, Morten
Thu Jul 25 19:52:41 2002 Owen Taylor <otaylor@redhat.com> * glib/guniprop.c (real_tolower): Handle the end of the string properly when max_len is set. (#88545, Morten Welinder.) Rename the next_t variable to next_type to make cc-mode happy. * glib/gconvert.c (g_iconv_open): Fix missing label from previous commit.
This commit is contained in:
parent
5bfdd206c1
commit
bedbbabba7
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
|||||||
|
Thu Jul 25 19:52:41 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* glib/guniprop.c (real_tolower): Handle the
|
||||||
|
end of the string properly when max_len is set.
|
||||||
|
(#88545, Morten Welinder.) Rename the next_t
|
||||||
|
variable to next_type to make cc-mode happy.
|
||||||
|
|
||||||
|
* glib/gconvert.c (g_iconv_open): Fix missing
|
||||||
|
label from previous commit.
|
||||||
|
|
||||||
Thu Jul 25 19:41:03 2002 Owen Taylor <otaylor@redhat.com>
|
Thu Jul 25 19:41:03 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* glib/giochannel.c (g_io_channel_get_flags): Fix
|
* glib/giochannel.c (g_io_channel_get_flags): Fix
|
||||||
|
@ -1,3 +1,13 @@
|
|||||||
|
Thu Jul 25 19:52:41 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* glib/guniprop.c (real_tolower): Handle the
|
||||||
|
end of the string properly when max_len is set.
|
||||||
|
(#88545, Morten Welinder.) Rename the next_t
|
||||||
|
variable to next_type to make cc-mode happy.
|
||||||
|
|
||||||
|
* glib/gconvert.c (g_iconv_open): Fix missing
|
||||||
|
label from previous commit.
|
||||||
|
|
||||||
Thu Jul 25 19:41:03 2002 Owen Taylor <otaylor@redhat.com>
|
Thu Jul 25 19:41:03 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* glib/giochannel.c (g_io_channel_get_flags): Fix
|
* glib/giochannel.c (g_io_channel_get_flags): Fix
|
||||||
|
@ -1,3 +1,13 @@
|
|||||||
|
Thu Jul 25 19:52:41 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* glib/guniprop.c (real_tolower): Handle the
|
||||||
|
end of the string properly when max_len is set.
|
||||||
|
(#88545, Morten Welinder.) Rename the next_t
|
||||||
|
variable to next_type to make cc-mode happy.
|
||||||
|
|
||||||
|
* glib/gconvert.c (g_iconv_open): Fix missing
|
||||||
|
label from previous commit.
|
||||||
|
|
||||||
Thu Jul 25 19:41:03 2002 Owen Taylor <otaylor@redhat.com>
|
Thu Jul 25 19:41:03 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* glib/giochannel.c (g_io_channel_get_flags): Fix
|
* glib/giochannel.c (g_io_channel_get_flags): Fix
|
||||||
|
@ -1,3 +1,13 @@
|
|||||||
|
Thu Jul 25 19:52:41 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* glib/guniprop.c (real_tolower): Handle the
|
||||||
|
end of the string properly when max_len is set.
|
||||||
|
(#88545, Morten Welinder.) Rename the next_t
|
||||||
|
variable to next_type to make cc-mode happy.
|
||||||
|
|
||||||
|
* glib/gconvert.c (g_iconv_open): Fix missing
|
||||||
|
label from previous commit.
|
||||||
|
|
||||||
Thu Jul 25 19:41:03 2002 Owen Taylor <otaylor@redhat.com>
|
Thu Jul 25 19:41:03 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* glib/giochannel.c (g_io_channel_get_flags): Fix
|
* glib/giochannel.c (g_io_channel_get_flags): Fix
|
||||||
|
@ -1,3 +1,13 @@
|
|||||||
|
Thu Jul 25 19:52:41 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* glib/guniprop.c (real_tolower): Handle the
|
||||||
|
end of the string properly when max_len is set.
|
||||||
|
(#88545, Morten Welinder.) Rename the next_t
|
||||||
|
variable to next_type to make cc-mode happy.
|
||||||
|
|
||||||
|
* glib/gconvert.c (g_iconv_open): Fix missing
|
||||||
|
label from previous commit.
|
||||||
|
|
||||||
Thu Jul 25 19:41:03 2002 Owen Taylor <otaylor@redhat.com>
|
Thu Jul 25 19:41:03 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* glib/giochannel.c (g_io_channel_get_flags): Fix
|
* glib/giochannel.c (g_io_channel_get_flags): Fix
|
||||||
|
@ -1,3 +1,13 @@
|
|||||||
|
Thu Jul 25 19:52:41 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* glib/guniprop.c (real_tolower): Handle the
|
||||||
|
end of the string properly when max_len is set.
|
||||||
|
(#88545, Morten Welinder.) Rename the next_t
|
||||||
|
variable to next_type to make cc-mode happy.
|
||||||
|
|
||||||
|
* glib/gconvert.c (g_iconv_open): Fix missing
|
||||||
|
label from previous commit.
|
||||||
|
|
||||||
Thu Jul 25 19:41:03 2002 Owen Taylor <otaylor@redhat.com>
|
Thu Jul 25 19:41:03 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* glib/giochannel.c (g_io_channel_get_flags): Fix
|
* glib/giochannel.c (g_io_channel_get_flags): Fix
|
||||||
|
@ -1,3 +1,13 @@
|
|||||||
|
Thu Jul 25 19:52:41 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* glib/guniprop.c (real_tolower): Handle the
|
||||||
|
end of the string properly when max_len is set.
|
||||||
|
(#88545, Morten Welinder.) Rename the next_t
|
||||||
|
variable to next_type to make cc-mode happy.
|
||||||
|
|
||||||
|
* glib/gconvert.c (g_iconv_open): Fix missing
|
||||||
|
label from previous commit.
|
||||||
|
|
||||||
Thu Jul 25 19:41:03 2002 Owen Taylor <otaylor@redhat.com>
|
Thu Jul 25 19:41:03 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* glib/giochannel.c (g_io_channel_get_flags): Fix
|
* glib/giochannel.c (g_io_channel_get_flags): Fix
|
||||||
|
@ -135,6 +135,7 @@ g_iconv_open (const gchar *to_codeset,
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
out:
|
||||||
return (cd == (iconv_t)-1) ? (GIConv)-1 : (GIConv)cd;
|
return (cd == (iconv_t)-1) ? (GIConv)-1 : (GIConv)cd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -757,9 +757,11 @@ real_tolower (const gchar *str,
|
|||||||
len += g_unichar_to_utf8 (0x131, out_buffer ? out_buffer + len : NULL);
|
len += g_unichar_to_utf8 (0x131, out_buffer ? out_buffer + len : NULL);
|
||||||
}
|
}
|
||||||
else if (c == 0x03A3) /* GREEK CAPITAL LETTER SIGMA */
|
else if (c == 0x03A3) /* GREEK CAPITAL LETTER SIGMA */
|
||||||
|
{
|
||||||
|
if ((max_len < 0 || p < str + max_len) && *p)
|
||||||
{
|
{
|
||||||
gunichar next_c = g_utf8_get_char (p);
|
gunichar next_c = g_utf8_get_char (p);
|
||||||
int next_t = TYPE(next_c);
|
int next_type = TYPE(next_c);
|
||||||
|
|
||||||
/* SIGMA mapps differently depending on whether it is
|
/* SIGMA mapps differently depending on whether it is
|
||||||
* final or not. The following simplified test would
|
* final or not. The following simplified test would
|
||||||
@ -767,10 +769,13 @@ real_tolower (const gchar *str,
|
|||||||
* sigma, but I don't think that occurs in real text.
|
* sigma, but I don't think that occurs in real text.
|
||||||
* The test here matches that in ICU.
|
* The test here matches that in ICU.
|
||||||
*/
|
*/
|
||||||
if (ISALPHA(next_t)) /* Lu,Ll,Lt,Lm,Lo */
|
if (ISALPHA(next_type)) /* Lu,Ll,Lt,Lm,Lo */
|
||||||
val = 0x3c3; /* GREEK SMALL SIGMA */
|
val = 0x3c3; /* GREEK SMALL SIGMA */
|
||||||
else
|
else
|
||||||
val = 0x3c2; /* GREEK SMALL FINAL SIGMA */
|
val = 0x3c2; /* GREEK SMALL FINAL SIGMA */
|
||||||
|
}
|
||||||
|
else
|
||||||
|
val = 0x3c2; /* GREEK SMALL FINAL SIGMA */
|
||||||
|
|
||||||
len += g_unichar_to_utf8 (val, out_buffer ? out_buffer + len : NULL);
|
len += g_unichar_to_utf8 (val, out_buffer ? out_buffer + len : NULL);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user