+2006-03-23 [paul] 2.0.0cvs165
+
+ * src/common/utils.c
+ fix highlighting of URIs containing "()"
+ (2.0.0cvs164's reversal fixed)
+
2006-03-23 [paul] 2.0.0cvs164
* src/common/utils.c
( cvs diff -u -r 1.11.2.11 -r 1.11.2.12 src/editgroup.c; cvs diff -u -r 1.15.2.25 -r 1.15.2.26 src/summary_search.c; cvs diff -u -r 1.1.2.35 -r 1.1.2.36 src/gtk/quicksearch.c; ) > 2.0.0cvs162.patchset
( cvs diff -u -r 1.654.2.1392 -r 1.654.2.1393 configure.ac; ) > 2.0.0cvs163.patchset
( cvs diff -u -r 1.36.2.58 -r 1.36.2.59 src/common/utils.c; ) > 2.0.0cvs164.patchset
+( cvs diff -u -r 1.36.2.59 -r 1.36.2.60 src/common/utils.c; ) > 2.0.0cvs165.patchset
const gchar **bp, const gchar **ep, gboolean hdr)
{
const gchar *ep_;
+ gint parenthese_cnt = 0;
g_return_val_if_fail(start != NULL, FALSE);
g_return_val_if_fail(scanpos != NULL, FALSE);
for (ep_ = scanpos; *ep_ != '\0'; ep_++) {
if (!g_ascii_isgraph(*(const guchar *)ep_) ||
!IS_ASCII(*(const guchar *)ep_) ||
- strchr("[]{}()<>\"", *ep_))
+ strchr("[]{}<>\"", *ep_)) {
break;
+ } else if (strchr("(", *ep_)) {
+ parenthese_cnt++;
+ } else if (strchr(")", *ep_)) {
+ if (parenthese_cnt > 0)
+ parenthese_cnt--;
+ else
+ break;
+ }
}
/* no punctuation at end of string */
* should pass some URI type to this function and decide on that whether
* to perform punctuation stripping */
-#define IS_REAL_PUNCT(ch) (g_ascii_ispunct(ch) && !strchr("/?=-", ch))
+#define IS_REAL_PUNCT(ch) (g_ascii_ispunct(ch) && !strchr("/?=-)", ch))
for (; ep_ - 1 > scanpos + 1 &&
IS_REAL_PUNCT(*(ep_ - 1));