glib r6414 - trunk/gio
- From: alexl svn gnome org
- To: svn-commits-list gnome org
- Subject: glib r6414 - trunk/gio
- Date: Tue, 29 Jan 2008 14:19:46 +0000 (GMT)
Author: alexl
Date: Tue Jan 29 14:19:46 2008
New Revision: 6414
URL: http://svn.gnome.org/viewvc/glib?rev=6414&view=rev
Log:
2008-01-29 Alexander Larsson <alexl redhat com>
* gcontenttype.c (looks_like_text):
Don't treat whitespace as control chars.
Modified:
trunk/gio/ChangeLog
trunk/gio/gcontenttype.c
Modified: trunk/gio/gcontenttype.c
==============================================================================
--- trunk/gio/gcontenttype.c (original)
+++ trunk/gio/gcontenttype.c Tue Jan 29 14:19:46 2008
@@ -671,9 +671,14 @@
looks_like_text (const guchar *data, gsize data_size)
{
gsize i;
+ char c;
+
for (i = 0; i < data_size; i++)
{
- if g_ascii_iscntrl (data[i])
+ c = data[i];
+
+ if (g_ascii_iscntrl (c) &&
+ !g_ascii_isspace (c))
return FALSE;
}
return TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]