From f37506557aedd7c9e0141eb8299214db6c63a046 Mon Sep 17 00:00:00 2001 From: hiro Date: Tue, 10 Jan 2006 09:36:11 +0000 Subject: Include some trailing punctuations as URI. git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@882 ee746299-78ed-0310-b773-934348b2243d --- src/textview.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/textview.c') diff --git a/src/textview.c b/src/textview.c index 5645808e..db604e8a 100644 --- a/src/textview.c +++ b/src/textview.c @@ -834,7 +834,7 @@ static gboolean get_uri_part(const gchar *start, const gchar *scanpos, /* find end point of URI */ for (ep_ = scanpos; *ep_ != '\0'; ep_++) { - if (!isgraph(*(const guchar *)ep_) || + if (!g_ascii_isgraph(*ep_) || !isascii(*(const guchar *)ep_) || strchr("()<>{}[]\"", *ep_)) break; @@ -846,11 +846,9 @@ static gboolean get_uri_part(const gchar *start, const gchar *scanpos, * should pass some URI type to this function and decide on that whether * to perform punctuation stripping */ -#define IS_REAL_PUNCT(ch) (ispunct(ch) && ((ch) != '/')) +#define IS_REAL_PUNCT(ch) (g_ascii_ispunct(ch) && !strchr("/?=", ch)) - for (; ep_ - 1 > scanpos + 1 && - IS_REAL_PUNCT(*(const guchar *)(ep_ - 1)); - ep_--) + for (; ep_ - 1 > scanpos + 1 && IS_REAL_PUNCT(*(ep_ - 1)); ep_--) ; #undef IS_REAL_PUNCT -- cgit v1.2.3