]> git.pld-linux.org Git - packages/xchat-gnome.git/commitdiff
- add gnome version based on xchat-long-delimiter.patch
authoraredridel <aredridel@pld-linux.org>
Wed, 21 Dec 2005 04:40:15 +0000 (04:40 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    xchat-gnome-long-delimiter.patch -> 1.1

xchat-gnome-long-delimiter.patch [new file with mode: 0644]

diff --git a/xchat-gnome-long-delimiter.patch b/xchat-gnome-long-delimiter.patch
new file mode 100644 (file)
index 0000000..309b164
--- /dev/null
@@ -0,0 +1,65 @@
+diff -ur xchat-gnome-0.8-o/src/fe-gnome/xtext.c xchat-gnome-0.8/src/fe-gnome/xtext.c
+--- xchat-gnome-0.8-o/src/fe-gnome/xtext.c     2005-11-26 16:26:03.000000000 -0700
++++ xchat-gnome-0.8/src/fe-gnome/xtext.c       2005-12-20 21:36:01.000000000 -0700
+@@ -80,9 +80,16 @@
+ #include "marshallers.h"
+ /* is delimiter */
+-#define is_del(c) \
+-      (c == ' ' || c == '\n' || c == ')' || c == '(' || \
+-       c == '>' || c == '<' || c == ATTR_RESET || c == ATTR_BOLD || c == 0)
++int is_del(const char *c) {
++      int ret;
++      ret = 0;
++      ret = (c[0] == ' ' || c[0] == '\n' || c[0] == ')' || c[0] == '(' || 
++       c[0] == '>' || c[0] == '<' || c[0] == ATTR_RESET || c[0] == ATTR_BOLD || c == 0);
++      if(!ret) {
++              ret = strncmp(c, "“", 3) == 0 || strncmp(c, "”", 3) == 0;
++      }
++      return ret;
++}
+ #ifdef SCROLL_HACK
+ /* force scrolling off */
+@@ -1802,6 +1809,7 @@
+       int offset;
+       unsigned char *str;
+       unsigned char *word;
++      unsigned char *nstr;
+       int len;
+       int out_of_bounds = 0;
+@@ -1822,16 +1830,17 @@
+       str = ent->str + offset;
+-      while (!is_del (*str) && str != ent->str)
+-              str--;
+-      word = str + 1;
++      while (!is_del(str))
++              str = g_utf8_prev_char(str);
++      word = g_utf8_next_char(str);
+       len = 0;
+       str = word;
+-      while (!is_del (*str) && len != ent->str_len)
++      while (!is_del(str) && len != ent->str_len)
+       {
+-              str++;
+-              len++;
++              nstr = g_utf8_next_char(str);
++              len += nstr - str;
++              str = nstr;
+       }
+       if (len > 0 && word[len-1]=='.')
+@@ -3835,7 +3844,7 @@
+                               }
+                               /* keep a record of the last space, for wordwrapping */
+-                              if (is_del (*str))
++                              if (g_unichar_isspace(g_utf8_get_char(str)))
+                               {
+                                       last_space = str;
+                                       limit_offset = 0;
+Only in xchat-gnome-0.8/src/fe-gnome: xtext.c.orig
This page took 0.174989 seconds and 4 git commands to generate.