aboutsummaryrefslogtreecommitdiff
path: root/news
diff options
context:
space:
mode:
authorJoe Marcus Clarke <marcus@FreeBSD.org>2004-02-02 07:34:28 +0000
committerJoe Marcus Clarke <marcus@FreeBSD.org>2004-02-02 07:34:28 +0000
commitdda3f4e27ce5c469021353ebc18074945e57e68c (patch)
tree5c5e638397c250ea761c1212497cc5cab4e8f72d /news
parent457646c546ccfba572371d873722d2318cd3c185 (diff)
downloadports-dda3f4e27ce5c469021353ebc18074945e57e68c.tar.gz
ports-dda3f4e27ce5c469021353ebc18074945e57e68c.zip
Fix linewrap in non-ISO character sets (e.g. Cyrillic).
PR: 61911 Submitted by: Artem Ignatiev <timon@memphis.mephi.ru> Obtained from: Pan developers
Notes
Notes: svn path=/head/; revision=99781
Diffstat (limited to 'news')
-rw-r--r--news/pan2/Makefile1
-rw-r--r--news/pan2/files/patch-pan_base_text-massager.c36
2 files changed, 37 insertions, 0 deletions
diff --git a/news/pan2/Makefile b/news/pan2/Makefile
index 48d40fa42e72..3180ebc04379 100644
--- a/news/pan2/Makefile
+++ b/news/pan2/Makefile
@@ -7,6 +7,7 @@
PORTNAME= pan2
PORTVERSION= 0.14.2
+PORTREVISION= 1
CATEGORIES= news gnome
MASTER_SITES= http://pan.rebelbase.com/download/releases/${PORTVERSION}/SOURCE/ \
http://pan.rebelbase.com/download/obsolete/${PORTVERSION}/SOURCE/
diff --git a/news/pan2/files/patch-pan_base_text-massager.c b/news/pan2/files/patch-pan_base_text-massager.c
new file mode 100644
index 000000000000..0d17a321bdb0
--- /dev/null
+++ b/news/pan2/files/patch-pan_base_text-massager.c
@@ -0,0 +1,36 @@
+--- pan/base/text-massager.c.orig Mon Jan 26 00:51:26 2004
++++ pan/base/text-massager.c Mon Jan 26 00:55:48 2004
+@@ -250,23 +250,29 @@
+ char * pch;
+ char * line_start;
+ char * end;
++ int pos;
+
+ /* walk through the entire string */
+ linefeed_here = NULL;
+- for (line_start=pch=str->str, end=line_start+str->len; pch!=end; )
++ for (pos = 0, line_start=pch=str->str, end=line_start+str->len; pch<end; )
+ {
+ /* a linefeed could go here; remember this space */
+- if (isspace((guchar)*pch) || *pch=='\n')
++ if (g_unichar_isspace(g_utf8_get_char (pch)) || *pch=='\n')
+ linefeed_here = pch;
+
+ /* line's too long; add a linefeed if we can */
+- if (pch-line_start>=column && linefeed_here!=NULL)
++ if (pos>=column && linefeed_here!=NULL)
+ {
+ *linefeed_here = '\n';
+ pch = line_start = linefeed_here + 1;
+ linefeed_here = NULL;
++ pos = 0;
++ }
++ else
++ {
++ pch = g_utf8_next_char (pch);
++ ++ pos;
+ }
+- else ++pch;
+ }
+ }
+