🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #27317

Re: slrn: problem with slang macro and startup_hook

#27317
From: John E. Davis
Date: Wed, 30 Oct 1996 00:00
25 lines
1343 bytes
On 30 Oct 1996 13:04:39 GMT, Jason Costomiris <jcostom@shaft.sjis.com>
wrote:
>define starup_hook ()
>{
>	if(strcmp (server_name (), "betanews"))
>	{
>		set_string_variable("signature",".sig-betanews");
>	}
>}

Keep in mind that strcmp compares two strings in a case-sensitive
manner.  It returns 0 if they contain the same characters.  Your test
should be written:

	if (0 == strcmp (server_name (), "betanews"))
	
Note: this assumes that the `server_name' function will return
"betanews" and not, e.g.,  "betanews.com".
-- 
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: <slrn57eqt0.d1q.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-mail
References: <slrn57ekoe.e3n.jcostom@dogbert.sjis.com>

Show Full Headers
Complete Article Headers
Message-ID: <slrn57eqt0.d1q.davis@aluche.mit.edu>
Subject: Re: slrn: problem with slang macro and startup_hook
Date: Wed, 30 Oct 1996 00:00:00 +0000
From: davis@space.mit.edu (John E. Davis)
References: <slrn57ekoe.e3n.jcostom@dogbert.sjis.com>
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: 193463881
Organization: Center for Space Research
Reply-to: davis@space.mit.edu
Newsgroups: news.software.readers