Article View: news.software.readers
Article #35689Re: [SLRN] problem with reject_long_lines
From: John E. Davis
Date: Thu, 07 Aug 1997 00:00
Date: Thu, 07 Aug 1997 00:00
75 lines
2629 bytes
2629 bytes
On 7 Aug 1997 18:22:05 GMT, Hubert Canon <Hubert.Canon@irisa.fr>
wrote:
>Secondly : the new warping is very good (warping only on word
>limits). But it gives strange results with headers like "Path:". Is
>there a solution or a patch ?
Here is a quick hack. It is rather ugly but it works:
--- /nfs/wiwaxia/h1/davis/src/release/slrn0.9.4.3/src/art.c Sat Jul 12 16:29:02 1997
+++ art.c Thu Aug 7 15:28:43 1997
@@ -263,7 +263,7 @@
/*{{{ SIGWINCH and window resizing functions */
static void art_winch (void) /*{{{*/
{
- static int rows;
+ static int rows = 0;
if ((rows != SLtt_Screen_Rows)
|| (Article_Window_Nrows <= 0)
@@ -945,6 +945,8 @@
while (l != NULL)
{
+ unsigned char header_char_delimiter = 0;
+
if (l->flags & HEADER_LINE)
{
if ((wrap_mode & 1) == 0)
@@ -952,6 +954,13 @@
l = l->next;
continue;
}
+
+ if (0 == slrn_case_strncmp ((unsigned char *)"Path: ",
+ (unsigned char *)l->buf, 6))
+ header_char_delimiter = '!';
+ else if (0 == slrn_case_strncmp ((unsigned char *) "Newsgroups: ",
+ (unsigned char *)l->buf, 12))
+ header_char_delimiter = ',';
}
else if (l->flags & QUOTE_LINE)
{
@@ -991,18 +1000,21 @@
*/
buf0 = buf;
lbuf = (unsigned char *) l->buf;
+
lbuf += 1; /* avoid space at beg of line */
-
+
while (buf0 > lbuf)
{
- if ((*buf0 == ' ') || (*buf == '\t'))
+ if ((*buf0 == ' ') || (*buf0 == '\t')
+ || (header_char_delimiter
+ && (*buf0 == header_char_delimiter)))
{
buf = buf0;
break;
}
buf0--;
}
-
+
if (buf0 == lbuf)
{
/* Could not find a place to break the line. Ok, so
--
John E. Davis Center for Space Research/AXAF Science Center
617-258-8119 MIT 37-662c, Cambridge, MA 02139
http://space.mit.edu/~davis
Technical Details
Message-ID:
<slrn5uk8oa.b5b.davis@aluche.mit.edu>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:
<slrn5uk4id.3eg.Hubert.Canon@guenievre.irisa.fr>Show Full Headers
Complete Article Headers
Message-ID: <slrn5uk8oa.b5b.davis@aluche.mit.edu> Subject: Re: [SLRN] problem with reject_long_lines Date: Thu, 07 Aug 1997 00:00:00 +0000 From: davis@space.mit.edu (John E. Davis) References: <slrn5uk4id.3eg.Hubert.Canon@guenievre.irisa.fr> 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: 262800838 Reply-To: davis@space.mit.edu Organization: Center for Space Research Newsgroups: news.software.readers