🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #116250

Re: [SLRN] compose-hook() ???

#116250
From: Lee J. Moore
Date: Thu, 19 Dec 2002 10:29
38 lines
2174 bytes
One may as well begin with Jens Wahnes's letter to news.software.readers:

> Lee J. Moore wrote:
> 
>> Intrinsic SLRN functions like extract_article_header() are of no
>> use because the headers don't come from a displayed article, but
>> from the config file (custom_headers).
> 
> Maybe you could use something like
> 
>   foo=strchop(header, ':', 0)
> 
> and use the values of foo[0] and foo[1]?

Aaaaah!  I never even considered chopping it into an array.
Thanks Jens.  :)  You've just shortened my macro by two
functions and a few lines of code. ;)

I just return the name *and* value from the same function now;
with the help of a structure:

	variable Header_Info = struct {
		name, value
	};

	define get_header_info(header){
		variable hdrinfo = @Header_Info;
		variable hdrchop = strchop(header, ':', 0);
		hdrinfo.name = hdrchop[0];
		hdrinfo.value = strtrim(hdrchop[1]);
		return hdrinfo;
	}

Thanks again. :)
-- 
Lee John Moore           :   'Only Connect...'
www.leej.dsl.pipex.com   :        - EM Forster
Technical Details
Message-ID: <slrnb037s1.iqu.leej@cafe.lan>
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!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!fu-berlin.de!uni-berlin.de!userdg058.dsl.pipex.COM!not-for-mail
References: <slrnavu70p.6gb.leej@cafe.lan> <FRML9.182113$ea.3697032@news2.calgary.shaw.ca> <slrnb0115m.n4t.leej@cafe.lan> <slrnb019bf.vuf.nsr@message-id.wahnes-world.de>

Show Full Headers
Complete Article Headers
Message-ID: <slrnb037s1.iqu.leej@cafe.lan>
Subject: Re: [SLRN] compose-hook() ???
Date: Thu, 19 Dec 2002 10:29:22 +0000
From: "Lee J. Moore" <leej@dsl.pipex.com>
References: <slrnavu70p.6gb.leej@cafe.lan> <FRML9.182113$ea.3697032@news2.calgary.shaw.ca> <slrnb0115m.n4t.leej@cafe.lan> <slrnb019bf.vuf.nsr@message-id.wahnes-world.de>
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!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!fu-berlin.de!uni-berlin.de!userdg058.dsl.pipex.COM!not-for-mail
Newsgroups: news.software.readers
Lines: 37
NNTP-Posting-Host: userdg058.dsl.pipex.com (62.190.230.58)
X-Trace: fu-berlin.de 1040293762 2204805 62.190.230.58 (16 [129053])
X-Platform: Gentoo Linux (Portage 2.0.46-r2)
X-Kernel: 2.4.19-gentoo-r10
X-Spam-Info: Incoming mail analysed and filtered by SpamAssassin
X-Spam-Info: Detected SPAM submitted to Vipuls Razor
User-Agent: slrn/0.9.7.4 (Linux)