🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #42990

Re: [slrn] Could extract_article_header() return # of lines?

#42990
From: John E. Davis
Date: Wed, 02 Sep 1998 00:00
27 lines
1766 bytes
On 30 Aug 1998 01:16:57 GMT, Lloyd Zusman <ljz@asfast.com>
wrote:
>the number of lines in the article.  I'd be happy if this was simply
>the contents of the "Lines:" header, which is currently ignored by
>`extract_acticle_header()'.

   The `lines' field of the header is treated internally as an integer
by slrn.  Here is a patch to art.c that allows it to be returned as a
string by `extract_acticle_header':

--- art.c~	Tue Jul 14 15:16:05 1998
+++ art.c	Tue Sep  1 13:34:04 1998
@@ -890,6 +890,12 @@
 	  return slrn_skip_whitespace (Slrn_Current_Header->refs);
 	if (0 == slrn_case_strncmp ((unsigned char *)"Xref: ", (unsigned char *)hdr, len))
 	  return Slrn_Current_Header->xref;
+	if (0 == slrn_case_strncmp ((unsigned char *)"Lines: ", (unsigned char *)hdr, len))
+	  {
+	     static char lines_buf[16];
+	     sprintf (lines_buf, "%d", Slrn_Current_Header->lines);
+	     return lines_buf;
+	  }
 	return NULL;
      }
    

Technical Details
Message-ID: <slrn6uoc7s.91.davis@mygir.davis.net>
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
References: <slrn6uha35.l0.ljz@sunspot.tiac.net>

Show Full Headers
Complete Article Headers
Message-ID: <slrn6uoc7s.91.davis@mygir.davis.net>
Subject: Re: [slrn] Could extract_article_header() return # of lines?
Date: Wed, 02 Sep 1998 00:00:00 +0000
From: davis@space.mit.edu (John E. Davis)
References: <slrn6uha35.l0.ljz@sunspot.tiac.net>
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: 387089263
X-Complaints-To: usenet@eecs-usenet-02.mit.edu
X-Trace: eecs-usenet-02.mit.edu 904733229 25357 18.75.2.45 (2 Sep 1998 10:47:09 GMT)
Organization: Center for Space Research
User-Agent: slrn/0.9.5.3 (UNIX)
NNTP-Posting-Date: 2 Sep 1998 10:47:09 GMT
Newsgroups: news.software.readers