Thread View: news.software.readers
1 messages
1 total messages
Started by John E. Davis
Thu, 07 Aug 1997 00:00
Re: [SLRN] problem with reject_long_lines
Author: 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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads