🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
9 messages
9 total messages Started by Chaabane Thu, 13 Jul 2000 00:00
[slrn] invisible headers
#63217
Author: Chaabane
Date: Thu, 13 Jul 2000 00:00
29 lines
1890 bytes
Hi,

I use slrn-0.9.5.7 for several months now and I am full happy with
it. I see that the latest version for slrn is now slrn-0.9.6.2 . I
wish to upgrade, I compiled it and everything is ok, except for one
point :

I want to see every "X-" headers except some of them. I posted this
question some time ago and someone gave me a patch to exclude some
headers with the "visible_headers" variable. I had to put a "!"
before.

I have this in my .slrnrc :

visible_headers "From:,Subject:,Date:,Newsgroups:,Followup-To:,Reply-To:,Approved:,Keywords:,User-Agent:,Organization:,Organisation:,X-,!X-Received:,!X-Trace:,!X-Accept-Language:,!X-Complaints-To:,!X-Original-,!X-MimeOLE:,!X-Modappbot-,!X-RHJ-,!X-Robomod-,!X-Auth,!X-Priority:,!X-MSMail-Priority:,!X-Face:,!x-uunet-gateway:,!X-INFO-,!X-PGP-,!X-Abuse-Info"


Unfortunately the patch does'nt work with slrn-0.9.6.2

Can the author repost it, or is there a feature in slrn to exclude some
headers in the display. Some kind of "invisible_headers" variable.



-- 
Chaabane

Re: [slrn] invisible headers
#63216
Author: Chaabane
Date: Thu, 13 Jul 2000 00:00
225 lines
6909 bytes
Dans news.software.readers, Chaabane �crivait :
>I posted this question some time ago and someone gave me a patch to
>exclude some headers with the "visible_headers" variable.

By the way, here is the patch  :

diff -Naru slrn/src/art.c slrn/src-patch/art.c
--- slrn/src/art.c	Thu Jul 15 09:27:27 1999
+++ slrn/src-patch/art.c	Thu Jul 29 09:05:42 1999
@@ -127,6 +127,10 @@
 int Slrn_Simulate_Graphic_Chars = 0;
 int Slrn_Del_Article_Upon_Read = 1;
 
+/* ----begin---- New variable */
+int Slrn_Has_Tin_Like_Quotes = 0;
+/* ----end---- */
+
 char *Slrn_Current_Group_Name;
 Slrn_Header_Type *Slrn_First_Header;
 Slrn_Header_Type *Slrn_Current_Header;
@@ -566,6 +570,18 @@
 		  hide_header = 0;
 		  break;
 	       }
+/* ----begin---- Skip headers */
+	     chv = (0x20 | v->header[1]);
+	     
+	     if ((v->header[0]=='!') && (chv == ch) 
+		 && (0 == slrn_case_strncmp ((unsigned char *)l->buf, 
+					     (unsigned char *)v->header+1, 
+					     (v->len)-1)))
+	       {
+		  hide_header = 1;
+		  break;
+	       }
+/* ----end----- */	     
 	     
 	     v = v->next;
 	  }
@@ -2863,9 +2879,28 @@
    
    while (l != NULL)
      {
+     
+/* ----begin---- New quote format */
+if (Slrn_Has_Tin_Like_Quotes) {
+   char QuoteFormat[2][10] = {"%s%s\n","%s %s\n"};
+   int  Quote=1;
+   
+        if (l->flags && QUOTE_LINE) Quote=0;
+        
+	fprintf (fp, QuoteFormat[Quote], 
+		 ((Slrn_Quote_String == NULL) ? ">" : Slrn_Quote_String), 
+		 l->buf);
+}
+else {     
+/* ----end---- */
+     
 	fprintf (fp, "%s%s\n", 
 		 ((Slrn_Quote_String == NULL) ? ">" : Slrn_Quote_String), 
 		 l->buf);
+/* ----begin---- New quote format */
+}
+/* ----end---- */
+                 
 	l = l->next;
      }
    slrn_add_signature (fp);
@@ -3053,6 +3088,14 @@
 		  perform_cc = -1;
 	       }
 	  }
+/* ----begin---- FUT warning */
+          if (NULL != newsgroups) {
+           char alert[256] = {0};
+           sprintf(alert,"%s `%s' ","Followup-to:",newsgroups);
+	   if (!slrn_get_yesno (0,alert)) newsgroups = NULL;
+          }    
+/* ---end--- */
+          
      }
 
    /* Some mailing lists have a Mail-Followup-To header.  But do this if there
@@ -3255,7 +3298,20 @@
 	    && (l->flags & SIGNATURE_LINE))
 	  break;
 
+/* ----begin---- New quote format */
+if (Slrn_Has_Tin_Like_Quotes) {
+   char QuoteFormat[2][10] = {"%s%s\n","%s %s\n"};
+   int  Quote=1;
+   
+        if (l->flags && QUOTE_LINE) Quote=0;
+	fprintf (fp, QuoteFormat[Quote], quote_str, l->buf);
+}
+else {     
+/* ----end---- */
 	fprintf (fp, "%s%s\n", quote_str, l->buf);
+/* ----begin---- New quote format */
+}	
+/* ----end---- */
 	
 	l = l->next;
      }
diff -Naru slrn/src/art.h slrn/src-patch/art.h
--- slrn/src/art.h	Thu Jul 15 09:27:28 1999
+++ slrn/src-patch/art.h	Thu Jul 29 09:05:56 1999
@@ -64,6 +64,9 @@
 extern int Slrn_Followup_Strip_Sig;
 
 #endif				       /* NOT SLRNPULL_CODE */
+/* ----begin---- New variable */
+extern int Slrn_Has_Tin_Like_Quotes;
+/* ----end---- */
 
 typedef struct Slrn_Header_Type
 {
diff -Naru slrn/src/mime.c slrn/src-patch/mime.c
--- slrn/src/mime.c	Thu Jul 15 09:27:25 1999
+++ slrn/src-patch/mime.c	Thu Jul 29 09:00:24 1999
@@ -451,7 +451,88 @@
 
 static void decode_mime_base64 (void)
 {
+   Slrn_Article_Line_Type *line = Slrn_Article_Lines, *body, *b;
+   unsigned long Article_Size = 0;
+   char *Article_Body,*Article_B64,*Article_Begin,*String_Begin;
+   
+ while (((body = line) != NULL) && (line->flags & HEADER_LINE)) {
+  line = line->next;
+ }
+ 
+ b = body = body->next; 
+ while (b != NULL) {
+  Article_Size+=strlen(b->buf);
+  b = b->next;
+ }
+ Article_Size++;
+ 
+ if ((Article_Body = slrn_malloc(Article_Size,1,1))==NULL) 
+ {
    Slrn_Mime_Needs_Metamail = 1;
+   return;
+ }
+ 
+ if ((Article_B64 = slrn_malloc(Article_Size,1,1))==NULL) 
+ {
+   Slrn_Mime_Needs_Metamail = 1;
+   slrn_free(Article_Body);
+   return;
+ }
+ 
+ b = body;
+ while (b != NULL) {
+  strcat(Article_B64,b->buf);
+  b = b->next;
+ }
+
+ decode_base64(Article_Body,Article_B64,Article_B64+Article_Size);
+
+ Article_Size  = strlen(Article_Body);
+ Article_Begin = Article_Body;
+ String_Begin  = Article_B64;
+
+ while (Article_Begin-Article_Body < Article_Size) {
+  
+  while ('\n' != (*String_Begin = *Article_Begin++)) {
+   if (*String_Begin == 0) break;   
+   String_Begin++;
+  }
+  *String_Begin = 0;
+
+  String_Begin = Article_B64;
+  while (*String_Begin != 0) {
+   if ((*String_Begin == 0x0a)||(*String_Begin == 0x0d)) { *String_Begin = 0; }
+   *String_Begin++;
+  }
+
+  if (NULL==(body->buf=slrn_realloc(body->buf,strlen(Article_B64)+1,1))) {
+   slrn_free(Article_Body);
+   slrn_free(Article_B64);
+   Slrn_Mime_Needs_Metamail = 1;
+   return;
+  } 
+
+  strcpy(body->buf,Article_B64);
+
+  if (NULL==body->next)
+   if (
+       (NULL==(body->next=(Slrn_Article_Line_Type *) slrn_malloc(sizeof(Slrn_Article_Line_Type),1, 1))) ||
+       (NULL==(body->next->buf = slrn_malloc (1, 1, 1)))
+      ) {
+    slrn_free(Article_Body);
+    slrn_free(Article_B64);
+    Slrn_Mime_Needs_Metamail = 1;
+    return;
+   } else {
+    body->next->next=NULL;
+    body->next->prev=body;
+   } 
+  body=body->next;
+  String_Begin = Article_B64;
+ } 
+
+ slrn_free(Article_Body);
+ slrn_free(Article_B64);
 }
 
 /* This function checks if the last character on curr_line is an = and 
diff -Naru slrn/src/startup.c slrn/src-patch/startup.c
--- slrn/src/startup.c	Thu Jul 15 09:27:28 1999
+++ slrn/src-patch/startup.c	Thu Jul 29 09:06:13 1999
@@ -427,6 +427,10 @@
 #else
      {"spool_check_up_on_nov", NULL},
 #endif
+/* ----begin---- New variable*/
+     {"tin_like_quotes", &Slrn_Has_Tin_Like_Quotes},
+/* ----end---- */
+
      {NULL, NULL}
 };
 

Re: [slrn] invisible headers
#63221
Author: Tomasz Sienicki
Date: Thu, 13 Jul 2000 00:00
17 lines
1522 bytes
 Chaabane wrote
 [in news:slrn8mrsln.5ul.chaabane@youkaidi.irisa.fr (13.07.2k)]:

> I want to see every "X-" headers except some of them. I posted this
> question some time ago and someone gave me a patch to exclude some
> headers with the "visible_headers" variable. I had to put a "!" before.
[...]
> Unfortunately the patch does'nt work with slrn-0.9.6.2

 The new version of this patch (now and then by S�awek Szczyrba)
 is to be found here:  http://www.kki.net.pl/szczyrba/slrn/

-- 
 Tomasz 'tsca' Sienicki
 tsca{.dht.dk,@mail4.dk} RLU #74351                 Absolute zero is cool.

Re: [slrn] invisible headers
#63250
Author: Chaabane
Date: Fri, 14 Jul 2000 00:00
11 lines
1394 bytes
Dans news.software.readers, Tomasz Sienicki �crivait :
> The new version of this patch (now and then by S�awek Szczyrba)
> is to be found here:  http://www.kki.net.pl/szczyrba/slrn/

Thank you.

I see on this page other patches�; unfortunately I don't understand
the polish language : I would like to know what are these other
patches for.

Re: [slrn] invisible headers
#63304
Author: Tomasz Sienicki
Date: Sat, 15 Jul 2000 00:00
20 lines
1828 bytes
 Chaabane wrote
 [in news:slrn8mugvs.b0l.chaabane@youkaidi.irisa.fr (14.07.2k)]:

>> The new version of this patch (now and then by S�awek Szczyrba)
>> is to be found here:  http://www.kki.net.pl/szczyrba/slrn/
> I see on this page other patches�; unfortunately I don't understand
> the polish language : I would like to know what are these other
> patches for.

 The filenames say it all, the descriptions in Polish don't explain
 anything more (except score.patch --> "threads highlighting".)
 Ask the author: <steev @ hot.pl>.

-- 
 .------------------------.            Booze may not be the answer
 | Tomasz 'tsca' Sienicki |   but it helps you forget the question
 |  www.cryogen.com/tsca  |  --------------------------------------
 `------------------------'  (c) H. Mon       ["Hydrocefalus", 22b]

Re: [slrn] invisible headers
#63419
Author: Tomasz Sienicki
Date: Wed, 19 Jul 2000 00:00
16 lines
1658 bytes
 Chaabane wrote
 [in news:slrn8nbrir.bq8.chaabane@youkaidi.irisa.fr (19.07.2k)]:

> Dans news.software.readers, Tomasz Sienicki �crivait :
>> User-Agent: slrn/0.9.6.2+ (Linux)
> What version is it�? I have only slrn/0.9.6.2

 It's the same version, but some secret patches had been applied
 prior to compilation. :-)

-- 
.................................i.k.c.i.n.e.i.s...'.a.c.s.t.'...z.s.a.m.o.t.
.........).;.k.c.i.l.c...t.s.u.j.-...>.k.d...r.e.v.r.e.s.l.i.a.m.@.a.c.s.t.<.
.....l.m.t.h...a.c.s.t./.o.e.g...a.c.s.t./.m.o.c...s.e.i.t.i.c.o.e.g...w.w.w.

[slrn] ordering of headers (was: invisible headers)
#63426
Author: Chaabane
Date: Wed, 19 Jul 2000 00:00
26 lines
2060 bytes
Dans news.software.readers, Tomasz Sienicki �crivait :
>  Chaabane wrote
>  [in news:slrn8mugvs.b0l.chaabane@youkaidi.irisa.fr (14.07.2k)]:
> 
>>> The new version of this patch (now and then by S�awek Szczyrba)
>>> is to be found here:  http://www.kki.net.pl/szczyrba/slrn/
>> I see on this page other patches�; unfortunately I don't understand
>> the polish language : I would like to know what are these other
>> patches for.
> 
>  The filenames say it all, the descriptions in Polish don't explain
>  anything more (except score.patch --> "threads highlighting".)
>  Ask the author: <steev @ hot.pl>.

Thank you. I'll contact him.

I have another request : I would like to have the same order for the
headers. For exemple, I would like to have first the "From:", then
"Newsgroups:", then "Subject", then "Date:" and finally all the other
headers. Is it possible�?


-- 
Chaabane

Re: [slrn] ordering of headers (was: invisible headers)
#63430
Author: Tomasz Sienicki
Date: Wed, 19 Jul 2000 00:00
17 lines
1689 bytes
 Chaabane wrote
 [in news:slrn8nbrgp.bq8.chaabane@youkaidi.irisa.fr (19.07.2k)]:

> I would like to have the same order for the headers. For exemple, I
> would like to have first the "From:", then "Newsgroups:", then
> "Subject", then "Date:" and finally all the other headers. Is it
> possible�?

 Everything is possible for those who believe. ;-> I could be done
 with a macro (read_article_hook), but I guess it'd slow things down
 too much to pay off.

-- 
 Tomasz 'tsca' Sienicki
 tsca{.dht.dk,@mail4.dk} RLU #74351                 Absolute zero is cool.

Re: [slrn] invisible headers
#63434
Author: Chaabane
Date: Wed, 19 Jul 2000 00:00
9 lines
1286 bytes
Dans news.software.readers, Tomasz Sienicki �crivait :
> User-Agent: slrn/0.9.6.2+ (Linux)

What version is it�? I have only slrn/0.9.6.2

-- 
Chaabane

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