diff options
author | Steve Price <steve@FreeBSD.org> | 1998-08-09 01:25:57 +0000 |
---|---|---|
committer | Steve Price <steve@FreeBSD.org> | 1998-08-09 01:25:57 +0000 |
commit | 5af3603f10bb010324be05ddf722ab771efa3201 (patch) | |
tree | 32382286b5fdd9e83cbbf7123f5aafbce6d4b73f /net-im/licq/files/patch-ae | |
parent | Update to version 0.3 (diff) |
Update to version 0.34
PR: 7502
Submitted by: maintainer
Notes
Notes:
svn path=/head/; revision=12369
Diffstat (limited to 'net-im/licq/files/patch-ae')
-rw-r--r-- | net-im/licq/files/patch-ae | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/net-im/licq/files/patch-ae b/net-im/licq/files/patch-ae new file mode 100644 index 000000000000..520256117bbc --- /dev/null +++ b/net-im/licq/files/patch-ae @@ -0,0 +1,35 @@ +--- src/mledit.cpp.orig Mon Jul 13 20:53:46 1998 ++++ src/mledit.cpp Wed Aug 5 18:12:05 1998 +@@ -6,18 +6,25 @@ + { + // add word wrap here + char *newText = new char[strlen(s) + 1]; +- int j = 0; +- for (int i = 0; i < strlen(s); i++) ++ int j, m, n; ++ j = 0; ++ for (unsigned long i = 0; i < strlen(s); i++) + { + //if (s[i] == '\t') j += 3; // add whatever the length of a tab is (broken) + if (j > fill_column_value) + { + // backup until we get to a space or a newline +- while (s[i] != ' ' && s[i] != '\n') { i--; j--; } +- newText[j] = '\0'; +- QMultiLineEdit::append(newText); +- j = 0; +- i++; // get past the space or newline ++ m = i; ++ n = j; ++ while (m >= 0 && s[m] != ' ' && s[m] != '\n') { m--; n--; } ++ if (s[m] == ' ') // space found ++ { ++ i = m; ++ newText[n] = '\0'; ++ QMultiLineEdit::append(newText); ++ j = 0; ++ i++; // get past the space or newline ++ } + } + if (s[i] == '\n') + { |