Article View: news.software.readers
Article #35198Re: bug in slrn0.9.4.3 ?
From: Byrial Jensen
Date: Wed, 16 Jul 1997 00:00
Date: Wed, 16 Jul 1997 00:00
60 lines
2333 bytes
2333 bytes
A. Deckers <I-hate-cyber-promo@man.ac.uk> wrote:
>Doesn't work for me. As Mike wrote, the problem is that slrn now only
>wraps on space or tab. You'd have to treat headers differently from
>body text to solve this particular problem.
OK, here comes a patch with 3 changes:
- Trailing whitespace on a line will never cause the line to wrap any
more. (Chunk 1).
- Olly's correction of the minor bug relating to tabs is repeated.
(Chunk 2).
- Adding 8 to the value of wrap_flags now means that if necessary long
words (both in header and body) are cut in the middle to avoid to long
lines. (Chunk 3).
I hope this helps.
Regards,
- Byrial
--- art.c.org Wed Jul 16 10:36:15 1997
+++ art.c Wed Jul 16 11:50:33 1997
@@ -991,6 +991,14 @@
{
Slrn_Article_Line_Type *new_l;
unsigned char *buf0, *lbuf;
+
+ /* Check to see if the line from this point only
+ * contains whitespace, and if so drop wrapping it.
+ */
+
+ buf0 = buf;
+ while ((*buf0 == ' ') || (*buf0 == '\t')) buf0++;
+ if (*buf0 == '\0') break;
/* Try to break the line on a word boundary.
* For now, I will only break on space characters.
@@ -1001,7 +1009,7 @@
while (buf0 > lbuf)
{
- if ((*buf0 == ' ') || (*buf == '\t'))
+ if ((*buf0 == ' ') || (*buf0 == '\t'))
{
buf = buf0;
break;
@@ -1009,7 +1017,7 @@
buf0--;
}
- if (buf0 == lbuf)
+ if ((buf0 == lbuf) && ((wrap_mode & 8) == 0))
{
/* Could not find a place to break the line. Ok, so
* we will not break this. Perhaps it is a URL.
Technical Details
Message-ID:
<slrn5sp7jf.j6.byrial@ask.ask>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mailReferences:
<slrn5skdmt.4s1.mike@apm1-73.realtime.net> <slrn5slghq.vb.byrial@ask.ask> <slrn5sml84.kro.olly@noxious.muscat.co.uk> <slrn5smsok.mcp.I-hate-cyber-promo@news.rediris.es>Show Full Headers
Complete Article Headers
Message-ID: <slrn5sp7jf.j6.byrial@ask.ask> Subject: Re: bug in slrn0.9.4.3 ? Date: Wed, 16 Jul 1997 00:00:00 +0000 From: byrial@post3.tele.dk (Byrial Jensen) References: <slrn5skdmt.4s1.mike@apm1-73.realtime.net> <slrn5slghq.vb.byrial@ask.ask> <slrn5sml84.kro.olly@noxious.muscat.co.uk> <slrn5smsok.mcp.I-hate-cyber-promo@news.rediris.es> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail X-Deja-AN: 257181212 Newsgroups: news.software.readers