Re: URIs vs. half-baked URIs [glib PATCH]



On Wednesday, August 8, 2001, at 01:00  PM, Alex Larsson wrote:

Ok. New version. This one includes g_ascii_isspace() that i needed for the
gtk fileselector dnd thing.

Is there a reason you couldn't use the <ctype.h> isspace function? I added g_ascii_xxx functions for things that I knew were different depending on the locale. I was under the impression that locales generally don't change the definition of isspace. On the other hand, perhaps locales do. If so, perhaps we should add a full complement for consistency, rather than adding the calls one at a time.

 /**
+ * g_ascii_isspace:
+ * @c: any character
+ *
+ * Determines whether a character is white-space.
+ *
+ * Unlike the standard C library isalpha function, this only
+ * recognizes standard ASCII letters and ignores the locale, returning
+ * %FALSE for all non-ASCII characters. Also unlike the standard
+ * library function, this takes a char, not an int, so don't call it
+ * on EOF but no need to cast to guchar before passing a possibly
+ * non-ASCII character in.

This comment still talks about the C library isalpha function, and mentions ASCII letters.

    -- Darin

_______________________________________________
gnome-hackers mailing list
gnome-hackers gnome org
http://mail.gnome.org/mailman/listinfo/gnome-hackers




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